mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-03 05:46:32 +02:00
Add hasClient for BluetoothSerial (#1183)
* Add hasClient for BluetoothSerial * Add SPP_TAG
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#include "esp_spp_api.h"
|
||||
|
||||
#define SPP_SERVER_NAME "ESP32_SPP_SERVER"
|
||||
#define SPP_TAG "BluetoothSerial"
|
||||
|
||||
#define QUEUE_SIZE 256
|
||||
uint32_t client;
|
||||
@ -188,6 +189,14 @@ int BluetoothSerial::peek(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool BluetoothSerial::hasClient(void)
|
||||
{
|
||||
if (client)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int BluetoothSerial::read(void)
|
||||
{
|
||||
if (available()){
|
||||
|
Reference in New Issue
Block a user