82 #include "uart_defines.h"
143 #if ((UART1_STD_EN == 1u) || (UART2_STD_EN == 1u))
159 sint32 stdin_getchar(
void);
160 void ttywrch(
int ch);
#define UART2
Definition: tle985x.h:6284
#define UART1
Definition: tle985x.h:6283
#define SCU
Definition: tle985x.h:6277
#define SCU_MODIEN2_RIEN1_Msk
Definition: tle985x.h:10142
#define UART2_SCON_RI_Msk
Definition: tle985x.h:10919
#define UART1_SCON_REN_Msk
Definition: tle985x.h:10878
#define SCU_BG2_BG2_BR_VALUE_Pos
Definition: tle985x.h:9847
#define UART1_SBUF_VAL_Msk
Definition: tle985x.h:10869
#define SCU_MODIEN2_TIEN2_Pos
Definition: tle985x.h:10133
#define SCU_MODIEN2_EXINT2_EN_Pos
Definition: tle985x.h:10137
#define SCU_MODIEN2_RIEN2_Pos
Definition: tle985x.h:10135
#define UART2_SBUF_VAL_Pos
Definition: tle985x.h:10901
#define UART2_SCON_TI_Pos
Definition: tle985x.h:10916
#define SCU_BGL2_BG2_FD_SEL_Msk
Definition: tle985x.h:9854
#define UART1_SCON_REN_Pos
Definition: tle985x.h:10877
#define SCU_BG1_BG1_BR_VALUE_Msk
Definition: tle985x.h:9843
#define UART2_SCONCLR_TICLR_Msk
Definition: tle985x.h:10924
#define UART2_SBUF_VAL_Msk
Definition: tle985x.h:10902
#define UART2_SCON_REN_Pos
Definition: tle985x.h:10910
#define UART2_SCON_RI_Pos
Definition: tle985x.h:10918
#define SCU_BCON1_BR1_R_Pos
Definition: tle985x.h:9832
#define SCU_MODIEN2_TIEN2_Msk
Definition: tle985x.h:10134
#define SCU_BGL1_BG1_FD_SEL_Msk
Definition: tle985x.h:9851
#define UART2_SCONCLR_TICLR_Pos
Definition: tle985x.h:10923
#define SCU_BGL1_BG1_FD_SEL_Pos
Definition: tle985x.h:9850
#define UART1_SCON_RI_Pos
Definition: tle985x.h:10885
#define SCU_BCON2_BR2_R_Pos
Definition: tle985x.h:9837
#define SCU_MODIEN2_RIEN1_Pos
Definition: tle985x.h:10141
#define SCU_MODIEN2_RIEN2_Msk
Definition: tle985x.h:10136
#define UART2_SCONCLR_RICLR_Msk
Definition: tle985x.h:10926
#define UART1_SBUF_VAL_Pos
Definition: tle985x.h:10868
#define UART1_SCONCLR_TICLR_Pos
Definition: tle985x.h:10890
#define UART1_SCON_TI_Msk
Definition: tle985x.h:10884
#define SCU_MODIEN2_TIEN1_Pos
Definition: tle985x.h:10139
#define UART1_SCON_RI_Msk
Definition: tle985x.h:10886
#define UART1_SCONCLR_RICLR_Pos
Definition: tle985x.h:10892
#define UART1_SCONCLR_TICLR_Msk
Definition: tle985x.h:10891
#define UART1_SCON_TI_Pos
Definition: tle985x.h:10883
#define SCU_BG2_BG2_BR_VALUE_Msk
Definition: tle985x.h:9848
#define SCU_BG1_BG1_BR_VALUE_Pos
Definition: tle985x.h:9842
#define SCU_BCON1_BR1_R_Msk
Definition: tle985x.h:9833
#define UART1_SCONCLR_RICLR_Msk
Definition: tle985x.h:10893
#define UART2_SCON_REN_Msk
Definition: tle985x.h:10911
#define SCU_MODIEN2_TIEN1_Msk
Definition: tle985x.h:10140
#define UART2_SCONCLR_RICLR_Pos
Definition: tle985x.h:10925
#define SCU_BGL2_BG2_FD_SEL_Pos
Definition: tle985x.h:9853
#define SCU_MODIEN2_EXINT2_EN_Msk
Definition: tle985x.h:10138
#define UART2_SCON_TI_Msk
Definition: tle985x.h:10917
#define SCU_BCON2_BR2_R_Msk
Definition: tle985x.h:9838
SFR low level access library.
INLINE uint8 u1_Field_Rd32(const volatile uint32 *reg, uint8 pos, uint32 msk)
This function reads a 1-bit field of a 32-bit register.
Definition: sfr_access.h:423
INLINE void Field_Wrt32(volatile uint32 *reg, uint8 pos, uint32 msk, uint32 val)
This function writes a bit field in a 32-bit register.
Definition: sfr_access.h:358
INLINE uint8 u8_Field_Rd32(const volatile uint32 *reg, uint8 pos, uint32 msk)
This function reads a 8-bit field of a 32-bit register.
Definition: sfr_access.h:438
INLINE void Field_Mod32(volatile uint32 *reg, uint8 pos, uint32 msk, uint32 val)
This function writes a bit field in a 32-bit register.
Definition: sfr_access.h:378
This struct lists parameter (clock) of UART1/UART2.
Definition: uart.h:92
uint32 clock
Definition: uart.h:93
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:145
uint8_t uint8
8 bit unsigned value
Definition: types.h:153
int32_t sint32
32 bit signed value
Definition: types.h:160
uint16_t uint16
16 bit unsigned value
Definition: types.h:154
uint32_t uint32
32 bit unsigned value
Definition: types.h:155
INLINE uint8 UART2_TX_Sts(void)
Reads the transmit interrupt flag for UART2.
Definition: uart.h:1162
void UART2_BaudRate_Set(uint32 baudrate)
Sets the baudrate for UART2.
INLINE void UART2_EXINT2_Int_Dis(void)
Disables EXINT2 interrupt for UART2.
Definition: uart.h:1306
INLINE void UART1_Send_Byte(uint8 c)
Clears the UART1 Transmit interrupt and sends a Byte via UART1.
Definition: uart.h:1193
INLINE void UART1_Receiver_Dis(void)
Disables Receiver of Serial Port (UART1).
Definition: uart.h:1102
INLINE void UART2_Buffer_Set(uint8 c)
Sends a Byte via UART2.
Definition: uart.h:1210
INLINE void UART2_TX_Int_Dis(void)
Disables transmit interrupt for UART2.
Definition: uart.h:1296
INLINE void UART1_Receiver_En(void)
Enables Receiver of Serial Port (UART1).
Definition: uart.h:1097
INLINE void UART2_RX_Int_Clr(void)
Clears receive interrupt flag for UART2.
Definition: uart.h:1251
INLINE void UART1_TX_Int_Dis(void)
Disables transmit interrupt for UART1.
Definition: uart.h:1276
INLINE uint8 UART1_RX_Sts(void)
Reads the receive interrupt flag for UART1.
Definition: uart.h:1117
INLINE void UART2_BaudRateGen_En(void)
Enables Baud-rate generator (UART2).
Definition: uart.h:1221
INLINE void UART1_TX_Int_Clr(void)
Clears transmit interrupt flag for UART1.
Definition: uart.h:1246
INLINE void UART1_RX_Int_En(void)
Enables receive interrupt for UART1.
Definition: uart.h:1261
INLINE void UART2_EXINT2_Int_En(void)
Enables EXINT2 interrupt for UART2.
Definition: uart.h:1301
INLINE bool UART1_isByteTransmitted(void)
Checks if UART1 is transmitting Byte or not.
Definition: uart.h:1137
INLINE uint8 UART1_Get_Byte(void)
Clears the UART1 receive interrupt and returns the UART1 buffer.
Definition: uart.h:1182
INLINE void UART1_Fractional_Divider_Value_Set(uint8 FD_val)
Writes the Fractional Divider register (UART1).
Definition: uart.h:1316
void UART1_Init(void)
Initializes the UART1 module.
INLINE uint8 UART1_Buffer_Get(void)
Reads UART1 Buffer.
Definition: uart.h:1177
INLINE bool UART1_isByteReceived(void)
Checks if UART1 is receiving Byte or not.
Definition: uart.h:1122
INLINE void UART2_Receiver_Dis(void)
Disables Receiver of Serial Port (UART2).
Definition: uart.h:1112
INLINE void UART1_BaudRateGen_Dis(void)
Disables Baud-rate generator (UART1).
Definition: uart.h:1236
INLINE void UART2_TX_Int_Clr(void)
Clears transmit interrupt flag for UART2.
Definition: uart.h:1256
INLINE void UART2_RX_Int_Dis(void)
Disables receive interrupt for UART2.
Definition: uart.h:1286
INLINE void UART2_Fractional_Divider_Value_Set(uint8 FD_val)
Writes the Fractional Divider register (UART2).
Definition: uart.h:1326
void UART1_BaudRate_Set(uint32 baudrate)
Sets the baudrate for UART1.
INLINE void UART2_BaudRateGen_Dis(void)
Disables Baud-rate generator (UART2).
Definition: uart.h:1226
INLINE void UART2_Send_Byte(uint8 c)
Clears the UART2 Transmit interrupt and sends a Byte via UART2.
Definition: uart.h:1215
INLINE uint8 UART1_TX_Sts(void)
Reads the transmit interrupt flag for UART1.
Definition: uart.h:1132
INLINE void UART2_RX_Int_En(void)
Enables receive interrupt for UART2.
Definition: uart.h:1281
INLINE uint8 UART2_Get_Byte(void)
Clears the UART2 receive interrupt and returns the UART2 buffer.
Definition: uart.h:1204
INLINE void UART2_TX_Int_En(void)
Enables transmit interrupt for UART2.
Definition: uart.h:1291
INLINE void UART1_BaudRateGen_En(void)
Enables Baud-rate generator (UART1).
Definition: uart.h:1231
INLINE uint8 UART2_RX_Sts(void)
Reads the receive interrupt flag for UART2.
Definition: uart.h:1147
INLINE void UART1_BaudRate_Value_Set(uint16 br_val)
Writes the baudrate timer register (UART1).
Definition: uart.h:1311
INLINE void UART1_RX_Int_Clr(void)
Clears receive interrupt flag for UART1.
Definition: uart.h:1241
INLINE void UART2_Receiver_En(void)
Enables Receiver of Serial Port (UART2).
Definition: uart.h:1107
INLINE void UART1_RX_Int_Dis(void)
Disables receive interrupt for UART1.
Definition: uart.h:1266
INLINE void UART1_Buffer_Set(uint8 c)
Sends a Byte via UART1.
Definition: uart.h:1188
void UART2_Init(void)
Initializes the UART2 module.
INLINE void UART2_BaudRate_Value_Set(uint16 br_val)
Writes the baudrate timer register (UART2).
Definition: uart.h:1321
INLINE uint8 UART2_Buffer_Get(void)
Reads UART2 Buffer.
Definition: uart.h:1199
INLINE void UART1_TX_Int_En(void)
Enables transmit interrupt for UART1.
Definition: uart.h:1271
INLINE bool UART2_isByteReceived(void)
Checks if UART2 is receiving Byte or not.
Definition: uart.h:1152
INLINE bool UART2_isByteTransmitted(void)
Checks if UART2 is transmitting Byte or not.
Definition: uart.h:1167