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
RevLine 
[a1769ee]1/*
[d7f7a4a]2 * SPDX-FileCopyrightText: 2010 Lenka Trochtova
[a1769ee]3 *
[d7f7a4a]4 * SPDX-License-Identifier: BSD-3-Clause
[a1769ee]5 */
6
[4805495]7#ifndef _LIBC_IPC_DEV_IFACE_H_
8#define _LIBC_IPC_DEV_IFACE_H_
[a1769ee]9
[38d150e]10#include <stdlib.h>
[cf13b17]11#include <types/common.h>
[a1769ee]12
[b2263e6a]13typedef enum {
14 HW_RES_DEV_IFACE = 0,
[48bd6f4]15 PIO_WINDOW_DEV_IFACE,
[53a7fda]16
[609243f4]17 /** Character device interface */
[25a7e11d]18 CHAR_DEV_IFACE,
[6d5e378]19
[cf02eaf]20 /** Audio device mixer interface */
21 AUDIO_MIXER_IFACE,
22 /** Audio device pcm buffer interface */
23 AUDIO_PCM_BUFFER_IFACE,
[64d138b]24
[609243f4]25 /** Network interface controller interface */
26 NIC_DEV_IFACE,
[64d138b]27
[864762a]28 /** IEEE 802.11 interface controller interface */
29 IEEE80211_DEV_IFACE,
[64d138b]30
[d79a101f]31 /** Interface provided by any PCI device. */
32 PCI_DEV_IFACE,
33
[56fb3732]34 /** Interface provided by any USB device. */
35 USB_DEV_IFACE,
[64d138b]36 /** Interface provided by USB diagnostic devices. */
37 USBDIAG_DEV_IFACE,
[41df71f9]38 /** Interface provided by USB host controller to USB device. */
39 USBHC_DEV_IFACE,
[27b85d9]40 /** Interface provided by USB HID devices. */
41 USBHID_DEV_IFACE,
[cf02eaf]42
[c9f703b]43 /** Interface provided by Real Time Clock devices */
44 CLOCK_DEV_IFACE,
[cf02eaf]45
[1e94e09]46 /** Interface provided by LED devices */
47 LED_DEV_IFACE,
48
[917797f]49 /** Interface provided by battery powered devices */
50 BATTERY_DEV_IFACE,
[cf02eaf]51
[9904eb90]52 /** Interface provided by AHCI devices. */
53 AHCI_DEV_IFACE,
[cb59f787]54
[a1769ee]55 DEV_IFACE_MAX
[3843ecb]56} dev_inferface_idx_t;
[a1769ee]57
[8c780dc]58#define DEV_IFACE_ID(idx) ((idx) + IPC_FIRST_USER_METHOD)
59#define DEV_IFACE_IDX(id) ((id) - IPC_FIRST_USER_METHOD)
[a1769ee]60
[8c780dc]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)
[a1769ee]65
[eac610e]66/*
67 * The first argument is actually method (as the "real" method is used
68 * for indexing into interfaces.
69 */
70
[fafb8e5]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))
[eac610e]75
[8c780dc]76#endif
Note: See TracBrowser for help on using the repository browser.