Changeset 1561e8b in mainline for uspace/lib/usbdev/src/pipesinit.c


Ignore:
Timestamp:
2011-12-12T13:09:38Z (12 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.