EUSARTEMLIB
Macros |
|
#define | EUSART_EM2_CAPABLE (ref) (true) |
#define | EUSART_REF_VALID (ref) ((ref) == EUART0) |
#define | EUSART_RX_FIFO_SIZE 4u |
Functions |
|
uint32_t | EUSART_BaudrateGet (EUSART_TypeDef *eusart) |
void | EUSART_BaudrateSet (EUSART_TypeDef *eusart, uint32_t refFreq, uint32_t baudrate) |
void |
EUSART_Enable
(EUSART_TypeDef *eusart,
EUSART_Enable_TypeDef
enable)
|
void | EUSART_IrDAInit (EUSART_TypeDef *eusart, const EUSART_IrDAInit_TypeDef *irdaInit) |
void | EUSART_PrsTriggerEnable (EUSART_TypeDef *eusart, const EUSART_PrsTriggerInit_TypeDef *init) |
void | EUSART_Reset (EUSART_TypeDef *eusart) |
uint8_t | EUSART_Rx (EUSART_TypeDef *eusart) |
void |
EUSART_RxBlock
(EUSART_TypeDef *eusart,
EUSART_BlockRx_TypeDef
enable)
|
uint16_t | EUSART_RxExt (EUSART_TypeDef *eusart) |
void | EUSART_Tx (EUSART_TypeDef *eusart, uint8_t data) |
void | EUSART_TxExt (EUSART_TypeDef *eusart, uint16_t data) |
void |
EUSART_TxTristateSet
(EUSART_TypeDef *eusart,
EUSART_TristateTx_TypeDef
enable)
|
void | EUSART_UartInitHf (EUSART_TypeDef *eusart, const EUSART_UartInit_TypeDef *init) |
void | EUSART_UartInitLf (EUSART_TypeDef *eusart, const EUSART_UartInit_TypeDef *init) |
Function Documentation
uint32_t EUSART_BaudrateGet | ( | EUSART_TypeDef * |
eusart
|
) |
Gets the current baudrate.
Definition at line
418
of file
em_eusart.c
.
References CMU_ClockFreqGet() .
void EUSART_BaudrateSet | ( | EUSART_TypeDef * |
eusart,
|
uint32_t |
refFreq,
|
||
uint32_t |
baudrate
|
||
) |
Configures the baudrate (or as close as possible to a specified baudrate).
- Note
- (1) When the oversampling is disabled, the peripheral clock frequency must be at least three times higher than the chosen baud rate.
Definition at line
309
of file
em_eusart.c
.
References
CMU_ClockFreqGet()
,
eusartOVS0
,
eusartOVS16
,
eusartOVS4
,
eusartOVS6
, and
eusartOVS8
.
void EUSART_Enable | ( | EUSART_TypeDef * |
eusart,
|
EUSART_Enable_TypeDef
|
enable
|
||
) |
Enables/disables the EUSART receiver and/or transmitter.
Definition at line
224
of file
em_eusart.c
.
References
eusartDisable
.
void EUSART_IrDAInit | ( | EUSART_TypeDef * |
eusart,
|
const EUSART_IrDAInit_TypeDef * |
irdaInit
|
||
) |
Initializes the EUSART when used in IrDA mode with the high or low frequency clock.
Definition at line
155
of file
em_eusart.c
.
References
EUSART_UartInit_TypeDef::baudrate
,
EUSART_UartInit_TypeDef::enable
,
eusartDisable
,
eusartEnableRx
,
eusartOVS0
,
eusartStopbits1
,
eusartStopbits2
,
EUSART_IrDAInit_TypeDef::init
,
EUSART_IrDAInit_TypeDef::irDALowFrequencyEnable
,
EUSART_UartInit_TypeDef::oversampling
, and
EUSART_UartInit_TypeDef::stopbits
.
void EUSART_PrsTriggerEnable | ( | EUSART_TypeDef * |
eusart,
|
const EUSART_PrsTriggerInit_TypeDef * |
init
|
||
) |
Initializes the automatic enabling of transmissions and/or reception using the PRS as a trigger.
Definition at line
495
of file
em_eusart.c
.
References EUSART_PrsTriggerInit_TypeDef::prs_trigger_channel , and EUSART_PrsTriggerInit_TypeDef::prs_trigger_enable .
void EUSART_Reset | ( | EUSART_TypeDef * |
eusart
|
) |
Configure the EUSART to its reset state.
Definition at line
186
of file
em_eusart.c
.
Referenced by UARTDRV_DeInit() .
uint8_t EUSART_Rx | ( | EUSART_TypeDef * |
eusart
|
) |
Receives one 8 bit frame, (or part of 9 bit frame).
Definition at line
261
of file
em_eusart.c
.
void EUSART_RxBlock | ( | EUSART_TypeDef * |
eusart,
|
EUSART_BlockRx_TypeDef
|
enable
|
||
) |
Enable/Disable reception operations until the configured start frame is received.
Definition at line
443
of file
em_eusart.c
.
uint16_t EUSART_RxExt | ( | EUSART_TypeDef * |
eusart
|
) |
Receives one 8-9 bit frame with extended information.
Definition at line
271
of file
em_eusart.c
.
void EUSART_Tx | ( | EUSART_TypeDef * |
eusart,
|
uint8_t |
data
|
||
) |
Transmits one frame.
Definition at line
282
of file
em_eusart.c
.
Referenced by UARTDRV_ForceTransmit() .
void EUSART_TxExt | ( | EUSART_TypeDef * |
eusart,
|
uint16_t |
data
|
||
) |
Transmits one 8-9 bit frame with extended control.
Definition at line
294
of file
em_eusart.c
.
void EUSART_TxTristateSet | ( | EUSART_TypeDef * |
eusart,
|
EUSART_TristateTx_TypeDef
|
enable
|
||
) |
Enables/Disables the tristating of the transmitter output.
Definition at line
468
of file
em_eusart.c
.
void EUSART_UartInitHf | ( | EUSART_TypeDef * |
eusart,
|
const EUSART_UartInit_TypeDef * |
init
|
||
) |
Initializes the EUSART when used with the high frequency clock.
Definition at line
99
of file
em_eusart.c
.
References
eusartOVS0
, and
EUSART_UartInit_TypeDef::oversampling
.
Referenced by UARTDRV_InitEuart() .
void EUSART_UartInitLf | ( | EUSART_TypeDef * |
eusart,
|
const EUSART_UartInit_TypeDef * |
init
|
||
) |
Initializes the EUSART when used with the low frequency clock.
- Note
- (1) When EUSART oversampling is set to eusartOVS0 (Disable), the peripheral clock frequency must be at least three times higher than the chosen baud rate. In LF, max input clock is 32768 (LFXO or LFRCO), thus 32768 / 3 ~ 9600 baudrate.
Definition at line
122
of file
em_eusart.c
.
References
EUSART_UartInit_TypeDef::baudrate
,
CMU_ClockSelectGet()
,
cmuSelect_LFRCO
,
cmuSelect_LFXO
,
cmuSelect_ULFRCO
,
eusartOVS0
,
eusartStopbits1
,
eusartStopbits2
,
EUSART_UartInit_TypeDef::majorityVote
,
EUSART_UartInit_TypeDef::oversampling
, and
EUSART_UartInit_TypeDef::stopbits
.
Referenced by UARTDRV_InitEuart() .