Changeset 9a7e5b4 in mainline for uspace/lib/usb/src/host/endpoint.c


Ignore:
Timestamp:
2011-04-07T08:19:03Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
41c1f7b
Parents:
dcaf819 (diff), 506d330 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

More OHCI structures and refactoring. Add per endpoint toggle reset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/host/endpoint.c

    rdcaf819 r9a7e5b4  
    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}
     
    7680        instance->toggle = 0;
    7781}
     82/*----------------------------------------------------------------------------*/
     83void endpoint_toggle_reset_filtered(link_t *ep, usb_endpoint_t epn)
     84{
     85        endpoint_t *instance =
     86            list_get_instance(ep, endpoint_t, same_device_eps);
     87        assert(instance);
     88        if (instance->endpoint == epn)
     89                instance->toggle = 0;
     90}
    7891/**
    7992 * @}
Note: See TracChangeset for help on using the changeset viewer.