Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/descriptor.h

    r4e732f1a r9d58539  
    3636#define LIBUSB_DESCRIPTOR_H_
    3737
    38 #include <sys/types.h>
     38#include <async.h>
    3939
    4040/** Descriptor type. */
     
    4545        USB_DESCTYPE_INTERFACE = 4,
    4646        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 */
    5247        USB_DESCTYPE_HID = 0x21,
    5348        USB_DESCTYPE_HID_REPORT = 0x22,
     
    9489} __attribute__ ((packed)) usb_standard_device_descriptor_t;
    9590
    96 /** USB device qualifier decriptor is basically a cut down version of the device
    97  * descriptor with values that would be valid if the device operated on the
    98  * 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 
    12491/** Standard USB configuration descriptor.
    12592 */
     
    149116} __attribute__ ((packed)) usb_standard_configuration_descriptor_t;
    150117
    151 /** USB Other Speed Configuration descriptor shows values that would change
    152  * in the configuration descriptor if the device operated at its other
    153  * possible speed (HIGH vs. FULL)
    154  */
    155 typedef usb_standard_configuration_descriptor_t
    156     usb_other_speed_configuration_descriptor_t;
    157 
    158118/** Standard USB interface descriptor.
    159119 */
     
    197157         */
    198158        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. */
    203160        uint16_t max_packet_size;
    204 #define ED_MPS_PACKET_SIZE_MASK  0x3ff
    205 #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)
    209161        /** Polling interval in milliseconds.
    210162         * Ignored for bulk and control endpoints.
Note: See TracChangeset for help on using the changeset viewer.