Changeset d208f3f in mainline for uspace/lib/usbhid/src/hidreport.c
- Timestamp:
- 2011-05-27T12:14:02Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2df648c2
- Parents:
- fb2de0a (diff), 74341ed (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hidreport.c
rfb2de0a rd208f3f 164 164 165 165 int usb_hid_process_report_descriptor(usb_device_t *dev, 166 usb_hid_report_t *report )166 usb_hid_report_t *report, uint8_t **report_desc, size_t *report_size) 167 167 { 168 168 if (dev == NULL || report == NULL) { … … 172 172 } 173 173 174 uint8_t *report_desc = NULL; 175 size_t report_size; 176 177 int rc = usb_hid_get_report_descriptor(dev, &report_desc, 178 &report_size); 174 // uint8_t *report_desc = NULL; 175 // size_t report_size; 176 177 int rc = usb_hid_get_report_descriptor(dev, report_desc, report_size); 179 178 180 179 if (rc != EOK) { 181 180 usb_log_error("Problem with getting Report descriptor: %s.\n", 182 181 str_error(rc)); 183 if (report_desc != NULL) { 184 free(report_desc); 182 if (*report_desc != NULL) { 183 free(*report_desc); 184 *report_desc = NULL; 185 185 } 186 186 return rc; 187 187 } 188 188 189 assert( report_desc != NULL);190 191 rc = usb_hid_parse_report_descriptor(report, report_desc,report_size);189 assert(*report_desc != NULL); 190 191 rc = usb_hid_parse_report_descriptor(report, *report_desc, *report_size); 192 192 if (rc != EOK) { 193 193 usb_log_error("Problem parsing Report descriptor: %s.\n", 194 194 str_error(rc)); 195 free(report_desc); 195 free(*report_desc); 196 *report_desc = NULL; 196 197 return rc; 197 198 } 198 199 199 200 usb_hid_descriptor_print(report); 200 free(report_desc);201 201 202 202 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.