File tree 3 files changed +11
-1
lines changed
libraries/BluetoothSerial
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ BluetoothSerial KEYWORD1
19
19
#######################################
20
20
21
21
SerialBT KEYWORD2
22
-
22
+ hasClient KEYWORD2
23
23
24
24
#######################################
25
25
# Constants (LITERAL1)
Original file line number Diff line number Diff line change 29
29
#include " esp_spp_api.h"
30
30
31
31
#define SPP_SERVER_NAME " ESP32_SPP_SERVER"
32
+ #define SPP_TAG " BluetoothSerial"
32
33
33
34
#define QUEUE_SIZE 256
34
35
uint32_t client;
@@ -188,6 +189,14 @@ int BluetoothSerial::peek(void)
188
189
return -1 ;
189
190
}
190
191
192
+ bool BluetoothSerial::hasClient (void )
193
+ {
194
+ if (client)
195
+ return true ;
196
+
197
+ return false ;
198
+ }
199
+
191
200
int BluetoothSerial::read (void )
192
201
{
193
202
if (available ()){
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ class BluetoothSerial: public Stream
40
40
bool begin (String localName=String());
41
41
int available (void );
42
42
int peek (void );
43
+ bool hasClient (void );
43
44
int read (void );
44
45
size_t write (uint8_t c);
45
46
size_t write (const uint8_t *buffer, size_t size);
You can’t perform that action at this time.
0 commit comments