Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 65c059f in mainline


Ignore:
Timestamp:
2018-02-05T00:54:08Z (4 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial
Children:
c21e6a5
Parents:
d14688d
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-02 14:47:08)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-05 00:54:08)
Message:

drv: remove deprecated interface

Location:
uspace/lib/drv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    rd14688d r65c059f  
    230230}
    231231
    232 errno_t usbhc_read(async_exch_t *exch, usb_endpoint_t endpoint, uint64_t setup,
    233     void *data, size_t size, size_t *rec_size)
    234 {
    235         if (size == 0)
    236                 return usbhc_transfer(exch, endpoint, USB_DIRECTION_IN,
    237                     setup, NULL, 0, NULL);
    238 
    239         /* Prepare an area to read */
    240         void *area = as_area_create(AS_AREA_ANY, size,
    241             AS_AREA_READ | AS_AREA_WRITE, AS_AREA_UNPAGED);
    242         if (!area)
    243                 return ENOMEM;
    244 
    245         const errno_t err = usbhc_transfer(exch, endpoint, USB_DIRECTION_IN,
    246             setup, area, size, rec_size);
    247         if (err == EOK)
    248                 memcpy(data, area, *rec_size);
    249 
    250         as_area_destroy(area);
    251         return err;
    252 }
    253 
    254 errno_t usbhc_write(async_exch_t *exch, usb_endpoint_t endpoint, uint64_t setup,
    255     const void *data, size_t size)
    256 {
    257         if (size == 0)
    258                 return usbhc_transfer(exch, endpoint, USB_DIRECTION_OUT,
    259                     setup, NULL, 0, NULL);
    260 
    261         /* Prepare an area to read */
    262         void *area = as_area_create(AS_AREA_ANY, size,
    263             AS_AREA_READ | AS_AREA_WRITE, AS_AREA_UNPAGED);
    264         if (!area)
    265                 return ENOMEM;
    266 
    267         memcpy(area, data, size);
    268         const errno_t err = usbhc_transfer(exch, endpoint, USB_DIRECTION_OUT,
    269             setup, area, size, NULL);
    270         as_area_destroy(area);
    271         return err;
    272 }
    273 
    274232static void remote_usbhc_default_address_reservation(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    275233static void remote_usbhc_device_enumerate(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
  • uspace/lib/drv/include/usbhc_iface.h

    rd14688d r65c059f  
    156156extern errno_t usbhc_transfer(async_exch_t *, usb_endpoint_t, usb_direction_t,
    157157    uint64_t, void *, size_t, size_t *);
    158 extern errno_t usbhc_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t,
    159     size_t *);
    160 extern errno_t usbhc_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *,
    161     size_t);
    162158
    163159/** Callback for outgoing transfer */
Note: See TracChangeset for help on using the changeset viewer.