Changeset f0a1c86 in mainline for uspace/drv/usbhid/hiddev.c


Ignore:
Timestamp:
2011-03-18T16:38:38Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
171cd88
Parents:
3036735 (diff), 98637224 (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:

Development branch changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/hiddev.c

    r3036735 rf0a1c86  
    158158        }
    159159       
     160        hid_dev->report_desc_size = length;
     161       
    160162        usb_log_debug("Done.\n");
    161163       
     
    262264       
    263265        if (rc != EOK) {
    264                 usb_log_warning("Problem with parsing Report descriptor: %s.\n",
    265                     str_error(rc));
    266                 return rc;
    267         }
     266                usb_log_warning("Problem with getting Report descriptor: %s.\n",
     267                    str_error(rc));
     268                return rc;
     269        }
     270       
     271        rc = usb_hid_parse_report_descriptor(hid_dev->parser,
     272            hid_dev->report_desc, hid_dev->report_desc_size);
     273        if (rc != EOK) {
     274                usb_log_warning("Problem parsing Report descriptor: %s.\n",
     275                    str_error(rc));
     276                return rc;
     277        }
     278       
     279        usb_hid_descriptor_print(hid_dev->parser);
    268280       
    269281        return EOK;
     
    289301       
    290302        memset(dev, 0, sizeof(usbhid_dev_t));
     303       
     304        dev->parser = (usb_hid_report_parser_t *)(malloc(sizeof(
     305            usb_hid_report_parser_t)));
     306        if (dev->parser == NULL) {
     307                usb_log_fatal("No memory!\n");
     308                free(dev);
     309                return NULL;
     310        }
    291311       
    292312        dev->initialized = 0;
     
    399419
    400420        /*
     421         * Initialize the report parser.
     422         */
     423        rc = usb_hid_parser_init(hid_dev->parser);
     424        if (rc != EOK) {
     425                usb_log_error("Failed to initialize report parser.\n");
     426                return rc;
     427        }
     428
     429        /*
    401430         * Get descriptors, parse descriptors and save endpoints.
    402431         */
Note: See TracChangeset for help on using the changeset viewer.