Changeset 8c877b2 in mainline for uspace/drv/usbhid/hiddev.h
- Timestamp:
- 2011-03-04T13:05:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d49728c
- Parents:
- dff940f8 (diff), 9a422574 (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 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/hiddev.h
rdff940f8 r8c877b2 31 31 */ 32 32 /** @file 33 * Common definitions.33 * Generic USB HID device structure and API. 34 34 */ 35 35 36 #ifndef USBHID_HID_H_ 37 #define USBHID_HID_H_ 36 #ifndef USBHID_HIDDEV_H_ 37 #define USBHID_HIDDEV_H_ 38 39 #include <stdint.h> 40 41 #include <ddf/driver.h> 38 42 39 43 #include <usb/classes/hid.h> 40 #include <ddf/driver.h>41 44 #include <usb/pipes.h> 45 #include <usb/classes/hidparser.h> 46 47 /*----------------------------------------------------------------------------*/ 42 48 43 49 /** 44 * 45 */ 46 typedef struct { 47 usb_standard_interface_descriptor_t iface_desc; 48 usb_standard_endpoint_descriptor_t *endpoints; 49 usb_standard_hid_descriptor_t hid_desc; 50 uint8_t *report_desc; 51 //usb_standard_hid_class_descriptor_info_t *class_desc_info; 52 //uint8_t **class_descs; 53 } usb_hid_iface_t; 54 55 /** 56 * 57 */ 58 typedef struct { 59 usb_standard_configuration_descriptor_t config_descriptor; 60 usb_hid_iface_t *interfaces; 61 } usb_hid_configuration_t; 62 63 /** 64 * @brief USB/HID keyboard device type. 65 * 66 * Quite dummy right now. 50 * @brief USB/HID device type. 67 51 */ 68 52 typedef struct { 69 53 ddf_dev_t *device; 70 usb_hid_configuration_t *conf;71 usb_hid_report_parser_t *parser;72 54 73 55 usb_device_connection_t wire; 74 56 usb_endpoint_pipe_t ctrl_pipe; 75 57 usb_endpoint_pipe_t poll_pipe; 76 } usb_hid_dev_kbd_t; 58 59 uint16_t iface; 60 61 uint8_t *report_desc; 62 usb_hid_report_parser_t *parser; 63 64 int initialized; 65 } usbhid_dev_t; 77 66 78 / / TODO: more configurations!67 /*----------------------------------------------------------------------------*/ 79 68 80 #endif 69 usbhid_dev_t *usbhid_dev_new(void); 70 71 void usbhid_dev_free(usbhid_dev_t **hid_dev); 72 73 int usbhid_dev_init(usbhid_dev_t *hid_dev, ddf_dev_t *dev, 74 usb_endpoint_description_t *poll_ep_desc); 75 76 /*----------------------------------------------------------------------------*/ 77 78 #endif /* USBHID_HIDDEV_H_ */ 79 80 /** 81 * @} 82 */
Note:
See TracChangeset
for help on using the changeset viewer.