Changeset 1d10ca1 in mainline


Ignore:
Timestamp:
2011-05-25T19:07:20Z (13 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5f9b81af
Parents:
1eee99f2
Message:

function for getting all report_ids renamed and fixed

Location:
uspace/lib/usbhid
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/include/usb/hid/hidparser.h

    r1eee99f2 r1d10ca1  
    8282
    8383/** */
    84 uint8_t usb_hid_report_get_report_id(usb_hid_report_t *report,
     84uint8_t usb_hid_report_get_next_report_id(usb_hid_report_t *report,
    8585                                     uint8_t report_id,
    8686                                     usb_hid_report_type_t type);
  • uspace/lib/usbhid/src/hidparser.c

    r1eee99f2 r1d10ca1  
    560560/*---------------------------------------------------------------------------*/
    561561/**
    562  * Returns nonzero (report_id) number if there is report of given type and
    563  * have the specified report_id in report structure
    564  *
    565  * @param report_id Searched report id
     562 * Returns next report_id of report of specified type. If zero is given than
     563 * first report_id of specified type is returned (0 is not legal value for
     564 * repotr_id)
     565 *
     566 * @param report_id Current report_id, 0 if there is no current report_id
    566567 * @param type Type of searched report
    567568 * @param report Report structure inwhich we search
     
    569570 * @retval report_id otherwise
    570571 */
    571 uint8_t usb_hid_report_get_report_id(usb_hid_report_t *report,
     572uint8_t usb_hid_report_get_next_report_id(usb_hid_report_t *report,
    572573        uint8_t report_id, usb_hid_report_type_t type)
    573574{
     
    579580        link_t *report_it;
    580581       
    581         if(report_id == 0) {
     582        if(report_id > 0) {
    582583                report_it = usb_hid_report_find_description(report, report_id,
    583584                        type)->link.next;               
     
    588589
    589590        while(report_it != &report->reports) {
    590                 report_des = list_get_instance(report_it, usb_hid_report_description_t,
    591                         link);
     591                report_des = list_get_instance(report_it,
     592                        usb_hid_report_description_t, link);
    592593
    593594                if(report_des->type == type){
Note: See TracChangeset for help on using the changeset viewer.