Changeset c9d5577 in mainline
- Timestamp:
- 2011-01-14T14:55:19Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ff8ed06
- Parents:
- 4989d73
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/dump.c
r4989d73 rc9d5577 43 43 #include <usb/usb.h> 44 44 #include <usb/descriptor.h> 45 #include <usb/classes/classes.h> 45 46 46 47 #include "usbinfo.h" … … 48 49 49 50 #define INDENT " " 50 #define PRINTLINE(indent, fmt, ...) printf("%s " fmt, get_indent(indent), __VA_ARGS__)51 #define PRINTLINE(indent, fmt, ...) printf("%s - " fmt, get_indent(indent), __VA_ARGS__) 51 52 #define BYTES_PER_LINE 12 52 53 … … 200 201 void dump_descriptor_interface(size_t indent, uint8_t *descr, size_t size) 201 202 { 202 dump_descriptor_generic(indent, descr, size); 203 usb_standard_interface_descriptor_t *d 204 = (usb_standard_interface_descriptor_t *) descr; 205 if (size != sizeof(*d)) { 206 return; 207 } 208 209 PRINTLINE(indent, "bLength = %d\n", d->length); 210 PRINTLINE(indent, "bDescriptorType = 0x%02x\n", d->descriptor_type); 211 PRINTLINE(indent, "bInterfaceNumber = %d\n", d->interface_number); 212 PRINTLINE(indent, "bAlternateSetting = %d\n", d->alternate_setting); 213 PRINTLINE(indent, "bNumEndpoints = %d\n", d->endpoint_count); 214 PRINTLINE(indent, "bInterfaceClass = %s\n", d->interface_class == 0 215 ? "reserved (0)" : usb_str_class(d->interface_class)); 216 PRINTLINE(indent, "bInterfaceSubClass = %d\n", d->interface_subclass); 217 PRINTLINE(indent, "bInterfaceProtocol = %d\n", d->interface_protocol); 218 PRINTLINE(indent, "iInterface = %d\n", d->str_interface); 203 219 } 204 220 … … 212 228 usb_standard_endpoint_descriptor_t *d 213 229 = (usb_standard_endpoint_descriptor_t *) descr; 230 if (size != sizeof(*d)) { 231 return; 232 } 214 233 215 234 int endpoint = d->endpoint_address & 15;
Note:
See TracChangeset
for help on using the changeset viewer.