Timeout, Ticker, Thread , and Timer types in MBED

Handbooks:

  1. Timeout: https://os.mbed.com/handbook/Timeout
  2. Ticker: https://os.mbed.com/handbook/Ticker
  3. Thread: https://os.mbed.com/handbook/RTOS
  4. Timer: https://os.mbed.com/handbook/Timer

Bref explanation:

  1. Timeout allow to execute a interrupt function, once, after an amount of time.
  2. Ticker do the same but repeats.
  3. Thread is a clean way to do two things at the same time.
  4. Timer can be started and stopped to get an elapsed time (maximum of 2^31-1 microseconds i.e. 30 minutes).

Uses:

  1. 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).
  2. Ticker can be use to check parameters (tension, frequency...), every known amount of time.
  3. Thread, we never know... it's good to know.
  4. Timer can be used to determine a period.


Please log in to post comments.