Changeset 76fbd9a in mainline for uspace/drv/bus/usb/usbhid/generic/hiddev.c
- Timestamp:
- 2012-02-24T19:07:44Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a76b01b4
- Parents:
- 5837c7a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/generic/hiddev.c
r5837c7a r76fbd9a 46 46 #include "usbhid.h" 47 47 48 /*----------------------------------------------------------------------------*/ 48 49 49 50 50 const usb_endpoint_description_t usb_hid_generic_poll_endpoint_description = { … … 60 60 const char *HID_GENERIC_CLASS_NAME = "hid"; 61 61 62 /*----------------------------------------------------------------------------*/ 62 63 63 static size_t usb_generic_hid_get_event_length(ddf_fun_t *fun); 64 64 static int usb_generic_hid_get_event(ddf_fun_t *fun, uint8_t *buffer, … … 68 68 static int usb_generic_get_report_descriptor(ddf_fun_t *fun, uint8_t *desc, 69 69 size_t size, size_t *actual_size); 70 /*----------------------------------------------------------------------------*/ 70 71 71 static usbhid_iface_t usb_generic_iface = { 72 72 .get_event = usb_generic_hid_get_event, … … 75 75 .get_report_descriptor = usb_generic_get_report_descriptor 76 76 }; 77 /*----------------------------------------------------------------------------*/ 77 78 78 static ddf_dev_ops_t usb_generic_hid_ops = { 79 79 .interfaces[USBHID_DEV_IFACE] = &usb_generic_iface, 80 80 .open = usb_generic_hid_client_connected 81 81 }; 82 /*----------------------------------------------------------------------------*/ 82 83 83 static size_t usb_generic_hid_get_event_length(ddf_fun_t *fun) 84 84 { … … 97 97 return hid_dev->max_input_report_size; 98 98 } 99 /*----------------------------------------------------------------------------*/ 99 100 100 static int usb_generic_hid_get_event(ddf_fun_t *fun, uint8_t *buffer, 101 101 size_t size, size_t *act_size, int *event_nr, unsigned int flags) … … 127 127 return EOK; 128 128 } 129 /*----------------------------------------------------------------------------*/ 129 130 130 static size_t usb_generic_get_report_descriptor_length(ddf_fun_t *fun) 131 131 { … … 144 144 return hid_dev->report_desc_size; 145 145 } 146 /*----------------------------------------------------------------------------*/ 146 147 147 static int usb_generic_get_report_descriptor(ddf_fun_t *fun, uint8_t *desc, 148 148 size_t size, size_t *actual_size) … … 166 166 return EOK; 167 167 } 168 /*----------------------------------------------------------------------------*/ 168 169 169 static int usb_generic_hid_client_connected(ddf_fun_t *fun) 170 170 { … … 172 172 return EOK; 173 173 } 174 /*----------------------------------------------------------------------------*/ 174 175 175 void usb_generic_hid_deinit(usb_hid_dev_t *hid_dev, void *data) 176 176 { … … 189 189 ddf_fun_destroy(fun); 190 190 } 191 /*----------------------------------------------------------------------------*/ 191 192 192 int usb_generic_hid_init(usb_hid_dev_t *hid_dev, void **data) 193 193 { … … 224 224 return EOK; 225 225 } 226 /*----------------------------------------------------------------------------*/ 226 227 227 bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data) 228 228 {
Note:
See TracChangeset
for help on using the changeset viewer.