Changeset 0f4bff8 in mainline for uspace/lib


Ignore:
Timestamp:
2013-01-24T21:19:56Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ffa254f1
Parents:
ef40434
Message:

libusbdev: Add and use few new wrappers.

Location:
uspace/lib/usbdev
Files:
2 edited

Legend:

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

    ref40434 r0f4bff8  
    110110         */
    111111        void *driver_data;
     112
    112113        usb_dev_session_t *bus_session;
    113114} usb_device_t;
     
    170171void usb_device_deinit(usb_device_t *);
    171172
     173async_exch_t * usb_device_bus_exchange_begin(usb_device_t *);
     174void usb_device_bus_exchange_end(async_exch_t *);
     175
    172176int usb_device_select_interface(usb_device_t *, uint8_t,
    173177    const usb_endpoint_description_t **);
     
    180184    usb_endpoint_mapping_t **, size_t *);
    181185void usb_device_destroy_pipes(usb_endpoint_mapping_t *, size_t);
     186usb_pipe_t *usb_device_get_default_pipe(usb_device_t *);
     187usb_pipe_t *usb_device_get_pipe(usb_device_t *, usb_endpoint_t, usb_direction_t);
    182188
    183189void * usb_device_data_alloc(usb_device_t *, size_t);
     190void * usb_device_data_get(usb_device_t *);
    184191
    185192size_t usb_interface_count_alternates(const uint8_t *, size_t, uint8_t);
  • uspace/lib/usbdev/src/devdrv.c

    ref40434 r0f4bff8  
    388388}
    389389
     390usb_pipe_t *usb_device_get_default_pipe(usb_device_t *usb_dev)
     391{
     392        assert(usb_dev);
     393        return &usb_dev->ctrl_pipe;
     394}
     395
    390396/** Initialize new instance of USB device.
    391397 *
     
    515521}
    516522
     523async_exch_t * usb_device_bus_exchange_begin(usb_device_t *usb_dev)
     524{
     525        assert(usb_dev);
     526        return async_exchange_begin(usb_dev->bus_session);
     527}
     528
     529void usb_device_bus_exchange_end(async_exch_t *exch)
     530{
     531        async_exchange_end(exch);
     532}
     533
    517534/** Allocate driver specific data.
    518535 * @param usb_dev usb_device structure.
     
    528545}
    529546
     547void * usb_device_data_get(usb_device_t *usb_dev)
     548{
     549        assert(usb_dev);
     550        return usb_dev->driver_data;
     551}
    530552/**
    531553 * @}
Note: See TracChangeset for help on using the changeset viewer.