Leaked source code of windows server 2003
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.

177 lines
5.0 KiB

  1. /*++
  2. Copyright (c) 1996 Hewlett-Packard Corporation
  3. Module Name:
  4. cmsfcxx.h
  5. Abstract:
  6. This file includes data declarations for Floppy Controller Enabling
  7. Author:
  8. Kurt Godwin (v-kurtg) 26-Mar-1996.
  9. Environment:
  10. Kernel mode only.
  11. Notes:
  12. Revision History:
  13. --*/
  14. #define FDC_VALUE_API_SUPPORTED L"APISupported"
  15. #define FDC_VALUE_CLOCK_48MHZ L"Clock48MHz"
  16. //
  17. // Floppy controler data rates (to be OR'd together)
  18. //
  19. #define FDC_SPEED_250KB 0x0001
  20. #define FDC_SPEED_300KB 0x0002
  21. #define FDC_SPEED_500KB 0x0004
  22. #define FDC_SPEED_1MB 0x0008
  23. #define FDC_SPEED_2MB 0x0010
  24. //
  25. // Dma Width supported
  26. //
  27. #define FDC_8_BIT_DMA 0x0001
  28. #define FDC_16_BIT_DMA 0x0002
  29. //
  30. // Dma direction
  31. //
  32. #define FDC_READ_FROM_MEMORY 0x0000
  33. #define FDC_WRITE_TO_MEMORY 0x0001
  34. //
  35. // Clock Rate to the FDC (FDC_82078 only)
  36. //
  37. #define FDC_CLOCK_NORMAL 0x0000 // Use this for non 82078 parts
  38. #define FDC_CLOCK_48MHZ 0x0001 // 82078 with a 48MHz clock
  39. #define FDC_CLOCK_24MHZ 0x0002 // 82078 with a 24MHz clock
  40. //
  41. // Floppy controler types
  42. //
  43. #define FDC_TYPE_NORMAL 2 // Any NEC 768 compatible, 250Kb/sec 500Kb/sec
  44. #define FDC_TYPE_ENHANCED 3 // Any NEC 768 compatible that supports the version command, 250Kb/sec 500Kb/sec
  45. #define FDC_TYPE_82077 4 // National 8477, 250Kb/sec 500Kb/sec 1Mb/sec
  46. #define FDC_TYPE_82077AA 5 // Intel 82077, 250Kb/sec 500Kb/sec 1Mb/sec
  47. #define FDC_TYPE_82078_44 6 // Intel 82077AA, 250Kb/sec 500Kb/sec 1Mb/sec
  48. #define FDC_TYPE_82078_64 7 // Intel 82078 44 Pin Version, 250Kb/sec 500Kb/sec 1Mb/sec(2Mb/sec capable)
  49. #define FDC_TYPE_NATIONAL 8 // Intel 82078 64 Pin Version, 250Kb/sec 500Kb/sec 1Mb/sec(2Mb/sec capable)
  50. typedef struct _FDC_MODE_SELECT {
  51. ULONG structSize; // Size of this structure (inclusive)
  52. ULONG Speed; // Should be only ONE of the data rates (i.e. FDC_SPEED_XXX)
  53. // ONLY select speeds that were available from FDC_INFORMATION
  54. ULONG DmaWidth; // Should be only ONE of the dma widths (i.e. FDC_16_BIT_DMA)
  55. // ONLY select DMA Widths that were available from FDC_INFORMATION
  56. ULONG DmaDirection; // Should be FDC_READ_FROM_MEMORY or FDC_WRITE_TO_MEMORY
  57. ULONG ClockRate; // Should be FDC_48MHZ, FDC_24MHZ or zero
  58. } FDC_MODE_SELECT, *PFDC_MODE_SELECT;
  59. typedef struct _FDC_INFORMATION {
  60. ULONG structSize; // Size of this structure (inclusive)
  61. ULONG SpeedsAvailable; // Any combination of FDC_SPEED_xxxx or'd together
  62. ULONG DmaWidthsSupported; // Any combination of FDC_xx_BIT_DMA
  63. ULONG ClockRatesSupported; // Should be FDC_48MHZ, FDC_24MHZ or zero
  64. // If the part is capable of both speeds
  65. // return both OR'd together. It is then
  66. // the caller's responsiblity to set the
  67. // proper data rate with FDC_MODE_SELECT
  68. ULONG FloppyControllerType; // Should be any ONE of type FDC_TYPE_XXXX
  69. } FDC_INFORMATION, *PFDC_INFORMATION;
  70. #define IOCTL_FLPENBL_BASE FILE_DEVICE_TAPE
  71. //
  72. // IOCTL Codes set to the enabler driver's IRP_MJ_INTERNAL_DEVICE_CONTROL
  73. //
  74. //
  75. //
  76. //
  77. // ACQUIRE_FDC:
  78. //
  79. // input: Type3InputBuffer = PLARGE_INTEGER timeout;
  80. // output:
  81. //
  82. // status:
  83. // Completion status will be STATUS_SUCCESS or STATUS_IN_USE
  84. //
  85. #define IOCTL_AQUIRE_FDC CTL_CODE(IOCTL_FLPENBL_BASE, 0x0001, METHOD_NEITHER, FILE_ANY_ACCESS)
  86. #define IOCTL_ACQUIRE_FDC CTL_CODE(IOCTL_FLPENBL_BASE, 0x0001, METHOD_NEITHER, FILE_ANY_ACCESS)
  87. //
  88. // RELEASE_FDC
  89. //
  90. // input:
  91. // output:
  92. //
  93. // status:
  94. // Completion status will be STATUS_SUCCESS or STATUS_INVALID_PARAMETER
  95. //
  96. #define IOCTL_RELEASE_FDC CTL_CODE(IOCTL_FLPENBL_BASE, 0x0002, METHOD_NEITHER, FILE_ANY_ACCESS)
  97. //
  98. // GET_FDC_INFO
  99. //
  100. //
  101. // input:
  102. // For this function,
  103. // (irp stack)->Parameters.DeviceIoControl.Type3InputBuffer
  104. // will point to a FDC_INFORMATION buffer (output only)
  105. //
  106. // output:
  107. //
  108. // status:
  109. // ioCompletion status will allways be STATUS_SUCCESS
  110. //
  111. #define IOCTL_GET_FDC_INFO CTL_CODE(IOCTL_FLPENBL_BASE, 0x0003, METHOD_NEITHER, FILE_ANY_ACCESS)
  112. //
  113. // SET_FDC_MODE
  114. //
  115. // input:
  116. // For this function,
  117. // (irp stack)->Parameters.DeviceIoControl.Type3InputBuffer
  118. // will point to a FDC_MODE_SELECT buffer (input only)
  119. //
  120. //
  121. // output:
  122. //
  123. // status:
  124. //
  125. // ioCompletion status will be STATUS_SUCCESS or STATUS_INVALID_PARAMETER
  126. //
  127. #define IOCTL_SET_FDC_MODE CTL_CODE(IOCTL_FLPENBL_BASE, 0x0004, METHOD_NEITHER, FILE_ANY_ACCESS)
  128. // ADD_CONTENDER
  129. //
  130. // input:
  131. // controller # (as in FloppyController#) of the controller that
  132. // wants to contend for resources used by this controller
  133. //
  134. // output:
  135. // NOTHING
  136. //
  137. #define IOCTL_ADD_CONTENDER CTL_CODE(IOCTL_FLPENBL_BASE, 0x0005, METHOD_NEITHER, FILE_ANY_ACCESS)