This commit is contained in:
Michael Miller
2024-10-09 20:08:18 -07:00
parent affce426c9
commit 42bd890d90
11 changed files with 33 additions and 67 deletions

View File

@@ -57,21 +57,29 @@ License along with NeoPixel. If not, see
#elif defined(ARDUINO_ARCH_ESP32) #elif defined(ARDUINO_ARCH_ESP32)
// once we have a core3 i2s, then fix this
#if !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2) #if !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32H2)
#include "methods/ESP/ESP32/Core_2_x/NeoEsp32I2sMethod.h" #include "methods/ESP/ESP32/Core_2_x/NeoEsp32I2sMethod.h"
#include "methods/ESP/ESP32/Core_2_x/NeoEsp32I2sXMethod.h"
#endif
#if ESP_IDF_VERSION_MAJOR < 5 #if ESP_IDF_VERSION_MAJOR < 5
#include "methods/ESP/ESP32/Core_2_x/NeoEsp32RmtMethod.h" #include "methods/ESP/ESP32/Core_2_x/NeoEsp32RmtMethod.h"
#else
#else // ! ESP_IDF_VERSION_MAJOR < 5
#if !defined(CONFIG_IDF_TARGET_ESP32C2) #if !defined(CONFIG_IDF_TARGET_ESP32C2)
#include "methods/ESP/ESP32/NeoEsp32RmtXMethod.h" // every other SOC #include "methods/ESP/ESP32/NeoEsp32RmtXMethod.h" // every other SOC
#else //CONFIG_IDF_TARGET_ESP32C2 #else //CONFIG_IDF_TARGET_ESP32C2
#include "methods/ESP/ESP32/NeoEsp32SpiMethod.h" // ESP32C2 #include "methods/ESP/ESP32/NeoEsp32SpiMethod.h" // ESP32C2
#endif //CONFIG_IDF_TARGET_ESP32C2 #endif //CONFIG_IDF_TARGET_ESP32C2
#endif // ESP_IDF_VERSION_MAJOR
#endif // ESP_IDF_VERSION_MAJOR < 5
#include "methods/ESP/ESP32/DotStarEsp32DmaSpiMethod.h" #include "methods/ESP/ESP32/DotStarEsp32DmaSpiMethod.h"
#include "methods/ESP/ESP32/Core_2_x/NeoEsp32I2sXMethod.h"
#include "methods/ESP/ESP32/NeoEsp32LcdXMethod.h" #include "methods/ESP/ESP32/NeoEsp32LcdXMethod.h"
#endif
#include "methods/ESP/NeoEspBitBangMethod.h" #include "methods/ESP/NeoEspBitBangMethod.h"

View File

@@ -29,7 +29,7 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "FractionClk.h" #include "../../../FractionClk.h"
#if ESP_IDF_VERSION_MAJOR>=4 #if ESP_IDF_VERSION_MAJOR>=4
#include "esp_intr_alloc.h" #include "esp_intr_alloc.h"

View File

@@ -26,8 +26,9 @@ License along with NeoPixel. If not, see
#pragma once #pragma once
// ESP32 C3 & S3 I2S is not supported yet due to significant changes to interface // ESP32 beyond C3 & S3 I2S is not supported yet
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3) // due to significant changes to interface
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32C63) && !defined(CONFIG_IDF_TARGET_ESP32H6)
extern "C" extern "C"

View File

@@ -134,8 +134,8 @@ public:
// If pins aren't specified, initialize bus with just the default SCK and MOSI pins for the SPI peripheral (no SS, no >1-bit pins) // If pins aren't specified, initialize bus with just the default SCK and MOSI pins for the SPI peripheral (no SS, no >1-bit pins)
void Initialize() void Initialize()
{ {
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3) #if SOC_SPI_PERIPH_NUM > 2
if (T_SPIBUS::SpiHostDevice == VSPI_HOST) if (T_SPIBUS::SpiHostDevice == SPI3_HOST)
{ {
Initialize(SCK, -1, MOSI, -1, -1, -1); Initialize(SCK, -1, MOSI, -1, -1, -1);
} }
@@ -304,19 +304,20 @@ typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi28BitBus> DotStarEsp
// SPI3 // SPI3
#if (defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3)) #if SOC_SPI_PERIPH_NUM > 2
typedef Esp32SpiBus<SPI3_HOST, WIDTH1> Esp32Spi3Bus; typedef Esp32SpiBus<SPI3_HOST, WIDTH1> Esp32Spi3Bus;
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi3Bus> DotStarEsp32DmaSpi3Method;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
typedef Esp32SpiBus<SPI3_HOST, WIDTH2> Esp32Spi32BitBus; typedef Esp32SpiBus<SPI3_HOST, WIDTH2> Esp32Spi32BitBus;
typedef Esp32SpiBus<SPI3_HOST, WIDTH4> Esp32Spi34BitBus; typedef Esp32SpiBus<SPI3_HOST, WIDTH4> Esp32Spi34BitBus;
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi3Bus> DotStarEsp32DmaSpi3Method;
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi32BitBus> DotStarEsp32DmaSpi32BitMethod; typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi32BitBus> DotStarEsp32DmaSpi32BitMethod;
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi34BitBus> DotStarEsp32DmaSpi34BitMethod; typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi34BitBus> DotStarEsp32DmaSpi34BitMethod;
#endif
#if defined(CONFIG_IDF_TARGET_ESP32S2) #endif
typedef Esp32SpiBus<SPI3_HOST, WIDTH1> Esp32Spi3Bus;
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi3Bus> DotStarEsp32DmaSpi3Method;
#endif #endif
// Default SpiDma methods if we don't care about bus. It's nice that every single ESP32 out there // Default SpiDma methods if we don't care about bus. It's nice that every single ESP32 out there

View File

@@ -42,7 +42,7 @@ extern "C"
#include <hal/gpio_hal.h> #include <hal/gpio_hal.h>
#include <hal/lcd_ll.h> #include <hal/lcd_ll.h>
#include <soc/lcd_cam_struct.h> #include <soc/lcd_cam_struct.h>
#include "FractionClk.h" #include "../../FractionClk.h"
} }
// //

View File

@@ -4,7 +4,7 @@ NeoPixel library helper functions for Esp32.
Written by Michael C. Miller. Written by Michael C. Miller.
I invest time and resources providing this open source code, I invest time and resources providing this open source code,
please support me by dontating (see https://github.com/Makuna/NeoPixelBus) please support me by donating (see https://github.com/Makuna/NeoPixelBus)
------------------------------------------------------------------------- -------------------------------------------------------------------------
This file is part of the Makuna/NeoPixelBus library. This file is part of the Makuna/NeoPixelBus library.

View File

@@ -4,7 +4,7 @@ NeoPixel library helper functions for Esp32.
Written by Michael C. Miller. Written by Michael C. Miller.
I invest time and resources providing this open source code, I invest time and resources providing this open source code,
please support me by dontating (see https://github.com/Makuna/NeoPixelBus) please support me by donating (see https://github.com/Makuna/NeoPixelBus)
------------------------------------------------------------------------- -------------------------------------------------------------------------
This file is part of the Makuna/NeoPixelBus library. This file is part of the Makuna/NeoPixelBus library.
@@ -282,7 +282,7 @@ public:
private: private:
const size_t _sizeData; // Size of '_data*' buffers const size_t _sizeData; // Size of '_data*' buffers
const uint8_t _pin; // output pin number const uint8_t _pin; // output pin rmt_channel_handle_t
rmt_transmit_config_t _tx_config = {}; rmt_transmit_config_t _tx_config = {};
rmt_encoder_handle_t _led_encoder = nullptr; rmt_encoder_handle_t _led_encoder = nullptr;
@@ -350,7 +350,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtInverted> NeoE
// Normally I2s method is the default, defining NEOPIXEL_ESP32_RMT_DEFAULT // Normally I2s method is the default, defining NEOPIXEL_ESP32_RMT_DEFAULT
// will switch to use RMT as the default method // will switch to use RMT as the default method
// The ESP32S2 & ESP32C3 will always default to RMT // The ESP32S2, ESP32S3, ESP32C3, ESP32C6 will allways default to RMT
typedef NeoEsp32RmtXWs2805Method NeoWs2805Method; typedef NeoEsp32RmtXWs2805Method NeoWs2805Method;
typedef NeoEsp32RmtXWs2811Method NeoWs2811Method; typedef NeoEsp32RmtXWs2811Method NeoWs2811Method;

View File

@@ -6,7 +6,7 @@ Adaption of Espressif's component library code by Christian Baars
Written by Michael C. Miller. Written by Michael C. Miller.
I invest time and resources providing this open source code, I invest time and resources providing this open source code,
please support me by dontating (see https://github.com/Makuna/NeoPixelBus) please support me by donating (see https://github.com/Makuna/NeoPixelBus)
------------------------------------------------------------------------- -------------------------------------------------------------------------
This file is not yet part of the Makuna/NeoPixelBus library. This file is not yet part of the Makuna/NeoPixelBus library.
@@ -30,11 +30,6 @@ License along with NeoPixel. If not, see
#if defined(ARDUINO_ARCH_ESP32) #if defined(ARDUINO_ARCH_ESP32)
#if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C6)) && !defined(HSPI_HOST)
// HSPI_HOST depreciated in C3
#define HSPI_HOST SPI2_HOST
#endif
#include <Arduino.h> #include <Arduino.h>
extern void AddLog(uint32_t loglevel, PGM_P formatP, ...); // TODO: Remove all Addlogs extern void AddLog(uint32_t loglevel, PGM_P formatP, ...); // TODO: Remove all Addlogs

View File

@@ -25,7 +25,7 @@ License along with NeoPixel. If not, see
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
#include <Arduino.h> #include <Arduino.h>
#include "../NeoUtil.h" #include "../../../NeoUtil.h"
#include "NeoEsp8266I2sMethodCore.h" #include "NeoEsp8266I2sMethodCore.h"
#ifdef ARDUINO_ARCH_ESP8266 #ifdef ARDUINO_ARCH_ESP8266

View File

@@ -120,7 +120,7 @@ bool IRAM_ATTR neoEspBitBangWriteSpacingPixels(const uint8_t* pixels,
setRegister = &GPIO.out_w1ts.val; setRegister = &GPIO.out_w1ts.val;
clearRegister = &GPIO.out_w1tc.val; clearRegister = &GPIO.out_w1tc.val;
} }
#if !defined(CONFIG_IDF_TARGET_ESP32C3) #if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32H2)
else else
{ {
setRegister = &GPIO.out1_w1ts.val; setRegister = &GPIO.out1_w1ts.val;

View File

@@ -360,45 +360,6 @@ typedef NeoEsp32BitBangWs2805InvertedMethod NeoEsp32BitBangWs2814InvertedNoIntrM
typedef NeoEsp32BitBangTm1814InvertedMethod NeoEsp32BitBangTm1914InvertedNoIntrMethod; typedef NeoEsp32BitBangTm1814InvertedMethod NeoEsp32BitBangTm1914InvertedNoIntrMethod;
typedef NeoEsp32BitBangSk6812InvertedMethod NeoEsp32BitBangLc8812InvertedNoIntrMethod; typedef NeoEsp32BitBangSk6812InvertedMethod NeoEsp32BitBangLc8812InvertedNoIntrMethod;
#if defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2)
//
// Esp32 C6 && H2 currently use BitBang as the default until other support
// is created, as they are not compatible with older generation chips
typedef NeoEsp32BitBangWs2812xMethod NeoWs2813Method;
typedef NeoEsp32BitBangWs2812xMethod NeoWs2812xMethod;
typedef NeoEsp32BitBang800KbpsMethod NeoWs2812Method;
typedef NeoEsp32BitBangWs2812xMethod NeoWs2811Method;
typedef NeoEsp32BitBangWs2812xMethod NeoWs2816Method;
typedef NeoEsp32BitBangWs2805Method NeoWs2805Method;
typedef NeoEsp32BitBangWs2814Method NeoWs2814Method;
typedef NeoEsp32BitBangSk6812Method NeoSk6812Method;
typedef NeoEsp32BitBangTm1814Method NeoTm1814Method;
typedef NeoEsp32BitBangTm1829Method NeoTm1829Method;
typedef NeoEsp32BitBangTm1914Method NeoTm1914Method;
typedef NeoEsp32BitBangSk6812Method NeoLc8812Method;
typedef NeoEsp32BitBangApa106Method NeoApa106Method;
typedef NeoEsp32BitBangWs2812xMethod Neo800KbpsMethod;
typedef NeoEsp32BitBang400KbpsMethod Neo400KbpsMethod;
typedef NeoEsp32BitBangWs2812xInvertedMethod NeoWs2813InvertedMethod;
typedef NeoEsp32BitBangWs2812xInvertedMethod NeoWs2812xInvertedMethod;
typedef NeoEsp32BitBangWs2812xInvertedMethod NeoWs2811InvertedMethod;
typedef NeoEsp32BitBangWs2812xInvertedMethod NeoWs2816InvertedMethod;
typedef NeoEsp32BitBangWs2805InvertedMethod NeoWs2805InvertedMethod;
typedef NeoEsp32BitBangWs2814InvertedMethod NeoWs2814InvertedMethod;
typedef NeoEsp32BitBang800KbpsInvertedMethod NeoWs2812InvertedMethod;
typedef NeoEsp32BitBangSk6812InvertedMethod NeoSk6812InvertedMethod;
typedef NeoEsp32BitBangTm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoEsp32BitBangTm1829InvertedMethod NeoTm1829InvertedMethod;
typedef NeoEsp32BitBangTm1914InvertedMethod NeoTm1914InvertedMethod;
typedef NeoEsp32BitBangSk6812InvertedMethod NeoLc8812InvertedMethod;
typedef NeoEsp32BitBangApa106InvertedMethod NeoApa106InvertedMethod;
typedef NeoEsp32BitBangWs2812xInvertedMethod Neo800KbpsInvertedMethod;
typedef NeoEsp32BitBang400KbpsInvertedMethod Neo400KbpsInvertedMethod;
#endif
#else // defined(ARDUINO_ARCH_ESP8266) #else // defined(ARDUINO_ARCH_ESP8266)
typedef NeoEspBitBangMethodBase<NeoEspBitBangSpeedWs2811, NeoEspNotInverted, true> NeoEsp8266BitBangWs2811Method; typedef NeoEspBitBangMethodBase<NeoEspBitBangSpeedWs2811, NeoEspNotInverted, true> NeoEsp8266BitBangWs2811Method;