Zephyr Project API
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
emul_stub_device.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google LLC
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
13
#ifndef ZEPHYR_INCLUDE_EMUL_STUB_DEVICE_H_
14
#define ZEPHYR_INCLUDE_EMUL_STUB_DEVICE_H_
15
16
#include <
zephyr/device.h
>
17
#include <
zephyr/devicetree.h
>
18
19
/*
20
* Needed for emulators without corresponding DEVICE_DT_DEFINE drivers
21
*/
22
24
struct
emul_stub_dev_data {
25
/* Stub */
26
};
27
struct
emul_stub_dev_config {
28
/* Stub */
29
};
30
struct
emul_stub_dev_api {
31
/* Stub */
32
};
34
43
#define EMUL_STUB_DEVICE(n) \
44
__maybe_unused static int emul_init_stub_##n(const struct device *dev) \
45
{ \
46
ARG_UNUSED(dev); \
47
return 0; \
48
} \
49
\
50
static struct emul_stub_dev_data stub_data_##n; \
51
static struct emul_stub_dev_config stub_config_##n; \
52
static struct emul_stub_dev_api stub_api_##n; \
53
DEVICE_DT_INST_DEFINE(n, &emul_init_stub_##n, NULL, &stub_data_##n, &stub_config_##n, \
54
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &stub_api_##n);
55
56
#endif
/* ZEPHYR_INCLUDE_EMUL_STUB_DEVICE_H_ */
device.h
APIs and macros for the Zephyr device model.
devicetree.h
Devicetree main header.
include
zephyr
drivers
emul_stub_device.h
Generated on
for Zephyr Project API by
1.16.1