Changeset 67f54965 in mainline for uspace/drv/usbhid/hidreq.c


Ignore:
Timestamp:
2011-03-11T09:20:21Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b0b86e6
Parents:
bc1c6fb (diff), b3bdb68 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/hidreq.c

    rbc1c6fb r67f54965  
    4646
    4747/*----------------------------------------------------------------------------*/
    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 */
    4962int usbhid_req_set_report(usbhid_dev_t *hid_dev,
    5063    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size)
     
    97110
    98111/*----------------------------------------------------------------------------*/
    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 */
    100124int usbhid_req_set_protocol(usbhid_dev_t *hid_dev, usb_hid_protocol_t protocol)
    101125{
     
    145169
    146170/*----------------------------------------------------------------------------*/
    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 */
    148184int usbhid_req_set_idle(usbhid_dev_t *hid_dev, uint8_t duration)
    149185{
     
    195231
    196232/*----------------------------------------------------------------------------*/
    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 */
    198249int usbhid_req_get_report(usbhid_dev_t *hid_dev, usb_hid_report_type_t type,
    199250    uint8_t *buffer, size_t buf_size, size_t *actual_size)
     
    246297}
    247298
     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 */
    248312int usbhid_req_get_protocol(usbhid_dev_t *hid_dev, usb_hid_protocol_t *protocol)
    249313{
     
    303367}
    304368
     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 */
    305383int usbhid_req_get_idle(usbhid_dev_t *hid_dev, uint8_t *duration)
    306384{
Note: See TracChangeset for help on using the changeset viewer.