Ignore:
Timestamp:
2017-10-23T19:03:37Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b724494
Parents:
e160bfe8
Message:

usbhost: change parameters of methods

Pass (device_t, usb_target_t) to read and write, which finally allows to drop hash tables and access device right away. Then, all callbacks to complete transfer now uses usb_transfer_batch. This requires libdrv to include libusbhost, but it is not linked against it - it is there only to share definition of usb_transfer_batch_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/bus.h

    re160bfe8 r327f147  
    8585        int (*register_endpoint)(bus_t *, endpoint_t *);
    8686        int (*unregister_endpoint)(bus_t *, endpoint_t *);
    87         endpoint_t *(*find_endpoint)(bus_t *, usb_target_t, usb_direction_t);
     87        endpoint_t *(*find_endpoint)(bus_t *, device_t*, usb_target_t, usb_direction_t);
    8888        void (*destroy_endpoint)(endpoint_t *);                 /**< Optional */
    8989        bool (*endpoint_get_toggle)(endpoint_t *);              /**< Optional */
     
    120120    usb_direction_t dir, usb_transfer_type_t type, size_t max_packet_size,
    121121    unsigned packets, size_t size);
    122 extern int bus_remove_ep(bus_t *bus, usb_target_t target, usb_direction_t dir);
     122extern int bus_remove_ep(bus_t *, device_t *, usb_target_t, usb_direction_t);
    123123
    124124int device_set_default_name(device_t *);
     
    130130int bus_register_endpoint(bus_t *, endpoint_t *);
    131131int bus_unregister_endpoint(bus_t *, endpoint_t *);
    132 endpoint_t *bus_find_endpoint(bus_t *, usb_target_t, usb_direction_t);
     132endpoint_t *bus_find_endpoint(bus_t *, device_t *, usb_target_t, usb_direction_t);
    133133
    134134size_t bus_count_bw(endpoint_t *, size_t);
Note: See TracChangeset for help on using the changeset viewer.