Changeset ee7e7c93 in mainline
- Timestamp:
- 2011-05-30T10:42:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3dfdcb7, dcb7d7cd
- Parents:
- 4967c1e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hiddescriptor.c
r4967c1e ree7e7c93 220 220 } 221 221 else { 222 usage = 222 usage = report_item->usages[ 223 223 report_item->usages_count- 1]; 224 224 } … … 245 245 246 246 field->size = report_item->size; 247 247 248 248 if(report_item->type == USB_HID_REPORT_TYPE_INPUT) { 249 field->offset = report_item->offset + 250 ((report_item->count - (i + 1)) * 251 report_item->size); 249 int offset = report_item->offset + report_item->size * i; 250 int field_offset = (offset/8)*8 + (offset/8 + 1) * 8 - 251 offset - report_item->size; 252 if(field_offset < 0) { 253 field->offset = 0; 254 } 255 else { 256 field->offset = field_offset; 257 } 252 258 } 253 259 else { 254 260 field->offset = report_item->offset + (i * report_item->size); 255 261 } 262 256 263 257 264 if(report->use_report_ids != 0) { … … 259 266 report->use_report_ids = 1; 260 267 } 268 261 269 field->item_flags = report_item->item_flags; 262 270
Note:
See TracChangeset
for help on using the changeset viewer.