Changes in uspace/lib/usbhid/src/hidreq.c [4bfe063:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhid/src/hidreq.c
r4bfe063 rb7fd2a0 58 58 * @return Other value inherited from function usb_control_request_set(). 59 59 */ 60 int usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no,60 errno_t usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no, 61 61 usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size) 62 62 { … … 77 77 */ 78 78 79 int rc;79 errno_t rc; 80 80 81 81 uint16_t value = 0; … … 108 108 * @return Other value inherited from function usb_control_request_set(). 109 109 */ 110 int usbhid_req_set_protocol(usb_pipe_t *ctrl_pipe, int iface_no,110 errno_t usbhid_req_set_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 111 111 usb_hid_protocol_t protocol) 112 112 { … … 127 127 */ 128 128 129 int rc;129 errno_t rc; 130 130 131 131 usb_log_debug("Sending Set Protocol request to the device (" … … 157 157 * @return Other value inherited from function usb_control_request_set(). 158 158 */ 159 int usbhid_req_set_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t duration)160 { 161 if (ctrl_pipe == NULL) { 162 usb_log_warning("usbhid_req_set_report(): no pipe given.\n"); 163 return EINVAL; 164 } 165 166 if (iface_no < 0) { 167 usb_log_warning("usbhid_req_set_report(): no interface given." 168 "\n"); 169 return EINVAL; 170 } 171 172 /* 173 * No need for checking other parameters, as they are checked in 174 * the called function (usb_control_request_set()). 175 */ 176 177 int rc;159 errno_t usbhid_req_set_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t duration) 160 { 161 if (ctrl_pipe == NULL) { 162 usb_log_warning("usbhid_req_set_report(): no pipe given.\n"); 163 return EINVAL; 164 } 165 166 if (iface_no < 0) { 167 usb_log_warning("usbhid_req_set_report(): no interface given." 168 "\n"); 169 return EINVAL; 170 } 171 172 /* 173 * No need for checking other parameters, as they are checked in 174 * the called function (usb_control_request_set()). 175 */ 176 177 errno_t rc; 178 178 179 179 usb_log_debug("Sending Set Idle request to the device (" … … 210 210 * @return Other value inherited from function usb_control_request_set(). 211 211 */ 212 int usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no,212 errno_t usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no, 213 213 usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size, 214 214 size_t *actual_size) … … 230 230 */ 231 231 232 int rc;232 errno_t rc; 233 233 234 234 uint16_t value = 0; … … 262 262 * @return Other value inherited from function usb_control_request_set(). 263 263 */ 264 int usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no,264 errno_t usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 265 265 usb_hid_protocol_t *protocol) 266 266 { … … 281 281 */ 282 282 283 int rc;283 errno_t rc; 284 284 285 285 usb_log_debug("Sending Get Protocol request to the device (" … … 324 324 * usb_control_request_set(). 325 325 */ 326 int usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t *duration)327 { 328 if (ctrl_pipe == NULL) { 329 usb_log_warning("usbhid_req_set_report(): no pipe given.\n"); 330 return EINVAL; 331 } 332 333 if (iface_no < 0) { 334 usb_log_warning("usbhid_req_set_report(): no interface given." 335 "\n"); 336 return EINVAL; 337 } 338 339 /* 340 * No need for checking other parameters, as they are checked in 341 * the called function (usb_control_request_set()). 342 */ 343 344 int rc;326 errno_t usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t *duration) 327 { 328 if (ctrl_pipe == NULL) { 329 usb_log_warning("usbhid_req_set_report(): no pipe given.\n"); 330 return EINVAL; 331 } 332 333 if (iface_no < 0) { 334 usb_log_warning("usbhid_req_set_report(): no interface given." 335 "\n"); 336 return EINVAL; 337 } 338 339 /* 340 * No need for checking other parameters, as they are checked in 341 * the called function (usb_control_request_set()). 342 */ 343 344 errno_t rc; 345 345 346 346 usb_log_debug("Sending Get Idle request to the device ("
Note:
See TracChangeset
for help on using the changeset viewer.