Changes in uspace/drv/usbhid/kbd/kbddev.h [73ae3373:e60436b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbd/kbddev.h
r73ae3373 re60436b 34 34 */ 35 35 36 #ifndef USB_ KBDDEV_H_37 #define USB_ KBDDEV_H_36 #ifndef USB_HID_KBDDEV_H_ 37 #define USB_HID_KBDDEV_H_ 38 38 39 39 #include <stdint.h> … … 49 49 #include "kbdrepeat.h" 50 50 51 struct usb_hid_dev _t;51 struct usb_hid_dev; 52 52 53 53 /*----------------------------------------------------------------------------*/ … … 65 65 */ 66 66 typedef struct usb_kbd_t { 67 /** Structure holding generic USB device information. */ 68 //usbhid_dev_t *hid_dev; 69 //usb_device_t *usb_dev; 70 67 /** Previously pressed keys (not translated to key codes). */ 68 int32_t *keys_old; 71 69 /** Currently pressed keys (not translated to key codes). */ 72 uint8_t *keys;70 int32_t *keys; 73 71 /** Count of stored keys (i.e. number of keys in the report). */ 74 72 size_t key_count; … … 91 89 fibril_mutex_t *repeat_mtx; 92 90 93 /** Report descriptor. */94 //uint8_t *report_desc;95 96 /** Report descriptor size. */97 //size_t report_desc_size;98 99 91 uint8_t *output_buffer; 100 92 … … 106 98 107 99 int32_t *led_data; 108 109 /** HID Report parser. */110 //usb_hid_report_parser_t *parser;111 100 112 101 /** State of the structure (for checking before use). … … 121 110 /*----------------------------------------------------------------------------*/ 122 111 123 //enum {124 // USB_KBD_POLL_EP_NO = 0,125 // USB_HID_POLL_EP_NO = 1,126 // USB_KBD_POLL_EP_COUNT = 2127 //};128 129 //usb_endpoint_description_t *usb_kbd_endpoints[USB_KBD_POLL_EP_COUNT + 1];130 131 //ddf_dev_ops_t keyboard_ops;132 133 112 usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description; 134 113 … … 138 117 /*----------------------------------------------------------------------------*/ 139 118 140 //usb_kbd_t *usb_kbd_new(void);119 int usb_kbd_init(struct usb_hid_dev *hid_dev); 141 120 142 int usb_kbd_init(struct usb_hid_dev_t *hid_dev); 143 144 bool usb_kbd_polling_callback(usb_device_t *dev, uint8_t *buffer, 145 size_t buffer_size, void *arg); 146 147 //void usb_kbd_polling_ended_callback(usb_device_t *dev, bool reason, 148 // void *arg); 121 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, uint8_t *buffer, 122 size_t buffer_size); 149 123 150 124 int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev); … … 154 128 void usb_kbd_free(usb_kbd_t **kbd_dev); 155 129 156 void usb_kbd_push_ev(struct usb_hid_dev _t*hid_dev, usb_kbd_t *kbd_dev,130 void usb_kbd_push_ev(struct usb_hid_dev *hid_dev, usb_kbd_t *kbd_dev, 157 131 int type, unsigned int key); 158 132 133 void usb_kbd_deinit(struct usb_hid_dev *hid_dev); 159 134 160 void usb_kbd_deinit(struct usb_hid_dev_t*hid_dev);135 int usb_kbd_set_boot_protocol(struct usb_hid_dev *hid_dev); 161 136 162 int usb_kbd_set_boot_protocol(struct usb_hid_dev_t *hid_dev); 163 164 #endif /* USB_KBDDEV_H_ */ 137 #endif /* USB_HID_KBDDEV_H_ */ 165 138 166 139 /**
Note:
See TracChangeset
for help on using the changeset viewer.