message_buffer.h
BaseType_t xMessageBufferReset( MessageBufferHandle_t xMessageBuffer );
Resets a message buffer to its initial empty state, discarding any message it contained.
A message buffer can only be reset if there are no tasks blocked on it.
- Parameters
-
xMessageBuffer | The handle of the message buffer being reset. |
- Returns
- If the message buffer was reset then pdPASS is returned. If the message buffer could not be reset because either there was a task blocked on the message queue to wait for space to become available, or to wait for a a message to be available, then pdFAIL is returned.