@@ -236,12 +236,6 @@ typedef WiFiClient WiFiClientSecure;
236
236
# define USE_PDM
237
237
# define USE_PDM_RX
238
238
#endif
239
- #if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32H2)
240
- # define ESP32H2
241
- # define ESP32X
242
- # define USE_TDM
243
- # define USE_PDM
244
- #endif
245
239
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32C6)
246
240
# define ESP32C6
247
241
# define ESP32X
@@ -273,7 +267,7 @@ typedef WiFiClient WiFiClientSecure;
273
267
#endif
274
268
275
269
// ----- Regular ESP32 -----
276
- #if defined(ESP32) && !defined(ESP32X)
270
+ #if defined(ESP32) && !defined(ESP32X) && !defined(CONFIG_IDF_TARGET_ESP32H2)
277
271
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 0 , 0)
278
272
# define USE_INT24_FROM_INT
279
273
#endif
@@ -347,7 +341,7 @@ typedef uint32_t eps32_i2s_sample_rate_type;
347
341
348
342
// -------ESP32C3, ESP32S3, ESP32S2---------
349
343
350
- #if defined(ESP32) && defined(ESP32X)
344
+ #if defined(ESP32) && defined(ESP32X)
351
345
#include " esp32-hal-log.h"
352
346
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 0 , 0)
353
347
# define USE_INT24_FROM_INT
@@ -404,6 +398,47 @@ typedef uint32_t eps32_i2s_sample_rate_type;
404
398
405
399
#endif
406
400
401
+ // -------ESP32H2---------
402
+
403
+ #if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32H2)
404
+ #include " esp32-hal-log.h"
405
+ # define ESP32H2
406
+ # define USE_TDM
407
+ #if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 0 , 0)
408
+ # define USE_INT24_FROM_INT
409
+ # define USE_ANALOG
410
+ #endif
411
+
412
+ #define USE_PWM
413
+ #define USE_I2S
414
+ #define USE_TYPETRAITS
415
+ #define USE_EFFECTS_SUITE
416
+ #define USE_TIMER
417
+ #define USE_STREAM_WRITE_OVERRIDE
418
+ #define USE_STREAM_READ_OVERRIDE
419
+ // support for psram -> set to true
420
+ #define USE_ALLOCATOR true
421
+ // #define USE_INITIALIZER_LIST
422
+
423
+ #define PWM_FREQENCY 30000
424
+ #define PIN_PWM_START 1
425
+ #define PIN_I2S_MCK -1
426
+ #define PIN_I2S_BCK 6
427
+ #define PIN_I2S_WS 7
428
+ #define PIN_I2S_DATA_OUT 8
429
+ #define PIN_I2S_DATA_IN 9
430
+ #define I2S_USE_APLL true
431
+ // Default Setting: The mute pin can be switched actovated by setting it to a gpio (e.g 5). Or you could drive the LED by assigning LED_BUILTIN
432
+ #define PIN_I2S_MUTE -1
433
+ #define SOFT_MUTE_VALUE 0
434
+ #define PIN_CS SS
435
+ #define PIN_ADC1 21
436
+ #define I2S_AUTO_CLEAR true
437
+
438
+ typedef uint32_t eps32_i2s_sample_rate_type;
439
+
440
+ #endif
441
+
407
442
408
443
// ----- ESP8266 -----------
409
444
#ifdef ESP8266
0 commit comments