File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
#include " ArdI2SOut.h"
2
- #ifdef ARDI2SOUT_H
3
- #ifndef ESP32X
2
+ #if defined(ARD_USE_I2S)
4
3
5
4
#include " ArdStkLogger.h"
6
5
@@ -61,5 +60,6 @@ void ArdI2SOut::write(int16_t value) {
61
60
62
61
63
62
}; // STK
63
+
64
64
#endif
65
- # endif
65
+
Original file line number Diff line number Diff line change
1
+ #pragma once
1
2
#include " ArdConfig.h"
2
- #ifdef __I2S__
3
3
4
- #ifndef ARDI2SOUT_H
5
- #define ARDI2SOUT_H
6
4
7
5
#include " Stk.h"
8
6
#include " WvOut.h"
9
7
#include " ArdCommonOut.h"
10
8
#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
12
14
#endif
13
15
#ifdef ESP8266
14
- #include " I2S.h"
16
+ # include " I2S.h"
17
+ # define ARD_USE_I2S
15
18
#endif
16
19
17
20
#define SAMPLE_RATE ((int )stk::SRATE)
29
32
# define ESP32X
30
33
#endif
31
34
35
+ #ifdef ARD_USE_I2S
36
+
32
37
// Legacy support: We allow only the Standard ESP32
33
38
#ifndef ESP32X
34
39
# define I2S_BCK_IO (GPIO_NUM_13)
@@ -108,6 +113,7 @@ class ArdI2SOut: public ArdCommonOut {
108
113
};
109
114
110
115
}; // stk
116
+
111
117
#endif
112
118
#endif
113
- # endif
119
+
You can’t perform that action at this time.
0 commit comments