...
is a pointer to a variable that will contain an error code returned by this function.
OS_ERR_NONE
if the message queue is flushed.
OS_ERR_FLUSH_ISR
if OS_CFG_CALLED_FROM_ISR_CHK_EN
set to 1
in os_cfg.h
: if calling this function from an ISR
OS_ERR_OBJ_PTR_NULL
if OS_CFG_ARG_CHK_EN
is set to 1
in os_cfg.h
: if p_q
is a NULL
pointer.
OS_ERR_OBJ_TYPE
if OS_CFG_OBJ_TYPE_CHK_EN
is set to 1
in os_cfg.h
: if you attempt to flush an object other than a message queue.
Returned Value
The number of OS_MSG
entries freed from the message queue. Note that the OS_MSG
entries are returned to the free pool of OS_MSGs
.
...