Driver for the JY-MCU v1.06 HC-06 Bluetooth module.

Dependents:   DISCO-F746NG_rtos_test MbedTableControl

Revision:
20:13283edd1aba
Parent:
19:41da4bfc4d4d
Child:
21:cce827364df1
--- a/HC06Bluetooth.h	Fri Aug 05 17:13:14 2016 -0400
+++ b/HC06Bluetooth.h	Mon Aug 08 15:03:13 2016 -0400
@@ -11,10 +11,11 @@
 #ifndef HC06BLUETOOTH_H_
 #define HC06BLUETOOTH_H_
 #include "mbed.h"
+#include "rtos.h"
 #include <string>
 #include <queue>
 
-const int dataBufferSize = 256;
+const uint32_t SIG_BT_BYTE = (1 << 2);
 // WARNING: DO NOT CHANGE THESE VALUES, AS THEY ARE USED TO INDEX INTO AN ARRAY FOR IMPLEMENTATION.
 enum Baudrate {B1200, B2400, B4800, B9600, B19200, B38400, B57600, B115200, B230400, B460800, B921600, B1382400, END};
 
@@ -69,6 +70,8 @@
     RawSerial btSerialObj;
     Baudrate baudrate;
     void receiveByteISR();
+    void receiveByteThread();
+    Thread receiveByteThreadObj;
     /// Pointer to a callback function the client provides when a line is received.
     void (*lineCallbackFunc) (const char*, size_t strlen);
     /// Pointer to a callback function the client provides when a character is received.