Changeset e099f26 in mainline for uspace/drv/usbhid/kbddev.c
- Timestamp:
- 2011-03-21T20:22:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c56c5b5b
- Parents:
- 4fb6d9ee (diff), 31b568e (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/kbddev.c
r4fb6d9ee re099f26 662 662 int rc; 663 663 664 usb_log_ info("Initializing HID/KBD structure...\n");664 usb_log_debug("Initializing HID/KBD structure...\n"); 665 665 666 666 if (kbd_dev == NULL) { … … 742 742 743 743 kbd_dev->initialized = USBHID_KBD_STATUS_INITIALIZED; 744 usb_log_ info("HID/KBD device structure initialized.\n");744 usb_log_debug("HID/KBD device structure initialized.\n"); 745 745 746 746 return EOK; … … 769 769 size_t actual_size; 770 770 771 usb_log_ info("Polling keyboard...\n");771 usb_log_debug("Polling keyboard...\n"); 772 772 773 773 if (!kbd_dev->initialized) { … … 780 780 781 781 while (true) { 782 sess_rc = usb_ endpoint_pipe_start_session(782 sess_rc = usb_pipe_start_session( 783 783 &kbd_dev->hid_dev->poll_pipe); 784 784 if (sess_rc != EOK) { … … 788 788 } 789 789 790 rc = usb_ endpoint_pipe_read(&kbd_dev->hid_dev->poll_pipe,790 rc = usb_pipe_read(&kbd_dev->hid_dev->poll_pipe, 791 791 buffer, BOOTP_BUFFER_SIZE, &actual_size); 792 792 793 sess_rc = usb_ endpoint_pipe_end_session(793 sess_rc = usb_pipe_end_session( 794 794 &kbd_dev->hid_dev->poll_pipe); 795 795 … … 907 907 * Initialize device (get and process descriptors, get address, etc.) 908 908 */ 909 usb_log_ info("Initializing USB/HID KBD device...\n");909 usb_log_debug("Initializing USB/HID KBD device...\n"); 910 910 911 911 usbhid_kbd_t *kbd_dev = usbhid_kbd_new(); … … 926 926 } 927 927 928 usb_log_ info("USB/HID KBD device structure initialized.\n");928 usb_log_debug("USB/HID KBD device structure initialized.\n"); 929 929 930 930 /* … … 937 937 rc = ddf_fun_bind(kbd_fun); 938 938 if (rc != EOK) { 939 usb_log_error("Could not bind DDF function.\n"); 939 usb_log_error("Could not bind DDF function: %s.\n", 940 str_error(rc)); 940 941 // TODO: Can / should I destroy the DDF function? 941 942 ddf_fun_destroy(kbd_fun); … … 946 947 rc = ddf_fun_add_to_class(kbd_fun, "keyboard"); 947 948 if (rc != EOK) { 948 usb_log_error("Could not add DDF function to class 'keyboard'" 949 "\n"); 949 usb_log_error( 950 "Could not add DDF function to class 'keyboard': %s.\n", 951 str_error(rc)); 950 952 // TODO: Can / should I destroy the DDF function? 951 953 ddf_fun_destroy(kbd_fun); … … 959 961 fid_t fid = fibril_create(usbhid_kbd_fibril, kbd_dev); 960 962 if (fid == 0) { 961 usb_log_error("Failed to start fibril for KBD device\n"); 963 usb_log_error("Failed to start fibril for `%s' device.\n", 964 dev->name); 962 965 return ENOMEM; 963 966 }
Note:
See TracChangeset
for help on using the changeset viewer.