Ignore:
Timestamp:
2017-12-22T12:03:16Z (6 years ago)
Author:
Petr Mánek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
96c416a
Parents:
2986763
git-author:
Petr Mánek <petr.manek@…> (2017-12-22 12:02:50)
git-committer:
Petr Mánek <petr.manek@…> (2017-12-22 12:03:16)
Message:

usbdiag: refactoring

Reconciliated the usb_diag and usbdiag prefix in favor of the latter. Removed a ton of copy-pasta code for the burst tests in favor of single generic static burst test for every direction, which is then called by individual functions for different endpoint type. This also allowed to get rid of the ugly translation macros in device.c. Deleted unused usbdiag.h header file. Refactored the remote interface to comply with all aforementioned modifications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usbdiag_iface.h

    r2986763 rb7b7898  
    4545async_sess_t *usbdiag_connect(devman_handle_t);
    4646void usbdiag_disconnect(async_sess_t*);
    47 int usbdiag_stress_intr_in(async_exch_t*, int, size_t);
    48 int usbdiag_stress_intr_out(async_exch_t*, int, size_t);
    49 int usbdiag_stress_bulk_in(async_exch_t*, int, size_t);
    50 int usbdiag_stress_bulk_out(async_exch_t*, int, size_t);
    51 int usbdiag_stress_isoch_in(async_exch_t*, int, size_t);
    52 int usbdiag_stress_isoch_out(async_exch_t*, int, size_t);
     47int usbdiag_burst_intr_in(async_exch_t*, int, size_t);
     48int usbdiag_burst_intr_out(async_exch_t*, int, size_t);
     49int usbdiag_burst_bulk_in(async_exch_t*, int, size_t);
     50int usbdiag_burst_bulk_out(async_exch_t*, int, size_t);
     51int usbdiag_burst_isoch_in(async_exch_t*, int, size_t);
     52int usbdiag_burst_isoch_out(async_exch_t*, int, size_t);
    5353
    5454/** USB diagnostic device communication interface. */
    5555typedef struct {
    56         int (*stress_intr_in)(ddf_fun_t*, int, size_t);
    57         int (*stress_intr_out)(ddf_fun_t*, int, size_t);
    58         int (*stress_bulk_in)(ddf_fun_t*, int, size_t);
    59         int (*stress_bulk_out)(ddf_fun_t*, int, size_t);
    60         int (*stress_isoch_in)(ddf_fun_t*, int, size_t);
    61         int (*stress_isoch_out)(ddf_fun_t*, int, size_t);
     56        int (*burst_intr_in)(ddf_fun_t*, int, size_t);
     57        int (*burst_intr_out)(ddf_fun_t*, int, size_t);
     58        int (*burst_bulk_in)(ddf_fun_t*, int, size_t);
     59        int (*burst_bulk_out)(ddf_fun_t*, int, size_t);
     60        int (*burst_isoch_in)(ddf_fun_t*, int, size_t);
     61        int (*burst_isoch_out)(ddf_fun_t*, int, size_t);
    6262} usbdiag_iface_t;
    6363
Note: See TracChangeset for help on using the changeset viewer.