// File: JDY08.h //------------------------------------------------------------------------------ // Author: Giovanni de Sanctis // Email: info@lateral-technologies.com //------------------------------------------------------------------------------ // Date: Dec 2018 // HAL for the JDY-08 Bluetooth module (based on the TI chip CC2541) //------------------------------------------------------------------------------ #ifndef JDY08_H #define JDY08_H #define RX_BUFF_LEN 64 #define MAX_AT_CMD_LEN 16 #include void initJDY08(); void btSendStr(const char* str,uint8_t len); //Return the pointer to the buffer read, or a NULL pointer if no chars were received char* btReadStr(); //Returns >0 if rx string contains the string passed //Must be called after btReadStr() //This is used to seek for a command string uint8_t btRxStrContains(const char* str); //Reads the next numerical value (must be preceded by the specified char) //Must be called after btReadStr() uint8_t btRxValue(uint16_t * const val,char * const type,const uint16_t maxVal); #endif /* JDY08_H */