Ignore:
Timestamp:
2018-01-07T01:01:42Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63431db
Parents:
9efad54
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-07 01:01:41)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-07 01:01:42)
Message:

usbhost: manage endpoints by library + get/set_toggle → reset_toggle

That simplifies things A LOT. Now you can find endpoints for device in
an array inside device. This array is managed automatically in
register/unregister endpoint. HC drivers still needs to write to it when
setting up/tearing down the device.

Sorry for these two changes being in one commit, but splitting them
would be simply more work for no benefit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/usb_transfer_batch.c

    r9efad54 r56257ba  
    7171}
    7272
    73 /** Resolve resetting toggle.
    74  *
    75  * @param[in] batch Batch structure to use.
    76  */
    77 int usb_transfer_batch_reset_toggle(usb_transfer_batch_t *batch)
    78 {
    79         assert(batch);
    80 
    81         if (batch->error != EOK || batch->toggle_reset_mode == RESET_NONE)
    82                 return EOK;
    83 
    84         usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " resets %s",
    85             batch, USB_TRANSFER_BATCH_ARGS(*batch),
    86             batch->toggle_reset_mode == RESET_ALL ? "all EPs toggle" : "EP toggle");
    87 
    88         return bus_reset_toggle(endpoint_get_bus(batch->ep), batch->target, batch->toggle_reset_mode);
    89 }
    90 
    9173/** Destroy the batch.
    9274 *
Note: See TracChangeset for help on using the changeset viewer.