Ignore:
Timestamp:
2017-12-14T23:01:57Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
837d53d
Parents:
bd05140
git-author:
Ondřej Hlavatý <aearsis@…> (2017-12-14 23:01:54)
git-committer:
Ondřej Hlavatý <aearsis@…> (2017-12-14 23:01:57)
Message:

usbhost bus: refactor the bus ops

This way, method names better represent the entity it is working with.
Their semantics was shifted a bit.

Regarding the tree of structures:

bus ← device ← endpoint ← batch

Previously, devices were kept in DDF function nodes, and endpoints had
pointer to the bus and device. Now, devices have pointer to bus,
endpoints don't.

Pointer to hcd_t in bus is WIP, and will be removed.

File:
1 edited

Legend:

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

    rbd05140 r6832245  
    4646typedef struct endpoint endpoint_t;
    4747
    48 typedef size_t (*count_bw_func_t)(endpoint_t *, size_t);
    49 
    5048/** Endpoint management structure */
    5149typedef struct usb2_bus {
     
    6664} usb2_bus_t;
    6765
    68 extern int usb2_bus_init(usb2_bus_t *, size_t, count_bw_func_t);
     66extern const bus_ops_t usb2_bus_ops;
     67
     68extern int usb2_bus_init(usb2_bus_t *, hcd_t *, size_t);
    6969
    7070#endif
Note: See TracChangeset for help on using the changeset viewer.