#include <IOKit/usb/USBSpec.h>

IOKit/usb/USBSpec.h Kernel.framework

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.
32 macros · 29 enums

enum(anonymous)

@enum Endpoint type @discussion Used in IOUSBFindEndpointRequest's type field
underlying type unsigned int
kUSBControl0
kUSBIsoc1
kUSBBulk2
kUSBInterrupt3
kUSBAnyType255

enum(anonymous)

@enum Endpoint direction @discussion Used in IOUSBFindEndpointRequest's direction field
underlying type unsigned int
kUSBOut0
kUSBIn1
kUSBNone2
kUSBAnyDirn3

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.
underlying type unsigned int
kUSBStandard0
kUSBClass1
kUSBVendor2

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.
underlying type unsigned int
kUSBDevice0
kUSBInterface1
kUSBEndpoint2
kUSBOther3

enum(anonymous)

@enum Device Request @discussion Specifies values for the bRequest field of a Device Request.
underlying type unsigned int
kUSBRqGetStatus0
kUSBRqClearFeature1
kUSBRqGetState2
kUSBRqSetFeature3
kUSBRqReserved24
kUSBRqSetAddress5
kUSBRqGetDescriptor6
kUSBRqSetDescriptor7
kUSBRqGetConfig8
kUSBRqSetConfig9
kUSBRqGetInterface10
kUSBRqSetInterface11
kUSBRqSyncFrame12
kUSBSetSel48
kUSBSetIsochDelay49

enum(anonymous)

@enum USB Descriptors @discussion Specifies values for diffent descriptor types.
underlying type unsigned int
kUSBAnyDesc0Wildcard for searches
kUSBDeviceDesc1
kUSBConfDesc2
kUSBStringDesc3
kUSBInterfaceDesc4
kUSBEndpointDesc5
kUSBDeviceQualifierDesc6
kUSBOtherSpeedConfDesc7
kUSBInterfacePowerDesc8
kUSBOnTheGoDesc9
kUSDebugDesc10
kUSBInterfaceAssociationDesc11
kUSBBOSDescriptor15
kUSBDeviceCapability16
kUSBSuperSpeedEndpointCompanion48
kUSB3HUBDesc42
kUSBHIDDesc33
kUSBReportDesc34
kUSBPhysicalDesc35
kUSBHUBDesc41

enum(anonymous)

@enum Device Capability Types @discussion Used with decoding the Device Capability descriptor
underlying type unsigned int
kUSBDeviceCapabilityWirelessUSB1
kUSBDeviceCapabilityUSB20Extension2
kUSBDeviceCapabilitySuperSpeedUSB3
kUSBDeviceCapabilityContainerID4
kUSBDeviceCapabilityBillboard13
kUSBDeviceCapabilityBillboardAltMode15

enum(anonymous)

@enum Feature Selectors @discussion Used with SET/CLEAR_FEATURE requests.
underlying type unsigned int
kUSBFeatureEndpointStall0Endpoint
kUSBFeatureDeviceRemoteWakeup1Device
kUSBFeatureTestMode2Device
kUSBFeatureFunctionSuspend0Interface
kUSBFeatureU1Enable48Device
kUSBFeatureU2Enable49Device
kUSBFeatureLTMEnable50Device

enum(anonymous)

@enum Miscellaneous bits and masks
underlying type unsigned int
kUSBFunctionRemoteWakeCapableBit1GET_STATUS
kUSBFunctionRemoteWakeupBit2GET_STATUS
kUSBLowPowerSuspendStateBit1SET_FEATURE(FUNCTION_SUSPEND)
kUSBFunctionRemoteWakeEnableBit2SET_FEATURE(FUNCTION_SUSPEND)

enum(anonymous)

@enum USB Power constants @discussion Constants relating to USB Power.
underlying type unsigned int
kUSB100mAAvailable50
kUSB500mAAvailable250
kUSB100mA50
kUSBAtrBusPowered128
kUSBAtrSelfPowered64
kUSBAtrRemoteWakeup32
kUSB2MaxPowerPerPort500
kUSB150mAAvailable75
kUSB900mAAvailable450
kUSB150mA75
kUSB3MaxPowerPerPort900

enum(anonymous)

@enum USB Release constants @discussion Constants relating to USB releases as found in the bcdUSB field of the Device Descriptor.
underlying type unsigned int
kUSBRel10256
kUSBRel11272
kUSBRel20512
kUSBRel30768

enum(anonymous)

@enum HID requests @discussion Constants for HID requests.
underlying type unsigned int
kHIDRqGetReport1
kHIDRqGetIdle2
kHIDRqGetProtocol3
kHIDRqSetReport9
kHIDRqSetIdle10
kHIDRqSetProtocol11

enum(anonymous)

@enum HID report types @discussion Constants for the three kinds of HID reports.
underlying type unsigned int
kHIDRtInputReport1
kHIDRtOutputReport2
kHIDRtFeatureReport3

enum(anonymous)

@enum HID Protocol @discussion Used in the SET_PROTOCOL device request
underlying type unsigned int
kHIDBootProtocolValue0
kHIDReportProtocolValue1

enum(anonymous)

underlying type unsigned int
kUSBCapsLockKey57
kUSBNumLockKey83
kUSBScrollLockKey71

enum(anonymous)

@enum Device Class Codes @discussion Constants for USB Device classes (bDeviceClass).
underlying type unsigned int
kUSBCompositeClass0
kUSBCommClass2Deprecated
kUSBCommunicationClass2
kUSBHubClass9
kUSBDataClass10
kUSBPersonalHealthcareClass15
kUSBBillBoardClass17
kUSBDiagnosticClass220
kUSBWirelessControllerClass224
kUSBMiscellaneousClass239
kUSBApplicationSpecificClass254
kUSBVendorSpecificClass255

enum(anonymous)

@enum Interface Class @discussion Constants for Interface classes (bInterfaceClass).
underlying type unsigned int
kUSBAudioClass1Deprecated
kUSBAudioInterfaceClass1
kUSBCommunicationControlInterfaceClass2
kUSBCommunicationDataInterfaceClass10
kUSBHIDClass3
kUSBHIDInterfaceClass3
kUSBPhysicalInterfaceClass5
kUSBImageInterfaceClass6
kUSBPrintingClass7Deprecated
kUSBPrintingInterfaceClass7
kUSBMassStorageClass8Deprecated
kUSBMassStorageInterfaceClass8
kUSBChipSmartCardInterfaceClass11
kUSBContentSecurityInterfaceClass13
kUSBVideoInterfaceClass14
kUSBPersonalHealthcareInterfaceClass15
kUSBDiagnosticDeviceInterfaceClass220
kUSBWirelessControllerInterfaceClass224
kUSBApplicationSpecificInterfaceClass254
kUSBVendorSpecificInterfaceClass255

enum(anonymous)

Obsolete
underlying type unsigned int
kUSBDisplayClass4Obsolete

enum(anonymous)

@enum Interface SubClass @discussion Constants for USB Interface SubClasses (bInterfaceSubClass).
underlying type unsigned int
kUSBCompositeSubClass0
kUSBHubSubClass0
kUSBAudioControlSubClass1For the kUSBAudioInterfaceClass
kUSBAudioStreamingSubClass2
kUSBMIDIStreamingSubClass3
kUSBDFUSubClass1For the kUSBApplicationSpecificInterfaceClass
kUSBIrDABridgeSubClass2
kUSBTestMeasurementSubClass3
kUSBMassStorageRBCSubClass1For the kUSBMassStorageInterfaceClass
kUSBMassStorageATAPISubClass2
kUSBMassStorageQIC157SubClass3
kUSBMassStorageUFISubClass4
kUSBMassStorageSFF8070iSubClass5
kUSBMassStorageSCSISubClass6
kUSBHIDBootInterfaceSubClass1For the kUSBHIDInterfaceClass
kUSBCommDirectLineSubClass1For the kUSBCommunicationDataInterfaceClass
kUSBCommAbstractSubClass2
kUSBCommTelephoneSubClass3
kUSBCommMultiChannelSubClass4
kUSBCommCAPISubClass5
kUSBCommEthernetNetworkingSubClass6
kUSBATMNetworkingSubClass7
kUSBReprogrammableDiagnosticSubClass1For the kUSBDiagnosticDeviceInterfaceClass
kUSBRFControllerSubClass1For the kUSBWirelessControllerInterfaceClass
kUSBCommonClassSubClass2For the kUSBMiscellaneousClass
kUSBVideoControlSubClass1For the kUSBVideoInterfaceClass
kUSBVideoStreamingSubClass2
kUSBVideoInterfaceCollectionSubClass3

enumUSBClassSpecificDesc

underlying type unsigned int
kUSBClassSpecificDescriptor36

enum(anonymous)

@enum Interface Protocol @discussion Reported in the bInterfaceProtocol field of the Interface Descriptor.
underlying type unsigned int
kHubSuperSpeedProtocol3For kUSBHubClass
kHIDNoInterfaceProtocol0For kUSBHIDInterfaceClass
kHIDKeyboardInterfaceProtocol1
kHIDMouseInterfaceProtocol2
kUSBVendorSpecificProtocol255
kUSB2ComplianceDeviceProtocol1For kUSBDiagnosticDeviceInterfaceClass
kUSBBluetoothProgrammingInterfaceProtocol1For kUSBWirelessControllerInterfaceClass
KUSBInterfaceAssociationDescriptorProtocol1For kUSBMiscellaneousClass
kMSCProtocolControlBulkInterrupt0For Mass Storage
kMSCProtocolControlBulk1
kMSCProtocolBulkOnly80
kMSCProtocolUSBAttachedSCSI98

enum(anonymous)

@enum DFU Class Attributes @discussion
underlying type unsigned int
kUSBDFUAttributesMask7
kUSBDFUCanDownloadBit0
kUSBDFUCanUploadBit1
kUSBDFUManifestationTolerantBit2

enum(anonymous)

@enum Printer Class Requests @discussion The bRequest parameter for Printing Class Sepcific Requests
underlying type unsigned int
kUSPrintingClassGetDeviceID0
kUSPrintingClassGePortStatus1
kUSPrintingClassSoftReset2

enum(anonymous)

@enum Endpoint Descriptor bits @discussion Bit definitions for endpoint descriptor fields
underlying type unsigned int
kUSBbEndpointAddressMask15
kUSBbEndpointDirectionBit7
kUSBbEndpointDirectionMask128
kUSBEndpointDirectionOut0
kUSBEndpointDirectionIn128
kUSBEndpointbmAttributesTransferTypeMask3
kUSBEndpointbmAttributesSynchronizationTypeMask12
kUSBEndpointbmAttributesSynchronizationTypeShift2
kUSBEndpointbmAttributesUsageTypeMask48
kUSBEndpointbmAttributesUsageTypeShift4
kUSBPeriodicInterruptUsageType0
kUSBNotificationInterruptUsageType1
kUSBNoSynchronizationIsocSyncType0
kUSBAsynchronousIsocSyncType1
kUSBAdaptiveIsocSyncType2
kUSBSynchronousIsocSyncType3
kUSBDataIsocUsageType0
kUSBFeedbackIsocUsageType1
kUSBImplicitFeedbackDataIsocUsageType2

enum(anonymous)

@enum USB Device Capability Type constants @discussion Bit definitions and constants for different values of USB Device Capability types
underlying type unsigned int
kUSB20ExtensionLPMSupported1Bit 1 of bmAttributes of USB 2.0 Extension Device Capability
kUSBSuperSpeedLTMCapable1Bit 1 of bmAttributes of SuperSpeed USB Device Capability
kUSBSuperSpeedSupportsLS0Value of wSpeedSupported indicating that the device supports low speed
kUSBSuperSpeedSupportsFS1Value of wSpeedSupported indicating that the device supports full speed
kUSBSuperSpeedSupportsHS2Value of wSpeedSupported indicating that the device supports high speed
kUSBSuperSpeedSupportsSS3Value 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
underlying type unsigned int
kUSBBillboardVConn1Watt0
kUSBBillboardVConn1P5Watt1
kUSBBillboardVConn2Watt2
kUSBBillboardVConn3Watt3
kUSBBillboardVConn4Watt4
kUSBBillboardVConn5Watt5
kUSBBillboardVConn6Watt6
kUSBBillboardVConnReserved7

macrokUSBBillboardVConnNoPowerReq

#define kUSBBillboardVConnNoPowerReq 15

enum(anonymous)

@enum USB Device Billboard Capability bmConfigured constants @ A bit pair signifying the state of Alternate Modes
underlying type unsigned int
kUSBBillboardUnspecifiedError0
kUSBBillboardConfigNotAttempted1
kUSBBillboardConfigUnsuccessful2
kUSBBillboardAltModeConfigSuccess3

enum(anonymous)

@enum USB Device Billboard Capability AdditionalFailureInfo constants @ A bit field signifying additional failure information
underlying type unsigned int
kUSBBillboardAdditinalInfoNoPower1
kUSBBillboardAdditinalInfoNoUSBPD2

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

macrokUSBVendorName

#define kUSBVendorName kUSBVendorID
bad name - keep for backward compatibility

macrokUSBProductName

#define kUSBProductName kUSBProductID
bad name - keep for backward compatibility

macrokUSB1284DeviceID

#define kUSB1284DeviceID "1284 Device ID"

macrokUSBCompatibilityMatch

#define kUSBCompatibilityMatch "USBCompatibilityMatch"

macrokUSBSpecReleaseNumber

#define kUSBSpecReleaseNumber kUSBStandardVersion

macrokUSBDeviceContainerID

#define kUSBDeviceContainerID kUSBContainerID

enum(anonymous)

@enum Apple USB Vendor ID @discussion Apple's vendor ID, assigned by the USB-IF
underlying type unsigned int
kAppleVendorID1452