Changeset 1879a7d in mainline for uspace/lib/usb/src/hidparser.c


Ignore:
Timestamp:
2011-01-28T17:20:57Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
76d9eb7e
Parents:
ea991e84 (diff), c113056 (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:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/hidparser.c

    rea991e84 r1879a7d  
    3535#include <usb/classes/hidparser.h>
    3636#include <errno.h>
     37#include <stdio.h>
    3738
    3839/** Parse HID report descriptor.
     
    120121        item.logical_max = 255;
    121122
    122         if(size != 8){
    123                 return -1;
     123        if (size != 8) {
     124                return ERANGE;
    124125        }
    125126
    126127        uint8_t keys[6];
    127         for(i=item.offset; i<item.count; i++) {
    128                 keys[i-2] = data[i];
     128        for (i = 0; i < item.count; i++) {
     129                keys[i] = data[i + item.offset];
    129130        }
    130131
Note: See TracChangeset for help on using the changeset viewer.