forked from espressif/arduino-esp32
Allow to add custom callback in BT Serial (#2081)
This allow to catch the events when connected /disconnected,, etc... This also allow to get parameters of events like the remote address of connected devices, etc... Small change but lot of flexibility
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "Stream.h"
|
||||
#include <esp_spp_api.h>
|
||||
|
||||
class BluetoothSerial: public Stream
|
||||
{
|
||||
@ -38,6 +39,7 @@ class BluetoothSerial: public Stream
|
||||
size_t write(const uint8_t *buffer, size_t size);
|
||||
void flush();
|
||||
void end(void);
|
||||
esp_err_t register_callback(esp_spp_cb_t * callback);
|
||||
|
||||
private:
|
||||
String local_name;
|
||||
|
Reference in New Issue
Block a user