#include <IOKit/usb/USBSpec.h>
IOKit/usb/USBSpec.h
Constants that both OS9 and OSX want to define, and whose values are
specified by the USB Standard.
Put in a seperate file so they can be included if the OS9 include file isn't already
included.
enum(anonymous)
@enum Endpoint type
@discussion Used in IOUSBFindEndpointRequest's type field
| kUSBControl | 0 | |
| kUSBIsoc | 1 | |
| kUSBBulk | 2 | |
| kUSBInterrupt | 3 | |
| kUSBAnyType | 255 |
enum(anonymous)
@enum Endpoint direction
@discussion Used in IOUSBFindEndpointRequest's direction field
| kUSBOut | 0 | |
| kUSBIn | 1 | |
| kUSBNone | 2 | |
| kUSBAnyDirn | 3 |
enum(anonymous)
@enum Device Request Type
@discussion This type is encoded in the bmRequestType field of a Device Request. It specifies the type of request: standard, class or vendor specific.
| kUSBStandard | 0 | |
| kUSBClass | 1 | |
| kUSBVendor | 2 |
enum(anonymous)
@enum Device Request Recipient
@discussion This recipient is encoded in the bmRequestType field of a Device Request. It specifies the type of recipient for a request: the device, the interface, or an endpoint.
| kUSBDevice | 0 | |
| kUSBInterface | 1 | |
| kUSBEndpoint | 2 | |
| kUSBOther | 3 |
enum(anonymous)
@enum Device Request
@discussion Specifies values for the bRequest field of a Device Request.
| kUSBRqGetStatus | 0 | |
| kUSBRqClearFeature | 1 | |
| kUSBRqGetState | 2 | |
| kUSBRqSetFeature | 3 | |
| kUSBRqReserved2 | 4 | |
| kUSBRqSetAddress | 5 | |
| kUSBRqGetDescriptor | 6 | |
| kUSBRqSetDescriptor | 7 | |
| kUSBRqGetConfig | 8 | |
| kUSBRqSetConfig | 9 | |
| kUSBRqGetInterface | 10 | |
| kUSBRqSetInterface | 11 | |
| kUSBRqSyncFrame | 12 | |
| kUSBSetSel | 48 | |
| kUSBSetIsochDelay | 49 |
enum(anonymous)
@enum USB Descriptors
@discussion Specifies values for diffent descriptor types.
| kUSBAnyDesc | 0 | Wildcard for searches |
| kUSBDeviceDesc | 1 | |
| kUSBConfDesc | 2 | |
| kUSBStringDesc | 3 | |
| kUSBInterfaceDesc | 4 | |
| kUSBEndpointDesc | 5 | |
| kUSBDeviceQualifierDesc | 6 | |
| kUSBOtherSpeedConfDesc | 7 | |
| kUSBInterfacePowerDesc | 8 | |
| kUSBOnTheGoDesc | 9 | |
| kUSDebugDesc | 10 | |
| kUSBInterfaceAssociationDesc | 11 | |
| kUSBBOSDescriptor | 15 | |
| kUSBDeviceCapability | 16 | |
| kUSBSuperSpeedEndpointCompanion | 48 | |
| kUSB3HUBDesc | 42 | |
| kUSBHIDDesc | 33 | |
| kUSBReportDesc | 34 | |
| kUSBPhysicalDesc | 35 | |
| kUSBHUBDesc | 41 |
enum(anonymous)
@enum Device Capability Types
@discussion Used with decoding the Device Capability descriptor
| kUSBDeviceCapabilityWirelessUSB | 1 | |
| kUSBDeviceCapabilityUSB20Extension | 2 | |
| kUSBDeviceCapabilitySuperSpeedUSB | 3 | |
| kUSBDeviceCapabilityContainerID | 4 | |
| kUSBDeviceCapabilityBillboard | 13 | |
| kUSBDeviceCapabilityBillboardAltMode | 15 |
enum(anonymous)
@enum Feature Selectors
@discussion Used with SET/CLEAR_FEATURE requests.
| kUSBFeatureEndpointStall | 0 | Endpoint |
| kUSBFeatureDeviceRemoteWakeup | 1 | Device |
| kUSBFeatureTestMode | 2 | Device |
| kUSBFeatureFunctionSuspend | 0 | Interface |
| kUSBFeatureU1Enable | 48 | Device |
| kUSBFeatureU2Enable | 49 | Device |
| kUSBFeatureLTMEnable | 50 | Device |
enum(anonymous)
@enum Miscellaneous bits and masks
| kUSBFunctionRemoteWakeCapableBit | 1 | GET_STATUS |
| kUSBFunctionRemoteWakeupBit | 2 | GET_STATUS |
| kUSBLowPowerSuspendStateBit | 1 | SET_FEATURE(FUNCTION_SUSPEND) |
| kUSBFunctionRemoteWakeEnableBit | 2 | SET_FEATURE(FUNCTION_SUSPEND) |
enum(anonymous)
@enum USB Power constants
@discussion Constants relating to USB Power.
| kUSB100mAAvailable | 50 | |
| kUSB500mAAvailable | 250 | |
| kUSB100mA | 50 | |
| kUSBAtrBusPowered | 128 | |
| kUSBAtrSelfPowered | 64 | |
| kUSBAtrRemoteWakeup | 32 | |
| kUSB2MaxPowerPerPort | 500 | |
| kUSB150mAAvailable | 75 | |
| kUSB900mAAvailable | 450 | |
| kUSB150mA | 75 | |
| kUSB3MaxPowerPerPort | 900 |
enum(anonymous)
@enum USB Release constants
@discussion Constants relating to USB releases as found in the bcdUSB field of the Device Descriptor.
| kUSBRel10 | 256 | |
| kUSBRel11 | 272 | |
| kUSBRel20 | 512 | |
| kUSBRel30 | 768 |
enum(anonymous)
@enum HID requests
@discussion Constants for HID requests.
| kHIDRqGetReport | 1 | |
| kHIDRqGetIdle | 2 | |
| kHIDRqGetProtocol | 3 | |
| kHIDRqSetReport | 9 | |
| kHIDRqSetIdle | 10 | |
| kHIDRqSetProtocol | 11 |
enum(anonymous)
@enum HID report types
@discussion Constants for the three kinds of HID reports.
| kHIDRtInputReport | 1 | |
| kHIDRtOutputReport | 2 | |
| kHIDRtFeatureReport | 3 |
enum(anonymous)
@enum HID Protocol
@discussion Used in the SET_PROTOCOL device request
| kHIDBootProtocolValue | 0 | |
| kHIDReportProtocolValue | 1 |
enum(anonymous)
| kUSBCapsLockKey | 57 | |
| kUSBNumLockKey | 83 | |
| kUSBScrollLockKey | 71 |
enum(anonymous)
@enum Device Class Codes
@discussion Constants for USB Device classes (bDeviceClass).
| kUSBCompositeClass | 0 | |
| kUSBCommClass | 2 | Deprecated |
| kUSBCommunicationClass | 2 | |
| kUSBHubClass | 9 | |
| kUSBDataClass | 10 | |
| kUSBPersonalHealthcareClass | 15 | |
| kUSBBillBoardClass | 17 | |
| kUSBDiagnosticClass | 220 | |
| kUSBWirelessControllerClass | 224 | |
| kUSBMiscellaneousClass | 239 | |
| kUSBApplicationSpecificClass | 254 | |
| kUSBVendorSpecificClass | 255 |
enum(anonymous)
@enum Interface Class
@discussion Constants for Interface classes (bInterfaceClass).
| kUSBAudioClass | 1 | Deprecated |
| kUSBAudioInterfaceClass | 1 | |
| kUSBCommunicationControlInterfaceClass | 2 | |
| kUSBCommunicationDataInterfaceClass | 10 | |
| kUSBHIDClass | 3 | |
| kUSBHIDInterfaceClass | 3 | |
| kUSBPhysicalInterfaceClass | 5 | |
| kUSBImageInterfaceClass | 6 | |
| kUSBPrintingClass | 7 | Deprecated |
| kUSBPrintingInterfaceClass | 7 | |
| kUSBMassStorageClass | 8 | Deprecated |
| kUSBMassStorageInterfaceClass | 8 | |
| kUSBChipSmartCardInterfaceClass | 11 | |
| kUSBContentSecurityInterfaceClass | 13 | |
| kUSBVideoInterfaceClass | 14 | |
| kUSBPersonalHealthcareInterfaceClass | 15 | |
| kUSBDiagnosticDeviceInterfaceClass | 220 | |
| kUSBWirelessControllerInterfaceClass | 224 | |
| kUSBApplicationSpecificInterfaceClass | 254 | |
| kUSBVendorSpecificInterfaceClass | 255 |
enum(anonymous)
@enum Interface SubClass
@discussion Constants for USB Interface SubClasses (bInterfaceSubClass).
| kUSBCompositeSubClass | 0 | |
| kUSBHubSubClass | 0 | |
| kUSBAudioControlSubClass | 1 | For the kUSBAudioInterfaceClass |
| kUSBAudioStreamingSubClass | 2 | |
| kUSBMIDIStreamingSubClass | 3 | |
| kUSBDFUSubClass | 1 | For the kUSBApplicationSpecificInterfaceClass |
| kUSBIrDABridgeSubClass | 2 | |
| kUSBTestMeasurementSubClass | 3 | |
| kUSBMassStorageRBCSubClass | 1 | For the kUSBMassStorageInterfaceClass |
| kUSBMassStorageATAPISubClass | 2 | |
| kUSBMassStorageQIC157SubClass | 3 | |
| kUSBMassStorageUFISubClass | 4 | |
| kUSBMassStorageSFF8070iSubClass | 5 | |
| kUSBMassStorageSCSISubClass | 6 | |
| kUSBHIDBootInterfaceSubClass | 1 | For the kUSBHIDInterfaceClass |
| kUSBCommDirectLineSubClass | 1 | For the kUSBCommunicationDataInterfaceClass |
| kUSBCommAbstractSubClass | 2 | |
| kUSBCommTelephoneSubClass | 3 | |
| kUSBCommMultiChannelSubClass | 4 | |
| kUSBCommCAPISubClass | 5 | |
| kUSBCommEthernetNetworkingSubClass | 6 | |
| kUSBATMNetworkingSubClass | 7 | |
| kUSBReprogrammableDiagnosticSubClass | 1 | For the kUSBDiagnosticDeviceInterfaceClass |
| kUSBRFControllerSubClass | 1 | For the kUSBWirelessControllerInterfaceClass |
| kUSBCommonClassSubClass | 2 | For the kUSBMiscellaneousClass |
| kUSBVideoControlSubClass | 1 | For the kUSBVideoInterfaceClass |
| kUSBVideoStreamingSubClass | 2 | |
| kUSBVideoInterfaceCollectionSubClass | 3 |
enumUSBClassSpecificDesc
| kUSBClassSpecificDescriptor | 36 |
enum(anonymous)
@enum Interface Protocol
@discussion Reported in the bInterfaceProtocol field of the Interface Descriptor.
| kHubSuperSpeedProtocol | 3 | For kUSBHubClass |
| kHIDNoInterfaceProtocol | 0 | For kUSBHIDInterfaceClass |
| kHIDKeyboardInterfaceProtocol | 1 | |
| kHIDMouseInterfaceProtocol | 2 | |
| kUSBVendorSpecificProtocol | 255 | |
| kUSB2ComplianceDeviceProtocol | 1 | For kUSBDiagnosticDeviceInterfaceClass |
| kUSBBluetoothProgrammingInterfaceProtocol | 1 | For kUSBWirelessControllerInterfaceClass |
| KUSBInterfaceAssociationDescriptorProtocol | 1 | For kUSBMiscellaneousClass |
| kMSCProtocolControlBulkInterrupt | 0 | For Mass Storage |
| kMSCProtocolControlBulk | 1 | |
| kMSCProtocolBulkOnly | 80 | |
| kMSCProtocolUSBAttachedSCSI | 98 |
enum(anonymous)
@enum DFU Class Attributes
@discussion
| kUSBDFUAttributesMask | 7 | |
| kUSBDFUCanDownloadBit | 0 | |
| kUSBDFUCanUploadBit | 1 | |
| kUSBDFUManifestationTolerantBit | 2 |
enum(anonymous)
@enum Printer Class Requests
@discussion The bRequest parameter for Printing Class Sepcific Requests
| kUSPrintingClassGetDeviceID | 0 | |
| kUSPrintingClassGePortStatus | 1 | |
| kUSPrintingClassSoftReset | 2 |
enum(anonymous)
@enum Endpoint Descriptor bits
@discussion Bit definitions for endpoint descriptor fields
| kUSBbEndpointAddressMask | 15 | |
| kUSBbEndpointDirectionBit | 7 | |
| kUSBbEndpointDirectionMask | 128 | |
| kUSBEndpointDirectionOut | 0 | |
| kUSBEndpointDirectionIn | 128 | |
| kUSBEndpointbmAttributesTransferTypeMask | 3 | |
| kUSBEndpointbmAttributesSynchronizationTypeMask | 12 | |
| kUSBEndpointbmAttributesSynchronizationTypeShift | 2 | |
| kUSBEndpointbmAttributesUsageTypeMask | 48 | |
| kUSBEndpointbmAttributesUsageTypeShift | 4 | |
| kUSBPeriodicInterruptUsageType | 0 | |
| kUSBNotificationInterruptUsageType | 1 | |
| kUSBNoSynchronizationIsocSyncType | 0 | |
| kUSBAsynchronousIsocSyncType | 1 | |
| kUSBAdaptiveIsocSyncType | 2 | |
| kUSBSynchronousIsocSyncType | 3 | |
| kUSBDataIsocUsageType | 0 | |
| kUSBFeedbackIsocUsageType | 1 | |
| kUSBImplicitFeedbackDataIsocUsageType | 2 |
enum(anonymous)
@enum USB Device Capability Type constants
@discussion Bit definitions and constants for different values of USB Device Capability types
| kUSB20ExtensionLPMSupported | 1 | Bit 1 of bmAttributes of USB 2.0 Extension Device Capability |
| kUSBSuperSpeedLTMCapable | 1 | Bit 1 of bmAttributes of SuperSpeed USB Device Capability |
| kUSBSuperSpeedSupportsLS | 0 | Value of wSpeedSupported indicating that the device supports low speed |
| kUSBSuperSpeedSupportsFS | 1 | Value of wSpeedSupported indicating that the device supports full speed |
| kUSBSuperSpeedSupportsHS | 2 | Value of wSpeedSupported indicating that the device supports high speed |
| kUSBSuperSpeedSupportsSS | 3 | Value of wSpeedSupported indicating that the device supports 5 Gbps |
enum(anonymous)
@enum USB Device Billboard Capability Vconn Power constants
@discussion Power needed by the adapter for full functionality
| kUSBBillboardVConn1Watt | 0 | |
| kUSBBillboardVConn1P5Watt | 1 | |
| kUSBBillboardVConn2Watt | 2 | |
| kUSBBillboardVConn3Watt | 3 | |
| kUSBBillboardVConn4Watt | 4 | |
| kUSBBillboardVConn5Watt | 5 | |
| kUSBBillboardVConn6Watt | 6 | |
| kUSBBillboardVConnReserved | 7 |
macrokUSBBillboardVConnNoPowerReq
#define kUSBBillboardVConnNoPowerReq 15
enum(anonymous)
@enum USB Device Billboard Capability bmConfigured constants
@ A bit pair signifying the state of Alternate Modes
| kUSBBillboardUnspecifiedError | 0 | |
| kUSBBillboardConfigNotAttempted | 1 | |
| kUSBBillboardConfigUnsuccessful | 2 | |
| kUSBBillboardAltModeConfigSuccess | 3 |
enum(anonymous)
@enum USB Device Billboard Capability AdditionalFailureInfo constants
@ A bit field signifying additional failure information
| kUSBBillboardAdditinalInfoNoPower | 1 | |
| kUSBBillboardAdditinalInfoNoUSBPD | 2 |
macrokUSBDeviceClass
@defineblock USB Descriptor and IORegistry constants
@discussion Various constants used to describe the fields in the various USB Device Descriptors and IORegistry names used for some of those fields
@define kUSBDeviceClass The field in the USB Device Descriptor corresponding to the device class
@define kUSBDeviceSubClass The field in the USB Device Descriptor corresponding to the device sub class
@define kUSBDeviceProtocol The field in the USB Device Descriptor corresponding to the device protocol
@define kUSBDeviceMaxPacketSize The field in the USB Device Descriptor corresponding to the maximum packet size for endpoint 0
@define kUSBVendorID The field in the USB Device Descriptor corresponding to the device USB Vendor ID
@define kUSBVendorName Deprecated. Use kUSBVendorID
@define kUSBProductID The field in the USB Device Descriptor corresponding to the device USB Product ID
@define kUSBProductName Deprecated. Use kUSBProductID
@define kUSBDeviceReleaseNumber The field in the USB Device Descriptor corresponding to the device release version
@define kUSBManufacturerStringIndex The field in the USB Device Descriptor corresponding to the index for the manufacturer's string
@define kUSBProductStringIndex The field in the USB Device Descriptor corresponding to the index for the product name's string
@define kUSBSerialNumberStringIndex The field in the USB Device Descriptor corresponding to the index for the serial number's string
@define kUSBDeviceNumConfigs The field in the USB Configuration Descriptor corresponding to the number of configurations
@define kUSBInterfaceNumber The field in the USB Configuration Descriptor corresponding to the number of configurations
@define kUSBAlternateSetting The field in the USB Configuration Descriptor corresponding to the number of configurations
@define kUSBNumEndpoints The field in the USB Configuration Descriptor corresponding to the number of configurations
@define kUSBInterfaceClass The field in the USB Interface Descriptor corresponding to the interface class
@define kUSBInterfaceSubClass The field in the USB Interface Descriptor corresponding to the interface sub class
@define kUSBInterfaceProtocol The field in the USB Interface Descriptor corresponding to the interface protocol
@define kUSBInterfaceStringIndex The field in the USB Interface Descriptor corresponding to the index for the interface name's string
@define kUSBConfigurationValue The field in the USB Interface Descriptor corresponding to the configuration
@define kUSBProductString IORegistry key for the device's USB Product string
@define kUSBVendorString IORegistry key for the device's USB manufacturer string
@define kUSBSerialNumberString IORegistry key for the device's USB serial number string
@define kUSB1284DeviceID IORegistry key for the 1284 Device ID of a printer
#define kUSBDeviceClass kUSBHostMatchingPropertyDeviceClass
macrokUSBDeviceSubClass
#define kUSBDeviceSubClass kUSBHostMatchingPropertyDeviceSubClass
macrokUSBDeviceProtocol
#define kUSBDeviceProtocol kUSBHostMatchingPropertyDeviceProtocol
macrokUSBDeviceMaxPacketSize
#define kUSBDeviceMaxPacketSize kUSBHostDevicePropertyMaxPacketSize
macrokUSBVendorID
#define kUSBVendorID kUSBHostMatchingPropertyVendorID
macrokUSBProductID
#define kUSBProductID kUSBHostMatchingPropertyProductID
macrokUSBDeviceReleaseNumber
#define kUSBDeviceReleaseNumber kUSBHostMatchingPropertyDeviceReleaseNumber
macrokUSBManufacturerStringIndex
#define kUSBManufacturerStringIndex kUSBHostDevicePropertyManufacturerStringIndex
macrokUSBProductStringIndex
#define kUSBProductStringIndex kUSBHostDevicePropertyProductStringIndex
macrokUSBSerialNumberStringIndex
#define kUSBSerialNumberStringIndex kUSBHostDevicePropertySerialNumberStringIndex
macrokUSBDeviceNumConfigs
#define kUSBDeviceNumConfigs kUSBHostDevicePropertyNumConfigs
macrokUSBInterfaceNumber
#define kUSBInterfaceNumber kUSBHostMatchingPropertyInterfaceNumber
macrokUSBAlternateSetting
#define kUSBAlternateSetting kUSBHostInterfacePropertyAlternateSetting
macrokUSBNumEndpoints
#define kUSBNumEndpoints kUSBHostInterfacePropertyNumEndpoints
macrokUSBInterfaceClass
#define kUSBInterfaceClass kUSBHostMatchingPropertyInterfaceClass
macrokUSBInterfaceSubClass
#define kUSBInterfaceSubClass kUSBHostMatchingPropertyInterfaceSubClass
macrokUSBInterfaceProtocol
#define kUSBInterfaceProtocol kUSBHostMatchingPropertyInterfaceProtocol
macrokUSBInterfaceStringIndex
#define kUSBInterfaceStringIndex kUSBHostInterfacePropertyStringIndex
macrokUSBConfigurationValue
#define kUSBConfigurationValue kUSBHostMatchingPropertyConfigurationValue
macrokUSBInterfaceString
#define kUSBInterfaceString kUSBHostInterfacePropertyString
macrokUSB1284DeviceID
#define kUSB1284DeviceID "1284 Device ID"
macrokUSBCompatibilityMatch
#define kUSBCompatibilityMatch "USBCompatibilityMatch"
macrokUSBStandardVersion
#define kUSBStandardVersion kUSBHostDevicePropertyStandardVersion
macrokUSBSpecReleaseNumber
#define kUSBSpecReleaseNumber kUSBStandardVersion
macrokUSBDeviceContainerID
#define kUSBDeviceContainerID kUSBContainerID
macrokUSBContainerID
#define kUSBContainerID kUSBHostDevicePropertyContainerID
macrokUSBProductString
#define kUSBProductString kUSBHostDevicePropertyProductString
macrokUSBVendorString
#define kUSBVendorString kUSBHostDevicePropertyVendorString
macrokUSBSerialNumberString
#define kUSBSerialNumberString kUSBHostDevicePropertySerialNumberString
enum(anonymous)
@enum Apple USB Vendor ID
@discussion Apple's vendor ID, assigned by the USB-IF
| kAppleVendorID | 1452 |