Changeset c694b7e in mainline
- Timestamp:
- 2010-12-12T16:38:27Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca038b4
- Parents:
- a3b1107
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hid.h
ra3b1107 rc694b7e 39 39 #include <driver.h> 40 40 #include <usb/classes/hidparser.h> 41 #include <usb/descriptor.h> 41 42 42 43 /** USB/HID device requests. */ … … 63 64 */ 64 65 typedef struct { 65 /** Type of class descriptor (Report or Physical). */66 uint8_t class_descriptor_type;67 /** Length of class descriptor. */68 uint16_t class_descriptor_length;69 } __attribute__ ((packed)) usb_standard_hid_ descriptor_class_item_t;66 /** Type of class-specific descriptor (Report or Physical). */ 67 uint8_t type; 68 /** Length of class-specific descriptor in bytes. */ 69 uint16_t length; 70 } __attribute__ ((packed)) usb_standard_hid_class_descriptor_info_t; 70 71 71 72 /** Standard USB HID descriptor. … … 73 74 * (See HID Specification, p.22) 74 75 * 75 * It is actually only the "header" of the descriptor, as it may have arbitrary 76 * length if more than one class descritor is provided. 76 * It is actually only the "header" of the descriptor, it does not contain 77 * the last two mandatory fields (type and length of the first class-specific 78 * descriptor). 77 79 */ 78 80 typedef struct { 79 /** Size of this descriptor in bytes. */ 81 /** Total size of this descriptor in bytes. 82 * 83 * This includes all class-specific descriptor info - type + length 84 * for each descriptor. 85 */ 80 86 uint8_t length; 81 87 /** Descriptor type (USB_DESCTYPE_HID). */ … … 85 91 /** Country code of localized hardware. */ 86 92 uint8_t country_code; 87 /** Total number of class (i.e. Report and Physical) descriptors. */ 88 uint8_t class_count; 89 /** First mandatory class descriptor info. */ 90 usb_standard_hid_descriptor_class_item_t class_descriptor; 93 /** Total number of class-specific (i.e. Report and Physical) 94 * descriptors. 95 */ 96 uint8_t class_desc_count; 97 // /** First mandatory class descriptor info. */ 98 // usb_standard_hid_descriptor_class_item_t class_descriptor; 91 99 } __attribute__ ((packed)) usb_standard_hid_descriptor_t; 92 100 101 /** 102 * 103 */ 104 typedef struct { 105 usb_standard_interface_descriptor_t iface_desc; 106 usb_standard_endpoint_descriptor_t *endpoints; 107 usb_standard_hid_descriptor_t hid_desc; 108 usb_standard_hid_class_descriptor_info_t *class_desc_info; 109 uint8_t **class_descs; 110 } usb_hid_iface_t; 111 112 /** 113 * 114 */ 115 typedef struct { 116 usb_standard_configuration_descriptor_t config_descriptor; 117 usb_hid_iface_t *interfaces; 118 } usb_hid_configuration_t; 93 119 94 120 /** … … 99 125 typedef struct { 100 126 device_t *device; 127 usb_hid_configuration_t *conf; 101 128 usb_address_t address; 102 129 usb_endpoint_t default_ep;
Note:
See TracChangeset
for help on using the changeset viewer.