Changeset ff41576d in mainline
- Timestamp:
- 2011-05-27T08:55:27Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8fb45e08
- Parents:
- aaa3d82b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/generic/hiddev.c
raaa3d82b rff41576d 90 90 static size_t usb_generic_hid_get_event_length(ddf_fun_t *fun) 91 91 { 92 usb_log_debug ("Generic HID: Get event length (fun: %p, "92 usb_log_debug2("Generic HID: Get event length (fun: %p, " 93 93 "fun->driver_data: %p.\n", fun, fun->driver_data); 94 94 … … 99 99 usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data; 100 100 101 usb_log_debug ("hid_dev: %p, Max input report size (%d).\n",101 usb_log_debug2("hid_dev: %p, Max input report size (%d).\n", 102 102 hid_dev, hid_dev->max_input_report_size); 103 103 … … 110 110 size_t size, size_t *act_size, unsigned int flags) 111 111 { 112 usb_log_debug ("Generic HID: Get event.\n");112 usb_log_debug2("Generic HID: Get event.\n"); 113 113 114 114 if (fun == NULL || fun->driver_data == NULL) { … … 126 126 127 127 /*! @todo This should probably be atomic. */ 128 if (usb_hid_report_ready()) { 129 usb_log_debug("Report ready, size: %zu\n", 130 hid_dev->input_report_size); 131 memcpy(buffer, hid_dev->input_report, 132 hid_dev->input_report_size); 133 *act_size = hid_dev->input_report_size; 134 usb_hid_report_received(); 135 } 128 // if (usb_hid_report_ready()) { 129 // usb_log_debug2("Report ready, size: %zu\n", 130 // hid_dev->input_report_size); 131 132 // usb_hid_report_received(); 133 // } else { 134 // memset(buffer, 0, hid_dev->input_report_size); 135 // } 136 memcpy(buffer, hid_dev->input_report, 137 hid_dev->input_report_size); 138 *act_size = hid_dev->input_report_size; 136 139 137 140 // clear the buffer so that it will not be received twice … … 140 143 // note that we already received this report 141 144 // report_received = true; 142 usb_log_debug ("OK\n");145 usb_log_debug2("OK\n"); 143 146 144 147 return EOK; … … 158 161 usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data; 159 162 160 printf("hid_dev->report_desc_size = %zu\n", hid_dev->report_desc_size); 163 usb_log_debug2("hid_dev->report_desc_size = %zu\n", 164 hid_dev->report_desc_size); 161 165 162 166 return hid_dev->report_desc_size; … … 168 172 size_t size, size_t *actual_size) 169 173 { 170 usb_log_debug ("Generic HID: Get report descriptor.\n");174 usb_log_debug2("Generic HID: Get report descriptor.\n"); 171 175 172 176 if (fun == NULL || fun->driver_data == NULL) { … … 192 196 { 193 197 usb_log_debug("Generic HID: Client connected.\n"); 194 usb_hid_report_received();195 198 return EOK; 196 199 } … … 242 245 uint8_t *buffer, size_t buffer_size) 243 246 { 244 usb_log_debug ("usb_hid_polling_callback(%p, %p, %zu)\n",247 usb_log_debug2("usb_hid_polling_callback(%p, %p, %zu)\n", 245 248 hid_dev, buffer, buffer_size); 246 249 usb_debug_str_buffer(buffer, buffer_size, 0);
Note:
See TracChangeset
for help on using the changeset viewer.