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.

75 lines
2.6 KiB

4 years ago
  1. //-----------------------------------------------------------------------
  2. //
  3. // P3C.H
  4. //
  5. // Trantor P3C Definitions File
  6. //
  7. // Revisions:
  8. // 09-01-92 KJB First.
  9. // 02-25-93 KJB Reorganized, supports dataunderrun with long delay
  10. // for under run on large xfers. Can we fix this?
  11. // 03-12-93 KJB Now supports polling thru CardInterrupt and
  12. // StartCommandInterrupt/FinishCommandInterrupt.
  13. // 03-19-93 JAP Implemented condition build FAR and NEAR pointers
  14. // 03-25-93 JAP Fixed up prototype typedef inconsistencies
  15. // 04-05-93 KJB Fixed function prototype.
  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. // p3c control
  27. #define PC_RES 0x80
  28. #define PC_MODE 0x70
  29. #define PC_ADRS 0x0f
  30. // p3c modes
  31. #define PCCC_MODE_RPER_BYTE 0
  32. #define PCCC_MODE_RPER_NIBBLE 0x10
  33. #define PCCC_MODE_RDMA_BYTE 0x20
  34. #define PCCC_MODE_RDMA_NIBBLE 0x30
  35. #define PCCC_MODE_WPER 0x40
  36. #define PCCC_MODE_RSIG_BYTE 0x50
  37. #define PCCC_MODE_WDMA 0x60
  38. #define PCCC_MODE_RSIG_NIBBLE 0x70
  39. //
  40. // Public Functions
  41. //
  42. // for the 5380 that is in the P3C
  43. VOID N5380PortGet(PADAPTER_INFO g,UCHAR reg,PUCHAR byte);
  44. VOID N5380PortPut(PADAPTER_INFO g,UCHAR reg,UCHAR byte);
  45. // for the parallel port the P3C uses
  46. #define ParallelPortGet(baseIoAddress, reg, byte) \
  47. PortIOGet((PUCHAR)baseIoAddress+reg,byte)
  48. #define ParallelPortPut(baseIoAddress,reg,byte) \
  49. PortIOPut((PUCHAR)baseIoAddress+reg,byte)
  50. // exported routines
  51. BOOLEAN P3CCheckAdapter(PADAPTER_INFO g);
  52. USHORT P3CDoCommand(PTSRB t);
  53. VOID P3CResetBus(PADAPTER_INFO g);
  54. USHORT P3CStartCommandInterrupt(PTSRB t);
  55. USHORT P3CFinishCommandInterrupt(PTSRB t);
  56. BOOLEAN P3CInterrupt(PADAPTER_INFO g);
  57. USHORT P3CReadBytesFast(PADAPTER_INFO g, PUCHAR pbytes,
  58. ULONG len, PULONG pActualLen, UCHAR phase);
  59. USHORT P3CWriteBytesFast(PADAPTER_INFO g, PUCHAR pbytes,
  60. ULONG len, PULONG pActualLen, UCHAR phase);
  61. VOID P3CResetBus(PADAPTER_INFO g);
  62. USHORT P3CDoIo(PTSRB t);