Changeset 0aae4a6a in mainline


Ignore:
Timestamp:
2011-04-07T07:32:46Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
92d6868
Parents:
fc9f88d
Message:

Add usb address and endpoint num to endpoint structure

Location:
uspace
Files:
3 edited

Legend:

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

    rfc9f88d r0aae4a6a  
    168168        if (ep == NULL)
    169169                return ENOMEM;
    170         ret = endpoint_init(ep, transfer_type, speed, max_packet_size);
     170        ret = endpoint_init(ep, address, endpoint, direction,
     171            transfer_type, speed, max_packet_size);
    171172        if (ret != EOK) {
    172173                free(ep);
  • uspace/lib/usb/include/usb/host/endpoint.h

    rfc9f88d r0aae4a6a  
    4242
    4343typedef struct endpoint {
    44         link_t same_device_eps;
     44        usb_address_t address;
     45        usb_endpoint_t endpoint;
     46        usb_direction_t direction;
    4547        usb_transfer_type_t transfer_type;
    4648        usb_speed_t speed;
     
    4850        bool active;
    4951        unsigned toggle:1;
     52        link_t same_device_eps;
    5053} endpoint_t;
    5154
    52 int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,
    53     usb_speed_t speed, size_t max_packet_size);
     55int endpoint_init(endpoint_t *instance, usb_address_t address,
     56    usb_endpoint_t endpoint, usb_direction_t direction,
     57    usb_transfer_type_t type, usb_speed_t speed, size_t max_packet_size);
    5458
    5559void endpoint_destroy(endpoint_t *instance);
  • uspace/lib/usb/src/host/endpoint.c

    rfc9f88d r0aae4a6a  
    3737#include <usb/host/endpoint.h>
    3838
    39 int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,
    40     usb_speed_t speed, size_t max_packet_size)
     39int endpoint_init(endpoint_t *instance, usb_address_t address,
     40    usb_endpoint_t endpoint, usb_direction_t direction,
     41    usb_transfer_type_t type, usb_speed_t speed, size_t max_packet_size)
    4142{
    4243        assert(instance);
    43         link_initialize(&instance->same_device_eps);
    44         instance->transfer_type = transfer_type;
     44        instance->address = address;
     45        instance->endpoint = endpoint;
     46        instance->direction = direction;
     47        instance->transfer_type = type;
    4548        instance->speed = speed;
    4649        instance->max_packet_size = max_packet_size;
    4750        instance->toggle = 0;
     51        link_initialize(&instance->same_device_eps);
    4852        return EOK;
    4953}
Note: See TracChangeset for help on using the changeset viewer.