fsl_uart.h
/*
* Copyright (c) 2015, Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _FSL_UART_H_
#define _FSL_UART_H_
#include "fsl_common.h"
/*******************************************************************************
* Definitions
******************************************************************************/
#define FSL_UART_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
enum _uart_status
{
kStatus_UART_TxBusy = MAKE_STATUS(kStatusGroup_UART, 0),
kStatus_UART_RxBusy = MAKE_STATUS(kStatusGroup_UART, 1),
kStatus_UART_TxIdle = MAKE_STATUS(kStatusGroup_UART, 2),
kStatus_UART_RxIdle = MAKE_STATUS(kStatusGroup_UART, 3),
kStatus_UART_TxWatermarkTooLarge = MAKE_STATUS(kStatusGroup_UART, 4),
kStatus_UART_RxWatermarkTooLarge = MAKE_STATUS(kStatusGroup_UART, 5),
kStatus_UART_FlagCannotClearManually =
MAKE_STATUS(kStatusGroup_UART, 6),
kStatus_UART_Error = MAKE_STATUS(kStatusGroup_UART, 7),
kStatus_UART_RxRingBufferOverrun = MAKE_STATUS(kStatusGroup_UART, 8),
kStatus_UART_RxHardwareOverrun = MAKE_STATUS(kStatusGroup_UART, 9)
};
typedef enum _uart_parity_mode
{
kUART_ParityDisabled = 0x0U,
kUART_ParityEven = 0x2U,
kUART_ParityOdd = 0x3U,
} uart_parity_mode_t;
typedef enum _uart_stop_bit_count
{
kUART_OneStopBit = 0U,
kUART_TwoStopBit = 1U,
} uart_stop_bit_count_t;
enum _uart_interrupt_enable
{
#if defined(FSL_FEATURE_UART_HAS_LIN_BREAK_DETECT) && FSL_FEATURE_UART_HAS_LIN_BREAK_DETECT
kUART_LinBreakInterruptEnable = (UART_BDH_LBKDIE_MASK),
#endif
kUART_RxActiveEdgeInterruptEnable = (UART_BDH_RXEDGIE_MASK),
kUART_TxDataRegEmptyInterruptEnable = (UART_C2_TIE_MASK << 8),
kUART_TransmissionCompleteInterruptEnable = (UART_C2_TCIE_MASK << 8),
kUART_RxDataRegFullInterruptEnable = (UART_C2_RIE_MASK << 8),
kUART_IdleLineInterruptEnable = (UART_C2_ILIE_MASK << 8),
kUART_RxOverrunInterruptEnable = (UART_C3_ORIE_MASK << 16),
kUART_NoiseErrorInterruptEnable = (UART_C3_NEIE_MASK << 16),
kUART_FramingErrorInterruptEnable = (UART_C3_FEIE_MASK << 16),
kUART_ParityErrorInterruptEnable = (UART_C3_PEIE_MASK << 16),
#if defined(FSL_FEATURE_UART_HAS_FIFO) && FSL_FEATURE_UART_HAS_FIFO
kUART_RxFifoOverflowInterruptEnable = (UART_CFIFO_TXOFE_MASK << 24),
kUART_TxFifoOverflowInterruptEnable = (UART_CFIFO_RXUFE_MASK << 24),
kUART_RxFifoUnderflowInterruptEnable = (UART_CFIFO_RXUFE_MASK << 24),
#endif
};
enum _uart_flags
{
kUART_TxDataRegEmptyFlag = (UART_S1_TDRE_MASK),
kUART_TransmissionCompleteFlag = (UART_S1_TC_MASK),
kUART_RxDataRegFullFlag = (UART_S1_RDRF_MASK),
kUART_IdleLineFlag = (UART_S1_IDLE_MASK),
kUART_RxOverrunFlag = (UART_S1_OR_MASK),
kUART_NoiseErrorFlag = (UART_S1_NF_MASK),
kUART_FramingErrorFlag = (UART_S1_FE_MASK),
kUART_ParityErrorFlag = (UART_S1_PF_MASK),
#if defined(FSL_FEATURE_UART_HAS_LIN_BREAK_DETECT) && FSL_FEATURE_UART_HAS_LIN_BREAK_DETECT
kUART_LinBreakFlag = (UART_S2_LBKDIF_MASK << 8),
#endif
kUART_RxActiveEdgeFlag = (UART_S2_RXEDGIF_MASK << 8),
kUART_RxActiveFlag = (UART_S2_RAF_MASK << 8),
#if defined(FSL_FEATURE_UART_HAS_EXTENDED_DATA_REGISTER_FLAGS) && FSL_FEATURE_UART_HAS_EXTENDED_DATA_REGISTER_FLAGS
kUART_NoiseErrorInRxDataRegFlag = (UART_ED_NOISY_MASK << 16),
kUART_ParityErrorInRxDataRegFlag = (UART_ED_PARITYE_MASK << 16),
#endif
#if defined(FSL_FEATURE_UART_HAS_FIFO) && FSL_FEATURE_UART_HAS_FIFO
kUART_TxFifoEmptyFlag = (UART_SFIFO_TXEMPT_MASK << 24),
kUART_RxFifoEmptyFlag = (UART_SFIFO_RXEMPT_MASK << 24),
kUART_TxFifoOverflowFlag = (UART_SFIFO_TXOF_MASK << 24),
kUART_RxFifoOverflowFlag = (UART_SFIFO_RXOF_MASK << 24),
kUART_RxFifoUnderflowFlag = (UART_SFIFO_RXUF_MASK << 24),
#endif
};
typedef struct _uart_config
{
uint32_t baudRate_Bps;
uart_parity_mode_t parityMode;
#if defined(FSL_FEATURE_UART_HAS_STOP_BIT_CONFIG_SUPPORT) && FSL_FEATURE_UART_HAS_STOP_BIT_CONFIG_SUPPORT
uart_stop_bit_count_t stopBitCount;
#endif
#if defined(FSL_FEATURE_UART_HAS_FIFO) && FSL_FEATURE_UART_HAS_FIFO
uint8_t txFifoWatermark;
uint8_t rxFifoWatermark;
#endif
bool enableTx;
bool enableRx;
} uart_config_t;
typedef struct _uart_transfer
{
uint8_t *data;
size_t dataSize;
} uart_transfer_t;
/* Forward declaration of the handle typedef. */
typedef struct _uart_handle uart_handle_t;
typedef void (*uart_transfer_callback_t)(UART_Type *base, uart_handle_t *handle, status_t status, void *userData);
struct _uart_handle
{
uint8_t *volatile txData;
volatile size_t txDataSize;
size_t txDataSizeAll;
uint8_t *volatile rxData;
volatile size_t rxDataSize;
size_t rxDataSizeAll;
uint8_t *rxRingBuffer;
size_t rxRingBufferSize;
volatile uint16_t rxRingBufferHead;
volatile uint16_t rxRingBufferTail;
uart_transfer_callback_t callback;
void *userData;
volatile uint8_t txState;
volatile uint8_t rxState;
};
/*******************************************************************************
* API
******************************************************************************/
#if defined(__cplusplus)
extern "C" {
#endif /* _cplusplus */
void UART_Init(UART_Type *base, const uart_config_t *config, uint32_t srcClock_Hz);
void UART_Deinit(UART_Type *base);
void UART_GetDefaultConfig(uart_config_t *config);
void UART_SetBaudRate(UART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz);
/* @} */
uint32_t UART_GetStatusFlags(UART_Type *base);
status_t UART_ClearStatusFlags(UART_Type *base, uint32_t mask);
/* @} */
void UART_EnableInterrupts(UART_Type *base, uint32_t mask);
void UART_DisableInterrupts(UART_Type *base, uint32_t mask);
uint32_t UART_GetEnabledInterrupts(UART_Type *base);
/* @} */
#if defined(FSL_FEATURE_UART_HAS_DMA_SELECT) && FSL_FEATURE_UART_HAS_DMA_SELECT
static inline uint32_t UART_GetDataRegisterAddress(UART_Type *base)
{
return (uint32_t) & (base->D);
}
static inline void UART_EnableTxDMA(UART_Type *base, bool enable)
{
if (enable)
{
#if (defined(FSL_FEATURE_UART_IS_SCI) && FSL_FEATURE_UART_IS_SCI)
base->C4 |= UART_C4_TDMAS_MASK;
#else
base->C5 |= UART_C5_TDMAS_MASK;
#endif
base->C2 |= UART_C2_TIE_MASK;
}
else
{
#if (defined(FSL_FEATURE_UART_IS_SCI) && FSL_FEATURE_UART_IS_SCI)
base->C4 &= ~UART_C4_TDMAS_MASK;
#else
base->C5 &= ~UART_C5_TDMAS_MASK;
#endif
base->C2 &= ~UART_C2_TIE_MASK;
}
}
static inline void UART_EnableRxDMA(UART_Type *base, bool enable)
{
if (enable)
{
#if (defined(FSL_FEATURE_UART_IS_SCI) && FSL_FEATURE_UART_IS_SCI)
base->C4 |= UART_C4_RDMAS_MASK;
#else
base->C5 |= UART_C5_RDMAS_MASK;
#endif
base->C2 |= UART_C2_RIE_MASK;
}
else
{
#if (defined(FSL_FEATURE_UART_IS_SCI) && FSL_FEATURE_UART_IS_SCI)
base->C4 &= ~UART_C4_RDMAS_MASK;
#else
base->C5 &= ~UART_C5_RDMAS_MASK;
#endif
base->C2 &= ~UART_C2_RIE_MASK;
}
}
/* @} */
#endif /* FSL_FEATURE_UART_HAS_DMA_SELECT */
static inline void UART_EnableTx(UART_Type *base, bool enable)
{
if (enable)
{
base->C2 |= UART_C2_TE_MASK;
}
else
{
base->C2 &= ~UART_C2_TE_MASK;
}
}
static inline void UART_EnableRx(UART_Type *base, bool enable)
{
if (enable)
{
base->C2 |= UART_C2_RE_MASK;
}
else
{
base->C2 &= ~UART_C2_RE_MASK;
}
}
void UART_WriteBlocking(UART_Type *base, const uint8_t *data, size_t length);
static inline void UART_WriteByte(UART_Type *base, uint8_t data)
{
base->D = data;
}
void UART_ReadBlocking(UART_Type *base, uint8_t *data, size_t length);
static inline uint8_t UART_ReadByte(UART_Type *base)
{
return base->D;
}
/* @} */
void UART_CreateHandle(UART_Type *base, uart_handle_t *handle, uart_transfer_callback_t callback, void *userData);
void UART_StartRingBuffer(UART_Type *base, uart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize);
void UART_StopRingBuffer(UART_Type *base, uart_handle_t *handle);
status_t UART_SendNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer);
void UART_AbortSend(UART_Type *base, uart_handle_t *handle);
status_t UART_GetSendCount(UART_Type *base, uart_handle_t *handle, uint32_t *count);
status_t UART_ReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes);
void UART_AbortReceive(UART_Type *base, uart_handle_t *handle);
status_t UART_GetReceiveCount(UART_Type *base, uart_handle_t *handle, uint32_t *count);
void UART_HandleIRQ(UART_Type *base, uart_handle_t *handle);
void UART_HandleErrorIRQ(UART_Type *base, uart_handle_t *handle);
/* @} */
#if defined(__cplusplus)
}
#endif
#endif /* _FSL_UART_H_ */
UART_AbortReceive
void UART_AbortReceive(UART_Type *base, uart_handle_t *handle)
Aborts the interrupt-driven data receiving.
Definition: fsl_uart.c:706
uart_config_t::rxFifoWatermark
uint8_t rxFifoWatermark
Definition: fsl_uart.h:153
UART_ReadByte
static uint8_t UART_ReadByte(UART_Type *base)
Reads the RX register directly.
Definition: fsl_uart.h:554
UART_StartRingBuffer
void UART_StartRingBuffer(UART_Type *base, uart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
Sets up the RX ring buffer.
Definition: fsl_uart.c:523
kUART_RxActiveEdgeInterruptEnable
Definition: fsl_uart.h:89
_uart_handle::rxDataSize
volatile size_t rxDataSize
Definition: fsl_uart.h:179
UART_Init
void UART_Init(UART_Type *base, const uart_config_t *config, uint32_t srcClock_Hz)
Initializes a UART instance with user configuration structure and peripheral clock.
Definition: fsl_uart.c:196
kStatus_UART_RxHardwareOverrun
Definition: fsl_uart.h:61
UART_GetEnabledInterrupts
uint32_t UART_GetEnabledInterrupts(UART_Type *base)
Gets the enabled UART interrupts.
Definition: fsl_uart.c:365
kUART_RxFifoUnderflowInterruptEnable
Definition: fsl_uart.h:101
_uart_flags
_uart_flags
UART status flags.
Definition: fsl_uart.h:110
_uart_handle::rxRingBufferTail
volatile uint16_t rxRingBufferTail
Definition: fsl_uart.h:185
uart_parity_mode_t
uart_parity_mode_t
UART parity mode.
Definition: fsl_uart.h:65
uart_config_t::enableRx
bool enableRx
Definition: fsl_uart.h:156
UART_ReceiveNonBlocking
status_t UART_ReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)
Receives a buffer of data using an interrupt method.
Definition: fsl_uart.c:605
uart_config_t::baudRate_Bps
uint32_t baudRate_Bps
Definition: fsl_uart.h:146
UART_HandleIRQ
void UART_HandleIRQ(UART_Type *base, uart_handle_t *handle)
UART IRQ handle function.
Definition: fsl_uart.c:736
_uart_handle::txDataSize
volatile size_t txDataSize
Definition: fsl_uart.h:176
UART_EnableInterrupts
void UART_EnableInterrupts(UART_Type *base, uint32_t mask)
Enables UART interrupts according to the provided mask.
Definition: fsl_uart.c:339
kUART_FramingErrorFlag
Definition: fsl_uart.h:119
kUART_TxDataRegEmptyFlag
Definition: fsl_uart.h:112
kUART_ParityErrorInterruptEnable
Definition: fsl_uart.h:97
kUART_ParityErrorInRxDataRegFlag
Definition: fsl_uart.h:132
_uart_handle::txDataSizeAll
size_t txDataSizeAll
Definition: fsl_uart.h:177
kUART_TransmissionCompleteInterruptEnable
Definition: fsl_uart.h:91
UART_Deinit
void UART_Deinit(UART_Type *base)
Deinitializes a UART instance.
Definition: fsl_uart.c:270
UART_GetSendCount
status_t UART_GetSendCount(UART_Type *base, uart_handle_t *handle, uint32_t *count)
Get the number of bytes that have been written to UART TX register.
Definition: fsl_uart.c:588
_uart_interrupt_enable
_uart_interrupt_enable
UART interrupt configuration structure, default settings all disabled.
Definition: fsl_uart.h:84
UART_EnableTx
static void UART_EnableTx(UART_Type *base, bool enable)
Enables or disables the UART transmitter.
Definition: fsl_uart.h:471
kUART_TxFifoOverflowInterruptEnable
Definition: fsl_uart.h:100
kUART_IdleLineInterruptEnable
Definition: fsl_uart.h:93
kUART_RxOverrunInterruptEnable
Definition: fsl_uart.h:94
uart_transfer_t::dataSize
size_t dataSize
Definition: fsl_uart.h:163
kStatus_UART_RxBusy
Definition: fsl_uart.h:52
kStatus_UART_RxWatermarkTooLarge
Definition: fsl_uart.h:56
kUART_RxFifoEmptyFlag
Definition: fsl_uart.h:136
kUART_IdleLineFlag
Definition: fsl_uart.h:115
UART_GetReceiveCount
status_t UART_GetReceiveCount(UART_Type *base, uart_handle_t *handle, uint32_t *count)
Get the number of bytes that have been received.
Definition: fsl_uart.c:719
kUART_TxFifoOverflowFlag
Definition: fsl_uart.h:137
uart_transfer_t
UART transfer structure.
Definition: fsl_uart.h:160
kStatus_UART_FlagCannotClearManually
Definition: fsl_uart.h:57
kUART_RxActiveFlag
Definition: fsl_uart.h:128
_uart_handle::txState
volatile uint8_t txState
Definition: fsl_uart.h:190
_uart_handle::rxRingBuffer
uint8_t * rxRingBuffer
Definition: fsl_uart.h:182
kUART_NoiseErrorFlag
Definition: fsl_uart.h:117
kStatus_UART_RxIdle
Definition: fsl_uart.h:54
kUART_RxDataRegFullInterruptEnable
Definition: fsl_uart.h:92
uart_config_t::txFifoWatermark
uint8_t txFifoWatermark
Definition: fsl_uart.h:152
kUART_RxFifoOverflowFlag
Definition: fsl_uart.h:138
UART_AbortSend
void UART_AbortSend(UART_Type *base, uart_handle_t *handle)
Aborts the interrupt driven data transmit.
Definition: fsl_uart.c:580
kUART_ParityOdd
Definition: fsl_uart.h:69
_uart_handle::rxRingBufferHead
volatile uint16_t rxRingBufferHead
Definition: fsl_uart.h:184
UART_GetStatusFlags
uint32_t UART_GetStatusFlags(UART_Type *base)
Get UART status flags.
Definition: fsl_uart.c:378
kUART_RxFifoUnderflowFlag
Definition: fsl_uart.h:139
kUART_RxOverrunFlag
Definition: fsl_uart.h:116
kUART_LinBreakFlag
Definition: fsl_uart.h:123
UART_DisableInterrupts
void UART_DisableInterrupts(UART_Type *base, uint32_t mask)
Disables the UART interrupts according to the provided mask.
Definition: fsl_uart.c:352
UART_EnableTxDMA
static void UART_EnableTxDMA(UART_Type *base, bool enable)
Enables or disables the UART transmitter DMA request.
Definition: fsl_uart.h:403
kStatus_UART_TxBusy
Definition: fsl_uart.h:51
kUART_RxFifoOverflowInterruptEnable
Definition: fsl_uart.h:99
kStatus_UART_TxIdle
Definition: fsl_uart.h:53
uart_stop_bit_count_t
uart_stop_bit_count_t
UART stop bit count.
Definition: fsl_uart.h:73
uart_transfer_t::data
uint8_t * data
Definition: fsl_uart.h:162
uart_config_t::stopBitCount
uart_stop_bit_count_t stopBitCount
Definition: fsl_uart.h:149
UART_GetDataRegisterAddress
static uint32_t UART_GetDataRegisterAddress(UART_Type *base)
Gets the UART data register address.
Definition: fsl_uart.h:390
_uart_handle::rxDataSizeAll
size_t rxDataSizeAll
Definition: fsl_uart.h:180
uart_config_t
UART configuration structure.
Definition: fsl_uart.h:144
UART_CreateHandle
void UART_CreateHandle(UART_Type *base, uart_handle_t *handle, uart_transfer_callback_t callback, void *userData)
Initializes the UART handle.
Definition: fsl_uart.c:484
kUART_TxFifoEmptyFlag
Definition: fsl_uart.h:135
_uart_handle::rxRingBufferSize
size_t rxRingBufferSize
Definition: fsl_uart.h:183
UART_GetDefaultConfig
void UART_GetDefaultConfig(uart_config_t *config)
Gets the default configuration structure.
Definition: fsl_uart.c:290
kUART_TwoStopBit
Definition: fsl_uart.h:76
UART_EnableRx
static void UART_EnableRx(UART_Type *base, bool enable)
Enables or disables the UART receiver.
Definition: fsl_uart.h:491
kUART_ParityErrorFlag
Definition: fsl_uart.h:121
UART_EnableRxDMA
static void UART_EnableRxDMA(UART_Type *base, bool enable)
Enables or disables the UART receiver DMA.
Definition: fsl_uart.h:433
kStatus_UART_RxRingBufferOverrun
Definition: fsl_uart.h:60
UART_HandleErrorIRQ
void UART_HandleErrorIRQ(UART_Type *base, uart_handle_t *handle)
UART Error IRQ handle function.
Definition: fsl_uart.c:885
uart_config_t::enableTx
bool enableTx
Definition: fsl_uart.h:155
kUART_RxDataRegFullFlag
Definition: fsl_uart.h:114
kStatusGroup_UART
Definition: fsl_common.h:75
_uart_handle::userData
void * userData
Definition: fsl_uart.h:188
UART_SetBaudRate
void UART_SetBaudRate(UART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz)
Sets the UART instance baud rate.
Definition: fsl_uart.c:307
uart_config_t::parityMode
uart_parity_mode_t parityMode
Definition: fsl_uart.h:147
kUART_TxDataRegEmptyInterruptEnable
Definition: fsl_uart.h:90
kUART_FramingErrorInterruptEnable
Definition: fsl_uart.h:96
kUART_TransmissionCompleteFlag
Definition: fsl_uart.h:113
kStatus_UART_TxWatermarkTooLarge
Definition: fsl_uart.h:55
kUART_RxActiveEdgeFlag
Definition: fsl_uart.h:126
UART_ClearStatusFlags
status_t UART_ClearStatusFlags(UART_Type *base, uint32_t mask)
Clears status flags with the provided mask.
Definition: fsl_uart.c:395
_uart_handle::rxState
volatile uint8_t rxState
Definition: fsl_uart.h:191
kUART_NoiseErrorInRxDataRegFlag
Definition: fsl_uart.h:131
UART_WriteByte
static void UART_WriteByte(UART_Type *base, uint8_t data)
Writes to the TX register.
Definition: fsl_uart.h:528
kUART_NoiseErrorInterruptEnable
Definition: fsl_uart.h:95
kStatus_UART_Error
Definition: fsl_uart.h:59
_uart_handle::txData
uint8_t *volatile txData
Definition: fsl_uart.h:175
uart_transfer_callback_t
void(* uart_transfer_callback_t)(UART_Type *base, uart_handle_t *handle, status_t status, void *userData)
UART transfer callback function.
Definition: fsl_uart.h:170
kUART_ParityEven
Definition: fsl_uart.h:68
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:121
UART_WriteBlocking
void UART_WriteBlocking(UART_Type *base, const uint8_t *data, size_t length)
Writes to the TX register using a blocking method.
Definition: fsl_uart.c:436
_uart_handle::rxData
uint8_t *volatile rxData
Definition: fsl_uart.h:178
kUART_OneStopBit
Definition: fsl_uart.h:75
kUART_LinBreakInterruptEnable
Definition: fsl_uart.h:87
kUART_ParityDisabled
Definition: fsl_uart.h:67
_uart_handle
UART handle structure.
Definition: fsl_uart.h:173
_uart_handle::callback
uart_transfer_callback_t callback
Definition: fsl_uart.h:187
UART_StopRingBuffer
void UART_StopRingBuffer(UART_Type *base, uart_handle_t *handle)
Aborts the background transfer and uninstalls the ring buffer.
Definition: fsl_uart.c:540
UART_ReadBlocking
void UART_ReadBlocking(UART_Type *base, uint8_t *data, size_t length)
Read RX data register using a blocking method.
Definition: fsl_uart.c:459
UART_SendNonBlocking
status_t UART_SendNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer)
Transmits a buffer of data using the interrupt method.
Definition: fsl_uart.c:555