|
1 | | -# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD |
| 1 | +# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD |
2 | 2 | # SPDX-License-Identifier: CC0-1.0 |
3 | 3 | import pytest |
4 | 4 | from pytest_embedded import Dut |
|
16 | 16 | @pytest.mark.generic |
17 | 17 | def test_i2s_basic_example(dut: Dut) -> None: |
18 | 18 |
|
19 | | - # TODO: IDF-10007, reopen |
20 | | - # dut.expect(r'D \(([0-9]+)\) i2s_common: tx channel is registered on I2S0 successfully', timeout=5) |
21 | | - # dut.expect(r'D \(([0-9]+)\) i2s_common: rx channel is registered on I2S0 successfully', timeout=5) |
22 | | - # dut.expect(r'D \(([0-9]+)\) i2s_common: DMA malloc info: dma_desc_num = ([0-9]+), ' |
23 | | - # r'dma_desc_buf_size = dma_frame_num \* slot_num \* data_bit_width = ([0-9]+)', timeout=5) |
24 | | - # dut.expect(r'D \(([0-9]+)\) i2s_std: Clock division info: \[sclk\] ([0-9]+) Hz ' |
25 | | - # r'\[mdiv\] ([0-9]+) \[mclk\] ([0-9]+) Hz \[bdiv\] ([0-9]+) \[bclk\] ([0-9]+) Hz', timeout=5) |
26 | | - # dut.expect(r'D \(([0-9]+)\) i2s_std: The tx channel on I2S0 has been initialized to STD mode successfully', timeout=5) |
27 | | - # dut.expect(r'D \(([0-9]+)\) i2s_common: DMA malloc info: dma_desc_num = ([0-9]+), ' |
28 | | - # r'dma_desc_buf_size = dma_frame_num \* slot_num \* data_bit_width = ([0-9]+)', timeout=5) |
29 | | - # dut.expect(r'D \(([0-9]+)\) i2s_std: Clock division info: \[sclk\] ([0-9]+) Hz ' |
30 | | - # r'\[mdiv\] ([0-9]+) \[mclk\] ([0-9]+) Hz \[bdiv\] ([0-9]+) \[bclk\] ([0-9]+) Hz', timeout=5) |
31 | | - # dut.expect(r'D \(([0-9]+)\) i2s_std: The rx channel on I2S0 has been initialized to STD mode successfully', timeout=5) |
32 | | - # chan_enable_pattern = [ |
33 | | - # r'D \(([0-9]+)\) i2s_common: i2s tx channel enabled', |
34 | | - # r'D \(([0-9]+)\) i2s_common: i2s rx channel enabled' |
35 | | - # ] |
36 | | - # dut.expect(chan_enable_pattern, timeout=5) |
37 | | - # dut.expect(chan_enable_pattern, timeout=5) |
| 19 | + dut.expect(r'i2s_common: tx channel is registered on I2S0 successfully', timeout=5) |
| 20 | + dut.expect(r'i2s_common: rx channel is registered on I2S0 successfully', timeout=5) |
| 21 | + dut.expect(r'i2s_common: DMA malloc info: dma_desc_num = ([0-9]+), ' |
| 22 | + r'dma_desc_buf_size = dma_frame_num \* slot_num \* data_bit_width = ([0-9]+)', timeout=5) |
| 23 | + dut.expect(r'i2s_std: Clock division info: \[sclk\] ([0-9]+) Hz ' |
| 24 | + r'\[mdiv\] ([0-9]+) \[mclk\] ([0-9]+) Hz \[bdiv\] ([0-9]+) \[bclk\] ([0-9]+) Hz', timeout=5) |
| 25 | + dut.expect(r'i2s_std: The tx channel on I2S0 has been initialized to STD mode successfully', timeout=5) |
| 26 | + dut.expect(r'i2s_common: DMA malloc info: dma_desc_num = ([0-9]+), ' |
| 27 | + r'dma_desc_buf_size = dma_frame_num \* slot_num \* data_bit_width = ([0-9]+)', timeout=5) |
| 28 | + dut.expect(r'i2s_std: Clock division info: \[sclk\] ([0-9]+) Hz ' |
| 29 | + r'\[mdiv\] ([0-9]+) \[mclk\] ([0-9]+) Hz \[bdiv\] ([0-9]+) \[bclk\] ([0-9]+) Hz', timeout=5) |
| 30 | + dut.expect(r'i2s_std: The rx channel on I2S0 has been initialized to STD mode successfully', timeout=5) |
| 31 | + chan_enable_pattern = [ |
| 32 | + r'i2s_common: i2s tx channel enabled', |
| 33 | + r'i2s_common: i2s rx channel enabled' |
| 34 | + ] |
| 35 | + dut.expect(chan_enable_pattern, timeout=5) |
| 36 | + dut.expect(chan_enable_pattern, timeout=5) |
38 | 37 | dut.expect(r'Write Task: i2s write ([0-9]+) bytes', timeout=5) |
39 | 38 | dut.expect(r'Read Task: i2s read ([0-9]+) bytes', timeout=5) |
40 | 39 | dut.expect(r'-----------------------------------', timeout=5) |
|
0 commit comments