Difference between revisions of "Unit USB"
Line 1,081: | Line 1,081: | ||
| <code>USB_SUBCLASS_VENDOR_SPECIFIC = $ff;</code> | | <code>USB_SUBCLASS_VENDOR_SPECIFIC = $ff;</code> | ||
| Vendor Specific | | Vendor Specific | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB protocol code constants''' <code> USB_PROTOCOL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|bInterfaceProtocol | ||
+ | |- | ||
+ | |colspan="2"|See: http://www.usb.org/developers/defined_class/ | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Communications Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_NONE = 0;</code> | ||
+ | | Abstract Control Model - No class specific protocol required | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_AT_V25TER = 1;</code> | ||
+ | | Abstract Control Model - AT Commands: V.250 etc | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_AT_PCCA101 = 2;</code> | ||
+ | | Abstract Control Model - AT Commands defined by PCCA-101 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_AT_PCCA101_WAKE = 3;</code> | ||
+ | | Abstract Control Model - AT Commands defined by PCCA-101 & Annex O | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_AT_GSM = 4;</code> | ||
+ | | Abstract Control Model - AT Commands defined by GSM 07.07 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_AT_3G = 5;</code> | ||
+ | | Abstract Control Model - AT Commands defined by 3GPP 27.007 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_AT_CDMA = 6;</code> | ||
+ | | Abstract Control Model - AT Commands defined by TIA for CDMA | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_ACM_VENDOR = $ff;</code> | ||
+ | | Abstract Control Model - Vendor-specific | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_EEM = 7;</code> | ||
+ | | Ethernet Emulation Model | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_NCM_NTB = 1;</code> | ||
+ | | Network Control Model - Network Transfer Block | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CDC_MBIM_NTB = 2;</code> | ||
+ | | Network Transfer Block | ||
+ | |- | ||
+ | |colspan="2"|''Still Image Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_IMAGE_DEFAULT = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Mass Storage Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MASS_STORAGE_CBI = $00;</code> | ||
+ | | CBI (with command completion interrupt) USB Mass Storage Class Control/Bulk/Interrupt Transport | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MASS_STORAGE_CB = $01;</code> | ||
+ | | CBI (with no command completion interrupt) USB Mass Storage Class Control/Bulk/Interrupt Transport | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MASS_STORAGE_BBB = $50;</code> | ||
+ | | BBB USB Mass Storage Class Bulk-Only Transport | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MASS_STORAGE_UAS = $62;</code> | ||
+ | | UAS | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MASS_STORAGE_VENDOR_SPECIFIC = $ff;</code> | ||
+ | | Specific to device vendor, De facto use | ||
+ | |- | ||
+ | |colspan="2"|''Hub Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_HUB_FULLSPEED = $00;</code> | ||
+ | | Full speed Hub | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_HUB_HIGHSPEED_SINGLE_TT = $01;</code> | ||
+ | | Hi-speed hub with single Transaction Translator | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_HUB_HIGHSPEED_MULTI_TT = $02;</code> | ||
+ | | Hi-speed hub with multiple Transaction Translators | ||
+ | |- | ||
+ | |colspan="2"|''Content Security Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_CONTENT_SECURITY_DEFAULT = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Audio/Video Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_AUDIO_VIDEO_DEFAULT = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Billboard Devices'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_BILLBOARD_DEFAULT = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Diagnostic Device'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_DIAGNOSTIC_DEFAULT = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Wireless Controller'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_BLUETOOTH = $01;</code> | ||
+ | | See: http://www.bluetooth.com/ | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_UWB = $02;</code> | ||
+ | | See: Wireless USB Specification in Chapter 8 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_NDIS = $03;</code> | ||
+ | | See: http://www.microsoft.com/windowsmobile/mobileoperators/default.mspx | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_BLUETOOTH_AMP = $04;</code> | ||
+ | | See: http://www.bluetooth.com/ | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_USB_HOST = $01;</code> | ||
+ | | Host Wire Adapter Control/Data interface. Definition can be found in the Wireless USB Specification in Chapter 8 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_USB_DEVICE = $02;</code> | ||
+ | | Device Wire Adapter Control/Data interface. Definition can be found in the Wireless USB Specification in Chapter 8 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_WIRELESS_CONTROLLER_USB_DEVOCE_ISOC = $03;</code> | ||
+ | | Device Wire Adapter Isochronous interface. Definition can be found in the Wireless USB Specification in Chapter 8 | ||
+ | |- | ||
+ | |colspan="2"|''Miscellaneous'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_ACTIVESYNC = $01;</code> | ||
+ | | Active Sync device | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_PALMSYNC = $02;</code> | ||
+ | | Palm Sync | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_IAD = $01;</code> | ||
+ | | Interface Association Descriptor. The usage of this class code triple is defined in the Interface Association Descriptor ECN | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_WAMP = $02;</code> | ||
+ | | Wire Adapter Multifunction Peripheral programming interface. Definition can be found in the Wireless USB Specification in Chapter 8. | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_CBAF = $01;</code> | ||
+ | | Cable Based Association Framework. This is defined in the Association Model addendum to the Wireless USB specification. | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_ETHERNET = $01;</code> | ||
+ | | RNDIS over Ethernet | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_WIFI = $02;</code> | ||
+ | | RNDIS over WiFi | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_WIMAX = $03;</code> | ||
+ | | RNDIS over WiMAX | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_WWAN = $04;</code> | ||
+ | | RNDIS over WWAN | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_IPV4 = $05;</code> | ||
+ | | RNDIS for Raw IPv4 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_IPV6 = $06;</code> | ||
+ | | RNDIS for Raw IPv6 | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_RNDIS_GPRS = $07;</code> | ||
+ | | RNDIS for GPRS | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_USB3VISION_CONTROL = $00;</code> | ||
+ | | USB3 Vision Control Interface | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_USB3VISION_EVENT = $01;</code> | ||
+ | | USB3 Vision Event Interface | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_MISCELLANEOUS_USB3VISION_STREAM = $02;</code> | ||
+ | | USB3 Vision Streaming Interface | ||
+ | |- | ||
+ | |colspan="2"|''Application Specific'' | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_APPLICATION_SPECIFIC_DFU_DEFAULT = $01;</code> | ||
+ | | Device Firmware Upgrade | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_APPLICATION_SPECIFIC_IRDA_DEFAULT = $00;</code> | ||
+ | | IRDA Bridge device | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_APPLICATION_SPECIFIC_TMC_DEFAULT = $00;</code> | ||
+ | | USB Test and Measurement Device | ||
+ | |- | ||
+ | | <code>USB_PROTOCOL_APPLICATION_SPECIFIC_TMC_488 = $01;</code> | ||
+ | | USB Test and Measurement Device conforming to the USBTMC USB488 Subclass Specification | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB primary language ID constants''' <code> USB_LANG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Language Identifiers supplement to the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"|These are the first 10 bits of the 16-bit language identifier | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Reserved $00'' | ||
+ | |- | ||
+ | | <code>USB_LANG_ARABIC = $01;</code> | ||
+ | | Arabic | ||
+ | |- | ||
+ | | <code>USB_LANG_BULGARIAN = $02;</code> | ||
+ | | Bulgarian | ||
+ | |- | ||
+ | | <code>USB_LANG_CATALAN = $03;</code> | ||
+ | | Catalan | ||
+ | |- | ||
+ | | <code>USB_LANG_CHINESE = $04;</code> | ||
+ | | Chinese | ||
+ | |- | ||
+ | | <code>USB_LANG_CZECH = $05;</code> | ||
+ | | Czech | ||
+ | |- | ||
+ | | <code>USB_LANG_DANISH = $06;</code> | ||
+ | | Danish | ||
+ | |- | ||
+ | | <code>USB_LANG_GERMAN = $07;</code> | ||
+ | | German | ||
+ | |- | ||
+ | | <code>USB_LANG_GREEK = $08;</code> | ||
+ | | Greek | ||
+ | |- | ||
+ | | <code>USB_LANG_ENGLISH = $09;</code> | ||
+ | | English | ||
+ | |- | ||
+ | | <code>USB_LANG_SPANISH = $0a;</code> | ||
+ | | Spanish | ||
+ | |- | ||
+ | | <code>USB_LANG_FINNISH = $0b;</code> | ||
+ | | Finnish | ||
+ | |- | ||
+ | | <code>USB_LANG_FRENCH = $0c;</code> | ||
+ | | French | ||
+ | |- | ||
+ | | <code>USB_LANG_HEBREW = $0d;</code> | ||
+ | | Hebrew | ||
+ | |- | ||
+ | | <code>USB_LANG_HUNGARIAN = $0e;</code> | ||
+ | | Hungarian | ||
+ | |- | ||
+ | | <code>USB_LANG_ICELANDIC = $0f;</code> | ||
+ | | Icelandic | ||
+ | |- | ||
+ | | <code>USB_LANG_ITALIAN = $10;</code> | ||
+ | | Italian | ||
+ | |- | ||
+ | | <code>USB_LANG_JAPANESE = $11;</code> | ||
+ | | Japanese | ||
+ | |- | ||
+ | | <code>USB_LANG_KOREAN = $12;</code> | ||
+ | | Korean | ||
+ | |- | ||
+ | | <code>USB_LANG_DUTCH = $13;</code> | ||
+ | | Dutch | ||
+ | |- | ||
+ | | <code>USB_LANG_NORWEGIAN = $14;</code> | ||
+ | | Norwegian | ||
+ | |- | ||
+ | | <code>USB_LANG_POLISH = $15;</code> | ||
+ | | Polish | ||
+ | |- | ||
+ | | <code>USB_LANG_PORTUGUESE = $16;</code> | ||
+ | | Portuguese | ||
+ | |- | ||
+ | | <code>USB_LANG_ROMANIAN = $18;</code> | ||
+ | | Romanian | ||
+ | |- | ||
+ | | <code>USB_LANG_RUSSIAN = $19;</code> | ||
+ | | Russian | ||
+ | |- | ||
+ | | <code>USB_LANG_CROATIAN = $1a;</code> | ||
+ | | Croatian | ||
+ | |- | ||
+ | | <code>USB_LANG_SERBIAN = $1a;</code> | ||
+ | | Serbian | ||
+ | |- | ||
+ | | <code>USB_LANG_SLOVAK = $1b;</code> | ||
+ | | Slovak | ||
+ | |- | ||
+ | | <code>USB_LANG_ALBANIAN = $1c;</code> | ||
+ | | Albanian | ||
+ | |- | ||
+ | | <code>USB_LANG_SWEDISH = $1d;</code> | ||
+ | | Swedish | ||
+ | |- | ||
+ | | <code>USB_LANG_THAI = $1e;</code> | ||
+ | | Thai | ||
+ | |- | ||
+ | | <code>USB_LANG_TURKISH = $1f;</code> | ||
+ | | Turkish | ||
+ | |- | ||
+ | | <code>USB_LANG_URDU = $20;</code> | ||
+ | | Urdu | ||
+ | |- | ||
+ | | <code>USB_LANG_INDONESIAN = $21;</code> | ||
+ | | Indonesian | ||
+ | |- | ||
+ | | <code>USB_LANG_UKRANIAN = $22;</code> | ||
+ | | Ukrainian | ||
+ | |- | ||
+ | | <code>USB_LANG_BELARUSIAN = $23;</code> | ||
+ | | Belarusian | ||
+ | |- | ||
+ | | <code>USB_LANG_SLOVENIAN = $24;</code> | ||
+ | | Slovenian | ||
+ | |- | ||
+ | | <code>USB_LANG_ESTONIAN = $25;</code> | ||
+ | | Estonian | ||
+ | |- | ||
+ | | <code>USB_LANG_LATVIAN = $26;</code> | ||
+ | | Latvian | ||
+ | |- | ||
+ | | <code>USB_LANG_LITHUANIAN = $27;</code> | ||
+ | | Lithuanian | ||
+ | |- | ||
+ | | <code>USB_LANG_FARSI = $29;</code> | ||
+ | | Farsi | ||
+ | |- | ||
+ | | <code>USB_LANG_VIETNAMESE = $2a;</code> | ||
+ | | Vietnamese | ||
+ | |- | ||
+ | | <code>USB_LANG_ARMENIAN = $2b;</code> | ||
+ | | Armenian | ||
+ | |- | ||
+ | | <code>USB_LANG_AZERI = $2c;</code> | ||
+ | | Azeri | ||
+ | |- | ||
+ | | <code>USB_LANG_BASQUE = $2d;</code> | ||
+ | | Basque | ||
+ | |- | ||
+ | | <code>USB_LANG_MACEDONIAN = $2f;</code> | ||
+ | | Macedonian | ||
+ | |- | ||
+ | | <code>USB_LANG_AFRIKAANS = $36;</code> | ||
+ | | Afrikaans | ||
+ | |- | ||
+ | | <code>USB_LANG_GEORGIAN = $37;</code> | ||
+ | | Georgian | ||
+ | |- | ||
+ | | <code>USB_LANG_FAEROESE = $38;</code> | ||
+ | | Faeroese | ||
+ | |- | ||
+ | | <code>USB_LANG_HINDI = $39;</code> | ||
+ | | Hindi | ||
+ | |- | ||
+ | | <code>USB_LANG_MALAY = $3e;</code> | ||
+ | | Malay | ||
+ | |- | ||
+ | | <code>USB_LANG_KAZAK = $3f;</code> | ||
+ | | Kazak | ||
+ | |- | ||
+ | | <code>USB_LANG_SWAHILI = $41;</code> | ||
+ | | Swahili | ||
+ | |- | ||
+ | | <code>USB_LANG_UZBEK = $43;</code> | ||
+ | | Uzbek | ||
+ | |- | ||
+ | | <code>USB_LANG_TATAR = $44;</code> | ||
+ | | Tatar | ||
+ | |- | ||
+ | | <code>USB_LANG_BENGALI = $45;</code> | ||
+ | | Bengali | ||
+ | |- | ||
+ | | <code>USB_LANG_PUNJABI = $46;</code> | ||
+ | | Punjabi | ||
+ | |- | ||
+ | | <code>USB_LANG_GUJARATI = $47;</code> | ||
+ | | Gujarati | ||
+ | |- | ||
+ | | <code>USB_LANG_ORIYA = $48;</code> | ||
+ | | Oriya | ||
+ | |- | ||
+ | | <code>USB_LANG_TAMIL = $49;</code> | ||
+ | | Tamil | ||
+ | |- | ||
+ | | <code>USB_LANG_TELUGU = $4a;</code> | ||
+ | | Telugu | ||
+ | |- | ||
+ | | <code>USB_LANG_KANNADA = $4b;</code> | ||
+ | | Kannada | ||
+ | |- | ||
+ | | <code>USB_LANG_MALAYALAM = $4c;</code> | ||
+ | | Malayalam | ||
+ | |- | ||
+ | | <code>USB_LANG_ASSAMESE = $4d;</code> | ||
+ | | Assamese | ||
+ | |- | ||
+ | | <code>USB_LANG_MARATHI = $4e;</code> | ||
+ | | Marathi | ||
+ | |- | ||
+ | | <code>USB_LANG_SANSKRIT = $4f;</code> | ||
+ | | Sanskrit | ||
+ | |- | ||
+ | | <code>USB_LANG_KONKANI = $57;</code> | ||
+ | | Konkani | ||
+ | |- | ||
+ | | <code>USB_LANG_MANIPURI = $58;</code> | ||
+ | | Manipuri | ||
+ | |- | ||
+ | | <code>USB_LANG_SINDHI = $59;</code> | ||
+ | | Sindhi | ||
+ | |- | ||
+ | | <code>USB_LANG_KASHMIRI = $60;</code> | ||
+ | | Kashmiri | ||
+ | |- | ||
+ | | <code>USB_LANG_NEPALI = $61;</code> | ||
+ | | Nepali | ||
+ | |- | ||
+ | |colspan="2"|''Reserved $62-$fe'' | ||
+ | |- | ||
+ | | <code>USB_LANG_HID = $ff;</code> | ||
+ | | Reserved for USB HID Class use | ||
+ | |- | ||
+ | |colspan="2"|''Reserved $100-$3ff'' | ||
+ | |- | ||
+ | | <code>USB_PRIMARY_LANGUAGE_MASK = $3ff;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB sublanguage ID constants''' <code> USB_SUBLANG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Language Identifiers supplement to the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"|These are the upper 6 bits of the 16-bit language identifier | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Reserved $00-$02'' | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_SAUDI_ARABIA = $01;</code> | ||
+ | | Arabic (Saudi Arabia) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_IRAQ = $02;</code> | ||
+ | | Arabic (Iraq) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_EGYPT = $03;</code> | ||
+ | | Arabic (Egypt) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_LIBYA = $04;</code> | ||
+ | | Arabic (Libya) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_ALGERIA = $05;</code> | ||
+ | | Arabic (Algeria) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_MOROCCO = $06;</code> | ||
+ | | Arabic (Morocco) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_TUNISIA = $07;</code> | ||
+ | | Arabic (Tunisia) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_OMAN = $08;</code> | ||
+ | | Arabic (Oman) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_YEMEN = $09;</code> | ||
+ | | Arabic (Yemen) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_SYRIA = $10;</code> | ||
+ | | Arabic (Syria) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_JORDAN = $11;</code> | ||
+ | | Arabic (Jordan) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_LEBANON = $12;</code> | ||
+ | | Arabic (Lebanon) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_KUWAIT = $13;</code> | ||
+ | | Arabic (Kuwait) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_UAE = $14;</code> | ||
+ | | Arabic (U.A.E.) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_BAHRAIN = $15;</code> | ||
+ | | Arabic (Bahrain) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ARABIC_QATAR = $16;</code> | ||
+ | | Arabic (Qatar) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_AZERI_CYRILLIC = $01;</code> | ||
+ | | Azeri (Cyrillic) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_AZERI_LATIN = $02;</code> | ||
+ | | Azeri (Latin) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_CHINESE_TRADITIONAL = $01;</code> | ||
+ | | Chinese (Traditional) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_CHINESE_SIMPLIFIED = $02;</code> | ||
+ | | Chinese (Simplified) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_CHINESE_HONGKONG = $03;</code> | ||
+ | | Chinese (Hong Kong SAR, PRC) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_CHINESE_SINGAPORE = $04;</code> | ||
+ | | Chinese (Singapore) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_CHINESE_MACAU = $05;</code> | ||
+ | | Chinese (Macau SAR) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_DUTCH = $01;</code> | ||
+ | | Dutch | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_DUTCH_BELGIAN = $02;</code> | ||
+ | | Dutch (Belgian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_US = $01;</code> | ||
+ | | English (US) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_UK = $02;</code> | ||
+ | | English (UK) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_AUS = $03;</code> | ||
+ | | English (Australian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_CAN = $04;</code> | ||
+ | | English (Canadian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_NZ = $05;</code> | ||
+ | | English (New Zealand) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_EIRE = $06;</code> | ||
+ | | English (Ireland) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_SOUTH_AFRICA = $07;</code> | ||
+ | | English (South Africa) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_JAMAICA = $08;</code> | ||
+ | | English (Jamaica) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_CARIBBEAN = $09;</code> | ||
+ | | English (Caribbean) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_BELIZE = $0a;</code> | ||
+ | | English (Belize) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_TRINIDAD = $0b;</code> | ||
+ | | English (Trinidad) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_PHILIPPINES = $0c;</code> | ||
+ | | English (Zimbabwe) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ENGLISH_ZIMBABWE = $0d;</code> | ||
+ | | English (Philippines) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_FRENCH = $01;</code> | ||
+ | | French | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_FRENCH_BELGIAN = $02;</code> | ||
+ | | French (Belgian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_FRENCH_CANADIAN = $03;</code> | ||
+ | | French (Canadian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_FRENCH_SWISS = $04;</code> | ||
+ | | French (Swiss) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_FRENCH_LUXEMBOURG = $05;</code> | ||
+ | | French (Luxembourg) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_FRENCH_MONACO = $06;</code> | ||
+ | | French (Monaco) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_GERMAN = $01;</code> | ||
+ | | German | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_GERMAN_SWISS = $02;</code> | ||
+ | | German (Swiss) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_GERMAN_AUSTRIAN = $03;</code> | ||
+ | | German (Austrian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_GERMAN_LUXEMBOURG = $04;</code> | ||
+ | | German (Luxembourg) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_GERMAN_LIECHTENSTEIN = $05;</code> | ||
+ | | German (Liechtenstein) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ITALIAN = $01;</code> | ||
+ | | Italian | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_ITALIAN_SWISS = $02;</code> | ||
+ | | Italian (Swiss) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_KASHMIRI_INDIA = $02;</code> | ||
+ | | Kashmiri (India) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_KOREAN = $01;</code> | ||
+ | | Korean | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_LITHUANIAN = $01;</code> | ||
+ | | Lithuanian | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_MALAY_MALAYSIA = $01;</code> | ||
+ | | Malay (Malaysia) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_MALAY_BRUNEI_DARUSSALAM = $02;</code> | ||
+ | | Malay (Brunei Darassalam) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_NEPALI_INDIA = $02;</code> | ||
+ | | Nepali (India) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_NORWEGIAN_BOKMAL = $01;</code> | ||
+ | | Norwegian (Bokmal) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_NORWEGIAN_NYNORSK = $02;</code> | ||
+ | | Norwegian (Nynorsk) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_PORTUGUESE = $01;</code> | ||
+ | | Portuguese (Brazilian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_PORTUGUESE_BRAZILIAN = $02;</code> | ||
+ | | Portuguese | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SERBIAN_LATIN = $02;</code> | ||
+ | | Serbian (Latin) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SERBIAN_CYRILLIC = $03;</code> | ||
+ | | Serbian (Cyrillic) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH = $01;</code> | ||
+ | | Spanish (Castilian) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_MEXICAN = $02;</code> | ||
+ | | Spanish (Mexican) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_MODERN = $03;</code> | ||
+ | | Spanish (Modern) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_GUATEMALA = $04;</code> | ||
+ | | Spanish (Guatemala) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_COSTA_RICA = $05;</code> | ||
+ | | Spanish (Costa Rica) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_PANAMA = $06;</code> | ||
+ | | Spanish (Panama) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_DOMINICAN_REPUBLIC = $07;</code> | ||
+ | | Spanish (Dominican Republic) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_VENEZUELA = $08;</code> | ||
+ | | Spanish (Venezuela) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_COLOMBIA = $09;</code> | ||
+ | | Spanish (Colombia) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_PERU = $0a;</code> | ||
+ | | Spanish (Peru) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_ARGENTINA = $0b;</code> | ||
+ | | Spanish (Argentina) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_ECUADOR = $0c;</code> | ||
+ | | Spanish (Ecuador) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_CHILE = $0d;</code> | ||
+ | | Spanish (Chile) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_URUGUAY = $0e;</code> | ||
+ | | Spanish (Uruguay) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_PARAGUAY = $0f;</code> | ||
+ | | Spanish (Paraguay) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_BOLIVIA = $10;</code> | ||
+ | | Spanish (Bolivia) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_EL_SALVADOR = $11;</code> | ||
+ | | Spanish (El Salvador) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_HONDURAS = $12;</code> | ||
+ | | Spanish (Honduras) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_NICARAGUA = $13;</code> | ||
+ | | Spanish (Nicaragua) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SPANISH_PUERTO_RICO = $14;</code> | ||
+ | | Spanish (Puerto Rico) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SWEDISH = $01;</code> | ||
+ | | Swedish | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_SWEDISH_FINLAND = $02;</code> | ||
+ | | Swedish (Finland) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_URDU_PAKISTAN = $01;</code> | ||
+ | | Urdu (Pakistan) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_URDU_INDIA = $02;</code> | ||
+ | | Urdu (India) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_UZBEK_LATIN = $01;</code> | ||
+ | | Uzbek (Latin) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_UZBEK_CYRILLIC = $02;</code> | ||
+ | | Uzbek (Cyrillic) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_HID_USAGE_DATA_DESCRIPTOR = $01;</code> | ||
+ | | HID (Usage Data Descriptor) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_HID_VENDOR_DEFINED_1 = $3c;</code> | ||
+ | | HID (Vendor Defined 1) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_HID_VENDOR_DEFINED_2 = $3d;</code> | ||
+ | | HID (Vendor Defined 2) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_HID_VENDOR_DEFINED_3 = $3e;</code> | ||
+ | | HID (Vendor Defined 3) | ||
+ | |- | ||
+ | | <code>USB_SUBLANG_HID_VENDOR_DEFINED_4 = $3f;</code> | ||
+ | | HID (Vendor Defined 4) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB primary language identifier constants''' <code> USB_LANGID_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Language Identifiers supplement to the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_LANGID_US_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_US shl 10));</code> | ||
+ | | English (US) | ||
+ | |- | ||
+ | | <code>USB_LANGID_UK_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_UK shl 10));</code> | ||
+ | | English (UK) | ||
+ | |- | ||
+ | | <code>USB_LANGID_AUS_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_AUS shl 10));</code> | ||
+ | | English (Australian) | ||
+ | |- | ||
+ | | <code>USB_LANGID_CAN_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_CAN shl 10));</code> | ||
+ | | English (Canadian) | ||
+ | |- | ||
+ | | <code>USB_LANGID_NZ_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_NZ shl 10));</code> | ||
+ | | English (New Zealand) | ||
+ | |- | ||
+ | | <code>USB_LANGID_EIRE_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_EIRE shl 10));</code> | ||
+ | | English (Ireland) | ||
+ | |- | ||
+ | | <code>USB_LANGID_SOUTH_AFRICA_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_SOUTH_AFRICA shl 10));</code> | ||
+ | | English (South Africa) | ||
+ | |- | ||
+ | | <code>USB_LANGID_JAMAICA_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_JAMAICA shl 10));</code> | ||
+ | | English (Jamaica) | ||
+ | |- | ||
+ | | <code>USB_LANGID_CARIBBEAN_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_CARIBBEAN shl 10));</code> | ||
+ | | English (Caribbean) | ||
+ | |- | ||
+ | | <code>USB_LANGID_BELIZE_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_BELIZE shl 10));</code> | ||
+ | | English (Belize) | ||
+ | |- | ||
+ | | <code>USB_LANGID_TRINIDAD_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_TRINIDAD shl 10));</code> | ||
+ | | English (Trinidad) | ||
+ | |- | ||
+ | | <code>USB_LANGID_PHILIPPINES_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_PHILIPPINES shl 10));</code> | ||
+ | | English (Philippines) | ||
+ | |- | ||
+ | | <code>USB_LANGID_ZIMBABWE_ENGLISH = (USB_LANG_ENGLISH or (USB_SUBLANG_ENGLISH_ZIMBABWE shl 10));</code> | ||
+ | | English (Zimbabwe) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_LANGID_USAGE_HID = (USB_LANG_HID or (USB_SUBLANG_HID_USAGE_DATA_DESCRIPTOR shl 10));</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_LANGID_VENDOR1_HID = (USB_LANG_HID or (USB_SUBLANG_HID_VENDOR_DEFINED_1 shl 10));</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_LANGID_VENDOR2_HID = (USB_LANG_HID or (USB_SUBLANG_HID_VENDOR_DEFINED_2 shl 10));</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_LANGID_VENDOR3_HID = (USB_LANG_HID or (USB_SUBLANG_HID_VENDOR_DEFINED_3 shl 10));</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_LANGID_VENDOR4_HID = (USB_LANG_HID or (USB_SUBLANG_HID_VENDOR_DEFINED_4 shl 10));</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB vendor ID constants''' <code> USB_VENDORID_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USB_VENDORID_REALTEK = $0BDA;</code> | ||
+ | | Realtek | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB tree output constants''' <code> USB_TREE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USB_TREE_SPACES_PER_LEVEL = 6;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_TREE_LINES_PER_PORT = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB logging constants''' <code> USB_LOG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USB_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code> | ||
+ | | USB debugging messages | ||
+ | |- | ||
+ | | <code>USB_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code> | ||
+ | | USB informational messages, such as a device being attached or detached | ||
+ | |- | ||
+ | | <code>USB_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code> | ||
+ | | USB error messages | ||
+ | |- | ||
+ | | <code>USB_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code> | ||
+ | | No USB messages | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub specific constants''' <code> USB_HUB_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USB_HUB_PREFIX = 'USBHub';</code> | ||
+ | | Name prefix for USB Hubs | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub type constants''' <code> USBHUB_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USBHUB_TYPE_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub state constants''' <code> USBHUB_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USBHUB_STATE_DETACHED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USBHUB_STATE_DETACHING = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USBHUB_STATE_ATTACHING = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USBHUB_STATE_ATTACHED = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub flag constants''' <code> USBHUB_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USBHUB_FLAG_NONE = $00000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub thread constants''' <code> USBHUB_THREAD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USBHUB_THREAD_STACK_SIZE = SIZE_32K;</code> | ||
+ | | Stack size of USB hub thread} | ||
+ | |- | ||
+ | | <code>USBHUB_THREAD_PRIORITY = THREAD_PRIORITY_HIGHEST;</code> | ||
+ | | Priority of USB hub thread | ||
+ | |- | ||
+ | | <code>USBHUB_THREAD_NAME = 'USB Hub';</code> | ||
+ | | Name of USB hub thread | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub driver constants''' <code> USBHUB_DRIVER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USBHUB_DRIVER_NAME = 'USB Hub Driver';</code> | ||
+ | | Name of USB hub driver | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB port reset constants''' <code> USB_PORT_RESET_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>USB_PORT_RESET_TIMEOUT = 800;</code> | ||
+ | | Maximum milliseconds to wait for a port to reset (800 is the same value that Linux uses) | ||
+ | |- | ||
+ | | <code>USB_PORT_RESET_DELAY = 10;</code> | ||
+ | | Milliseconds between each status check on the port while waiting for it to finish being reset (Linux uses several values, but 10 is the default case) | ||
+ | |- | ||
+ | | <code>USB_PORT_RESET_RECOVERY = 30;</code> | ||
+ | | Milliseconds to wait after port reset to allow the device attached to the port to recover before any data transfers. USB 2.0 spec says 10ms | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub characteristic constants''' <code> USB_HUB_CHARACTERISTIC_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Values for wHubCharacteristics in type TUSBHubDescriptor | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_HUB_CHARACTERISTIC_IS_COMPOUND_DEVICE = (1 shl 2);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub feature constants''' <code> USB_C_HUB_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-17 in Section 11.24.2 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_C_HUB_LOCAL_POWER = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_C_HUB_OVER_CURRENT = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB port feature constants''' <code> USB_PORT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-17 in Section 11.24.2 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_PORT_CONNECTION = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_PORT_ENABLE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_SUSPEND = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_OVER_CURRENT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_RESET = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_POWER = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_LOW_SPEED = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_C_PORT_CONNECTION = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_C_PORT_ENABLE = 17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_C_PORT_SUSPEND = 18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_C_PORT_OVER_CURRENT = 19;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_C_PORT_RESET = 20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_TEST = 21;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_INDICATOR = 22;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub class request constants''' <code> USB_HUB_REQUEST_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-16 in Section 11.24.2 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_GET_STATUS = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_CLEAR_FEATURE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_SET_FEATURE = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_GET_DESCRIPTOR = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_SET_DESCRIPTOR = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_CLEAR_TT_BUFFER = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_RESET_TT = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_GET_TT_STATE = 10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_REQUEST_STOP_TT = 11;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB port status constants''' <code> USB_PORT_STATUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-21 in Section 11.24.2.7.1 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"|Values for wPortStatus in type TUSBPortStatus | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_CONNNECTED = (1 shl 0);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_ENABLED = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_SUSPENDED = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_OVERCURRENT = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_RESET = (1 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_POWERED = (1 shl 8);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_LOW_SPEED_ATTACHED = (1 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_HIGH_SPEED_ATTACHED = (1 shl 10);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_TEST_MODE = (1 shl 11);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_STATUS_INDICATOR_CONTROL = (1 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB port change constants''' <code> USB_PORT_CHANGE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-20 in Section 11.24.2.6 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"|Values for wPortChange in type TUSBPortStatus | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_PORT_CHANGE_CONNECTED = (1 shl 0);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>USB_PORT_CHANGE_ENABLED = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_CHANGE_SUSPENDED = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_CHANGE_OVERCURRENT = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_PORT_CHANGE_RESET = (1 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub status constants''' <code> USB_HUB_STATUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-19 in Section 11.24.2.6 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"|Values for wHubStatus in type TUSBHubStatus | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_HUB_STATUS_LOCAL_POWER = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_STATUS_OVERCURRENT = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''USB hub change constants''' <code> USB_HUB_CHANGE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Table 11-20 in Section 11.24.2.6 of the USB 2.0 specification | ||
+ | |- | ||
+ | |colspan="2"|Values for wHubChange in type TUSBHubStatus | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>USB_HUB_CHANGE_LOCAL_POWER = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>USB_HUB_CHANGE_OVERCURRENT = (1 shl 1);</code> | ||
+ | | | ||
|- | |- | ||
|} | |} |
Revision as of 03:54, 30 November 2016
Return to Unit Reference
Contents
[hide]Description
USB
This unit implements the USB core software that does not depend on the specific host controller hardware and is not specific to any single USB device or platform.
Features and limitations:
- This driver is written to be compatible with USB 2.0. USB 3.0 devices work correctly when operating in USB 2.0 compatible mode, actual support for USB 3.0 host controllers and native super speed modes will require some modification to this driver.
- Not all USB transfer types and speeds are supported yet. This depends on the Host Controller Driver, see USBRequestSubmit.
- This driver does not attempt to do any intelligent power management, bandwidth allocation, or transfer scheduling. Devices are always set to their first listed configuration regardless of power requirements. Requests are simply passed to the Host Controller Driver in the order submitted, the Host Controller Driver is responsible for doing any more intelligent scheduling if desired.
- This driver does not support multiple configurations per USB device. If a device happens to have multiple configurations, the first one will be assigned (see devices below for more information).
- By design, it is possible to implement a host controller driver for different host controller hardware without changing any of this code, as long as the host controller driver provides the functions declared in TUSBHost (Start, Stop, Reset, Submit and Cancel).
- By design, this driver has a hard-coded dependency on the USB hub driver because USB is useless without hubs.
To initialize this core USB driver, USBInit must be called by the system startup code. See that function for details.
If the flag USB_AUTOSTART is not set then USBStart must be called to start the USB core. See that function for details.
The other functions exported by this core USB driver are mostly intended to be used by USB device drivers.
Debugging messages in this driver can be enabled by changing the value of USB_DEFAULT_LOG_LEVEL and by enabling the USB_DEBUG define in GlobalDefines.
Be careful when enabling USB debugging as the USB core can generate a lot of messages due to constant polling of interrupt endpoints on devices such as hubs, keyboards and mice.
USB Device
USB devices are the generic implementation of anything that can be connected to the USB bus. All USB devices require a driver to implement the specific behaviour of the device but at the generic level each device will have:
- One or more configurations available. The USB core will first offer the device to drivers without a configuration being selected, the driver may choose a specific configuration if required otherwise the core will simply select the first available configuration.
- One or more interfaces available. On devices with multiple interfaces, the USB core supports different drivers binding to different interfaces. This way combination devices are supported.
- One or more endpoints available. All devices must have a control endpoint and most devices will have one or more bulk, interrupt or isochronous endpoints as well. The USB core will only communicate with the control endpoint to perform generic operations like reading the desriptors and assigning a device addresss.
Drivers are expected to understand which endpoints they need to communicate with to provide the device specific functionality.
Devices are considered dynamic by the USB core and can be connected or disconnected at any time. The hub driver is responsible for attaching and detaching devices in response to hub status change events and for binding or unbinding drivers as devices are added or removed.
USB Host
USB hosts implement the hardware level interface that supports sending USB requests to the hardware and receiving responses. All handling of interrupts, DMA, transaction sequence, errors and resubmitting/retrying requests is done by the USB host driver. All host drivers must implement the functions defined in TUSBHost (Start, Stop, Reset, Submit and Cancel) and must register themselves with the USB core by calling USBHostRegister. When the USB core is started each registered host driver will be called via the Start function so it can initialize itself and allocate locks, buffers and other resources required to interact with the hardware.
A host driver can also be registered after the USB core has been started and it will be given the opportunity to start itself immediately. In this way USB hosts can potentially be hot pluggable.
Each host driver must also implement a root hub which respresents the port or ports that are directly connected to the controller hardware. In many cases this will not be a real hub but will be simulated in the host driver so that the hub driver can interact with it as though it was a standard hub device.
Constants
USB_*_PREFIX
USB_TYPE_*
USB_STATE_*
USB_STATUS_*
USB_FLAG_*
USBHOST_TYPE_*
USBHOST_STATE_*
USBHOST_FLAG_*
USB_STATUS_*
USB_REQUEST_FLAG_*
USB_CONTROL_PHASE_*
USB_CONTROL_*
USB_*_*_PACKET_SIZE
USB_FRAMES_*
USB_UFRAMES_*
USB_CONFIGURATION_ATTRIBUTE_*
USB_DEVICE_STATUS_*
USB_ENDPOINT_STATUS_*
USB_SPEED_*
USB_TRANSFER_TYPE_*
USB_TRANSFER_SIZE_*
USB_DESCRIPTOR_TYPE_*
USB_DIRECTION_*
USB_REQUEST_TYPE_*
USB_REQUEST_RECIPIENT_*
USB_BMREQUESTTYPE_*
USB_DEVICE_REQUEST_*
USB_DEVICE_FEATURE_*
USB_DEVICE_TEST_MODE_*
USB_PACKETID_*
USB_CLASS_CODE_*
USB_SUBCLASS_*
USB_PROTOCOL_*
USB_LANG_*
USB_SUBLANG_*
USB_LANGID_*
USB_VENDORID_*
USB_TREE_*
USB_LOG_*
USB_HUB_*
USBHUB_TYPE_*
USBHUB_STATE_*
USBHUB_FLAG_*
USBHUB_THREAD_*
USBHUB_DRIVER_*
USB_PORT_RESET_*
USB_HUB_CHARACTERISTIC_*
USB_C_HUB_*
USB_PORT_*
USB_HUB_REQUEST_*
USB_PORT_STATUS_*
USB_PORT_CHANGE_*
USB_HUB_STATUS_*
USB_HUB_CHANGE_*
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure USBInit;
function USBStart:LongWord;
USB device, driver and host functions
function USBDeviceGetAddress(Device:PUSBDevice):Byte;
function USBDeviceSetAddress(Device:PUSBDevice; Address:Byte):LongWord;
function USBDeviceGetDescriptor(Device:PUSBDevice; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; Length:Word):LongWord;
function USBDeviceGetDeviceDescriptor(Device:PUSBDevice; Data:Pointer; Length:Word):LongWord;
function USBDeviceCreateDeviceDescriptor(Device:PUSBDevice; Length:Word):LongWord;
function USBDeviceReadDeviceDescriptor(Device:PUSBDevice; Length:Word):LongWord; inline;
function USBDeviceReadDeviceDescriptorEx(Device:PUSBDevice; Length:Word; AllowShort:Boolean):LongWord;
function USBDeviceCreateConfigurations(Device:PUSBDevice):LongWord;
function USBDeviceReadConfigurations(Device:PUSBDevice):LongWord;
function USBDeviceCreateConfiguration(Device:PUSBDevice; Index:Byte; Size:Word):LongWord;
function USBDeviceReadConfiguration(Device:PUSBDevice; Index:Byte):LongWord;
function USBDeviceGetStringDescriptor(Device:PUSBDevice; Index:Byte; Data:Pointer; Length:Word):LongWord;
function USBDeviceReadStringDescriptor(Device:PUSBDevice; Index:Byte):String;
function USBDeviceReadStringDescriptorW(Device:PUSBDevice; Index:Byte):UnicodeString;
function USBDeviceGetConfigurationDescriptor(Device:PUSBDevice; Index:Byte;Data:Pointer; Length:Word):LongWord;
function USBDeviceGetConfiguration(Device:PUSBDevice; var ConfigurationValue:Byte):LongWord;
function USBDeviceSetConfiguration(Device:PUSBDevice; ConfigurationValue:Byte):LongWord;
function USBDeviceFindConfigurationByValue(Device:PUSBDevice; ConfigurationValue:Byte):PUSBConfiguration;
function USBDeviceGetInterface(Device:PUSBDevice; Index:Byte; var AlternateSetting:Byte):LongWord;
function USBDeviceFindInterfaceByIndex(Device:PUSBDevice; Index:Byte):PUSBInterface;
function USBDeviceFindInterfaceByClass(Device:PUSBDevice; InterfaceClass,InterfaceSubClass,InterfaceProtocol:Byte):PUSBInterface;
function USBDeviceFindEndpointByIndex(Device:PUSBDevice; Interrface:PUSBInterface; Index:Byte):PUSBEndpointDescriptor;
function USBDeviceFindEndpointByType(Device:PUSBDevice; Interrface:PUSBInterface; Direction,TransferType:Byte):PUSBEndpointDescriptor;
function USBDeviceFindEndpointByTypeEx(Device:PUSBDevice; Interrface:PUSBInterface; Direction,TransferType:Byte; var Index:Byte):PUSBEndpointDescriptor;
function USBDeviceCountEndpointsByType(Device:PUSBDevice; Interrface:PUSBInterface; Direction,TransferType:Byte):Byte;
function USBDeviceFindAlternateByIndex(Device:PUSBDevice; Interrface:PUSBInterface; Index:Byte):PUSBAlternate;
function USBDeviceFindAlternateEndpointByIndex(Device:PUSBDevice; Interrface:PUSBInterface; Alternate:PUSBAlternate; Index:Byte):PUSBEndpointDescriptor;
function USBDeviceFindAlternateEndpointByType(Device:PUSBDevice; Interrface:PUSBInterface; Alternate:PUSBAlternate; Direction,TransferType:Byte):PUSBEndpointDescriptor;
function USBDeviceSetInterface(Device:PUSBDevice; Index,AlternateSetting:Byte):LongWord;
function USBDeviceSetFeature(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Feature,Index:Word):LongWord;
function USBDeviceClearFeature(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Feature:Word):LongWord;
function USBDeviceSetState(Device:PUSBDevice; State:LongWord):LongWord;
function USBDeviceSetStatus(Device:PUSBDevice; Status:LongWord):LongWord;
function USBDeviceBind(Device:PUSBDevice):LongWord;
function USBDeviceUnbind(Device:PUSBDevice; Driver:PUSBDriver):LongWord;
function USBDeviceAttach(Device:PUSBDevice):LongWord;
function USBDeviceDetach(Device:PUSBDevice):LongWord;
function USBDeviceAllocate(Host:PUSBHost; Parent:PUSBDevice):PUSBDevice;
function USBDeviceRelease(Device:PUSBDevice):LongWord;
function USBDeviceFindByName(const Name:String):PUSBDevice; inline;
function USBDeviceFindByDescription(const Description:String):PUSBDevice; inline;
function USBDeviceEnumerate(Callback:TUSBDeviceEnumerate; Data:Pointer):LongWord;
function USBDeviceNotification(Device:PUSBDevice; Callback:TUSBDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
function USBDriverCreateEx(Size:LongWord):PUSBDriver;
function USBDriverDestroy(Driver:PUSBDriver):LongWord;
function USBDriverRegister(Driver:PUSBDriver):LongWord;
function USBDriverDeregister(Driver:PUSBDriver):LongWord;
function USBDriverFindByName(const Name:String):PUSBDriver; inline;
function USBDriverEnumerate(Callback:TUSBDriverEnumerate; Data:Pointer):LongWord;
function USBHostSetState(Host:PUSBHost; State:LongWord):LongWord;
function USBHostDestroy(Host:PUSBHost):LongWord;
function USBHostRegister(Host:PUSBHost):LongWord;
function USBHostDeregister(Host:PUSBHost):LongWord;
function USBHostFindByName(const Name:String):PUSBHost; inline;
function USBHostFindByDescription(const Description:String):PUSBHost; inline;
function USBHostEnumerate(Callback:TUSBHostEnumerate; Data:Pointer):LongWord;
function USBHostNotification(Host:PUSBHost; Callback:TUSBHostNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
function USBBufferAllocate(Device:PUSBDevice; Size:LongWord):Pointer; inline;
function USBBufferAllocateEx(Device:PUSBDevice; Size:LongWord; var Flags:LongWord):Pointer;
function USBBufferValidate(Device:PUSBDevice; Buffer:Pointer; Size:LongWord; var Flags:LongWord):LongWord;
function USBBufferRelease(Buffer:Pointer):LongWord;
function USBRequestAllocate(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Callback:TUSBRequestCompleted; Size:LongWord; DriverData:Pointer):PUSBRequest; inline;
function USBRequestAllocateEx(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; Callback:TUSBRequestCompleted; var Data:Pointer; Size:LongWord; DriverData:Pointer):PUSBRequest;
function USBRequestRelease(Request:PUSBRequest):LongWord;
function USBRequestInitialize(Request:PUSBRequest; Callback:TUSBRequestCompleted; Data:Pointer; Size:LongWord; DriverData:Pointer):LongWord;
function USBRequestSubmit(Request:PUSBRequest):LongWord;
function USBRequestCancel(Request:PUSBRequest):LongWord;
procedure USBRequestComplete(Request:PUSBRequest);
function USBControlRequest(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word):LongWord; inline;
function USBControlRequestEx(Device:PUSBDevice; Endpoint:PUSBEndpointDescriptor; bRequest,bmRequestType:Byte; wValue,wIndex:Word; Data:Pointer; wLength:Word; Timeout:LongWord; AllowShort:Boolean):LongWord;
procedure USBControlRequestComplete(Request:PUSBRequest);
USB hub functions
function USBHubCreatePorts(Hub:PUSBHub):LongWord;
function USBHubPowerOnPorts(Hub:PUSBHub):LongWord;
function USBHubCreateHubDescriptor(Hub:PUSBHub):LongWord;
function USBHubReadHubDescriptor(Hub:PUSBHub):LongWord;
function USBHubLock(Hub:PUSBHub):LongWord;
function USBHubUnlock(Hub:PUSBHub):LongWord;
function USBHubSetState(Hub:PUSBHub; State:LongWord):LongWord;
function USBHubAllocate(Device:PUSBDevice):PUSBHub;
function USBHubRelease(Hub:PUSBHub):LongWord;
function USBHubFindByName(const Name:String):PUSBHub; inline;
function USBHubFindByDescription(const Description:String):PUSBHub; inline;
function USBHubEnumerate(Callback:TUSBHubEnumerate; Data:Pointer):LongWord;
function USBHubNotification(Hub:PUSBHub; Callback:TUSBHubNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
procedure USBHubBindDevices(Device:PUSBDevice; Callback:TUSBDeviceBind);
procedure USBHubUnbindDevices(Device:PUSBDevice; Driver:PUSBDriver; Callback:TUSBDeviceUnbind);
procedure USBHubEnumerateDevices(Device:PUSBDevice; Callback:TUSBDeviceEnumerate; Data:Pointer);
function USBHubPortReset(Port:PUSBPort):LongWord;
function USBHubPortGetStatus(Port:PUSBPort):LongWord;
function USBHubPortSetFeature(Port:PUSBPort; Feature:Word):LongWord;
function USBHubPortClearFeature(Port:PUSBPort; Feature:Word):LongWord;
function USBHubPortChangeFeature(Port:PUSBPort; Feature:Word; Enable:Boolean):LongWord;
function USBHubPortAttachDevice(Port:PUSBPort):LongWord;
function USBHubPortDetachDevice(Port:PUSBPort):LongWord;
function USBHubPortStatusChanged(Port:PUSBPort):LongWord;
function USBHubExecute(Parameter:Pointer):PtrInt;
procedure USBHubStatusComplete(Request:PUSBRequest);
function USBHubDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
function USBHubDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
USB device, driver and host helper functions
function USBDeviceCheck(Device:PUSBDevice):PUSBDevice;
function USBDriverCheck(Driver:PUSBDriver):PUSBDriver;
function USBHostCheck(Host:PUSBHost):PUSBHost;
function USBIsHub(Device:PUSBDevice):Boolean;
function USBIsRootHub(Device:PUSBDevice):Boolean;
function USBIsControlRequest(Request:PUSBRequest):Boolean;
function USBIsBulkRequest(Request:PUSBRequest):Boolean;
function USBIsInterruptRequest(Request:PUSBRequest):Boolean;
function USBIsIsochronousRequest(Request:PUSBRequest):Boolean;
function USBIsInEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsOutEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsBulkEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsInterruptEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBIsIsochronousEndpoint(Endpoint:PUSBEndpointDescriptor):Boolean;
function USBDeviceToString(Device:PUSBDevice):String;
function USBStatusToString(Status:LongWord):String;
function USBClassCodeToString(ClassCode:Integer):String;
function USBSubClassCodeToString(ClassCode,SubClassCode:Integer):String;
function USBProtocolCodeToString(ClassCode,ProtocolCode:Integer):String;
function USBSpeedToString(Speed:Integer):String;
function USBTransferTypeToString(TransferType:Integer):String;
function USBDirectionToString(Direction:Integer):String;
function USBBCDVersionToString(BCDVersion:Word):String;
function USBHubCharacteristicsToString(HubCharacteristics:Word):String;
function USBDeviceStateToNotification(State:LongWord):LongWord;
function USBDeviceStatusToNotification(Status:LongWord):LongWord;
function USBHostStateToNotification(State:LongWord):LongWord;
procedure USBLog(Level:LongWord; Device:PUSBDevice; const AText:String);
procedure USBLogDeviceDescriptor(Device:PUSBDevice; Descriptor:PUSBDeviceDescriptor);
procedure USBLogConfigurationDescriptor(Device:PUSBDevice; Descriptor:PUSBConfigurationDescriptor);
procedure USBLogInterfaceDescriptor(Device:PUSBDevice; Descriptor:PUSBInterfaceDescriptor);
procedure USBLogEndpointDescriptor(Device:PUSBDevice; Descriptor:PUSBEndpointDescriptor);
function USBLogDevices:LongWord;
function USBLogDeviceCallback(Device:PUSBDevice; Data:Pointer):LongWord;
function USBLogTreeCallback(Device:PUSBDevice; Data:Pointer):LongWord;
USB hub helper functions
function USBHubCheck(Hub:PUSBHub):PUSBHub;
function USBHubStateToNotification(State:LongWord):LongWord;
Return to Unit Reference