📄 rfic.h
字号:
#ifndef _RFIC_H_
#define _RFIC_H_
/****************************************/
//mifare define
#define ALL_CARD 1
#define IDLE_CARD 0
#define KEYA 0x00
#define KEYB 0x04
#define DECREMENT 0xc0
#define INCREMENT 0xc1
#define RESTORE 0xc2
//mifare error
#define MI_OK 0
#define MI_NOTAGERR 1
#define MI_CRCERR 2
#define MI_EMPTY 3
#define MI_AUTHERR 4
#define MI_PARITYERR 5
#define MI_CODEERR 6
#define MI_SERNRERR 8
#define MI_NOTAUTHERR 10
#define MI_BITCOUNTERR 11
#define MI_BYTECOUNTERR 12
#define MI_TRANSERR 14
#define MI_WRITEERR 15
#define MI_INCRERR 16
#define MI_DECRERR 17
#define MI_READERR 18
#define MI_QUIT 30
//check write Error
#define MIS_CHK_OK 0
#define MIS_CHK_FAILED 1
#define MIS_CHK_COMPERR 2
//rf Error
#define RF_OK 0
#define RF_ERR 255
//define rf_buffer
#define SEQNR 0
#define COMMAND 1
#define STATUS 1
#define LENGTH 2
#define MODE 3
#define BCNT 3
#define ADR 3
#define SERNR 3
#define SIZE 3
#define TIME 3
#define TAGTYPE 3
#define INFO 3
#define DATA 3
#define SECNR 4
#define DATABYTES 4
#define VALUE 4
#define NKEY 5
#define AUTHMODE 7
#define ADRCHKWR 8
#define DATACHKWR 9
/****************************************
//Timer 1
#define OSC_FREQ 22118400L //MCU晶振频率
#define EVLT_50MS 65536L-OSC_FREQ/240L //50ms的初值???
#define H_50MS EVLT_50MS>>8
#define L_50MS EVLT_50MS
/****************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -