📄 rs232.h
字号:
//rs232.h
#include <iolpc2148.h>
// 获得实际处理器时钟频率
extern unsigned int GetCclk(void);
//获得外围功能时钟频率
extern unsigned int GetPclk(void);
/**** UART0 ****/
//初始化 UART0
void UART0Initialize(unsigned int baud);
// 向 UART0 (RS232) 写入一个字符
void UART0WriteChar(unsigned char ch0);
//read char from RS232
unsigned char UART0ReadChar(void);
//this function read/write char from RS232,
//but they not wait to read/write
unsigned char UART0ReadChar_nostop(void);
void UART0WriteChar_nostop(unsigned char ch0);
/**** UART1 ****/
//initialize UART0 interface
void UART1Initialize(unsigned int baud);
//write char to UART0 (RS232);
void UART1WriteChar(unsigned char ch0);
//read char from RS232
unsigned char UART0ReadChar(void);
//this function read/write char from RS232,
//but they not wait to read/write
unsigned char UART1ReadChar_nostop(void);
void UART1WriteChar_nostop(unsigned char ch0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -