Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-rtos by
RtosTimer Class Reference
The RtosTimer class allow creating and and controlling of timer functions in the system. More...
#include <RtosTimer.h>
Public Member Functions | |
RtosTimer (void(*task)(void const *argument), os_timer_type type=osTimerPeriodic, void *argument=NULL) | |
Create and Start timer. | |
osStatus | stop (void) |
Stop the timer. | |
osStatus | start (uint32_t millisec) |
start a timer. |
Detailed Description
The RtosTimer class allow creating and and controlling of timer functions in the system.
A timer function is called when a time period expires whereby both on-shot and periodic timers are possible. A timer can be started, restarted, or stopped.
Timers are handled in the thread osTimerThread. Callback functions run under control of this thread and may use CMSIS-RTOS API calls.
Definition at line 37 of file RtosTimer.h.
Constructor & Destructor Documentation
RtosTimer | ( | void(*)(void const *argument) | task, |
os_timer_type | type = osTimerPeriodic , |
||
void * | argument = NULL |
||
) |
Create and Start timer.
- Parameters:
-
task name of the timer call back function. type osTimerOnce for one-shot or osTimerPeriodic for periodic behaviour. (default: osTimerPeriodic) argument argument to the timer call back function. (default: NULL)
Definition at line 31 of file RtosTimer.cpp.
Member Function Documentation
osStatus start | ( | uint32_t | millisec ) |
start a timer.
- Parameters:
-
millisec time delay value of the timer.
- Returns:
- status code that indicates the execution status of the function.
Definition at line 41 of file RtosTimer.cpp.
osStatus stop | ( | void | ) |
Stop the timer.
- Returns:
- status code that indicates the execution status of the function.
Definition at line 45 of file RtosTimer.cpp.
Generated on Wed Jul 13 2022 18:32:39 by
