Revert "Remove I2C related code from ES8388 and ES7243 as blazoncek proposes …"

This commit is contained in:
netmindz
2023-08-11 20:59:34 +01:00
committed by GitHub
parent eecb0e700b
commit 0ccf2b9c2e
2 changed files with 68 additions and 6 deletions

View File

@@ -1623,7 +1623,7 @@ class AudioReactive : public Usermod {
//useInputFilter = 0; // in case you need to disable low-cut software filtering
audioSource = new ES7243(SAMPLE_RATE, BLOCK_SIZE);
delay(100);
if (audioSource) audioSource->initialize(i2swsPin, i2ssdPin, i2sckPin, mclkPin);
if (audioSource) audioSource->initialize(sdaPin, sclPin, i2swsPin, i2ssdPin, i2sckPin, mclkPin);
break;
case 3:
DEBUGSR_PRINT(F("AR: SPH0645 Microphone - ")); DEBUGSR_PRINTLN(F(I2S_MIC_CHANNEL_TEXT));
@@ -1659,7 +1659,7 @@ class AudioReactive : public Usermod {
audioSource = new ES8388Source(SAMPLE_RATE, BLOCK_SIZE, 1.0f);
//useInputFilter = 0; // to disable low-cut software filtering and restore previous behaviour
delay(100);
if (audioSource) audioSource->initialize(i2swsPin, i2ssdPin, i2sckPin, mclkPin);
if (audioSource) audioSource->initialize(sdaPin, sclPin, i2swsPin, i2ssdPin, i2sckPin, mclkPin);
break;
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)