From 4c03eda21ba2435a808e6a413fa1e0379c51520d Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Wed, 4 Dec 2024 09:36:24 +0100 Subject: [PATCH] ESP32 H2 PDM support --- examples/build-arch-log.txt | 1 + examples/build-arch.sh | 1 + src/AudioConfig.h | 1 + src/AudioTools/CoreAudio/AudioHttp/URLStream.h | 4 +--- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/build-arch-log.txt b/examples/build-arch-log.txt index 82b2ed0332..27c4eb941c 100644 --- a/examples/build-arch-log.txt +++ b/examples/build-arch-log.txt @@ -3,6 +3,7 @@ esp32:esp32:esp32c3 ./examples-stream/streams-generator-serial -> rc=0 esp32:esp32:esp32s3 ./examples-stream/streams-generator-serial -> rc=0 esp32:esp32:esp32s2 ./examples-stream/streams-generator-serial -> rc=0 esp32:esp32:esp32c6 ./examples-stream/streams-generator-serial -> rc=0 +esp32:esp32:esp32h2 ./examples-stream/streams-generator-serial -> rc=0 esp8266:esp8266:generic ./examples-stream/streams-generator-serial -> rc=0 rp2040:rp2040:generic ./examples-stream/streams-generator-serial -> rc=0 arduino:avr:nano ./examples-stream/streams-generator-serial -> rc=0 diff --git a/examples/build-arch.sh b/examples/build-arch.sh index ae5da052af..cafe93eaee 100755 --- a/examples/build-arch.sh +++ b/examples/build-arch.sh @@ -23,6 +23,7 @@ compile_example "esp32:esp32:esp32c3" compile_example "esp32:esp32:esp32s3" compile_example "esp32:esp32:esp32s2" compile_example "esp32:esp32:esp32c6" +compile_example "esp32:esp32:esp32h2" compile_example "esp8266:esp8266:generic" compile_example "rp2040:rp2040:generic" compile_example "arduino:avr:nano" diff --git a/src/AudioConfig.h b/src/AudioConfig.h index 961aca17ca..49b21a6c48 100644 --- a/src/AudioConfig.h +++ b/src/AudioConfig.h @@ -411,6 +411,7 @@ typedef uint32_t eps32_i2s_sample_rate_type; #define USE_TDM #define USE_PWM #define USE_I2S +#define USE_PDM #define USE_TYPETRAITS #define USE_EFFECTS_SUITE #define USE_TIMER diff --git a/src/AudioTools/CoreAudio/AudioHttp/URLStream.h b/src/AudioTools/CoreAudio/AudioHttp/URLStream.h index db901f85a0..1bc5eb2efc 100644 --- a/src/AudioTools/CoreAudio/AudioHttp/URLStream.h +++ b/src/AudioTools/CoreAudio/AudioHttp/URLStream.h @@ -320,14 +320,12 @@ class URLStream : public AbstractURLStream { client.setTimeout(clientTimeout / 1000); request.setTimeout(clientTimeout); -#ifdef USE_WIFI_CLIENT_SECURE +#if defined(ESP32) && defined(USE_WIFI_CLIENT_SECURE) // There is a bug in IDF 4! if (clientSecure != nullptr) { clientSecure->setHandshakeTimeout(handshakeTimeout); } -#endif -#ifdef ESP32 // Performance optimization for ESP32 if (!is_power_save) { esp_wifi_set_ps(WIFI_PS_NONE);