Changes in uspace/drv/usbhid/kbddev.h [a8def7d:2391aaf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbddev.h
ra8def7d r2391aaf 39 39 #include <stdint.h> 40 40 41 #include <fibril_synch.h>42 43 41 #include <usb/classes/hid.h> 44 #include <usb/classes/hidparser.h>45 42 #include <ddf/driver.h> 46 43 #include <usb/pipes.h> … … 49 46 50 47 /*----------------------------------------------------------------------------*/ 48 51 49 /** 52 * Structure for keeping information needed for auto-repeat of keys.50 * @brief USB/HID keyboard device type. 53 51 */ 54 52 typedef struct { 55 /** Last pressed key. */56 unsigned int key_new;57 /** Key to be repeated. */58 unsigned int key_repeated;59 /** Delay before first repeat in microseconds. */60 unsigned int delay_before;61 /** Delay between repeats in microseconds. */62 unsigned int delay_between;63 } usbhid_kbd_repeat_t;64 65 /**66 * USB/HID keyboard device type.67 *68 * Holds a reference to generic USB/HID device structure and keyboard-specific69 * data, such as currently pressed keys, modifiers and lock keys.70 *71 * Also holds a IPC phone to the console (since there is now no other way to72 * communicate with it).73 *74 * @note Storing active lock keys in this structure results in their setting75 * being device-specific.76 */77 typedef struct {78 /** Structure holding generic USB/HID device information. */79 53 usbhid_dev_t *hid_dev; 80 54 81 /** Currently pressed keys (not translated to key codes). */ 82 uint8_t *keys; 83 /** Count of stored keys (i.e. number of keys in the report). */ 84 size_t key_count; 85 /** Currently pressed modifiers (bitmap). */ 55 uint8_t *keycodes; 56 size_t keycode_count; 86 57 uint8_t modifiers; 87 58 88 /** Currently active modifiers including locks. Sent to the console. */89 59 unsigned mods; 90 91 /** Currently active lock keys. */92 60 unsigned lock_keys; 93 61 94 /** IPC phone to the console device (for sending key events). */95 62 int console_phone; 96 63 97 /** Information for auto-repeat of keys. */98 usbhid_kbd_repeat_t repeat;99 100 /** Mutex for accessing the information about auto-repeat. */101 fibril_mutex_t *repeat_mtx;102 103 /** State of the structure (for checking before use). */104 64 int initialized; 105 65 } usbhid_kbd_t; … … 109 69 int usbhid_kbd_try_add_device(ddf_dev_t *dev); 110 70 111 void usbhid_kbd_push_ev(usbhid_kbd_t *kbd_dev, int type, unsigned int key);112 113 71 #endif /* USBHID_KBDDEV_H_ */ 114 72
Note:
See TracChangeset
for help on using the changeset viewer.