📄 cdifstruct.h
字号:
/*begin: command information package */
typedef struct scdif_cmdpack
{
int cmd; /*cmd code, defined by the device*/
int length; /*data length*/
unsigned char data[LCDIF_CMDBUFF_LEN]; /*data*/
} TCDIF_CMDPACK;
/*end: command information package*/
/*begin: response information package after one command processed*/
typedef struct scdif_rspspack
{
int length;/*data length*/
unsigned char data[LCDIF_CMDBUFF_LEN];/*data*/
} TCDIF_RSPSPACK;
/*end: response information package after one command processed*/
/*begin: card information package*/
typedef struct scdif_cardinf
{
int type;/*card type*/
int power; /*L_ON: power on; L_OFF: power off*/
int cardin; /*L_ON: card in; L_OFF: card not in*/
int cosprtl; /*LCDIF_T1: t=1; LCDIF_T0: t=0*/
int winnum;
unsigned char description[256];/*card type desription*/
/*...*/
} TCDIF_CARDINF;
/*end: card information package*/
/*begin: device information package*/
typedef struct scdif_devinf
{
unsigned char version[16];/*card type*/
unsigned char devid[16]; /*OEM number*/
unsigned char description[256];/*card type desription*/
/*...*/
}TCDIF_DEVINF;
/*end: device information package*/
/*begin: dll information package*/
typedef struct scdif_dllinf
{
int version;/*card type*/
unsigned char description[256];/*card type desription*/
/*...*/
}TCDIF_DLLINF;
/*end: dll information package*/
/*begin: password information package*/
typedef struct scdif_psw
{
int count;
int type; /*LCDIF_PSW_MAIN, LCDIF_PSW_ZONE, LCDIF_PSW_ERASE*/
int pswlen;
unsigned char psw[LCDIF_PSW_MAXLEN];
}TCDIF_PSW;
/*end: password information package*/
/*begin: address information package*/
typedef struct scdif_addr
{
long zone;/*zone number*/
long addr_h; /*hight address*/
long addr_l; /*low address*/
}TCDIF_ADDR;
/*end: address information package*/
/*begin: cos command information package following ISO7816-4 definition */
typedef struct scdif_coscmdpack
{
unsigned char CLA;
unsigned char INS;
unsigned char P1;
unsigned char P2;
unsigned char LC;
unsigned char NetData[0x80];
unsigned char LE;
}TCDIF_COSCMDPACK;
/*end: cos command information package following ISO7816-4 definition */
/*begin: card command interface information package*/
typedef struct scdif_cmdinfc
{
int cmdtype; /*command type */
TCDIF_CARDINF *cardinf; /*card information*/
TCDIF_PSW *psw; /*password information */
TCDIF_ADDR *addr; /*address information*/
long device; /*device id*/
int cmdpacklen; /*command length ....*/
int datalen;
unsigned char *data;
}TCDIF_CMDINFC;
/*end: card command interface information package */
/*begin: defined for mapping address string*/
typedef struct scdif_addrattr
{
int zonenum; /*0: no zone; n: zone number, the start zone is 1*/
int addrllength; //byte number
int addrhlength; //byte number
int addrlmax;
int addrhmax;
}TCDIF_ADDRATTR;
/*end: defined for mapping address string*/
typedef struct scdif_pswattr
{
int type;/*password type, unified with the command code*/
int len;
unsigned char description[256];/*password desription*/
}TCDIF_PSWATTR;
/*begin: card information package*/
typedef struct scdif_cardattr
{
int type; /*card type indentification*/
char typestr[64]; /*card type string*/
int category; /*CPU/MEMORY/RFL......*/
TCDIF_ADDRATTR addrattr;
/*begin: defined for password management*/
int pswnum; /*0: no password; n: password number*/
TCDIF_PSWATTR *pswattr;
/*end: defined for password management*/
}TCDIF_CARDATTR;
/*end: card information package */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -