Changes in uspace/drv/usbhid/generic/hiddev.c [dd3eda2:3facf63a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/generic/hiddev.c
rdd3eda2 r3facf63a 39 39 #include <errno.h> 40 40 #include <str_error.h> 41 #include <bool.h>42 41 43 42 #include <usbhid_iface.h> … … 65 64 size_t size, size_t *act_size, unsigned int flags); 66 65 67 static int usb_generic_hid_client_connected(ddf_fun_t *fun);68 69 66 /*----------------------------------------------------------------------------*/ 70 67 … … 75 72 76 73 static ddf_dev_ops_t usb_generic_hid_ops = { 77 .interfaces[USBHID_DEV_IFACE] = &usb_generic_iface, 78 .open = usb_generic_hid_client_connected 74 .interfaces[USBHID_DEV_IFACE] = &usb_generic_iface 79 75 }; 80 76 … … 108 104 109 105 /*! @todo This should probably be atomic. */ 110 if (usb_hid_report_ready()) { 111 memcpy(buffer, hid_dev->input_report, 112 hid_dev->input_report_size); 113 *act_size = hid_dev->input_report_size; 114 usb_hid_report_received(); 115 } 106 memcpy(buffer, hid_dev->input_report, hid_dev->input_report_size); 107 *act_size = hid_dev->input_report_size; 116 108 117 109 // clear the buffer so that it will not be received twice 118 //memset(hid_dev->input_report, 0, hid_dev->input_report_size);110 memset(hid_dev->input_report, 0, hid_dev->input_report_size); 119 111 120 // note that we already received this report121 // report_received = true;122 123 return EOK;124 }125 126 /*----------------------------------------------------------------------------*/127 128 static int usb_generic_hid_client_connected(ddf_fun_t *fun)129 {130 usb_hid_report_received();131 112 return EOK; 132 113 }
Note:
See TracChangeset
for help on using the changeset viewer.