Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
|
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/espi_emul.h>
#include <zephyr/drivers/i2c_emul.h>
#include <zephyr/drivers/spi_emul.h>
#include <zephyr/drivers/mspi_emul.h>
#include <zephyr/drivers/uart_emul.h>
#include <zephyr/sys/iterable_sections.h>
Go to the source code of this file.
Data Structures | |
struct | emul_link_for_bus |
Structure uniquely identifying a device to be emulated. More... | |
struct | emul_list_for_bus |
List of emulators attached to a bus. More... | |
struct | no_bus_emul |
Emulator API stub when an emulator is not actually placed on a bus. More... | |
struct | emul |
An emulator instance - represents the target emulated device/peripheral that is interacted with through an emulated bus. More... | |
union | emul::bus |
Pointer to the emulated bus node. More... | |
Macros | |
#define | EMUL_DT_NAME_GET(node_id) |
Use the devicetree node identifier as a unique name. | |
#define | EMUL_DT_DEFINE(node_id, init_fn, data_ptr, cfg_ptr, bus_api, _backend_api) |
Define a new emulator. | |
#define | EMUL_DT_INST_DEFINE(inst, ...) |
Like EMUL_DT_DEFINE(), but uses an instance of a DT_DRV_COMPAT compatible instead of a node identifier. | |
#define | EMUL_DT_GET(node_id) |
Get a const struct emul* from a devicetree node identifier. | |
#define | EMUL_DT_GET_OR_NULL(node_id) |
Utility macro to obtain an optional reference to an emulator. | |
Typedefs | |
typedef int(* | emul_init_t) (const struct emul *emul, const struct device *parent) |
Standard callback for emulator initialisation providing the initialiser record and the device that calls the emulator functions. | |
Enumerations | |
enum | emul_bus_type { EMUL_BUS_TYPE_I2C , EMUL_BUS_TYPE_ESPI , EMUL_BUS_TYPE_SPI , EMUL_BUS_TYPE_MSPI , EMUL_BUS_TYPE_UART , EMUL_BUS_TYPE_NONE } |
The types of supported buses. More... | |
Functions | |
int | emul_init_for_bus (const struct device *dev) |
Set up a list of emulators. | |
const struct emul * | emul_get_binding (const char *name) |
Retrieve the emul structure for an emulator by name. | |
DT_FOREACH_STATUS_OKAY_NODE (Z_MAYBE_EMUL_DECLARE_INTERNAL) | |
DT_FOREACH_STATUS_OKAY_NODE | ( | Z_MAYBE_EMUL_DECLARE_INTERNAL | ) |