Changes in uspace/drv/usbkbd/kbddev.c [7f2e33a:e4153ea] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified uspace/drv/usbkbd/kbddev.c ¶
r7f2e33a re4153ea 265 265 static void usb_kbd_set_led(usb_kbd_t *kbd_dev) 266 266 { 267 if (kbd_dev->output_size == 0) {268 return;269 }270 271 267 unsigned i = 0; 272 268 … … 292 288 293 289 int rc = usb_hid_report_output_translate(kbd_dev->parser, 294 kbd_dev->led_path, 295 USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 296 kbd_dev->output_buffer, 290 kbd_dev->led_path, USB_HID_PATH_COMPARE_END, kbd_dev->output_buffer, 297 291 kbd_dev->output_size, kbd_dev->led_data, kbd_dev->led_output_size); 298 292 … … 545 539 * according to HID Usage Tables. 546 540 * @param count Number of key codes in report (size of the report). 547 * @param report_id541 * @param modifiers Bitmap of modifiers (Ctrl, Alt, Shift, GUI). 548 542 * @param arg User-specified argument. Expects pointer to the keyboard device 549 543 * structure representing the keyboard. … … 552 546 */ 553 547 static void usb_kbd_process_keycodes(const uint8_t *key_codes, size_t count, 554 uint8_t report_id, void *arg)548 uint8_t modifiers, void *arg) 555 549 { 556 550 if (arg == NULL) { … … 563 557 assert(kbd_dev != NULL); 564 558 565 usb_log_debug("Got keys from parser (report id: %u): %s\n",566 report_id,usb_debug_str_buffer(key_codes, count, 0));559 usb_log_debug("Got keys from parser: %s\n", 560 usb_debug_str_buffer(key_codes, count, 0)); 567 561 568 562 if (count != kbd_dev->key_count) { … … 614 608 usb_hid_report_path_t *path = usb_hid_report_path(); 615 609 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0); 616 usb_hid_report_path_set_report_id(path, 0);617 610 618 611 int rc = usb_hid_parse_report(kbd_dev->parser, buffer, 619 actual_size, path, 620 USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 621 callbacks, kbd_dev); 612 actual_size, path, USB_HID_PATH_COMPARE_STRICT, callbacks, kbd_dev); 622 613 623 614 usb_hid_report_path_free (path); … … 767 758 usb_hid_report_path_t *path = usb_hid_report_path(); 768 759 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0); 769 770 usb_hid_report_path_set_report_id(path, 0);771 772 760 kbd_dev->key_count = usb_hid_report_input_length( 773 kbd_dev->parser, path, 774 USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY); 761 kbd_dev->parser, path, USB_HID_PATH_COMPARE_STRICT); 775 762 usb_hid_report_path_free (path); 776 763 … … 790 777 kbd_dev->output_buffer = usb_hid_report_output(kbd_dev->parser, 791 778 &kbd_dev->output_size); 792 if (kbd_dev->output_buffer == NULL && kbd_dev->output_size != 0) {779 if (kbd_dev->output_buffer == NULL) { 793 780 usb_log_warning("Error creating output report buffer.\n"); 794 781 free(kbd_dev->keys); … … 803 790 804 791 kbd_dev->led_output_size = usb_hid_report_output_size(kbd_dev->parser, 805 kbd_dev->led_path, 806 USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY); 792 kbd_dev->led_path, USB_HID_PATH_COMPARE_END); 807 793 808 794 usb_log_debug("Output report size (in items): %zu\n",
Note:
See TracChangeset
for help on using the changeset viewer.