Timeout, Ticker, Thread , and Timer types in MBED
Page last updated 19 Sep 2018, by
0
replies
.
Handbooks:
- Timeout: https://os.mbed.com/handbook/Timeout
- Ticker: https://os.mbed.com/handbook/Ticker
- Thread: https://os.mbed.com/handbook/RTOS
- Timer: https://os.mbed.com/handbook/Timer
Bref explanation:
- Timeout allow to execute a interrupt function, once, after an amount of time.
- Ticker do the same but repeats.
- Thread is a clean way to do two things at the same time.
- Timer can be started and stopped to get an elapsed time (maximum of 2^31-1 microseconds i.e. 30 minutes).
Uses:
- Timeout can be used to do a loop for a known amount of time (the interrupt function executed will change a variable that is the condition of a while loop).
- Ticker can be use to check parameters (tension, frequency...), every known amount of time.
- Thread, we never know... it's good to know.
- Timer can be used to determine a period.
Please log in to post comments.