![]() |
Infineon MOTIX™ MCU TLE985x Device Family SDK
|
Go to the source code of this file.
UART low level access library.
Data Structures | |
struct | TUart |
This struct lists parameter (clock) of UART1/UART2. More... | |
Functions | |
void | UART1_Init (void) |
Initializes the UART1 module. More... | |
void | UART2_Init (void) |
Initializes the UART2 module. More... | |
void | UART1_BaudRate_Set (uint32 baudrate) |
Sets the baudrate for UART1. More... | |
void | UART2_BaudRate_Set (uint32 baudrate) |
Sets the baudrate for UART2. More... | |
INLINE uint8 | UART1_RX_Sts (void) |
Reads the receive interrupt flag for UART1. More... | |
INLINE uint8 | UART1_TX_Sts (void) |
Reads the transmit interrupt flag for UART1. More... | |
INLINE uint8 | UART2_RX_Sts (void) |
Reads the receive interrupt flag for UART2. More... | |
INLINE uint8 | UART2_TX_Sts (void) |
Reads the transmit interrupt flag for UART2. More... | |
INLINE void | UART1_Receiver_En (void) |
Enables Receiver of Serial Port (UART1). More... | |
INLINE void | UART1_Receiver_Dis (void) |
Disables Receiver of Serial Port (UART1). More... | |
INLINE void | UART1_BaudRateGen_En (void) |
Enables Baud-rate generator (UART1). More... | |
INLINE void | UART1_BaudRateGen_Dis (void) |
Disables Baud-rate generator (UART1). More... | |
INLINE void | UART2_Receiver_En (void) |
Enables Receiver of Serial Port (UART2). More... | |
INLINE void | UART2_Receiver_Dis (void) |
Disables Receiver of Serial Port (UART2). More... | |
INLINE void | UART2_BaudRateGen_En (void) |
Enables Baud-rate generator (UART2). More... | |
INLINE void | UART2_BaudRateGen_Dis (void) |
Disables Baud-rate generator (UART2). More... | |
INLINE void | UART1_RX_Int_Clr (void) |
Clears receive interrupt flag for UART1. More... | |
INLINE void | UART1_TX_Int_Clr (void) |
Clears transmit interrupt flag for UART1. More... | |
INLINE void | UART2_RX_Int_Clr (void) |
Clears receive interrupt flag for UART2. More... | |
INLINE void | UART2_TX_Int_Clr (void) |
Clears transmit interrupt flag for UART2. More... | |
INLINE void | UART1_RX_Int_En (void) |
Enables receive interrupt for UART1. More... | |
INLINE void | UART1_RX_Int_Dis (void) |
Disables receive interrupt for UART1. More... | |
INLINE void | UART1_TX_Int_En (void) |
Enables transmit interrupt for UART1. More... | |
INLINE void | UART1_TX_Int_Dis (void) |
Disables transmit interrupt for UART1. More... | |
INLINE void | UART2_RX_Int_En (void) |
Enables receive interrupt for UART2. More... | |
INLINE void | UART2_RX_Int_Dis (void) |
Disables receive interrupt for UART2. More... | |
INLINE void | UART2_TX_Int_En (void) |
Enables transmit interrupt for UART2. More... | |
INLINE void | UART2_TX_Int_Dis (void) |
Disables transmit interrupt for UART2. More... | |
INLINE void | UART2_EXINT2_Int_En (void) |
Enables EXINT2 interrupt for UART2. More... | |
INLINE void | UART2_EXINT2_Int_Dis (void) |
Disables EXINT2 interrupt for UART2. More... | |
INLINE void | UART1_Send_Byte (uint8 c) |
Clears the UART1 Transmit interrupt and sends a Byte via UART1. More... | |
INLINE void | UART1_Buffer_Set (uint8 c) |
Sends a Byte via UART1. More... | |
INLINE uint8 | UART1_Get_Byte (void) |
Clears the UART1 receive interrupt and returns the UART1 buffer. More... | |
INLINE uint8 | UART1_Buffer_Get (void) |
Reads UART1 Buffer. More... | |
INLINE bool | UART1_isByteReceived (void) |
Checks if UART1 is receiving Byte or not. More... | |
INLINE bool | UART1_isByteTransmitted (void) |
Checks if UART1 is transmitting Byte or not. More... | |
INLINE void | UART2_Send_Byte (uint8 c) |
Clears the UART2 Transmit interrupt and sends a Byte via UART2. More... | |
INLINE void | UART2_Buffer_Set (uint8 c) |
Sends a Byte via UART2. More... | |
INLINE uint8 | UART2_Get_Byte (void) |
Clears the UART2 receive interrupt and returns the UART2 buffer. More... | |
INLINE uint8 | UART2_Buffer_Get (void) |
Reads UART2 Buffer. More... | |
INLINE bool | UART2_isByteReceived (void) |
Checks if UART2 is receiving Byte or not. More... | |
INLINE bool | UART2_isByteTransmitted (void) |
Checks if UART2 is transmitting Byte or not. More... | |
INLINE void | UART1_BaudRate_Value_Set (uint16 br_val) |
Writes the baudrate timer register (UART1). More... | |
INLINE void | UART1_Fractional_Divider_Value_Set (uint8 FD_val) |
Writes the Fractional Divider register (UART1). More... | |
INLINE void | UART2_BaudRate_Value_Set (uint16 br_val) |
Writes the baudrate timer register (UART2). More... | |
INLINE void | UART2_Fractional_Divider_Value_Set (uint8 FD_val) |
Writes the Fractional Divider register (UART2). More... | |
void UART1_BaudRate_Set | ( | uint32 | baudrate | ) |
Sets the baudrate for UART1.
baudrate | baudrate, e.g. 19200, or 115200; range: 1221 to 5000000 (a value out of this range will not be applied) |
Example
This example sets UART1 BAUDRATE to 19200.
Writes the baudrate timer register (UART1).
Example
This example receives a Byte via UART1 (baud-rate is equal to 19200 when frequency is equal to 40MHz).
INLINE void UART1_BaudRateGen_Dis | ( | void | ) |
Disables Baud-rate generator (UART1).
Example
This example receives a Byte via UART1 (baudrate is equal to 19200 when frequency is equal to 40MHz).
INLINE void UART1_BaudRateGen_En | ( | void | ) |
Enables Baud-rate generator (UART1).
Example
This example receives a Byte via UART1 (baudrate is equal to 19200 when frequency is equal to 40MHz).
Reads UART1 Buffer.
Example
This example receives a Byte via UART1.
Sends a Byte via UART1.
c | Byte to send |
Example
This example sends "A" via UART1.
Writes the Fractional Divider register (UART1).
Example
This example receives a Byte via UART1 (baud-rate is equal to 19200 when frequency is equal to 40MHz).
Clears the UART1 receive interrupt and returns the UART1 buffer.
Example
This example receives a Byte via UART1.
void UART1_Init | ( | void | ) |
Initializes the UART1 module.
Checks if UART1 is receiving Byte or not.
TRUE | a byte was received |
FALSE | no byte was received |
Example
This example receives a Byte via UART1.
Checks if UART1 is transmitting Byte or not.
TRUE | a byte was transmitted |
FALSE | no byte was transmitted |
Example
This example sends "A" via UART1.
INLINE void UART1_Receiver_Dis | ( | void | ) |
Disables Receiver of Serial Port (UART1).
Example
This example receives a Byte via UART1.
INLINE void UART1_Receiver_En | ( | void | ) |
Enables Receiver of Serial Port (UART1).
Example
This example receives a Byte via UART1.
INLINE void UART1_RX_Int_Clr | ( | void | ) |
Clears receive interrupt flag for UART1.
Example
This example receives a Byte via UART1.
INLINE void UART1_RX_Int_Dis | ( | void | ) |
Disables receive interrupt for UART1.
Example
This example treats the receive interrupt for UART1.
INLINE void UART1_RX_Int_En | ( | void | ) |
Enables receive interrupt for UART1.
Example
This example treats the receive interrupt for UART1.
Reads the receive interrupt flag for UART1.
Example
This example receives a Byte via UART1.
Clears the UART1 Transmit interrupt and sends a Byte via UART1.
c | Byte to send |
Example
This example sends "A" via UART1.
INLINE void UART1_TX_Int_Clr | ( | void | ) |
Clears transmit interrupt flag for UART1.
Example
This example sends "A" via UART1.
INLINE void UART1_TX_Int_Dis | ( | void | ) |
Disables transmit interrupt for UART1.
Example
This example treats the transmit interrupt for UART1.
INLINE void UART1_TX_Int_En | ( | void | ) |
Enables transmit interrupt for UART1.
Example
This example treats the transmit interrupt for UART1.
Reads the transmit interrupt flag for UART1.
Example
This example sends "A" via UART1.
void UART2_BaudRate_Set | ( | uint32 | baudrate | ) |
Sets the baudrate for UART2.
baudrate | baudrate, e.g. 19200, or 115200; range: 1221 to 5000000 (a value out of this range will not be applied) |
Example
This example sets UART1 BAUDRATE to 115200.
Writes the baudrate timer register (UART2).
Example
This example receives a Byte via UART2 (baud-rate is equal to 19200 when frequency is equal to 40MHz).
INLINE void UART2_BaudRateGen_Dis | ( | void | ) |
Disables Baud-rate generator (UART2).
Example
This example receives a Byte via UART2 (baudrate is equal to 19200 when frequency is equeal to 40MHz).
INLINE void UART2_BaudRateGen_En | ( | void | ) |
Enables Baud-rate generator (UART2).
Example
This example receives a Byte via UART2 (baudrate is equal to 19200 when frequency is equeal to 40MHz).
Reads UART2 Buffer.
Example
This example receives a Byte via UART2.
Sends a Byte via UART2.
c | Byte to send |
Example
This example sends "A" via UART2.
INLINE void UART2_EXINT2_Int_Dis | ( | void | ) |
Disables EXINT2 interrupt for UART2.
Example
This example enables/disables EXINT2 falling interrupt for UART2.
INLINE void UART2_EXINT2_Int_En | ( | void | ) |
Enables EXINT2 interrupt for UART2.
Example
This example enables/disables EXINT2 falling interrupt for UART2.
Writes the Fractional Divider register (UART2).
Example
This example receives a Byte via UART2 (baud-rate is equal to 19200 when frequency is equal to 40MHz).
Clears the UART2 receive interrupt and returns the UART2 buffer.
Example
This example receives a Byte via UART2.
void UART2_Init | ( | void | ) |
Initializes the UART2 module.
Checks if UART2 is receiving Byte or not.
TRUE | a byte was received |
FALSE | no byte was receive |
Example
This example receives a Byte via UART2.
Checks if UART2 is transmitting Byte or not.
TRUE | a byte was transmitted |
FALSE | no byte was transmitted |
Example
This example sends "A" via UART2.
INLINE void UART2_Receiver_Dis | ( | void | ) |
Disables Receiver of Serial Port (UART2).
Example
This example receives a Byte via UART2.
INLINE void UART2_Receiver_En | ( | void | ) |
Enables Receiver of Serial Port (UART2).
Example
This example receives a Byte via UART2.
INLINE void UART2_RX_Int_Clr | ( | void | ) |
Clears receive interrupt flag for UART2.
Example
This example receives a Byte via UART2.
INLINE void UART2_RX_Int_Dis | ( | void | ) |
Disables receive interrupt for UART2.
Example
This example treats the receive interrupt for UART2.
INLINE void UART2_RX_Int_En | ( | void | ) |
Enables receive interrupt for UART2.
Example
This example treats the receive interrupt for UART2.
Reads the receive interrupt flag for UART2.
Example
This example receives a Byte via UART2.
Clears the UART2 Transmit interrupt and sends a Byte via UART2.
c | Byte to send |
Example
This example sends "A" via UART2.
INLINE void UART2_TX_Int_Clr | ( | void | ) |
Clears transmit interrupt flag for UART2.
Example
This example sends "A" via UART2.
INLINE void UART2_TX_Int_Dis | ( | void | ) |
Disables transmit interrupt for UART2.
Example
This example the transmit interrupt for UART2.
INLINE void UART2_TX_Int_En | ( | void | ) |
Enables transmit interrupt for UART2.
Example
This example the transmit interrupt for UART2.
Reads the transmit interrupt flag for UART2.
Example
This example sends "A" via UART2.