- getPixelColor() for analog
- RMT channel (#3922)
This commit is contained in:
Blaz Kristan
2024-04-26 20:07:27 +02:00
parent b3acc97d03
commit 886120fe9f
2 changed files with 21 additions and 1 deletions

View File

@@ -496,6 +496,11 @@ class PolyBus {
}
static void* create(uint8_t busType, uint8_t* pins, uint16_t len, uint8_t channel, uint16_t clock_kHz = 0U) {
#if defined(ARDUINO_ARCH_ESP32) && !(defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3))
// NOTE: "channel" is only used on ESP32 (and its variants) for RMT channel allocation
// since 0.15.0-b3 I2S1 is favoured for classic ESP32 and moved to position 0 (channel 0) so we need to subtract 1 for correct RMT allocation
if (channel > 1) channel--; // accommodate I2S1 which is used as 1st bus on classic ESP32
#endif
void* busPtr = nullptr;
switch (busType) {
case I_NONE: break;