Skip to content

Commit be8b8ef

Browse files
Clean ESP32 build (#529)
1 parent 9384bb0 commit be8b8ef

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/AudioOutputI2S.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ bool AudioOutputI2S::begin(bool txDAC)
201201
}
202202
else if (lsb_justified)
203203
{
204+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0)
205+
comm_fmt = (i2s_comm_format_t) I2S_COMM_FORMAT_STAND_MSB;
206+
#else
204207
comm_fmt = (i2s_comm_format_t) (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_LSB);
208+
#endif
205209
}
206210
else
207211
{

src/spiram-fast.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ class ESP8266SPIRAM {
332332
}
333333
digitalWrite(csPin, HIGH);
334334

335-
pinMode(sck, SPECIAL);
336-
pinMode(miso, SPECIAL);
337-
pinMode(mosi, SPECIAL);
335+
pinMode(sck, OUTPUT);
336+
pinMode(miso, INPUT);
337+
pinMode(mosi, OUTPUT);
338338
pinMode(csPin, OUTPUT);
339339

340340
// Enable streaming read/write mode
@@ -364,4 +364,4 @@ class ESP8266SPIRAM {
364364
#endif // ESP32
365365

366366

367-
#endif
367+
#endif

0 commit comments

Comments
 (0)