Changeset 252cf2a in mainline for uspace/drv/usbhid/kbd/kbddev.c
- Timestamp:
- 2011-05-08T15:53:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f55ded3
- Parents:
- cc5908e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbd/kbddev.c
rcc5908e r252cf2a 677 677 // callbacks, kbd_dev); 678 678 usb_hid_report_path_t *path = usb_hid_report_path(); 679 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_ KEYBOARD, 0);679 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_GENERIC_DESKTOP, 6); 680 680 //usb_hid_report_path_set_report_id(path, 0); 681 681 … … 695 695 usb_hid_report_field_t *field = usb_hid_report_get_sibling( 696 696 hid_dev->report, NULL, path, 697 USB_HID_PATH_COMPARE_ END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,697 USB_HID_PATH_COMPARE_BEGIN, 698 698 USB_HID_REPORT_TYPE_INPUT); 699 699 unsigned i = 0; 700 700 701 701 while (field != NULL) { 702 702 //usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u)\n", … … 716 716 * two parts of the Report somehow. 717 717 */ 718 usb_log_debug("value(%x), usage(%x)\n", field->value, field->usage); 718 719 if (field->value != 0) { 719 kbd_dev->keys[i] = field->usage;720 //kbd_dev->keys[i] = field->usage; 720 721 } 721 722 else { 722 kbd_dev->keys[i] = 0;723 //kbd_dev->keys[i] = 0; 723 724 } 724 usb_log_debug2("Saved %u. key usage %d\n", i, kbd_dev->keys[i]);725 //usb_log_debug2("Saved %u. key usage %d\n", i, kbd_dev->keys[i]); 725 726 726 727 ++i; 727 728 field = usb_hid_report_get_sibling(hid_dev->report, field, path, 728 USB_HID_PATH_COMPARE_END 729 | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 729 USB_HID_PATH_COMPARE_BEGIN, 730 730 USB_HID_REPORT_TYPE_INPUT); 731 usb_log_debug("field -- %p\n", field); 731 732 } 732 733 … … 860 861 * TODO: make more general 861 862 */ 862 usb_hid_report_path_t *path = usb_hid_report_path();863 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);864 865 usb_hid_report_path_set_report_id(path, 0);866 867 863 kbd_dev->key_count = usb_hid_report_size( 868 864 hid_dev->report, 0, USB_HID_REPORT_TYPE_INPUT); 869 usb_hid_report_path_free(path); 870 871 usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count); 872 865 866 usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count); 873 867 kbd_dev->keys = (int32_t *)calloc(kbd_dev->key_count, sizeof(int32_t)); 874 868 … … 986 980 return rc; 987 981 } 988 982 989 983 return EOK; 990 984 }
Note:
See TracChangeset
for help on using the changeset viewer.