Source code of Windows XP (NT5)
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.

93 lines
2.0 KiB

  1. /**************************************************************************************************************************
  2. * DIAGSIOCTL.H SigmaTel STIR4200 diagnostic IOCTL definitions
  3. **************************************************************************************************************************
  4. * (C) Unpublished Copyright of Sigmatel, Inc. All Rights Reserved.
  5. *
  6. *
  7. * Created: 05/12/2000
  8. * Version 0.94
  9. * Edited: 05/24/2000
  10. * Version 0.96
  11. *
  12. *
  13. **************************************************************************************************************************/
  14. #ifndef DIAGSIOCTL_H
  15. #define DIAGSIOCTL_H
  16. //
  17. // Diagnostic operation codes
  18. //
  19. #define DIAGS_ENABLE 0
  20. #define DIAGS_DISABLE 1
  21. #define DIAGS_READ_REGISTERS 2
  22. #define DIAGS_WRITE_REGISTER 3
  23. #define DIAGS_BULK_OUT 4
  24. #define DIAGS_BULK_IN 5
  25. #define DIAGS_SEND 6
  26. #define DIAGS_RECEIVE 7
  27. #define DIAGS_GET_SPEED 8
  28. #define DIAGS_SET_SPEED 9
  29. //
  30. // Read Register structure
  31. //
  32. typedef struct _DIAGS_READ_REGISTERS_IOCTL
  33. {
  34. USHORT DiagsCode;
  35. UCHAR FirstRegister;
  36. UCHAR NumberRegisters;
  37. UCHAR pRegisterBuffer[1];
  38. } DIAGS_READ_REGISTERS_IOCTL, *PDIAGS_READ_REGISTERS_IOCTL;
  39. typedef struct _IR_REG
  40. {
  41. UCHAR RegNum;
  42. UCHAR RegVal;
  43. } IR_REG, *PIR_REG;
  44. //
  45. // Bulk structure
  46. //
  47. typedef struct _DIAGS_BULK_IOCTL
  48. {
  49. USHORT DiagsCode;
  50. USHORT DataSize;
  51. UCHAR pData[1];
  52. } DIAGS_BULK_IOCTL, *PDIAGS_BULK_IOCTL;
  53. //
  54. // Send structure
  55. //
  56. typedef struct _DIAGS_SEND_IOCTL
  57. {
  58. USHORT DiagsCode;
  59. USHORT ExtraBOFs;
  60. USHORT DataSize;
  61. UCHAR pData[1];
  62. } DIAGS_SEND_IOCTL, *PDIAGS_SEND_IOCTL;
  63. //
  64. // Receive structure
  65. //
  66. typedef struct _DIAGS_RECEIVE_IOCTL
  67. {
  68. USHORT DiagsCode;
  69. USHORT DataSize;
  70. UCHAR pData[1];
  71. } DIAGS_RECEIVE_IOCTL, *PDIAGS_RECEIVE_IOCTL;
  72. //
  73. // Speed get/set structure
  74. //
  75. typedef struct _DIAGS_SPEED_IOCTL
  76. {
  77. USHORT DiagsCode;
  78. ULONG Speed;
  79. } DIAGS_SPEED_IOCTL, *PDIAGS_SPEED_IOCTL;
  80. #define FILE_DEVICE_STIRUSB 0x8000
  81. #define IOCTL_PROTOCOL_DIAGS CTL_CODE(FILE_DEVICE_STIRUSB, 0 , METHOD_BUFFERED, FILE_ANY_ACCESS)
  82. #endif DIAGSIOCTL_H
  83.