-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Epic] - Gain deep understanding of mbed os #1
Comments
Communication / Command ProcessingIn our avr prototype, we use a homemade circular buffer to group commands before processing.
mbed provides something similar with built-in critical sections lock so it can be used from ISR (if needed).
Both have Our buffer also has a
|
Thread synchronization with EventFlagsI haven't tested it, but EventFlags could be a very nice tool to synchronize our threads with the For LED animation, something like this could work, we need to try it out: // inside a thread function doing the animation
while(true) {
// ...
leds.shine(200, 34, 78);
if event_flags.wait_any(STOP_FLAG, 10/*ms to wait*/) != 0 {
break; // break from while loop
}
leds.shine(150, 34, 90);
// ...
} The same tool can be used to "start" threads.
|
Simplify your code with mbed-events |
It's important do precisely study and understand how mbed works, the different API, drivers & communication stacks.
This issue of
type: epic
will be used to gather information, share what we have learned and things that could be useful in the future.Resources
The text was updated successfully, but these errors were encountered: