0001
0002 #ifndef _CM4040_H_
0003 #define _CM4040_H_
0004
0005 #define CM_MAX_DEV 4
0006
0007 #define DEVICE_NAME "cmx"
0008 #define MODULE_NAME "cm4040_cs"
0009
0010 #define REG_OFFSET_BULK_OUT 0
0011 #define REG_OFFSET_BULK_IN 0
0012 #define REG_OFFSET_BUFFER_STATUS 1
0013 #define REG_OFFSET_SYNC_CONTROL 2
0014
0015 #define BSR_BULK_IN_FULL 0x02
0016 #define BSR_BULK_OUT_FULL 0x01
0017
0018 #define SCR_HOST_TO_READER_START 0x80
0019 #define SCR_ABORT 0x40
0020 #define SCR_EN_NOTIFY 0x20
0021 #define SCR_ACK_NOTIFY 0x10
0022 #define SCR_READER_TO_HOST_DONE 0x08
0023 #define SCR_HOST_TO_READER_DONE 0x04
0024 #define SCR_PULSE_INTERRUPT 0x02
0025 #define SCR_POWER_DOWN 0x01
0026
0027
0028 #define CMD_PC_TO_RDR_ICCPOWERON 0x62
0029 #define CMD_PC_TO_RDR_GETSLOTSTATUS 0x65
0030 #define CMD_PC_TO_RDR_ICCPOWEROFF 0x63
0031 #define CMD_PC_TO_RDR_SECURE 0x69
0032 #define CMD_PC_TO_RDR_GETPARAMETERS 0x6C
0033 #define CMD_PC_TO_RDR_RESETPARAMETERS 0x6D
0034 #define CMD_PC_TO_RDR_SETPARAMETERS 0x61
0035 #define CMD_PC_TO_RDR_XFRBLOCK 0x6F
0036 #define CMD_PC_TO_RDR_ESCAPE 0x6B
0037 #define CMD_PC_TO_RDR_ICCCLOCK 0x6E
0038 #define CMD_PC_TO_RDR_TEST_SECURE 0x74
0039 #define CMD_PC_TO_RDR_OK_SECURE 0x89
0040
0041
0042 #define CMD_RDR_TO_PC_SLOTSTATUS 0x81
0043 #define CMD_RDR_TO_PC_DATABLOCK 0x80
0044 #define CMD_RDR_TO_PC_PARAMETERS 0x82
0045 #define CMD_RDR_TO_PC_ESCAPE 0x83
0046 #define CMD_RDR_TO_PC_OK_SECURE 0x89
0047
0048 #endif