/Zephyr-latest/tests/drivers/i2s/i2s_api/src/ |
D | test_i2s_dir_both_loopback.c | 35 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 39 ret = tx_block_write(dev_i2s, 1, 0); in ZTEST_USER() 43 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() 46 ret = rx_block_read(dev_i2s, 0); in ZTEST_USER() 50 ret = tx_block_write(dev_i2s, 2, 0); in ZTEST_USER() 55 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_DRAIN); in ZTEST_USER() 58 ret = rx_block_read(dev_i2s, 1); in ZTEST_USER() 62 ret = rx_block_read(dev_i2s, 2); in ZTEST_USER() 90 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 93 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() [all …]
|
D | test_i2s_dir_both_states.c | 35 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 38 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() 42 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 45 ret = rx_block_read(dev_i2s, 0); in ZTEST_USER() 49 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() 51 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_PREPARE); in ZTEST_USER() 56 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_DRAIN); in ZTEST_USER() 59 ret = rx_block_read(dev_i2s, 0); in ZTEST_USER() 79 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 82 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() [all …]
|
D | test_i2s_errors.c | 31 err = i2s_configure(dev_i2s, I2S_DIR_TX, &invalid_config); in ZTEST_USER() 38 err = i2s_configure(dev_i2s, I2S_DIR_TX, &invalid_config); in ZTEST_USER() 45 err = i2s_configure(dev_i2s, I2S_DIR_TX, &invalid_config); in ZTEST_USER() 65 err = i2s_configure(dev_i2s, I2S_DIR_TX, &inactive_config); in ZTEST_USER() 68 err = i2s_buf_write(dev_i2s, tx_data, BLOCK_SIZE); in ZTEST_USER() 71 err = i2s_trigger(dev_i2s, I2S_DIR_TX, I2S_TRIGGER_START); in ZTEST_USER() 74 config_err = i2s_configure(dev_i2s, I2S_DIR_TX, &inactive_config); in ZTEST_USER() 76 err = i2s_trigger(dev_i2s, I2S_DIR_TX, I2S_TRIGGER_STOP); in ZTEST_USER() 98 err = i2s_configure(dev_i2s, I2S_DIR_TX, &test_config); in ZTEST_USER() 101 err = i2s_buf_write(dev_i2s, tx_data, BLOCK_SIZE); in ZTEST_USER() [all …]
|
D | common.c | 108 static int tx_block_write_slab(const struct device *dev_i2s, int att, int err, in tx_block_write_slab() argument 115 ret = i2s_buf_write(dev_i2s, tx_block, BLOCK_SIZE); in tx_block_write_slab() 125 int tx_block_write(const struct device *dev_i2s, int att, int err) in tx_block_write() argument 127 return tx_block_write_slab(dev_i2s, att, err, &tx_mem_slab); in tx_block_write() 130 static int rx_block_read_slab(const struct device *dev_i2s, int att, in rx_block_read_slab() argument 137 ret = i2s_buf_read(dev_i2s, rx_block, &rx_size); in rx_block_read_slab() 151 int rx_block_read(const struct device *dev_i2s, int att) in rx_block_read() argument 153 return rx_block_read_slab(dev_i2s, att, &rx_mem_slab); in rx_block_read() 156 int configure_stream(const struct device *dev_i2s, enum i2s_dir dir) in configure_stream() argument 187 ret = i2s_configure(dev_i2s, I2S_DIR_TX, &i2s_cfg); in configure_stream() [all …]
|
D | main.c | 17 ZTEST_DMEM const struct device *dev_i2s = variable 57 zassert_not_null(dev_i2s, "TX/RX device not found"); in before_dir_both() 58 zassert_true(device_is_ready(dev_i2s), in before_dir_both() 59 "device %s is not ready", dev_i2s->name); in before_dir_both() 61 ret = configure_stream(dev_i2s, I2S_DIR_BOTH); in before_dir_both() 68 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_DROP); in before_dir_both()
|
D | i2s_api_test.h | 26 extern const struct device *dev_i2s; 40 int tx_block_write(const struct device *dev_i2s, int att, int err); 41 int rx_block_read(const struct device *dev_i2s, int att); 46 int configure_stream(const struct device *dev_i2s, enum i2s_dir dir);
|
/Zephyr-latest/samples/drivers/i2s/output/src/ |
D | main.c | 65 const struct device *dev_i2s = DEVICE_DT_GET(DT_ALIAS(i2s_tx)); in main() local 67 if (!device_is_ready(dev_i2s)) { in main() 82 ret = i2s_configure(dev_i2s, I2S_DIR_TX, &i2s_cfg); in main() 101 ret = i2s_write(dev_i2s, tx_block[tx_idx++], BLOCK_SIZE); in main() 107 ret = i2s_trigger(dev_i2s, I2S_DIR_TX, I2S_TRIGGER_START); in main() 114 ret = i2s_write(dev_i2s, tx_block[tx_idx++], BLOCK_SIZE); in main() 121 ret = i2s_trigger(dev_i2s, I2S_DIR_TX, I2S_TRIGGER_DRAIN); in main()
|
/Zephyr-latest/tests/drivers/i2s/i2s_speed/src/ |
D | test_i2s_speed.c | 130 static int configure_stream(const struct device *dev_i2s, enum i2s_dir dir) in configure_stream() argument 161 ret = i2s_configure(dev_i2s, I2S_DIR_TX, &i2s_cfg); in configure_stream() 171 ret = i2s_configure(dev_i2s, I2S_DIR_RX, &i2s_cfg); in configure_stream()
|