Zephyr Project API  3.2.0
A Scalable Open Source RTOS
emul.h File Reference

Go to the source code of this file.

Data Structures

struct  emul_link_for_bus
 
struct  emul_list_for_bus
 
struct  emul
 
union  emul::bus
 

Macros

#define EMUL_DT_NAME_GET(node_id)   _CONCAT(__emulreg_, node_id)
 Use the devicetree node identifier as a unique name. More...
 
#define EMUL_DT_DEFINE(node_id, init_fn, data_ptr, cfg_ptr, bus_api)
 Define a new emulator. More...
 
#define EMUL_DT_INST_DEFINE(inst, ...)   EMUL_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
 Like EMUL_DT_DEFINE(), but uses an instance of a DT_DRV_COMPAT compatible instead of a node identifier. More...
 
#define EMUL_DT_GET(node_id)   (&EMUL_DT_NAME_GET(node_id))
 Get a const struct emul* from a devicetree node identifier. More...
 

Typedefs

typedef int(* emul_init_t) (const struct emul *emul, const struct device *parent)
 

Enumerations

enum  emul_bus_type { EMUL_BUS_TYPE_I2C , EMUL_BUS_TYPE_ESPI , EMUL_BUS_TYPE_SPI }
 

Functions

 DT_FOREACH_STATUS_OKAY_NODE (Z_MAYBE_EMUL_DECLARE_INTERNAL)
 
int emul_init_for_bus (const struct device *dev)
 
const struct emulemul_get_binding (const char *name)
 Retrieve the emul structure for an emulator by name. More...