Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/src/hidreq.c

    rb7fd2a0 r4bfe063  
    5858 * @return Other value inherited from function usb_control_request_set().
    5959 */
    60 errno_t usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no,
     60int usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no,
    6161    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size)
    6262{
     
    7777         */
    7878       
    79         errno_t rc;
     79        int rc;
    8080       
    8181        uint16_t value = 0;
     
    108108 * @return Other value inherited from function usb_control_request_set().
    109109 */
    110 errno_t usbhid_req_set_protocol(usb_pipe_t *ctrl_pipe, int iface_no,
     110int usbhid_req_set_protocol(usb_pipe_t *ctrl_pipe, int iface_no,
    111111    usb_hid_protocol_t protocol)
    112112{
     
    127127         */
    128128       
    129         errno_t rc;
     129        int rc;
    130130
    131131        usb_log_debug("Sending Set Protocol request to the device ("
     
    157157 * @return Other value inherited from function usb_control_request_set().
    158158 */
    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;
     159int 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;
    178178
    179179        usb_log_debug("Sending Set Idle request to the device ("
     
    210210 * @return Other value inherited from function usb_control_request_set().
    211211 */
    212 errno_t usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no,
     212int usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no,
    213213    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size,
    214214    size_t *actual_size)
     
    230230         */
    231231       
    232         errno_t rc;
     232        int rc;
    233233
    234234        uint16_t value = 0;
     
    262262 * @return Other value inherited from function usb_control_request_set().
    263263 */
    264 errno_t usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no,
     264int usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no,
    265265    usb_hid_protocol_t *protocol)
    266266{
     
    281281         */
    282282       
    283         errno_t rc;     
     283        int rc;
    284284
    285285        usb_log_debug("Sending Get Protocol request to the device ("
     
    324324 *         usb_control_request_set().
    325325 */
    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;
     326int 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;
    345345
    346346        usb_log_debug("Sending Get Idle request to the device ("
Note: See TracChangeset for help on using the changeset viewer.