Changeset 64d138b in mainline for uspace/lib


Ignore:
Timestamp:
2017-12-15T17:21:49Z (8 years ago)
Author:
Petr Mánek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
73b0773
Parents:
a8723748
Message:

usbdiag: finalize IPC ops for tmon, simple demo waiting for test

Location:
uspace/lib
Files:
1 added
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/dev_iface.h

    ra8723748 r64d138b  
    4444        /** Audio device pcm buffer interface */
    4545        AUDIO_PCM_BUFFER_IFACE,
    46        
     46
    4747        /** Network interface controller interface */
    4848        NIC_DEV_IFACE,
    49                
     49
    5050        /** IEEE 802.11 interface controller interface */
    5151        IEEE80211_DEV_IFACE,
    52        
     52
    5353        /** Interface provided by any PCI device. */
    5454        PCI_DEV_IFACE,
     
    5656        /** Interface provided by any USB device. */
    5757        USB_DEV_IFACE,
     58        /** Interface provided by USB diagnostic devices. */
     59        USBDIAG_DEV_IFACE,
    5860        /** Interface provided by USB host controller to USB device. */
    5961        USBHC_DEV_IFACE,
  • uspace/lib/usbdiag/Makefile

    ra8723748 r64d138b  
    3232
    3333SOURCES = \
    34         src/test.c
     34        src/remote_usbdiag.c
    3535
    3636include $(USPACE_PREFIX)/Makefile.common
  • uspace/lib/usbdiag/include/usb/diag/diag.h

    ra8723748 r64d138b  
    3636#define LIBUSBDIAG_DIAG_H_
    3737
    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 
    44 /** Just a dummy symbol to make compiler happy. TODO: remove it */
    45 int usb_diag_test(int, int*);
     38#define USB_DIAG_CATEGORY "usbdiag"
    4639
    4740#endif
  • uspace/lib/usbdiag/include/usb/diag/iface.h

    ra8723748 r64d138b  
    3131 */
    3232/** @file
    33  * Testing stuff
     33 * @brief USB diagnostic device communication interface.
    3434 */
     35#ifndef LIBUSBDIAG_IFACE_H_
     36#define LIBUSBDIAG_IFACE_H_
    3537
    3638#include <async.h>
    37 #include <usb/diag/diag.h>
     39#include <ddf/driver.h>
    3840
    39 int usb_diag_test(int x, int *out)
    40 {
    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);
     41async_sess_t *usb_diag_connect(devman_handle_t);
     42void usb_diag_disconnect(async_sess_t*);
     43int usb_diag_test(async_exch_t*, int, int*);
    4644
    47         if (out)
    48                 *out = (int) _out;
     45/** USB diagnostic device communication interface. */
     46typedef struct {
     47        int (*test)(ddf_fun_t*, int, int*);
     48} usb_diag_iface_t;
    4949
    50         return rc;
    51 }
    52 
     50#endif
    5351/**
    5452 * @}
Note: See TracChangeset for help on using the changeset viewer.