Changes in uspace/lib/usbhid/src/hidreport.c [fa8d346:160b75e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hidreport.c
rfa8d346 r160b75e 164 164 165 165 int usb_hid_process_report_descriptor(usb_device_t *dev, 166 usb_hid_report_t *report , uint8_t **report_desc, size_t *report_size)166 usb_hid_report_t *report) 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, 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, 178 &report_size); 178 179 179 180 if (rc != EOK) { 180 181 usb_log_error("Problem with getting Report descriptor: %s.\n", 181 182 str_error(rc)); 182 if (*report_desc != NULL) { 183 free(*report_desc); 184 *report_desc = NULL; 183 if (report_desc != NULL) { 184 free(report_desc); 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); 196 *report_desc = NULL; 195 free(report_desc); 197 196 return rc; 198 197 } 199 198 200 199 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.