Changeset e50cd7f in mainline for uspace/drv/usbkbd/kbddev.c


Ignore:
Timestamp:
2011-04-17T19:17:55Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63517c2, cfbbe1d3
Parents:
ef354b6 (diff), 8595577b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

new report structure fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbkbd/kbddev.c

    ref354b6 re50cd7f  
    268268static void usb_kbd_set_led(usb_kbd_t *kbd_dev)
    269269{
     270        if (kbd_dev->output_size == 0) {
     271                return;
     272        }
     273
    270274        unsigned i = 0;
    271275       
     
    544548 *                  according to HID Usage Tables.
    545549 * @param count Number of key codes in report (size of the report).
    546  * @param modifiers Bitmap of modifiers (Ctrl, Alt, Shift, GUI).
     550 * @param report_id
    547551 * @param arg User-specified argument. Expects pointer to the keyboard device
    548552 *            structure representing the keyboard.
     
    551555 */
    552556static void usb_kbd_process_keycodes(const uint8_t *key_codes, size_t count,
    553     uint8_t modifiers, void *arg)
     557    uint8_t report_id, void *arg)
    554558{
    555559        if (arg == NULL) {
     
    562566        assert(kbd_dev != NULL);
    563567
    564         usb_log_debug("Got keys from parser (report id: %d): %s\n", modifiers,
     568        usb_log_debug("Got keys from parser (report id: %d): %s\n", report_id,
    565569            usb_debug_str_buffer(key_codes, count, 0));
    566570       
     
    763767        usb_hid_report_path_t *path = usb_hid_report_path();
    764768        usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
     769       
     770        usb_hid_report_path_set_report_id(path, 0);
     771       
    765772        kbd_dev->key_count = usb_hid_report_input_length(
    766773            kbd_dev->parser, path, USB_HID_PATH_COMPARE_END);
     
    796803       
    797804        kbd_dev->led_output_size = usb_hid_report_output_size(kbd_dev->parser,
    798             kbd_dev->led_path, USB_HID_PATH_COMPARE_END);
     805            kbd_dev->led_path,
     806            USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
    799807       
    800808        usb_log_debug("Output report size (in items): %zu\n",
Note: See TracChangeset for help on using the changeset viewer.