source: mainline/uspace/lib/drv/include/dev_iface.h@ d7f7a4a

Last change on this file since d7f7a4a was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 4 years ago

Replace some license headers with SPDX identifier

Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.

  • Property mode set to 100644
File size: 1008 bytes
Line 
1/*
2 * SPDX-FileCopyrightText: 2010 Lenka Trochtova
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/** @addtogroup libdrv
8 * @{
9 */
10/** @file
11 */
12
13#ifndef LIBDRV_DEV_IFACE_H_
14#define LIBDRV_DEV_IFACE_H_
15
16#include <ipc/common.h>
17#include <ipc/dev_iface.h>
18#include <stdbool.h>
19
20/*
21 * Device interface
22 */
23
24struct ddf_fun;
25
26/*
27 * First two parameters: device and interface structure registered by the
28 * devices driver.
29 */
30typedef void remote_iface_func_t(struct ddf_fun *, void *, ipc_call_t *);
31typedef remote_iface_func_t *remote_iface_func_ptr_t;
32typedef void remote_handler_t(struct ddf_fun *, ipc_call_t *);
33
34typedef struct {
35 const size_t method_count;
36 const remote_iface_func_ptr_t *methods;
37} remote_iface_t;
38
39typedef struct {
40 const remote_iface_t *ifaces[DEV_IFACE_COUNT];
41} iface_dipatch_table_t;
42
43extern const remote_iface_t *get_remote_iface(int);
44extern remote_iface_func_ptr_t get_remote_method(const remote_iface_t *, sysarg_t);
45
46extern bool is_valid_iface_idx(int);
47
48#endif
49
50/**
51 * @}
52 */
Note: See TracBrowser for help on using the repository browser.