Changeset da56be2 in mainline
- Timestamp:
- 2011-05-26T11:55:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6a544f5
- Parents:
- a9cdca0
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkbd/main.c
ra9cdca0 rda56be2 45 45 #include <devmap.h> 46 46 #include <usb/dev/hub.h> 47 #include <usb/host.h>48 #include <usb/driver.h>47 //#include <usb/host.h> 48 //#include <usb/driver.h> 49 49 #include <usb/hid/iface.h> 50 50 #include <usb/dev/pipes.h> … … 140 140 assert(report != NULL); 141 141 142 printf("Calling usb_hid_parse_report() with size %zu and " 143 "buffer: \n", size); 144 for (size_t i = 0; i < size; ++i) { 145 printf(" %X ", buffer[i]); 146 } 147 printf("\n"); 148 142 149 uint8_t report_id; 143 usb_hid_parse_report(report, buffer, size, &report_id); 150 int rc = usb_hid_parse_report(report, buffer, size, &report_id); 151 if (rc != EOK) { 152 printf("Error parsing report: %s\n", str_error(rc)); 153 return; 154 } 144 155 145 156 usb_hid_report_path_t *path = usb_hid_report_path(); … … 196 207 197 208 //char *devpath = argv[1]; 198 const char *devpath = "/hw/pci0/00:06.0/ohci-rh/usb00_a2/HID 0/hid";209 const char *devpath = "/hw/pci0/00:06.0/ohci-rh/usb00_a2/HID1/hid"; 199 210 200 211 int rc; … … 269 280 } 270 281 271 printf("Got buffer: %p, size: %zu\n", event, actual_size); 282 printf("Got buffer: %p, size: %zu, max size: %zu\n", event, 283 actual_size, size); 272 284 273 285 print_key(event, size, report); -
uspace/drv/usbhid/generic/hiddev.c
ra9cdca0 rda56be2 120 120 121 121 if (hid_dev->input_report_size > size) { 122 usb_log_debug("input_report_size > size (%zu, %zu)\n", 123 hid_dev->input_report_size, size); 122 124 return EINVAL; // TODO: other error code 123 125 } … … 125 127 /*! @todo This should probably be atomic. */ 126 128 if (usb_hid_report_ready()) { 129 usb_log_debug("Report ready, size: %zu\n", 130 hid_dev->input_report_size); 127 131 memcpy(buffer, hid_dev->input_report, 128 132 hid_dev->input_report_size); … … 136 140 // note that we already received this report 137 141 // report_received = true; 142 usb_log_debug("OK\n"); 138 143 139 144 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.