/* Check that we're not busy receiving data from a previous function call. */
if ((uartState->isRxBusy) && (!uartState->rxCallback))
{
return kStatus_UART_RxBusy;
}
if (rxSize == 0U)
{
return kStatus_UART_NoDataToDeal;
}
/* Initialize the module driver state struct to indicate transfer in progress
* and with the buffer and byte count data */
uartState->rxBuff = rxBuff;
uartState->rxSize = rxSize;
uartState->isRxBusy = true;
/* Enable the receive data overrun interrupt */
UART_HAL_SetIntMode(base, kUartIntRxOverrun, true);
/* Enable the receive data full interrupt */
UART_BWR_C2_RIE(base, 1U);