![]() |
TLE986x 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 | |
INLINE void | UART1_BaudRate_Value_Set (uint16 br_val) |
Writes the baudrate timer register (UART1). More... | |
INLINE void | UART1_BaudRateGen_Dis (void) |
disables Baud-rate generator (UART1). More... | |
INLINE void | UART1_BaudRateGen_En (void) |
enables Baud-rate generator (UART1). More... | |
INLINE void | UART2_BaudRate_Value_Set (uint16 br_val) |
Writes the baudrate timer register (UART2). More... | |
INLINE void | UART2_BaudRateGen_Dis (void) |
disables Baud-rate generator (UART2). More... | |
INLINE void | UART2_BaudRateGen_En (void) |
enables Baud-rate generator (UART2). More... | |
INLINE void | UART1_Buffer_Set (uint8 data) |
Sends a Byte via UART1. More... | |
INLINE void | UART2_Buffer_Set (uint8 data) |
Sends a Byte via UART2. More... | |
INLINE uint8 | UART1_Buffer_Get (void) |
Reads UART1 Buffer. More... | |
INLINE uint8 | UART2_Buffer_Get (void) |
Reads UART2 Buffer. More... | |
INLINE uint8 | UART1_RX_Sts (void) |
reads the receive interrupt flag of UART1. More... | |
INLINE uint8 | UART1_TX_Sts (void) |
reads the transmit interrupt flag of UART1. More... | |
INLINE uint8 | UART2_RX_Sts (void) |
reads the receive interrupt flag of UART2. More... | |
INLINE uint8 | UART2_TX_Sts (void) |
reads the transmit interrupt flag of 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 | 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 | UART1_RX_Int_Clr (void) |
clears receive interrupt flag for UART1. More... | |
INLINE void | UART1_TX_Int_Clr (void) |
clears transmit interrupt flag of UART1. More... | |
INLINE void | UART2_RX_Int_Clr (void) |
clears receive interrupt flag of UART2. More... | |
INLINE void | UART2_TX_Int_Clr (void) |
clears transmit interrupt flag of UART2. More... | |
INLINE void | UART1_RX_Int_En (void) |
enables receive interrupt of UART1. More... | |
INLINE void | UART1_RX_Int_Dis (void) |
disables receive interrupt of UART1. More... | |
INLINE void | UART1_TX_Int_En (void) |
enables transmit interrupt of UART1. More... | |
INLINE void | UART1_TX_Int_Dis (void) |
disables transmit interrupt of UART1. More... | |
INLINE void | UART2_RX_Int_En (void) |
enables receive interrupt of UART2. More... | |
INLINE void | UART2_RX_Int_Dis (void) |
disables receive interrupt of UART2. More... | |
INLINE void | UART2_TX_Int_En (void) |
enables transmit interrupt of UART2. More... | |
INLINE void | UART2_TX_Int_Dis (void) |
disables transmit interrupt of UART2. More... | |
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 of UART1. More... | |
void | UART2_BaudRate_Set (uint32 baudrate) |
Sets the baudrate of UART2. More... | |
INLINE void | UART1_Send_Byte (uint8 c) |
clears the UART1 Transmit interrupt and sends a Byte via UART1. More... | |
INLINE uint8 | UART1_Get_Byte (void) |
Clears the UART1 receive interrupt and returns the UART1 buffer. More... | |
INLINE bool | UART1_isByteReceived (void) |
checks if UART1 has received Byte or not. More... | |
INLINE bool | UART1_isByteTransmitted (void) |
checks if UART1 has transmitted a Byte or not. More... | |
INLINE void | UART2_Send_Byte (uint8 c) |
clears the UART2 Transmit interrupt and sends a Byte via UART2. More... | |
INLINE uint8 | UART2_Get_Byte (void) |
Clears the UART2 receive interrupt and returns the UART2 buffer. More... | |
INLINE bool | UART2_isByteReceived (void) |
checks if UART2 has received Byte or not. More... | |
INLINE bool | UART2_isByteTransmitted (void) |
checks if UART2 has transmitted a Byte or not. More... | |
void UART1_BaudRate_Set | ( | uint32 | baudrate | ) |
Sets the baudrate of 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 (baud-rate 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 (baud-rate 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.
data | Byte to send |
Example
This example sends "A" via UART1.
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 has received Byte or not.
TRUE | a byte was received |
FALSE | no byte was received |
Example
This example receives a Byte via UART1.
checks if UART1 has transmitted a 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 of UART1.
Example
This example treats the receive interrupt for UART1.
INLINE void UART1_RX_Int_En | ( | void | ) |
enables receive interrupt of UART1.
Example
This example treats the receive interrupt for UART1.
reads the receive interrupt flag of 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 of UART1.
Example
This example sends "A" via UART1.
INLINE void UART1_TX_Int_Dis | ( | void | ) |
disables transmit interrupt of UART1.
Example
This example treats the transmit interrupt for UART1.
INLINE void UART1_TX_Int_En | ( | void | ) |
enables transmit interrupt of UART1.
Example
This example treats the transmit interrupt for UART1.
reads the transmit interrupt flag of UART1.
Example
This example receives a Byte via UART1.
void UART2_BaudRate_Set | ( | uint32 | baudrate | ) |
Sets the baudrate of 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 UART2 BAUDRATE to 19200.
Writes the baudrate timer register (UART2).
Example
This example receives a Byte via UART1 (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 (baud-rate is equal to 19200 when frequency is equal to 40MHz).
INLINE void UART2_BaudRateGen_En | ( | void | ) |
enables Baud-rate generator (UART2).
Example
This example receives a Byte via UART2 (baud-rate is equal to 19200 when frequency is equal to 40MHz).
Reads UART2 Buffer.
Example
This example receives a Byte via UART2.
Sends a Byte via UART2.
data | Byte to send |
Example
This example sends "A" via UART2.
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 has received Byte or not.
TRUE | a byte was received |
FALSE | no byte was receive |
Example
This example receives a Byte via UART2.
checks if UART2 has transmitted a 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 of UART2.
Example
This example receives a Byte via UART2.
INLINE void UART2_RX_Int_Dis | ( | void | ) |
disables receive interrupt of UART2.
Example
This example treats the receive interrupt for UART2.
INLINE void UART2_RX_Int_En | ( | void | ) |
enables receive interrupt of UART2.
Example
This example treats the receive interrupt for UART2.
reads the receive interrupt flag of 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 of UART2.
Example
This example sends "A" via UART2.
INLINE void UART2_TX_Int_Dis | ( | void | ) |
disables transmit interrupt of UART2.
Example
This example treats the transmit interrupt for UART2.
INLINE void UART2_TX_Int_En | ( | void | ) |
enables transmit interrupt of UART2.
Example
This example treats the transmit interrupt for UART2.
reads the transmit interrupt flag of UART2.
Example
This example sends "A" via UART2.