...
Files
os.h/os_task.c
Prototype
Code Block |
---|
OS_SEM_CTR OSTaskSemPost (OS_TCB *p_tcb,
OS_OPT opt,
OS_ERR *p_err) |
Arguments
p_tcb
is a pointer to the TCB of the task being signaled. A NULL
pointer indicates that the user is sending a signal to itself.
...
If the call was successful and the signal was sent.
OS_ERR_INT_Q_FULL
If OS_CFG_ISR_POST_DEFERRED_EN
is to DEF_ENABLED
in os_cfg.h
: If the deferred interrupt post queue is full.
OS_ERR_OPT_INVALID
If OS_CFG_ARG_CHK_EN
is set to DEF_ENABLED
in os_cfg.h
: if a valid option is not specified.
...
Application and ISRs.
Notes/Warnings
N/A
...
None.
Example Usage
Code Block | ||
---|---|---|
| ||
OS_TCB CommRxTaskTCB;
void CommTaskRx (void *p_arg)
{
OS_ERR err;
OS_SEM_CTR ctr;
(void)&p_arg;
while (DEF_ON) {
:
ctr = OSTaskSemPost(&CommRxTaskTCB,
OS_OPT_POST_NONE,
&err);
/* Check "err" */
:
:
}
} |