Changeset 8e7c9fe in mainline for uspace/drv/bus/usb/usbhid/kbd/kbddev.h
- Timestamp:
- 2014-09-12T03:45:25Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c53b58e
- Parents:
- 3eb0c85 (diff), 105d8d6 (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/bus/usb/usbhid/kbd/kbddev.h
r3eb0c85 r8e7c9fe 45 45 #include <usb/dev/pipes.h> 46 46 #include <usb/dev/driver.h> 47 47 #include "../usbhid.h" 48 48 #include "kbdrepeat.h" 49 50 struct usb_hid_dev;51 52 49 53 50 /** … … 65 62 typedef struct usb_kbd_t { 66 63 /** Link to HID device structure */ 67 struct usb_hid_dev*hid_dev;68 64 usb_hid_dev_t *hid_dev; 65 69 66 /** Previously pressed keys (not translated to key codes). */ 70 67 int32_t *keys_old; … … 75 72 /** Currently pressed modifiers (bitmap). */ 76 73 uint8_t modifiers; 77 74 78 75 /** Currently active modifiers including locks. Sent to the console. */ 79 unsigned mods;80 76 unsigned int mods; 77 81 78 /** Currently active lock keys. */ 82 unsigned lock_keys;83 79 unsigned int lock_keys; 80 84 81 /** IPC session to client (for sending key events). */ 85 82 async_sess_t *client_sess; 86 83 87 84 /** Information for auto-repeat of keys. */ 88 85 usb_kbd_repeat_t repeat; 89 86 90 87 /** Mutex for accessing the information about auto-repeat. */ 91 88 fibril_mutex_t repeat_mtx; 92 89 93 90 uint8_t *output_buffer; 94 91 95 92 size_t output_size; 96 93 97 94 size_t led_output_size; 98 95 99 96 usb_hid_report_path_t *led_path; 100 97 101 98 int32_t *led_data; 102 99 103 100 /** State of the structure (for checking before use). 104 * 101 * 105 102 * 0 - not initialized 106 103 * 1 - initialized … … 108 105 */ 109 106 int initialized; 110 107 111 108 /** DDF function */ 112 109 ddf_fun_t *fun; 113 110 } usb_kbd_t; 114 111 115 116 117 112 extern const usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description; 118 113 119 const char *HID_KBD_FUN_NAME;120 const char *HID_KBD_CLASS_NAME;114 extern const char *HID_KBD_FUN_NAME; 115 extern const char *HID_KBD_CATEGORY; 121 116 122 123 124 int usb_kbd_init(struct usb_hid_dev *hid_dev, void **data); 125 126 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data); 127 128 int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev); 129 130 int usb_kbd_is_ready_to_destroy(const usb_kbd_t *kbd_dev); 131 132 void usb_kbd_destroy(usb_kbd_t *kbd_dev); 133 134 void usb_kbd_push_ev(usb_kbd_t *kbd_dev, 135 int type, unsigned int key); 136 137 void usb_kbd_deinit(struct usb_hid_dev *hid_dev, void *data); 138 139 int usb_kbd_set_boot_protocol(struct usb_hid_dev *hid_dev); 117 extern int usb_kbd_init(usb_hid_dev_t *, void **); 118 extern bool usb_kbd_polling_callback(usb_hid_dev_t *, void *); 119 extern int usb_kbd_is_initialized(const usb_kbd_t *); 120 extern int usb_kbd_is_ready_to_destroy(const usb_kbd_t *); 121 extern void usb_kbd_destroy(usb_kbd_t *); 122 extern void usb_kbd_push_ev(usb_kbd_t *, int, unsigned int); 123 extern void usb_kbd_deinit(usb_hid_dev_t *, void *); 124 extern int usb_kbd_set_boot_protocol(usb_hid_dev_t *); 140 125 141 126 #endif /* USB_HID_KBDDEV_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.