You can create and kill user
timers at runtime. You must specify the maximum number of
running user timers and also the code for the os_tmr_call()
function.
OS_TIMERCNT specifies the number of user timers that can
be created and started. If user timers are not used, set this
value to 0. This information is used by RTX to reserve the memory
resources for timer control blocks.
#define OS_TIMERCNT 5
The callback function os_tmr_call() is called when the
user timer expires. It is provided in the RTX_Config.c configuration file as
an empty function. You must modify it to suit your needs.
Parameter info is the parameter passed to the
os_tmr_create() function when the timer was created.
/*--------------------------- os_tmr_call -----------------------------------*/
void os_tmr_call (U16 info) {
/* This function is called when the user timer has expired. */
/* Parameter "info" is the parameter defined when the timer was created. */
/* HERE: include here optional user code to be executed on timeout. */
info = info;
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.