Changeset 68e5406 in mainline for uspace/lib/usbhost/src/hcd.c


Ignore:
Timestamp:
2017-12-10T21:08:11Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4c6de4f
Parents:
dd8ab1c
Message:

Separate return value from error code in gen_irq_code*() and hcd_send_batch_sync().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/hcd.c

    rdd8ab1c r68e5406  
    102102}
    103103
    104 usb_address_t hcd_request_address(hcd_t *hcd, usb_speed_t speed)
    105 {
    106         assert(hcd);
    107         usb_address_t address = 0;
    108         const int ret = usb_bus_request_address(
    109             &hcd->bus, &address, false, speed);
    110         if (ret != EOK)
    111                 return ret;
    112         return address;
     104int hcd_request_address(hcd_t *hcd, usb_speed_t speed, usb_address_t *address)
     105{
     106        assert(hcd);
     107        return usb_bus_request_address(&hcd->bus, address, false, speed);
    113108}
    114109
     
    271266
    272267/** this is really ugly version of sync usb communication */
    273 ssize_t hcd_send_batch_sync(
     268int hcd_send_batch_sync(
    274269    hcd_t *hcd, usb_target_t target, usb_direction_t dir,
    275     void *data, size_t size, uint64_t setup_data, const char* name)
     270    void *data, size_t size, uint64_t setup_data, const char* name, size_t *out_size)
    276271{
    277272        assert(hcd);
     
    289284
    290285        if (sd.ret == EOK)
    291                 return sd.size;
     286                *out_size = sd.size;
    292287        return sd.ret;
    293288}
Note: See TracChangeset for help on using the changeset viewer.