Changeset 22027b6e in mainline


Ignore:
Timestamp:
2011-01-09T20:55:03Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
80bffdb0, 8b5690f
Parents:
5fdd7c3
Message:

Move dev_iface-related declarations to dev_iface.h.

Location:
uspace/lib/drv
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/dev_iface.c

    r5fdd7c3 r22027b6e  
    3636 */
    3737
     38#include <assert.h>
     39
    3840#include "dev_iface.h"
    3941#include "remote_hw_res.h"
  • uspace/lib/drv/include/dev_iface.h

    r5fdd7c3 r22027b6e  
    3636#define LIBDRV_DEV_IFACE_H_
    3737
    38 #include "driver.h"
     38#include <ipc/dev_iface.h>
    3939
    40 /* TODO declare device interface structures here */
     40/*
     41 * Device interface
     42 */
     43
     44struct device;
     45
     46/*
     47 * First two parameters: device and interface structure registered by the
     48 * devices driver.
     49 */
     50typedef void remote_iface_func_t(struct device *, void *, ipc_callid_t,
     51    ipc_call_t *);
     52typedef remote_iface_func_t *remote_iface_func_ptr_t;
     53typedef void remote_handler_t(struct device *, ipc_callid_t, ipc_call_t *);
     54
     55typedef struct {
     56        size_t method_count;
     57        remote_iface_func_ptr_t *methods;
     58} remote_iface_t;
     59
     60typedef struct {
     61        remote_iface_t *ifaces[DEV_IFACE_COUNT];
     62} iface_dipatch_table_t;
     63
     64extern remote_iface_t *get_remote_iface(int);
     65extern remote_iface_func_ptr_t get_remote_method(remote_iface_t *, sysarg_t);
     66
    4167
    4268extern bool is_valid_iface_idx(int);
    43 
    4469
    4570#endif
  • uspace/lib/drv/include/driver.h

    r5fdd7c3 r22027b6e  
    4747#include <malloc.h>
    4848
     49#include "dev_iface.h"
     50
    4951struct device;
    5052typedef struct device device_t;
    51 
    52 /*
    53  * Device interface
    54  */
    55 
    56 /*
    57  * First two parameters: device and interface structure registered by the
    58  * devices driver.
    59  */
    60 typedef void remote_iface_func_t(device_t *, void *, ipc_callid_t,
    61     ipc_call_t *);
    62 typedef remote_iface_func_t *remote_iface_func_ptr_t;
    63 typedef void remote_handler_t(device_t *, ipc_callid_t, ipc_call_t *);
    64 
    65 typedef struct {
    66         size_t method_count;
    67         remote_iface_func_ptr_t *methods;
    68 } remote_iface_t;
    69 
    70 typedef struct {
    71         remote_iface_t *ifaces[DEV_IFACE_COUNT];
    72 } iface_dipatch_table_t;
    73 
    74 extern remote_iface_t *get_remote_iface(int);
    75 extern remote_iface_func_ptr_t get_remote_method(remote_iface_t *, sysarg_t);
    7653
    7754/*
     
    137114        link_t link;
    138115};
    139 
    140116
    141117/*
Note: See TracChangeset for help on using the changeset viewer.