Changeset 65c3794 in mainline for uspace/drv/usbhid/kbd/kbddev.c


Ignore:
Timestamp:
2011-06-01T15:59:34Z (14 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49ba19d
Parents:
c9f0975
Message:

change from lelian: USB hid subdriver receives parsed report from HID core
uhci root hub: change message level from info to debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/kbd/kbddev.c

    rc9f0975 r65c3794  
    529529 *     usb_hid_parse_report().
    530530 */
    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)
     531static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev/*,
     532                                 uint8_t *buffer, size_t actual_size*/)
    533533{
    534534        assert(hid_dev->report != NULL);
     
    536536        assert(kbd_dev != NULL);
    537537
    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));
    540540       
    541541        usb_hid_report_path_t *path = usb_hid_report_path();
    542542        usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
    543543
    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);
    554554       
    555555        // fill in the currently pressed keys
     
    848848/*----------------------------------------------------------------------------*/
    849849
    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) {
     850bool 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) {
    854854                // do not continue polling (???)
    855855                return false;
     
    860860       
    861861        // 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*/);
    863863       
    864864        return true;
Note: See TracChangeset for help on using the changeset viewer.