📄 serial_lpc23xx_v1_00.h
字号:
//Using : Use for interfacing with UART of LPC23xx
//Description : please predefine device index of interface,
// for example #define CONSOLE 0 --> using serial port 0 as console
#ifndef _SERIAL_LPC23XX_H_
#define _SERIAL_LPC23XX_H_
#define MAX_SERIAL 4
#define SER_FIFO_SIZE 16
#define U_RBR 0x00
#define U_THR 0x00
#define U_DLL 0x00
#define U_DLM 0x04
#define U_IER 0x04
#define U_IIR 0x08
#define U_FCR 0x08
#define U_LCR 0x0C
#define U_LSR 0x14
#define U_SCR 0x1C
#define U_ACR 0x20
#define U_ICR 0x24
#define U_FDR 0x28
#define U_TER 0x30
#define SER_RXD_RDY 0x01
#define SER_OVR_ERR 0x02
#define SER_PAR_ERR 0x04
#define SER_FRM_ERR 0x08
#define SER_TXD_EMP 0x40
void SerialInit(unsigned char dev,unsigned char dll,unsigned char fdr); //initial UART
unsigned char SerialIsRxError(unsigned char dev);
unsigned char SerialIsRxReady(unsigned char dev);
char SerialGetRx(unsigned char dev);
unsigned char SerialIsTxEmpty(unsigned char dev);
void SerialSendTx(unsigned char dev,char c);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -