pytest_sdm_dac_example.py 647 B

1234567891011121314151617181920
  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.esp32c6
  10. @pytest.mark.esp32h2
  11. @pytest.mark.generic
  12. def test_sdm_dac_example(dut: Dut) -> None:
  13. dut.expect(r'sdm_dac: Sigma-delta output is attached to GPIO \w+')
  14. dut.expect(r'sdm_dac: Timer allocated with resolution \w+ Hz')
  15. dut.expect(r'sdm_dac: Timer callback registered, interval \w+ us')
  16. dut.expect_exact('sdm_dac: Timer enabled')
  17. dut.expect_exact('sdm_dac: Output start')