-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
We started replacing Contiki with a similar but simpler event loop in pbio/os recently. A few drivers are still to be done.
- ADC EV3
- ADC STM32 HAL
- ADC STM32 F0
- Display
- Buttons (@laurensvalk )
- IMU
- motor driver simulation
- PWM TLC5955
- USB (@laurensvalk started)
- light animation (started, PR opened, needs fixing tests)
- sys core and HMI (@laurensvalk )
- tests
- pbio/task and Bluetooth (@laurensvalk )
Most of these are very straightforward. It is just replacing the macros, return values, and polls.
pbio/task and Bluetooth probably deserves a closer look. I think we could aim to translate it as-is at first, and then consider if we could make any improvements. The new pbio_os_process_t structure is nearly identical to that of pbio/tasks. They're just used slightly differently: queued instead of all running in parallel.
We do need to add a cancellation request but we need to add that anyway to implement a process exit method, which is currently used to reset the Bluetooth process from pbdrv_bluetooth_power_on(false).
It would be nice to integrate this properly instead of letting the Bluetooth processes being the odd one out as they are today.
Completing this should bring back some consistency for us and new contributors.
It should also free up a couple of hundred bytes since we would no longer need the etimer process. It will also free up some space in processes that have a lot of status = err; exit(pt) since this is now a simple return err.