Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. #define MAX_IFSD 254 // IFDTEST gives error on 255
  2. #define CLK_FREQ_KHZ 3580
  3. #define DATARATE_DEFAULT 9600
  4. //
  5. // Reader commands:
  6. //
  7. #define IFDCMD_GET_TYPE 0xF0
  8. #define IFDCMD_GET_STATUS 0xF1
  9. #define IFDCMD_PWR_OFF 0xF2
  10. #define IFDCMD_PWR_ON 0xF3
  11. #define IFDCMD_SLEEP 0xF4
  12. #define IFDCMD_SEND_0xx 0xF8
  13. #define IFDCMD_SEND_1xx 0xF9
  14. #define IFDCMD_HEADER1 0xDB
  15. #define IFDCMD_HEADER2 0x3A
  16. //
  17. // Responses from the reader
  18. //
  19. #define IFDRSP_HEADER_SIZE 2 // Marker + status/length
  20. #define IFDRSP_MARKER 0xBE // IFD responses start with this
  21. #define IFDRSP_ICCRSP 0xD7 // ICC responses start with this
  22. //
  23. // Different status codes returned
  24. //
  25. #define IFDRSP_ACK 0xE0
  26. #define IFDRSP_BADCMD 0xE1
  27. #define IFDRSP_PARITY 0xE2
  28. #define IFDRSP_NOCARD 0xE3
  29. //
  30. // Waiting times for various operations (in usec)
  31. //
  32. #define WAIT_TIME_READER_TYPE 10000
  33. #define WAIT_TIME_STATUS 10000
  34. #define WAIT_TIME_PWR_ON 1000000
  35. #define WAIT_TIME_PWR_OFF 10000
  36. #define WAIT_TIME_RDR_SLEEP 10000
  37. #define WAIT_TIME_BYTE 1300
  38. #define WAIT_TIME_PTS 1000000
  39. #define WAIT_TIME_MINIMUM 20000
  40. #define ATR_CHAR_TIMEOUT 1000000
  41. #define ATR_BLOCK_TIMEOUT 1000000
  42. #define SIZE_READER_TYPE 16
  43. #define READER_TYPE_1 0x9B
  44. #define DATARATE_14400 0x01
  45. #define DATARATE_19200 0x02
  46. #define DATARATE_28800 0x04
  47. #define DATARATE_38400 0x08
  48. #define DATARATE_57600 0x10
  49. #define DATARATE_115200 0x20
  50. //
  51. // Status flags
  52. //
  53. #define SF_PRESENT 0x80
  54. #define SF_REVERSE 0x40
  55. #define SF_RESET_HI 0x04
  56. #define SF_SYNC 0x02
  57. #define SF_ASYNC 0x01