Changeset 06f9d8fb in mainline for uspace/drv/usbhid/multimedia/multimedia.c
- Timestamp:
- 2011-05-30T20:02:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c3dafe1
- Parents:
- be8d907 (diff), 63862a0 (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/drv/usbhid/multimedia/multimedia.c
rbe8d907 r06f9d8fb 143 143 assert(multim_dev != NULL); 144 144 145 // usb_multimedia_t *multim_dev = (usb_multimedia_t *)hid_dev->data;146 147 145 console_event_t ev; 148 146 … … 173 171 // hangup phone to the console 174 172 async_hangup((*multim_dev)->console_phone); 175 176 // free all buffers177 // if ((*multim_dev)->keys != NULL) {178 // free((*multim_dev)->keys);179 // }180 // if ((*multim_dev)->keys_old != NULL) {181 // free((*multim_dev)->keys_old);182 // }183 173 184 174 free(*multim_dev); … … 245 235 multim_dev->console_phone = -1; 246 236 247 // usb_hid_report_path_t *path = usb_hid_report_path();248 // usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0);249 250 // usb_hid_report_path_set_report_id(path, 1);251 252 // multim_dev->key_count = usb_hid_report_size(253 // hid_dev->report, 1, USB_HID_REPORT_TYPE_INPUT);254 255 // usb_hid_report_path_free(path);256 257 // usb_log_debug(NAME " Size of the input report: %zu\n",258 // multim_dev->key_count);259 260 // multim_dev->keys = (int32_t *)calloc(multim_dev->key_count,261 // sizeof(int32_t));262 263 // if (multim_dev->keys == NULL) {264 // usb_log_fatal("No memory!\n");265 // free(multim_dev);266 // return ENOMEM;267 // }268 269 // multim_dev->keys_old =270 // (int32_t *)calloc(multim_dev->key_count, sizeof(int32_t));271 272 // if (multim_dev->keys_old == NULL) {273 // usb_log_fatal("No memory!\n");274 // free(multim_dev->keys);275 // free(multim_dev);276 // return ENOMEM;277 // }278 279 237 /*! @todo Autorepeat */ 280 238 … … 315 273 { 316 274 // TODO: checks 275 if (hid_dev == NULL || data == NULL || buffer == NULL) { 276 return false; 277 } 317 278 318 279 usb_log_debug(NAME " usb_lgtch_polling_callback(%p, %p, %zu)\n", 319 280 hid_dev, buffer, buffer_size); 320 321 if (data == NULL) {322 return EINVAL; // TODO: other error code?323 }324 281 325 282 usb_multimedia_t *multim_dev = (usb_multimedia_t *)data; … … 348 305 | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 349 306 USB_HID_REPORT_TYPE_INPUT); 350 351 // unsigned int key; 352 307 353 308 /*! @todo Is this iterating OK if done multiple times? 354 309 * @todo The parsing is not OK
Note:
See TracChangeset
for help on using the changeset viewer.