/Zephyr-latest/subsys/emul/ |
D | emul.c | 10 LOG_MODULE_REGISTER(emul); 17 const struct emul *emul_get_binding(const char *name) in emul_get_binding() 19 STRUCT_SECTION_FOREACH(emul, emul_it) { in emul_get_binding() 41 const struct emul *emul = emul_get_binding(elp->dev->name); in emul_init_for_bus() local 43 if (!emul) { in emul_init_for_bus() 48 switch (emul->bus_type) { in emul_init_for_bus() 50 emul->bus.i2c->target = emul; in emul_init_for_bus() 53 emul->bus.espi->target = emul; in emul_init_for_bus() 56 emul->bus.spi->target = emul; in emul_init_for_bus() 59 emul->bus.mspi->target = emul; in emul_init_for_bus() [all …]
|
/Zephyr-latest/drivers/spi/ |
D | spi_emul.c | 56 struct spi_emul *emul; in spi_emul_find() local 58 emul = CONTAINER_OF(node, struct spi_emul, node); in spi_emul_find() 59 if (emul->chipsel == chipsel) { in spi_emul_find() 60 return emul; in spi_emul_find() 70 struct spi_emul *emul; in spi_emul_io() local 74 emul = spi_emul_find(dev, config->slave); in spi_emul_io() 75 if (!emul) { in spi_emul_io() 79 api = emul->api; in spi_emul_io() 80 __ASSERT_NO_MSG(emul->api); in spi_emul_io() 81 __ASSERT_NO_MSG(emul->api->io); in spi_emul_io() [all …]
|
/Zephyr-latest/drivers/espi/ |
D | espi_emul.c | 40 struct espi_emul *emul; in espi_emul_find() local 42 emul = CONTAINER_OF(node, struct espi_emul, node); in espi_emul_find() 43 if (emul->chipsel == chipsel) { in espi_emul_find() 44 return emul; in espi_emul_find() 91 struct espi_emul *emul; in espi_emul_read_lpc_request() local 101 emul = espi_emul_find(dev, EMUL_ESPI_HOST_CHIPSEL); in espi_emul_read_lpc_request() 102 if (!emul) { in espi_emul_read_lpc_request() 107 __ASSERT_NO_MSG(emul->api); in espi_emul_read_lpc_request() 108 api = emul->api; in espi_emul_read_lpc_request() 114 *data = (uint32_t)api->get_acpi_shm(emul->target); in espi_emul_read_lpc_request() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | emul_fuel_gauge.h | 36 int (*set_battery_charging)(const struct emul *emul, uint32_t uV, int uA); 37 int (*is_battery_cutoff)(const struct emul *emul, bool *cutoff); 57 __syscall int emul_fuel_gauge_set_battery_charging(const struct emul *target, uint32_t uV, int uA); 58 static inline int z_impl_emul_fuel_gauge_set_battery_charging(const struct emul *target, in z_impl_emul_fuel_gauge_set_battery_charging() 80 __syscall int emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff); 81 static inline int z_impl_emul_fuel_gauge_is_battery_cutoff(const struct emul *target, bool *cutoff) in z_impl_emul_fuel_gauge_is_battery_cutoff()
|
D | emul_sensor.h | 30 int (*set_channel)(const struct emul *target, struct sensor_chan_spec ch, 33 int (*get_sample_range)(const struct emul *target, struct sensor_chan_spec ch, q31_t *lower, 36 int (*set_attribute)(const struct emul *target, struct sensor_chan_spec ch, 39 int (*get_attribute_metadata)(const struct emul *target, struct sensor_chan_spec ch, 54 static inline bool emul_sensor_backend_is_supported(const struct emul *target) in emul_sensor_backend_is_supported() 71 static inline int emul_sensor_backend_set_channel(const struct emul *target, in emul_sensor_backend_set_channel() 104 static inline int emul_sensor_backend_get_sample_range(const struct emul *target, in emul_sensor_backend_get_sample_range() 130 static inline int emul_sensor_backend_set_attribute(const struct emul *target, in emul_sensor_backend_set_attribute() 164 static inline int emul_sensor_backend_get_attribute_metadata(const struct emul *target, in emul_sensor_backend_get_attribute_metadata()
|
D | espi_emul.h | 48 typedef int (*emul_espi_api_set_vw)(const struct emul *target, enum espi_vwire_signal vw, 62 typedef int (*emul_espi_api_get_vw)(const struct emul *target, enum espi_vwire_signal vw, 73 typedef uintptr_t (*emul_espi_api_get_acpi_shm)(const struct emul *target); 114 const struct emul *target; 139 int espi_emul_register(const struct device *dev, struct espi_emul *emul);
|
D | uart_emul.h | 43 const struct emul *target); 49 const struct emul *target; 66 int uart_emul_register(const struct device *dev, struct uart_emul *emul);
|
D | emul.h | 22 struct emul; 68 typedef int (*emul_init_t)(const struct emul *emul, const struct device *parent); 82 struct emul { struct 149 const STRUCT_SECTION_ITERABLE(emul, EMUL_DT_NAME_GET(node_id)) __used = { \ 221 const struct emul *emul_get_binding(const char *name); 227 #define Z_MAYBE_EMUL_DECLARE_INTERNAL(node_id) extern const struct emul EMUL_DT_NAME_GET(node_id);
|
D | i2c_emul.h | 41 const struct emul *target; 69 typedef int (*i2c_emul_transfer_t)(const struct emul *target, struct i2c_msg *msgs, int num_msgs, 79 int i2c_emul_register(const struct device *dev, struct i2c_emul *emul);
|
D | spi_emul.h | 41 const struct emul *target; 72 typedef int (*spi_emul_io_t)(const struct emul *target, const struct spi_config *config, 82 int spi_emul_register(const struct device *dev, struct spi_emul *emul);
|
D | emul_bbram.h | 28 int (*set_data)(const struct emul *target, size_t offset, size_t count, 31 int (*get_data)(const struct emul *target, size_t offset, size_t count, uint8_t *data); 49 static inline int emul_bbram_backend_set_data(const struct emul *target, size_t offset, in emul_bbram_backend_set_data() 76 static inline int emul_bbram_backend_get_data(const struct emul *target, size_t offset, in emul_bbram_backend_get_data()
|
D | mspi_emul.h | 75 typedef int (*emul_mspi_dev_api_transceive)(const struct emul *target, 90 const struct emul *target; 115 int mspi_emul_register(const struct device *dev, struct mspi_emul *emul);
|
/Zephyr-latest/tests/drivers/bbram/generic/src/ |
D | fixture.c | 14 const struct emul *get_and_check_emul(const struct device *dev) in get_and_check_emul() 18 const struct emul *emul = emul_get_binding(dev->name); in get_and_check_emul() local 21 if (emul == NULL || emul->backend_api == NULL) { in get_and_check_emul() 24 return emul; in get_and_check_emul()
|
/Zephyr-latest/include/zephyr/drivers/usb/ |
D | emul_bc12.h | 35 int (*set_charging_partner)(const struct emul *emul, enum bc12_type partner_type); 36 int (*set_pd_partner)(const struct emul *emul, bool connected); 56 static inline int bc12_emul_set_charging_partner(const struct emul *target, in bc12_emul_set_charging_partner() 80 static inline int bc12_emul_set_pd_partner(const struct emul *target, bool connected) in bc12_emul_set_pd_partner()
|
/Zephyr-latest/tests/subsys/emul/src/ |
D | main.c | 21 ZTEST(emul, test_emul_dt_get) in ZTEST() argument 26 static const struct emul *emul_static = EMUL_DT_GET(TEST_ACCEL); in ZTEST() 34 ZTEST(emul, test_emul_backend_api) in ZTEST() argument 36 static const struct emul *emul_a = EMUL_DT_GET(TEST_EMUL_A); in ZTEST() 37 static const struct emul *emul_b = EMUL_DT_GET(TEST_EMUL_B); in ZTEST() 57 ZTEST_SUITE(emul, NULL, NULL, NULL, NULL, NULL);
|
D | emul_tester.h | 13 int (*set_action)(const struct emul *target, int action); 14 int (*get_action)(const struct emul *target, int *action); 17 static inline int emul_tester_backend_set_action(const struct emul *target, int action) in emul_tester_backend_set_action() 25 static inline int emul_tester_backend_get_action(const struct emul *target, int *action) in emul_tester_backend_get_action()
|
D | emul_tester.c | 25 static int emul_tester_set_action(const struct emul *target, int action) in emul_tester_set_action() 35 static int emul_tester_get_action(const struct emul *target, int *action) in emul_tester_get_action() 44 static int emul_tester_transfer(const struct emul *target, struct i2c_msg *msgs, int num_msgs, in emul_tester_transfer() 64 static int emul_tester_init(const struct emul *target, const struct device *parent) in emul_tester_init()
|
/Zephyr-latest/tests/drivers/sensor/hc-sr04/src/ |
D | main.c | 23 fixture->emul.echo_duration_us = duration_us; \ 38 struct hcsr04_emul emul; member 49 .emul = { in hcsr04_setup() 64 gpio_init_callback(&fixture.emul.cb, &gpio_emul_callback_handler, BIT(HC_SR04_PIN_OUT)); in hcsr04_setup() 65 zassert_false(gpio_add_callback(gpio_dev, &fixture.emul.cb), in hcsr04_setup() 75 fixture->emul.fail_echo = false; in hcsr04_before() 82 const struct hcsr04_emul *emul = CONTAINER_OF(cb, struct hcsr04_emul, cb); in gpio_emul_callback_handler() local 84 if (emul->fail_echo) { in gpio_emul_callback_handler() 94 k_busy_wait(emul->echo_duration_us); in gpio_emul_callback_handler() 104 fixture->emul.fail_echo = true; in ZTEST_USER_F()
|
/Zephyr-latest/drivers/i2c/ |
D | i2c_emul.c | 58 struct i2c_emul *emul = NULL; in i2c_emul_find() local 60 emul = CONTAINER_OF(node, struct i2c_emul, node); in i2c_emul_find() 61 if (emul->addr == addr) { in i2c_emul_find() 62 return emul; in i2c_emul_find() 184 struct i2c_emul *emul; in i2c_emul_transfer() local 220 emul = i2c_emul_find(dev, addr); in i2c_emul_transfer() 221 if (!emul) { in i2c_emul_transfer() 225 api = emul->api; in i2c_emul_transfer() 226 __ASSERT_NO_MSG(emul->api); in i2c_emul_transfer() 227 __ASSERT_NO_MSG(emul->api->transfer); in i2c_emul_transfer() [all …]
|
/Zephyr-latest/drivers/sensor/adi/adltc2990/ |
D | adltc2990_emul.h | 12 void adltc2990_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val); 14 void adltc2990_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val); 16 void adltc2990_emul_reset(const struct emul *target);
|
D | adltc2990_emul.c | 31 void adltc2990_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val) in adltc2990_emul_set_reg() 39 void adltc2990_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val) in adltc2990_emul_get_reg() 47 void adltc2990_emul_reset(const struct emul *target) in adltc2990_emul_reset() 54 static int adltc2990_emul_handle_write(const struct emul *target, uint8_t regn, uint8_t value) in adltc2990_emul_handle_write() 73 static int adltc2990_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in adltc2990_emul_transfer_i2c() 118 static int adltc2990_emul_init(const struct emul *target, const struct device *parent) in adltc2990_emul_init()
|
/Zephyr-latest/drivers/sensor/bosch/bma4xx/ |
D | bma4xx_emul.h | 17 void bma4xx_emul_set_accel_data(const struct emul *target, q31_t value, int8_t shift, int8_t reg); 26 uint8_t bma4xx_emul_get_interrupt_config(const struct emul *emul, uint8_t *int1_io_ctrl,
|
/Zephyr-latest/drivers/sensor/asahi_kasei/akm09918c/ |
D | akm09918c_emul.h | 19 void akm09918c_emul_set_reg(const struct emul *target, uint8_t reg_addr, const uint8_t *val, 30 void akm09918c_emul_get_reg(const struct emul *target, uint8_t reg_addr, uint8_t *val, 38 void akm09918c_emul_reset(const struct emul *target);
|
/Zephyr-latest/drivers/sensor/amd_sb_tsi/ |
D | sb_tsi_emul.c | 24 static void sb_tsi_emul_set_reg(const struct emul *target, uint8_t reg, uint8_t val) in sb_tsi_emul_set_reg() 32 static uint8_t sb_tsi_emul_get_reg(const struct emul *target, uint8_t reg) in sb_tsi_emul_get_reg() 40 static void sb_tsi_emul_reset(const struct emul *target) in sb_tsi_emul_reset() 47 static int sb_tsi_emul_transfer_i2c(const struct emul *target, struct i2c_msg *msgs, in sb_tsi_emul_transfer_i2c() 96 static int sb_tsi_emul_init(const struct emul *target, const struct device *parent) in sb_tsi_emul_init() 102 static int sb_tsi_emul_set_channel(const struct emul *target, struct sensor_chan_spec ch, in sb_tsi_emul_set_channel() 124 static int sb_tsi_emul_get_sample_range(const struct emul *target, struct sensor_chan_spec ch, in sb_tsi_emul_get_sample_range()
|
/Zephyr-latest/tests/drivers/uart/uart_emul/ |
D | uart_emul.overlay | 8 euart0: uart-emul { 9 compatible = "zephyr,uart-emul"; 17 compatible = "zephyr,uart-emul";
|