Hacked a makefile issue ( Define ESP32 ) which should have been

done a better way.
This commit is contained in:
Brian Bulkowski
2020-02-14 09:07:26 -08:00
parent 3fa53e6d49
commit e64b06f03f
6 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.5)
set(srcs
"FastLED.cpp"
"bitswap.cpp"
"colorpalettes.cpp"
"colorutils.cpp"
"hsv2rgb.cpp"
"lib8tion.cpp"
"noise.cpp"
"platforms.cpp"
"power_mgt.cpp"
"wiring.cpp")
# everything needs the ESP32 flag, not sure why this won't work
# going to hack by adding the ESP32 define in the h file
#`target_compile_options(${COMPONENT_LIB} PRIVATE "-DESP32")
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "." )

View File

@ -4,6 +4,9 @@
///@file FastLED.h
/// central include file for FastLED, defines the CFastLED class/object
// BB hack
#define ESP32
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
#define FASTLED_HAS_PRAGMA_MESSAGE
#endif

View File

@ -0,0 +1,10 @@
menu "Fast LED"
config FAST_LED_TEST
bool "Create a Fast LED option in case I need to later"
default n
help
I don't know if I'm going to have to add menuconfig options in the future.
Maybe I will. If I do, this is the template for doing it.
endmenu

View File

@ -1 +1,3 @@
COMPONENT_SRCDIRS := .
COMPONENT_ADD_INCLUDEDIRS := .
COMPONENT_PRIV_INCLUDEDIRS := lib8tion platforms/esp/32

View File

@ -1,6 +1,8 @@
#ifndef __INC_PLATFORMS_H
#define __INC_PLATFORMS_H
#define ESP32
#include "FastLED.h"
#include "fastled_config.h"

View File

@ -518,6 +518,7 @@ CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=64
CONFIG_WPA_MBEDTLS_CRYPTO=y
# CONFIG_FAST_LED_TEST is not set
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
# Deprecated options for backward compatibility