Changeset 22027b6e in mainline
- Timestamp:
- 2011-01-09T20:55:03Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 80bffdb0, 8b5690f
- Parents:
- 5fdd7c3
- Location:
- uspace/lib/drv
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/dev_iface.c
r5fdd7c3 r22027b6e 36 36 */ 37 37 38 #include <assert.h> 39 38 40 #include "dev_iface.h" 39 41 #include "remote_hw_res.h" -
uspace/lib/drv/include/dev_iface.h
r5fdd7c3 r22027b6e 36 36 #define LIBDRV_DEV_IFACE_H_ 37 37 38 #include "driver.h"38 #include <ipc/dev_iface.h> 39 39 40 /* TODO declare device interface structures here */ 40 /* 41 * Device interface 42 */ 43 44 struct device; 45 46 /* 47 * First two parameters: device and interface structure registered by the 48 * devices driver. 49 */ 50 typedef void remote_iface_func_t(struct device *, void *, ipc_callid_t, 51 ipc_call_t *); 52 typedef remote_iface_func_t *remote_iface_func_ptr_t; 53 typedef void remote_handler_t(struct device *, ipc_callid_t, ipc_call_t *); 54 55 typedef struct { 56 size_t method_count; 57 remote_iface_func_ptr_t *methods; 58 } remote_iface_t; 59 60 typedef struct { 61 remote_iface_t *ifaces[DEV_IFACE_COUNT]; 62 } iface_dipatch_table_t; 63 64 extern remote_iface_t *get_remote_iface(int); 65 extern remote_iface_func_ptr_t get_remote_method(remote_iface_t *, sysarg_t); 66 41 67 42 68 extern bool is_valid_iface_idx(int); 43 44 69 45 70 #endif -
uspace/lib/drv/include/driver.h
r5fdd7c3 r22027b6e 47 47 #include <malloc.h> 48 48 49 #include "dev_iface.h" 50 49 51 struct device; 50 52 typedef struct device device_t; 51 52 /*53 * Device interface54 */55 56 /*57 * First two parameters: device and interface structure registered by the58 * 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);76 53 77 54 /* … … 137 114 link_t link; 138 115 }; 139 140 116 141 117 /*
Note:
See TracChangeset
for help on using the changeset viewer.