TinyPico suspend BLE callback
Posted: Sat Jan 29, 2022 1:03 am
Hi all,
I have a TinyPico board which has an ESP32. In my Arduino code I have a class that defines the callback onWrite to read Bluetooth messages.
Then in setup() I instantiate it pCharacteristic->setCallbacks(new MyCallbacks());. Can I "suspend" and reactivate that callback from another function in the code? Basically, at some point I want to ignore BLE messages, but still keep the Bluetooth connection alive and I don't want to enter the onWrite(), then I need to reactivate the callback from another point.
Thank you
I have a TinyPico board which has an ESP32. In my Arduino code I have a class that defines the callback onWrite to read Bluetooth messages.
- class MyCallbacks: public BLECharacteristicCallbacks {
- // on received bluetooth message
- void onWrite(BLECharacteristic *pCharacteristic) {
- ...
- }
- }
Thank you