...
Files
os.h/os_task.c
Prototype
Code Block |
---|
void OSTaskQPost (OS_TCB *p_tcb,
void *p_void,
OS_MSG_SIZE msg_size,
OS_OPT opt,
OS_ERR *p_err) |
Arguments
p_tcb
is a pointer to the TCB of the task. Note that it is possible to post a message to the calling task (i.e., self) by specifying a NULL
pointer, or the address of its TCB.
...
Notes/Warnings
None
Example Usage
Code Block | ||
---|---|---|
| ||
OS_TCB CommRxTaskTCB;
CPU_INT08U CommRxBuf[100];
void CommTaskRx (void *p_arg)
{
OS_ERR err;
(void)&p_arg;
while (DEF_ON) {
:
OSTaskQPost(&CommRxTaskTCB,
(void *)&CommRxBuf[0],
sizeof(CommRxBuf),
OS_OPT_POST_FIFO,
&err);
/* Check "err" */
:
:
}
} |