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