Changes in / [083adbc:bbfa425] in mainline
- Location:
- uspace/drv
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/root_hub.c
r083adbc rbbfa425 251 251 int opResult; 252 252 if (request->ep->transfer_type == USB_TRANSFER_CONTROL) { 253 usb_log_ info("Root hub got CONTROL packet\n");253 usb_log_debug("Root hub got CONTROL packet\n"); 254 254 opResult = process_ctrl_request(instance, request); 255 255 usb_transfer_batch_finish_error(request, opResult); 256 256 } else if (request->ep->transfer_type == USB_TRANSFER_INTERRUPT) { 257 usb_log_ info("Root hub got INTERRUPT packet\n");257 usb_log_debug("Root hub got INTERRUPT packet\n"); 258 258 create_interrupt_mask_in_instance(instance); 259 259 if (is_zeros(instance->interrupt_buffer, -
uspace/drv/usbhid/generic/hiddev.c
r083adbc rbbfa425 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 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); 239 239 return true; 240 240 } -
uspace/drv/usbhid/generic/hiddev.h
r083adbc rbbfa425 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/*, 53 uint8_t *buffer, size_t buffer_size*/); 54 54 55 55 #endif // USB_HID_HIDDDEV_H_ -
uspace/drv/usbhid/kbd/kbddev.c
r083adbc rbbfa425 529 529 * usb_hid_parse_report(). 530 530 */ 531 static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev ,532 uint8_t *buffer, size_t actual_size )531 static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev/*, 532 uint8_t *buffer, size_t actual_size*/) 533 533 { 534 534 assert(hid_dev->report != NULL); … … 536 536 assert(kbd_dev != NULL); 537 537 538 usb_log_debug("Calling usb_hid_parse_report() with "539 "buffer %s\n", usb_debug_str_buffer(buffer, actual_size, 0));538 // usb_log_debug("Calling usb_hid_parse_report() with " 539 // "buffer %s\n", usb_debug_str_buffer(buffer, actual_size, 0)); 540 540 541 541 usb_hid_report_path_t *path = usb_hid_report_path(); 542 542 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0); 543 543 544 uint8_t report_id;545 int rc = usb_hid_parse_report(hid_dev->report, buffer, actual_size,546 &report_id);547 548 if (rc != EOK) {549 usb_log_warning("Error in usb_hid_parse_report():"550 "%s\n", str_error(rc));551 }552 553 usb_hid_report_path_set_report_id (path, report_id);544 // uint8_t report_id; 545 // int rc = usb_hid_parse_report(hid_dev->report, buffer, actual_size, 546 // &report_id); 547 548 // if (rc != EOK) { 549 // usb_log_warning("Error in usb_hid_parse_report():" 550 // "%s\n", str_error(rc)); 551 // } 552 553 usb_hid_report_path_set_report_id (path, hid_dev->report_id); 554 554 555 555 // fill in the currently pressed keys … … 848 848 /*----------------------------------------------------------------------------*/ 849 849 850 bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data ,851 uint8_t *buffer, size_t buffer_size )852 { 853 if (hid_dev == NULL || buffer == NULL|| data == NULL) {850 bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data/*, 851 uint8_t *buffer, size_t buffer_size*/) 852 { 853 if (hid_dev == NULL/* || buffer == NULL*/ || data == NULL) { 854 854 // do not continue polling (???) 855 855 return false; … … 860 860 861 861 // TODO: add return value from this function 862 usb_kbd_process_data(hid_dev, kbd_dev , buffer, buffer_size);862 usb_kbd_process_data(hid_dev, kbd_dev/*, buffer, buffer_size*/); 863 863 864 864 return true; -
uspace/drv/usbhid/kbd/kbddev.h
r083adbc rbbfa425 122 122 int usb_kbd_init(struct usb_hid_dev *hid_dev, void **data); 123 123 124 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data ,125 uint8_t *buffer, size_t buffer_size );124 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 125 uint8_t *buffer, size_t buffer_size*/); 126 126 127 127 int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev); -
uspace/drv/usbhid/mouse/mousedev.c
r083adbc rbbfa425 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, report_id);267 usb_hid_report_path_set_report_id(path, hid_dev->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, report_id);290 usb_hid_report_path_set_report_id(path, hid_dev->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, report_id);318 usb_hid_report_path_set_report_id(path, hid_dev->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, report_id);342 usb_hid_report_path_set_report_id(path, hid_dev->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 -
uspace/drv/usbhid/mouse/mousedev.h
r083adbc rbbfa425 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/*, 68 uint8_t *buffer, size_t buffer_size*/); 69 69 70 70 void usb_mouse_deinit(struct usb_hid_dev *hid_dev, void *data); -
uspace/drv/usbhid/multimedia/multimedia.c
r083adbc rbbfa425 269 269 /*----------------------------------------------------------------------------*/ 270 270 271 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data ,272 uint8_t *buffer, size_t buffer_size )271 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data/*, 272 uint8_t *buffer, size_t buffer_size*/) 273 273 { 274 274 // TODO: checks 275 if (hid_dev == NULL || data == NULL || buffer == NULL) {275 if (hid_dev == NULL || data == NULL/* || buffer == NULL*/) { 276 276 return false; 277 277 } 278 278 279 usb_log_debug(NAME " usb_lgtch_polling_callback(%p, %p, %zu)\n",280 hid_dev, buffer, buffer_size);279 // usb_log_debug(NAME " usb_lgtch_polling_callback(%p, %p, %zu)\n", 280 // hid_dev, buffer, buffer_size); 281 281 282 282 usb_multimedia_t *multim_dev = (usb_multimedia_t *)data; 283 283 284 usb_log_debug(NAME " Calling usb_hid_parse_report() with "285 "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0));284 // usb_log_debug(NAME " Calling usb_hid_parse_report() with " 285 // "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0)); 286 286 287 287 usb_hid_report_path_t *path = usb_hid_report_path(); 288 288 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0); 289 289 290 uint8_t report_id;291 292 int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size,293 &report_id);294 295 if (rc != EOK) {296 usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n",297 str_error(rc));298 return true;299 }300 301 usb_hid_report_path_set_report_id(path, report_id);290 // uint8_t report_id; 291 292 // int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size, 293 // &report_id); 294 295 // if (rc != EOK) { 296 // usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n", 297 // str_error(rc)); 298 // return true; 299 // } 300 301 usb_hid_report_path_set_report_id(path, hid_dev->report_id); 302 302 303 303 usb_hid_report_field_t *field = usb_hid_report_get_sibling( -
uspace/drv/usbhid/multimedia/multimedia.h
r083adbc rbbfa425 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/*, 50 uint8_t *buffer, size_t buffer_size*/); 51 51 52 52 /*----------------------------------------------------------------------------*/ -
uspace/drv/usbhid/usbhid.c
r083adbc rbbfa425 582 582 } 583 583 584 // parse the input report 585 586 int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size, 587 &hid_dev->report_id); 588 589 if (rc != EOK) { 590 usb_log_warning("Error in usb_hid_parse_report():" 591 "%s\n", str_error(rc)); 592 } 593 584 594 bool cont = false; 585 595 … … 588 598 if (hid_dev->subdrivers[i].poll != NULL 589 599 && hid_dev->subdrivers[i].poll(hid_dev, 590 hid_dev->subdrivers[i].data , buffer, buffer_size)) {600 hid_dev->subdrivers[i].data/*, buffer, buffer_size*/)) { 591 601 cont = true; 592 602 } -
uspace/drv/usbhid/usbhid.h
r083adbc rbbfa425 50 50 typedef int (*usb_hid_driver_init_t)(struct usb_hid_dev *, void **data); 51 51 typedef void (*usb_hid_driver_deinit_t)(struct usb_hid_dev *, void *data); 52 typedef bool (*usb_hid_driver_poll_t)(struct usb_hid_dev *, void *data, uint8_t *, 53 size_t); 52 typedef bool (*usb_hid_driver_poll_t)(struct usb_hid_dev *, void *data); 54 53 typedef int (*usb_hid_driver_poll_ended_t)(struct usb_hid_dev *, void *data, 55 54 bool reason); … … 93 92 /** HID Report parser. */ 94 93 usb_hid_report_t *report; 94 95 uint8_t report_id; 95 96 96 97 uint8_t *input_report;
Note:
See TracChangeset
for help on using the changeset viewer.