Changeset b3c39690 in mainline for uspace/lib/usbdev/src


Ignore:
Timestamp:
2018-01-21T23:19:20Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
db51a6a6
Parents:
09187c6e
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-21 23:19:14)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-21 23:19:20)
Message:

usb: remove misleading usb_device_get_mapped_ep

Even though this method may seem very convenient to use, it's actually
wrong. The devices are usually not required to have strict endpoint
numbers. That's why the mapping mechanism exists. Therefore, it's just
not possible to rely on fixed endpoint mapping.

There could be similar method, that would take the transfer type and
direction, but it's much better to ask for the complete mapping then.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    r09187c6e rb3c39690  
    341341}
    342342
    343 usb_endpoint_mapping_t * usb_device_get_mapped_ep(
    344     usb_device_t *usb_dev, usb_endpoint_t ep)
    345 {
    346         assert(usb_dev);
    347         for (unsigned i = 0; i < usb_dev->pipes_count; ++i) {
    348                 if (usb_dev->pipes[i].pipe.desc.endpoint_no == ep)
    349                         return &usb_dev->pipes[i];
    350         }
    351         return NULL;
    352 }
    353 
    354343int usb_device_unmap_ep(usb_endpoint_mapping_t *epm)
    355344{
Note: See TracChangeset for help on using the changeset viewer.