pytest_i2s_basic.py 678 B

123456789101112131415161718
  1. # SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: CC0-1.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. @pytest.mark.esp32
  6. @pytest.mark.esp32s2
  7. @pytest.mark.esp32s3
  8. @pytest.mark.esp32c3
  9. @pytest.mark.generic
  10. def test_i2s_basic_example(dut: Dut) -> None:
  11. dut.expect_exact('I2S tx and rx channels have been initialized to standard duplex mode', timeout=30)
  12. dut.expect_exact('I2S tx and rx channels enabled', timeout=30)
  13. dut.expect_exact('[i2s write] 1440 bytes are written successfully', timeout=30)
  14. dut.expect_exact('', timeout=30)
  15. dut.expect_exact('[i2s read] 8192 bytes are read successfully', timeout=30)