Changeset 506d330 in mainline


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

Implement per endpoint toggle reset

Location:
uspace/lib/usb
Files:
3 edited

Legend:

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

    r92d6868 r506d330  
    6565void endpoint_toggle_reset(link_t *ep);
    6666
     67void endpoint_toggle_reset_filtered(link_t *ep, usb_endpoint_t epn);
    6768
    6869#endif
  • uspace/lib/usb/src/host/device_keeper.c

    r92d6868 r506d330  
    128128                /* recipient is endpoint, value is zero (ENDPOINT_STALL) */
    129129                if (((data[0] & 0xf) == 1) && ((data[2] | data[3]) == 0)) {
     130                        while (current !=
     131                           &instance->devices[target.address].endpoints)
     132                        {
    130133                        /* endpoint number is < 16, thus first byte is enough */
    131                         assert(!"NOT IMPLEMENTED!");
     134                                endpoint_toggle_reset_filtered(
     135                                    current, data[4]);
     136                                current = current->next;
     137                        }
    132138                }
    133139        break;
  • uspace/lib/usb/src/host/endpoint.c

    r92d6868 r506d330  
    8080        instance->toggle = 0;
    8181}
     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}
    8291/**
    8392 * @}
Note: See TracChangeset for help on using the changeset viewer.