Fix Bluetooth Serial

This commit is contained in:
me-no-dev 2018-04-03 11:09:29 +03:00
parent 3a4ec66d41
commit 25dff4f044

View File

@ -27,6 +27,11 @@
#include "esp_gap_bt_api.h" #include "esp_gap_bt_api.h"
#include "esp_bt_device.h" #include "esp_bt_device.h"
#include "esp_spp_api.h" #include "esp_spp_api.h"
#include <esp_log.h>
#ifdef ARDUINO_ARCH_ESP32
#include "esp32-hal-log.h"
#endif
#define SPP_SERVER_NAME "ESP32_SPP_SERVER" #define SPP_SERVER_NAME "ESP32_SPP_SERVER"
#define SPP_TAG "BluetoothSerial" #define SPP_TAG "BluetoothSerial"
@ -208,8 +213,8 @@ int BluetoothSerial::read(void)
if (xQueueReceive(SerialQueueBT, &c, 0)){ if (xQueueReceive(SerialQueueBT, &c, 0)){
return c; return c;
} }
return 0;
} }
return 0;
} }
size_t BluetoothSerial::write(uint8_t c) size_t BluetoothSerial::write(uint8_t c)