Changes in uspace/lib/usb/include/usb/descriptor.h [4e732f1a:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/descriptor.h
r4e732f1a r9d58539 36 36 #define LIBUSB_DESCRIPTOR_H_ 37 37 38 #include < sys/types.h>38 #include <async.h> 39 39 40 40 /** Descriptor type. */ … … 45 45 USB_DESCTYPE_INTERFACE = 4, 46 46 USB_DESCTYPE_ENDPOINT = 5, 47 /* New in USB2.0 */48 USB_DESCTYPE_DEVICE_QUALIFIER = 6,49 USB_DESCTYPE_OTHER_SPEED_CONFIGURATION = 7,50 USB_DESCTYPE_INTERFACE_POWER = 8,51 /* Class specific */52 47 USB_DESCTYPE_HID = 0x21, 53 48 USB_DESCTYPE_HID_REPORT = 0x22, … … 94 89 } __attribute__ ((packed)) usb_standard_device_descriptor_t; 95 90 96 /** USB device qualifier decriptor is basically a cut down version of the device97 * descriptor with values that would be valid if the device operated on the98 * other speed (HIGH vs. FULL)99 */100 typedef struct {101 /** Size of this descriptor in bytes */102 uint8_t length;103 /** Descriptor type (USB_DESCTYPE_DEVICE_QUALIFIER) */104 uint8_t descriptor_type;105 /** USB specification release number.106 * The number shall be coded as binary-coded decimal (BCD).107 */108 uint16_t usb_spec_version;109 /** Device class. */110 uint8_t device_class;111 /** Device sub-class. */112 uint8_t device_subclass;113 /** Device protocol. */114 uint8_t device_protocol;115 /** Maximum packet size for endpoint zero.116 * Valid values are only 8, 16, 32, 64).117 */118 uint8_t max_packet_size;119 /** Number of possible configurations. */120 uint8_t configuration_count;121 uint8_t reserved;122 } __attribute__ ((packed)) usb_standard_device_qualifier_descriptor_t;123 124 91 /** Standard USB configuration descriptor. 125 92 */ … … 149 116 } __attribute__ ((packed)) usb_standard_configuration_descriptor_t; 150 117 151 /** USB Other Speed Configuration descriptor shows values that would change152 * in the configuration descriptor if the device operated at its other153 * possible speed (HIGH vs. FULL)154 */155 typedef usb_standard_configuration_descriptor_t156 usb_other_speed_configuration_descriptor_t;157 158 118 /** Standard USB interface descriptor. 159 119 */ … … 197 157 */ 198 158 uint8_t attributes; 199 /** Maximum packet size. 200 * Lower 10 bits represent the actuall size 201 * Bits 11,12 specify addtional transfer opportunitities for 202 * HS INT and ISO transfers. */ 159 /** Maximum packet size. */ 203 160 uint16_t max_packet_size; 204 #define ED_MPS_PACKET_SIZE_MASK 0x3ff205 #define ED_MPS_PACKET_SIZE_GET(value) \206 ((value) & ED_MPS_PACKET_SIZE_MASK)207 #define ED_MPS_TRANS_OPPORTUNITIES_GET(value) \208 ((((value) >> 10) & 0x3) + 1)209 161 /** Polling interval in milliseconds. 210 162 * Ignored for bulk and control endpoints.
Note:
See TracChangeset
for help on using the changeset viewer.