Changeset 8dc762e0 in mainline for uspace/drv/uhci-hcd/iface.c


Ignore:
Timestamp:
2011-04-06T21:12:41Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
Children:
f567bcf
Parents:
1e70157
Message:

Move endpoint_t to libusb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/iface.c

    r1e70157 r8dc762e0  
    3636
    3737#include <usb/debug.h>
    38 
    39 #include "endpoint.h"
     38#include <usb/host/endpoint.h>
     39
    4040#include "iface.h"
    4141#include "hc.h"
     
    159159        const usb_speed_t speed =
    160160            usb_device_keeper_get_speed(&hc->manager, address);
    161         const size_t size = max_packet_size;
     161        const size_t size =
     162            (transfer_type == USB_TRANSFER_INTERRUPT
     163            || transfer_type == USB_TRANSFER_ISOCHRONOUS) ?
     164            max_packet_size : 0;
    162165        int ret;
    163166
     
    175178            usb_str_speed(speed), direction, size, max_packet_size, interval);
    176179
    177         const size_t bw =
    178             (transfer_type == USB_TRANSFER_INTERRUPT
    179             || transfer_type == USB_TRANSFER_ISOCHRONOUS) ?
    180             bandwidth_count_usb11(speed, transfer_type, size, max_packet_size) :
    181             0;
    182 
    183180        ret = usb_endpoint_manager_register_ep(&hc->ep_manager,
    184             address, endpoint, direction, ep, endpoint_destroy, bw);
     181            address, endpoint, direction, ep, size);
    185182        if (ret != EOK) {
    186183                endpoint_destroy(ep);
     
    226223
    227224        size_t res_bw;
    228         endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
     225        endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
    229226            target.address, target.endpoint, USB_DIRECTION_OUT, &res_bw);
    230227        if (ep == NULL) {
     
    283280
    284281        size_t res_bw;
    285         endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
     282        endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
    286283            target.address, target.endpoint, USB_DIRECTION_IN, &res_bw);
    287284        if (ep == NULL) {
     
    340337            target.address, target.endpoint, size, max_packet_size);
    341338
    342         endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
     339        endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
    343340            target.address, target.endpoint, USB_DIRECTION_OUT, NULL);
    344341        if (ep == NULL) {
     
    387384            target.address, target.endpoint, size, max_packet_size);
    388385
    389         endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
     386        endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
    390387            target.address, target.endpoint, USB_DIRECTION_IN, NULL);
    391388        if (ep == NULL) {
     
    438435        usb_log_debug("Control WRITE (%d) %d:%d %zu(%zu).\n",
    439436            speed, target.address, target.endpoint, size, max_packet_size);
    440         endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
     437        endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
    441438            target.address, target.endpoint, USB_DIRECTION_BOTH, NULL);
    442439        if (ep == NULL) {
     
    489486        usb_log_debug("Control READ(%d) %d:%d %zu(%zu).\n",
    490487            speed, target.address, target.endpoint, size, max_packet_size);
    491         endpoint_t *ep = usb_endpoint_manager_get_ep_data(&hc->ep_manager,
     488        endpoint_t *ep = usb_endpoint_manager_get_ep(&hc->ep_manager,
    492489            target.address, target.endpoint, USB_DIRECTION_BOTH, NULL);
    493490        if (ep == NULL) {
Note: See TracChangeset for help on using the changeset viewer.