root/RF_BT_Tail/JDY08.h

Revision 244, 1.1 kB (checked in by phil, 4 years ago)

added initial Tail Source Package

Line 
1 // File: JDY08.h
2 //------------------------------------------------------------------------------
3 // Author: Giovanni de Sanctis
4 // Email: info@lateral-technologies.com
5 //------------------------------------------------------------------------------
6 // Date: Dec 2018
7 // HAL for the JDY-08 Bluetooth module (based on the TI chip CC2541)
8 //------------------------------------------------------------------------------
9
10 #ifndef JDY08_H
11 #define JDY08_H
12
13 #define RX_BUFF_LEN             64
14 #define MAX_AT_CMD_LEN  16
15
16 #include <stdint.h>
17
18 void initJDY08();
19
20 void btSendStr(const char* str,uint8_t len);
21
22 //Return the pointer to the buffer read, or a NULL pointer if no chars were received
23 char* btReadStr();
24
25 //Returns >0 if rx string contains the string passed
26 //Must be called after btReadStr()
27 //This is used to seek for a command string
28 uint8_t btRxStrContains(const char* str);
29
30 //Reads the next numerical value (must be preceded by the specified char)
31 //Must be called after btReadStr()
32 uint8_t btRxValue(uint16_t * const val,char * const type,const uint16_t maxVal);
33
34 #endif  /* JDY08_H */
35
Note: See TracBrowser for help on using the browser.