Changeset 2b12f06 in mainline for uspace/drv/usbhid/hidreq.c
- Timestamp:
- 2011-03-10T15:56:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45dd8bf
- Parents:
- f6d0c7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/hidreq.c
rf6d0c7c r2b12f06 46 46 47 47 /*----------------------------------------------------------------------------*/ 48 48 /** 49 * Send Set Report request to the HID device. 50 * 51 * @param hid_dev HID device to send the request to. 52 * @param type Type of the report. 53 * @param buffer Report data. 54 * @param buf_size Report data size (in bytes). 55 * 56 * @retval EOK if successful. 57 * @retval EINVAL if no HID device is given. 58 * @return Other value inherited from one of functions 59 * usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(), 60 * usb_control_request_set(). 61 */ 49 62 int usbhid_req_set_report(usbhid_dev_t *hid_dev, 50 63 usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size) … … 97 110 98 111 /*----------------------------------------------------------------------------*/ 99 112 /** 113 * Send Set Protocol request to the HID device. 114 * 115 * @param hid_dev HID device to send the request to. 116 * @param protocol Protocol to set. 117 * 118 * @retval EOK if successful. 119 * @retval EINVAL if no HID device is given. 120 * @return Other value inherited from one of functions 121 * usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(), 122 * usb_control_request_set(). 123 */ 100 124 int usbhid_req_set_protocol(usbhid_dev_t *hid_dev, usb_hid_protocol_t protocol) 101 125 { … … 145 169 146 170 /*----------------------------------------------------------------------------*/ 147 171 /** 172 * Send Set Idle request to the HID device. 173 * 174 * @param hid_dev HID device to send the request to. 175 * @param duration Duration value (is multiplicated by 4 by the device to 176 * get real duration in miliseconds). 177 * 178 * @retval EOK if successful. 179 * @retval EINVAL if no HID device is given. 180 * @return Other value inherited from one of functions 181 * usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(), 182 * usb_control_request_set(). 183 */ 148 184 int usbhid_req_set_idle(usbhid_dev_t *hid_dev, uint8_t duration) 149 185 { … … 195 231 196 232 /*----------------------------------------------------------------------------*/ 197 233 /** 234 * Send Get Report request to the HID device. 235 * 236 * @param[in] hid_dev HID device to send the request to. 237 * @param[in] type Type of the report. 238 * @param[in][out] buffer Buffer for the report data. 239 * @param[in] buf_size Size of the buffer (in bytes). 240 * @param[out] actual_size Actual size of report received from the device 241 * (in bytes). 242 * 243 * @retval EOK if successful. 244 * @retval EINVAL if no HID device is given. 245 * @return Other value inherited from one of functions 246 * usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(), 247 * usb_control_request_set(). 248 */ 198 249 int usbhid_req_get_report(usbhid_dev_t *hid_dev, usb_hid_report_type_t type, 199 250 uint8_t *buffer, size_t buf_size, size_t *actual_size) … … 246 297 } 247 298 299 /*----------------------------------------------------------------------------*/ 300 /** 301 * Send Get Protocol request to the HID device. 302 * 303 * @param[in] hid_dev HID device to send the request to. 304 * @param[out] protocol Current protocol of the device. 305 * 306 * @retval EOK if successful. 307 * @retval EINVAL if no HID device is given. 308 * @return Other value inherited from one of functions 309 * usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(), 310 * usb_control_request_set(). 311 */ 248 312 int usbhid_req_get_protocol(usbhid_dev_t *hid_dev, usb_hid_protocol_t *protocol) 249 313 { … … 303 367 } 304 368 369 /*----------------------------------------------------------------------------*/ 370 /** 371 * Send Get Idle request to the HID device. 372 * 373 * @param[in] hid_dev HID device to send the request to. 374 * @param[out] duration Duration value (multiplicate by 4 to get real duration 375 * in miliseconds). 376 * 377 * @retval EOK if successful. 378 * @retval EINVAL if no HID device is given. 379 * @return Other value inherited from one of functions 380 * usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(), 381 * usb_control_request_set(). 382 */ 305 383 int usbhid_req_get_idle(usbhid_dev_t *hid_dev, uint8_t *duration) 306 384 {
Note:
See TracChangeset
for help on using the changeset viewer.