Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
FlexIO UART peripheral driver

Overview

This section describes the programming interface of the FlexIO UART Peripheral driver. The FlexIO UART driver transfers data to and from external devices on the Universal Asynchronous Receiver/Transmitter (UART) serial bus with a single function call.

FlexIO UART device structures

The driver uses an instantiation of the flexio_uart_state_t structure to maintain the current state of a particular FlexIO-simulated UART module driver. This structure holds data that is used by the FlexIO-simulated UART peripheral driver to communicate between the transmit and receive transfer functions and the interrupt handler. The interrupt handler also uses this information to keep track of its progress. Because the driver itself does not statically allocate memory, the caller provides memory for the driver state structure during initialization by providing a structure.

FlexIO UART user configuration structures

The FlexIO-simulated UART driver uses instances of the user configuration structure flexio_uart_userconfig_t for the FlexIO-simulated UART driver. This enables configuration of the most common settings of the UART with a single function call. The FlexIO-simulated UART does not support the parity check and only supports one stop bit. Te user settings include: UART baud rate, the number of bits per data word, UART work mode(transmit, receive, or both) and the associated FlexIO timers, shifters, and pins for transmit and receive.

FlexIO UART Initialization

  1. To initialize the FlexIO UART driver, call the FLEXIO_UART_DRV_Init() function and pass the instance number of the FlexIO peripheral, memory for the run-time state structure, and a pointer to the user configuration structure. For example, to use FlexIO0 pass a value of 0 to the initialization function.
  2. Then, pass the memory for the run-time state structure.
  3. Finally, pass a user configuration structure of the type flexio_uart_userconfig_t as shown here:
// FlexIO UART configuration structure
typedef struct flexio_uart_userconfig{
uint32_t baudRate;
flexio_uart_bit_count_per_char_t bitCounter;
flexio_uart_mode_t uartMode;
flexio_uart_hwconfig_t txConfig;
flexio_uart_hwconfig_t rxConfig;
}flexio_uart_userconfig_t;

Typically, the flexio_uart_userconfig instantiation is configured as 8-bit-char(8-n-1) with a 9600 bps baud rate. The flexio_uart_userconfig instantiation can be easily modified to configure the FlexIO UART peripheral driver either to a different baud rate, character transfer features or using different FlexIO hardware resource. This is an example code to set up a user FlexIO UART configuration instantiation:

flexio_uart_userconfig_t uartConfig;
uartConfig.baudRate = 9600;
uartConfig.bitCountPerChar = kUart8BitsPerChar;
uartConfig.uartMode = flexioUART_TxRx;
uartConfig.txConfig.pinIdx = 0;
uartConfig.txConfig.shifterIdx = 0;
uartConfig.txConfig.timerIdx = 0;
uartConfig.rxConfig.pinIdx = 1;
uartConfig.rxConfig.shifterIdx = 1;
uartConfig.rxConfig.timerIdx = 1;

This example shows how to call the FLEXIO_UART_DRV_Init() given the user configuration structure and the FlexIO instance 0.

uint32_t flexioInstance = 0;
flexio_uart_state_t uartState; // user provides memory for the driver state structure
FLEXIO_UART_DRV_Init(flexioInstance, &uartState, &uartConfig);

FLEXIO UART Transfers

The driver implements transmit and receive functions to transfer buffers of data in blocking and non-blocking modes.

The non-blocking transmit and receive functions include the FLEXIO_UART_DRV_SendData() and FLEXIO_UART_DRV_ReceiveData() functions.

The blocking (async) transmit and receive functions include the FLEXIO_UART_DRV_SendDataBlocking() and FLEXIO_UART_DRV_ReceiveDataBlocking() functions.

Ensure that data is consistent when there is cache in memory and when using DMA to transfer data. In other words, when reading the data from memory, ensure that data from or to the memory device is not cached.

In all cases mentioned here, the functions are interrupt-driven.

This code example shows how to use the functions, assuming that the FlexIO simulated UART module has been initialized as described previously in the Initialization Section.

For blocking transfer functions transmit and receive:

uint8_t sourceBuff[26] ={0}; // sourceBuff can be filled out with desired data
uint8_t readBuffer[10] = {0}; // readBuffer gets filled
uint32_t byteCount = sizeof(sourceBuff);
uint32_t rxRemainingSize = sizeof(readBuffer);
// For each use there, set timeout as "1"
// uartState is the run-time state. Pass in memory for this
// declared previously in the initialization section
FLEXIO_UART_DRV_SendDataBlocking(uartState, sourceBuff, byteCount, 1); // Function won't return until transmit is complete
FLEXIO_UART_DRV_ReceiveDataBlocking(uartState, readBuffer, 1, timeoutValue); // Function won't return until it receives all data

For non-blocking (async) transfer functions transmit and receive:

uint8_t *pTxBuff;
uint8_t rxBuff[10];
uint32_t txBytesRemaining, rxBytesRemaining;
// Assume pTxBuff and txSize have been initialized
FLEXIO_UART_DRV_SendData(uartState, pTxBuff, txSize);
// Check on status of transmit and wait until done; The code can do something else and
// check back later
while (FLEXIO_UART_DRV_GetTransmitStatus(uartState, &txBytesRemaining) == kStatus_FlexIO_UART_TxBusy);
// For receive, assume rxBuff is set up to receive data and rxSize is initialized
FLEXIO_UART_DRV_ReceiveData(uartState, rxBuff, rxSize);
// Check on status of receive and wait until done; The code can do something else and
// check back later
while (FLEXIO_UART_DRV_GetReceiveStatus(uartState, &rxBytesRemaining) == kStatus_FlexIO_UART_RxBusy);

Data Structures

struct  flexio_uart_dmastate_t
 Runtime state structure for FlexIO UART driver with DMA. More...
 
struct  flexio_uartdma_userconfig_t
 User configuration structure for the FlexIO UART driver with DMA. More...
 
struct  flexio_uartedma_userconfig_t
 User configuration structure for the FlexIO UART driver. More...
 
struct  flexio_uart_edmastate_t
 Runtime state of the FlexIO UART driver. More...
 

FlexIO UART DMA Driver

flexio_uart_status_t FLEXIO_UART_DRV_DmaInit (uint32_t instance, flexio_uart_dmastate_t *uartDmaState, const flexio_uartdma_userconfig_t *uartDmaConfig)
 Initializes a FlexIO-simulated UART device to work with DMA. More...
 
void FLEXIO_UART_DRV_DmaDeinit (flexio_uart_dmastate_t *uartDmaState)
 Shuts down the FlexIO UART. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaSendDataBlocking (flexio_uart_dmastate_t *uartDmaState, const uint8_t *txBuff, uint32_t txSize, uint32_t timeout)
 Sends (transmits) data out through the FlexIO-simulated UART-DMA module using a blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaSendData (flexio_uart_dmastate_t *uartDmaState, const uint8_t *txBuff, uint32_t txSize)
 Sends (transmits) data through the FlexIO-simulated UART-DMA module using a non-blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaGetTransmitStatus (flexio_uart_dmastate_t *uartDmaState, uint32_t *bytesRemaining)
 Returns whether the previous FlexIO-simulated UART-DMA transmit has finished. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaAbortSendingData (flexio_uart_dmastate_t *uartDmaState)
 Terminates a non-blocking FlexIO-simulated UART-DMA transmission early. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaReceiveDataBlocking (flexio_uart_dmastate_t *uartDmaState, uint8_t *rxBuff, uint32_t rxSize, uint32_t timeout)
 Gets (receives) data from the FlexIO-simulated UART-DMA module using a blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaReceiveData (flexio_uart_dmastate_t *uartDmaState, uint8_t *rxBuff, uint32_t rxSize)
 Gets (receives) data from the FlexIO-simulated UART-DMA module using a non-blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaGetReceiveStatus (flexio_uart_dmastate_t *uartDmaState, uint32_t *bytesRemaining)
 Returns whether the previous FlexIO-simulated UART-DMA receive is complete. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_DmaAbortReceivingData (flexio_uart_dmastate_t *uartDmaState)
 Terminates a non-blocking FlexIO-simulated UART-DMA receive early. More...
 

FlexIO UART eDMA Driver

flexio_uart_status_t FLEXIO_UART_DRV_EdmaInit (uint32_t instance, flexio_uart_edmastate_t *uartEdmaState, const flexio_uartedma_userconfig_t *uartEdmaConfig)
 Initializes a FlexIO-simulated UART device to work with eDMA. More...
 
void FLEXIO_UART_DRV_EdmaDeinit (flexio_uart_edmastate_t *uartEdmaState)
 Shuts down the FlexIO UART. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaSendDataBlocking (flexio_uart_edmastate_t *uartEdmaState, const uint8_t *txBuff, uint32_t txSize, uint32_t timeout)
 Sends (transmits) data through the FlexIO-simulated UART eDMA module using a blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaSendData (flexio_uart_edmastate_t *uartEdmaState, const uint8_t *txBuff, uint32_t txSize)
 Sends (transmits) data through the FlexIO-simulated UART eDMA module using a non-blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaGetTransmitStatus (flexio_uart_edmastate_t *uartEdmaState, uint32_t *bytesRemaining)
 Returns whether the previous FlexIO-simulated UART eDMA transmit has finished. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaAbortSendingData (flexio_uart_edmastate_t *uartEdmaState)
 Terminates a non-blocking FlexIO-simulated UART eDMA transmission early. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaReceiveDataBlocking (flexio_uart_edmastate_t *uartEdmaState, uint8_t *rxBuff, uint32_t rxSize, uint32_t timeout)
 Gets (receives) data from the FlexIO-simulated UART eDMA module using a blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaReceiveData (flexio_uart_edmastate_t *uartEdmaState, uint8_t *rxBuff, uint32_t rxSize)
 Gets (receives) data from the FlexIO-simulated UART eDMA module using a non-blocking method. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaGetReceiveStatus (flexio_uart_edmastate_t *uartEdmaState, uint32_t *bytesRemaining)
 Returns whether the previous FlexIO-simulated UART eDMA receive is complete. More...
 
flexio_uart_status_t FLEXIO_UART_DRV_EdmaAbortReceivingData (flexio_uart_edmastate_t *uartEdmaState)
 Terminates a non-blocking FlexIO-simulated UART eDMA receive early. More...
 

Data Structure Documentation

struct flexio_uart_dmastate_t

Data Fields

volatile bool isTxBusy
 True if there is an active transmit. More...
 
volatile bool isRxBusy
 True if there is an active receive. More...
 
volatile bool isTxBlocking
 True if transmit is blocking transaction. More...
 
volatile bool isRxBlocking
 True if receive is blocking transaction. More...
 
semaphore_t txIrqSync
 Used to wait for ISR to complete its TX business. More...
 
semaphore_t rxIrqSync
 Used to wait for ISR to complete its RX business. More...
 
dma_channel_t dmaUartTx
 DMA channel used for send. More...
 
dma_channel_t dmaUartRx
 DMA channel used for receive. More...
 

Field Documentation

volatile bool flexio_uart_dmastate_t::isTxBusy
volatile bool flexio_uart_dmastate_t::isRxBusy
volatile bool flexio_uart_dmastate_t::isTxBlocking
volatile bool flexio_uart_dmastate_t::isRxBlocking
semaphore_t flexio_uart_dmastate_t::txIrqSync
semaphore_t flexio_uart_dmastate_t::rxIrqSync
dma_channel_t flexio_uart_dmastate_t::dmaUartTx
dma_channel_t flexio_uart_dmastate_t::dmaUartRx
struct flexio_uartdma_userconfig_t

Use an instance of this structure with the FLEXIO_UART_DRV_DmaInit()function. This enables configuration of the most common settings of the UART peripheral with a single function call. Settings include: UART baud rate, UART parity mode: disabled (default), or even or odd, the number of stop bits, and the number of bits per data word.

Data Fields

uint32_t baudRate
 UART baud rate.
 
flexio_uart_bit_count_per_char_t bitCountPerChar
 number of bits, 5/6/7/8 bits configurable
 
flexio_uart_mode_t uartMode
 FlexIO UART working modes: Tx only, Rx only, or both.
 
flexio_uart_hwconfig_t txConfig
 FlexIO UART TX device hardware resource configuration.
 
flexio_uart_hwconfig_t rxConfig
 FlexIO UART RX device hardware resource configuration.
 
struct flexio_uartedma_userconfig_t

Use an instance of this structure with the FLEXIO_UART_DRV_Init()function to enable configuration of the settings of the FlexIO UART peripheral with a single function call. Settings include: UART baud rate, the number of bits per data word, FlexIO UART mode, transmit hardware resource and receive hardware resource.

struct flexio_uart_edmastate_t

This structure holds data that is used by the FlexIO UART peripheral driver to communicate between the transfer function and the interrupt handler. The interrupt handler also uses this information to keep track of its progress. The user passes in the memory for the run-time state structure and the FlexIO UART driver fills out the members.

Data Fields

volatile bool isTxBlocking
 True if transmit is blocking transaction. More...
 
volatile bool isRxBlocking
 True if receive is blocking transaction. More...
 
semaphore_t txIrqSync
 Used to wait for ISR to complete the transmit. More...
 
semaphore_t rxIrqSync
 Used to wait for ISR to complete the receive. More...
 
edma_chn_state_t edmaUartTx
 Structure definition for the eDMA channel.
 
edma_chn_state_t edmaUartRx
 Structure definition for the eDMA channel.
 

Field Documentation

volatile bool flexio_uart_edmastate_t::isTxBlocking
volatile bool flexio_uart_edmastate_t::isRxBlocking
semaphore_t flexio_uart_edmastate_t::txIrqSync
semaphore_t flexio_uart_edmastate_t::rxIrqSync

Function Documentation

flexio_uart_status_t FLEXIO_UART_DRV_DmaInit ( uint32_t  instance,
flexio_uart_dmastate_t uartDmaState,
const flexio_uartdma_userconfig_t uartDmaConfig 
)

This function initializes the run-time state structure to keep track of the on-going transfers and the module to user-defined settings and default settings. It also configures the underlying FlexIO pin, shifter, and timer resource, and enables the FlexIO simulated UART module DMA interrupt. This example shows how to set up the flexio_uartdma_state_t and the flexio_uartdma_userconfig_t parameters and how to call the FLEXIO_UART_DRV_DmaInit function by passing in these parameters:

uartDmaConfig.baudRate = 9600;
uartDmaConfig.uartMode = flexioUART_TxRx;
Parameters
instanceThe FlexIO instance number.
uartDmaStateA pointer to the global FlexIO UART driver state structure memory. The user passes in the memory for the run-time state structure. The FlexIO UART driver populates the members. This run-time state structure keeps track of the current transfer in progress.
uartDmaConfigThe user configuration structure of type flexio_uartdma_userconfig_t. The user populates the members of this structure and passes the pointer of this structure to this function.
Returns
An error code or kStatus_FlexIO_UART_Success.
void FLEXIO_UART_DRV_DmaDeinit ( flexio_uart_dmastate_t uartDmaState)

This function disables the FlexIO-simulated UART-DMA trigger.

Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
flexio_uart_status_t FLEXIO_UART_DRV_DmaSendDataBlocking ( flexio_uart_dmastate_t uartDmaState,
const uint8_t *  txBuff,
uint32_t  txSize,
uint32_t  timeout 
)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
txBuffA pointer to the source buffer containing 8-bit data chars to send.
txSizeThe number of bytes to send.
timeoutA timeout value for RTOS abstraction sync control in milliseconds (ms).
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_DmaSendData ( flexio_uart_dmastate_t uartDmaState,
const uint8_t *  txBuff,
uint32_t  txSize 
)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
txBuffA pointer to the source buffer containing 8-bit data chars to send.
txSizeThe number of bytes to send.
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_DmaGetTransmitStatus ( flexio_uart_dmastate_t uartDmaState,
uint32_t *  bytesRemaining 
)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
bytesRemainingA pointer to a value that is populated with the number of bytes that are remaining in the active transfer.
Returns
An error code or kStatus_FlexIO_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe transmit has completed successfully.
kStatus_FlexIO_UART_TxBusyThe transmit is still in progress. bytesTransmitted is filled with the number of bytes which are transmitted up to that point.
flexio_uart_status_t FLEXIO_UART_DRV_DmaAbortSendingData ( flexio_uart_dmastate_t uartDmaState)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
Returns
An error code or kStatus_FlexIO_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe transmit was successful.
kStatus_FlexIO_UART_NoTransmitInProgressNo transmission is currently in progress.
flexio_uart_status_t FLEXIO_UART_DRV_DmaReceiveDataBlocking ( flexio_uart_dmastate_t uartDmaState,
uint8_t *  rxBuff,
uint32_t  rxSize,
uint32_t  timeout 
)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
rxBuffA pointer to the buffer containing 8-bit read data chars received.
rxSizeThe number of bytes to receive.
timeoutA timeout value for RTOS abstraction sync control in milliseconds (ms).
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_DmaReceiveData ( flexio_uart_dmastate_t uartDmaState,
uint8_t *  rxBuff,
uint32_t  rxSize 
)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
rxBuffA pointer to the buffer containing 8-bit read data chars received.
rxSizeThe number of bytes to receive.
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_DmaGetReceiveStatus ( flexio_uart_dmastate_t uartDmaState,
uint32_t *  bytesRemaining 
)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
bytesRemainingA pointer to a value that is populated with the number of bytes which still need to be received in the active transfer.
Returns
An error code or kStatus_FlexIO_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe receive has completed successfully.
kStatus_FlexIO_UART_RxBusyThe receive is still in progress. bytesReceived is filled with the number of bytes which are received up to that point.
flexio_uart_status_t FLEXIO_UART_DRV_DmaAbortReceivingData ( flexio_uart_dmastate_t uartDmaState)
Parameters
uartDmaStateThe run-time structure of FlexIO-simulated UART.
Returns
An error code or kStatus_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe receive was successful.
kStatus_FlexIO_UART_NoTransmitInProgressNo receive is currently in progress.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaInit ( uint32_t  instance,
flexio_uart_edmastate_t uartEdmaState,
const flexio_uartedma_userconfig_t uartEdmaConfig 
)

This function initializes the run-time state structure to keep track of the on-going transfers, initializes the module to user-defined settings and default settings, configures underlying FlexIO pin, shifter, and timer resource, and enables the FlexIO-simulated UART module eDMA interrupt. This example shows how to set up the flexio_uartedma_state_t and the flexio_uartedma_userconfig_t parameters and how to call the FLEXIO_UART_DRV_EdmaInit function by passing in these parameters:

uartEdmaConfig.baudRate = 9600;
uartEdmaConfig.bitCountPerChar = kUart8BitsPerChar;
uartEdmaConfig.uartMode = flexioUART_TxRx;
Parameters
instanceThe FlexIO instance number.
uartEdmaStateA pointer to the global FlexIO UART driver state structure memory. The user passes in the memory for the run-time state structure. The FlexIO UART driver populates the members. This run-time state structure keeps track of the current transfer in progress.
uartEdmaConfigThe user configuration structure of type flexio_uartedma_userconfig_t. The user populates the members of this structure and passes the pointer of this structure to this function.
Returns
An error code or kStatus_FlexIO_UART_Success.
void FLEXIO_UART_DRV_EdmaDeinit ( flexio_uart_edmastate_t uartEdmaState)

This function disables the FlexIO-simulated UART eDMA trigger.

Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaSendDataBlocking ( flexio_uart_edmastate_t uartEdmaState,
const uint8_t *  txBuff,
uint32_t  txSize,
uint32_t  timeout 
)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
txBuffA pointer to the source buffer containing 8-bit data chars to send.
txSizeThe number of bytes to send.
timeoutA timeout value for RTOS abstraction sync control in milliseconds (ms).
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaSendData ( flexio_uart_edmastate_t uartEdmaState,
const uint8_t *  txBuff,
uint32_t  txSize 
)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
txBuffA pointer to the source buffer containing 8-bit data chars to send.
txSizeThe number of bytes to send.
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaGetTransmitStatus ( flexio_uart_edmastate_t uartEdmaState,
uint32_t *  bytesRemaining 
)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
bytesRemainingA pointer to a value that is populated with the number of bytes that are remaining in the active transfer.
Returns
An error code or kStatus_FlexIO_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe transmit has completed successfully.
kStatus_FlexIO_UART_TxBusyThe transmit is still in progress. bytesTransmitted is filled with the number of bytes which are transmitted up to that point.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaAbortSendingData ( flexio_uart_edmastate_t uartEdmaState)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
Returns
An error code or kStatus_FlexIO_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe transmit was successful.
kStatus_FlexIO_UART_NoTransmitInProgressNo transmission is currently in progress.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaReceiveDataBlocking ( flexio_uart_edmastate_t uartEdmaState,
uint8_t *  rxBuff,
uint32_t  rxSize,
uint32_t  timeout 
)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
rxBuffA pointer to the buffer containing 8-bit read data chars received.
rxSizeThe number of bytes to receive.
timeoutA timeout value for RTOS abstraction sync control in milliseconds (ms).
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaReceiveData ( flexio_uart_edmastate_t uartEdmaState,
uint8_t *  rxBuff,
uint32_t  rxSize 
)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
rxBuffA pointer to the buffer containing 8-bit read data chars received.
rxSizeThe number of bytes to receive.
Returns
An error code or kStatus_FlexIO_UART_Success.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaGetReceiveStatus ( flexio_uart_edmastate_t uartEdmaState,
uint32_t *  bytesRemaining 
)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
bytesRemainingA pointer to a value that is populated with the number of bytes which still need to be received in the active transfer.
Returns
An error code or kStatus_FlexIO_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe receive has completed successfully.
kStatus_FlexIO_UART_RxBusyThe receive is still in progress. bytesReceived is filled with the number of bytes which are received up to that point.
flexio_uart_status_t FLEXIO_UART_DRV_EdmaAbortReceivingData ( flexio_uart_edmastate_t uartEdmaState)
Parameters
uartEdmaStateThe run-time structure of FlexIO-simulated UART.
Returns
An error code or kStatus_UART_Success.
Return values
kStatus_FlexIO_UART_SuccessThe receive was successful.
kStatus_FlexIO_UART_NoTransmitInProgressNo receive is currently in progress.