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.

79 lines
2.3 KiB

4 years ago
  1. //-----------------------------------------------------------------------
  2. //
  3. // T128.H
  4. //
  5. // Trantor T128 Definitions File
  6. //
  7. // This file contains definitions specific to the logic used on the T128
  8. // parallel to scsi adapter.
  9. //
  10. // Revisions:
  11. // 02-25-92 KJB First.
  12. // 03-19-93 JAP Implemented condition build FAR and NEAR pointers
  13. // 03-25-93 JAP Fixed up prototype typedef inconsistencies
  14. // 05-14-93 KJB Added CardParseCommandString for card specific
  15. // standard string parsing across platforms.
  16. // Changed CardCheckAdapter to accept an
  17. // Initialization info from command line, ie
  18. // force bi-directional ports, etc.
  19. // All functions that used to take an PBASE_REGISTER
  20. // parameter now take PWORKSPACE. CardCheckAdapter
  21. // takes the both a PINIT and a PWORKSPACE parameters.
  22. //
  23. //-----------------------------------------------------------------------
  24. //
  25. // T128 Specific Hardware Definitions
  26. //
  27. // T128 Registers
  28. #define T128_RAM 0x0000
  29. #define T128_ROM 0x1800
  30. #define T128_CONTROL 0x1C00
  31. #define T128_STATUS 0x1C20
  32. #define T128_5380 0x1D00
  33. #define T128_DATA 0x1E00
  34. // control register definitions
  35. #define CR_UNUSED 0xe0
  36. #define CR_INTENB 0x10
  37. #define CR_SCSIWRITE 0x8
  38. #define CR_SCSIREAD 0x4
  39. #define CR_TIMEOUT 0x2
  40. #define CR_16BIT 0x1
  41. // status registers
  42. #define SR_SW5 0x80
  43. #define SR_SW4 0x40
  44. #define SR_SW3 0x20
  45. #define SR_SW2 0x10
  46. #define SR_PS2 0x8
  47. #define SR_XFR_READY 0x4
  48. #define SR_TIMEOUT 0x2
  49. #define SR_16BIT 0x1
  50. #define SR_ROM_ENABLED SR_SW5
  51. #define SR_DISABLE_TIMEOUT SR_SW4
  52. // Each T128 has a 5380 built in
  53. #define N5380PortPut(g,reg,byte) \
  54. T128PortPut(g,T128_5380+reg*0x20,byte)
  55. #define N5380PortGet(g,reg,byte) \
  56. T128PortGet(g,T128_5380+reg*0x20,byte)
  57. //
  58. // public functions
  59. //
  60. USHORT T128WriteBytesFast (PADAPTER_INFO g, PUCHAR pbytes,
  61. ULONG len, PULONG pActualLen, UCHAR phase);
  62. USHORT T128ReadBytesFast (PADAPTER_INFO g, PUCHAR pbytes,
  63. ULONG len, PULONG pActualLen, UCHAR phase);
  64. VOID T128EnableInterrupt (PADAPTER_INFO g);
  65. VOID T128DisableInterrupt (PADAPTER_INFO g);
  66. VOID T128ResetBus (PADAPTER_INFO g);