source: mainline/uspace/lib/c/include/ipc/dev_iface.h@ 9bfa8c8

Last change on this file since 9bfa8c8 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 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: 1.8 KB
Line 
1/*
2 * SPDX-FileCopyrightText: 2010 Lenka Trochtova
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _LIBC_IPC_DEV_IFACE_H_
8#define _LIBC_IPC_DEV_IFACE_H_
9
10#include <stdlib.h>
11#include <types/common.h>
12
13typedef enum {
14 HW_RES_DEV_IFACE = 0,
15 PIO_WINDOW_DEV_IFACE,
16
17 /** Character device interface */
18 CHAR_DEV_IFACE,
19
20 /** Audio device mixer interface */
21 AUDIO_MIXER_IFACE,
22 /** Audio device pcm buffer interface */
23 AUDIO_PCM_BUFFER_IFACE,
24
25 /** Network interface controller interface */
26 NIC_DEV_IFACE,
27
28 /** IEEE 802.11 interface controller interface */
29 IEEE80211_DEV_IFACE,
30
31 /** Interface provided by any PCI device. */
32 PCI_DEV_IFACE,
33
34 /** Interface provided by any USB device. */
35 USB_DEV_IFACE,
36 /** Interface provided by USB diagnostic devices. */
37 USBDIAG_DEV_IFACE,
38 /** Interface provided by USB host controller to USB device. */
39 USBHC_DEV_IFACE,
40 /** Interface provided by USB HID devices. */
41 USBHID_DEV_IFACE,
42
43 /** Interface provided by Real Time Clock devices */
44 CLOCK_DEV_IFACE,
45
46 /** Interface provided by LED devices */
47 LED_DEV_IFACE,
48
49 /** Interface provided by battery powered devices */
50 BATTERY_DEV_IFACE,
51
52 /** Interface provided by AHCI devices. */
53 AHCI_DEV_IFACE,
54
55 DEV_IFACE_MAX
56} dev_inferface_idx_t;
57
58#define DEV_IFACE_ID(idx) ((idx) + IPC_FIRST_USER_METHOD)
59#define DEV_IFACE_IDX(id) ((id) - IPC_FIRST_USER_METHOD)
60
61#define DEV_IFACE_COUNT DEV_IFACE_MAX
62#define DEV_FIRST_CUSTOM_METHOD_IDX DEV_IFACE_MAX
63#define DEV_FIRST_CUSTOM_METHOD \
64 DEV_IFACE_ID(DEV_FIRST_CUSTOM_METHOD_IDX)
65
66/*
67 * The first argument is actually method (as the "real" method is used
68 * for indexing into interfaces.
69 */
70
71#define DEV_IPC_GET_ARG1(call) ipc_get_arg2(&(call))
72#define DEV_IPC_GET_ARG2(call) ipc_get_arg3(&(call))
73#define DEV_IPC_GET_ARG3(call) ipc_get_arg4(&(call))
74#define DEV_IPC_GET_ARG4(call) ipc_get_arg5(&(call))
75
76#endif
Note: See TracBrowser for help on using the repository browser.