Skip to content

File usb_std.h

FileList > fw > rbcx-coprocessor > lib > libusb_stm32 > include > usb_std.h

Go to the source code of this file.

Classes

Type Name
struct usb_config_descriptor
USB device configuration descriptor.
struct usb_debug_descriptor
USB debug descriptor.
struct usb_device_descriptor
Represents a USB device descriptor.
struct usb_endpoint_descriptor
USB endpoint descriptor.
struct usb_header_descriptor
common USB descriptor header
struct usb_iad_descriptor
USB interface association descriptor.
struct usb_interface_descriptor
USB interface descriptor.
struct usb_qualifier_descriptor
USB device qualifier descriptor.
struct usb_string_descriptor
USB string descriptor.

Public Attributes

Type Name
uint8_t bAlternateSetting
Alternate setting for the interface number.
uint8_t bConfigurationValue
Configuration index of the current configuration.
uint8_t bDebugInEndpoint
Endpoint number of the Debug Data IN endpoint.
uint8_t bDebugOutEndpoint
Endpoint number of the Debug Data OUTendpoint.
uint8_t bDescriptorType
Type of the descriptor.
uint8_t bDeviceClass
USB device class.
uint8_t bDeviceProtocol
USB device protocol.
uint8_t bDeviceSubClass
USB device subclass.
uint8_t bEndpointAddress
Logical address of the endpoint within the device for the current configuration, including direction mask.
uint8_t bFirstInterface
Index of the first associated interface.
uint8_t bFunctionClass
Function class ID.
uint8_t bFunctionProtocol
Function protocol ID.
uint8_t bFunctionSubClass
Function subclass ID.
uint8_t bInterfaceClass
Interface class ID.
uint8_t bInterfaceCount
Total number of associated interfaces.
uint8_t bInterfaceNumber
Index of the interface in the current configuration.
uint8_t bInterfaceProtocol
Interface protocol ID.
uint8_t bInterfaceSubClass
Interface subclass ID.
uint8_t bInterval
Polling interval in milliseconds for the endpoint if it is an INTERRUPT or ISOCHRONOUS type.
uint8_t bLength
Size of the descriptor, in bytes.
uint8_t bMaxPacketSize0
Size of the control endpoint's bank in bytes.
uint8_t bMaxPower
Maximum power consumption of the device. USB_CFG_POWER_MA() macro.
uint8_t bNumConfigurations
Total number of configurations supported by the device.
uint8_t bNumEndpoints
Total number of endpoints in the interface.
uint8_t bNumInterfaces
Total number of interfaces in the configuration.
uint8_t bReserved
Reserved for future use, must be 0.
uint16_t bcdDevice
Product release (version) number.
uint16_t bcdUSB
BCD of the supported USB specification.
uint8_t bmAttributes
Configuration attributes.
uint8_t iConfiguration
Index of a string descriptor describing the configuration.
uint8_t iFunction
Index of the string descriptor describing the interface association.
uint8_t iInterface
Index of the string descriptor describing the interface.
uint8_t iManufacturer
String index for the manufacturer's name.
uint8_t iProduct
String index for the product name/details.
uint8_t iSerialNumber
String index for the product serial number.
uint16_t idProduct
Unique product ID for the USB product.
uint16_t idVendor
Vendor ID for the USB product.
uint16_t wMaxPacketSize
Size of the endpoint bank, in bytes. This indicates the maximum packet size that the endpoint can receive at a time.
uint16_t wString
String data, as unicode characters or array of USB standard LANGID codes codes.
uint16_t wTotalLength
Size of the configuration descriptor header, and all sub descriptors inside the configuration.

Public Functions

Type Name
struct usb_header_descriptor __attribute__ ((packed))
struct usb_string_descriptor __attribute__ ((packed, aligned(2)))

Macros

Type Name
define CAT (x, y) __CAT(x,y)
define INTSERIALNO_DESCRIPTOR 0xFE
String descriptor is an internal serial number provided by hardware driver.
define NO_DESCRIPTOR 0x00
String descriptor doesn't exists in the device.
define USB_ARRAY_DESC (...)
define USB_CFG_ATTR_RESERVED 0x80
define USB_CFG_ATTR_SELFPOWERED 0x40
define USB_CFG_POWER_MA (mA) ((mA) >> 1)
Macro to set мaximum power consumption field for the usb_config_descriptor .
define USB_CLASS_APP_SPEC 0xFE
Application Specific class.
define USB_CLASS_AUDIO 0x01
Audio device class.
define USB_CLASS_AV 0x10
Audio/Video device class.
define USB_CLASS_BILLBOARD 0x11
Billboard device class.
define USB_CLASS_CBRIDGE 0x12
USB Type-C Bridge device class.
define USB_CLASS_CONTENT_SEC 0x0D
Content Security device class.
define USB_CLASS_CSCID 0x0B
Smart Card device class.
define USB_CLASS_DIAGNOSTIC 0xDC
Diagnostic device class.
define USB_CLASS_HEALTHCARE 0x0F
Personal Healthcare device class.
define USB_CLASS_HUB 0x09
HUB device class.
define USB_CLASS_IAD 0xEF
Class defined on interface association level.
define USB_CLASS_MASS_STORAGE 0x08
Mass Storage device class.
define USB_CLASS_MISC 0xEF
Miscellanious device class.
define USB_CLASS_PER_INTERFACE 0x00
Class defined on interface level.
define USB_CLASS_PHYSICAL 0x05
Physical device class.
define USB_CLASS_PRINTER 0x07
Printer device class.
define USB_CLASS_STILL_IMAGE 0x06
Still Imaging device class.
define USB_CLASS_VENDOR 0xFF
Vendor specific class.
define USB_CLASS_VIDEO 0x0E
Video device class.
define USB_CLASS_WIRELESS 0xE0
Wireless controller class.
define USB_DTYPE_CONFIGURATION 0x02
Configuration descriptor.
define USB_DTYPE_CS_ENDPOINT 0x25
Class specific endpoint descriptor.
define USB_DTYPE_CS_INTERFACE 0x24
Class specific interface descriptor.
define USB_DTYPE_DEBUG 0x0A
Debug descriptor.
define USB_DTYPE_DEVICE 0x01
Device descriptor.
define USB_DTYPE_ENDPOINT 0x05
Endpoint descriptor.
define USB_DTYPE_INTERFACE 0x04
Interface descriptor.
define USB_DTYPE_INTERFACEPOWER 0x08
Interface power descriptor.
define USB_DTYPE_INTERFASEASSOC 0x0B
Interface association descriptor.
define USB_DTYPE_OTG 0x09
OTG descriptor.
define USB_DTYPE_OTHER 0x07
Descriptor is of other type.
define USB_DTYPE_QUALIFIER 0x06
Qualifier descriptor.
define USB_DTYPE_STRING 0x03
String descriptor.
define USB_EPATTR_ADAPTIVE 0x08
Adaptive endpoint.
define USB_EPATTR_ASYNC 0x04
Asynchronous endpoint.
define USB_EPATTR_NO_SYNC 0x00
No synchronization.
define USB_EPATTR_SYNC 0x0C
Synchronous endpoint.
define USB_EPDIR_IN 0x00
Host-to-device endpoint direction.
define USB_EPDIR_OUT 0x80
Device-to-host endpoint direction.
define USB_EPTYPE_BULK 0x02
Bbulk endpoint.
define USB_EPTYPE_CONTROL 0x00
Control endpoint.
define USB_EPTYPE_INTERRUPT 0x03
Interrupt endpoint.
define USB_EPTYPE_ISOCHRONUS 0x01
Isochronous endpoint.
define USB_EPUSAGE_DATA 0x00
Data endpoint.
define USB_EPUSAGE_FEEDBACK 0x10
Feedback endpoint.
define USB_EPUSAGE_IMP_FEEDBACK 0x20
Implicit feedback Data endpoint.
define USB_FEAT_DEBUG_MODE 0x06
define USB_FEAT_ENDPOINT_HALT 0x00
Halt endpoint.
define USB_FEAT_REMOTE_WKUP 0x01
define USB_FEAT_TEST_MODE 0x02
define USB_LANGID_AFR 0x0436
Afrikaans.
define USB_LANGID_ARA_AE 0x3801
Arabic (U.A.E.)
define USB_LANGID_ARA_BH 0x3c01
Arabic (Bahrain)
define USB_LANGID_ARA_DZ 0x1401
Arabic (Algeria)
define USB_LANGID_ARA_EG 0x0c01
Arabic (Egypt)
define USB_LANGID_ARA_IQ 0x0801
Arabic (Iraq)
define USB_LANGID_ARA_JO 0x2c01
Arabic (Jordan)
define USB_LANGID_ARA_KW 0x3401
Arabic (Kuwait)
define USB_LANGID_ARA_LB 0x3001
Arabic (Lebanon)
define USB_LANGID_ARA_LY 0x1001
Arabic (Libya)
define USB_LANGID_ARA_MA 0x1801
Arabic (Morocco)
define USB_LANGID_ARA_OM 0x2001
Arabic (Oman)
define USB_LANGID_ARA_QA 0x4001
Arabic (Qatar)
define USB_LANGID_ARA_SA 0x0401
Arabic (Saudi Arabia)
define USB_LANGID_ARA_SY 0x2801
Arabic (Syria)
define USB_LANGID_ARA_TN 0x1c01
Arabic (Tunisia)
define USB_LANGID_ARA_YE 0x2401
Arabic (Yemen)
define USB_LANGID_ASM 0x044d
Assamese.
define USB_LANGID_AZE_CYR 0x082c
Azeri (Cyrillic)
define USB_LANGID_AZE_LAT 0x042c
Azeri (Latin)
define USB_LANGID_BEL 0x0423
Belarussian.
define USB_LANGID_BEN 0x0445
Bengali.
define USB_LANGID_BUL 0x0402
Bulgarian.
define USB_LANGID_CAT 0x0403
Catalan.
define USB_LANGID_CZE 0x0405
Czech.
define USB_LANGID_DAN 0x0406
Danish.
define USB_LANGID_DEU 0x0407
German (Standard)
define USB_LANGID_DEU_AT 0x0c07
German (Austria)
define USB_LANGID_DEU_LI 0x1407
German (Liechtenstein)
define USB_LANGID_DEU_LU 0x1007
German (Luxembourg)
define USB_LANGID_DEU_SZ 0x0807
German (Switzerland)
define USB_LANGID_ELL 0x0408
Greek.
define USB_LANGID_ENG_AU 0x0c09
English (Australian)
define USB_LANGID_ENG_BZ 0x2809
English (Belize)
define USB_LANGID_ENG_CA 0x1009
English (Canadian)
define USB_LANGID_ENG_CAR 0x2409
English (Caribbean)
define USB_LANGID_ENG_IE 0x1809
English (Ireland)
define USB_LANGID_ENG_JM 0x2009
English (Jamaica)
define USB_LANGID_ENG_NZ 0x1409
English (New Zealand)
define USB_LANGID_ENG_PH 0x3409
English (Philippines)
define USB_LANGID_ENG_TH 0x2c09
English (Trinidad)
define USB_LANGID_ENG_UK 0x0809
English (United Kingdom)
define USB_LANGID_ENG_US 0x0409
English (United States)
define USB_LANGID_ENG_ZA 0x1c09
English (South Africa)
define USB_LANGID_ENG_ZW 0x3009
English (Zimbabwe)
define USB_LANGID_EST 0x0425
Estonian.
define USB_LANGID_EUS 0x042d
Basque.
define USB_LANGID_FAO 0x0438
Faeroese.
define USB_LANGID_FAS 0x0429
Farsi.
define USB_LANGID_FIN 0x040b
Finnish.
define USB_LANGID_FRA 0x040c
French (Standard)
define USB_LANGID_FRA_BE 0x080c
French (Belgian)
define USB_LANGID_FRA_CA 0x0c0c
French (Canadian)
define USB_LANGID_FRA_LU 0x140c
French (Luxembourg)
define USB_LANGID_FRA_MC 0x180c
French (Monaco)
define USB_LANGID_FRA_SZ 0x100c
French (Switzerland)
define USB_LANGID_GUJ 0x0447
Gujarati.
define USB_LANGID_HEB 0x040d
Hebrew.
define USB_LANGID_HIN 0x0439
Hindi.
define USB_LANGID_HRV 0x041a
Croatian.
define USB_LANGID_HUN 0x040e
Hungarian.
define USB_LANGID_HYE 0x042b
Armenian.
define USB_LANGID_IND 0x0421
Indonesian.
define USB_LANGID_ISL 0x040f
Icelandic.
define USB_LANGID_ITA 0x0410
Italian (Standard)
define USB_LANGID_ITA_SZ 0x0810
Italian (Switzerland)
define USB_LANGID_JPN 0x0411
Japanese.
define USB_LANGID_KAN 0x044b
Kannada.
define USB_LANGID_KAS 0x0860
Kashmiri (India)
define USB_LANGID_KAT 0x0437
Georgian.
define USB_LANGID_KAZ 0x043f
Kazakh.
define USB_LANGID_KOK 0x0457
Konkani.
define USB_LANGID_KOR 0x0412
Korean.
define USB_LANGID_KOR_JOH 0x0812
Korean (Johab)
define USB_LANGID_LAV 0x0426
Latvian.
define USB_LANGID_LIT 0x0427
Lithuanian.
define USB_LANGID_LIT_CLS 0x0827
Lithuanian (Classic)
define USB_LANGID_MAL 0x044c
Malayalam.
define USB_LANGID_MAR 0x044e
Marathi.
define USB_LANGID_MKD 0x042f
Macedonian.
define USB_LANGID_MNI 0x0458
Manipuri.
define USB_LANGID_MSA 0x043e
Malay (Malaysian)
define USB_LANGID_MSA_BN 0x083e
Malay (Brunei Darussalam)
define USB_LANGID_MYA 0x0455
Burmese.
define USB_LANGID_NEP 0x0861
Nepali (India)
define USB_LANGID_NLD_BE 0x0813
Dutch (Belgium)
define USB_LANGID_NLD_NL 0x0413
Dutch (Netherlands)
define USB_LANGID_NNO 0x0814
Norwegian (Nynorsk)
define USB_LANGID_NOB 0x0414
Norwegian (Bokmal)
define USB_LANGID_NSO 0x0430
Sutu, Sotho.
define USB_LANGID_ORI 0x0448
Oriya.
define USB_LANGID_PAN 0x0446
Punjabi.
define USB_LANGID_POL 0x0415
Polish.
define USB_LANGID_POR 0x0816
Portuguese (Standard)
define USB_LANGID_POR_BR 0x0416
Portuguese (Brazil)
define USB_LANGID_RON 0x0418
Romanian.
define USB_LANGID_RUS 0x0419
Russian.
define USB_LANGID_SAN 0x044f
Sanskrit.
define USB_LANGID_SLK 0x041b
Slovak.
define USB_LANGID_SLV 0x0424
Slovenian.
define USB_LANGID_SND 0x0459
Sindhi.
define USB_LANGID_SPA 0x040a
Spanish (Traditional Sort)
define USB_LANGID_SPA_AR 0x2c0a
Spanish (Argentina)
define USB_LANGID_SPA_BO 0x400a
Spanish (Bolivia)
define USB_LANGID_SPA_CL 0x340a
Spanish (Chile)
define USB_LANGID_SPA_CO 0x240a
Spanish (Colombia)
define USB_LANGID_SPA_CR 0x140a
Spanish (Costa Rica)
define USB_LANGID_SPA_DO 0x1c0a
Spanish (Dominican Republic)
define USB_LANGID_SPA_EC 0x300a
Spanish (Ecuador)
define USB_LANGID_SPA_GT 0x100a
Spanish (Guatemala)
define USB_LANGID_SPA_HN 0x480a
Spanish (Honduras)
define USB_LANGID_SPA_MDN 0x0c0a
Spanish (Modern Sort)
define USB_LANGID_SPA_MX 0x080a
Spanish (Mexican)
define USB_LANGID_SPA_NI 0x4c0a
Spanish (Nicaragua)
define USB_LANGID_SPA_PA 0x180a
Spanish (Panama)
define USB_LANGID_SPA_PE 0x280a
Spanish (Peru)
define USB_LANGID_SPA_PR 0x500a
Spanish (Puerto Rico)
define USB_LANGID_SPA_PY 0x3c0a
Spanish (Paraguay)
define USB_LANGID_SPA_SV 0x440a
Spanish (El Salvador)
define USB_LANGID_SPA_UY 0x380a
Spanish (Uruguay)
define USB_LANGID_SPA_VE 0x200a
Spanish (Venezuela)
define USB_LANGID_SQI 0x041c
Albanian.
define USB_LANGID_SRB_CYR 0x0c1a
Serbian (Cyrillic)
define USB_LANGID_SRB_LAT 0x081a
Serbian (Latin)
define USB_LANGID_SWA 0x0441
Swahili (Kenya)
define USB_LANGID_SWE 0x041d
Swedish.
define USB_LANGID_SWE_FI 0x081d
Swedish (Finland)
define USB_LANGID_TAM 0x0449
Tamil.
define USB_LANGID_TAT 0x0444
Tatar (Tatarstan)
define USB_LANGID_TEL 0x044a
Telugu.
define USB_LANGID_THA 0x041e
Thai.
define USB_LANGID_TUR 0x041f
Turkish.
define USB_LANGID_URD_IN 0x0820
Urdu (India)
define USB_LANGID_URD_PK 0x0420
Urdu (Pakistan)
define USB_LANGID_UZB_CYR 0x0843
Uzbek (Cyrillic)
define USB_LANGID_UZB_LAT 0x0443
Uzbek (Latin)
define USB_LANGID_VIE 0x042a
Vietnamese.
define USB_LANGID_ZHO_CN 0x0804
Chinese (PRC)
define USB_LANGID_ZHO_HK 0x0c04
Chinese (Hong Kong SAR, PRC)
define USB_LANGID_ZHO_MO 0x1404
Chinese (Macau SAR)
define USB_LANGID_ZHO_SG 0x1004
Chinese (Singapore)
define USB_LANGID_ZHO_TW 0x0404
Chinese (Taiwan)
define USB_LANGIG_UKR 0x0422
Ukrainian.
define USB_PROTO_IAD 0x01
Protocol defined on interface association level.
define USB_PROTO_NONE 0x00
No protocol defined.
define USB_PROTO_VENDOR 0xFF
Vendor specific protocol.
define USB_STD_CLEAR_FEATURE 0x01
Used to clear or disable a specific feature.
define USB_STD_GET_CONFIG 0x08
Returns the current device configuration value.
define USB_STD_GET_DESCRIPTOR 0x06
Returns the specified descriptor if the descriptor exists.
define USB_STD_GET_INTERFACE 0x0A
Returns the selected alternate setting for the specified interface.
define USB_STD_GET_STATUS 0x00
Returns status for the specified recipient.
define USB_STD_SET_ADDRESS 0x05
Sets the device address for all future device accesses.
define USB_STD_SET_CONFIG 0x09
Sets the device configuration.
define USB_STD_SET_DESCRIPTOR 0x07
This request is optional and may be used to update existing descriptors or new descriptors may be added.
define USB_STD_SET_FEATURE 0x03
Used to set or enable a specific feature.
define USB_STD_SET_INTERFACE 0x0B
Allows the host to select an alternate setting for the specified interface.
define USB_STD_SYNCH_FRAME 0x0C
Used to set and then report an endpoint's synchronization frame.
define USB_STRING_DESC (s)
define USB_SUBCLASS_IAD 0x02
Subclass defined on interface association level.
define USB_SUBCLASS_NONE 0x00
No subclass defined.
define USB_SUBCLASS_VENDOR 0xFF
Vendor specific subclass.
define USB_TEST_FORCE_ENABLE 0x05
Test Force Enable.
define USB_TEST_J 0x01
Test J.
define USB_TEST_K 0x02
Test K.
define USB_TEST_PACKET 0x04
Test Pcaket.
define USB_TEST_SE0_NAK 0x03
Test SE0 NAK.
define VERSION_BCD (maj, min, rev) (((maj & 0xFF) << 8) | ((min & 0x0F) << 4) | (rev & 0x0F))
define __CAT (x, y) x ## y

Public Attributes Documentation

variable bAlternateSetting

uint8_t bAlternateSetting;

variable bConfigurationValue

uint8_t bConfigurationValue;

variable bDebugInEndpoint

uint8_t bDebugInEndpoint;

variable bDebugOutEndpoint

uint8_t bDebugOutEndpoint;

variable bDescriptorType

Type of the descriptor.

uint8_t bDescriptorType;

Debug descriptor type.

String descriptor type.

Endpoint descriptor.

IAD descriptor.

Interface descriptor.

Configuration descriptor.

Qualifier descriptor.

USB_DTYPE_DEVICE Device descriptor.

variable bDeviceClass

uint8_t bDeviceClass;

variable bDeviceProtocol

uint8_t bDeviceProtocol;

variable bDeviceSubClass

uint8_t bDeviceSubClass;

variable bEndpointAddress

uint8_t bEndpointAddress;

variable bFirstInterface

uint8_t bFirstInterface;

variable bFunctionClass

uint8_t bFunctionClass;

variable bFunctionProtocol

uint8_t bFunctionProtocol;

variable bFunctionSubClass

uint8_t bFunctionSubClass;

variable bInterfaceClass

uint8_t bInterfaceClass;

variable bInterfaceCount

uint8_t bInterfaceCount;

variable bInterfaceNumber

uint8_t bInterfaceNumber;

variable bInterfaceProtocol

uint8_t bInterfaceProtocol;

variable bInterfaceSubClass

uint8_t bInterfaceSubClass;

variable bInterval

uint8_t bInterval;

variable bLength

uint8_t bLength;

variable bMaxPacketSize0

uint8_t bMaxPacketSize0;

variable bMaxPower

uint8_t bMaxPower;

variable bNumConfigurations

uint8_t bNumConfigurations;

variable bNumEndpoints

uint8_t bNumEndpoints;

variable bNumInterfaces

uint8_t bNumInterfaces;

variable bReserved

uint8_t bReserved;

variable bcdDevice

uint16_t bcdDevice;

variable bcdUSB

uint16_t bcdUSB;

variable bmAttributes

Configuration attributes.

uint8_t bmAttributes;

Endpoint attributes, USB_ENDPOINT_DEF.

Comprised of a mask of USB_CONFIG_ATTR_ masks. On all devices, this should include USB_CONFIG_ATTR_RESERVED at a minimum.

variable iConfiguration

uint8_t iConfiguration;

variable iFunction

uint8_t iFunction;

variable iInterface

uint8_t iInterface;

variable iManufacturer

uint8_t iManufacturer;

variable iProduct

uint8_t iProduct;

variable iSerialNumber

uint8_t iSerialNumber;

variable idProduct

uint16_t idProduct;

variable idVendor

uint16_t idVendor;

variable wMaxPacketSize

uint16_t wMaxPacketSize;

variable wString

uint16_t wString[];

variable wTotalLength

uint16_t wTotalLength;

Public Functions Documentation

function __attribute__

struct usb_header_descriptor __attribute__ (
    (packed)
) 

function __attribute__

struct usb_string_descriptor __attribute__ (
    (packed, aligned(2))
) 

Macro Definition Documentation

define CAT

#define CAT (
    x,
    y
) __CAT(x,y)

define INTSERIALNO_DESCRIPTOR

#define INTSERIALNO_DESCRIPTOR 0xFE

define NO_DESCRIPTOR

#define NO_DESCRIPTOR 0x00

define USB_ARRAY_DESC

#define USB_ARRAY_DESC (
    ...
) {.bLength = 2 + sizeof((uint16_t[]){__VA_ARGS__}),\
                                    .bDescriptorType = USB_DTYPE_STRING ,\
                                    .wString = {__VA_ARGS__}}

Macro to create usb_string_descriptor from array

define USB_CFG_ATTR_RESERVED

#define USB_CFG_ATTR_RESERVED 0x80

define USB_CFG_ATTR_SELFPOWERED

#define USB_CFG_ATTR_SELFPOWERED 0x40

define USB_CFG_POWER_MA

#define USB_CFG_POWER_MA (
    mA
) ((mA) >> 1)

define USB_CLASS_APP_SPEC

#define USB_CLASS_APP_SPEC 0xFE

define USB_CLASS_AUDIO

#define USB_CLASS_AUDIO 0x01

define USB_CLASS_AV

#define USB_CLASS_AV 0x10

define USB_CLASS_BILLBOARD

#define USB_CLASS_BILLBOARD 0x11

define USB_CLASS_CBRIDGE

#define USB_CLASS_CBRIDGE 0x12

define USB_CLASS_CONTENT_SEC

#define USB_CLASS_CONTENT_SEC 0x0D

define USB_CLASS_CSCID

#define USB_CLASS_CSCID 0x0B

define USB_CLASS_DIAGNOSTIC

#define USB_CLASS_DIAGNOSTIC 0xDC

define USB_CLASS_HEALTHCARE

#define USB_CLASS_HEALTHCARE 0x0F

define USB_CLASS_HUB

#define USB_CLASS_HUB 0x09

define USB_CLASS_IAD

#define USB_CLASS_IAD 0xEF

define USB_CLASS_MASS_STORAGE

#define USB_CLASS_MASS_STORAGE 0x08

define USB_CLASS_MISC

#define USB_CLASS_MISC 0xEF

define USB_CLASS_PER_INTERFACE

#define USB_CLASS_PER_INTERFACE 0x00

define USB_CLASS_PHYSICAL

#define USB_CLASS_PHYSICAL 0x05

define USB_CLASS_PRINTER

#define USB_CLASS_PRINTER 0x07

define USB_CLASS_STILL_IMAGE

#define USB_CLASS_STILL_IMAGE 0x06

define USB_CLASS_VENDOR

#define USB_CLASS_VENDOR 0xFF

define USB_CLASS_VIDEO

#define USB_CLASS_VIDEO 0x0E

define USB_CLASS_WIRELESS

#define USB_CLASS_WIRELESS 0xE0

define USB_DTYPE_CONFIGURATION

#define USB_DTYPE_CONFIGURATION 0x02

define USB_DTYPE_CS_ENDPOINT

#define USB_DTYPE_CS_ENDPOINT 0x25

define USB_DTYPE_CS_INTERFACE

#define USB_DTYPE_CS_INTERFACE 0x24

define USB_DTYPE_DEBUG

#define USB_DTYPE_DEBUG 0x0A

define USB_DTYPE_DEVICE

#define USB_DTYPE_DEVICE 0x01

define USB_DTYPE_ENDPOINT

#define USB_DTYPE_ENDPOINT 0x05

define USB_DTYPE_INTERFACE

#define USB_DTYPE_INTERFACE 0x04

define USB_DTYPE_INTERFACEPOWER

#define USB_DTYPE_INTERFACEPOWER 0x08

define USB_DTYPE_INTERFASEASSOC

#define USB_DTYPE_INTERFASEASSOC 0x0B

define USB_DTYPE_OTG

#define USB_DTYPE_OTG 0x09

define USB_DTYPE_OTHER

#define USB_DTYPE_OTHER 0x07

define USB_DTYPE_QUALIFIER

#define USB_DTYPE_QUALIFIER 0x06

define USB_DTYPE_STRING

#define USB_DTYPE_STRING 0x03

define USB_EPATTR_ADAPTIVE

#define USB_EPATTR_ADAPTIVE 0x08

define USB_EPATTR_ASYNC

#define USB_EPATTR_ASYNC 0x04

define USB_EPATTR_NO_SYNC

#define USB_EPATTR_NO_SYNC 0x00

define USB_EPATTR_SYNC

#define USB_EPATTR_SYNC 0x0C

define USB_EPDIR_IN

#define USB_EPDIR_IN 0x00

define USB_EPDIR_OUT

#define USB_EPDIR_OUT 0x80

define USB_EPTYPE_BULK

#define USB_EPTYPE_BULK 0x02

define USB_EPTYPE_CONTROL

#define USB_EPTYPE_CONTROL 0x00

define USB_EPTYPE_INTERRUPT

#define USB_EPTYPE_INTERRUPT 0x03

define USB_EPTYPE_ISOCHRONUS

#define USB_EPTYPE_ISOCHRONUS 0x01

define USB_EPUSAGE_DATA

#define USB_EPUSAGE_DATA 0x00

define USB_EPUSAGE_FEEDBACK

#define USB_EPUSAGE_FEEDBACK 0x10

define USB_EPUSAGE_IMP_FEEDBACK

#define USB_EPUSAGE_IMP_FEEDBACK 0x20

define USB_FEAT_DEBUG_MODE

#define USB_FEAT_DEBUG_MODE 0x06

define USB_FEAT_ENDPOINT_HALT

#define USB_FEAT_ENDPOINT_HALT 0x00

define USB_FEAT_REMOTE_WKUP

#define USB_FEAT_REMOTE_WKUP 0x01

define USB_FEAT_TEST_MODE

#define USB_FEAT_TEST_MODE 0x02

define USB_LANGID_AFR

#define USB_LANGID_AFR 0x0436

define USB_LANGID_ARA_AE

#define USB_LANGID_ARA_AE 0x3801

define USB_LANGID_ARA_BH

#define USB_LANGID_ARA_BH 0x3c01

define USB_LANGID_ARA_DZ

#define USB_LANGID_ARA_DZ 0x1401

define USB_LANGID_ARA_EG

#define USB_LANGID_ARA_EG 0x0c01

define USB_LANGID_ARA_IQ

#define USB_LANGID_ARA_IQ 0x0801

define USB_LANGID_ARA_JO

#define USB_LANGID_ARA_JO 0x2c01

define USB_LANGID_ARA_KW

#define USB_LANGID_ARA_KW 0x3401

define USB_LANGID_ARA_LB

#define USB_LANGID_ARA_LB 0x3001

define USB_LANGID_ARA_LY

#define USB_LANGID_ARA_LY 0x1001

define USB_LANGID_ARA_MA

#define USB_LANGID_ARA_MA 0x1801

define USB_LANGID_ARA_OM

#define USB_LANGID_ARA_OM 0x2001

define USB_LANGID_ARA_QA

#define USB_LANGID_ARA_QA 0x4001

define USB_LANGID_ARA_SA

#define USB_LANGID_ARA_SA 0x0401

define USB_LANGID_ARA_SY

#define USB_LANGID_ARA_SY 0x2801

define USB_LANGID_ARA_TN

#define USB_LANGID_ARA_TN 0x1c01

define USB_LANGID_ARA_YE

#define USB_LANGID_ARA_YE 0x2401

define USB_LANGID_ASM

#define USB_LANGID_ASM 0x044d

define USB_LANGID_AZE_CYR

#define USB_LANGID_AZE_CYR 0x082c

define USB_LANGID_AZE_LAT

#define USB_LANGID_AZE_LAT 0x042c

define USB_LANGID_BEL

#define USB_LANGID_BEL 0x0423

define USB_LANGID_BEN

#define USB_LANGID_BEN 0x0445

define USB_LANGID_BUL

#define USB_LANGID_BUL 0x0402

define USB_LANGID_CAT

#define USB_LANGID_CAT 0x0403

define USB_LANGID_CZE

#define USB_LANGID_CZE 0x0405

define USB_LANGID_DAN

#define USB_LANGID_DAN 0x0406

define USB_LANGID_DEU

#define USB_LANGID_DEU 0x0407

define USB_LANGID_DEU_AT

#define USB_LANGID_DEU_AT 0x0c07

define USB_LANGID_DEU_LI

#define USB_LANGID_DEU_LI 0x1407

define USB_LANGID_DEU_LU

#define USB_LANGID_DEU_LU 0x1007

define USB_LANGID_DEU_SZ

#define USB_LANGID_DEU_SZ 0x0807

define USB_LANGID_ELL

#define USB_LANGID_ELL 0x0408

define USB_LANGID_ENG_AU

#define USB_LANGID_ENG_AU 0x0c09

define USB_LANGID_ENG_BZ

#define USB_LANGID_ENG_BZ 0x2809

define USB_LANGID_ENG_CA

#define USB_LANGID_ENG_CA 0x1009

define USB_LANGID_ENG_CAR

#define USB_LANGID_ENG_CAR 0x2409

define USB_LANGID_ENG_IE

#define USB_LANGID_ENG_IE 0x1809

define USB_LANGID_ENG_JM

#define USB_LANGID_ENG_JM 0x2009

define USB_LANGID_ENG_NZ

#define USB_LANGID_ENG_NZ 0x1409

define USB_LANGID_ENG_PH

#define USB_LANGID_ENG_PH 0x3409

define USB_LANGID_ENG_TH

#define USB_LANGID_ENG_TH 0x2c09

define USB_LANGID_ENG_UK

#define USB_LANGID_ENG_UK 0x0809

define USB_LANGID_ENG_US

#define USB_LANGID_ENG_US 0x0409

define USB_LANGID_ENG_ZA

#define USB_LANGID_ENG_ZA 0x1c09

define USB_LANGID_ENG_ZW

#define USB_LANGID_ENG_ZW 0x3009

define USB_LANGID_EST

#define USB_LANGID_EST 0x0425

define USB_LANGID_EUS

#define USB_LANGID_EUS 0x042d

define USB_LANGID_FAO

#define USB_LANGID_FAO 0x0438

define USB_LANGID_FAS

#define USB_LANGID_FAS 0x0429

define USB_LANGID_FIN

#define USB_LANGID_FIN 0x040b

define USB_LANGID_FRA

#define USB_LANGID_FRA 0x040c

define USB_LANGID_FRA_BE

#define USB_LANGID_FRA_BE 0x080c

define USB_LANGID_FRA_CA

#define USB_LANGID_FRA_CA 0x0c0c

define USB_LANGID_FRA_LU

#define USB_LANGID_FRA_LU 0x140c

define USB_LANGID_FRA_MC

#define USB_LANGID_FRA_MC 0x180c

define USB_LANGID_FRA_SZ

#define USB_LANGID_FRA_SZ 0x100c

define USB_LANGID_GUJ

#define USB_LANGID_GUJ 0x0447

define USB_LANGID_HEB

#define USB_LANGID_HEB 0x040d

define USB_LANGID_HIN

#define USB_LANGID_HIN 0x0439

define USB_LANGID_HRV

#define USB_LANGID_HRV 0x041a

define USB_LANGID_HUN

#define USB_LANGID_HUN 0x040e

define USB_LANGID_HYE

#define USB_LANGID_HYE 0x042b

define USB_LANGID_IND

#define USB_LANGID_IND 0x0421

define USB_LANGID_ISL

#define USB_LANGID_ISL 0x040f

define USB_LANGID_ITA

#define USB_LANGID_ITA 0x0410

define USB_LANGID_ITA_SZ

#define USB_LANGID_ITA_SZ 0x0810

define USB_LANGID_JPN

#define USB_LANGID_JPN 0x0411

define USB_LANGID_KAN

#define USB_LANGID_KAN 0x044b

define USB_LANGID_KAS

#define USB_LANGID_KAS 0x0860

define USB_LANGID_KAT

#define USB_LANGID_KAT 0x0437

define USB_LANGID_KAZ

#define USB_LANGID_KAZ 0x043f

define USB_LANGID_KOK

#define USB_LANGID_KOK 0x0457

define USB_LANGID_KOR

#define USB_LANGID_KOR 0x0412

define USB_LANGID_KOR_JOH

#define USB_LANGID_KOR_JOH 0x0812

define USB_LANGID_LAV

#define USB_LANGID_LAV 0x0426

define USB_LANGID_LIT

#define USB_LANGID_LIT 0x0427

define USB_LANGID_LIT_CLS

#define USB_LANGID_LIT_CLS 0x0827

define USB_LANGID_MAL

#define USB_LANGID_MAL 0x044c

define USB_LANGID_MAR

#define USB_LANGID_MAR 0x044e

define USB_LANGID_MKD

#define USB_LANGID_MKD 0x042f

define USB_LANGID_MNI

#define USB_LANGID_MNI 0x0458

define USB_LANGID_MSA

#define USB_LANGID_MSA 0x043e

define USB_LANGID_MSA_BN

#define USB_LANGID_MSA_BN 0x083e

define USB_LANGID_MYA

#define USB_LANGID_MYA 0x0455

define USB_LANGID_NEP

#define USB_LANGID_NEP 0x0861

define USB_LANGID_NLD_BE

#define USB_LANGID_NLD_BE 0x0813

define USB_LANGID_NLD_NL

#define USB_LANGID_NLD_NL 0x0413

define USB_LANGID_NNO

#define USB_LANGID_NNO 0x0814

define USB_LANGID_NOB

#define USB_LANGID_NOB 0x0414

define USB_LANGID_NSO

#define USB_LANGID_NSO 0x0430

define USB_LANGID_ORI

#define USB_LANGID_ORI 0x0448

define USB_LANGID_PAN

#define USB_LANGID_PAN 0x0446

define USB_LANGID_POL

#define USB_LANGID_POL 0x0415

define USB_LANGID_POR

#define USB_LANGID_POR 0x0816

define USB_LANGID_POR_BR

#define USB_LANGID_POR_BR 0x0416

define USB_LANGID_RON

#define USB_LANGID_RON 0x0418

define USB_LANGID_RUS

#define USB_LANGID_RUS 0x0419

define USB_LANGID_SAN

#define USB_LANGID_SAN 0x044f

define USB_LANGID_SLK

#define USB_LANGID_SLK 0x041b

define USB_LANGID_SLV

#define USB_LANGID_SLV 0x0424

define USB_LANGID_SND

#define USB_LANGID_SND 0x0459

define USB_LANGID_SPA

#define USB_LANGID_SPA 0x040a

define USB_LANGID_SPA_AR

#define USB_LANGID_SPA_AR 0x2c0a

define USB_LANGID_SPA_BO

#define USB_LANGID_SPA_BO 0x400a

define USB_LANGID_SPA_CL

#define USB_LANGID_SPA_CL 0x340a

define USB_LANGID_SPA_CO

#define USB_LANGID_SPA_CO 0x240a

define USB_LANGID_SPA_CR

#define USB_LANGID_SPA_CR 0x140a

define USB_LANGID_SPA_DO

#define USB_LANGID_SPA_DO 0x1c0a

define USB_LANGID_SPA_EC

#define USB_LANGID_SPA_EC 0x300a

define USB_LANGID_SPA_GT

#define USB_LANGID_SPA_GT 0x100a

define USB_LANGID_SPA_HN

#define USB_LANGID_SPA_HN 0x480a

define USB_LANGID_SPA_MDN

#define USB_LANGID_SPA_MDN 0x0c0a

define USB_LANGID_SPA_MX

#define USB_LANGID_SPA_MX 0x080a

define USB_LANGID_SPA_NI

#define USB_LANGID_SPA_NI 0x4c0a

define USB_LANGID_SPA_PA

#define USB_LANGID_SPA_PA 0x180a

define USB_LANGID_SPA_PE

#define USB_LANGID_SPA_PE 0x280a

define USB_LANGID_SPA_PR

#define USB_LANGID_SPA_PR 0x500a

define USB_LANGID_SPA_PY

#define USB_LANGID_SPA_PY 0x3c0a

define USB_LANGID_SPA_SV

#define USB_LANGID_SPA_SV 0x440a

define USB_LANGID_SPA_UY

#define USB_LANGID_SPA_UY 0x380a

define USB_LANGID_SPA_VE

#define USB_LANGID_SPA_VE 0x200a

define USB_LANGID_SQI

#define USB_LANGID_SQI 0x041c

define USB_LANGID_SRB_CYR

#define USB_LANGID_SRB_CYR 0x0c1a

define USB_LANGID_SRB_LAT

#define USB_LANGID_SRB_LAT 0x081a

define USB_LANGID_SWA

#define USB_LANGID_SWA 0x0441

define USB_LANGID_SWE

#define USB_LANGID_SWE 0x041d

define USB_LANGID_SWE_FI

#define USB_LANGID_SWE_FI 0x081d

define USB_LANGID_TAM

#define USB_LANGID_TAM 0x0449

define USB_LANGID_TAT

#define USB_LANGID_TAT 0x0444

define USB_LANGID_TEL

#define USB_LANGID_TEL 0x044a

define USB_LANGID_THA

#define USB_LANGID_THA 0x041e

define USB_LANGID_TUR

#define USB_LANGID_TUR 0x041f

define USB_LANGID_URD_IN

#define USB_LANGID_URD_IN 0x0820

define USB_LANGID_URD_PK

#define USB_LANGID_URD_PK 0x0420

define USB_LANGID_UZB_CYR

#define USB_LANGID_UZB_CYR 0x0843

define USB_LANGID_UZB_LAT

#define USB_LANGID_UZB_LAT 0x0443

define USB_LANGID_VIE

#define USB_LANGID_VIE 0x042a

define USB_LANGID_ZHO_CN

#define USB_LANGID_ZHO_CN 0x0804

define USB_LANGID_ZHO_HK

#define USB_LANGID_ZHO_HK 0x0c04

define USB_LANGID_ZHO_MO

#define USB_LANGID_ZHO_MO 0x1404

define USB_LANGID_ZHO_SG

#define USB_LANGID_ZHO_SG 0x1004

define USB_LANGID_ZHO_TW

#define USB_LANGID_ZHO_TW 0x0404

define USB_LANGIG_UKR

#define USB_LANGIG_UKR 0x0422

define USB_PROTO_IAD

#define USB_PROTO_IAD 0x01

define USB_PROTO_NONE

#define USB_PROTO_NONE 0x00

define USB_PROTO_VENDOR

#define USB_PROTO_VENDOR 0xFF

define USB_STD_CLEAR_FEATURE

#define USB_STD_CLEAR_FEATURE 0x01

define USB_STD_GET_CONFIG

#define USB_STD_GET_CONFIG 0x08

define USB_STD_GET_DESCRIPTOR

#define USB_STD_GET_DESCRIPTOR 0x06

define USB_STD_GET_INTERFACE

#define USB_STD_GET_INTERFACE 0x0A

define USB_STD_GET_STATUS

#define USB_STD_GET_STATUS 0x00

define USB_STD_SET_ADDRESS

#define USB_STD_SET_ADDRESS 0x05

define USB_STD_SET_CONFIG

#define USB_STD_SET_CONFIG 0x09

define USB_STD_SET_DESCRIPTOR

#define USB_STD_SET_DESCRIPTOR 0x07

define USB_STD_SET_FEATURE

#define USB_STD_SET_FEATURE 0x03

define USB_STD_SET_INTERFACE

#define USB_STD_SET_INTERFACE 0x0B

define USB_STD_SYNCH_FRAME

#define USB_STD_SYNCH_FRAME 0x0C

define USB_STRING_DESC

#define USB_STRING_DESC (
    s
) {.bLength = sizeof(CAT(u,s)),\
                                    .bDescriptorType = USB_DTYPE_STRING ,\
                                    .wString = {CAT(u,s)}}

Macro to create usb_string_descriptor from string

define USB_SUBCLASS_IAD

#define USB_SUBCLASS_IAD 0x02

define USB_SUBCLASS_NONE

#define USB_SUBCLASS_NONE 0x00

define USB_SUBCLASS_VENDOR

#define USB_SUBCLASS_VENDOR 0xFF

define USB_TEST_FORCE_ENABLE

#define USB_TEST_FORCE_ENABLE 0x05

define USB_TEST_J

#define USB_TEST_J 0x01

define USB_TEST_K

#define USB_TEST_K 0x02

define USB_TEST_PACKET

#define USB_TEST_PACKET 0x04

define USB_TEST_SE0_NAK

#define USB_TEST_SE0_NAK 0x03

define VERSION_BCD

#define VERSION_BCD (
    maj,
    min,
    rev
) (((maj & 0xFF) << 8) | ((min & 0x0F) << 4) | (rev & 0x0F))

Macro to encode major/minor/version number into BCD code

Parameters:

  • maj Major version
  • min Minor version
  • rev Revision

define __CAT

#define __CAT (
    x,
    y
) x ## y

The documentation for this class was generated from the following file fw/rbcx-coprocessor/lib/libusb_stm32/include/usb_std.h