Ignore:
File:
1 edited

Legend:

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

    rb7fd2a0 r68e5406  
    4949 * @return Error code.
    5050 */
    51 static errno_t register_helper(endpoint_t *ep, void *arg)
     51static int register_helper(endpoint_t *ep, void *arg)
    5252{
    5353        hcd_t *hcd = arg;
     
    102102}
    103103
    104 errno_t hcd_request_address(hcd_t *hcd, usb_speed_t speed, usb_address_t *address)
     104int hcd_request_address(hcd_t *hcd, usb_speed_t speed, usb_address_t *address)
    105105{
    106106        assert(hcd);
     
    108108}
    109109
    110 errno_t hcd_release_address(hcd_t *hcd, usb_address_t address)
     110int hcd_release_address(hcd_t *hcd, usb_address_t address)
    111111{
    112112        assert(hcd);
     
    115115}
    116116
    117 errno_t hcd_reserve_default_address(hcd_t *hcd, usb_speed_t speed)
     117int hcd_reserve_default_address(hcd_t *hcd, usb_speed_t speed)
    118118{
    119119        assert(hcd);
     
    122122}
    123123
    124 errno_t hcd_add_ep(hcd_t *hcd, usb_target_t target, usb_direction_t dir,
     124int hcd_add_ep(hcd_t *hcd, usb_target_t target, usb_direction_t dir,
    125125    usb_transfer_type_t type, size_t max_packet_size, unsigned packets,
    126126    size_t size, usb_address_t tt_address, unsigned tt_port)
     
    132132}
    133133
    134 errno_t hcd_remove_ep(hcd_t *hcd, usb_target_t target, usb_direction_t dir)
     134int hcd_remove_ep(hcd_t *hcd, usb_target_t target, usb_direction_t dir)
    135135{
    136136        assert(hcd);
     
    147147} toggle_t;
    148148
    149 static void toggle_reset_callback(errno_t retval, void *arg)
     149static void toggle_reset_callback(int retval, void *arg)
    150150{
    151151        assert(arg);
     
    172172 * @return Error code.
    173173 */
    174 errno_t hcd_send_batch(
     174int hcd_send_batch(
    175175    hcd_t *hcd, usb_target_t target, usb_direction_t direction,
    176176    void *data, size_t size, uint64_t setup_data,
     
    232232        }
    233233
    234         const errno_t ret = hcd->ops.schedule(hcd, batch);
     234        const int ret = hcd->ops.schedule(hcd, batch);
    235235        if (ret != EOK)
    236236                usb_transfer_batch_destroy(batch);
     
    244244typedef struct {
    245245        volatile unsigned done;
    246         errno_t ret;
     246        int ret;
    247247        size_t size;
    248248} sync_data_t;
    249249
    250 static void transfer_in_cb(errno_t ret, size_t size, void* data)
     250static void transfer_in_cb(int ret, size_t size, void* data)
    251251{
    252252        sync_data_t *d = data;
     
    257257}
    258258
    259 static void transfer_out_cb(errno_t ret, void* data)
     259static void transfer_out_cb(int ret, void* data)
    260260{
    261261        sync_data_t *d = data;
     
    266266
    267267/** this is really ugly version of sync usb communication */
    268 errno_t hcd_send_batch_sync(
     268int hcd_send_batch_sync(
    269269    hcd_t *hcd, usb_target_t target, usb_direction_t dir,
    270270    void *data, size_t size, uint64_t setup_data, const char* name, size_t *out_size)
     
    273273        sync_data_t sd = { .done = 0, .ret = EBUSY, .size = size };
    274274
    275         const errno_t ret = hcd_send_batch(hcd, target, dir, data, size, setup_data,
     275        const int ret = hcd_send_batch(hcd, target, dir, data, size, setup_data,
    276276            dir == USB_DIRECTION_IN ? transfer_in_cb : NULL,
    277277            dir == USB_DIRECTION_OUT ? transfer_out_cb : NULL, &sd, name);
Note: See TracChangeset for help on using the changeset viewer.