![]() |
![]() |
MSPM0C110X Driver Library
2.05.00.05
|
UART Driver Library.
#include <stdbool.h>
#include <stdint.h>
#include <ti/devices/msp/msp.h>
#include <ti/driverlib/dl_common.h>
Go to the source code of this file.
Data Structures | |
struct | DL_UART_Config |
Configuration struct for DL_UART_init. More... | |
struct | DL_UART_ClockConfig |
Configuration struct for DL_UART_setClockConfig. More... | |
struct | DL_UART_Main_backupConfig |
Configuration structure to backup UART Main peripheral state before going to STOP/STANDBY mode. Used by DL_UART_Main_saveConfiguration and DL_UART_Main_restoreConfiguration. More... | |
struct | DL_UART_Extend_backupConfig |
Configuration structure to backup UART Extend peripheral state before going to STOP/STANDBY mode. Used by DL_UART_Extend_saveConfiguration and DL_UART_Extend_restoreConfiguration. More... | |
Macros | |
#define | DL_UART_INTERRUPT_DMA_DONE_TX (UART_CPU_INT_IMASK_DMA_DONE_TX_SET) |
DMA done on transmit interrupt. | |
#define | DL_UART_INTERRUPT_DMA_DONE_RX (UART_CPU_INT_IMASK_DMA_DONE_RX_SET) |
DMA done on receive interrupt. | |
#define | DL_UART_INTERRUPT_CTS_DONE (UART_CPU_INT_IMASK_CTS_SET) |
Clear to send interrupt. | |
#define | DL_UART_INTERRUPT_ADDRESS_MATCH (UART_CPU_INT_IMASK_ADDR_MATCH_SET) |
9-bit mode address match interrupt | |
#define | DL_UART_INTERRUPT_LINC0_MATCH (UART_CPU_INT_IMASK_LINC0_SET) |
LINC0 match interrupt. | |
#define | DL_UART_INTERRUPT_EOT_DONE (UART_CPU_INT_IMASK_EOT_SET) |
End of transmission interrupt. | |
#define | DL_UART_INTERRUPT_TX (UART_CPU_INT_IMASK_TXINT_SET) |
UART transmit interrupt. | |
#define | DL_UART_INTERRUPT_RX (UART_CPU_INT_IMASK_RXINT_SET) |
UART receive interrupt. | |
#define | DL_UART_INTERRUPT_LIN_COUNTER_OVERFLOW (UART_CPU_INT_IMASK_LINOVF_SET) |
LIN hardware counter overflow interrupt. | |
#define | DL_UART_INTERRUPT_LIN_RISING_EDGE (UART_CPU_INT_IMASK_LINC1_SET) |
LIN rising edge LINC1 interrupt. | |
#define | DL_UART_INTERRUPT_LIN_FALLING_EDGE (UART_CPU_INT_IMASK_LINC0_SET) |
LIN falling edge LINC0 interrupt. | |
#define | DL_UART_INTERRUPT_RXD_POS_EDGE (UART_CPU_INT_IMASK_RXPE_SET) |
Positive Edge on UARTxRXD interrupt. | |
#define | DL_UART_INTERRUPT_RXD_NEG_EDGE (UART_CPU_INT_IMASK_RXNE_SET) |
Negative Edge on UARTxRXD interrupt. | |
#define | DL_UART_INTERRUPT_OVERRUN_ERROR (UART_CPU_INT_IMASK_OVRERR_SET) |
Overrun error interrupt. | |
#define | DL_UART_INTERRUPT_BREAK_ERROR (UART_CPU_INT_IMASK_BRKERR_SET) |
Break error interrupt. | |
#define | DL_UART_INTERRUPT_PARITY_ERROR (UART_CPU_INT_IMASK_PARERR_SET) |
Parity error interrupt. | |
#define | DL_UART_INTERRUPT_FRAMING_ERROR (UART_CPU_INT_IMASK_FRMERR_SET) |
Framing error interrupt. | |
#define | DL_UART_INTERRUPT_RX_TIMEOUT_ERROR (UART_CPU_INT_IMASK_RTOUT_SET) |
Receive timeout interrupt. | |
#define | DL_UART_INTERRUPT_NOISE_ERROR (UART_CPU_INT_IMASK_NERR_SET) |
Noise error interrupt. | |
#define | DL_UART_DMA_INTERRUPT_RX (UART_DMA_TRIG_RX_IMASK_RXINT_SET) |
UART interrupt for enabling UART receive as DMA trigger. | |
#define | DL_UART_DMA_DONE_INTERRUPT_RX (UART_CPU_INT_IMASK_DMA_DONE_RX_SET) |
UART interrupt indicating DMA is done with the RX. | |
#define | DL_UART_DMA_INTERRUPT_RX_TIMEOUT (UART_DMA_TRIG_RX_IMASK_RTOUT_SET) |
UART interrupt for enabling UART receive timeout as DMA trigger. | |
#define | DL_UART_DMA_INTERRUPT_TX (UART_DMA_TRIG_TX_IMASK_TXINT_SET) |
UART interrupt for enabling UART transmit as DMA trigger. | |
#define | DL_UART_DMA_DONE_INTERRUPT_TX (UART_CPU_INT_IMASK_DMA_DONE_TX_SET) |
UART interrupt indicating DMA is done with the TX. | |
#define | DL_UART_ERROR_OVERRUN (UART_RXDATA_OVRERR_SET) |
Overrun error ocurred. | |
#define | DL_UART_ERROR_BREAK (UART_RXDATA_BRKERR_SET) |
Break error ocurred. | |
#define | DL_UART_ERROR_PARITY (UART_RXDATA_PARERR_SET) |
Parity error ocurred. | |
#define | DL_UART_ERROR_FRAMING (UART_RXDATA_FRMERR_SET) |
Framing error ocurred. | |
#define | DL_UART_PULSE_WIDTH_3_16_BIT_PERIOD ((uint32_t) 0x00000000U) |
Sets the IrDA pulse width to 3/16 bit period when using the BITCLK16. | |
Enumerations | |
enum | DL_UART_IIDX { DL_UART_IIDX_DMA_DONE_TX = UART_CPU_INT_IIDX_STAT_DMA_DONE_TX, DL_UART_IIDX_DMA_DONE_RX = UART_CPU_INT_IIDX_STAT_DMA_DONE_RX, DL_UART_IIDX_CTS_DONE = UART_CPU_INT_IIDX_STAT_CTS, DL_UART_IIDX_ADDRESS_MATCH = UART_CPU_INT_IIDX_STAT_MODE_9B, DL_UART_IIDX_EOT_DONE = UART_CPU_INT_IIDX_STAT_EOT, DL_UART_IIDX_TX = UART_CPU_INT_IIDX_STAT_TXIFG, DL_UART_IIDX_RX = UART_CPU_INT_IIDX_STAT_RXIFG, DL_UART_IIDX_LIN_COUNTER_OVERFLOW = UART_CPU_INT_IIDX_STAT_LINOVF, DL_UART_IIDX_LIN_RISING_EDGE = UART_CPU_INT_IIDX_STAT_LINC1, DL_UART_IIDX_LIN_FALLING_EDGE = UART_CPU_INT_IIDX_STAT_LINC0, DL_UART_IIDX_RXD_POS_EDGE = UART_CPU_INT_IIDX_STAT_RXPE, DL_UART_IIDX_RXD_NEG_EDGE = UART_CPU_INT_IIDX_STAT_RXNE, DL_UART_IIDX_OVERRUN_ERROR = UART_CPU_INT_IIDX_STAT_OEFG, DL_UART_IIDX_BREAK_ERROR = UART_CPU_INT_IIDX_STAT_BEFG, DL_UART_IIDX_PARITY_ERROR = UART_CPU_INT_IIDX_STAT_PEFG, DL_UART_IIDX_FRAMING_ERROR = UART_CPU_INT_IIDX_STAT_FEFG, DL_UART_IIDX_RX_TIMEOUT_ERROR = UART_CPU_INT_IIDX_STAT_RTFG, DL_UART_IIDX_NOISE_ERROR = UART_CPU_INT_IIDX_STAT_NERR_EVT, DL_UART_IIDX_NO_INTERRUPT = UART_CPU_INT_IIDX_STAT_NO_INTR } |
enum | DL_UART_DMA_IIDX_RX { DL_UART_DMA_IIDX_RX_TRIGGER = UART_DMA_TRIG_RX_IIDX_STAT_RXIFG, DL_UART_DMA_IIDX_RX_TIMEOUT_TRIGGER = UART_DMA_TRIG_RX_IIDX_STAT_RTFG } |
enum | DL_UART_DMA_IIDX_TX { DL_UART_DMA_IIDX_TX_TRIGGER = UART_DMA_TRIG_TX_IIDX_STAT_TXIFG } |
enum | DL_UART_PULSE_WIDTH { DL_UART_PULSE_WIDTH_5_NS = UART_GFCTL_AGFSEL_AGLIT_5, DL_UART_PULSE_WIDTH_10_NS = UART_GFCTL_AGFSEL_AGLIT_10, DL_UART_PULSE_WIDTH_25_NS = UART_GFCTL_AGFSEL_AGLIT_25, DL_UART_PULSE_WIDTH_50_NS = UART_GFCTL_AGFSEL_AGLIT_50 } |
enum | DL_UART_OVERSAMPLING_RATE { DL_UART_OVERSAMPLING_RATE_16X = UART_CTL0_HSE_OVS16, DL_UART_OVERSAMPLING_RATE_8X = UART_CTL0_HSE_OVS8, DL_UART_OVERSAMPLING_RATE_3X = UART_CTL0_HSE_OVS3 } |
enum | DL_UART_PARITY { DL_UART_PARITY_EVEN = (UART_LCRH_PEN_ENABLE | UART_LCRH_EPS_EVEN), DL_UART_PARITY_ODD = (UART_LCRH_PEN_ENABLE | UART_LCRH_EPS_ODD), DL_UART_PARITY_STICK_ONE = (UART_LCRH_PEN_ENABLE | UART_LCRH_SPS_ENABLE | UART_LCRH_EPS_ODD), DL_UART_PARITY_STICK_ZERO = (UART_LCRH_PEN_ENABLE | UART_LCRH_SPS_ENABLE | UART_LCRH_EPS_EVEN), DL_UART_PARITY_NONE = UART_LCRH_PEN_DISABLE } |
enum | DL_UART_WORD_LENGTH { DL_UART_WORD_LENGTH_5_BITS = UART_LCRH_WLEN_DATABIT5, DL_UART_WORD_LENGTH_6_BITS = UART_LCRH_WLEN_DATABIT6, DL_UART_WORD_LENGTH_7_BITS = UART_LCRH_WLEN_DATABIT7, DL_UART_WORD_LENGTH_8_BITS = UART_LCRH_WLEN_DATABIT8 } |
enum | DL_UART_MODE { DL_UART_MODE_NORMAL = UART_CTL0_MODE_UART, DL_UART_MODE_RS485 = UART_CTL0_MODE_RS485, DL_UART_MODE_IDLE_LINE = UART_CTL0_MODE_IDLELINE, DL_UART_MODE_ADDR_9_BIT = UART_CTL0_MODE_ADDR9BIT, DL_UART_MODE_SMART_CARD = UART_CTL0_MODE_SMART, DL_UART_MODE_DALI = UART_CTL0_MODE_DALI } |
enum | DL_UART_DIRECTION { DL_UART_DIRECTION_TX = UART_CTL0_TXE_ENABLE, DL_UART_DIRECTION_RX = UART_CTL0_RXE_ENABLE, DL_UART_DIRECTION_TX_RX = (UART_CTL0_RXE_ENABLE | UART_CTL0_TXE_ENABLE), DL_UART_DIRECTION_NONE = (UART_CTL0_RXE_DISABLE | UART_CTL0_TXE_DISABLE) } |
enum | DL_UART_CLOCK { DL_UART_CLOCK_BUSCLK = UART_CLKSEL_BUSCLK_SEL_ENABLE, DL_UART_CLOCK_MFCLK = UART_CLKSEL_MFCLK_SEL_ENABLE, DL_UART_CLOCK_LFCLK = UART_CLKSEL_LFCLK_SEL_ENABLE } |
enum | DL_UART_FLOW_CONTROL { DL_UART_FLOW_CONTROL_RTS = UART_CTL0_RTSEN_ENABLE, DL_UART_FLOW_CONTROL_CTS = UART_CTL0_CTSEN_ENABLE, DL_UART_FLOW_CONTROL_RTS_CTS = (UART_CTL0_RTSEN_ENABLE | UART_CTL0_CTSEN_ENABLE), DL_UART_FLOW_CONTROL_NONE = (UART_CTL0_CTSEN_DISABLE | UART_CTL0_RTSEN_DISABLE) } |
enum | DL_UART_RTS { DL_UART_RTS_ASSERT = UART_CTL0_RTS_SET, DL_UART_RTS_DEASSERT = UART_CTL0_RTS_CLR } |
enum | DL_UART_STOP_BITS { DL_UART_STOP_BITS_ONE = UART_LCRH_STP2_DISABLE, DL_UART_STOP_BITS_TWO = UART_LCRH_STP2_ENABLE } |
enum | DL_UART_TXD_OUT { DL_UART_TXD_OUT_LOW = UART_CTL0_TXD_OUT_LOW, DL_UART_TXD_OUT_HIGH = UART_CTL0_TXD_OUT_HIGH } |
enum | DL_UART_TX_FIFO_LEVEL { DL_UART_TX_FIFO_LEVEL_3_4_EMPTY = UART_IFLS_TXIFLSEL_LVL_3_4, DL_UART_TX_FIFO_LEVEL_1_2_EMPTY = UART_IFLS_TXIFLSEL_LVL_1_2, DL_UART_TX_FIFO_LEVEL_1_4_EMPTY = UART_IFLS_TXIFLSEL_LVL_1_4, DL_UART_TX_FIFO_LEVEL_EMPTY = UART_IFLS_TXIFLSEL_LVL_EMPTY, DL_UART_TX_FIFO_LEVEL_ONE_ENTRY = UART_IFLS_TXIFLSEL_LVL_1 } |
enum | DL_UART_RX_FIFO_LEVEL { DL_UART_RX_FIFO_LEVEL_ONE_ENTRY = UART_IFLS_RXIFLSEL_LVL_1, DL_UART_RX_FIFO_LEVEL_FULL = UART_IFLS_RXIFLSEL_LVL_FULL, DL_UART_RX_FIFO_LEVEL_3_4_FULL = UART_IFLS_RXIFLSEL_LVL_3_4, DL_UART_RX_FIFO_LEVEL_1_2_FULL = UART_IFLS_RXIFLSEL_LVL_1_2, DL_UART_RX_FIFO_LEVEL_1_4_FULL = UART_IFLS_RXIFLSEL_LVL_1_4 } |
enum | DL_UART_IRDA_CLOCK { DL_UART_IRDA_CLOCK_BAUD_RATE = UART_IRCTL_IRTXCLK_BRCLK, DL_UART_IRDA_CLOCK_FUNCTIONAL = UART_IRCTL_IRTXCLK_BITCLK } |
enum | DL_UART_IRDA_POLARITY { DL_UART_IRDA_POLARITY_LOW = UART_IRCTL_IRRXPL_LOW, DL_UART_IRDA_POLARITY_HIGH = UART_IRCTL_IRRXPL_HIGH } |
enum | DL_UART_CLOCK_DIVIDE_RATIO { DL_UART_CLOCK_DIVIDE_RATIO_1 = UART_CLKDIV_RATIO_DIV_BY_1, DL_UART_CLOCK_DIVIDE_RATIO_2 = UART_CLKDIV_RATIO_DIV_BY_2, DL_UART_CLOCK_DIVIDE_RATIO_3 = UART_CLKDIV_RATIO_DIV_BY_3, DL_UART_CLOCK_DIVIDE_RATIO_4 = UART_CLKDIV_RATIO_DIV_BY_4, DL_UART_CLOCK_DIVIDE_RATIO_5 = UART_CLKDIV_RATIO_DIV_BY_5, DL_UART_CLOCK_DIVIDE_RATIO_6 = UART_CLKDIV_RATIO_DIV_BY_6, DL_UART_CLOCK_DIVIDE_RATIO_7 = UART_CLKDIV_RATIO_DIV_BY_7, DL_UART_CLOCK_DIVIDE_RATIO_8 = UART_CLKDIV_RATIO_DIV_BY_8 } |
enum | DL_UART_CLOCK_DIVIDE2_RATIO { DL_UART_CLOCK_DIVIDE2_RATIO_1 = UART_CLKDIV2_RATIO_DIV_BY_1, DL_UART_CLOCK_DIVIDE2_RATIO_2 = UART_CLKDIV2_RATIO_DIV_BY_2, DL_UART_CLOCK_DIVIDE2_RATIO_3 = UART_CLKDIV2_RATIO_DIV_BY_3, DL_UART_CLOCK_DIVIDE2_RATIO_4 = UART_CLKDIV2_RATIO_DIV_BY_4, DL_UART_CLOCK_DIVIDE2_RATIO_5 = UART_CLKDIV2_RATIO_DIV_BY_5, DL_UART_CLOCK_DIVIDE2_RATIO_6 = UART_CLKDIV2_RATIO_DIV_BY_6, DL_UART_CLOCK_DIVIDE2_RATIO_7 = UART_CLKDIV2_RATIO_DIV_BY_7, DL_UART_CLOCK_DIVIDE2_RATIO_8 = UART_CLKDIV2_RATIO_DIV_BY_8 } |
Functions | |
void | DL_UART_init (UART_Regs *uart, const DL_UART_Config *config) |
Initialize the UART peripheral. More... | |
__STATIC_INLINE void | DL_UART_enablePower (UART_Regs *uart) |
Enables the Peripheral Write Enable (PWREN) register for the UART. More... | |
__STATIC_INLINE void | DL_UART_disablePower (UART_Regs *uart) |
Disables the Peripheral Write Enable (PWREN) register for the UART. More... | |
__STATIC_INLINE bool | DL_UART_isPowerEnabled (const UART_Regs *uart) |
Returns if the Peripheral Write Enable (PWREN) register for the UART is enabled. More... | |
__STATIC_INLINE void | DL_UART_reset (UART_Regs *uart) |
Resets uart peripheral. More... | |
__STATIC_INLINE bool | DL_UART_isReset (const UART_Regs *uart) |
Returns if uart peripheral was reset. More... | |
__STATIC_INLINE void | DL_UART_enable (UART_Regs *uart) |
Enable the UART peripheral. More... | |
__STATIC_INLINE bool | DL_UART_isEnabled (const UART_Regs *uart) |
Checks if the UART peripheral is enabled. More... | |
__STATIC_INLINE void | DL_UART_disable (UART_Regs *uart) |
Disable the UART peripheral. More... | |
void | DL_UART_setClockConfig (UART_Regs *uart, const DL_UART_ClockConfig *config) |
Configure UART source clock. More... | |
void | DL_UART_getClockConfig (const UART_Regs *uart, DL_UART_ClockConfig *config) |
Get UART source clock configuration. More... | |
void | DL_UART_configBaudRate (UART_Regs *uart, uint32_t clockFreq, uint32_t baudRate) |
Configure the baud rate. More... | |
__STATIC_INLINE void | DL_UART_setOversampling (UART_Regs *uart, DL_UART_OVERSAMPLING_RATE rate) |
Set the oversampling rate. More... | |
__STATIC_INLINE DL_UART_OVERSAMPLING_RATE | DL_UART_getOversampling (const UART_Regs *uart) |
Get the oversampling rate. More... | |
__STATIC_INLINE void | DL_UART_enableLoopbackMode (UART_Regs *uart) |
Enable loopback mode. More... | |
__STATIC_INLINE bool | DL_UART_isLoopbackModeEnabled (const UART_Regs *uart) |
Check if loopback mode is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableLoopbackMode (UART_Regs *uart) |
Disable loopback mode. More... | |
__STATIC_INLINE void | DL_UART_setDirection (UART_Regs *uart, DL_UART_DIRECTION direction) |
Set the direction of the UART communication. More... | |
__STATIC_INLINE DL_UART_DIRECTION | DL_UART_getDirection (const UART_Regs *uart) |
Get the direction of the UART communication. More... | |
__STATIC_INLINE void | DL_UART_enableMajorityVoting (UART_Regs *uart) |
Enable majority voting control. More... | |
__STATIC_INLINE bool | DL_UART_isMajorityVotingEnabled (const UART_Regs *uart) |
Check if majority voting is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableMajorityVoting (UART_Regs *uart) |
Disable majority voting control. More... | |
__STATIC_INLINE void | DL_UART_enableMSBFirst (UART_Regs *uart) |
Enable most significant bit (MSB) first. More... | |
__STATIC_INLINE bool | DL_UART_isMSBFirstEnabled (const UART_Regs *uart) |
Check if most significant bit (MSB) first is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableMSBFirst (UART_Regs *uart) |
Disable most significant bit (MSB) first. More... | |
__STATIC_INLINE void | DL_UART_enableTransmitPinManualControl (UART_Regs *uart) |
Enable control of the TXD pin. More... | |
__STATIC_INLINE bool | DL_UART_isTransmitPinManualControlEnabled (const UART_Regs *uart) |
Check if control of the TXD pin is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableTransmitPinManualControl (UART_Regs *uart) |
Disable control of the TXD pin. More... | |
__STATIC_INLINE void | DL_UART_setTransmitPinManualOutput (UART_Regs *uart, DL_UART_TXD_OUT txdOutVal) |
Set the output of the TXD pin. More... | |
__STATIC_INLINE DL_UART_TXD_OUT | DL_UART_getTransmitPinManualOutput (const UART_Regs *uart) |
Get the output value of the TXD pin. More... | |
__STATIC_INLINE void | DL_UART_enableManchesterEncoding (UART_Regs *uart) |
Enable Manchester encoding. More... | |
__STATIC_INLINE void | DL_UART_disableManchesterEncoding (UART_Regs *uart) |
Disable Manchester encoding. More... | |
__STATIC_INLINE bool | DL_UART_isManchesterEncodingEnabled (const UART_Regs *uart) |
Check if Manchester encoding is enabled. More... | |
__STATIC_INLINE void | DL_UART_setCommunicationMode (UART_Regs *uart, DL_UART_MODE mode) |
Set the communication mode/protocol to use. More... | |
__STATIC_INLINE DL_UART_MODE | DL_UART_getCommunicationMode (const UART_Regs *uart) |
Get the communication mode/protocol being used. More... | |
__STATIC_INLINE void | DL_UART_setFlowControl (UART_Regs *uart, DL_UART_FLOW_CONTROL config) |
Set the flow control configuration. More... | |
__STATIC_INLINE DL_UART_FLOW_CONTROL | DL_UART_getFlowControl (const UART_Regs *uart) |
Check the flow control configuration. More... | |
__STATIC_INLINE void | DL_UART_setRTSOutput (UART_Regs *uart, DL_UART_RTS val) |
Set the request to send output signal. More... | |
__STATIC_INLINE DL_UART_RTS | DL_UART_getRTSOutput (const UART_Regs *uart) |
Get the request to send output signal. More... | |
__STATIC_INLINE void | DL_UART_enableFIFOs (UART_Regs *uart) |
Enable FIFOs. More... | |
__STATIC_INLINE void | DL_UART_disableFIFOs (UART_Regs *uart) |
Disable FIFOs. More... | |
__STATIC_INLINE bool | DL_UART_isFIFOsEnabled (const UART_Regs *uart) |
Check if FIFOs are enabled. More... | |
__STATIC_INLINE void | DL_UART_enableLINSendBreak (UART_Regs *uart) |
Enable send break (for LIN protocol) More... | |
__STATIC_INLINE void | DL_UART_disableLINSendBreak (UART_Regs *uart) |
Disable send break. More... | |
__STATIC_INLINE bool | DL_UART_isLINSendBreakEnabled (const UART_Regs *uart) |
Check if send break is enabled. More... | |
__STATIC_INLINE bool | DL_UART_isParityEnabled (const UART_Regs *uart) |
Check if parity is enabled. More... | |
__STATIC_INLINE void | DL_UART_setParityMode (UART_Regs *uart, DL_UART_PARITY parity) |
Set the parity mode. More... | |
__STATIC_INLINE DL_UART_PARITY | DL_UART_getParityMode (const UART_Regs *uart) |
Get parity mode. More... | |
__STATIC_INLINE void | DL_UART_setStopBits (UART_Regs *uart, DL_UART_STOP_BITS numStopBits) |
Set the number of stop bits. More... | |
__STATIC_INLINE DL_UART_STOP_BITS | DL_UART_getStopBits (const UART_Regs *uart) |
Get the number of stop bits. More... | |
__STATIC_INLINE void | DL_UART_setWordLength (UART_Regs *uart, DL_UART_WORD_LENGTH wordLength) |
Set the word length. More... | |
__STATIC_INLINE DL_UART_WORD_LENGTH | DL_UART_getWordLength (const UART_Regs *uart) |
Get the word length. More... | |
__STATIC_INLINE void | DL_UART_enableSendIdlePattern (UART_Regs *uart) |
Send idle pattern. More... | |
__STATIC_INLINE void | DL_UART_disableSendIdlePattern (UART_Regs *uart) |
Disable send idle pattern. More... | |
__STATIC_INLINE bool | DL_UART_isSendIdlePatternEnabled (const UART_Regs *uart) |
Check if send idle pattern is enabled. More... | |
__STATIC_INLINE void | DL_UART_setExternalDriverSetup (UART_Regs *uart, uint32_t val) |
Set external driver setup value. More... | |
__STATIC_INLINE uint32_t | DL_UART_getExternalDriverSetup (const UART_Regs *uart) |
Get the external driver setup value. More... | |
__STATIC_INLINE void | DL_UART_setExternalDriverHold (UART_Regs *uart, uint32_t val) |
Set external driver setup hold. More... | |
__STATIC_INLINE uint32_t | DL_UART_getExternalDriverHold (const UART_Regs *uart) |
Get the external driver setup hold. More... | |
__STATIC_INLINE bool | DL_UART_isBusy (const UART_Regs *uart) |
Checks if the UART is busy. More... | |
__STATIC_INLINE bool | DL_UART_isRXFIFOEmpty (const UART_Regs *uart) |
Checks if the RX FIFO is empty. More... | |
__STATIC_INLINE bool | DL_UART_isRXFIFOFull (const UART_Regs *uart) |
Checks if the RX FIFO is full. More... | |
__STATIC_INLINE bool | DL_UART_isTXFIFOEmpty (const UART_Regs *uart) |
Checks if the TX FIFO is empty. More... | |
__STATIC_INLINE bool | DL_UART_isTXFIFOFull (const UART_Regs *uart) |
Checks if the TX FIFO is full. More... | |
__STATIC_INLINE bool | DL_UART_isClearToSend (const UART_Regs *uart) |
Checks if UART is clear to send. More... | |
__STATIC_INLINE bool | DL_UART_isIdleModeDetected (const UART_Regs *uart) |
Checks if Idle mode has been detected. More... | |
__STATIC_INLINE void | DL_UART_setTXFIFOThreshold (UART_Regs *uart, DL_UART_TX_FIFO_LEVEL threshold) |
Set the TX FIFO interrupt threshold level. More... | |
__STATIC_INLINE DL_UART_TX_FIFO_LEVEL | DL_UART_getTXFIFOThreshold (const UART_Regs *uart) |
Get the TX FIFO interrupt threshold level. More... | |
__STATIC_INLINE void | DL_UART_setRXFIFOThreshold (UART_Regs *uart, DL_UART_RX_FIFO_LEVEL threshold) |
Set the RX FIFO interrupt threshold level. The interrupts are generated based on a transition through a level rather than being based on the level. That is, the interrupts are generated when the fill level progresses through the trigger level. For example, if the receive trigger level is set to the half-way mark, the interrupt is triggered when the receive FIFO becomes half full. In other words, the interrupt is triggered after the receive FIFO is filled with two or more characters. More... | |
__STATIC_INLINE DL_UART_RX_FIFO_LEVEL | DL_UART_getRXFIFOThreshold (const UART_Regs *uart) |
Get the RX FIFO interrupt threshold level. More... | |
__STATIC_INLINE void | DL_UART_setRXInterruptTimeout (UART_Regs *uart, uint32_t timeout) |
Set the RX interrupt timeout. More... | |
__STATIC_INLINE uint32_t | DL_UART_getRXInterruptTimeout (const UART_Regs *uart) |
Get the RX interrupt timeout. More... | |
__STATIC_INLINE uint32_t | DL_UART_getIntegerBaudRateDivisor (const UART_Regs *uart) |
Get Integer Baud-Rate Divisor. More... | |
__STATIC_INLINE uint32_t | DL_UART_getFractionalBaudRateDivisor (const UART_Regs *uart) |
Get Fractional Baud-Rate Divisor. More... | |
__STATIC_INLINE void | DL_UART_setBaudRateDivisor (UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor) |
Set the baud rate divisor. More... | |
__STATIC_INLINE void | DL_UART_setIrDABaudRateDivisor (UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor, DL_UART_CLOCK_DIVIDE2_RATIO clkDivisor2) |
Set the baud rate divisor for IrDA mode. More... | |
__STATIC_INLINE void | DL_UART_setDigitalPulseWidth (UART_Regs *uart, uint32_t pulseWidth) |
Set the pulse width select for the digital glitch suppresion. More... | |
__STATIC_INLINE uint32_t | DL_UART_getDigitalPulseWidth (const UART_Regs *uart) |
Get the pulse width select for the digital glitch suppresion. More... | |
__STATIC_INLINE void | DL_UART_transmitData (UART_Regs *uart, uint8_t data) |
Writes data into the TX FIFO to transmit. More... | |
__STATIC_INLINE uint8_t | DL_UART_receiveData (const UART_Regs *uart) |
Reads data from the RX FIFO. More... | |
__STATIC_INLINE uint32_t | DL_UART_getErrorStatus (const UART_Regs *uart, uint32_t errorMask) |
Gets the status of the error flags of the received data. More... | |
__STATIC_INLINE void | DL_UART_setLINCounterValue (UART_Regs *uart, uint16_t value) |
Set the LIN counter value. More... | |
__STATIC_INLINE uint16_t | DL_UART_getLINCounterValue (const UART_Regs *uart) |
Get the LIN counter value. More... | |
__STATIC_INLINE void | DL_UART_enableLINCounter (UART_Regs *uart) |
Enable the LIN counter. More... | |
__STATIC_INLINE bool | DL_UART_isLINCounterEnabled (const UART_Regs *uart) |
Check if the LIN counter is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableLINCounter (UART_Regs *uart) |
Disable the LIN counter. More... | |
__STATIC_INLINE void | DL_UART_enableLINCounterClearOnFallingEdge (UART_Regs *uart) |
Enable LIN counter clear and start counting on falling edge of RXD. More... | |
__STATIC_INLINE bool | DL_UART_isLINCounterClearOnFallingEdge (const UART_Regs *uart) |
Check if LIN counting on falling edge of RXD is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableLINCounterClearOnFallingEdge (UART_Regs *uart) |
Disable LIN counting on falling edge of RXD. More... | |
__STATIC_INLINE void | DL_UART_enableLINCountWhileLow (UART_Regs *uart) |
Enable LIN counter incrementing while RXD signal is low. More... | |
__STATIC_INLINE bool | DL_UART_isLINCountWhileLowEnabled (const UART_Regs *uart) |
Check if LIN counter increments while RXD signal is low is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableLINCountWhileLow (UART_Regs *uart) |
Disable LIN counter increments while RXD signal is low. More... | |
__STATIC_INLINE void | DL_UART_enableLINFallingEdgeCapture (UART_Regs *uart) |
Enable capture of the LIN counter on a falling edge. More... | |
__STATIC_INLINE bool | DL_UART_isLINFallingEdgeCaptureEnabled (const UART_Regs *uart) |
Check status of capture of LIN counter on a falling edge. More... | |
__STATIC_INLINE void | DL_UART_disableLINFallingEdgeCapture (UART_Regs *uart) |
Disable capture of LIN counter on a falling edge. More... | |
__STATIC_INLINE void | DL_UART_enableLINRisingEdgeCapture (UART_Regs *uart) |
Enable capture of the LIN counter on a rising edge. More... | |
__STATIC_INLINE bool | DL_UART_isLINRisingEdgeCaptureEnabled (const UART_Regs *uart) |
Check status of capture of LIN counter on a rising edge. More... | |
__STATIC_INLINE void | DL_UART_disableLINRisingEdgeCapture (UART_Regs *uart) |
Disable capture of LIN counter on a rising edge. More... | |
__STATIC_INLINE void | DL_UART_enableLINCounterCompareMatch (UART_Regs *uart) |
Enable LIN counter compare match mode. More... | |
__STATIC_INLINE void | DL_UART_enableLINSyncFieldValidationCounterControl (UART_Regs *uart) |
Setup LIN counter control for sync field validation. More... | |
__STATIC_INLINE void | DL_UART_enableLINReceptionCountControl (UART_Regs *uart) |
Setup LIN counter control for LIN reception. More... | |
__STATIC_INLINE bool | DL_UART_isLINCounterCompareMatchEnabled (const UART_Regs *uart) |
Check if LIN counter compare match mode is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableLINCounterCompareMatch (UART_Regs *uart) |
Disable LIN counter compare match mode. More... | |
__STATIC_INLINE void | DL_UART_setLINCounterCompareValue (UART_Regs *uart, uint16_t value) |
Set the value to be compared to the LIN counter. More... | |
__STATIC_INLINE uint16_t | DL_UART_getLINFallingEdgeCaptureValue (const UART_Regs *uart) |
Get the LINC0 counter value. More... | |
__STATIC_INLINE uint16_t | DL_UART_getLINRisingEdgeCaptureValue (const UART_Regs *uart) |
Get the LINC1 counter value. More... | |
__STATIC_INLINE void | DL_UART_enableIrDAMode (UART_Regs *uart) |
Enable the IrDA encoder/decoder. More... | |
__STATIC_INLINE bool | DL_UART_isIrDAModeEnabled (const UART_Regs *uart) |
Check if the IrDA encoder/decoder is enabled. More... | |
__STATIC_INLINE void | DL_UART_disableIrDAMode (UART_Regs *uart) |
Disable the IrDA encoder/decoder. More... | |
__STATIC_INLINE void | DL_UART_setIrDATXPulseClockSelect (UART_Regs *uart, DL_UART_IRDA_CLOCK uartClock) |
Set the IrDA transmit pulse clock select. More... | |
__STATIC_INLINE DL_UART_IRDA_CLOCK | DL_UART_getIrDATXPulseClockSelect (const UART_Regs *uart) |
Get the IrDA transmit pulse clock select. More... | |
void | DL_UART_configIrDAMode (UART_Regs *uart, DL_UART_IRDA_POLARITY polarity, uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk) |
Set the IrDA configurations. More... | |
void | DL_UART_setIrDAPulseLength (UART_Regs *uart, uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk) |
Set the IrDA transmit pulse length. More... | |
__STATIC_INLINE uint32_t | DL_UART_getIrDATXPulseLength (const UART_Regs *uart) |
Get the IrDA transmit pulse length. More... | |
__STATIC_INLINE void | DL_UART_setIrDARXPulsePolarity (UART_Regs *uart, DL_UART_IRDA_POLARITY polarity) |
Set the IrDA receive input UCAxRXD polarity. More... | |
__STATIC_INLINE DL_UART_IRDA_POLARITY | DL_UART_getIrDARXPulsePolarity (const UART_Regs *uart) |
Get the IrDA receive input UCAxRXD polarity. More... | |
__STATIC_INLINE void | DL_UART_setAddressMask (UART_Regs *uart, uint32_t addressMask) |
Set the address mask for DALI, 9-bit, or Idle-Line mode. More... | |
__STATIC_INLINE uint32_t | DL_UART_getAddressMask (const UART_Regs *uart) |
Get the address mask being used. More... | |
__STATIC_INLINE void | DL_UART_setAddress (UART_Regs *uart, uint32_t address) |
Set the address. More... | |
__STATIC_INLINE uint32_t | DL_UART_getAddress (const UART_Regs *uart) |
Get the address being used. More... | |
__STATIC_INLINE void | DL_UART_enableInterrupt (UART_Regs *uart, uint32_t interruptMask) |
Enable UART interrupts. More... | |
__STATIC_INLINE void | DL_UART_disableInterrupt (UART_Regs *uart, uint32_t interruptMask) |
Disable UART interrupts. More... | |
__STATIC_INLINE uint32_t | DL_UART_getEnabledInterrupts (const UART_Regs *uart, uint32_t interruptMask) |
Check which UART interrupts are enabled. More... | |
__STATIC_INLINE uint32_t | DL_UART_getEnabledInterruptStatus (const UART_Regs *uart, uint32_t interruptMask) |
Check interrupt flag of enabled UART interrupts. More... | |
__STATIC_INLINE uint32_t | DL_UART_getRawInterruptStatus (const UART_Regs *uart, uint32_t interruptMask) |
Check interrupt flag of any UART interrupt. More... | |
__STATIC_INLINE DL_UART_IIDX | DL_UART_getPendingInterrupt (const UART_Regs *uart) |
Get highest priority pending UART interrupt. More... | |
__STATIC_INLINE void | DL_UART_clearInterruptStatus (UART_Regs *uart, uint32_t interruptMask) |
Clear pending UART interrupts. More... | |
__STATIC_INLINE void | DL_UART_changeConfig (UART_Regs *uart) |
Prepares the UART to change the configuration. More... | |
__STATIC_INLINE void | DL_UART_enableAnalogGlitchFilter (UART_Regs *uart) |
Enable the analog glitch filter on the RX input. More... | |
__STATIC_INLINE void | DL_UART_disableAnalogGlitchFilter (UART_Regs *uart) |
Disable the analog glitch filter on the RX input. More... | |
__STATIC_INLINE bool | DL_UART_isAnalogGlitchFilterEnabled (const UART_Regs *uart) |
Returns if analog glitch filter is enabled. More... | |
__STATIC_INLINE void | DL_UART_enableGlitchFilterChaining (UART_Regs *uart) |
Enable analog and digital noise glitch filter chaining. More... | |
__STATIC_INLINE void | DL_UART_disableGlitchFilterChaining (UART_Regs *uart) |
Disable analog and digital noise glitch filter chaining. More... | |
__STATIC_INLINE bool | DL_UART_isGlitchFilterChainingEnabled (const UART_Regs *uart) |
Returns if glitch filter chaining enabled. More... | |
__STATIC_INLINE void | DL_UART_setAnalogPulseWidth (UART_Regs *uart, DL_UART_PULSE_WIDTH pulseWidth) |
Set the pulse width select for the analog glitch suppresion. More... | |
__STATIC_INLINE DL_UART_PULSE_WIDTH | DL_UART_getAnalogPulseWidth (const UART_Regs *uart) |
Get the pulse width select for the glitch suppresion. More... | |
void | DL_UART_transmitDataBlocking (UART_Regs *uart, uint8_t data) |
Blocks to ensure transmit is ready before sending data. More... | |
uint8_t | DL_UART_receiveDataBlocking (const UART_Regs *uart) |
Blocks to ensure receive is ready before reading data. More... | |
bool | DL_UART_transmitDataCheck (UART_Regs *uart, uint8_t data) |
Checks the TX FIFO before trying to transmit data. More... | |
bool | DL_UART_receiveDataCheck (const UART_Regs *uart, uint8_t *buffer) |
Checks the RX FIFO before trying to transmit data. More... | |
uint32_t | DL_UART_drainRXFIFO (const UART_Regs *uart, uint8_t *buffer, uint32_t maxCount) |
Read all available data out of the RX FIFO using 8 bit access. More... | |
uint32_t | DL_UART_fillTXFIFO (UART_Regs *uart, const uint8_t *buffer, uint32_t count) |
Fill the TX FIFO until full using 8 bit access. More... | |
__STATIC_INLINE void | DL_UART_enableDMAReceiveEvent (UART_Regs *uart, uint32_t interrupt) |
Enable UART interrupt for triggering the DMA receive event. More... | |
__STATIC_INLINE void | DL_UART_enableDMATransmitEvent (UART_Regs *uart) |
Enable UART interrupt for triggering the DMA transmit event. More... | |
__STATIC_INLINE void | DL_UART_disableDMAReceiveEvent (UART_Regs *uart, uint32_t interrupt) |
Disables UART interrupt from triggering the DMA receive event. More... | |
__STATIC_INLINE void | DL_UART_disableDMATransmitEvent (UART_Regs *uart) |
Disables UART interrupt from triggering the DMA transmit event. More... | |
__STATIC_INLINE uint32_t | DL_UART_getEnabledDMAReceiveEvent (const UART_Regs *uart, uint32_t interruptMask) |
Check which UART interrupt for DMA receive events is enabled. More... | |
__STATIC_INLINE uint32_t | DL_UART_getEnabledDMATransmitEvent (const UART_Regs *uart) |
Check if UART interrupt for DMA transmit event is enabled. More... | |
__STATIC_INLINE uint32_t | DL_UART_getEnabledDMAReceiveEventStatus (const UART_Regs *uart, uint32_t interruptMask) |
Check interrupt flag of enabled UART interrupt for DMA receive event. More... | |
__STATIC_INLINE uint32_t | DL_UART_getEnabledDMATransmitEventStatus (const UART_Regs *uart) |
Check interrupt flag of enabled UART interrupt for DMA transmit event. More... | |
__STATIC_INLINE uint32_t | DL_UART_getRawDMAReceiveEventStatus (const UART_Regs *uart, uint32_t interruptMask) |
Check interrupt flag of any UART interrupt for DMA receive event. More... | |
__STATIC_INLINE uint32_t | DL_UART_getRawDMATransmitEventStatus (const UART_Regs *uart) |
Check interrupt flag of any UART interrupt for DMA transmit event. More... | |
__STATIC_INLINE DL_UART_DMA_IIDX_RX | DL_UART_getPendingDMAReceiveEvent (const UART_Regs *uart) |
Get highest priority pending UART interrupt for DMA receive event. More... | |
__STATIC_INLINE DL_UART_DMA_IIDX_TX | DL_UART_getPendingDMATransmitEvent (const UART_Regs *uart) |
Get highest priority pending UART interrupt for DMA transmit event. More... | |
__STATIC_INLINE void | DL_UART_clearDMAReceiveEventStatus (UART_Regs *uart, uint32_t interruptMask) |
Clear pending UART interrupts for DMA receive event. More... | |
__STATIC_INLINE void | DL_UART_clearDMATransmitEventStatus (UART_Regs *uart) |
Clear pending UART interrupt for DMA transmit event. More... | |
__STATIC_INLINE void | DL_UART_setClockDivider2 (UART_Regs *uart, DL_UART_CLOCK_DIVIDE2_RATIO ratio) |
Sets the second clock divider ratio. More... | |
__STATIC_INLINE DL_UART_CLOCK_DIVIDE2_RATIO | DL_UART_getClockDivider2 (const UART_Regs *uart) |
Gets the value of CLKDIV2. More... | |
bool | DL_UART_Main_saveConfiguration (const UART_Regs *uart, DL_UART_Main_backupConfig *ptr) |
Save UART Main configuration before entering a power loss state. More... | |
bool | DL_UART_Main_restoreConfiguration (UART_Regs *uart, DL_UART_Main_backupConfig *ptr) |
Restore UART Main configuration after leaving a power loss state. More... | |
bool | DL_UART_Extend_saveConfiguration (const UART_Regs *uart, DL_UART_Extend_backupConfig *ptr) |
Save UART Extend configuration before entering a power loss state. More... | |
bool | DL_UART_Extend_restoreConfiguration (UART_Regs *uart, DL_UART_Extend_backupConfig *ptr) |
Restore UART Extend configuration after leaving a power loss state. More... | |