From 3b4ec64f26aaaf8b2a807ffa8565db32d992390d Mon Sep 17 00:00:00 2001 From: laokaiyao Date: Mon, 14 Nov 2022 16:28:00 +0800 Subject: [PATCH] i2s: support on esp32c6 --- components/driver/deprecated/i2s_legacy.c | 2 +- .../test_apps/i2s_test_apps/i2s/pytest_i2s.py | 1 + .../i2s_tdm/pytest_i2s_tdm_full_duplex.py | 1 + .../legacy_i2s_driver/pytest_legacy_i2s.py | 1 + .../test_apps/i2s_test_apps/test_inc/test_i2s.h | 2 +- docs/docs_not_updated/esp32c6.txt | 1 - docs/en/api-reference/peripherals/i2s.rst | 5 +++-- examples/peripherals/.build-test-rules.yml | 9 --------- .../peripherals/i2s/i2s_basic/i2s_pdm/README.md | 6 +++--- .../i2s/i2s_basic/i2s_pdm/main/Kconfig.projbuild | 4 ++-- .../i2s/i2s_basic/i2s_pdm/main/i2s_pdm_tx.c | 2 +- .../i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py | 1 + .../peripherals/i2s/i2s_basic/i2s_std/README.md | 4 ++-- .../i2s_std/main/i2s_std_example_main.c | 2 +- .../i2s/i2s_basic/i2s_std/pytest_i2s_std.py | 1 + .../peripherals/i2s/i2s_basic/i2s_tdm/README.md | 2 +- .../i2s_tdm/main/i2s_tdm_example_main.c | 8 ++++---- .../i2s/i2s_basic/i2s_tdm/pytest_i2s_tdm.py | 1 + .../i2s/i2s_codec/i2s_es7210_tdm/README.md | 4 ++-- .../main/i2s_es7210_record_example.c | 2 +- .../i2s_es7210_tdm/pytest_i2s_es7210_tdm.py | 1 + .../i2s/i2s_codec/i2s_es8311/README.md | 6 +++--- .../i2s_es8311/main/i2s_es8311_example.c | 16 ++++++++-------- .../i2s_codec/i2s_es8311/pytest_i2s_es8311.py | 1 + 24 files changed, 41 insertions(+), 42 deletions(-) diff --git a/components/driver/deprecated/i2s_legacy.c b/components/driver/deprecated/i2s_legacy.c index 43c7bec232..78cada5b54 100644 --- a/components/driver/deprecated/i2s_legacy.c +++ b/components/driver/deprecated/i2s_legacy.c @@ -1926,7 +1926,7 @@ esp_err_t i2s_platform_release_occupation(int id) } /** - * @brief This function will be called during start up, to check that pulse_cnt driver is not running along with the legacy i2s driver + * @brief This function will be called during start up, to check that the new i2s driver is not running along with the legacy i2s driver */ static __attribute__((constructor)) void check_i2s_driver_conflict(void) { diff --git a/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py b/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py index f715d67eef..5e28269b5c 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py +++ b/components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py @@ -8,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.esp32s3 @pytest.mark.generic @pytest.mark.parametrize( diff --git a/components/driver/test_apps/i2s_test_apps/i2s_tdm/pytest_i2s_tdm_full_duplex.py b/components/driver/test_apps/i2s_test_apps/i2s_tdm/pytest_i2s_tdm_full_duplex.py index 1c5321a710..d678fe3aeb 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s_tdm/pytest_i2s_tdm_full_duplex.py +++ b/components/driver/test_apps/i2s_test_apps/i2s_tdm/pytest_i2s_tdm_full_duplex.py @@ -24,6 +24,7 @@ def run_multi_device_case(master: Dut, slave: Dut, case_name: str) -> None: @pytest.mark.esp32s3 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.generic_multi_device @pytest.mark.parametrize('count', [ 2, diff --git a/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py b/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py index e3777b1045..20810d2eb8 100644 --- a/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py +++ b/components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/pytest_legacy_i2s.py @@ -8,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.esp32s3 @pytest.mark.generic @pytest.mark.parametrize( diff --git a/components/driver/test_apps/i2s_test_apps/test_inc/test_i2s.h b/components/driver/test_apps/i2s_test_apps/test_inc/test_i2s.h index 167c1c21b7..4c1a3763b5 100644 --- a/components/driver/test_apps/i2s_test_apps/test_inc/test_i2s.h +++ b/components/driver/test_apps/i2s_test_apps/test_inc/test_i2s.h @@ -44,7 +44,7 @@ extern "C" { #define SLAVE_WS_IO 15 #define DATA_IN_IO 19 #define DATA_OUT_IO 18 -#elif CONFIG_IDF_TARGET_ESP32H4 || CONFIG_IDF_TARGET_ESP32C6 +#else #define MASTER_MCK_IO 0 #define MASTER_BCK_IO 4 #define MASTER_WS_IO 5 diff --git a/docs/docs_not_updated/esp32c6.txt b/docs/docs_not_updated/esp32c6.txt index 4c802aef9c..bc56352075 100644 --- a/docs/docs_not_updated/esp32c6.txt +++ b/docs/docs_not_updated/esp32c6.txt @@ -120,7 +120,6 @@ api-reference/peripherals/usb_device api-reference/peripherals/sdspi_host api-reference/peripherals/dac api-reference/peripherals/spi_slave -api-reference/peripherals/i2s api-reference/peripherals/gptimer api-reference/peripherals/pcnt api-reference/peripherals/touch_element diff --git a/docs/en/api-reference/peripherals/i2s.rst b/docs/en/api-reference/peripherals/i2s.rst index 25d8b88ea2..62614d2958 100644 --- a/docs/en/api-reference/peripherals/i2s.rst +++ b/docs/en/api-reference/peripherals/i2s.rst @@ -1,7 +1,7 @@ Inter-IC Sound (I2S) ==================== -{IDF_TARGET_I2S_NUM:default="two", esp32s2="one", esp32c3="one"} +{IDF_TARGET_I2S_NUM:default="one", esp32="two", esp32s3="two"} Introduction ------------ @@ -109,6 +109,7 @@ Overview of All Modes ESP32 I2S 0/1 I2S 0 I2S 0 none I2S 0 I2S 0 ESP32S2 I2S 0 none none none none I2S 0 ESP32C3 I2S 0 I2S 0 none I2S 0 none none +ESP32C6 I2S 0 I2S 0 none I2S 0 none none ESP32S3 I2S 0/1 I2S 0 I2S 0 I2S 0/1 none none ========= ======== ======== ======== ======== ======== ========== @@ -177,7 +178,7 @@ Standard mode always has left and right two sound channels which are called 'slo .. wavedrom:: /../_static/diagrams/i2s/tdm_pcm_long.json -.. only:: SOC_I2S_SUPPORTS_LDC_CAMERA +.. only:: SOC_I2S_SUPPORTS_LCD_CAMERA LCD/Camera Mode ^^^^^^^^^^^^^^^ diff --git a/examples/peripherals/.build-test-rules.yml b/examples/peripherals/.build-test-rules.yml index 7e771b5a4a..3fc340b326 100644 --- a/examples/peripherals/.build-test-rules.yml +++ b/examples/peripherals/.build-test-rules.yml @@ -43,9 +43,6 @@ examples/peripherals/i2s/i2s_adc_dac: examples/peripherals/i2s/i2s_basic/i2s_pdm: disable: - if: SOC_I2S_SUPPORTS_PDM != 1 - - if: IDF_TARGET == "esp32c6" - temporary: true - reason: target esp32c6 is not supported yet examples/peripherals/i2s/i2s_basic/i2s_std: disable: @@ -58,16 +55,10 @@ examples/peripherals/i2s/i2s_basic/i2s_tdm: examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm: disable: - if: SOC_I2S_SUPPORTS_TDM != 1 - - if: IDF_TARGET == "esp32c6" - temporary: true - reason: target esp32c6 is not supported yet examples/peripherals/i2s/i2s_codec/i2s_es8311: disable: - if: SOC_I2S_SUPPORTED != 1 - - if: IDF_TARGET == "esp32c6" - temporary: true - reason: target esp32c6 is not supported yet examples/peripherals/i2s/i2s_recorder: enable: diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md b/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md index 04700c11bd..897dbcab0e 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | # I2S Basic PDM Mode Example @@ -13,7 +13,7 @@ This example is going to show how to use the PDM TX and RX mode. #### General -* A development board with any one of ESP32, ESP32-C3 or ESP32-S3 SoC +* A development board with any supported Espressif SOC chip (see `Supported Targets` table above) * A USB cable for power supply and programming #### PDM RX diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/Kconfig.projbuild b/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/Kconfig.projbuild index 3b12ee07aa..bc5712e29f 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/Kconfig.projbuild +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/Kconfig.projbuild @@ -8,13 +8,13 @@ menu "I2S PDM Example Configuration" config EXAMPLE_PDM_TX bool "PDM TX" + depends on SOC_I2S_SUPPORTS_PDM_TX help PDM TX example will play 'twinkle twinkle little star' in three tones. config EXAMPLE_PDM_RX bool "PDM RX" - # ESP32-C3 not support PDM RX for now, its hardware does not fully supported PDM RX mode - depends on !IDF_TARGET_ESP32C3 + depends on SOC_I2S_SUPPORTS_PDM_RX help PDM RX example will show the received data from a PDM microphone. endchoice diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/i2s_pdm_tx.c b/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/i2s_pdm_tx.c index 1da7040b4e..4801dc8608 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/i2s_pdm_tx.c +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/main/i2s_pdm_tx.c @@ -98,7 +98,7 @@ void i2s_example_pdm_tx_task(void *args) } } cnt++; - /* If finished played, switch the tone level */ + /* If finished playing, switch the tone level */ if (cnt == sizeof(song)) { cnt = 0; tone_select++; diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py b/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py index c31210811f..c461d5fea6 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/pytest_i2s_pdm.py @@ -8,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s3 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/examples/peripherals/i2s/i2s_basic/i2s_std/README.md b/examples/peripherals/i2s/i2s_basic/i2s_std/README.md index 164bc1e9d3..5c1dc1ada8 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_std/README.md +++ b/examples/peripherals/i2s/i2s_basic/i2s_std/README.md @@ -11,12 +11,12 @@ This example is going to show how to use the standard mode in simplex mode or fu ### Hardware Required -* A development board with any one of ESP32, ESP32-S2, ESP32-C3 or ESP32-S3 SoC +* A development board with any supported Espressif SOC chip (see `Supported Targets` table above) * A USB cable for power supply and programming ### Configure the Project -There are simplex mode and duplex mode can be chosen in this example, you can choose the mode in the menuconfig or just setting `EXAMPLE_I2S_DUPLEX_MODE` derectly, when `EXAMPLE_I2S_DUPLEX_MODE` is `0` the example will adopt the simplex mode, otherwise it will adopt the full-duplex mode. +There are simplex mode and duplex mode can be chosen in this example, you can choose the mode in the menuconfig or just setting `EXAMPLE_I2S_DUPLEX_MODE` directly, when `EXAMPLE_I2S_DUPLEX_MODE` is `0` the example will adopt the simplex mode, otherwise it will adopt the full-duplex mode. Note that ESP32-S2 simplex mode is not available because this example requires both TX & RX channels, however, ESP32-S2 has only one I2S controller and the simplex TX & RX channels can't coexist in a same controller. By the way, the simplex TX & RX channels can't coexist on ESP32 as well, but ESP32 has two I2S controllers so the simplex TX & RX channels can be registered on the different I2S controllers. diff --git a/examples/peripherals/i2s/i2s_basic/i2s_std/main/i2s_std_example_main.c b/examples/peripherals/i2s/i2s_basic/i2s_std/main/i2s_std_example_main.c index 903248d8b3..9a55aac2c1 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_std/main/i2s_std_example_main.c +++ b/examples/peripherals/i2s/i2s_basic/i2s_std/main/i2s_std_example_main.c @@ -144,7 +144,7 @@ static void i2s_example_init_std_simplex(void) * The default configuration can be generated by the helper macro, * it only requires the I2S controller id and I2S role * The tx and rx channels here are registered on different I2S controller, - * only ESP32-C3, ESP32-S3 and ESP32-H4 allow to register two separate tx & rx channels on a same controller */ + * Except ESP32 and ESP32-S2, others allow to register two separate tx & rx channels on a same controller */ i2s_chan_config_t tx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER); ESP_ERROR_CHECK(i2s_new_channel(&tx_chan_cfg, &tx_chan, NULL)); i2s_chan_config_t rx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER); diff --git a/examples/peripherals/i2s/i2s_basic/i2s_std/pytest_i2s_std.py b/examples/peripherals/i2s/i2s_basic/i2s_std/pytest_i2s_std.py index 18018f11d8..92f93a1936 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_std/pytest_i2s_std.py +++ b/examples/peripherals/i2s/i2s_basic/i2s_std/pytest_i2s_std.py @@ -9,6 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.generic def test_i2s_basic_example(dut: Dut) -> None: diff --git a/examples/peripherals/i2s/i2s_basic/i2s_tdm/README.md b/examples/peripherals/i2s/i2s_basic/i2s_tdm/README.md index 2a44b48f7e..f58024c0dd 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_tdm/README.md +++ b/examples/peripherals/i2s/i2s_basic/i2s_tdm/README.md @@ -11,7 +11,7 @@ This example is going to show how to use the TDM mode in simplex mode or full-du ### Hardware Required -* A development board with any one of ESP32-C3 or ESP32-S3 SoC +* A development board with any supported Espressif SOC chip (see `Supported Targets` table above) * A USB cable for power supply and programming ### Configure the Project diff --git a/examples/peripherals/i2s/i2s_basic/i2s_tdm/main/i2s_tdm_example_main.c b/examples/peripherals/i2s/i2s_basic/i2s_tdm/main/i2s_tdm_example_main.c index 0fc04f713c..fb3475bcbb 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_tdm/main/i2s_tdm_example_main.c +++ b/examples/peripherals/i2s/i2s_basic/i2s_tdm/main/i2s_tdm_example_main.c @@ -120,8 +120,8 @@ static void i2s_example_init_tdm_duplex(void) }, }, }; - /* While there are more than two slots activated, receiving data might be wrong if the mclk multiple is too samll - * The driver will increasing the multiple automatically to ensure the bclk_div bigger than 2. + /* While there are more than two slots activated, receiving data might be wrong if the mclk multiple is too small + * The driver will increasing the multiple automatically to ensure the bclk_div is greater than 2. * Modify the mclk_multiple to 512 directly here to avoid the warning */ tdm_cfg.clk_cfg.mclk_multiple = I2S_MCLK_MULTIPLE_512; @@ -184,8 +184,8 @@ static void i2s_example_init_tdm_simplex(void) }, }, }; - /* While there are more than two slots activated, receiving data might be wrong if the mclk multiple is too samll - * The driver will increasing the multiple automatically to ensure the bclk_div bigger than 2. + /* While there are more than two slots activated, receiving data might be wrong if the mclk multiple is too small + * The driver will increasing the multiple automatically to ensure the bclk_div is greater than 2. * Modify the mclk_multiple to 512 directly here to avoid the warning */ rx_tdm_cfg.clk_cfg.mclk_multiple = I2S_MCLK_MULTIPLE_512; ESP_ERROR_CHECK(i2s_channel_init_tdm_mode(rx_chan, &rx_tdm_cfg)); diff --git a/examples/peripherals/i2s/i2s_basic/i2s_tdm/pytest_i2s_tdm.py b/examples/peripherals/i2s/i2s_basic/i2s_tdm/pytest_i2s_tdm.py index afef7bdf76..a585cd3d22 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_tdm/pytest_i2s_tdm.py +++ b/examples/peripherals/i2s/i2s_basic/i2s_tdm/pytest_i2s_tdm.py @@ -7,6 +7,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.generic def test_i2s_tdm_example(dut: Dut) -> None: diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md index 08accf2674..ecae2313f1 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C3 | ESP32-S3 | -| ----------------- | -------- | -------- | +| Supported Targets | ESP32-C3 | ESP32-C6 | ESP32-S3 | +| ----------------- | -------- | -------- | -------- | # I2S TDM Example -- ES7210 4-Ch ADC Codec diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c index 15c855f916..b7b8cc01d3 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c @@ -30,7 +30,7 @@ #define EXAMPLE_SD_SPI_MOSI_IO (17) #define EXAMPLE_SD_SPI_MISO_IO (16) #define EXAMPLE_SD_SPI_CS_IO (15) -#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 +#else #define EXAMPLE_I2C_NUM (0) #define EXAMPLE_I2C_SDA_IO (3) #define EXAMPLE_I2C_SCL_IO (2) diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py index c6ca369f64..0dac05ea90 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/pytest_i2s_es7210_tdm.py @@ -6,6 +6,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s3 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.generic def test_i2s_es7210_tdm_example(dut: Dut) -> None: dut.expect_exact('example: Create I2S receive channel') diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es8311/README.md b/examples/peripherals/i2s/i2s_codec/i2s_es8311/README.md index 2700d91e58..8637600933 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es8311/README.md +++ b/examples/peripherals/i2s/i2s_codec/i2s_es8311/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | # I2S ES8311 Example @@ -25,7 +25,7 @@ For more details, see [ES8311 datasheet](http://www.everest-semi.com/pdf/ES8311% ### Hardware Required -* An ESP development board that support I2S. +* A development board with any supported Espressif SOC chip (see `Supported Targets` table above) * A USB cable for power supply and programming. * A board with ES8311 codec, mic and earphone interface(e.g. ESP-LyraT-8311A extension board). diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c b/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c index 6967df3b35..9311a85102 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c +++ b/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c @@ -15,12 +15,12 @@ /* I2C port and GPIOs */ #define I2C_NUM (0) -#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32H4 -#define I2C_SCL_IO (GPIO_NUM_6) -#define I2C_SDA_IO (GPIO_NUM_7) -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define I2C_SCL_IO (GPIO_NUM_16) #define I2C_SDA_IO (GPIO_NUM_17) +#else +#define I2C_SCL_IO (GPIO_NUM_6) +#define I2C_SDA_IO (GPIO_NUM_7) #endif /* I2S port and GPIOs */ @@ -28,12 +28,12 @@ #define I2S_MCK_IO (GPIO_NUM_0) #define I2S_BCK_IO (GPIO_NUM_4) #define I2S_WS_IO (GPIO_NUM_5) -#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32H4 -#define I2S_DO_IO (GPIO_NUM_2) -#define I2S_DI_IO (GPIO_NUM_3) -#else +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define I2S_DO_IO (GPIO_NUM_18) #define I2S_DI_IO (GPIO_NUM_19) +#else +#define I2S_DO_IO (GPIO_NUM_2) +#define I2S_DI_IO (GPIO_NUM_3) #endif /* Example configurations */ #define EXAMPLE_RECV_BUF_SIZE (2400) diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es8311/pytest_i2s_es8311.py b/examples/peripherals/i2s/i2s_codec/i2s_es8311/pytest_i2s_es8311.py index 19d6c36ac9..ed698e95e8 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es8311/pytest_i2s_es8311.py +++ b/examples/peripherals/i2s/i2s_codec/i2s_es8311/pytest_i2s_es8311.py @@ -9,6 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 @pytest.mark.generic def test_i2s_es8311_example_generic(dut: Dut) -> None: dut.expect('i2s es8311 codec example start')