Changes in uspace/app/usbinfo/hid.c [feeac0d:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/hid.c
rfeeac0d rb7fd2a0 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; … … 135 136 136 137 size_t actual_report_size; 137 int rc = usb_request_get_descriptor(ctrl_pipe,138 errno_t rc = usb_request_get_descriptor(ctrl_pipe, 138 139 USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_INTERFACE, 139 140 USB_DESCTYPE_HID_REPORT, 0, iface_no, … … 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.