Changes in uspace/app/usbinfo/hid.c [a1732929:feeac0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/hid.c
ra1732929 rfeeac0d 36 36 #include <stdio.h> 37 37 #include <str_error.h> 38 #include <usb/debug.h>39 38 #include <usb/classes/classes.h> 40 39 #include <usb/dev/request.h> … … 51 50 52 51 typedef struct { 53 usb _device_t *usb_dev;52 usbinfo_device_t *dev; 54 53 hid_dump_type_t dump_type; 55 54 usb_standard_interface_descriptor_t *last_iface; … … 141 140 raw_report, report_size, &actual_report_size); 142 141 if (rc != EOK) { 143 usb_log_error("Failed to retrieve HID report descriptor: %s. ",142 usb_log_error("Failed to retrieve HID report descriptor: %s.\n", 144 143 str_error(rc)); 145 144 free(raw_report); … … 150 149 rc = usb_hid_parse_report_descriptor(&report, raw_report, report_size); 151 150 if (rc != EOK) { 152 usb_log_error("Failed to part report descriptor: %s. ",151 usb_log_error("Failed to part report descriptor: %s.\n", 153 152 str_error(rc)); 154 153 } … … 212 211 213 212 retrieve_and_dump_hid_report(context->dump_type, 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)213 &context->dev->ctrl_pipe, context->last_iface->interface_number, 214 report_size); 215 } 216 217 218 void dump_hidreport_raw(usbinfo_device_t *dev) 220 219 { 221 220 descriptor_walk_context_t context = { 222 . usb_dev = usb_dev,221 .dev = dev, 223 222 .dump_type = HID_DUMP_RAW, 224 223 .last_iface = NULL 225 224 }; 226 225 227 usb_dp_walk_simple( 228 usb_device_descriptors(usb_dev)->full_config, 229 usb_device_descriptors(usb_dev)->full_config_size, 226 usb_dp_walk_simple(dev->full_configuration_descriptor, 227 dev->full_configuration_descriptor_size, 230 228 usb_dp_standard_descriptor_nesting, 231 229 descriptor_walk_callback, &context); 232 230 } 233 231 234 void dump_hidreport_usages(usb _device_t *usb_dev)232 void dump_hidreport_usages(usbinfo_device_t *dev) 235 233 { 236 234 descriptor_walk_context_t context = { 237 . usb_dev = usb_dev,235 .dev = dev, 238 236 .dump_type = HID_DUMP_USAGES, 239 237 .last_iface = NULL 240 238 }; 241 239 242 usb_dp_walk_simple( 243 usb_device_descriptors(usb_dev)->full_config, 244 usb_device_descriptors(usb_dev)->full_config_size, 240 usb_dp_walk_simple(dev->full_configuration_descriptor, 241 dev->full_configuration_descriptor_size, 245 242 usb_dp_standard_descriptor_nesting, 246 243 descriptor_walk_callback, &context);
Note:
See TracChangeset
for help on using the changeset viewer.