/* Initializes a queue. 
The am_hal_queue_from_array macro is a convenient shorthand for this operation. The code below does the same thing as the code above. */
void am_hal_queue_init(am_hal_queue_t *psQueue, void *pvData, uint32_t ui32ItemSize, uint32_t ui32ArraySize)
/* Initializes a queue. 
The am_hal_queue_from_array macro is a convenient shorthand for this operation. The code below does the same thing as the code above. */
void am_hal_queue_init(am_hal_queue_t *psQueue, void *pvData, uint32_t ui32ItemSize, uint32_t ui32ArraySize)
{
    psQueue->ui32WriteIndex = 0;
    psQueue->ui32ReadIndex = 0;
    psQueue->ui32Length = 0;
    psQueue->ui32Capacity = ui32ArraySize;
    psQueue->ui32ItemSize = ui32ItemSize;
    psQueue->pui8Data = (uint8_t *) pvData;
}