Skip to content

Commit 42b892d

Browse files
committed
ESP V3.0.0
1 parent abb74a1 commit 42b892d

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

src/ArdI2SOut.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "ArdI2SOut.h"
2-
#ifdef ARDI2SOUT_H
3-
#ifndef ESP32X
2+
#if defined(ARD_USE_I2S)
43

54
#include "ArdStkLogger.h"
65

@@ -61,5 +60,6 @@ void ArdI2SOut::write(int16_t value) {
6160

6261

6362
}; //STK
63+
6464
#endif
65-
#endif
65+

src/ArdI2SOut.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1+
#pragma once
12
#include "ArdConfig.h"
2-
#ifdef __I2S__
33

4-
#ifndef ARDI2SOUT_H
5-
#define ARDI2SOUT_H
64

75
#include "Stk.h"
86
#include "WvOut.h"
97
#include "ArdCommonOut.h"
108
#ifdef ESP32
11-
#include "driver/i2s.h"
9+
# include "esp_idf_version.h"
10+
# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0 , 0)
11+
# include "driver/i2s.h"
12+
# define ARD_USE_I2S
13+
# endif
1214
#endif
1315
#ifdef ESP8266
14-
#include "I2S.h"
16+
# include "I2S.h"
17+
# define ARD_USE_I2S
1518
#endif
1619

1720
#define SAMPLE_RATE ((int)stk::SRATE)
@@ -29,6 +32,8 @@
2932
# define ESP32X
3033
#endif
3134

35+
#ifdef ARD_USE_I2S
36+
3237
// Legacy support: We allow only the Standard ESP32
3338
#ifndef ESP32X
3439
# define I2S_BCK_IO (GPIO_NUM_13)
@@ -108,6 +113,7 @@ class ArdI2SOut: public ArdCommonOut {
108113
};
109114

110115
}; //stk
116+
111117
#endif
112118
#endif
113-
#endif
119+

0 commit comments

Comments
 (0)