Changeset a8723748 in mainline for uspace/lib/usbdiag/src/test.c


Ignore:
Timestamp:
2017-12-15T10:55:09Z (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:
64d138b
Parents:
837d53d
Message:

usbdiag: add server, dummy stubs and skeletons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdiag/src/test.c

    r837d53d ra8723748  
    3434 */
    3535
     36#include <async.h>
    3637#include <usb/diag/diag.h>
    3738
    38 int usb_diag_test(int x)
     39int usb_diag_test(int x, int *out)
    3940{
    40         return x + 42;
     41        sysarg_t _out;
     42        async_sess_t *session = NULL;
     43        async_exch_t *exch = async_exchange_begin(session);
     44        const int rc = async_req_1_1(exch, USB_DIAG_IN_TEST, x, &_out);
     45        async_exchange_end(exch);
     46
     47        if (out)
     48                *out = (int) _out;
     49
     50        return rc;
    4151}
    4252
Note: See TracChangeset for help on using the changeset viewer.