Skip to content

Commit 10f48e0

Browse files
committed
cleanup esp32.h
1 parent 5c75fba commit 10f48e0

File tree

1 file changed

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

1 file changed

+13
-3
lines changed

src/AudioTools/PlatformConfig/esp32.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#pragma once
22

33
//-------ESP32---------
4+
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32)
5+
// the regular ESP32
6+
# define ESP32_CORE
7+
#endif
48
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32S2)
59
# define ESP32S2
610
# define ESP32X
@@ -38,6 +42,9 @@
3842
# define USE_PDM
3943
# define USE_PDM_RX
4044
#endif
45+
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32H2)
46+
# define ESP32H2
47+
#endif
4148

4249
//-------I2S Version -----------------------------------------------
4350
#ifndef USE_LEGACY_I2S
@@ -66,10 +73,13 @@
6673
# if !defined(I2S_USE_APLL)
6774
# define I2S_USE_APLL false
6875
# endif
76+
// use ESP_DSP library for ouput mixing
77+
//# define USE_ESP32_DSP
6978
#endif
7079

7180
// ----- Regular ESP32 -----
72-
#if defined(ESP32) && !defined(ESP32X) && !defined(CONFIG_IDF_TARGET_ESP32H2)
81+
#if defined(ESP32_CORE)
82+
7383
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 0 , 0)
7484
# define USE_INT24_FROM_INT
7585
# define USE_PDM
@@ -142,7 +152,7 @@ typedef uint32_t eps32_i2s_sample_rate_type;
142152

143153
//-------ESP32C3, ESP32S3, ESP32S2---------
144154

145-
#if defined(ESP32) && defined(ESP32X)
155+
#if defined(ESP32X)
146156
# ifdef ARDUINO
147157
# include "esp32-hal-log.h"
148158
# endif
@@ -200,7 +210,7 @@ typedef uint32_t eps32_i2s_sample_rate_type;
200210

201211
//-------ESP32H2---------
202212

203-
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32H2)
213+
#if defined(ESP32H2)
204214
#include "esp32-hal-log.h"
205215
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 0 , 0)
206216
# define USE_INT24_FROM_INT

0 commit comments

Comments
 (0)