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.

119 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. sdbuslib.h
  5. Abstract:
  6. This is the include file that defines all constants and types for
  7. interfacing to the SD bus driver.
  8. Author:
  9. Neil Sandlin
  10. Revision History:
  11. --*/
  12. #ifndef _SDBUSLIBH_
  13. #define _SDBUSLIBH_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. NTSTATUS
  18. SdBusSendIoctl(
  19. IN ULONG IoControlCode,
  20. IN PDEVICE_OBJECT DeviceObject,
  21. IN PVOID InputBuffer OPTIONAL,
  22. IN ULONG InputBufferLength,
  23. OUT PVOID OutputBuffer OPTIONAL,
  24. IN ULONG OutputBufferLength
  25. );
  26. //
  27. // Device Name - this string is the name of the device. It is the name
  28. // that should be passed to NtOpenFile when accessing the device.
  29. //
  30. // Note: For devices that support multiple units, it should be suffixed
  31. // with the Ascii representation of the unit number.
  32. //
  33. #define IOCTL_SDBUS_BASE FILE_DEVICE_CONTROLLER
  34. #define DD_SDBUS_DEVICE_NAME "\\\\.\\Sdbus"
  35. //
  36. // IoControlCode values for this device.
  37. //
  38. // Warning: Remember that the low two bits of the code specify how the
  39. // buffers are passed to the driver!
  40. //
  41. #define IOCTL_SD_READ_BLOCK CTL_CODE(IOCTL_SDBUS_BASE, 3020, METHOD_BUFFERED, FILE_ANY_ACCESS)
  42. #define IOCTL_SD_WRITE_BLOCK CTL_CODE(IOCTL_SDBUS_BASE, 3021, METHOD_BUFFERED, FILE_ANY_ACCESS)
  43. #define IOCTL_SD_GET_DEVICE_PARMS CTL_CODE(IOCTL_SDBUS_BASE, 3022, METHOD_BUFFERED, FILE_ANY_ACCESS)
  44. #define IOCTL_SD_INTERFACE_OPEN CTL_CODE(IOCTL_SDBUS_BASE, 3023, METHOD_BUFFERED, FILE_ANY_ACCESS)
  45. #define IOCTL_SD_IO_READ CTL_CODE(IOCTL_SDBUS_BASE, 3024, METHOD_BUFFERED, FILE_ANY_ACCESS)
  46. #define IOCTL_SD_IO_WRITE CTL_CODE(IOCTL_SDBUS_BASE, 3025, METHOD_BUFFERED, FILE_ANY_ACCESS)
  47. #define IOCTL_SD_ACKNOWLEDGE_CARD_IRQ CTL_CODE(IOCTL_SDBUS_BASE, 3026, METHOD_BUFFERED, FILE_ANY_ACCESS)
  48. #define IOCTL_SD_INTERFACE_CLOSE CTL_CODE(IOCTL_SDBUS_BASE, 3027, METHOD_BUFFERED, FILE_ANY_ACCESS)
  49. #define IOCTL_SD_SUBMIT_REQUEST CTL_CODE(IOCTL_SDBUS_BASE, 3028, METHOD_BUFFERED, FILE_ANY_ACCESS)
  50. typedef struct _SDBUS_READ_PARAMETERS {
  51. USHORT Size;
  52. USHORT Version;
  53. PVOID Buffer;
  54. ULONG Length;
  55. ULONGLONG ByteOffset;
  56. } SDBUS_READ_PARAMETERS, *PSDBUS_READ_PARAMETERS;
  57. typedef struct _SDBUS_WRITE_PARAMETERS {
  58. USHORT Size;
  59. USHORT Version;
  60. PVOID Buffer;
  61. ULONG Length;
  62. ULONGLONG ByteOffset;
  63. } SDBUS_WRITE_PARAMETERS, *PSDBUS_WRITE_PARAMETERS;
  64. typedef struct _SDBUS_IO_READ_PARAMETERS {
  65. USHORT Size;
  66. USHORT Version;
  67. UCHAR CmdType;
  68. PVOID Buffer;
  69. ULONG Length;
  70. ULONG Offset;
  71. } SDBUS_IO_READ_PARAMETERS, *PSDBUS_IO_READ_PARAMETERS;
  72. typedef struct _SDBUS_IO_WRITE_PARAMETERS {
  73. USHORT Size;
  74. USHORT Version;
  75. UCHAR CmdType;
  76. PVOID Buffer;
  77. ULONG Length;
  78. ULONG Offset;
  79. } SDBUS_IO_WRITE_PARAMETERS, *PSDBUS_IO_WRITE_PARAMETERS;
  80. #endif