Windows NT 4.0 source code leak
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.

92 lines
2.4 KiB

4 years ago
  1. //-----------------------------------------------------------------------
  2. //
  3. // FILE: pc9010.h
  4. //
  5. // PC9010 Definitions File
  6. //
  7. // Revisions:
  8. // 09-01-92 KJB First.
  9. // 03-19-93 JAP Implemented condition build FAR and NEAR pointers
  10. // 03-25-93 JAP Fixed up prototype typedef inconsistencies
  11. // 05-06-93 KJB Added prototype for PC9010CheckAdapter
  12. // 05-14-93 KJB Added CardParseCommandString for card specific
  13. // standard string parsing across platforms.
  14. // Changed CardCheckAdapter to accept an
  15. // Initialization info from command line, ie
  16. // force bi-directional ports, etc.
  17. // All functions that used to take an PBASE_REGISTER
  18. // parameter now take PWORKSPACE. CardCheckAdapter
  19. // takes the both a PINIT and a PWORKSPACE parameters.
  20. //
  21. //-----------------------------------------------------------------------
  22. //
  23. // PC9010 Register Offsets
  24. //
  25. #define PC9010_CONFIG 0
  26. #define PC9010_CONTROL 2
  27. #define PC9010_FIFO_STATUS 3
  28. #define PC9010_FIFO 4
  29. #define PC9010_N5380 8
  30. // size of fifo in bytes
  31. #define PC9010_FIFO_SIZE 128
  32. // Config Register for PC9010
  33. #define CFR_VERSION 0xF0
  34. #define CFR_SWITCH 0x0F
  35. // Control Register for PC9010
  36. #define CTR_CONFIG 0x80
  37. #define CTR_SWSEL 0x40
  38. #define CTR_IRQEN 0x20
  39. #define CTR_DMAEN 0x10
  40. #define CTR_FEN 0x8
  41. #define CTR_FDIR 0x4
  42. #define CTR_F16 0x2
  43. #define CTR_FRST 0x1
  44. // Fifo Status Register for PC9010
  45. #define FSR_IRQ 0x80
  46. #define FSR_DRQ 0x40
  47. #define FSR_FHFUL 0x20
  48. #define FSR_FHEMP 0x10
  49. #define FSR_FLFUL 0x08
  50. #define FSR_FLEMP 0x04
  51. #define FSR_FFUL 0x02
  52. #define FSR_FEMP 0x01
  53. // constant JEDEC ID
  54. #define PC9010_JEDEC_ID 0x8f
  55. //
  56. // Redefined routines
  57. //
  58. // Each PC9010 has a 5380 built in
  59. #define N5380PortPut(g,reg,byte) \
  60. PC9010PortPut(g,PC9010_N5380+reg,byte);
  61. #define N5380PortGet(g,reg,byte) \
  62. PC9010PortGet(g,PC9010_N5380+reg,byte);
  63. //
  64. // public functions
  65. //
  66. BOOLEAN PC9010CheckAdapter (PADAPTER_INFO g);
  67. USHORT PC9010WriteBytesFast(PADAPTER_INFO g, PUCHAR pbytes,
  68. ULONG len, PULONG pActualLen, UCHAR phase);
  69. USHORT PC9010ReadBytesFast(PADAPTER_INFO g, PUCHAR pbytes,
  70. ULONG len, PULONG pActualLen, UCHAR phase);
  71. VOID PC9010EnableInterrupt(PADAPTER_INFO g);
  72. VOID PC9010DisableInterrupt(PADAPTER_INFO g);
  73. VOID PC9010ResetBus(PADAPTER_INFO g);