forked from Makuna/NeoPixelBus
c6 & h2
This commit is contained in:
@@ -57,21 +57,29 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#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)
|
||||
#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
|
||||
|
||||
#include "methods/ESP/ESP32/Core_2_x/NeoEsp32RmtMethod.h"
|
||||
#else
|
||||
|
||||
#else // ! ESP_IDF_VERSION_MAJOR < 5
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#include "methods/ESP/ESP32/NeoEsp32RmtXMethod.h" // every other SOC
|
||||
#else //CONFIG_IDF_TARGET_ESP32C2
|
||||
#include "methods/ESP/ESP32/NeoEsp32SpiMethod.h" // 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/Core_2_x/NeoEsp32I2sXMethod.h"
|
||||
#include "methods/ESP/ESP32/NeoEsp32LcdXMethod.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "methods/ESP/NeoEspBitBangMethod.h"
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "FractionClk.h"
|
||||
#include "../../../FractionClk.h"
|
||||
|
||||
#if ESP_IDF_VERSION_MAJOR>=4
|
||||
#include "esp_intr_alloc.h"
|
||||
|
@@ -26,8 +26,9 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#pragma once
|
||||
|
||||
// ESP32 C3 & S3 I2S is not supported yet due to significant changes to interface
|
||||
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
// ESP32 beyond C3 & S3 I2S is not supported yet
|
||||
// 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"
|
||||
|
@@ -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)
|
||||
void Initialize()
|
||||
{
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
if (T_SPIBUS::SpiHostDevice == VSPI_HOST)
|
||||
#if SOC_SPI_PERIPH_NUM > 2
|
||||
if (T_SPIBUS::SpiHostDevice == SPI3_HOST)
|
||||
{
|
||||
Initialize(SCK, -1, MOSI, -1, -1, -1);
|
||||
}
|
||||
@@ -304,19 +304,20 @@ typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi28BitBus> DotStarEsp
|
||||
|
||||
|
||||
// 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 DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi3Bus> DotStarEsp32DmaSpi3Method;
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
|
||||
typedef Esp32SpiBus<SPI3_HOST, WIDTH2> Esp32Spi32BitBus;
|
||||
typedef Esp32SpiBus<SPI3_HOST, WIDTH4> Esp32Spi34BitBus;
|
||||
|
||||
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi3Bus> DotStarEsp32DmaSpi3Method;
|
||||
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi32BitBus> DotStarEsp32DmaSpi32BitMethod;
|
||||
typedef DotStarEsp32DmaSpiMethodBase<SpiSpeed10Mhz, Esp32Spi34BitBus> DotStarEsp32DmaSpi34BitMethod;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
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
|
||||
|
@@ -42,7 +42,7 @@ extern "C"
|
||||
#include <hal/gpio_hal.h>
|
||||
#include <hal/lcd_ll.h>
|
||||
#include <soc/lcd_cam_struct.h>
|
||||
#include "FractionClk.h"
|
||||
#include "../../FractionClk.h"
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -4,7 +4,7 @@ NeoPixel library helper functions for Esp32.
|
||||
Written by Michael C. Miller.
|
||||
|
||||
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.
|
||||
|
@@ -4,7 +4,7 @@ NeoPixel library helper functions for Esp32.
|
||||
Written by Michael C. Miller.
|
||||
|
||||
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.
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
|
||||
private:
|
||||
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_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
|
||||
// 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 NeoEsp32RmtXWs2811Method NeoWs2811Method;
|
@@ -6,7 +6,7 @@ Adaption of Espressif's component library code by Christian Baars
|
||||
Written by Michael C. Miller.
|
||||
|
||||
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.
|
||||
@@ -30,11 +30,6 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#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>
|
||||
|
||||
extern void AddLog(uint32_t loglevel, PGM_P formatP, ...); // TODO: Remove all Addlogs
|
||||
|
@@ -25,7 +25,7 @@ License along with NeoPixel. If not, see
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "../NeoUtil.h"
|
||||
#include "../../../NeoUtil.h"
|
||||
#include "NeoEsp8266I2sMethodCore.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
|
@@ -120,7 +120,7 @@ bool IRAM_ATTR neoEspBitBangWriteSpacingPixels(const uint8_t* pixels,
|
||||
setRegister = &GPIO.out_w1ts.val;
|
||||
clearRegister = &GPIO.out_w1tc.val;
|
||||
}
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32H2)
|
||||
else
|
||||
{
|
||||
setRegister = &GPIO.out1_w1ts.val;
|
||||
|
@@ -360,45 +360,6 @@ typedef NeoEsp32BitBangWs2805InvertedMethod NeoEsp32BitBangWs2814InvertedNoIntrM
|
||||
typedef NeoEsp32BitBangTm1814InvertedMethod NeoEsp32BitBangTm1914InvertedNoIntrMethod;
|
||||
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)
|
||||
|
||||
typedef NeoEspBitBangMethodBase<NeoEspBitBangSpeedWs2811, NeoEspNotInverted, true> NeoEsp8266BitBangWs2811Method;
|
||||
|
Reference in New Issue
Block a user