Changeset 3969a42 in mainline


Ignore:
Timestamp:
2013-08-02T15:21:55Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d93f5afb
Parents:
1845003
Message:

libusbdev: Switch pipse to use new data communication paths.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/pipes.c

    r1845003 r3969a42  
    121121        memcpy(&setup_packet, setup_buffer, 8);
    122122
     123        async_exch_t *exch = async_exchange_begin(pipe->bus_session);
    123124        size_t act_size = 0;
    124         const int rc = usb_device_control_read(pipe->wire,
     125        const int rc = usb_read(exch,
    125126            pipe->endpoint_no, setup_packet, buffer, buffer_size, &act_size);
     127        async_exchange_end(exch);
    126128
    127129        if (rc == ESTALL) {
     
    173175        memcpy(&setup_packet, setup_buffer, 8);
    174176
    175         const int rc = usb_device_control_write(pipe->wire,
     177        async_exch_t *exch = async_exchange_begin(pipe->bus_session);
     178        const int rc = usb_write(exch,
    176179            pipe->endpoint_no, setup_packet, buffer, buffer_size);
     180        async_exchange_end(exch);
    177181
    178182        if (rc == ESTALL) {
     
    217221            return ENOTSUP;
    218222
     223        async_exch_t *exch = async_exchange_begin(pipe->bus_session);
    219224        size_t act_size = 0;
    220         const int rc = usb_device_read(pipe->wire,
    221             pipe->endpoint_no, buffer, size, &act_size);
     225        const int rc =
     226            usb_read(exch, pipe->endpoint_no, 0, buffer, size, &act_size);
     227        async_exchange_end(exch);
    222228
    223229        if (rc == EOK && size_transfered != NULL) {
     
    256262            return ENOTSUP;
    257263
    258         return usb_device_write(pipe->wire,
    259             pipe->endpoint_no, buffer, size);
     264        async_exch_t *exch = async_exchange_begin(pipe->bus_session);
     265        const int rc = usb_write(exch, pipe->endpoint_no, 0, buffer, size);
     266        async_exchange_end(exch);
     267        return rc;
    260268}
    261269
Note: See TracChangeset for help on using the changeset viewer.