jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

Make the stack (optionally) fully interrupt-driven #81

Closed jonas-schievink closed 4 years ago

jonas-schievink commented 4 years ago

Currently, the real-time part of the stack is already purely interrupt-driven (by a timer and a radio interrupt), but the non-real-time part has so far just been an idle loop and there was no way to know whether that processing is necessary before doing it (there was a function to query whether there's data to be processed, but that alone does not allow avoiding the work or moving the work out of the idle loop).

This PR adds feedback from the real-time Link-Layer about whether new low-priority work has been enqueued. This allows an app to only start processing packets via Responder::process_one when necessary, which allows to raise the priority of said processing and also enables energy saving by not spinning endlessly waiting for new work to arrive.

This PR does not currently work because it contains bugs. Bugs have been fixed.