diff --git a/src/AudioOutputI2S.cpp b/src/AudioOutputI2S.cpp index 5894e294..0bfab14f 100644 --- a/src/AudioOutputI2S.cpp +++ b/src/AudioOutputI2S.cpp @@ -201,7 +201,11 @@ bool AudioOutputI2S::begin(bool txDAC) } else if (lsb_justified) { +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) + comm_fmt = (i2s_comm_format_t) I2S_COMM_FORMAT_STAND_MSB; +#else comm_fmt = (i2s_comm_format_t) (I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_LSB); +#endif } else { diff --git a/src/spiram-fast.h b/src/spiram-fast.h index ce568873..cd75d2de 100644 --- a/src/spiram-fast.h +++ b/src/spiram-fast.h @@ -332,9 +332,9 @@ class ESP8266SPIRAM { } digitalWrite(csPin, HIGH); - pinMode(sck, SPECIAL); - pinMode(miso, SPECIAL); - pinMode(mosi, SPECIAL); + pinMode(sck, OUTPUT); + pinMode(miso, INPUT); + pinMode(mosi, OUTPUT); pinMode(csPin, OUTPUT); // Enable streaming read/write mode @@ -364,4 +364,4 @@ class ESP8266SPIRAM { #endif // ESP32 -#endif \ No newline at end of file +#endif