Skip to content

Commit 452c508

Browse files
committed
USE_LEGACY_I2S: based on idf version
1 parent a51f65e commit 452c508

File tree

1 file changed

+3
-1
lines changed
  • src/AudioTools/PlatformConfig

1 file changed

+3
-1
lines changed

src/AudioTools/PlatformConfig/esp32.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
#endif
4141

4242
//-------I2S Version -----------------------------------------------
43-
#define USE_LEGACY_I2S 0
43+
#ifndef USE_LEGACY_I2S
44+
# define USE_LEGACY_I2S (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0))
45+
#endif
4446

4547

4648
//-------Config for ESP32 families ---------

0 commit comments

Comments
 (0)