📄 serial.h
字号:
#ifndef SERIAL_H
#define SERIAL_H
#define ERR_BAUDRATE -1
#define ERR_DATABIT -2
#define ERR_STOPBIT -3
#define ERR_PARITY -4
#define ERR_FLOWCTL -5
#define ERR_FLOWCONTROL -6
#define ERR_SETTING -8
#define ERR_GETOPT -10
#define ERR_SETOPT -11
int _comm_open(const char* devname, struct termios* psaveoptions, int baud, int databits, int stopbits, char parity, char flowControl);
int comm_open(const char* devname, struct termios* psaveoptions, const char* settings);
int comm_close(int fd, struct termios* saveoptions);
int comm_write(int fd,char *buf,int len);
int comm_read(int fd,char *buf,int len,int time);
void delay(int ms);
int gettickcount();
#endif //SERIAL_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -