Lines Matching refs:dir

322 static int i2s_litex_configure(const struct device *dev, enum i2s_dir dir,  in i2s_litex_configure()  argument
332 if (dir == I2S_DIR_RX) { in i2s_litex_configure()
335 } else if (dir == I2S_DIR_TX) { in i2s_litex_configure()
338 } else if (dir == I2S_DIR_BOTH) { in i2s_litex_configure()
480 static int i2s_litex_trigger(const struct device *dev, enum i2s_dir dir, in i2s_litex_trigger() argument
487 if (dir == I2S_DIR_RX) { in i2s_litex_trigger()
489 } else if (dir == I2S_DIR_TX) { in i2s_litex_trigger()
491 } else if (dir == I2S_DIR_BOTH) { in i2s_litex_trigger()
601 #define I2S_INIT(dir) \ argument
606 static struct i2s_litex_data i2s_litex_data_##dir = { \
607 .dir.mem_block_queue.buf = dir##_ring_buf, \
608 .dir.mem_block_queue.len = \
609 sizeof(dir##_ring_buf) / sizeof(struct queue_item), \
612 static void i2s_litex_irq_config_func_##dir(const struct device *dev); \
614 static struct i2s_litex_cfg i2s_litex_cfg_##dir = { \
615 .base = DT_REG_ADDR(DT_NODELABEL(i2s_##dir)), \
617 DT_REG_ADDR_BY_NAME(DT_NODELABEL(i2s_##dir), fifo), \
618 .fifo_depth = DT_PROP(DT_NODELABEL(i2s_##dir), fifo_depth), \
619 .irq_config = i2s_litex_irq_config_func_##dir \
621 DEVICE_DT_DEFINE(DT_NODELABEL(i2s_##dir), i2s_litex_initialize, \
622 NULL, &i2s_litex_data_##dir, \
623 &i2s_litex_cfg_##dir, POST_KERNEL, \
627 static void i2s_litex_irq_config_func_##dir(const struct device *dev) \
629 IRQ_CONNECT(DT_IRQN(DT_NODELABEL(i2s_##dir)), \
630 DT_IRQ(DT_NODELABEL(i2s_##dir), \
632 i2s_litex_isr_##dir, \
633 DEVICE_DT_GET(DT_NODELABEL(i2s_##dir)), 0);\
634 irq_enable(DT_IRQN(DT_NODELABEL(i2s_##dir))); \