Changeset 252e30c in mainline for uspace/drv/usbkbd/kbdrepeat.c
- Timestamp:
- 2011-03-24T22:55:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d92638
- Parents:
- 476b71ff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbkbd/kbdrepeat.c
r476b71ff r252e30c 62 62 * 63 63 * If the currently repeated key is not pressed any more ( 64 * usb hid_kbd_repeat_stop() was called), it stops repeating it and starts64 * usb_kbd_repeat_stop() was called), it stops repeating it and starts 65 65 * checking again. 66 66 * … … 70 70 * @param kbd Keyboard device structure. 71 71 */ 72 static void usb hid_kbd_repeat_loop(usbhid_kbd_t *kbd)72 static void usb_kbd_repeat_loop(usb_kbd_t *kbd) 73 73 { 74 74 unsigned int delay = 0; … … 78 78 while (true) { 79 79 // check if the kbd structure is usable 80 if (!usb hid_kbd_is_initialized(kbd)) {81 if (usb hid_kbd_is_ready_to_destroy(kbd)) {82 usb hid_kbd_free(&kbd);80 if (!usb_kbd_is_initialized(kbd)) { 81 if (usb_kbd_is_ready_to_destroy(kbd)) { 82 usb_kbd_free(&kbd); 83 83 assert(kbd == NULL); 84 84 } … … 92 92 usb_log_debug2("Repeating key: %u.\n", 93 93 kbd->repeat.key_repeated); 94 usb hid_kbd_push_ev(kbd, KEY_PRESS,94 usb_kbd_push_ev(kbd, KEY_PRESS, 95 95 kbd->repeat.key_repeated); 96 96 delay = kbd->repeat.delay_between; … … 127 127 * @retval EINVAL if no argument is supplied. 128 128 */ 129 int usb hid_kbd_repeat_fibril(void *arg)129 int usb_kbd_repeat_fibril(void *arg) 130 130 { 131 131 usb_log_debug("Autorepeat fibril spawned.\n"); … … 136 136 } 137 137 138 usb hid_kbd_t *kbd = (usbhid_kbd_t *)arg;138 usb_kbd_t *kbd = (usb_kbd_t *)arg; 139 139 140 usb hid_kbd_repeat_loop(kbd);140 usb_kbd_repeat_loop(kbd); 141 141 142 142 return EOK; … … 154 154 * @param key Key to start repeating. 155 155 */ 156 void usb hid_kbd_repeat_start(usbhid_kbd_t *kbd, unsigned int key)156 void usb_kbd_repeat_start(usb_kbd_t *kbd, unsigned int key) 157 157 { 158 158 fibril_mutex_lock(kbd->repeat_mtx); … … 172 172 * @param key Key to stop repeating. 173 173 */ 174 void usb hid_kbd_repeat_stop(usbhid_kbd_t *kbd, unsigned int key)174 void usb_kbd_repeat_stop(usb_kbd_t *kbd, unsigned int key) 175 175 { 176 176 fibril_mutex_lock(kbd->repeat_mtx);
Note:
See TracChangeset
for help on using the changeset viewer.