You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I have just watched the seminar on the cib.hpp library. I like how we can modularize hardware functions as services, and bind them with external commands, without runtime overhead.
Following #30 , how do I refactor a FreeRTOS-style code from the following LED blinker example to cib.hpp? Here, there are two co-routines performing their own initializations, and then enters their own event loops iterating at 1000ms and 200ms correspondingly. I am assuming a single-thread application compiled by either avr-gcc or stm32-aarch64-gcc.
In particular, how do I refactor the above setup -> event loop -> teardown code to utilize CIB's compile time init() flow builder? How do I bind the button press event to the LED service? I hope to watch and learn how it is done in the CIB style.
The text was updated successfully, but these errors were encountered:
antonysigma
changed the title
How to refactor FreeRTOS-like projects to CIB ?
How to refactor FreeRTOS-style projects to CIB ?
Nov 18, 2022
antonysigma
changed the title
How to refactor FreeRTOS-style projects to CIB ?
How to refactor coroutine-style code & event loops to CIB ?
Jan 14, 2024
antonysigma
changed the title
How to refactor coroutine-style code & event loops to CIB ?
How to port coroutine-style code & event loops to CIB ?
Jan 14, 2024
Note to self: cib is a composition library for "gluing" MCU drivers together. It works with co-routines e.g. FreeRTOS, and does not replace it. The above coroutine code can be integrated with CIB by:
Although it begs the question how the advanced message passing interfaces of FreeRTOS (e.g. send messages among services, semaphores, instances of services) can be integrated with CIB.
Hi I have just watched the seminar on the
cib.hpp
library. I like how we can modularize hardware functions as services, and bind them with external commands, without runtime overhead.Following #30 , how do I refactor a FreeRTOS-style code from the following LED blinker example to
cib.hpp
? Here, there are two co-routines performing their own initializations, and then enters their own event loops iterating at 1000ms and 200ms correspondingly. I am assuming a single-thread application compiled by eitheravr-gcc
orstm32-aarch64-gcc
.In particular, how do I refactor the above
setup -> event loop -> teardown
code to utilize CIB's compile timeinit()
flow builder? How do I bind the button press event to the LED service? I hope to watch and learn how it is done in the CIB style.The text was updated successfully, but these errors were encountered: