Ignore:
File:
1 edited

Legend:

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

    r7a252ec8 r83a2f43  
    3636#define LIBDRV_DEV_IFACE_H_
    3737
    38 #include "driver.h"
     38#include <ipc/common.h>
     39#include <ipc/dev_iface.h>
    3940
    40 /* TODO declare device interface structures here */
     41/*
     42 * Device interface
     43 */
     44
     45struct ddf_fun;
     46
     47/*
     48 * First two parameters: device and interface structure registered by the
     49 * devices driver.
     50 */
     51typedef void remote_iface_func_t(struct ddf_fun *, void *, ipc_callid_t,
     52    ipc_call_t *);
     53typedef remote_iface_func_t *remote_iface_func_ptr_t;
     54typedef void remote_handler_t(struct ddf_fun *, ipc_callid_t, ipc_call_t *);
     55
     56typedef struct {
     57        size_t method_count;
     58        remote_iface_func_ptr_t *methods;
     59} remote_iface_t;
     60
     61typedef struct {
     62        remote_iface_t *ifaces[DEV_IFACE_COUNT];
     63} iface_dipatch_table_t;
     64
     65extern remote_iface_t *get_remote_iface(int);
     66extern remote_iface_func_ptr_t get_remote_method(remote_iface_t *, sysarg_t);
     67
     68
     69extern bool is_valid_iface_idx(int);
    4170
    4271#endif
Note: See TracChangeset for help on using the changeset viewer.