Changeset 18b3cfd in mainline
- Timestamp:
- 2011-03-18T17:38:49Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 62f4212
- Parents:
- 00b13408
- Location:
- uspace/drv/usbhid
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbddev.c
r00b13408 r18b3cfd 984 984 /*----------------------------------------------------------------------------*/ 985 985 986 int usbhid_kbd_is_ usable(const usbhid_kbd_t *kbd_dev)986 int usbhid_kbd_is_initialized(const usbhid_kbd_t *kbd_dev) 987 987 { 988 988 return (kbd_dev->initialized == USBHID_KBD_STATUS_INITIALIZED); 989 } 990 991 /*----------------------------------------------------------------------------*/ 992 993 int usbhid_kbd_is_ready_to_destroy(const usbhid_kbd_t *kbd_dev) 994 { 995 return (kbd_dev->initialized == USBHID_KBD_STATUS_TO_DESTROY); 989 996 } 990 997 -
uspace/drv/usbhid/kbddev.h
r00b13408 r18b3cfd 114 114 int usbhid_kbd_try_add_device(ddf_dev_t *dev); 115 115 116 int usbhid_kbd_is_usable(const usbhid_kbd_t *kbd_dev); 116 int usbhid_kbd_is_initialized(const usbhid_kbd_t *kbd_dev); 117 118 int usbhid_kbd_is_ready_to_destroy(const usbhid_kbd_t *kbd_dev); 117 119 118 120 void usbhid_kbd_free(usbhid_kbd_t **kbd_dev); -
uspace/drv/usbhid/kbdrepeat.c
r00b13408 r18b3cfd 78 78 while (true) { 79 79 // check if the kbd structure is usable 80 if (!usbhid_kbd_is_usable(kbd)) { 81 usbhid_kbd_free(&kbd); 82 assert(kbd == NULL); 80 if (!usbhid_kbd_is_initialized(kbd)) { 81 if (usbhid_kbd_is_ready_to_destroy(kbd)) { 82 usbhid_kbd_free(&kbd); 83 assert(kbd == NULL); 84 } 83 85 return; 84 86 }
Note:
See TracChangeset
for help on using the changeset viewer.