Changes in uspace/drv/usbhid/mouse/mousedev.c [65c3794:19e0560e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/mouse/mousedev.c
r65c3794 r19e0560e 225 225 226 226 static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev, 227 usb_mouse_t *mouse_dev /*, uint8_t *buffer,228 size_t buffer_size */)227 usb_mouse_t *mouse_dev, uint8_t *buffer, 228 size_t buffer_size) 229 229 { 230 230 assert(mouse_dev != NULL); 231 231 232 //usb_log_debug2("got buffer: %s.\n",233 //usb_debug_str_buffer(buffer, buffer_size, 0));232 usb_log_debug2("got buffer: %s.\n", 233 usb_debug_str_buffer(buffer, buffer_size, 0)); 234 234 235 235 if (mouse_dev->mouse_phone < 0) { … … 242 242 */ 243 243 244 //usb_log_debug(NAME " Calling usb_hid_parse_report() with "245 //"buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0));246 247 //uint8_t report_id;248 249 //int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size,250 //&report_id);251 252 //if (rc != EOK) {253 //usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n",254 //str_error(rc));255 //return true;256 //}244 usb_log_debug(NAME " Calling usb_hid_parse_report() with " 245 "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0)); 246 247 uint8_t report_id; 248 249 int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size, 250 &report_id); 251 252 if (rc != EOK) { 253 usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n", 254 str_error(rc)); 255 return true; 256 } 257 257 258 258 /* … … 265 265 USB_HIDUT_USAGE_GENERIC_DESKTOP_X); 266 266 267 usb_hid_report_path_set_report_id(path, hid_dev->report_id);267 usb_hid_report_path_set_report_id(path, report_id); 268 268 269 269 usb_hid_report_field_t *field = usb_hid_report_get_sibling( … … 288 288 USB_HIDUT_USAGE_GENERIC_DESKTOP_Y); 289 289 290 usb_hid_report_path_set_report_id(path, hid_dev->report_id);290 usb_hid_report_path_set_report_id(path, report_id); 291 291 292 292 field = usb_hid_report_get_sibling( … … 316 316 USB_HIDUT_USAGE_GENERIC_DESKTOP_WHEEL); 317 317 318 usb_hid_report_path_set_report_id(path, hid_dev->report_id);318 usb_hid_report_path_set_report_id(path, report_id); 319 319 320 320 field = usb_hid_report_get_sibling( … … 340 340 path = usb_hid_report_path(); 341 341 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_BUTTON, 0); 342 usb_hid_report_path_set_report_id(path, hid_dev->report_id);342 usb_hid_report_path_set_report_id(path, report_id); 343 343 344 344 field = usb_hid_report_get_sibling( … … 505 505 /*----------------------------------------------------------------------------*/ 506 506 507 bool usb_mouse_polling_callback(usb_hid_dev_t *hid_dev, void *data /*,508 uint8_t *buffer, size_t buffer_size */)507 bool usb_mouse_polling_callback(usb_hid_dev_t *hid_dev, void *data, 508 uint8_t *buffer, size_t buffer_size) 509 509 { 510 510 usb_log_debug("usb_mouse_polling_callback()\n"); 511 //usb_debug_str_buffer(buffer, buffer_size, 0);511 usb_debug_str_buffer(buffer, buffer_size, 0); 512 512 513 513 if (hid_dev == NULL || data == NULL) { … … 519 519 usb_mouse_t *mouse_dev = (usb_mouse_t *)data; 520 520 521 return usb_mouse_process_report(hid_dev, mouse_dev /*, buffer,522 buffer_size */);521 return usb_mouse_process_report(hid_dev, mouse_dev, buffer, 522 buffer_size); 523 523 } 524 524
Note:
See TracChangeset
for help on using the changeset viewer.