Changeset 1561e8b in mainline


Ignore:
Timestamp:
2011-12-12T13:09:38Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c804484
Parents:
6a21877
Message:

libusbdev: Use provided usb_device_connection_t wrappers.

Location:
uspace/lib/usbdev
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/usb_device_connection.h

    r6a21877 r1561e8b  
    105105{
    106106        assert(conn);
    107         return usb_hc_control_read(conn->hc_connection,
     107        return usb_hc_read(conn->hc_connection,
    108108            conn->address, ep, setup, data, size, rsize);
    109109}
     
    113113{
    114114        assert(conn);
    115         return usb_hc_control_write(conn->hc_connection,
     115        return usb_hc_write(conn->hc_connection,
    116116            conn->address, ep, setup, data, size);
    117117}
  • uspace/lib/usbdev/src/pipes.c

    r6a21877 r1561e8b  
    8787            return ENOTSUP;
    8888
    89         return usb_hc_control_read(pipe->wire->hc_connection,
    90             pipe->wire->address, pipe->endpoint_no, setup, buffer, size,
    91             size_transfered);
     89        return usb_device_control_read(pipe->wire,
     90            pipe->endpoint_no, setup, buffer, size, size_transfered);
    9291}
    9392/*----------------------------------------------------------------------------*/
     
    108107            return ENOTSUP;
    109108
    110         return usb_hc_control_write(pipe->wire->hc_connection,
    111             pipe->wire->address, pipe->endpoint_no, setup, buffer, size);
     109        return usb_device_control_write(pipe->wire,
     110            pipe->endpoint_no, setup, buffer, size);
    112111}
    113112/*----------------------------------------------------------------------------*/
  • uspace/lib/usbdev/src/pipesinit.c

    r6a21877 r1561e8b  
    3838#include <usb/dev/dp.h>
    3939#include <usb/dev/request.h>
    40 #include <usbhc_iface.h>
    4140#include <errno.h>
    4241#include <assert.h>
     
    357356        return EOK;
    358357}
    359 
    360358
    361359/** Initialize USB endpoint pipe as the default zero control pipe.
     
    434432 * @param pipe Pipe to be registered.
    435433 * @param interval Polling interval.
    436  * @param hc_connection Connection to the host controller (must be opened).
    437434 * @return Error code.
    438435 */
     
    441438        assert(pipe);
    442439        assert(pipe->wire);
    443         assert(pipe->wire->hc_connection);
    444 
    445         return usb_hc_register_endpoint(pipe->wire->hc_connection,
    446            pipe->wire->address, pipe->endpoint_no, pipe->transfer_type,
     440
     441        return usb_device_register_endpoint(pipe->wire,
     442           pipe->endpoint_no, pipe->transfer_type,
    447443           pipe->direction, pipe->max_packet_size, interval);
    448444}
     
    451447 *
    452448 * @param pipe Pipe to be unregistered.
    453  * @param hc_connection Connection to the host controller (must be opened).
    454449 * @return Error code.
    455450 */
     
    458453        assert(pipe);
    459454        assert(pipe->wire);
    460         assert(pipe->wire->hc_connection);
    461 
    462         return usb_hc_unregister_endpoint(pipe->wire->hc_connection,
    463             pipe->wire->address, pipe->endpoint_no, pipe->direction);
     455
     456        return usb_device_unregister_endpoint(pipe->wire,
     457            pipe->endpoint_no, pipe->direction);
    464458}
    465459
Note: See TracChangeset for help on using the changeset viewer.