📄 serial.h
字号:
#ifndef __SERIAL_H__
#define __SERIAL_H__
#define CMD_PING 90
#define CMD_CON_LIGHT 1
#define CMD_CON_AIRCON 2
#define CMD_ADJ_TIMER 3
#define CMD_QUERY_ROOM 11
#define CMD_QUERY_DATA 12
#define CMD_SETTIMER_LIGHT 21
#define CMD_SETTIMER_AIRCON 22
#define CMD_SETTIMER_POWER 23
#define CMD_ENABLE_MANUAL_CON 31
#define CMD_SET_MANUAL_CON_TIME 32
#define CMD_DISABLE_MANUAL_CON 33
#define DEVICE_ID 6
#define SYSCLK 11059200 //系统时钟
#define BAUD 9600 //波特率
extern unsigned char SerialCmd[20],SerialRet[10];
extern bit SerialReq;
bit ProcessCmd();
unsigned char CheckSum(unsigned char * c);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -