LEUART - Low Energy UART

Description

Low Energy Universal Asynchronous Receiver/Transmitter (LEUART) Peripheral API.

This module contains functions to control the LEUART peripheral of Silicon Labs 32-bit MCUs and SoCs. The LEUART module provides the full UART communication using a low frequency 32.768 kHz clock and has special features for communication without the CPU intervention.

Data Structures

struct LEUART_Init_TypeDef
Initialization structure.

Functions

uint32_t LEUART_BaudrateCalc (uint32_t refFreq, uint32_t clkdiv)
Calculate the baudrate for the LEUART given reference frequency and clock division.
uint32_t LEUART_BaudrateGet (LEUART_TypeDef *leuart)
Get the current baudrate for LEUART.
void LEUART_BaudrateSet (LEUART_TypeDef *leuart, uint32_t refFreq, uint32_t baudrate)
Configure the baudrate (or as close as possible to a specified baudrate).
void LEUART_Enable (LEUART_TypeDef *leuart, LEUART_Enable_TypeDef enable)
Enable/disable the LEUART receiver and/or transmitter.
void LEUART_FreezeEnable (LEUART_TypeDef *leuart, bool enable)
LEUART register synchronization freeze control.
void LEUART_Init (LEUART_TypeDef *leuart, LEUART_Init_TypeDef const *init)
Initialize LEUART.
void LEUART_Reset (LEUART_TypeDef *leuart)
Reset LEUART to the same state that it was in after a hardware reset.
uint8_t LEUART_Rx (LEUART_TypeDef *leuart)
Receive one 8 bit frame, (or part of 9 bit frame).
uint16_t LEUART_RxExt (LEUART_TypeDef *leuart)
Receive one 8-9 bit frame with extended information.
void LEUART_Tx (LEUART_TypeDef *leuart, uint8_t data)
Transmit one frame.
void LEUART_TxExt (LEUART_TypeDef *leuart, uint16_t data)
Transmit one 8-9 bit frame with extended control.
void LEUART_TxDmaInEM2Enable (LEUART_TypeDef *leuart, bool enable)
Enables handling of LEUART TX by DMA in EM2.
void LEUART_RxDmaInEM2Enable (LEUART_TypeDef *leuart, bool enable)
Enables handling of LEUART RX by DMA in EM2.
void LEUART_IntClear (LEUART_TypeDef *leuart, uint32_t flags)
Clear one or more pending LEUART interrupts.
void LEUART_IntDisable (LEUART_TypeDef *leuart, uint32_t flags)
Disable one or more LEUART interrupts.
void LEUART_IntEnable (LEUART_TypeDef *leuart, uint32_t flags)
Enable one or more LEUART interrupts.
uint32_t LEUART_IntGet (LEUART_TypeDef *leuart)
Get pending LEUART interrupt flags.
uint32_t LEUART_IntGetEnabled (LEUART_TypeDef *leuart)
Get enabled and pending LEUART interrupt flags.
void LEUART_IntSet (LEUART_TypeDef *leuart, uint32_t flags)
Set one or more pending LEUART interrupts from SW.
uint32_t LEUART_StatusGet (LEUART_TypeDef *leuart)
Get LEUART STATUS register.
uint8_t LEUART_RxDataGet (LEUART_TypeDef *leuart)
Receive one 8 bit frame, (or part of a 9 bit frame).
uint16_t LEUART_RxDataXGet (LEUART_TypeDef *leuart)
Receive