...
Files
os.h/os_tmr.c
Prototype
Code Block |
---|
CPU_BOOLEAN OSTmrDel (OS_TMR *p_tmr,
OS_ERR *p_err) |
Arguments
p_tmr
is a pointer to the timer to be deleted.
...
- Do not call this function from an ISR.
- When deleting a timer, do not reference it again unless you re-create the timer by calling
OSTmrCreate()
.
Example Usage
Code Block | ||
---|---|---|
| ||
OS_TMR CloseDoorTmr;
void Task (void *p_arg)
{
OS_ERR err;
CPU_BOOLEAN deleted;
(void)&p_arg;
while (DEF_ON) {
deleted = OSTmrDel(&CloseDoorTmr,
&err);
/* Check "err" */
:
:
}
} |