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.

68 lines
2.3 KiB

4 years ago
  1. //-------------------------------------------------------------------------
  2. //
  3. // T338.H
  4. //
  5. // Trantor T338 Definitions File
  6. //
  7. // This file contains definitions specific to the logic used on the T338
  8. // parallel to scsi adapter.
  9. //
  10. // Revisions:
  11. // 02-01-92 KJB First.
  12. // 03-12-93 KJB Now supports polling thru CardInterrupt and
  13. // StartCommandInterrupt/FinishCommandInterrupt.
  14. // 03-19-93 JAP Implemented condition build FAR and NEAR pointers
  15. // 03-25-93 JAP Fixed up prototype typedef inconsistencies
  16. // 05-14-93 KJB Added CardParseCommandString for card specific
  17. // standard string parsing across platforms.
  18. // Changed CardCheckAdapter to accept an
  19. // Initialization info from command line, ie
  20. // force bi-directional ports, etc.
  21. // All functions that used to take an PBASE_REGISTER
  22. // parameter now take PWORKSPACE. CardCheckAdapter
  23. // takes the both a PINIT and a PWORKSPACE parameters.
  24. //
  25. //-------------------------------------------------------------------------
  26. // T338 control
  27. #define T338_RES 0xc0
  28. #define T338_MODE 0x38
  29. #define T338_ADRS 0x07
  30. // T338 Modes
  31. #define T338_MR 0x20
  32. #define T338_IOW 0x10
  33. #define T338_IOR 0x08
  34. //
  35. // Public Functions
  36. //
  37. // for the 5380 that is in the T338
  38. void N5380PortGet(PADAPTER_INFO g,UCHAR reg,PUCHAR byte);
  39. void N5380PortPut(PADAPTER_INFO g,UCHAR reg,UCHAR byte);
  40. // for the parallel port the T338 uses
  41. #define ParallelPortGet(baseIoAddress, reg, byte) \
  42. PortIOGet((PUCHAR)baseIoAddress+reg,byte)
  43. #define ParallelPortPut(baseIoAddress,reg,byte) \
  44. PortIOPut((PUCHAR)baseIoAddress+reg,byte)
  45. // exported T338 functions
  46. BOOLEAN T338CheckAdapter (PADAPTER_INFO g);
  47. VOID T338ResetBus (PADAPTER_INFO g);
  48. USHORT T338DoCommand (PTSRB t);
  49. USHORT T338StartCommandInterrupt (PTSRB t);
  50. USHORT T338FinishCommandInterrupt (PTSRB t);
  51. BOOLEAN T338Interrupt (PADAPTER_INFO g);
  52. USHORT T338WriteBytesFast (PADAPTER_INFO g, PUCHAR pbytes,
  53. ULONG len, PULONG pActualLen, UCHAR phase);
  54. USHORT T338ReadBytesFast (PADAPTER_INFO g, PUCHAR pbytes,
  55. ULONG len, PULONG pActualLen, UCHAR phase);
  56. USHORT T338DoIo (PTSRB t);