Changeset feeac0d in mainline for uspace/lib/usbhid/src/hidpath.c
- Timestamp:
- 2013-09-10T16:32:35Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4982d87
- Parents:
- e8d6ce2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hidpath.c
re8d6ce2 rfeeac0d 176 176 usb_log_debug("\tLENGTH: %d\n", path->depth); 177 177 178 usb_hid_report_usage_path_t *path_item; 179 180 list_foreach(path->items, item) { 181 path_item = list_get_instance(item, usb_hid_report_usage_path_t, 182 rpath_items_link); 178 list_foreach(path->items, rpath_items_link, 179 usb_hid_report_usage_path_t, path_item) { 183 180 184 181 usb_log_debug("\tUSAGE_PAGE: %X\n", path_item->usage_page); … … 237 234 usb_hid_report_usage_path_t, rpath_items_link); 238 235 239 list_foreach(report_path->items, report_link) { 240 report_item = list_get_instance(report_link, 241 usb_hid_report_usage_path_t, rpath_items_link); 242 236 list_foreach(report_path->items, rpath_items_link, 237 usb_hid_report_usage_path_t, report_item) { 238 243 239 if(USB_HID_SAME_USAGE_PAGE(report_item->usage_page, 244 240 path_item->usage_page)){ 245 241 246 242 if(only_page == 0){ 247 243 if(USB_HID_SAME_USAGE( 248 244 report_item->usage, 249 245 path_item->usage)) { 250 246 251 247 return EOK; 252 248 } … … 266 262 return 1; 267 263 } 268 264 269 265 /* path is prefix of the report_path */ 270 266 case USB_HID_PATH_COMPARE_BEGIN: 271 267 272 268 report_link = report_path->items.head.next; 273 269 path_link = path->items.head.next; 274 270 275 271 while((report_link != &report_path->items.head) && 276 272 (path_link != &path->items.head)) { 277 273 278 274 report_item = list_get_instance(report_link, 279 275 usb_hid_report_usage_path_t, rpath_items_link); 280 276 281 277 path_item = list_get_instance(path_link, 282 278 usb_hid_report_usage_path_t, rpath_items_link); … … 286 282 !USB_HID_SAME_USAGE(report_item->usage, 287 283 path_item->usage))) { 288 284 289 285 return 1; 290 } 291 else { 286 } else { 292 287 report_link = report_link->next; 293 path_link = path_link->next; 288 path_link = path_link->next; 294 289 } 295 296 290 } 297 291 … … 300 294 ((report_link == &report_path->items.head) && 301 295 (path_link == &path->items.head))) { 302 296 303 297 return EOK; 304 298 } … … 405 399 usb_hid_report_path_t *usage_path) 406 400 { 407 usb_hid_report_usage_path_t *path_item;408 401 usb_hid_report_usage_path_t *new_path_item; 409 402 usb_hid_report_path_t *new_usage_path = usb_hid_report_path (); … … 419 412 } 420 413 421 list_foreach(usage_path->items, path_link) { 422 path_item = list_get_instance(path_link, 423 usb_hid_report_usage_path_t, rpath_items_link); 414 list_foreach(usage_path->items, rpath_items_link, 415 usb_hid_report_usage_path_t, path_item) { 424 416 425 417 new_path_item = malloc(sizeof(usb_hid_report_usage_path_t));
Note:
See TracChangeset
for help on using the changeset viewer.