Changeset 252e30c in mainline for uspace/drv/usbkbd/kbddev.h
- Timestamp:
- 2011-03-24T22:55:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d92638
- Parents:
- 476b71ff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbkbd/kbddev.h
r476b71ff r252e30c 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> … … 62 62 * being device-specific. 63 63 */ 64 typedef struct usb hid_kbd_t {64 typedef struct usb_kbd_t { 65 65 /** Structure holding generic USB device information. */ 66 66 //usbhid_dev_t *hid_dev; … … 84 84 85 85 /** Information for auto-repeat of keys. */ 86 usb hid_kbd_repeat_t repeat;86 usb_kbd_repeat_t repeat; 87 87 88 88 /** Mutex for accessing the information about auto-repeat. */ … … 105 105 */ 106 106 int initialized; 107 } usb hid_kbd_t;107 } usb_kbd_t; 108 108 109 109 /*----------------------------------------------------------------------------*/ 110 110 111 111 enum { 112 USB HID_KBD_POLL_EP_NO = 0,113 USB HID_KBD_POLL_EP_COUNT = 1112 USB_KBD_POLL_EP_NO = 0, 113 USB_KBD_POLL_EP_COUNT = 1 114 114 }; 115 115 116 usb_endpoint_description_t *usb hid_kbd_endpoints[USBHID_KBD_POLL_EP_COUNT + 1];116 usb_endpoint_description_t *usb_kbd_endpoints[USB_KBD_POLL_EP_COUNT + 1]; 117 117 118 118 ddf_dev_ops_t keyboard_ops; … … 120 120 /*----------------------------------------------------------------------------*/ 121 121 122 usb hid_kbd_t *usbhid_kbd_new(void);122 usb_kbd_t *usb_kbd_new(void); 123 123 124 int usb hid_kbd_init(usbhid_kbd_t *kbd_dev, usb_device_t *dev);124 int usb_kbd_init(usb_kbd_t *kbd_dev, usb_device_t *dev); 125 125 126 bool usb hid_kbd_polling_callback(usb_device_t *dev, uint8_t *buffer,126 bool usb_kbd_polling_callback(usb_device_t *dev, uint8_t *buffer, 127 127 size_t buffer_size, void *arg); 128 128 129 void usb hid_kbd_polling_ended_callback(usb_device_t *dev, bool reason,129 void usb_kbd_polling_ended_callback(usb_device_t *dev, bool reason, 130 130 void *arg); 131 131 132 int usb hid_kbd_is_initialized(const usbhid_kbd_t *kbd_dev);132 int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev); 133 133 134 int usb hid_kbd_is_ready_to_destroy(const usbhid_kbd_t *kbd_dev);134 int usb_kbd_is_ready_to_destroy(const usb_kbd_t *kbd_dev); 135 135 136 void usb hid_kbd_free(usbhid_kbd_t **kbd_dev);136 void usb_kbd_free(usb_kbd_t **kbd_dev); 137 137 138 void usb hid_kbd_push_ev(usbhid_kbd_t *kbd_dev, int type, unsigned int key);138 void usb_kbd_push_ev(usb_kbd_t *kbd_dev, int type, unsigned int key); 139 139 140 #endif /* USB HID_KBDDEV_H_ */140 #endif /* USB_KBDDEV_H_ */ 141 141 142 142 /**
Note:
See TracChangeset
for help on using the changeset viewer.