taks / esp32-nimble

A wrapper for the ESP32 NimBLE Bluetooth stack.
Apache License 2.0
118 stars 35 forks source link

Make use of `esp_idf_svc::eventloop::EspSystemEventLoop` instead of `loop`? #113

Open juliankrieger opened 8 months ago

juliankrieger commented 8 months ago

I'm currently weighing my options between diving into esp32 internals and doing it myself or asking for your help.

What effort do you think it would take to move the ble_server loop into the aforementioned sysloop?

taks commented 7 months ago

What does the ble_server loop refer to? Do you want to use EspSystemEventLoop to do the processing currently done by handle_gap_event?

juliankrieger commented 7 months ago

Not only that, but couldn't the on_<event> functions make use of the Eventloop functionality? I would be interested in opening a PR if you think it's feasible.

taks commented 7 months ago

For some on_<event>, the result of the callback is used in subsequent processing. (e.g. BLECharacteristic.on_write) The question is how to handle that process in the Eventloop.

PR is welcome.