📄 main.h
字号:
#ifndef _MAIN_HEAD
#define _MAIN_HEAD
#include "sm5964.h"
//配置信息
#define CRYTAL221184MHZ
//#define CRYTAL147456MHZ
//#define CRYTAL110592MHZ
#define ER690
//#define ER691
//#define ENABLE_ISP
#define MY_DEBUG
sbit PIN_TXEN=P1^5; //RS485控制线
sbit PIN_ENISP=P4^1;
#ifndef ID_OK
#define ID_OK 0
#define ID_ERR 1
#endif
//------------------------------------watchdog
#ifdef ER691
sbit PIN_WATCHDOG=P4^3;
sbit PIN_WATCHDOG1=P1^3;
#endif
#ifdef ER690
sbit PIN_WATCHDOG=P1^3;
sbit PIN_WATCHDOG1=P4^3;
#endif
//-------------------------------------rs485
#ifdef ER691
#define RS485_COMM_ENABLE 0
#define RS485_COMM_DISENABLE 1
#endif
#ifdef ER690
#define RS485_COMM_ENABLE 1
#define RS485_COMM_DISENABLE 0
#endif
#define WORKMODE_PAGE 0x11
#define MACHINENO_OFFSET 0x06
#define RS82C55 XBYTE[0x0803]
#define PA82C55 XBYTE[0x0800]
#define PB82C55 XBYTE[0x0801]
#define PC82C55 XBYTE[0x0802]
#define FLASH_CS 0x4000
#ifndef WatchDog
#define WatchDog() // {PIN_WATCHDOG= ~PIN_WATCHDOG;PIN_WATCHDOG1=~PIN_WATCHDOG1;}
#endif
extern void jmpmain(unsigned int addr);
// extern void WatchDog();
extern void InitParameter();
extern unsigned char g_MachineNo;//机器编号
extern unsigned char MyIspFlag;//是否唤醒下载
extern unsigned char NumCounter;//开始0x55计数器
extern unsigned int i;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -