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.

220 lines
6.7 KiB

  1. #ifndef __MSSIDEF_H__
  2. #define __MSSIDEF_H__
  3. /**
  4. Copyright (c) 1997 Philips CE - I&C
  5. Module Name : vendorcm.h
  6. Creation Date : 12 September 1997
  7. First Author : Paul Oosterhof
  8. Product : nala camera
  9. Description : This include file contains the definition of the
  10. vendor specific command values.
  11. The values are derived from the SSI: AR18-97-D051.
  12. It has been placed in a separate file to increase
  13. the readability of philpcam.c, which includes this file.
  14. History :
  15. ------------+---------------+---------------------------------------------------
  16. Date | Author | reason
  17. ------------+---------------+---------------------------------------------------
  18. sept.22, 98 | Paul | optimized for NT5
  19. ------------+---------------+---------------------------------------------------
  20. | |
  21. ------------+---------------+---------------------------------------------------
  22. | |
  23. ------------+---------------+---------------------------------------------------
  24. **/
  25. /*
  26. The vendor specific control commands are defined by the USB spec as follows:
  27. +---------------+----------+--------+--------+---------++------------+
  28. | bmRequestType | bRequest | wValue | wIndex | wLength || Data-field |
  29. +---------------+----------+--------+--------+---------++------------+
  30. bmRequestType: D7 defines transfer direction: 0 = Host to device; 1 = Device to host.
  31. D6..5: 2 equals vendor specific
  32. D4..0: Recipient ; 2 = endpoint
  33. bRequest : Specifies requests, see define table
  34. wValue : Content of this field depends on the request, see define table
  35. wIndex : Content of this field depends on the request, see define table
  36. wLength : Length of the datafield transferred in the second phase
  37. of the control transfer
  38. data-field : Depends on the request.
  39. NTSTATUS
  40. USBCAMD_ControlVendorCommand(
  41. IN PVOID DeviceContext,
  42. IN UCHAR Request,
  43. IN USHORT Value,
  44. IN USHORT Index,
  45. IN PVOID Buffer,
  46. IN OUT PULONG BufferLength,
  47. IN BOOLEAN GetData,
  48. IN PCOMMAND_COMPLETE_FUNCTION CommandComplete,
  49. IN PVOID CommandContext
  50. );
  51. Returns:
  52. Returns NTSTATUS code from command of STATUS_PENDING if command is deferred.
  53. DeviceContext: Minidriver device context
  54. Request : value for the bRequest field in the USB vendor command
  55. This field contains the Vendor-Specific Video Request codes.
  56. Value : value for the wValue field in the vendor command
  57. This field contains the formatter information belonging to
  58. the previous defined request code.
  59. Index : value for the wIndex field in the vendor command
  60. This field contains the endpoint or interface number to which
  61. the command or request is addressed.
  62. Buffer : data buffer if the command has data, may be NULL
  63. BufferLength : Pointer to bufferlength of buffer in bytes, may be NULL if
  64. Buffer is NULL.
  65. Will be filled with number of bytes returned if getData == TRUE.
  66. GetData : Indicates that the data is to be transferred from device to host
  67. CommandComplete: function called when command is completed.
  68. CommandContext: context passed to CommandComplete function
  69. */
  70. #define SEND FALSE
  71. #define GET TRUE
  72. #define SELECT_INTERFACE 1
  73. #define SELECT_ENDPOINT 2
  74. #define AC_INTERFACE 0
  75. #define AS_INTERFACE 1
  76. #define VC_INTERFACE 2
  77. #define VS_INTERFACE 3
  78. #define HID_INTERFACE 4
  79. #define FACTORY_INTERFACE 0xFF
  80. #define AUDIO_ENDPOINT 5
  81. #define VIDEO_ENDPOINT 4
  82. #define INTERRUPT_ENDPOINT 2
  83. // The following defines will be used to fill the bRequest field of the vendor
  84. // specific commands.
  85. #define REQUEST_UNDEFINED 0X00
  86. #define SET_LUM_CTL 0x01
  87. #define GET_LUM_CTL 0x02
  88. #define SET_CHROM_CTL 0x03
  89. #define GET_CHROM_CTL 0x04
  90. #define SET_STATUS_CTL 0x05
  91. #define GET_STATUS_CTL 0x06
  92. #define SET_EP_STREAM_CTL 0x07
  93. #define GET_EP_STREAM_CTL 0x08
  94. #define SET_FACTORY_CTL 0x09
  95. #define GET_FACTORY_CTL 0x0A
  96. // The following defines will be used to fill the Value field of the vendor
  97. // specific commands.
  98. // Luminance formatters
  99. #define LUM_UNDEFINED 0x0000
  100. #define AGC_MODE 0x2000
  101. #define PRESET_AGC 0x2100
  102. #define SHUTTER_MODE 0x2200
  103. #define PRESET_SHUTTER 0x2300
  104. #define PRESET_CONTOUR 0x2400
  105. #define AUTO_CONTOUR 0x2500
  106. #define BACK_LIGHT_COMPENSATION 0x2600
  107. #define CONTRAST 0x2700
  108. #define DYNAMIC_NOISE_CONTROL 0x2800
  109. #define FLICKERLESS 0x2900
  110. #define BRIGHTNESS 0x2B00
  111. #define GAMMA 0x2C00
  112. #define AE_CONTROL_SPEED 0x2A00
  113. // Chrominance Formatters
  114. #define CHROM_UNDEFINED 0x0000
  115. #define WB_MODE 0x1000
  116. #define AWB_CONTROL_SPEED 0x1100
  117. #define AWB_CONTROL_DELAY 0x1200
  118. #define RED_GAIN 0x1300
  119. #define BLUE_GAIN 0x1400
  120. #define COLOR_MODE 0x1500
  121. #define SATURATION 0x1700 // ????? No number 0x16
  122. // Status Formatters
  123. #define STATUS_UNDEFINED 0x0000
  124. #define SAVE_USER_DEFAULTS 0x0200
  125. #define RESTORE_USER_DEFAULTS 0x0300
  126. #define RESTORE_FACTORY_DEFAULTS 0x0400
  127. #define EEPROM_READ_PTR 0x0500
  128. #define VCMDSP_READ_PTR 0x0600 // ????? No number 0x07
  129. #define SNAPSHOT_MODE 0x0800
  130. #define AE_WB_VARIABLES 0x0900
  131. #define PAN 0x0A00
  132. #define TILT 0x0B00
  133. #define SENSOR_TYPE 0x0C00
  134. #define FACTORY_MODE 0x3000
  135. #define RELEASE_NUMBER 0x0D00
  136. #define PAL_MR_SENSOR 1
  137. #define VGA_SENSOR 0
  138. // Endpoint Stream Control Formatters
  139. #define VIDEO_OUTPUT_CONTROL_FORMATTER 0x0100
  140. // endpoint stream data definitions
  141. #define bFRAMERATE 0X00
  142. #define bCOMPRESSIONFACT 0X01
  143. #define bVIDEOOUTPUTTYPE 0X02
  144. #define FRAMERATE_375 0x04
  145. #define FRAMERATE_5 0x05
  146. #define FRAMERATE_75 0x08
  147. #define FRAMERATE_10 0x0A
  148. #define FRAMERATE_12 0x0C
  149. #define FRAMERATE_15 0x0F
  150. #define FRAMERATE_20 0x14
  151. #define FRAMERATE_24 0x18
  152. #define FRAMERATE_VGA 0xFF
  153. #define UNCOMPRESSED 0x01
  154. #define COMPRESSED_3 0x03
  155. #define COMPRESSED_4 0x04
  156. #define CIF_FORMAT 0x01
  157. #define QCIF_FORMAT 0x02
  158. #define SQCIF_FORMAT 0x03
  159. #define VGA_FORMAT 0x04
  160. // Factory Control Formatters
  161. // The following defines will be used to fill the wIndex field of the vendor
  162. // specific commands.
  163. #define INDEX_UNDEFINED 0X00#
  164. #endif