Changeset 681f24b3 in mainline
- Timestamp:
- 2011-04-15T16:52:45Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dc9f122
- Parents:
- 175ad13e
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hidparser.h
r175ad13e r681f24b3 102 102 103 103 /** */ 104 link_t link; 104 link_t link; /* list */ 105 106 link_t head; /* head of list of usage paths */ 105 107 106 108 } usb_hid_report_path_t; -
uspace/lib/usb/src/hidparser.c
r175ad13e r681f24b3 39 39 #include <mem.h> 40 40 #include <usb/debug.h> 41 #include <assert.h> 41 42 42 43 /** The new report item flag. Used to determine when the item is completly … … 139 140 if(path_it == &report->collection_paths) { 140 141 path = usb_hid_report_path_clone(report_item->usage_path); 141 142 usb_log_debug("PUVODNI: \n"); 142 list_initialize(&path->link); 143 144 list_append(&path->link, &report->collection_paths); 145 143 146 usb_hid_print_usage_path (report_item->usage_path); 144 usb_log_debug("KLON - path: \n"); 145 usb_hid_print_usage_path (path); 146 usb_log_debug("KLON - clone: \n"); 147 usb_hid_print_usage_path (usb_hid_report_path_clone(report_item->usage_path)); 148 149 list_append(&path->link, &report->collection_paths); 150 151 // PROC SE KRUVA VLOZI NESMYSLY?? 152 usb_log_debug("VLOZENO: \n"); 153 usb_hid_print_usage_path (list_get_instance(report->collection_paths.prev, usb_hid_report_path_t, link)); 154 usb_log_debug("\n"); 147 usb_hid_print_usage_path (path); 148 usb_hid_print_usage_path(list_get_instance(report->collection_paths.prev, usb_hid_report_path_t, link)); 149 150 assert(usb_hid_report_compare_usage_path (report_item->usage_path, 151 list_get_instance(report->collection_paths.prev, 152 usb_hid_report_path_t, link), 153 USB_HID_PATH_COMPARE_STRICT) == EOK); 154 155 155 report->collection_paths_count++; 156 156 } … … 1135 1135 } 1136 1136 1137 report_link = report_path-> link.next;1138 path_link = path-> link.next;1137 report_link = report_path->head.next; 1138 path_link = path->head.next; 1139 1139 1140 while((report_link != &report_path-> link) && (path_link != &path->link)) {1140 while((report_link != &report_path->head) && (path_link != &path->head)) { 1141 1141 report_item = list_get_instance(report_link, usb_hid_report_usage_path_t, link); 1142 1142 path_item = list_get_instance(path_link, usb_hid_report_usage_path_t, link); … … 1152 1152 } 1153 1153 1154 if((report_link == &report_path-> link) && (path_link == &path->link)) {1154 if((report_link == &report_path->head) && (path_link == &path->head)) { 1155 1155 return EOK; 1156 1156 } … … 1162 1162 /* compare with only the end of path*/ 1163 1163 case USB_HID_PATH_COMPARE_END: 1164 report_link = report_path-> link.prev;1165 path_link = path-> link.prev;1166 1167 if(list_empty(&path-> link)){1164 report_link = report_path->head.prev; 1165 path_link = path->head.prev; 1166 1167 if(list_empty(&path->head)){ 1168 1168 return EOK; 1169 1169 } 1170 1170 1171 while((report_link != &report_path-> link) && (path_link != &path->link)) {1171 while((report_link != &report_path->head) && (path_link != &path->head)) { 1172 1172 report_item = list_get_instance(report_link, usb_hid_report_usage_path_t, link); 1173 1173 path_item = list_get_instance(path_link, usb_hid_report_usage_path_t, link); … … 1183 1183 } 1184 1184 1185 if(path_link == &path-> link) {1185 if(path_link == &path->head) { 1186 1186 return EOK; 1187 1187 }
Note:
See TracChangeset
for help on using the changeset viewer.