![]() |
MCUXpresso SDK API Reference Manual
Rev 2.12.1
NXP Semiconductors
|
Enumerations | |
| enum | messaging_status_t { kMSG_Success = kStatus_Success, kMSG_Error = MAKE_STATUS(kStatusGroup_MSG, 1) } |
| The msg status. More... | |
Functions | |
| void * | MSG_Alloc (uint32_t length) |
| Allocates a message node with the length. More... | |
| void | MSG_Free (void *buffer) |
| frees a buffer allocated by MSG_Alloc. More... | |
| messaging_status_t | MSG_QueueAddTail (messaging_t *msgQueue, void *msg) |
| Links a message to the tail of the message queue. More... | |
| messaging_status_t | MSG_QueueAddHead (messaging_t *msgQueue, void *msg) |
| Links a message to the head of the message queue. More... | |
| messaging_status_t | MSG_QueueAddPrev (void *msg, void *newMsg) |
| Links a message to the previous of the given message. More... | |
| messaging_status_t | MSG_QueueRemove (void *msg) |
| Unlinks a message from its message queue. More... | |
| void * | MSG_QueueRemoveHead (messaging_t *msgQueue) |
| Unlinks the head from the message queue. More... | |
| void * | MSG_QueueGetHead (messaging_t *msgQueue) |
| Gets the head of the message queue. More... | |
| void * | MSG_QueueGetNext (void *msg) |
| Gets the next node of a given message. More... | |
| void * | MSG_QueueGetPrev (void *msg) |
| Gets the previous node of a given message. More... | |
| enum messaging_status_t |
| void* MSG_Alloc | ( | uint32_t | length | ) |
This function allocates a message node with the length.
| length | The length of the message. |
| The | allocated memory buffer address. |
| void MSG_Free | ( | void * | buffer | ) |
This function frees a buffer allocated by MSG_Alloc.
| buffer | The buffer address. |
| messaging_status_t MSG_QueueAddTail | ( | messaging_t * | msgQueue, |
| void * | msg | ||
| ) |
The function links a message to the tail of the message queue. The memory space of the message must be allocated by calling the function MSG_Alloc. And the memory space of the message must be freed by calling the function MSG_Free.
| msgQueue | The message queue pointer. |
| msg | The pointer of the message allocated by the MSG_Alloc. |
| kMSG_Success | The message is added. |
| kMSG_Error | The message addition failed. |
| messaging_status_t MSG_QueueAddHead | ( | messaging_t * | msgQueue, |
| void * | msg | ||
| ) |
The function links a message to the head of the message queue. The memory space of the message must be allocated by calling the function MSG_Alloc. And the memory space of the message must be freed by calling the function MSG_Free.
| msgQueue | The message queue pointer. |
| msg | The pointer of the message allocated by the MSG_Alloc. |
| kMSG_Success | The message is added. |
| kMSG_Error | The message addition failed. |
| messaging_status_t MSG_QueueAddPrev | ( | void * | msg, |
| void * | newMsg | ||
| ) |
The function links a message to the previous of the given message. The memory space of the message must be allocated by calling the function MSG_Alloc. And the memory space of the message must be freed by calling the function MSG_Free.
| msg | The given message pointer. |
| newMsg | A new message pointer needs to be added. |
| kMSG_Success | The message is added. |
| kMSG_Error | The message addition failed. |
| messaging_status_t MSG_QueueRemove | ( | void * | msg | ) |
The function unlinks a message from its message queue. The memory space of the message must be allocated by calling the function MSG_Alloc. And the memory space of the message must be freed by calling the function MSG_Free.
| msg | The message pointer. |
| kMSG_Success | The message is removed. |
| kMSG_Error | The message removal failed. |
| void* MSG_QueueRemoveHead | ( | messaging_t * | msgQueue | ) |
The function unlinks the head from the message queue.
| msgQueue | The message queue pointer. |
| NULL | if the message queue is empty, or the pointer of removed message if removal was successful. |
| void* MSG_QueueGetHead | ( | messaging_t * | msgQueue | ) |
The function gets the head of the message queue.
| msgQueue | The message queue pointer. |
| The | pointer of the message if the head is not NULL, or NULL. |
| void* MSG_QueueGetNext | ( | void * | msg | ) |
The function gets the next node of a given message. The memory space of the message must be allocated by calling the function MSG_Alloc. And the memory space of the message must be freed by calling the function MSG_Free.
| msg | The message pointer. |
| The | pointer of the message if the next pointer is not NULL, or NULL. |
| void* MSG_QueueGetPrev | ( | void * | msg | ) |
The function gets the previous node of a given message. The memory space of the message must be allocated by calling the function MSG_Alloc. And the memory space of the message must be freed by calling the function MSG_Free.
| msg | The message pointer. |
| The | pointer of the message if the previous pointer is not NULL, or NULL. |