2 // Copyright (C) 2014 Pawel Jewstafjew
4 enum { // Endpoint Dir & Request Dir
10 USB_VER_2 = 0x200 // bcdUSB: USB version 2.00
13 enum { // Class, bDeviceClass
14 USB_CLASS_UNDEFINED = 0, // Device defined at Interface level
15 USB_CLASS_AUDIO = 1, // Audio
16 USB_CLASS_MISCELLANEOUS = 0xef, // Miscellaneous Device Class (Interface Association)
17 USB_CLASS_VENDOR = 0xff // Vendor Specific
21 USB_SC_UNDEFINED = 0, // Device defined at Interface level
22 USB_SC_AUDIO_CONTROL = 1, // Audio Control
23 USB_SC_AUDIO_STREAMING = 2, // Audio Streaming
24 USB_SC_MIDI_STREAMING = 3, // MIDI Streaming
25 USB_SC_VENDOR = 0xff // Vendor Specific
29 USB_PR_UNDEFINED = 0, // Device defined at Interface level.
32 enum { // Setup, bmRequestType
33 USB_RT_STANDARD = 0<<5,
37 USB_RT_INTERFACE = 1<<0,
38 USB_RT_ENDPOINT = 2<<0,
42 enum { // Setup, bRequest
43 USB_REQ_GET_STATUS = 0x00,
44 USB_REQ_CLEAR_FEATURE = 0x01,
45 USB_REQ_SET_FEATURE = 0x03,
46 USB_REQ_SET_ADDRESS = 0x05,
47 USB_REQ_GET_DESCRIPTOR = 0x06,
48 USB_REQ_SET_DESCRIPTOR = 0x07,
49 USB_REQ_GET_CONFIGURATION = 0x08,
50 USB_REQ_SET_CONFIGURATION = 0x09,
51 USB_REQ_GET_INTERFACE = 0x0A,
52 USB_REQ_SET_INTERFACE = 0x0B,