RTEMS 6.1-rc4
|
Data Structures | |
struct | _flexio_uart_type |
Define FlexIO UART access structure typedef. More... | |
struct | _flexio_uart_config |
Define FlexIO UART user configuration structure. More... | |
struct | _flexio_uart_transfer |
Define FlexIO UART transfer structure. More... | |
struct | _flexio_uart_handle |
Define FLEXIO UART handle structure. More... | |
Driver version | |
enum | { kStatus_FLEXIO_UART_TxBusy = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 0) , kStatus_FLEXIO_UART_RxBusy = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 1) , kStatus_FLEXIO_UART_TxIdle = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 2) , kStatus_FLEXIO_UART_RxIdle = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 3) , kStatus_FLEXIO_UART_ERROR = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 4) , kStatus_FLEXIO_UART_RxRingBufferOverrun , kStatus_FLEXIO_UART_RxHardwareOverrun = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 6) , kStatus_FLEXIO_UART_Timeout = MAKE_STATUS(kStatusGroup_FLEXIO_UART, 7) , kStatus_FLEXIO_UART_BaudrateNotSupport = } |
Error codes for the UART driver. More... | |
enum | _flexio_uart_bit_count_per_char { kFLEXIO_UART_7BitsPerChar = 7U , kFLEXIO_UART_8BitsPerChar = 8U , kFLEXIO_UART_9BitsPerChar = 9U } |
FlexIO UART bit count per char. More... | |
enum | _flexio_uart_interrupt_enable { kFLEXIO_UART_TxDataRegEmptyInterruptEnable = 0x1U , kFLEXIO_UART_RxDataRegFullInterruptEnable = 0x2U } |
Define FlexIO UART interrupt mask. More... | |
enum | _flexio_uart_status_flags { kFLEXIO_UART_TxDataRegEmptyFlag = 0x1U , kFLEXIO_UART_RxDataRegFullFlag = 0x2U , kFLEXIO_UART_RxOverRunFlag = 0x4U } |
Define FlexIO UART status mask. More... | |
typedef enum _flexio_uart_bit_count_per_char | flexio_uart_bit_count_per_char_t |
FlexIO UART bit count per char. | |
typedef struct _flexio_uart_type | FLEXIO_UART_Type |
Define FlexIO UART access structure typedef. | |
typedef struct _flexio_uart_config | flexio_uart_config_t |
Define FlexIO UART user configuration structure. | |
typedef struct _flexio_uart_transfer | flexio_uart_transfer_t |
Define FlexIO UART transfer structure. | |
typedef struct _flexio_uart_handle | flexio_uart_handle_t |
typedef void(* | flexio_uart_transfer_callback_t) (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, status_t status, void *userData) |
FlexIO UART transfer callback function. | |
#define | FSL_FLEXIO_UART_DRIVER_VERSION (MAKE_VERSION(2, 4, 0)) |
FlexIO UART driver version. | |
#define | UART_RETRY_TIMES 0U /* Defining to zero means to keep waiting for the flag until it is assert/deassert. */ |
Retry times for waiting flag. | |
Initialization and deinitialization | |
status_t | FLEXIO_UART_Init (FLEXIO_UART_Type *base, const flexio_uart_config_t *userConfig, uint32_t srcClock_Hz) |
Ungates the FlexIO clock, resets the FlexIO module, configures FlexIO UART hardware, and configures the FlexIO UART with FlexIO UART configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_UART_GetDefaultConfig(). | |
void | FLEXIO_UART_Deinit (FLEXIO_UART_Type *base) |
Resets the FlexIO UART shifter and timer config. | |
void | FLEXIO_UART_GetDefaultConfig (flexio_uart_config_t *userConfig) |
Gets the default configuration to configure the FlexIO UART. The configuration can be used directly for calling the FLEXIO_UART_Init(). Example: | |
Status | |
uint32_t | FLEXIO_UART_GetStatusFlags (FLEXIO_UART_Type *base) |
Gets the FlexIO UART status flags. | |
void | FLEXIO_UART_ClearStatusFlags (FLEXIO_UART_Type *base, uint32_t mask) |
Gets the FlexIO UART status flags. | |
Interrupts | |
void | FLEXIO_UART_EnableInterrupts (FLEXIO_UART_Type *base, uint32_t mask) |
Enables the FlexIO UART interrupt. | |
void | FLEXIO_UART_DisableInterrupts (FLEXIO_UART_Type *base, uint32_t mask) |
Disables the FlexIO UART interrupt. | |
Bus Operations | |
status_t | FLEXIO_UART_WriteBlocking (FLEXIO_UART_Type *base, const uint8_t *txData, size_t txSize) |
Sends a buffer of data bytes. | |
status_t | FLEXIO_UART_ReadBlocking (FLEXIO_UART_Type *base, uint8_t *rxData, size_t rxSize) |
Receives a buffer of bytes. | |
Transactional | |
status_t | FLEXIO_UART_TransferCreateHandle (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, flexio_uart_transfer_callback_t callback, void *userData) |
Initializes the UART handle. | |
void | FLEXIO_UART_TransferStartRingBuffer (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize) |
Sets up the RX ring buffer. | |
void | FLEXIO_UART_TransferStopRingBuffer (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle) |
Aborts the background transfer and uninstalls the ring buffer. | |
status_t | FLEXIO_UART_TransferSendNonBlocking (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, flexio_uart_transfer_t *xfer) |
Transmits a buffer of data using the interrupt method. | |
void | FLEXIO_UART_TransferAbortSend (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle) |
Aborts the interrupt-driven data transmit. | |
status_t | FLEXIO_UART_TransferGetSendCount (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, size_t *count) |
Gets the number of bytes sent. | |
status_t | FLEXIO_UART_TransferReceiveNonBlocking (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, flexio_uart_transfer_t *xfer, size_t *receivedBytes) |
Receives a buffer of data using the interrupt method. | |
void | FLEXIO_UART_TransferAbortReceive (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle) |
Aborts the receive data which was using IRQ. | |
status_t | FLEXIO_UART_TransferGetReceiveCount (FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, size_t *count) |
Gets the number of bytes received. | |
void | FLEXIO_UART_TransferHandleIRQ (void *uartType, void *uartHandle) |
FlexIO UART IRQ handler function. | |
anonymous enum |
Error codes for the UART driver.
void FLEXIO_UART_ClearStatusFlags | ( | FLEXIO_UART_Type * | base, |
uint32_t | mask | ||
) |
Gets the FlexIO UART status flags.
base | Pointer to the FLEXIO_UART_Type structure. |
mask | Status flag. The parameter can be any combination of the following values:
|
param base Pointer to the FLEXIO_UART_Type structure. param mask Status flag. The parameter can be any combination of the following values: arg kFLEXIO_UART_TxDataRegEmptyFlag arg kFLEXIO_UART_RxEmptyFlag arg kFLEXIO_UART_RxOverRunFlag
void FLEXIO_UART_Deinit | ( | FLEXIO_UART_Type * | base | ) |
Resets the FlexIO UART shifter and timer config.
base | Pointer to FLEXIO_UART_Type structure |
brief Resets the FlexIO UART shifter and timer config.
note After calling this API, call the FLEXO_UART_Init to use the FlexIO UART module.
param base Pointer to FLEXIO_UART_Type structure
void FLEXIO_UART_DisableInterrupts | ( | FLEXIO_UART_Type * | base, |
uint32_t | mask | ||
) |
Disables the FlexIO UART interrupt.
This function disables the FlexIO UART interrupt.
base | Pointer to the FLEXIO_UART_Type structure. |
mask | Interrupt source. |
brief Disables the FlexIO UART interrupt.
This function disables the FlexIO UART interrupt.
param base Pointer to the FLEXIO_UART_Type structure. param mask Interrupt source.
void FLEXIO_UART_EnableInterrupts | ( | FLEXIO_UART_Type * | base, |
uint32_t | mask | ||
) |
Enables the FlexIO UART interrupt.
This function enables the FlexIO UART interrupt.
base | Pointer to the FLEXIO_UART_Type structure. |
mask | Interrupt source. |
brief Enables the FlexIO UART interrupt.
This function enables the FlexIO UART interrupt.
param base Pointer to the FLEXIO_UART_Type structure. param mask Interrupt source.
void FLEXIO_UART_GetDefaultConfig | ( | flexio_uart_config_t * | userConfig | ) |
Gets the default configuration to configure the FlexIO UART. The configuration can be used directly for calling the FLEXIO_UART_Init(). Example:
userConfig | Pointer to the flexio_uart_config_t structure. |
brief Gets the default configuration to configure the FlexIO UART. The configuration can be used directly for calling the FLEXIO_UART_Init(). Example: code flexio_uart_config_t config; FLEXIO_UART_GetDefaultConfig(&userConfig); endcode param userConfig Pointer to the flexio_uart_config_t structure.
uint32_t FLEXIO_UART_GetStatusFlags | ( | FLEXIO_UART_Type * | base | ) |
Gets the FlexIO UART status flags.
base | Pointer to the FLEXIO_UART_Type structure. |
brief Gets the FlexIO UART status flags.
param base Pointer to the FLEXIO_UART_Type structure. return FlexIO UART status flags.
status_t FLEXIO_UART_Init | ( | FLEXIO_UART_Type * | base, |
const flexio_uart_config_t * | userConfig, | ||
uint32_t | srcClock_Hz | ||
) |
Ungates the FlexIO clock, resets the FlexIO module, configures FlexIO UART hardware, and configures the FlexIO UART with FlexIO UART configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_UART_GetDefaultConfig().
Example
base | Pointer to the FLEXIO_UART_Type structure. |
userConfig | Pointer to the flexio_uart_config_t structure. |
srcClock_Hz | FlexIO source clock in Hz. |
kStatus_Success | Configuration success. |
kStatus_FLEXIO_UART_BaudrateNotSupport | Baudrate is not supported for current clock source frequency. |
brief Ungates the FlexIO clock, resets the FlexIO module, configures FlexIO UART hardware, and configures the FlexIO UART with FlexIO UART configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_UART_GetDefaultConfig().
Example code FLEXIO_UART_Type base = { .flexioBase = FLEXIO, .TxPinIndex = 0, .RxPinIndex = 1, .shifterIndex = {0,1}, .timerIndex = {0,1} }; flexio_uart_config_t config = { .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false, .baudRate_Bps = 115200U, .bitCountPerChar = 8 }; FLEXIO_UART_Init(base, &config, srcClock_Hz); endcode
param base Pointer to the FLEXIO_UART_Type structure. param userConfig Pointer to the flexio_uart_config_t structure. param srcClock_Hz FlexIO source clock in Hz. retval kStatus_Success Configuration success. retval kStatus_FLEXIO_UART_BaudrateNotSupport Baudrate is not supported for current clock source frequency.
status_t FLEXIO_UART_ReadBlocking | ( | FLEXIO_UART_Type * | base, |
uint8_t * | rxData, | ||
size_t | rxSize | ||
) |
Receives a buffer of bytes.
base | Pointer to the FLEXIO_UART_Type structure. |
rxData | The buffer to store the received bytes. |
rxSize | The number of data bytes to be received. |
kStatus_FLEXIO_UART_Timeout | Transmission timed out and was aborted. |
kStatus_Success | Successfully received all data. |
brief Receives a buffer of bytes.
note This function blocks using the polling method until all bytes have been received.
param base Pointer to the FLEXIO_UART_Type structure. param rxData The buffer to store the received bytes. param rxSize The number of data bytes to be received. retval kStatus_FLEXIO_UART_Timeout Transmission timed out and was aborted. retval kStatus_Success Successfully received all data.
void FLEXIO_UART_TransferAbortReceive | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle | ||
) |
Aborts the receive data which was using IRQ.
This function aborts the receive data which was using IRQ.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
brief Aborts the receive data which was using IRQ.
This function aborts the receive data which was using IRQ.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state.
void FLEXIO_UART_TransferAbortSend | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle | ||
) |
Aborts the interrupt-driven data transmit.
This function aborts the interrupt-driven data sending. Get the remainBytes to find out how many bytes are still not sent out.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
brief Aborts the interrupt-driven data transmit.
This function aborts the interrupt-driven data sending. Get the remainBytes to find out how many bytes are still not sent out.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state.
status_t FLEXIO_UART_TransferCreateHandle | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle, | ||
flexio_uart_transfer_callback_t | callback, | ||
void * | userData | ||
) |
Initializes the UART handle.
This function initializes the FlexIO UART handle, which can be used for other FlexIO UART transactional APIs. Call this API once to get the initialized handle.
The UART driver supports the "background" receiving, which means that users can set up a RX ring buffer optionally. Data received is stored into the ring buffer even when the user doesn't call the FLEXIO_UART_TransferReceiveNonBlocking() API. If there is already data received in the ring buffer, users can get the received data from the ring buffer directly. The ring buffer is disabled if passing NULL as ringBuffer
.
base | to FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
callback | The callback function. |
userData | The parameter of the callback function. |
kStatus_Success | Successfully create the handle. |
kStatus_OutOfRange | The FlexIO type/handle/ISR table out of range. |
brief Initializes the UART handle.
This function initializes the FlexIO UART handle, which can be used for other FlexIO UART transactional APIs. Call this API once to get the initialized handle.
The UART driver supports the "background" receiving, which means that users can set up a RX ring buffer optionally. Data received is stored into the ring buffer even when the user doesn't call the FLEXIO_UART_TransferReceiveNonBlocking() API. If there is already data received in the ring buffer, users can get the received data from the ring buffer directly. The ring buffer is disabled if passing NULL as p ringBuffer.
param base to FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state. param callback The callback function. param userData The parameter of the callback function. retval kStatus_Success Successfully create the handle. retval kStatus_OutOfRange The FlexIO type/handle/ISR table out of range.
status_t FLEXIO_UART_TransferGetReceiveCount | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle, | ||
size_t * | count | ||
) |
Gets the number of bytes received.
This function gets the number of bytes received driven by interrupt.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
count | Number of bytes received so far by the non-blocking transaction. |
kStatus_NoTransferInProgress | transfer has finished or no transfer in progress. |
kStatus_Success | Successfully return the count. |
brief Gets the number of bytes received.
This function gets the number of bytes received driven by interrupt.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state. param count Number of bytes received so far by the non-blocking transaction. retval kStatus_NoTransferInProgress transfer has finished or no transfer in progress. retval kStatus_Success Successfully return the count.
status_t FLEXIO_UART_TransferGetSendCount | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle, | ||
size_t * | count | ||
) |
Gets the number of bytes sent.
This function gets the number of bytes sent driven by interrupt.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
count | Number of bytes sent so far by the non-blocking transaction. |
kStatus_NoTransferInProgress | transfer has finished or no transfer in progress. |
kStatus_Success | Successfully return the count. |
brief Gets the number of bytes sent.
This function gets the number of bytes sent driven by interrupt.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state. param count Number of bytes sent so far by the non-blocking transaction. retval kStatus_NoTransferInProgress transfer has finished or no transfer in progress. retval kStatus_Success Successfully return the count.
void FLEXIO_UART_TransferHandleIRQ | ( | void * | uartType, |
void * | uartHandle | ||
) |
FlexIO UART IRQ handler function.
This function processes the FlexIO UART transmit and receives the IRQ request.
uartType | Pointer to the FLEXIO_UART_Type structure. |
uartHandle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
brief FlexIO UART IRQ handler function.
This function processes the FlexIO UART transmit and receives the IRQ request.
param uartType Pointer to the FLEXIO_UART_Type structure. param uartHandle Pointer to the flexio_uart_handle_t structure to store the transfer state.
status_t FLEXIO_UART_TransferReceiveNonBlocking | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle, | ||
flexio_uart_transfer_t * | xfer, | ||
size_t * | receivedBytes | ||
) |
Receives a buffer of data using the interrupt method.
This function receives data using the interrupt method. This is a non-blocking function, which returns without waiting for all data to be received. If the RX ring buffer is used and not empty, the data in ring buffer is copied and the parameter receivedBytes
shows how many bytes are copied from the ring buffer. After copying, if the data in ring buffer is not enough to read, the receive request is saved by the UART driver. When new data arrives, the receive request is serviced first. When all data is received, the UART driver notifies the upper layer through a callback function and passes the status parameter kStatus_UART_RxIdle. For example, if the upper layer needs 10 bytes but there are only 5 bytes in the ring buffer, the 5 bytes are copied to xfer->data. This function returns with the parameter receivedBytes
set to 5. For the last 5 bytes, newly arrived data is saved from the xfer->data[5]. When 5 bytes are received, the UART driver notifies upper layer. If the RX ring buffer is not enabled, this function enables the RX and RX interrupt to receive data to xfer->data. When all data is received, the upper layer is notified.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
xfer | UART transfer structure. See flexio_uart_transfer_t. |
receivedBytes | Bytes received from the ring buffer directly. |
kStatus_Success | Successfully queue the transfer into the transmit queue. |
kStatus_FLEXIO_UART_RxBusy | Previous receive request is not finished. |
brief Receives a buffer of data using the interrupt method.
This function receives data using the interrupt method. This is a non-blocking function, which returns without waiting for all data to be received. If the RX ring buffer is used and not empty, the data in ring buffer is copied and the parameter p receivedBytes shows how many bytes are copied from the ring buffer. After copying, if the data in ring buffer is not enough to read, the receive request is saved by the UART driver. When new data arrives, the receive request is serviced first. When all data is received, the UART driver notifies the upper layer through a callback function and passes the status parameter ref kStatus_UART_RxIdle. For example, if the upper layer needs 10 bytes but there are only 5 bytes in the ring buffer, the 5 bytes are copied to xfer->data. This function returns with the parameter p receivedBytes set to 5. For the last 5 bytes, newly arrived data is saved from the xfer->data[5]. When 5 bytes are received, the UART driver notifies upper layer. If the RX ring buffer is not enabled, this function enables the RX and RX interrupt to receive data to xfer->data. When all data is received, the upper layer is notified.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state. param xfer UART transfer structure. See flexio_uart_transfer_t. param receivedBytes Bytes received from the ring buffer directly. retval kStatus_Success Successfully queue the transfer into the transmit queue. retval kStatus_FLEXIO_UART_RxBusy Previous receive request is not finished.
status_t FLEXIO_UART_TransferSendNonBlocking | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle, | ||
flexio_uart_transfer_t * | xfer | ||
) |
Transmits a buffer of data using the interrupt method.
This function sends data using an interrupt method. This is a non-blocking function, which returns directly without waiting for all data to be written to the TX register. When all data is written to the TX register in ISR, the FlexIO UART driver calls the callback function and passes the kStatus_FLEXIO_UART_TxIdle as status parameter.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
xfer | FlexIO UART transfer structure. See flexio_uart_transfer_t. |
kStatus_Success | Successfully starts the data transmission. |
kStatus_UART_TxBusy | Previous transmission still not finished, data not written to the TX register. |
brief Transmits a buffer of data using the interrupt method.
This function sends data using an interrupt method. This is a non-blocking function, which returns directly without waiting for all data to be written to the TX register. When all data is written to the TX register in ISR, the FlexIO UART driver calls the callback function and passes the ref kStatus_FLEXIO_UART_TxIdle as status parameter.
note The kStatus_FLEXIO_UART_TxIdle is passed to the upper layer when all data is written to the TX register. However, it does not ensure that all data is sent out.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state. param xfer FlexIO UART transfer structure. See flexio_uart_transfer_t. retval kStatus_Success Successfully starts the data transmission. retval kStatus_UART_TxBusy Previous transmission still not finished, data not written to the TX register.
void FLEXIO_UART_TransferStartRingBuffer | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle, | ||
uint8_t * | ringBuffer, | ||
size_t | ringBufferSize | ||
) |
Sets up the RX ring buffer.
This function sets up the RX ring buffer to a specific UART handle.
When the RX ring buffer is used, data received is stored into the ring buffer even when the user doesn't call the UART_ReceiveNonBlocking() API. If there is already data received in the ring buffer, users can get the received data from the ring buffer directly.
ringBufferSize
is 32, only 31 bytes are used for saving data.base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
ringBuffer | Start address of ring buffer for background receiving. Pass NULL to disable the ring buffer. |
ringBufferSize | Size of the ring buffer. |
brief Sets up the RX ring buffer.
This function sets up the RX ring buffer to a specific UART handle.
When the RX ring buffer is used, data received is stored into the ring buffer even when the user doesn't call the UART_ReceiveNonBlocking() API. If there is already data received in the ring buffer, users can get the received data from the ring buffer directly.
note When using the RX ring buffer, one byte is reserved for internal use. In other words, if p ringBufferSize is 32, only 31 bytes are used for saving data.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state. param ringBuffer Start address of ring buffer for background receiving. Pass NULL to disable the ring buffer. param ringBufferSize Size of the ring buffer.
void FLEXIO_UART_TransferStopRingBuffer | ( | FLEXIO_UART_Type * | base, |
flexio_uart_handle_t * | handle | ||
) |
Aborts the background transfer and uninstalls the ring buffer.
This function aborts the background transfer and uninstalls the ring buffer.
base | Pointer to the FLEXIO_UART_Type structure. |
handle | Pointer to the flexio_uart_handle_t structure to store the transfer state. |
brief Aborts the background transfer and uninstalls the ring buffer.
This function aborts the background transfer and uninstalls the ring buffer.
param base Pointer to the FLEXIO_UART_Type structure. param handle Pointer to the flexio_uart_handle_t structure to store the transfer state.
status_t FLEXIO_UART_WriteBlocking | ( | FLEXIO_UART_Type * | base, |
const uint8_t * | txData, | ||
size_t | txSize | ||
) |
Sends a buffer of data bytes.
base | Pointer to the FLEXIO_UART_Type structure. |
txData | The data bytes to send. |
txSize | The number of data bytes to send. |
kStatus_FLEXIO_UART_Timeout | Transmission timed out and was aborted. |
kStatus_Success | Successfully wrote all data. |
brief Sends a buffer of data bytes.
note This function blocks using the polling method until all bytes have been sent.
param base Pointer to the FLEXIO_UART_Type structure. param txData The data bytes to send. param txSize The number of data bytes to send. retval kStatus_FLEXIO_UART_Timeout Transmission timed out and was aborted. retval kStatus_Success Successfully wrote all data.
uint32_t _flexio_uart_config::baudRate_Bps |
Baud rate in Bps.
flexio_uart_bit_count_per_char_t _flexio_uart_config::bitCountPerChar |
number of bits, 7/8/9 -bit
flexio_uart_transfer_callback_t _flexio_uart_handle::callback |
Callback function.
uint8_t* _flexio_uart_transfer::data |
The buffer of data to be transfer.
uint8_t* { ... } ::data |
The buffer of data to be transfer.
size_t _flexio_uart_transfer::dataSize |
Transfer size
bool _flexio_uart_config::enableFastAccess |
Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.
bool _flexio_uart_config::enableInDebug |
Enable/disable FlexIO operation in debug mode
bool _flexio_uart_config::enableInDoze |
Enable/disable FlexIO operation in doze mode
bool _flexio_uart_config::enableUart |
Enable/disable FlexIO UART TX & RX.
FLEXIO_Type* _flexio_uart_type::flexioBase |
FlexIO base pointer.
uint8_t* _flexio_uart_transfer::rxData |
The buffer to receive data.
uint8_t* { ... } ::rxData |
The buffer to receive data.
uint8_t* volatile _flexio_uart_handle::rxData |
Address of remaining data to receive.
volatile size_t _flexio_uart_handle::rxDataSize |
Size of the remaining data to receive.
size_t _flexio_uart_handle::rxDataSizeAll |
Total bytes to be received.
uint8_t _flexio_uart_type::RxPinIndex |
Pin select for UART_Rx.
uint8_t* _flexio_uart_handle::rxRingBuffer |
Start address of the receiver ring buffer.
volatile uint16_t _flexio_uart_handle::rxRingBufferHead |
Index for the driver to store received data into ring buffer.
size_t _flexio_uart_handle::rxRingBufferSize |
Size of the ring buffer.
volatile uint16_t _flexio_uart_handle::rxRingBufferTail |
Index for the user to get data from the ring buffer.
volatile uint8_t _flexio_uart_handle::rxState |
RX transfer state
uint8_t _flexio_uart_type::shifterIndex[2] |
Shifter index used in FlexIO UART.
uint8_t _flexio_uart_type::timerIndex[2] |
Timer index used in FlexIO UART.
const uint8_t* _flexio_uart_transfer::txData |
The buffer of data to be sent.
const uint8_t* { ... } ::txData |
The buffer of data to be sent.
const uint8_t* volatile _flexio_uart_handle::txData |
Address of remaining data to send.
volatile size_t _flexio_uart_handle::txDataSize |
Size of the remaining data to send.
size_t _flexio_uart_handle::txDataSizeAll |
Total bytes to be sent.
uint8_t _flexio_uart_type::TxPinIndex |
Pin select for UART_Tx.
volatile uint8_t _flexio_uart_handle::txState |
TX transfer state.
void* _flexio_uart_handle::userData |
UART callback function parameter.