Changeset 4d3c13e in mainline
- Timestamp:
- 2011-06-16T19:19:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f7276d
- Parents:
- 98dc29d
- Location:
- uspace/drv/usbhid
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/generic/hiddev.c
r98dc29d r4d3c13e 231 231 /*----------------------------------------------------------------------------*/ 232 232 233 bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data/*, 234 uint8_t *buffer, size_t buffer_size*/) 235 { 236 // usb_log_debug2("usb_hid_polling_callback(%p, %p, %zu)\n", 237 // hid_dev, buffer, buffer_size); 238 // usb_debug_str_buffer(buffer, buffer_size, 0); 233 bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data) 234 { 239 235 return true; 240 236 } -
uspace/drv/usbhid/generic/hiddev.h
r98dc29d r4d3c13e 50 50 int usb_generic_hid_init(struct usb_hid_dev *hid_dev, void **data); 51 51 52 bool usb_generic_hid_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 53 uint8_t *buffer, size_t buffer_size*/); 52 bool usb_generic_hid_polling_callback(struct usb_hid_dev *hid_dev, void *data); 54 53 55 54 #endif // USB_HID_HIDDDEV_H_ -
uspace/drv/usbhid/kbd/kbddev.c
r98dc29d r4d3c13e 434 434 * usb_hid_parse_report(). 435 435 */ 436 static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev/*, 437 uint8_t *buffer, size_t actual_size*/) 436 static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev) 438 437 { 439 438 assert(hid_dev->report != NULL); 440 439 assert(hid_dev != NULL); 441 440 assert(kbd_dev != NULL); 442 443 // usb_log_debug("Calling usb_hid_parse_report() with "444 // "buffer %s\n", usb_debug_str_buffer(buffer, actual_size, 0));445 441 446 442 usb_hid_report_path_t *path = usb_hid_report_path(); 447 443 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0); 448 444 449 // uint8_t report_id;450 // int rc = usb_hid_parse_report(hid_dev->report, buffer, actual_size,451 // &report_id);452 453 // if (rc != EOK) {454 // usb_log_warning("Error in usb_hid_parse_report():"455 // "%s\n", str_error(rc));456 // }457 458 445 usb_hid_report_path_set_report_id (path, hid_dev->report_id); 459 446 … … 756 743 /*----------------------------------------------------------------------------*/ 757 744 758 bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data/*, 759 uint8_t *buffer, size_t buffer_size*/) 745 bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data) 760 746 { 761 747 if (hid_dev == NULL/* || buffer == NULL*/ || data == NULL) { … … 768 754 769 755 // TODO: add return value from this function 770 usb_kbd_process_data(hid_dev, kbd_dev /*, buffer, buffer_size*/);756 usb_kbd_process_data(hid_dev, kbd_dev); 771 757 772 758 return true; … … 804 790 if ((*kbd_dev)->repeat_mtx != NULL) { 805 791 //assert(!fibril_mutex_is_locked((*kbd_dev)->repeat_mtx)); 792 // FIXME - the fibril_mutex_is_locked may not cause 793 // fibril scheduling 806 794 while (fibril_mutex_is_locked((*kbd_dev)->repeat_mtx)) {} 807 795 free((*kbd_dev)->repeat_mtx); -
uspace/drv/usbhid/kbd/kbddev.h
r98dc29d r4d3c13e 125 125 int usb_kbd_init(struct usb_hid_dev *hid_dev, void **data); 126 126 127 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 128 uint8_t *buffer, size_t buffer_size*/); 127 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data); 129 128 130 129 int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev); -
uspace/drv/usbhid/mouse/mousedev.c
r98dc29d r4d3c13e 229 229 /*----------------------------------------------------------------------------*/ 230 230 231 static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev, 232 usb_mouse_t *mouse_dev/*, uint8_t *buffer, 233 size_t buffer_size*/) 231 static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev, 232 usb_mouse_t *mouse_dev) 234 233 { 235 234 assert(mouse_dev != NULL); 236 237 // usb_log_debug2("got buffer: %s.\n",238 // usb_debug_str_buffer(buffer, buffer_size, 0));239 235 240 236 if (mouse_dev->mouse_phone < 0) { … … 243 239 } 244 240 245 /*246 * parse the input report247 */248 249 // usb_log_debug(NAME " Calling usb_hid_parse_report() with "250 // "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0));251 252 // uint8_t report_id;253 254 // int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size,255 // &report_id);256 257 // if (rc != EOK) {258 // usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n",259 // str_error(rc));260 // return true;261 // }262 263 241 /* 264 242 * X … … 510 488 /*----------------------------------------------------------------------------*/ 511 489 512 bool usb_mouse_polling_callback(usb_hid_dev_t *hid_dev, void *data/*, 513 uint8_t *buffer, size_t buffer_size*/) 490 bool usb_mouse_polling_callback(usb_hid_dev_t *hid_dev, void *data) 514 491 { 515 492 usb_log_debug("usb_mouse_polling_callback()\n"); 516 // usb_debug_str_buffer(buffer, buffer_size, 0);517 493 518 494 if (hid_dev == NULL || data == NULL) { … … 524 500 usb_mouse_t *mouse_dev = (usb_mouse_t *)data; 525 501 526 return usb_mouse_process_report(hid_dev, mouse_dev/*, buffer, 527 buffer_size*/); 502 return usb_mouse_process_report(hid_dev, mouse_dev); 528 503 } 529 504 -
uspace/drv/usbhid/mouse/mousedev.h
r98dc29d r4d3c13e 65 65 int usb_mouse_init(struct usb_hid_dev *hid_dev, void **data); 66 66 67 bool usb_mouse_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 68 uint8_t *buffer, size_t buffer_size*/); 67 bool usb_mouse_polling_callback(struct usb_hid_dev *hid_dev, void *data); 69 68 70 69 void usb_mouse_deinit(struct usb_hid_dev *hid_dev, void *data); -
uspace/drv/usbhid/multimedia/multimedia.c
r98dc29d r4d3c13e 94 94 95 95 usb_multimedia_t *multim_dev = (usb_multimedia_t *)fun->driver_data; 96 //usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;97 96 98 97 if (multim_dev == NULL) { … … 274 273 /*----------------------------------------------------------------------------*/ 275 274 276 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 277 uint8_t *buffer, size_t buffer_size*/) 275 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data) 278 276 { 279 277 // TODO: checks 280 if (hid_dev == NULL || data == NULL /* || buffer == NULL*/) {278 if (hid_dev == NULL || data == NULL) { 281 279 return false; 282 280 } 283 284 // usb_log_debug(NAME " usb_lgtch_polling_callback(%p, %p, %zu)\n", 285 // hid_dev, buffer, buffer_size); 286 281 287 282 usb_multimedia_t *multim_dev = (usb_multimedia_t *)data; 288 289 // usb_log_debug(NAME " Calling usb_hid_parse_report() with "290 // "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0));291 283 292 284 usb_hid_report_path_t *path = usb_hid_report_path(); 293 285 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0); 294 286 295 // uint8_t report_id;296 297 // int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size,298 // &report_id);299 300 // if (rc != EOK) {301 // usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n",302 // str_error(rc));303 // return true;304 // }305 306 287 usb_hid_report_path_set_report_id(path, hid_dev->report_id); 307 288 -
uspace/drv/usbhid/multimedia/multimedia.h
r98dc29d r4d3c13e 47 47 void usb_multimedia_deinit(struct usb_hid_dev *hid_dev, void *data); 48 48 49 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 50 uint8_t *buffer, size_t buffer_size*/); 49 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data); 51 50 52 51 /*----------------------------------------------------------------------------*/ -
uspace/drv/usbhid/usbhid.c
r98dc29d r4d3c13e 598 598 if (hid_dev->subdrivers[i].poll != NULL 599 599 && hid_dev->subdrivers[i].poll(hid_dev, 600 hid_dev->subdrivers[i].data /*, buffer, buffer_size*/)) {600 hid_dev->subdrivers[i].data)) { 601 601 cont = true; 602 602 }
Note:
See TracChangeset
for help on using the changeset viewer.