|
Lamp-Da 0.1
A compact lantern project
|
Implementation of inter thread queues. More...
Classes | |
| struct | QueueWrapp |
Typedefs | |
| typedef void * | QueueHandle_t |
Enumerations | |
| enum | HAL_queue_status_t { HAL_QUEUE_OK = 0 , HAL_QUEUE_ERR_INVALID_PARAM = -1 , HAL_QUEUE_ERR_TIMEOUT = -2 , HAL_QUEUE_ERR_FULL = -3 , HAL_QUEUE_ERR_EMPTY = -4 , HAL_QUEUE_ERR_OTHER = -5 } |
| Queue operation status codes. | |
Functions | |
| QueueHandle_t | HAL_create_queue (size_t itemSize, uint32_t queueLength) |
| Create a queue with the specified item size and maximum length. | |
| void | HAL_delete_queue (QueueHandle_t handle) |
| Delete/free a queue and release its underlying resources. | |
| HAL_queue_status_t | HAL_queue_send (QueueHandle_t handle, const void *item, uint32_t timeoutMs) |
| Send an item to the queue. | |
| HAL_queue_status_t | HAL_queue_receive (QueueHandle_t handle, void *const outItem, uint32_t timeoutMs) |
| Receive an item from the queue. Blocks until an item is available or timeout expires. | |
Implementation of inter thread queues.
| QueueHandle_t lampda::hal::queues::HAL_create_queue | ( | size_t | itemSize, |
| uint32_t | queueLength | ||
| ) |
Create a queue with the specified item size and maximum length.
| [in] | itemSize | Size of each item in bytes (abstracts the data type) |
| [in] | queueLength | Maximum number of items the queue can hold |
| void lampda::hal::queues::HAL_delete_queue | ( | QueueHandle_t | handle | ) |
Delete/free a queue and release its underlying resources.
| [in] | handle | Handle of the queue to delete |
| HAL_queue_status_t lampda::hal::queues::HAL_queue_receive | ( | QueueHandle_t | handle, |
| void *const | outItem, | ||
| uint32_t | timeoutMs | ||
| ) |
Receive an item from the queue. Blocks until an item is available or timeout expires.
| [in] | handle | Handle of the queue |
| [out] | outItem | Pointer to buffer to store the received item |
| [in] | timeoutMs | Timeout in milliseconds. 0 = non-blocking |
| HAL_queue_status_t lampda::hal::queues::HAL_queue_send | ( | QueueHandle_t | handle, |
| const void * | item, | ||
| uint32_t | timeoutMs | ||
| ) |
Send an item to the queue.
| [in] | handle | Handle of the queue |
| [in] | item | Pointer to the item to send |
| [in] | timeoutMs | Timeout in milliseconds. 0 = non-blocking, UINT32_MAX = block indefinitely |