Changeset d59d0bb in mainline for uspace/drv/usbhid/multimedia/multimedia.c
- Timestamp:
- 2011-05-12T09:16:30Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 97cb542
- Parents:
- 9e195e2c (diff), 9be8669 (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
r9e195e2c rd59d0bb 252 252 usb_hid_report_path_set_report_id(path, 1); 253 253 254 multim_dev->key_count = usb_hid_report_ input_length(255 hid_dev->report, path,256 USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY); 254 multim_dev->key_count = usb_hid_report_size( 255 hid_dev->report, 0, USB_HID_REPORT_TYPE_INPUT); 256 257 257 usb_hid_report_path_free(path); 258 258 … … 347 347 USB_HID_REPORT_TYPE_INPUT); 348 348 349 unsigned int key;349 // unsigned int key; 350 350 351 351 /*! @todo Is this iterating OK if done multiple times? … … 353 353 */ 354 354 while (field != NULL) { 355 usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n", field->value, 356 field->usage); 357 358 key = usb_multimedia_map_usage(field->usage); 359 const char *key_str = usb_multimedia_usage_to_str(field->usage); 360 usb_log_info("Pressed key: %s\n", key_str); 361 usb_multimedia_push_ev(hid_dev, KEY_PRESS, key); 355 if(field->value != 0) { 356 usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n", field->value, 357 field->usage); 358 key = usb_multimedia_map_usage(field->usage); 359 const char *key_str = 360 usb_multimedia_usage_to_str(field->usage); 361 usb_log_info("Pressed key: %s\n", key_str); 362 usb_multimedia_push_ev(hid_dev, KEY_PRESS, key); 363 } 362 364 363 365 field = usb_hid_report_get_sibling(
Note:
See TracChangeset
for help on using the changeset viewer.