/****************************************************************************** * 函 数 名:readCardSerial * 功能描述:返回卡的序列号 4字节 * 输入参数:无 * 返 回 值:成功返回ture 失败返回false ******************************************************************************/ bool RFID::readCardSerial(){ unsigned char status; unsigned char str[MAX_LEN]; // 防冲撞,返回卡的序列号 4字节,存入serNum中 status = anticoll(str); memcpy(serNum, str, 5); if (status == MI_OK) return true; else return false; }
bool RFID::readCardSerial(){ uint8_t status; uint8_t str[MAX_LEN]; // Anti-colisión, devuelva el número de serie de tarjeta de 4 bytes status = anticoll(str); memcpy(serNum, str, 5); if (status == MI_OK) { return true; } else { return false; } }