compilation support for IDF4.4.3, plus compiling for ESP32-S3

- Updated ESP32 targets to use IDF 4.4.3 (thanks tasmota!)
- Fixed a compilation problem in ARTI (WLED_FS instead of LITTLEFS)

- Initial compilation support for ESP32-S3. Warning: there are still many problems to be solved before -S3 becomes usable!
- audioreactive: added #ifdef for features not yet supported on ESP32-S3
This commit is contained in:
Frank
2022-09-02 21:29:05 +02:00
parent 66d3802f0f
commit 4162d8fdfa
5 changed files with 112 additions and 12 deletions

View File

@@ -13,6 +13,11 @@
//#include <driver/i2s_pdm.h>
//#include <driver/gpio.h>
// see https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/chip-series-comparison.html#related-documents
// and https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/i2s.html#overview-of-all-modes
#if defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32S2)
#error This audio reactive usermod does not support the ESP32-C2 or ESP32-S2, because the device has too limited I2S capabilities
#endif
/* ToDo: remove. ES7243 is controlled via compiler defines
Until this configuration is moved to the webinterface
@@ -222,6 +227,9 @@ class I2SSource : public AudioSource {
protected:
void _routeMclk(int8_t mclkPin) {
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
// this way of MCLK routing only works on "classic" ESP32
/* Enable the mclk routing depending on the selected mclk pin
Only I2S_NUM_0 is supported
*/
@@ -235,6 +243,9 @@ class I2SSource : public AudioSource {
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0RXD_U, FUNC_U0RXD_CLK_OUT2);
WRITE_PERI_REG(PIN_CTRL, 0xFF00);
}
#else
#warning FIX ME!
#endif
}
i2s_config_t _config;
@@ -307,6 +318,9 @@ public:
int8_t pin_ES7243_SCL;
};
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
// ADC over I2S is only availeable in "claasic" ESP32
/* ADC over I2S Microphone
This microphone is an ADC pin sampled via the I2S interval
This allows to use the I2S API to obtain ADC samples with high sample rates
@@ -489,6 +503,7 @@ class I2SAdcSource : public I2SSource {
int8_t _audioPin;
int8_t _myADCchannel = 0x0F; // current ADC channel for analog input. 0x0F means "undefined"
};
#endif
/* SPH0645 Microphone
This is an I2S microphone with some timing quirks that need
@@ -502,7 +517,12 @@ class SPH0654 : public I2SSource {
void initialize(uint8_t i2swsPin, uint8_t i2ssdPin, uint8_t i2sckPin, int8_t = I2S_PIN_NO_CHANGE, int8_t = I2S_PIN_NO_CHANGE, int8_t = I2S_PIN_NO_CHANGE) {
I2SSource::initialize(i2swsPin, i2ssdPin, i2sckPin);
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
// these registers are only existing in "claasic" ESP32
REG_SET_BIT(I2S_TIMING_REG(I2S_NUM_0), BIT(9));
REG_SET_BIT(I2S_CONF_REG(I2S_NUM_0), I2S_RX_MSB_SHIFT);
#else
#warning FIX ME! Please.
#endif
}
};