icyphy / lf-buckler

Programming an nRF embedded board with a Berkeley Buckler daughter card using Lingua Franca.
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Clean up sleep until++ #22

Closed erlingrj closed 1 year ago

erlingrj commented 1 year ago

Address points here: https://github.com/lf-lang/reactor-c/pull/106

Main takeaways:

  1. Remove some unused code
  2. Move all sleep logic into lf_nrf52_support.c
  3. Handle sleeps greater than LF_MAX_SLEEP (UINT32_MAX)
  4. Fix race condition due to using nrf power management to sleep (we could go to sleep forever even with an event on the event queue if it gets scheduled just at the right moment)