Modificación para implementar SoftSerial

Dependents:   neurGAI_Seeed_BLUETOOTH TFG

Fork of BluetoothSerial by Yihui Xiong

Revision:
1:267fd413fd16
Parent:
0:f56002898ee8
--- a/BluetoothSerial.cpp	Thu Feb 20 03:30:43 2014 +0000
+++ b/BluetoothSerial.cpp	Wed Dec 09 11:16:13 2015 +0000
@@ -2,7 +2,7 @@
 #include "BluetoothSerial.h"
 #include <string.h>
 
-#define LOG(args...)   // std::printf(args)
+#define LOG(args...)    // std::printf(args)
 
 BluetoothSerial::BluetoothSerial(PinName tx, PinName rx) : _serial(tx, rx)
 {   
@@ -40,7 +40,7 @@
     const char *prefix = "CONNECT:";
     uint8_t prefix_len = sizeof("CONNECT:") - 1;
     for (uint8_t i = 0; i < 12; i++) {
-        int len = readline(_buf, sizeof(_buf));
+        int len = readline(_buf, sizeof(_buf), 1);
         if (len > 0) {
             LOG("%s\r\n", _buf);
             if (!memcmp(_buf, prefix, prefix_len)) {    // check prefix