cm4040_cs.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _CM4040_H_
  2. #define _CM4040_H_
  3. #define CM_MAX_DEV 4
  4. #define DEVICE_NAME "cmx"
  5. #define MODULE_NAME "cm4040_cs"
  6. #define REG_OFFSET_BULK_OUT 0
  7. #define REG_OFFSET_BULK_IN 0
  8. #define REG_OFFSET_BUFFER_STATUS 1
  9. #define REG_OFFSET_SYNC_CONTROL 2
  10. #define BSR_BULK_IN_FULL 0x02
  11. #define BSR_BULK_OUT_FULL 0x01
  12. #define SCR_HOST_TO_READER_START 0x80
  13. #define SCR_ABORT 0x40
  14. #define SCR_EN_NOTIFY 0x20
  15. #define SCR_ACK_NOTIFY 0x10
  16. #define SCR_READER_TO_HOST_DONE 0x08
  17. #define SCR_HOST_TO_READER_DONE 0x04
  18. #define SCR_PULSE_INTERRUPT 0x02
  19. #define SCR_POWER_DOWN 0x01
  20. #define CMD_PC_TO_RDR_ICCPOWERON 0x62
  21. #define CMD_PC_TO_RDR_GETSLOTSTATUS 0x65
  22. #define CMD_PC_TO_RDR_ICCPOWEROFF 0x63
  23. #define CMD_PC_TO_RDR_SECURE 0x69
  24. #define CMD_PC_TO_RDR_GETPARAMETERS 0x6C
  25. #define CMD_PC_TO_RDR_RESETPARAMETERS 0x6D
  26. #define CMD_PC_TO_RDR_SETPARAMETERS 0x61
  27. #define CMD_PC_TO_RDR_XFRBLOCK 0x6F
  28. #define CMD_PC_TO_RDR_ESCAPE 0x6B
  29. #define CMD_PC_TO_RDR_ICCCLOCK 0x6E
  30. #define CMD_PC_TO_RDR_TEST_SECURE 0x74
  31. #define CMD_PC_TO_RDR_OK_SECURE 0x89
  32. #define CMD_RDR_TO_PC_SLOTSTATUS 0x81
  33. #define CMD_RDR_TO_PC_DATABLOCK 0x80
  34. #define CMD_RDR_TO_PC_PARAMETERS 0x82
  35. #define CMD_RDR_TO_PC_ESCAPE 0x83
  36. #define CMD_RDR_TO_PC_OK_SECURE 0x89
  37. #endif /* _CM4040_H_ */