Ignore:
Timestamp:
2011-10-27T11:40:06Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7265558
Parents:
4267908
Message:

libusbhost: Store bandwidth in endpoint structure.

Remove redundant node_t tructure and use endpoint_t directly.

File:
1 edited

Legend:

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

    r4267908 r83c3123  
    7272
    7373endpoint_t * usb_endpoint_manager_get_ep(usb_endpoint_manager_t *instance,
    74     usb_address_t address, usb_endpoint_t ep, usb_direction_t direction,
    75     size_t *bw);
     74    usb_address_t address, usb_endpoint_t ep, usb_direction_t direction);
    7675
    7776void usb_endpoint_manager_reset_if_need(
     
    8483    size_t data_size)
    8584{
    86         endpoint_t *ep = endpoint_get(
    87             address, endpoint, direction, type, speed, max_packet_size);
     85        assert(instance);
     86        const size_t bw =
     87            instance->bw_count(speed, type, data_size, max_packet_size);
     88
     89        endpoint_t *ep = endpoint_create(
     90            address, endpoint, direction, type, speed, max_packet_size, bw);
    8891        if (!ep)
    8992                return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.