Lines Matching refs:emul
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()
83 if (emul->mock_api != NULL && emul->mock_api->io != NULL) { in spi_emul_io()
84 ret = emul->mock_api->io(emul->target, config, tx_bufs, rx_bufs); in spi_emul_io()
90 return api->io(emul->target, config, tx_bufs, rx_bufs); in spi_emul_io()
119 int spi_emul_register(const struct device *dev, struct spi_emul *emul) in spi_emul_register() argument
122 const char *name = emul->target->dev->name; in spi_emul_register()
124 sys_slist_append(&data->emuls, &emul->node); in spi_emul_register()
126 LOG_INF("Register emulator '%s' at cs %u\n", name, emul->chipsel); in spi_emul_register()