📄 m500a.h
字号:
///////////////////////////////////////////////////////////////////////////////
#ifndef M500A_H
#define M500A_H
#ifdef __cplusplus
extern "C"
{
#endif
// P I C C - C O M M A N D S
#define PICC_REQSTD 0x26 // request idle
#define PICC_REQALL 0x52 // request all
#define PICC_ANTICOLL1 0x93 // anticollision level 1
#define PICC_ANTICOLL2 0x95 // anticollision level 2
#define PICC_ANTICOLL3 0x97 // anticollision level 3
// Mifare Card Error Codes
#define MI_OK 0
#define MI_CHK_OK 0
#define MI_NOTAGERR (-1)
#define MI_CHK_FAILED (-1)
#define MI_CRCERR (-2)
#define MI_CHK_COMPERR (-2)
#define MI_EMPTY (-3)
#define MI_PARITYERR (-5)
#define MI_CODEERR (-6)
#define MI_SERNRERR (-8)
#define MI_BITCOUNTERR (-11)
#define MI_BYTECOUNTERR (-12)
#define MI_IDLE (-13)
#define MI_TRANSERR (-14)
#define MI_OVFLERR (-19)
#define MI_POLLING (-20)
#define MI_FRAMINGERR (-21)
#define MI_ACCESSERR (-22)
#define MI_UNKNOWN_COMMAND (-23)
#define MI_COLLERR (-24)
#define MI_ACCESSTIMEOUT (-27)
#define MI_NY_IMPLEMENTED (-100)
// _____________________________________________________________________________
void WriteIO(unsigned char Address, unsigned char value);
// _____________________________________________________________________________
unsigned char ReadIO(unsigned char Address);
// _____________________________________________________________________________
char SetBitMask(unsigned char reg,unsigned char mask);
// _____________________________________________________________________________
char ClearBitMask(unsigned char reg,unsigned char mask);
// _____________________________________________________________________________
void FlushFIFO(void);
// _____________________________________________________________________________
void RC500Config(void);
// _____________________________________________________________________________
char PcdReadE2(unsigned short startaddr,
unsigned char length,
unsigned char* _data);
//______________________________________________________________________________
char CardRequest (unsigned char req_code,
unsigned char *atq);
// _____________________________________________________________________________
char ReadCardNum (unsigned char bcnt,
unsigned char *snr);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -