24 #if defined(EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
30 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
31 static bool uartdrvHandleIsInitialized =
false;
35 static bool ReceiveDmaComplete(
unsigned int channel,
36 unsigned int sequenceNo,
38 static bool TransmitDmaComplete(
unsigned int channel,
39 unsigned int sequenceNo,
45 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
50 for(i = 0; i < EMDRV_UARTDRV_MAX_DRIVER_INSTANCES; i++)
52 if (uartdrvHandle[i]->initData.ctsPin == gpioPinNo)
54 return uartdrvHandle[i];
73 static void HwFcManageClearToSend(uint8_t gpioPinNo)
81 handle->fcSelfState = HwFcGetClearToSendPin(handle);
86 handle->IgnoreRestrain =
false;
112 GPIO_PinOutSet(handle->initData.rtsPort, handle->initData.rtsPin);
124 GPIO_PinOutSet(handle->initData.rtsPort, handle->initData.rtsPin);
132 FcSwCode = UARTDRV_FC_SW_XON;
137 FcSwCode = UARTDRV_FC_SW_XOFF;
161 *queueBuffer = &queue->
fifo[queue->
head];
177 if (queue->
used == 0)
183 *buffer = &queue->
fifo[queue->
tail];
199 if (queue->
used == 0)
205 *buffer = &queue->
fifo[queue->
tail];
219 #if defined( USART_ROUTEPEN_TXPEN )
220 handle->initData.port->ROUTEPEN |= USART_ROUTEPEN_TXPEN;
232 #if defined( USART_ROUTEPEN_TXPEN )
233 handle->initData.port->ROUTEPEN &= ~USART_ROUTEPEN_TXPEN;
248 #if defined( USART_ROUTEPEN_RXPEN )
249 handle->initData.port->ROUTEPEN |= USART_ROUTEPEN_RXPEN;
261 #if defined( USART_ROUTEPEN_RXPEN )
262 handle->initData.port->ROUTEPEN &= ~USART_ROUTEPEN_RXPEN;
278 handle->rxDmaActive =
true;
279 rxPort = (
void *)&(handle->initData.port->RXDATA);
301 handle->txDmaActive =
true;
302 txPort = (
void *)&(handle->initData.port->TXDATA);
319 static bool ReceiveDmaComplete(
unsigned int channel,
320 unsigned int sequenceNo,
329 GetTailBuffer(handle->rxQueue, &buffer);
356 DequeueBuffer(handle->rxQueue, &buffer);
358 if (handle->rxQueue->used > 0)
360 GetTailBuffer(handle->rxQueue, &buffer);
361 StartReceiveDma(handle, buffer);
365 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
367 FcApplyState(handle);
369 handle->rxDmaActive =
false;
370 DisableReceiver(handle);
380 static bool TransmitDmaComplete(
unsigned int channel,
381 unsigned int sequenceNo,
390 GetTailBuffer(handle->txQueue, &buffer);
402 DequeueBuffer(handle->txQueue, &buffer);
404 if (handle->txQueue->used > 0)
406 GetTailBuffer(handle->txQueue, &buffer);
407 StartTransmitDma(handle, buffer);
411 handle->txDmaActive =
false;
439 #if defined( _USART_ROUTELOC0_MASK )
445 #if defined( _USART_ROUTELOC0_MASK )
446 initData = &handle->initData;
449 #if defined(USARTRF0)
450 }
else if (handle->initData.port == USARTRF0) {
451 handle->txPort = (
GPIO_Port_TypeDef)AF_USARTRF0_TX_PORT( initData->portLocationTx );
452 handle->rxPort = (
GPIO_Port_TypeDef)AF_USARTRF0_RX_PORT( initData->portLocationRx );
453 handle->txPin = AF_USARTRF0_TX_PIN( initData->portLocationTx );
454 handle->rxPin = AF_USARTRF0_RX_PIN( initData->portLocationRx );
456 #if defined(USARTRF1)
457 }
else if (handle->initData.port == USARTRF1) {
458 handle->txPort = (
GPIO_Port_TypeDef)AF_USARTRF1_TX_PORT( initData->portLocationTx );
459 handle->rxPort = (
GPIO_Port_TypeDef)AF_USARTRF1_RX_PORT( initData->portLocationRx );
460 handle->txPin = AF_USARTRF1_TX_PIN( initData->portLocationTx );
461 handle->rxPin = AF_USARTRF1_RX_PIN( initData->portLocationRx );
464 }
else if (handle->initData.port ==
USART0) {
465 handle->txPort = (
GPIO_Port_TypeDef)AF_USART0_TX_PORT( initData->portLocationTx );
466 handle->rxPort = (
GPIO_Port_TypeDef)AF_USART0_RX_PORT( initData->portLocationRx );
467 handle->txPin = AF_USART0_TX_PIN( initData->portLocationTx );
468 handle->rxPin = AF_USART0_RX_PIN( initData->portLocationRx );
471 }
else if (handle->initData.port ==
USART1) {
472 handle->txPort = (
GPIO_Port_TypeDef)AF_USART1_TX_PORT( initData->portLocationTx );
473 handle->rxPort = (
GPIO_Port_TypeDef)AF_USART1_RX_PORT( initData->portLocationRx );
474 handle->txPin = AF_USART1_TX_PIN( initData->portLocationTx );
475 handle->rxPin = AF_USART1_RX_PIN( initData->portLocationRx );
478 }
else if (handle->initData.port ==
USART2) {
479 handle->txPort = (
GPIO_Port_TypeDef)AF_USART2_TX_PORT( initData->portLocationTx );
480 handle->rxPort = (
GPIO_Port_TypeDef)AF_USART2_RX_PORT( initData->portLocationRx );
481 handle->txPin = AF_USART2_TX_PIN( initData->portLocationTx );
482 handle->rxPin = AF_USART2_RX_PIN( initData->portLocationRx );
485 }
else if (handle->initData.port ==
UART0) {
486 handle->txPort = (
GPIO_Port_TypeDef)AF_UART0_TX_PORT( initData->portLocationTx );
487 handle->rxPort = (
GPIO_Port_TypeDef)AF_UART0_RX_PORT( initData->portLocationRx );
488 handle->txPin = AF_UART0_TX_PIN( initData->portLocationTx );
489 handle->rxPin = AF_UART0_RX_PIN( initData->portLocationRx );
492 }
else if (handle->initData.port ==
UART1) {
493 handle->txPort = (
GPIO_Port_TypeDef)AF_UART1_TX_PORT( initData->portLocationTx );
494 handle->rxPort = (
GPIO_Port_TypeDef)AF_UART1_RX_PORT( initData->portLocationRx );
495 handle->txPin = AF_UART1_TX_PIN( initData->portLocationTx );
496 handle->rxPin = AF_UART1_RX_PIN( initData->portLocationRx );
502 location = handle->initData.portLocation;
506 }
else if (handle->initData.port ==
USART0) {
509 handle->txPin = AF_USART0_TX_PIN(location);
510 handle->rxPin = AF_USART0_RX_PIN(location);
513 }
else if (handle->initData.port ==
USART1) {
516 handle->txPin = AF_USART1_TX_PIN(location);
517 handle->rxPin = AF_USART1_RX_PIN(location);
520 }
else if (handle->initData.port ==
USART2) {
523 handle->txPin = AF_USART2_TX_PIN(location);
524 handle->rxPin = AF_USART2_RX_PIN(location);
527 }
else if (handle->initData.port ==
UART0) {
530 handle->txPin = AF_UART0_TX_PIN(location);
531 handle->rxPin = AF_UART0_RX_PIN(location);
534 }
else if (handle->initData.port ==
UART1) {
537 handle->txPin = AF_UART1_TX_PIN(location);
538 handle->rxPin = AF_UART1_RX_PIN(location);
549 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
554 GPIO_IntConfig(handle->initData.ctsPort, handle->initData.ctsPin,
true,
true,
true);
562 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
567 GPIO_IntConfig(handle->initData.ctsPort, handle->initData.ctsPin,
true,
true,
false);
594 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
605 if (initData == NULL)
612 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
614 if (!uartdrvHandleIsInitialized)
616 for (handleIdx = 0; handleIdx < EMDRV_UARTDRV_MAX_DRIVER_INSTANCES; handleIdx++)
618 uartdrvHandle[handleIdx] = NULL;
620 uartdrvHandleIsInitialized =
true;
624 for (handleIdx = 0; handleIdx < EMDRV_UARTDRV_MAX_DRIVER_INSTANCES; handleIdx++)
626 if ((uartdrvHandle[handleIdx] == NULL) || (uartdrvHandle[handleIdx] == handle))
628 uartdrvHandle[handleIdx] = handle;
688 else if (initData->
port == UART2)
690 handle->uartClock = cmuClock_UART2;
691 handle->txDmaSignal = dmadrvPeripheralSignal_UART2_TXBL;
692 handle->rxDmaSignal = dmadrvPeripheralSignal_UART2_RXDATAV;
700 memcpy((
void *)&handle->initData, (
const void *)initData,
sizeof(
UARTDRV_Init_t));
701 handle->rxQueue = initData->
rxQueue;
702 handle->rxQueue->head = 0;
703 handle->rxQueue->tail = 0;
704 handle->rxQueue->used = 0;
705 handle->rxDmaActive =
false;
707 handle->txQueue = initData->
txQueue;
708 handle->txQueue->head = 0;
709 handle->txQueue->tail = 0;
710 handle->txQueue->used = 0;
711 handle->txDmaActive =
false;
713 handle->IgnoreRestrain =
false;
719 #if defined(USART_CTRL_MVDIS)
736 #if defined( USART_ROUTEPEN_TXPEN )
737 initData->
port->ROUTEPEN = USART_ROUTEPEN_TXPEN
738 | USART_ROUTEPEN_RXPEN;
739 initData->
port->ROUTELOC0 = ( initData->
port->ROUTELOC0 &
740 ~( _USART_ROUTELOC0_TXLOC_MASK
741 | _USART_ROUTELOC0_RXLOC_MASK ) )
742 | ( initData->portLocationTx << _USART_ROUTELOC0_TXLOC_SHIFT )
743 | ( initData->portLocationRx << _USART_ROUTELOC0_RXLOC_SHIFT );
759 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
765 FcApplyState(handle);
822 ConfigGPIO(handle,
false);
830 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
838 handle->rxQueue->head = 0;
839 handle->rxQueue->tail = 0;
840 handle->rxQueue->used = 0;
842 handle->txQueue->head = 0;
843 handle->txQueue->tail = 0;
844 handle->txQueue->used = 0;
866 if (handle == NULL) {
882 && (handle->rxQueue->used == 0))
891 GetTailBuffer(handle->txQueue, &txBuffer);
906 GetTailBuffer(handle->rxQueue, &rxBuffer);
936 return (uint8_t)handle->rxQueue->used;
964 if (handle->rxQueue->used > 0)
966 GetTailBuffer(handle->rxQueue, &rxBuffer);
971 *itemsRemaining = remaining;
972 *buffer = rxBuffer->
data;
980 return handle->initData.port->STATUS;
995 return (uint8_t)handle->txQueue->used;
1023 if (handle->txQueue->used > 0)
1025 GetTailBuffer(handle->txQueue, &txBuffer);
1030 *itemsRemaining = remaining;
1031 *buffer = txBuffer->
data;
1035 *itemsRemaining = 0;
1039 return handle->initData.port->STATUS;
1057 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
1058 handle->fcSelfCfg = state;
1061 handle->fcSelfState = state;
1063 return FcApplyState(handle);
1081 return handle->fcPeerState;
1096 return handle->fcSelfState;
1111 handle->IgnoreRestrain =
true;
1138 retVal = CheckParams(handle, data, maxCount);
1145 while(handle->rxQueue->used > 0);
1150 EnableReceiver(handle);
1155 *data = (uint8_t)handle->initData.port->RXDATA;
1167 DisableReceiver(handle);
1194 retVal = CheckParams(handle, data, count);
1201 while(handle->txQueue->used > 0);
1206 EnableTransmitter(handle);
1212 handle->initData.port->TXDATA = *data;
1219 DisableTransmitter(handle);
1250 retVal = CheckParams(handle, data, count);
1255 outputBuffer.
data = data;
1261 retVal = EnqueueBuffer(handle->rxQueue, &outputBuffer, &queueBuffer);
1266 if (!(handle->rxDmaActive))
1268 EnableReceiver(handle);
1269 StartReceiveDma(handle, queueBuffer);
1270 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
1272 FcApplyState(handle);
1301 retVal = CheckParams(handle, data, count);
1306 inputBuffer.
data = data;
1312 retVal = EnqueueBuffer(handle->rxQueue, &inputBuffer, &queueBuffer);
1317 while(handle->rxQueue->used > 1)
1321 EnableReceiver(handle);
1322 #if (EMDRV_UARTDRV_HW_FLOW_CONTROL_ENABLE)
1324 FcApplyState(handle);
1326 StartReceiveDma(handle, queueBuffer);
1327 while(handle->rxDmaActive)
1359 retVal = CheckParams(handle, data, count);
1364 inputBuffer.
data = data;
1370 retVal = EnqueueBuffer(handle->txQueue, &inputBuffer, &queueBuffer);
1375 if (!(handle->txDmaActive))
1377 StartTransmitDma(handle, queueBuffer);
1405 retVal = CheckParams(handle, data, count);
1410 outputBuffer.
data = data;
1416 retVal = EnqueueBuffer(handle->txQueue, &outputBuffer, &queueBuffer);
1421 while(handle->txQueue->used > 1)
1425 StartTransmitDma(handle, queueBuffer);
1426 while(handle->txDmaActive)
USART_Stopbits_TypeDef stopbits
UARTDRV_Buffer_FifoQueue_t * txQueue
Transmit operation queue.
Ecode_t UARTDRV_Transmit(UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count, UARTDRV_Callback_t callback)
Start a non-blocking transmit.
#define ECODE_EMDRV_UARTDRV_PARAM_ERROR
Illegal input parameter.
uint8_t UARTDRV_GetTransmitDepth(UARTDRV_Handle_t handle)
Returns the number of queued transmit operations.
UARTDRV_Buffer_FifoQueue_t * rxQueue
Receive operation queue.
#define USART_STATUS_TXENS
enum UARTDRV_AbortType UARTDRV_AbortType_t
Transfer abort type.
Abort all current and queued operations.
Ecode_t transferStatus
Completion status of transfer operation.
#define USART_STATUS_RXENS
Ecode_t DMADRV_PeripheralMemory(unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src, bool dstInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam)
Start a peripheral to memory DMA transfer.
#define ECODE_EMDRV_UARTDRV_QUEUE_EMPTY
UART operation queue is empty.
#define USART_CMD_CLEARRX
USART_OVS_TypeDef oversampling
UARTDRV_Buffer_t fifo[]
FIFO of queue data.
UARTDRV_FlowControlState_t UARTDRV_FlowControlGetSelfStatus(UARTDRV_Handle_t handle)
Checks the self's flow control status.
__STATIC_INLINE void USART_IntClear(USART_TypeDef *usart, uint32_t flags)
Clear one or more pending USART interrupts.
USART_Databits_TypeDef databits
#define ECODE_EMDRV_UARTDRV_FRAME_ERROR
UART frame error. Data is ignored.
USART_OVS_TypeDef oversampling
Oversampling mode.
__STATIC_INLINE uint32_t INT_Enable(void)
Enable interrupts.
USART_TypeDef * port
The peripheral used for UART.
Ecode_t DMADRV_StopTransfer(unsigned int channelId)
Stop an ongoing DMA transfer.
#define USART_CMD_CLEARTX
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
USART_Parity_TypeDef parity
#define ECODE_EMDRV_UARTDRV_OK
Success return value.
Universal synchronous/asynchronous receiver/transmitter (USART/UART) peripheral API.
void GPIOINT_CallbackRegister(uint8_t pin, GPIOINT_IrqCallbackPtr_t callbackPtr)
Registers user callback for given pin number.
USART_Enable_TypeDef enable
Ecode_t UARTDRV_Init(UARTDRV_Handle_t handle, UARTDRV_Init_t *initData)
Initialize a UART driver instance.
Ecode_t UARTDRV_FlowControlSet(UARTDRV_Handle_t handle, UARTDRV_FlowControlState_t state)
Set UART flow control state. Set nRTS pin if hardware flow control is enabled.
const uint16_t size
Size of FIFO.
This driver controls the state.
UARTDRV_Count_t transferCount
Transfer item count.
USART_Stopbits_TypeDef stopBits
Number of stop bits.
bool mvdis
Majority Vote Disable for 16x, 8x and 6x oversampling modes.
#define USART_STATUS_TXBL
enum UARTDRV_FlowControlState UARTDRV_FlowControlState_t
Flow Control state.
Transfer operation FIFO queue typedef.
UARTDRV_HandleData_t * UARTDRV_Handle_t
Handle pointer.
Ecode_t DMADRV_TransferRemainingCount(unsigned int channelId, int *remaining)
Get number of items remaining in a transfer.
nRTS/nCTS hardware handshake
Ecode_t UARTDRV_ForceTransmit(UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
Direct transmit without interrupts or callback. Blocking function that ignores flow control if enable...
#define ECODE_EMDRV_UARTDRV_DMA_ALLOC_ERROR
Unable to allocated DMA channels.
Interrupt enable/disable unit API.
#define USART_ROUTE_TXPEN
#define ECODE_EMDRV_UARTDRV_QUEUE_FULL
UART operation queue is full.
USART_Parity_TypeDef parity
Parity configuration.
UARTDRV_Count_t itemsRemaining
Transfer items remaining.
void GPIO_PinModeSet(GPIO_Port_TypeDef port, unsigned int pin, GPIO_Mode_TypeDef mode, unsigned int out)
Set the mode for a GPIO pin.
#define ECODE_EMDRV_UARTDRV_PARITY_ERROR
UART parity error frame. Data is ignored.
Ecode_t UARTDRV_ReceiveB(UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
Start a blocking receive.
__STATIC_INLINE void EMU_EnterEM1(void)
Enter energy mode 1 (EM1).
General Purpose IO (GPIO) peripheral API.
UARTDRV_Callback_t callback
Completion callback.
#define DMADRV_MAX_XFER_COUNT
Maximum length of one DMA transfer.
__STATIC_INLINE void GPIO_PinOutSet(GPIO_Port_TypeDef port, unsigned int pin)
Set a single pin in GPIO data out register to 1.
uint8_t portLocation
Location number for UART pins.
void CMU_ClockEnable(CMU_Clock_TypeDef clock, bool enable)
Enable/disable a clock.
Ecode_t DMADRV_Init(void)
Initialize DMADRV.
uint32_t baudRate
UART baud rate.
uint8_t ctsPin
CTS pin number.
void(* UARTDRV_Callback_t)(struct UARTDRV_HandleData *handle, Ecode_t transferStatus, uint8_t *data, UARTDRV_Count_t transferCount)
UARTDRV transfer completion callback function.
#define _USART_ROUTE_LOCATION_SHIFT
Ecode_t UARTDRV_Receive(UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count, UARTDRV_Callback_t callback)
Start a non-blocking receive.
Ecode_t UARTDRV_DeInit(UARTDRV_Handle_t handle)
Deinitialize a UART driver instance.
Abort current and queued receive operations.
#define ECODE_EMDRV_DMADRV_OK
Success return value.
UARTDRV_Count_t UARTDRV_ForceReceive(UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t maxCount)
Direct receive without interrupts or callback. Blocking function.
#define USART_FRAME_DATABITS_EIGHT
void USART_Reset(USART_TypeDef *usart)
Reset USART/UART to same state as after a HW reset.
Ecode_t DMADRV_DeInit(void)
Deinitialize DMADRV.
Energy management unit (EMU) peripheral API.
uint32_t UARTDRV_Count_t
UART transfer count.
#define ECODE_EMDRV_UARTDRV_WAITING
Operation is waiting in queue.
#define USART_STATUS_RXDATAV
UARTDRV_Status_t UARTDRV_GetReceiveStatus(UARTDRV_Handle_t handle, uint8_t **buffer, UARTDRV_Count_t *itemsReceived, UARTDRV_Count_t *itemsRemaining)
Check the status of the UART and gather information about any ongoing receive operations.
Ecode_t DMADRV_AllocateChannel(unsigned int *channelId, void *capabilities)
Allocate (reserve) a DMA channel.
uint8_t UARTDRV_GetReceiveDepth(UARTDRV_Handle_t handle)
Returns the number of queued receive operations.
static volatile uint8_t rxBuffer[RXBUFSIZE]
void GPIOINT_Init(void)
Initialization of GPIOINT module.
Ecode_t DMADRV_MemoryPeripheral(unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src, bool srcInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam)
Start a memory to peripheral DMA transfer.
uint8_t * data
Transfer data buffer.
#define USART_INITASYNC_DEFAULT
#define ECODE_EMDRV_UARTDRV_ABORTED
UART transfer has been aborted.
uint32_t Ecode_t
Typedef for API function errorcode return values.
Ecode_t UARTDRV_Abort(UARTDRV_Handle_t handle, UARTDRV_AbortType_t type)
Abort an ongoing UART transfer.
UARTDRV_Status_t UARTDRV_GetTransmitStatus(UARTDRV_Handle_t handle, uint8_t **buffer, UARTDRV_Count_t *itemsSent, UARTDRV_Count_t *itemsRemaining)
Check the status of the UART and gather information about any ongoing transmit operations.
UARTDRV_FlowControlState_t UARTDRV_FlowControlGetPeerStatus(UARTDRV_Handle_t handle)
Checks the peer's flow control status.
__STATIC_INLINE uint32_t INT_Disable(void)
Disable interrupts.
Ecode_t UARTDRV_TransmitB(UARTDRV_Handle_t handle, uint8_t *data, UARTDRV_Count_t count)
Start a blocking transmit.
__STATIC_INLINE void GPIO_PinOutClear(GPIO_Port_TypeDef port, unsigned int pin)
Set a single pin in GPIO data out port register to 0.
void USART_Enable(USART_TypeDef *usart, USART_Enable_TypeDef enable)
Enable/disable USART/UART receiver and/or transmitter.
void USART_InitAsync(USART_TypeDef *usart, const USART_InitAsync_TypeDef *init)
Init USART/UART for normal asynchronous mode.
uint16_t used
Number of bytes queued.
Ecode_t UARTDRV_FlowControlIgnoreRestrain(UARTDRV_Handle_t handle)
Enables transmission when restrained by flow control.
#define USART_ROUTE_RXPEN
__STATIC_INLINE unsigned int GPIO_PinInGet(GPIO_Port_TypeDef port, unsigned int pin)
Read the pad value for a single pin in a GPIO port.
#define ECODE_EMDRV_UARTDRV_ILLEGAL_HANDLE
Illegal UART handle.
uint16_t head
Index of next byte to send.
Abort current and queued transmit operations.
void GPIO_IntConfig(GPIO_Port_TypeDef port, unsigned int pin, bool risingEdge, bool fallingEdge, bool enable)
Configure GPIO interrupt.
#define ECODE_EMDRV_UARTDRV_IDLE
No UART transfer in progress.
uint32_t UARTDRV_Status_t
UART status return type.
Ecode_t DMADRV_FreeChannel(unsigned int channelId)
Free an allocate (reserved) DMA channel.
uint16_t tail
Index of where to enqueue next message.