39 #if defined(USART_COUNT) && (USART_COUNT > 0)
210 #if defined(USART_IRCTRL_IRPRSSEL_PRSCH4)
213 #if defined(USART_IRCTRL_IRPRSSEL_PRSCH5)
216 #if defined(USART_IRCTRL_IRPRSSEL_PRSCH6)
219 #if defined(USART_IRCTRL_IRPRSSEL_PRSCH7)
224 #if defined(_USART_I2SCTRL_MASK)
246 #if defined(_USART_INPUT_MASK)
255 #if defined(USART_INPUT_RXPRSSEL_PRSCH7)
262 #if defined(USART_INPUT_RXPRSSEL_PRSCH11)
279 #if defined(USART_TRIGCTRL_TSEL_PRSCH7)
319 #if defined(USART_INPUT_RXPRS) && defined(USART_CTRL_MVDIS)
329 #if defined(_USART_TIMING_CSHOLD_MASK)
342 #if defined(USART_TRIGCTRL_AUTOTXTEN)
355 #if defined(_USART_TIMING_CSHOLD_MASK) && defined(USART_CTRL_MVDIS)
356 #define USART_INITASYNC_DEFAULT \
372 #elif defined(USART_INPUT_RXPRS) && defined(USART_CTRL_MVDIS)
373 #define USART_INITASYNC_DEFAULT \
387 #define USART_INITASYNC_DEFAULT \
400 #if defined(USART_TRIGCTRL_AUTOTXTEN)
401 #define USART_INITPRSTRIGGER_DEFAULT \
409 #define USART_INITPRSTRIGGER_DEFAULT \
444 #if defined(USART_INPUT_RXPRS) && defined(USART_TRIGCTRL_AUTOTXTEN)
455 #if defined(_USART_TIMING_CSHOLD_MASK)
466 #if defined(_USART_TIMING_CSHOLD_MASK)
467 #define USART_INITSYNC_DEFAULT \
483 #elif defined(USART_INPUT_RXPRS) && defined(USART_TRIGCTRL_AUTOTXTEN)
484 #define USART_INITSYNC_DEFAULT \
498 #define USART_INITSYNC_DEFAULT \
538 #if defined(_USART_TIMING_CSHOLD_MASK) && defined(USART_CTRL_MVDIS)
539 #define USART_INITIRDA_DEFAULT \
562 #elif defined(USART_INPUT_RXPRS) && defined(USART_CTRL_MVDIS)
563 #define USART_INITIRDA_DEFAULT \
584 #define USART_INITIRDA_DEFAULT \
603 #if defined(_USART_I2SCTRL_MASK)
630 #if defined(_USART_TIMING_CSHOLD_MASK)
631 #define USART_INITI2S_DEFAULT \
648 usartI2sFormatW16D16, \
651 usartI2sJustifyLeft, \
655 #define USART_INITI2S_DEFAULT \
669 usartI2sFormatW16D16, \
672 usartI2sJustifyLeft, \
700 #if defined(_USART_I2SCTRL_MASK)
705 #if defined(DEFAULT_IRDA_USART) || defined(USART0) || ((USART_COUNT == 1) && defined(USART1))
735 #if defined(DEFAULT_IRDA_USART)
737 #elif (USART_COUNT == 1) && defined(USART1)
776 usart->
IEN &= ~flags;
850 return usart->
IF & ien;
924 return (uint8_t)usart->
RXDATA;
1033 return (uint16_t)usart->
RXDATAX;
#define USART_FRAME_STOPBITS_ONEANDAHALF
#define USART_I2SCTRL_FORMAT_W8D8
#define USART_CTRL_OVS_X16
#define USART_CTRL_OVS_X6
#define USART_TRIGCTRL_TSEL_PRSCH0
USART_Stopbits_TypeDef stopbits
USART_I2sJustify_TypeDef justify
#define USART_CTRL_CLKPOL_IDLEHIGH
__STATIC_INLINE uint32_t USART_IntGetEnabled(USART_TypeDef *usart)
Get enabled and pending USART interrupt flags. Useful for handling more interrupt sources in the same...
void USART_Tx(USART_TypeDef *usart, uint8_t data)
Transmit one 4-9 bit frame.
#define USART_FRAME_DATABITS_FOURTEEN
#define USART_I2SCTRL_FORMAT_W32D16
#define USART_CTRL_CLKPOL_IDLELOW
USART_PrsTriggerCh_TypeDef prsTriggerChannel
void USART_InitSync(USART_TypeDef *usart, const USART_InitSync_TypeDef *init)
Init USART for synchronous mode.
#define USART_IRCTRL_IRPW_FOUR
USART_OVS_TypeDef oversampling
#define USART_TRIGCTRL_TSEL_PRSCH5
#define USART_FRAME_DATABITS_THIRTEEN
#define USART_FRAME_DATABITS_FOUR
__STATIC_INLINE void USART_IntClear(USART_TypeDef *usart, uint32_t flags)
Clear one or more pending USART interrupts.
void USART_BaudrateSyncSet(USART_TypeDef *usart, uint32_t refFreq, uint32_t baudrate)
Configure USART operating in synchronous mode to use a given baudrate (or as close as possible to spe...
#define USART_CTRL_OVS_X4
#define USART_INPUT_RXPRSSEL_PRSCH9
#define USART_IRCTRL_IRPRSSEL_PRSCH6
#define USART_IRCTRL_IRPRSSEL_PRSCH5
USART_Databits_TypeDef databits
#define USART_TRIGCTRL_TSEL_PRSCH3
uint8_t USART_Rx(USART_TypeDef *usart)
Receive one 4-8 bit frame, (or part of 10-16 bit frame).
#define USART_IRCTRL_IRPRSSEL_PRSCH7
USART_InitAsync_TypeDef async
#define USART_INPUT_RXPRSSEL_PRSCH11
#define USART_IRCTRL_IRPRSSEL_PRSCH0
#define USART_INPUT_RXPRSSEL_PRSCH10
void USART_TxDoubleExt(USART_TypeDef *usart, uint32_t data)
Transmit two 4-9 bit frames, or one 10-16 bit frame with extended control.
USART_InitSync_TypeDef sync
uint32_t USART_RxDoubleExt(USART_TypeDef *usart)
Receive two 4-9 bit frames, or one 10-16 bit frame with extended information.
uint32_t USART_BaudrateCalc(uint32_t refFreq, uint32_t clkdiv, bool syncmode, USART_OVS_TypeDef ovs)
Calculate baudrate for USART/UART given reference frequency, clock division and oversampling rate (if...
USART_PrsRxCh_TypeDef prsRxCh
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define USART_I2SCTRL_FORMAT_W32D24M
#define USART_CTRL_CLKPHA_SAMPLETRAILING
USART_IrDAPw_Typedef irPw
USART_Parity_TypeDef parity
#define USART_CTRL_OVS_X8
#define USART_FRAME_DATABITS_ELEVEN
__STATIC_INLINE void USART_IntEnable(USART_TypeDef *usart, uint32_t flags)
Enable one or more USART interrupts.
#define USART_I2SCTRL_JUSTIFY_RIGHT
USART_Enable_TypeDef enable
#define USART_FRAME_DATABITS_FIVE
#define USART_FRAME_DATABITS_SIX
__STATIC_INLINE void USART_InitIrDA(const USART_InitIrDA_TypeDef *init)
Init DEFAULT_IRDA_USART for asynchronous IrDA mode.
USART_PrsTriggerCh_TypeDef
USART_I2sFormat_TypeDef format
#define USART_I2SCTRL_FORMAT_W32D32
#define USART_FRAME_DATABITS_SIXTEEN
#define USART_INPUT_RXPRSSEL_PRSCH0
__STATIC_INLINE uint32_t USART_IntGet(USART_TypeDef *usart)
Get pending USART interrupt flags.
#define USART_FRAME_STOPBITS_TWO
#define USART_FRAME_DATABITS_FIFTEEN
uint16_t USART_RxExt(USART_TypeDef *usart)
Receive one 4-9 bit frame, (or part of 10-16 bit frame) with extended information.
#define USART_INPUT_RXPRSSEL_PRSCH4
#define USART_INPUT_RXPRSSEL_PRSCH7
__STATIC_INLINE void USART_IntSet(USART_TypeDef *usart, uint32_t flags)
Set one or more pending USART interrupts from SW.
#define USART_IRCTRL_IRPRSSEL_PRSCH3
__STATIC_INLINE uint16_t USART_RxDoubleGet(USART_TypeDef *usart)
Receive two 4-8 bit frames, or one 10-16 bit frame.
#define USART_IRCTRL_IRPW_THREE
#define USART_INPUT_RXPRSSEL_PRSCH5
#define USART_FRAME_DATABITS_SEVEN
#define USART_IRCTRL_IRPRSSEL_PRSCH4
#define USART_INPUT_RXPRSSEL_PRSCH6
__STATIC_INLINE uint32_t USART_RxDoubleXGet(USART_TypeDef *usart)
Receive two 4-9 bit frames, or one 10-16 bit frame with extended information.
#define USART_TRIGCTRL_TSEL_PRSCH2
USART_IrDAPrsSel_Typedef irPrsSel
#define USART_INPUT_RXPRSSEL_PRSCH1
#define USART_I2SCTRL_JUSTIFY_LEFT
#define USART_FRAME_DATABITS_TEN
#define USART_TRIGCTRL_TSEL_PRSCH6
USART_ClockMode_TypeDef clockMode
#define USART_INPUT_RXPRSSEL_PRSCH3
#define USART_FRAME_STOPBITS_ONE
#define USART_TRIGCTRL_TSEL_PRSCH7
void USARTn_InitIrDA(USART_TypeDef *usart, const USART_InitIrDA_TypeDef *init)
Init USART for asynchronous IrDA mode.
__STATIC_INLINE uint32_t USART_StatusGet(USART_TypeDef *usart)
Get USART STATUS register.
#define USART_TRIGCTRL_TSEL_PRSCH1
#define USART_IRCTRL_IRPRSSEL_PRSCH1
#define USART_FRAME_PARITY_NONE
USART_Enable_TypeDef enable
void USART_TxExt(USART_TypeDef *usart, uint16_t data)
Transmit one 4-9 bit frame with extended control.
#define USART_FRAME_PARITY_ODD
#define USART_FRAME_PARITY_EVEN
USART_Databits_TypeDef databits
__STATIC_INLINE void USART_IntDisable(USART_TypeDef *usart, uint32_t flags)
Disable one or more USART interrupts.
#define USART_FRAME_DATABITS_EIGHT
#define USART_FRAME_DATABITS_NINE
void USART_Reset(USART_TypeDef *usart)
Reset USART/UART to same state as after a HW reset.
#define USART_CTRL_CLKPHA_SAMPLELEADING
uint8_t USART_SpiTransfer(USART_TypeDef *usart, uint8_t data)
Perform one 8 bit frame SPI transfer.
#define USART_FRAME_DATABITS_TWELVE
void USART_InitI2s(USART_TypeDef *usart, USART_InitI2s_TypeDef *init)
Init USART for I2S mode.
#define USART_IRCTRL_IRPRSSEL_PRSCH2
#define USART_I2SCTRL_FORMAT_W16D8
#define USART_TRIGCTRL_TSEL_PRSCH4
__STATIC_INLINE uint16_t USART_RxDataXGet(USART_TypeDef *usart)
Receive one 4-9 bit frame, (or part of 10-16 bit frame) with extended information.
#define USART_FRAME_STOPBITS_HALF
void USART_Enable(USART_TypeDef *usart, USART_Enable_TypeDef enable)
Enable/disable USART/UART receiver and/or transmitter.
void USART_InitPrsTrigger(USART_TypeDef *usart, const USART_PrsTriggerInit_TypeDef *init)
Initialize automatic transmissions using PRS channel as trigger.
#define USART_IRCTRL_IRPW_ONE
void USART_InitAsync(USART_TypeDef *usart, const USART_InitAsync_TypeDef *init)
Init USART/UART for normal asynchronous mode.
uint16_t USART_RxDouble(USART_TypeDef *usart)
Receive two 4-8 bit frames, or one 10-16 bit frame.
uint32_t USART_BaudrateGet(USART_TypeDef *usart)
Get current baudrate for USART/UART.
#define USART_I2SCTRL_FORMAT_W32D8
#define USART_I2SCTRL_FORMAT_W32D24
#define USART_IRCTRL_IRPW_TWO
#define USART_INPUT_RXPRSSEL_PRSCH2
__STATIC_INLINE uint8_t USART_RxDataGet(USART_TypeDef *usart)
Receive one 4-8 bit frame, (or part of 10-16 bit frame).
void USART_TxDouble(USART_TypeDef *usart, uint16_t data)
Transmit two 4-9 bit frames, or one 10-16 bit frame.
USART_PrsRxCh_TypeDef prsRxCh
#define USART_I2SCTRL_FORMAT_W16D16
#define USART_INPUT_RXPRSSEL_PRSCH8
void USART_BaudrateAsyncSet(USART_TypeDef *usart, uint32_t refFreq, uint32_t baudrate, USART_OVS_TypeDef ovs)
Configure USART/UART operating in asynchronous mode to use a given baudrate (or as close as possible ...