📄 cdifliteral.h
字号:
#define LCDIF_DEBUG 0 /*1: output debug information to log file
0: not output any debug information*/
//#define LCDIF_NO_VALUE -999 /*the invalid value if CDIF package*/
#define LCDIF_NO_VALUE 0x0 /*the invalid value if CDIF package*/
/*begin: constant of return value*/
#define R_NORMAL 1
#define RCDIF_ERR_OVERTIME 2
#define RCDIF_ERR_HANDSHAKE 3
#define RCDIF_ERR_COMM 4
#define RCDIF_ERR_NOSUPPORT 5
#define RCDIF_ERR_PARAMETER 6
/*end: constant of return value*/
/*begin: constant string for 232 port device*/
#define LCDIF_COM1 "COM1"
#define LCDIF_COM2 "COM2"
#define LCDIF_COM3 "COM3"
#define LCDIF_COM4 "COM4"
#define LCDIF_COM5 "COM5"
#define LCDIF_COM6 "COM6"
#define LCDIF_COM7 "COM7"
#define LCDIF_COM8 "COM8"
#define LCDIF_COM9 "COM9"
#define LCDIF_COM10 "COM10"
/*end: constant string for 232 port device*/
/*begin: define the max length of the data buffer for sending and receiving*/
#define LCDIF_CMDBUFF_LEN 512
/*end: define the max length of the data buffer for sending and receiving*/
/*begin: define the max length of the card password*/
#define LCDIF_PSW_MAXLEN 16
/*end: define the max length of the card password*/
/*begin: define the max length for get the information of DLL or Device */
#define LCDIF_GETINF_MAXLEN 8
/*end: define the max length for get the information of DLL or Device */
/*begin: define the max length of data for read card*/
#define LCDIF_DATA_MAXLEN 128
/*end: define the max length for data for read card */
/*begin: define the max length of data for read card*/
#define LCDIF_DATA_MAXLEN_MASSMEM 256
/*end: define the max length for data for read card */
/*begin: define the protocol character*/
#define LCDIF_HANDCHAR1 0x23
#define LCDIF_HANDCHAR2 0x45
#define LCDIF_HANDCHAR3 0x67
#define LCDIF_HANDCHAR4 0x89
/*end: define the protocol character*/
/*begin: define the try number for send data*/
#define LCDIF_TRYNUM 0x02 /* 发送数据块重试次数 02*/
#define LCDIF_TRYNUM_S 2
#define LCDIF_TRYNUM_L 1000
/*end: define the try number for send data*/
/*begin: define the protocol typr*/
#define LCDIF_T0 0
#define LCDIF_T1 1
/*end: define the protocol typr*/
/*begin: define the command pack type for make command string */
#define LCDIF_CMDTYPE_RESET 1
#define LCDIF_CMDTYPE_READ 2
#define LCDIF_CMDTYPE_WRITE 3
#define LCDIF_CMDTYPE_ERASE 4
#define LCDIF_CMDTYPE_ERASE_PSW 5
#define LCDIF_CMDTYPE_PSW_CHK 6
#define LCDIF_CMDTYPE_PSW_READ 7
#define LCDIF_CMDTYPE_FUSE 8
#define LCDIF_CMDTYPE_FUSEINF 9
#define LCDIF_CMDTYPE_COS 10
/*end: define the command pack type for make command string */
/*begin: define the card device id */
#define LCDIF_DEV_NUM0 0
#define LCDIF_DEV_NUM1 1
#define LCDIF_DEV_NUM2 2
#define LCDIF_DEV_NUM3 3
#define LCDIF_DEV_NUM4 4
/*end: define the card device id */
/***************************************************************/
/* */
/* begin: define the command code number */
/* */
/***************************************************************/
#define LCDIF_CMDCODE_OPENPORT 0
#define LCDIF_CMDCODE_POWERON 2
#define LCDIF_CMDCODE_POWEROFF 3
#define LCDIF_CMDCODE_SELCARD 10
#define LCDIF_CMDCODE_ALARM 122
/*for AT1604,AT88SC102*/
#define LCDIF_CMDCODE_CHKZONE 24
#define LCDIF_CMDCODE_SETZONE 27
#define LCDIF_CMDCODE_SETSTATE 28
/*get information*/
#define LCDIF_CMDCODE_GETINF_CARD 13
#define LCDIF_CMDCODE_GETINF_OEM 32
#define LCDIF_CMDCODE_GETINF_DEV 34
/*reset card*/
#define LCDIF_CMDCODE_RESET_AT1608 45
#define LCDIF_CMDCODE_RESET_CPU 50
#define LCDIF_CMDCODE_RESET_SAM1 60
#define LCDIF_CMDCODE_RESET_SAM2 70
#define LCDIF_CMDCODE_RESET_SAM3 80
#define LCDIF_CMDCODE_RESET_SAM4 90
/*read & write cpu card*/
#define LCDIF_CMDCODE_CPU_RW 51
#define LCDIF_CMDCODE_SAM1_RW 61
#define LCDIF_CMDCODE_SAM2_RW 71
#define LCDIF_CMDCODE_SAM3_RW 81
#define LCDIF_CMDCODE_SAM4_RW 91
/*Begin :modify for the length more than 255B for CPU card operation, 01-12-17*/
#define LCDIF_CMDCODE_CPU_RW_G140 151 //Great than 255
/*End :modify for the length more than 255B for CPU card operation, 01-12-17*/
/*fuse*/
#define LCDIF_CMDCODE_FUSE 14
#define LCDIF_CMDCODE_GETINF_FUSE 44
/*read card*/
#define LCDIF_CMDCODE_READ 20
#define LCDIF_CMDCODE_READ_TEMIC 100 /*TEMIC RF5550 Card*/
#define LCDIF_CMDCODE_READ_ATMEL 41 /*ATMEL AT88SC1608 read card */
#define LCDIF_CMDCODE_READ_MASSMEM 36
#define LCDIF_CMDCODE_WRITE_MASSMEM_NOREAD 37
/*write card*/
#define LCDIF_CMDCODE_WRITE 21
#define LCDIF_CMDCODE_WRITE_ATMEL 40 /*ATMEL AT88SC1608 write card */
#define LCDIF_CMDCODE_WRITE_TEMIC 101 /*TEMIC RF5550 Card*/
#define LCDIF_CMDCODE_ERASE 26
#define LCDIF_CMDCODE_ERASE_PSW 25
#define LCDIF_CMDCODE_WRITE_MASSMEM 35
/*check password*/
#define LCDIF_CMDCODE_PSW_CHK 12
/*for e5550 card*/
#define LCDIF_CMDCODE_INIT 102
#define LCDIF_CMDCODE_WAKE 103
#define LCDIF_CMDCODE_WAKE_READ 104
#define LCDIF_CMDCODE_WAKE_WRITE 105
#define LCDIF_CMDCODE_MODULE_NUM 161
/*for AT1608 card */
#define LCDIF_CMDCODE_PSW_RW 42
#define LCDIF_CMDCODE_PSW_AUTC 43 /*authentic card*/
/*for "Tong Fang" SAM card*/
#define LCDIF_CMDCODE_TF_CHK 47
#define LCDIF_CMDCODE_TF_PSW 48
#define LCDIF_CMDCODE_TF_PSW_CHG 49
/*for Mifare card*/
#define LCDIF_CMDCODE_MF_SETPSW 164
#define LCDIF_CMDCODE_MF_CHKMODE 169
#define LCDIF_CMDCODE_MF_GETTYPE 170
#define LCDIF_CMDCODE_MF_GETSN 171
#define LCDIF_CMDCODE_MF_READ 172
#define LCDIF_CMDCODE_MF_WRITE 173
/*************************************************************************/
/* */
/* end: define the command code number */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* begin: define the card type */
/* */
/*************************************************************************/
/*SIEMENS series*/
#define LCDIF_CARDTYPE_SLE4404 0 /* SIEMENS SLE4404 Card */
#define LCDIF_CARDTYPE_SLE4432 1 /* SIEMENS SLE4432 Card */
#define LCDIF_CARDTYPE_SLE4442 2 /* SIEMENS SLE4442 Card */
#define LCDIF_CARDTYPE_SLE4418 3 /* SIEMENS SLE4418 Card */
#define LCDIF_CARDTYPE_SLE4428 4 /* SIEMENS SLE4428 Card */
/*ATMEL 24C series*/
#define LCDIF_CARDTYPE_AT24C01A 10 /* ATMEL 24C01A Card */
#define LCDIF_CARDTYPE_AT24C02 11 /* ATMEL 24C02 Card */
#define LCDIF_CARDTYPE_AT24C04 12 /* ATMEL 24C04 Card */
#define LCDIF_CARDTYPE_AT24C08 13 /* ATMEL 24C08 Card */
#define LCDIF_CARDTYPE_AT24C16 14 /* ATMEL 24C16 Card */
#define LCDIF_CARDTYPE_AT24C32 19
#define LCDIF_CARDTYPE_AT24C64 20
/*ATMEL 93C series*/
#define LCDIF_CARDTYPE_AT93C46 22 /* ATMEL 93C46 Card */
#define LCDIF_CARDTYPE_AT93C56 23 /* ATMEL 93C56 Card */
#define LCDIF_CARDTYPE_AT93C66 24 /* ATMEL 93C66 Card */
/*ATMEL 88SC series*/
#define LCDIF_CARDTYPE_AT88SC101 15 /* ATMEL 88SC101 Card */
#define LCDIF_CARDTYPE_AT88SC102 16 /* ATMEL 88SC102 Card */
#define LCDIF_CARDTYPE_AT88SC103 17 /* ATMEL 88SC103 Card */
#define LCDIF_CARDTYPE_AT88SC1604_A 25 /* ATMEL AT88SC1604等分区 */
#define LCDIF_CARDTYPE_AT88SC1604_N 26 /* ATMEL AT88SC1604非等分 */
#define LCDIF_CARDTYPE_AT88SC1608 27 /* ATMEL AT88SC1608 CARD */
/*ATMEL 45D series*/
#define LCDIF_CARDTYPE_AT45D041 21 /* AT45D041 */
#define LCDIF_CARDTYPE_CX24C01 30 /* X24C01 Card */
/*CPU card series*/
#define LCDIF_CARDTYPE_CPU 85 /* Cpu Card Type */
/*TEMIC card series*/
#define LCDIF_CARDTYPE_RF5550 100 /* TEMIC RF5550 Card */
/**************************************************************************/
/* */
/* end: define the card type */
/* */
/**************************************************************************/
/*begin : define the Zone Table */
#define LCDIF_ZONE_APP 0x12 /* Application Zone */
#define LCDIF_ZONE_PROTECT 0x11 /* Protect Zone */
/*end: define the Zone Table */
/*begin : define card attribution category */
#define LCDIF_CATEGORY_CPU 1
#define LCDIF_CATEGORY_MEM 2
#define LCDIF_CATEGORY_MMEM 3
#define LCDIF_CATEGORY_RFL 4
/*end: define card attribution category */
/*begin : define password type*/
#define LCDIF_PSW_MAIN 0x01
#define LCDIF_PSW_ZONE 0x02
#define LCDIF_PSW_ERASE 0x04
/*end: define password type*/
#define LCDIF_CARDTYPE_SUPPORTNUM 29
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -