Changeset a8723748 in mainline for uspace/lib
- Timestamp:
- 2017-12-15T10:55:09Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64d138b
- Parents:
- 837d53d
- Location:
- uspace/lib/usbdiag
- Files:
-
- 3 edited
-
Makefile (modified) (1 diff)
-
include/usb/diag/diag.h (modified) (1 diff)
-
src/test.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdiag/Makefile
r837d53d ra8723748 29 29 USPACE_PREFIX = ../.. 30 30 LIBRARY = libusbdiag 31 LIBS = usb31 LIBS = drv usb 32 32 33 33 SOURCES = \ -
uspace/lib/usbdiag/include/usb/diag/diag.h
r837d53d ra8723748 36 36 #define LIBUSBDIAG_DIAG_H_ 37 37 38 #include <ipc/common.h> 39 40 typedef enum { 41 USB_DIAG_IN_TEST = IPC_FIRST_USER_METHOD, 42 } usb_diag_in_request_t; 43 38 44 /** Just a dummy symbol to make compiler happy. TODO: remove it */ 39 int usb_diag_test(int );45 int usb_diag_test(int, int*); 40 46 41 47 #endif -
uspace/lib/usbdiag/src/test.c
r837d53d ra8723748 34 34 */ 35 35 36 #include <async.h> 36 37 #include <usb/diag/diag.h> 37 38 38 int usb_diag_test(int x )39 int usb_diag_test(int x, int *out) 39 40 { 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; 41 51 } 42 52
Note:
See TracChangeset
for help on using the changeset viewer.
