⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hy502.h

📁 RFID实现代码
💻 H
字号:

/*******************  www.ehuoyan.com *************************************/
/*-------------------------------------------------------------------------*/
#define   CMD_OK	   0
#define   CMD_ERR      1 

// Define the commands
#define   SOFTDOWN     0x11		  //HY502模块软掉电
#define   HALT_CARD    0x12		  //中止卡操作
#define   AUTOSEARCH   0x13		  //自动寻卡
#define   BEEP         0x14		  //蜂鸣器开关
#define   BEEP_TIME    0x15		  //鸣响时间

#define   CARD_TYPE    0x19		  //读取卡类型
#define   CARD_SN      0x20		  //读卡序列号
#define   READ_BLOCK   0x21		  //读块数据
#define   WRITE_BLOCK  0x22		  //写块数据
#define   INIT_PURSE   0x23		  //初始化钱包
#define   READ_PURSE   0x24		  //读钱包
#define   ADD_PURSE    0x25		  //钱包充值
#define   DEC_PURSE    0x26		  //钱包扣款


// Define the error commands return from HY502 chip

#define   ERR_HALT         0xed		  //中止卡操作错误
#define   ERR_AUTO         0xec		  //自动寻卡错误
#define   ERR_TYPE         0xe6		  //读取卡类型错误
#define   ERR_SN           0xdf		  //读卡序列号错误
#define   ERR_READ_BLOCK   0xde		  //读块数据错误
#define   ERR_WRITE_BLOCK  0xdd		  //写块数据错误
#define   ERR_INIT_PURSE   0xdc		  //初始化钱包错误
#define   ERR_READ_PURSE   0xdb		  //读钱包错误
#define   ERR_ADD_PURSE    0xda		  //钱包充值错误
#define   ERR_DEC_PURSE    0xd9		  //钱包扣款错误
///////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -