177c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#ifndef _CM4040_H_ 277c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define _CM4040_H_ 377c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 477c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CM_MAX_DEV 4 577c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 677c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define DEVICE_NAME "cmx" 777c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define MODULE_NAME "cm4040_cs" 877c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 977c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define REG_OFFSET_BULK_OUT 0 1077c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define REG_OFFSET_BULK_IN 0 1177c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define REG_OFFSET_BUFFER_STATUS 1 1277c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define REG_OFFSET_SYNC_CONTROL 2 1377c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 1477c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define BSR_BULK_IN_FULL 0x02 1577c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define BSR_BULK_OUT_FULL 0x01 1677c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 1777c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_HOST_TO_READER_START 0x80 1877c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_ABORT 0x40 1977c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_EN_NOTIFY 0x20 2077c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_ACK_NOTIFY 0x10 2177c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_READER_TO_HOST_DONE 0x08 2277c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_HOST_TO_READER_DONE 0x04 2377c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_PULSE_INTERRUPT 0x02 2477c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define SCR_POWER_DOWN 0x01 2577c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 2677c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 2777c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_ICCPOWERON 0x62 2877c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_GETSLOTSTATUS 0x65 2977c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_ICCPOWEROFF 0x63 3077c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_SECURE 0x69 3177c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_GETPARAMETERS 0x6C 3277c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_RESETPARAMETERS 0x6D 3377c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_SETPARAMETERS 0x61 3477c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_XFRBLOCK 0x6F 3577c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_ESCAPE 0x6B 3677c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_ICCCLOCK 0x6E 3777c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_TEST_SECURE 0x74 3877c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_PC_TO_RDR_OK_SECURE 0x89 3977c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 4077c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 4177c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_RDR_TO_PC_SLOTSTATUS 0x81 4277c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_RDR_TO_PC_DATABLOCK 0x80 4377c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_RDR_TO_PC_PARAMETERS 0x82 4477c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_RDR_TO_PC_ESCAPE 0x83 4577c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#define CMD_RDR_TO_PC_OK_SECURE 0x89 4677c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte 4777c44ab1d8e9da31bf927223e1579b44f772b579Harald Welte#endif /* _CM4040_H_ */ 48