Changeset b4b534ac in mainline for uspace/app/usbinfo/hid.c
- Timestamp:
- 2016-07-22T08:24:47Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/hid.c
r5b18137 rb4b534ac 36 36 #include <stdio.h> 37 37 #include <str_error.h> 38 #include <usb/debug.h> 38 39 #include <usb/classes/classes.h> 39 40 #include <usb/dev/request.h> … … 50 51 51 52 typedef struct { 52 usb info_device_t *dev;53 usb_device_t *usb_dev; 53 54 hid_dump_type_t dump_type; 54 55 usb_standard_interface_descriptor_t *last_iface; … … 211 212 212 213 retrieve_and_dump_hid_report(context->dump_type, 213 &context->dev->ctrl_pipe, context->last_iface->interface_number,214 report_size);215 } 216 217 218 void dump_hidreport_raw(usb info_device_t *dev)214 usb_device_get_default_pipe(context->usb_dev), 215 context->last_iface->interface_number, report_size); 216 } 217 218 219 void dump_hidreport_raw(usb_device_t *usb_dev) 219 220 { 220 221 descriptor_walk_context_t context = { 221 . dev =dev,222 .usb_dev = usb_dev, 222 223 .dump_type = HID_DUMP_RAW, 223 224 .last_iface = NULL 224 225 }; 225 226 226 usb_dp_walk_simple(dev->full_configuration_descriptor, 227 dev->full_configuration_descriptor_size, 227 usb_dp_walk_simple( 228 usb_device_descriptors(usb_dev)->full_config, 229 usb_device_descriptors(usb_dev)->full_config_size, 228 230 usb_dp_standard_descriptor_nesting, 229 231 descriptor_walk_callback, &context); 230 232 } 231 233 232 void dump_hidreport_usages(usb info_device_t *dev)234 void dump_hidreport_usages(usb_device_t *usb_dev) 233 235 { 234 236 descriptor_walk_context_t context = { 235 . dev =dev,237 .usb_dev = usb_dev, 236 238 .dump_type = HID_DUMP_USAGES, 237 239 .last_iface = NULL 238 240 }; 239 241 240 usb_dp_walk_simple(dev->full_configuration_descriptor, 241 dev->full_configuration_descriptor_size, 242 usb_dp_walk_simple( 243 usb_device_descriptors(usb_dev)->full_config, 244 usb_device_descriptors(usb_dev)->full_config_size, 242 245 usb_dp_standard_descriptor_nesting, 243 246 descriptor_walk_callback, &context);
Note:
See TracChangeset
for help on using the changeset viewer.