mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
[ESP-IDF5.1] Fix build issue on older IDF based builds
This commit is contained in:
@@ -28,12 +28,12 @@ License along with NeoPixel. If not, see
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && ESP_IDF_VERSION_MAJOR < 5 && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#include "NeoSettings.h"
|
||||
#include "NeoBusChannel.h"
|
||||
#include "NeoEsp32RmtMethod.h"
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
|
||||
|
||||
// translate NeoPixelBuffer into RMT buffer
|
||||
// this is done on the fly so we don't require a send buffer in raw RMT format
|
||||
|
||||
@@ -29,7 +29,7 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && ESP_IDF_VERSION_MAJOR < 5 && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
|
||||
/* General Reference documentation for the APIs used in this implementation
|
||||
LOW LEVEL: (what is actually used)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5 && defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#include "../internal/NeoEsp32RmtMethod_idf5.h"
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
|
||||
|
||||
size_t rmt_encode_led_strip(rmt_encoder_t *encoder, rmt_channel_handle_t channel, const void *primary_data, size_t data_size, rmt_encode_state_t *ret_state)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && ESP_IDF_VERSION_MAJOR >= 5 && !defined(CONFIG_IDF_TARGET_ESP32C2)
|
||||
|
||||
/* General Reference documentation for the APIs used in this implementation
|
||||
LOW LEVEL: (what is actually used)
|
||||
@@ -367,9 +367,9 @@ class NeoEsp32RmtChannelN
|
||||
{
|
||||
public:
|
||||
NeoEsp32RmtChannelN(NeoBusChannel channel) :
|
||||
RmtChannelNumber(RmtChannelNumber)
|
||||
RmtChannelNumber(nullptr)
|
||||
{
|
||||
RmtChannelNumber = NULL;
|
||||
//RmtChannelNumber = NULL;
|
||||
};
|
||||
NeoEsp32RmtChannelN() = delete; // no default constructor
|
||||
rmt_channel_handle_t RmtChannelNumber = NULL;
|
||||
|
||||
@@ -28,7 +28,7 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
#if defined(ARDUINO_ARCH_ESP32) && ESP_IDF_VERSION_MAJOR >= 5
|
||||
|
||||
#if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C6)) && !defined(HSPI_HOST)
|
||||
// HSPI_HOST depreciated in C3
|
||||
@@ -37,7 +37,7 @@ License along with NeoPixel. If not, see
|
||||
|
||||
#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
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -329,7 +329,7 @@ public:
|
||||
_spi_strip->bytes_per_pixel = bytes_per_pixel;
|
||||
_spi_strip->strip_len = _pixelCount;
|
||||
|
||||
AddLog(2,"SPI:initialized with error code: %u on pin: %u",ret, _pin);
|
||||
// AddLog(2,"SPI:initialized with error code: %u on pin: %u",ret, _pin);
|
||||
return;
|
||||
err:
|
||||
if (_spi_strip) {
|
||||
@@ -341,7 +341,7 @@ public:
|
||||
}
|
||||
free(_spi_strip);
|
||||
}
|
||||
AddLog(2,"SPI-Error:initialized with error code: %u on pin: %u",ret, _pin);
|
||||
// AddLog(2,"SPI-Error:initialized with error code: %u on pin: %u",ret, _pin);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user