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;
USART_Stopbits_TypeDef stopbits
USART_I2sJustify_TypeDef justify
#define USART_INPUT_RXPRSSEL_PRSCH6
__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...
#define USART_IRCTRL_IRPRSSEL_PRSCH3
void USART_Tx(USART_TypeDef *usart, uint8_t data)
Transmit one 4-9 bit frame.
#define USART_IRCTRL_IRPW_THREE
USART_PrsTriggerCh_TypeDef prsTriggerChannel
void USART_InitSync(USART_TypeDef *usart, const USART_InitSync_TypeDef *init)
Init USART for synchronous mode.
#define USART_IRCTRL_IRPRSSEL_PRSCH4
#define USART_FRAME_PARITY_NONE
USART_OVS_TypeDef oversampling
#define USART_CTRL_OVS_X6
#define USART_CTRL_OVS_X4
__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_FRAME_DATABITS_ELEVEN
USART_Databits_TypeDef databits
uint8_t USART_Rx(USART_TypeDef *usart)
Receive one 4-8 bit frame, (or part of 10-16 bit frame).
#define USART_INPUT_RXPRSSEL_PRSCH3
#define USART_INPUT_RXPRSSEL_PRSCH8
USART_InitAsync_TypeDef async
#define USART_IRCTRL_IRPRSSEL_PRSCH7
void USART_TxDoubleExt(USART_TypeDef *usart, uint32_t data)
Transmit two 4-9 bit frames, or one 10-16 bit frame with extended control.
#define USART_CTRL_CLKPHA_SAMPLELEADING
#define USART_INPUT_RXPRSSEL_PRSCH9
#define USART_FRAME_PARITY_ODD
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...
#define USART_IRCTRL_IRPRSSEL_PRSCH1
USART_PrsRxCh_TypeDef prsRxCh
#define USART_I2SCTRL_FORMAT_W32D24M
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define USART_TRIGCTRL_TSEL_PRSCH2
#define USART_CTRL_CLKPOL_IDLELOW
#define USART_I2SCTRL_FORMAT_W32D16
USART_IrDAPw_Typedef irPw
USART_Parity_TypeDef parity
#define USART_I2SCTRL_JUSTIFY_RIGHT
__STATIC_INLINE void USART_IntEnable(USART_TypeDef *usart, uint32_t flags)
Enable one or more USART interrupts.
USART_Enable_TypeDef enable
#define USART_INPUT_RXPRSSEL_PRSCH7
#define USART_INPUT_RXPRSSEL_PRSCH10
#define USART_IRCTRL_IRPW_TWO
__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_IRCTRL_IRPRSSEL_PRSCH2
#define USART_I2SCTRL_FORMAT_W32D8
#define USART_FRAME_DATABITS_SIXTEEN
#define USART_IRCTRL_IRPW_FOUR
#define USART_TRIGCTRL_TSEL_PRSCH6
#define USART_I2SCTRL_FORMAT_W8D8
#define USART_FRAME_DATABITS_FOURTEEN
#define USART_TRIGCTRL_TSEL_PRSCH3
__STATIC_INLINE uint32_t USART_IntGet(USART_TypeDef *usart)
Get pending USART interrupt flags.
#define USART_I2SCTRL_FORMAT_W32D32
#define USART_FRAME_DATABITS_THIRTEEN
uint16_t USART_RxExt(USART_TypeDef *usart)
Receive one 4-9 bit frame, (or part of 10-16 bit frame) with extended information.
__STATIC_INLINE void USART_IntSet(USART_TypeDef *usart, uint32_t flags)
Set one or more pending USART interrupts from SW.
__STATIC_INLINE uint16_t USART_RxDoubleGet(USART_TypeDef *usart)
Receive two 4-8 bit frames, or one 10-16 bit frame.
#define USART_I2SCTRL_JUSTIFY_LEFT
#define USART_CTRL_OVS_X16
#define USART_FRAME_STOPBITS_ONE
#define USART_FRAME_PARITY_EVEN
#define USART_FRAME_DATABITS_FIVE
__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_CTRL_CLKPOL_IDLEHIGH
#define USART_FRAME_STOPBITS_HALF
USART_IrDAPrsSel_Typedef irPrsSel
#define USART_IRCTRL_IRPW_ONE
#define USART_FRAME_DATABITS_FOUR
#define USART_INPUT_RXPRSSEL_PRSCH2
#define USART_IRCTRL_IRPRSSEL_PRSCH0
USART_ClockMode_TypeDef clockMode
#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_FRAME_DATABITS_TEN
#define USART_FRAME_STOPBITS_ONEANDAHALF
#define USART_FRAME_DATABITS_NINE
USART_Enable_TypeDef enable
#define USART_FRAME_DATABITS_TWELVE
void USART_TxExt(USART_TypeDef *usart, uint16_t data)
Transmit one 4-9 bit frame with extended control.
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_SEVEN
#define USART_IRCTRL_IRPRSSEL_PRSCH6
#define USART_I2SCTRL_FORMAT_W32D24
void USART_Reset(USART_TypeDef *usart)
Reset USART/UART to same state as after a HW reset.
#define USART_FRAME_DATABITS_FIFTEEN
#define USART_INPUT_RXPRSSEL_PRSCH0
#define USART_INPUT_RXPRSSEL_PRSCH4
#define USART_I2SCTRL_FORMAT_W16D16
uint8_t USART_SpiTransfer(USART_TypeDef *usart, uint8_t data)
Perform one 8 bit frame SPI transfer.
#define USART_FRAME_STOPBITS_TWO
void USART_InitI2s(USART_TypeDef *usart, USART_InitI2s_TypeDef *init)
Init USART for I2S mode.
#define USART_FRAME_DATABITS_SIX
#define USART_TRIGCTRL_TSEL_PRSCH1
__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_INPUT_RXPRSSEL_PRSCH11
#define USART_TRIGCTRL_TSEL_PRSCH0
#define USART_CTRL_OVS_X8
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.
void USART_InitAsync(USART_TypeDef *usart, const USART_InitAsync_TypeDef *init)
Init USART/UART for normal asynchronous mode.
#define USART_FRAME_DATABITS_EIGHT
uint16_t USART_RxDouble(USART_TypeDef *usart)
Receive two 4-8 bit frames, or one 10-16 bit frame.
#define USART_TRIGCTRL_TSEL_PRSCH5
#define USART_I2SCTRL_FORMAT_W16D8
uint32_t USART_BaudrateGet(USART_TypeDef *usart)
Get current baudrate for USART/UART.
#define USART_CTRL_CLKPHA_SAMPLETRAILING
#define USART_IRCTRL_IRPRSSEL_PRSCH5
__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.
#define USART_INPUT_RXPRSSEL_PRSCH5
USART_PrsRxCh_TypeDef prsRxCh
#define USART_INPUT_RXPRSSEL_PRSCH1
#define USART_TRIGCTRL_TSEL_PRSCH4
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 ...