📄 icc_cmd.h
字号:
#ifndef __STRUCT_ICC_H_
#define __STRUCT_ICC_H_
#define MAX_READ_BYTE_COUNT 1024
//FOR ICC STORAGE CARD
#define ICC_STOR_VERIFY_PSC 1
#define ICC_STOR_GET_ERR_COUNT 2
#define ICC_STOR_GET_CARD_TYPE 4
#define ICC_STOR_SET_CARD_TYPE 5
#define ICC_STOR_READ_COMMON 6
#define ICC_STOR_WRITE_COMMON 7
#define ICC_STOR_READ_PROTECT 8
#define ICC_STOR_WRITE_PROTECT 9
#define ICC_STOR_READ_PSC 10
#define ICC_STOR_WRITE_PSC 11
//FOR ICC CPU CARD
#define ICC_CPU_RAW_WRITE 101
//FOR WSC
#define WSC_CMD_READ 1
#define WSC_CMD_WRITE 2
#define WSC_CMD_INC 3
#define WSC_CMD_DEC 4
#define WSC_CMD_DET 5
#define WSC_CMD_AUTH_1A 6
#define WSC_CMD_AUTH_1B 7
#define WSC_CMD_TRANSFER 8
#define WSC_CMD_RESTORE 9
#define WSC_CMD_HALT 10
//FOR cdma
#define CEL_SOUND_CDMA 1
#define CEL_SOUND_PDA 2
#define CEL_CDMA_PWR_ON 3
#define CEL_CDMA_PWR_OFF 4
#define CEL_CDMA_OFF_INSLEEP 5
#define CEL_CDMA_ON_INSLEEP 6
typedef struct
{
unsigned int cmdType;
unsigned int lparam1;
unsigned int lparam2;
union
{
struct{ // for common and protect-bit read&write
unsigned int offset;
unsigned int count;
};
};
unsigned char dataBuf[0];
}ICC_IN;
typedef struct
{
unsigned int nDataBytes;
unsigned int errCode;
unsigned int intVal;
unsigned char dataBuf[0];
}ICC_OUT;
typedef ICC_IN CDMA_IN;
typedef ICC_OUT CDMA_OUT;
//////////////// RET /////////////////////////////////
#define CARD_OK 0
#define CARD_NO_CARD -100
#define CARD_BLOCKED -101
#define CARD_PSC_FAIL -102
#define CARD_NOT_SUPPORT -103
#define READER_ERR_BASE_START 0
#define MI_OK 0
#define MI_CHK_OK 0
#define MI_CRC_ZERO 0
#define MI_CRC_NOTZERO 1
#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_KEYERR (-9)
#define MI_NOTAUTHERR (-10)
#define MI_BITCOUNTERR (-11)
#define MI_BYTECOUNTERR (-12)
#define MI_IDLE (-13)
#define MI_TRANSERR (-14)
#define MI_WRITEERR (-15)
#define MI_INCRERR (-16)
#define MI_DECRERR (-17)
#define MI_READERR (-18)
#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_RESETERR (-25)
#define MI_INITERR (-25)
#define MI_INTERFACEERR (-26)
#define MI_ACCESSTIMEOUT (-27)
#define MI_NOBITWISEANTICOLL (-28)
#define MI_QUIT (-30)
#define MI_RECBUF_OVERFLOW (-50)
#define MI_SENDBYTENR (-51)
#define MI_SENDBUF_OVERFLOW (-53)
#define MI_BAUDRATE_NOT_SUPPORTED (-54)
#define MI_SAME_BAUDRATE_REQUIRED (-55)
#define MI_WRONG_PARAMETER_VALUE (-60)
#define MI_BREAK (-99)
#define MI_NY_IMPLEMENTED (-200)
#define MI_NO_MFRC (-201)
#define MI_MFRC_NOTAUTH (-202)
#define MI_WRONG_DES_MODE (-203)
#define MI_HOST_AUTH_FAILED (-204)
#define MI_WRONG_LOAD_MODE (-206)
#define MI_WRONG_DESKEY (-207)
#define MI_MKLOAD_FAILED (-208)
#define MI_FIFOERR (-209)
#define MI_WRONG_ADDR (-210)
#define MI_DESKEYLOAD_FAILED (-211)
#define MI_WRONG_SEL_CNT (-214)
#define MI_WRONG_TEST_MODE (-217)
#define MI_TEST_FAILED (-218)
#define MI_TOC_ERROR (-219)
#define MI_COMM_ABORT (-220)
#define MI_INVALID_BASE (-221)
#define MI_MFRC_RESET (-222)
#define MI_WRONG_VALUE (-223)
#define MI_VALERR (-224)
#define MI_FAIL (-225)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -