📄 _common.h
字号:
#define HWVERSION 0x1 //HARDWARE VERSION
#define SWVERSION 0x1 //software VERSION
//#define OSC_FREQ 11059200L
#define SYSCLK 357900000 // approximate SYSCLK frequency in Hz
#define FALSE 0
#define TRUE 1
#define OK 0
#define NOK 1
#define WTDOGOver 0x8000
#define uint unsigned int
#define uchar unsigned char
#define ulong unsigned long
#define KeyB_0 0x10
#define KeyB_1 0x11
#define KeyB_2 0x12
#define KeyB_3 0x13
#define KeyB_4 0x14
#define KeyB_5 0x15
#define KeyB_6 0x16
#define KeyB_7 0x17
#define KeyB_8 0x18
#define KeyB_9 0x19
#define oKeyB_0 0x28
#define oKeyB_1 0x26
#define oKeyB_2 0x14
#define oKeyB_3 0x13
#define oKeyB_4 0x23
#define oKeyB_5 0x15
#define oKeyB_6 0x12
#define oKeyB_7 0x10
#define oKeyB_8 0x16
#define oKeyB_9 0x11
#define KeyB_Pwr 0x20
#define KeyB_LED 0x21
#define KeyB_Yes 0x22
#define KeyB_No 0x23
#define KeyB_Fn 0x24
#define KeyB_Bk 0x25
#define KeyB_Dot 0x26
#define KeyB_Up 0x27
#define KeyB_Down 0x28
#define KeyB_Ac 0x29
#define KeyB_left 0x2a //左
#define KeyB_right 0x2b //右
#define KeyB_F1 0x2c
#define KeyB_Jin 0x2d //#
#define oKeyB_Pwr 0x20 //f1
#define oKeyB_LED 0x21
#define oKeyB_Yes 0x27
#define oKeyB_No 0x22
#define oKeyB_Fn 0x17 //f2
#define oKeyB_Bk 0x18
#define oKeyB_Dot 0x29
#define oKeyB_Up 0x19
#define oKeyB_Down 0x24
#define oKeyB_Ac 0x33 //f2
#define oKeyB_left 0x33 //左
#define oKeyB_right 0x33 //右
#define oKeyB_F1 0x17 //F1
#define oKeyB_Jin 0x21 //#
#define KeyB_ 0x00
#define MN_MODE_ENTER 0x01
#define R232MEMMAX 0XFF //MAX COMMUNICATION MEMORY1
#define R232MEMMAX0 0X40 //MAX COMMUNICATION MEMORY0
#define CC_TEST 0X01 //FOR TESTTING/
#define CC_send 0X99
#define CC_ESC 0X25
#define CC_SETALARM 0X26
#define CC_NOW 0XFC //NOW BUSY communication
#define CC_NO 0XFE //NO EMPTY communication
#define CC_ERROR 0XFF //ERROR ON communication
#define MI_CRC_ZERO 0
#define MI_CRC_NOTZERO 1
//***********communication Protocol ******
#define CC_ADDRLENG 0X03 //THE ADDRESS OF LENG IN COMM PROTOCOL
#define CC_ADDRINF 0X04 //THE ADDRESS OF LENG IN COMM PROTOCOL
#define CC_DISP1 0x78
#define CC_DISP2 0x01
#define CC_PLB 7 //protocol Length byte
#define CC_PHPB 0x00 //protocol head postion byte,at 0x0/0x1
#define CC_PSPB 0x02 //protocol security postion byte,at 0x2/0x3
//#define CC_PSPB 0x02 //protocol Length postion byte
#define CC_PLPB 0x03 //protocol Length postion byte,at 0x4/0x5
#define CC_PFPB 0x05 //protocol funtion postion bytes,at 0x6/0x7/0x8/0x9
#define CC_PCTB 0x0A //protocol CardType bytes,at 0xa
#define CC_PFDB 0x0B //protocol first Data bytes,at 0xa
#define _CRC_INIT 0x0000
#define CC_JCKTYPE 0X20 //
#define CC_M500PiccHalt 0x30
#define CC_M500PiccRequest 0x31
#define CC_M500PiccAnticoll 0x32
#define CC_M500PiccSelect 0x33
#define CC_M500PiccAuthE2 0x34
#define CC_M500PiccLoadKeyE2 0x35
#define CC_M500PiccAuthKey 0x36
#define CC_M500PiccRead 0x37
#define CC_M500PiccWrite 0x38
#define CC_M500PiccValue 0x39
#define CC_M500PiccEasyRead 0x3e
#define CC_M500PiccEasyWrite 0x3f
#define CC_ERROR 0XFF //ERROR ON communication
#define CC_ADDRLENG 0X03 //THE ADDRESS OF LENG IN COMM PROTOCOL
#define CC_ADDRINF 0X04 //THE ADDRESS OF LENG IN COMM PROTOCOL
#define CC_TONGXUN 0X99 //检测通讯是否成功
#define CC_TONGXUNOK 0X98 //通讯成功
#define CC_SCOK 0X97 //上传完成
#define CRC32 0x01
#define CRC16 0x02
#define CRC8 0x04
#define FALSE 0
#define TRUE 1
#define VERSIONHARDWARE {0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00}
#define VERSIONSOFTWARE {0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -