imported from "final" folder

This commit is contained in:
2025-11-28 12:12:50 +01:00
parent f9288986cf
commit ff8e725b35
1061 changed files with 225150 additions and 96 deletions

View File

@@ -0,0 +1,26 @@
#pragma once
#include "FastLED.h"
void apollo3_tests() {
#if FASTLED_USE_PROGMEM != 0
#error "FASTLED_USE_PROGMEM should be 0 for Apollo3"
#endif
#if SKETCH_HAS_LOTS_OF_MEMORY != 1
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 1 for Apollo3"
#endif
#if FASTLED_ALLOW_INTERRUPTS != 1
#error "FASTLED_ALLOW_INTERRUPTS should be 1 for Apollo3"
#endif
#ifndef F_CPU
#error "F_CPU should be defined for Apollo3"
#endif
// Check that Apollo3-specific features are available
#ifndef APOLLO3
#warning "APOLLO3 macro not defined - this may indicate platform detection issues"
#endif
}

View File

@@ -0,0 +1,78 @@
#pragma once
#include "FastLED.h"
void arm_tests() {
#ifndef FASTLED_ARM
#error "FASTLED_ARM should be defined for ARM platforms"
#endif
#if FASTLED_USE_PROGMEM != 0 && FASTLED_USE_PROGMEM != 1
#error "FASTLED_USE_PROGMEM should be either 0 or 1 for ARM platforms"
#endif
#if defined(ARDUINO_TEENSYLC) || defined(ARDUINO_TEENSY30) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(ARDUINO_ARCH_RENESAS_UNO) || defined(STM32F1)
// Teensy LC, Teensy 3.0, Teensy 3.1/3.2, Renesas UNO, and STM32F1 have limited memory
#if SKETCH_HAS_LOTS_OF_MEMORY != 0
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 0 for Teensy LC, Teensy 3.0, Teensy 3.1/3.2, Renesas UNO, and STM32F1"
#endif
#else
// Most other ARM platforms have lots of memory
#if SKETCH_HAS_LOTS_OF_MEMORY != 1
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 1 for most ARM platforms"
#endif
#endif
#if FASTLED_ALLOW_INTERRUPTS != 1 && FASTLED_ALLOW_INTERRUPTS != 0
#error "FASTLED_ALLOW_INTERRUPTS should be either 0 or 1 for ARM platforms"
#endif
// Check that F_CPU is defined
#ifndef F_CPU
#error "F_CPU should be defined for ARM platforms"
#endif
// Specific ARM variant checks
#if defined(ARDUINO_ARCH_STM32) || defined(STM32F1)
#if FASTLED_ALLOW_INTERRUPTS != 0
#error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0"
#endif
#if FASTLED_USE_PROGMEM != 0
#error "STM32 platforms should have FASTLED_USE_PROGMEM set to 0"
#endif
#endif
#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO)
#if FASTLED_USE_PROGMEM != 0
#error "RP2040 platforms should have FASTLED_USE_PROGMEM set to 0"
#endif
#if FASTLED_ALLOW_INTERRUPTS != 1
#error "RP2040 platforms should have FASTLED_ALLOW_INTERRUPTS set to 1"
#endif
#ifdef FASTLED_FORCE_SOFTWARE_SPI
// RP2040 forces software SPI - this is expected
#endif
#endif
#if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)
// Teensy platforms that use PROGMEM
#if FASTLED_USE_PROGMEM != 1
#error "Teensy K20/K66/MXRT1062 platforms should have FASTLED_USE_PROGMEM set to 1"
#endif
#endif
#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_SAM_DUE)
#if FASTLED_USE_PROGMEM != 0
#error "SAMD/SAM platforms should have FASTLED_USE_PROGMEM set to 0"
#endif
#endif
#if defined(NRF52_SERIES) || defined(ARDUINO_ARCH_NRF52)
#if FASTLED_USE_PROGMEM != 0
#error "NRF52 platforms should have FASTLED_USE_PROGMEM set to 0"
#endif
#ifndef CLOCKLESS_FREQUENCY
#error "NRF52 should have CLOCKLESS_FREQUENCY defined"
#endif
#endif
}

View File

@@ -0,0 +1,40 @@
#pragma once
#include "FastLED.h"
void avr_tests() {
#if FASTLED_USE_PROGMEM != 1
#error "FASTLED_USE_PROGMEM should be 1 for AVR"
#endif
#if SKETCH_HAS_LOTS_OF_MEMORY != 0
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 0 for AVR"
#endif
#if FASTLED_ALLOW_INTERRUPTS != 0
#error "FASTLED_ALLOW_INTERRUPTS should be 0 for AVR (default)"
#endif
#ifndef FASTLED_AVR
#error "FASTLED_AVR should be defined for AVR platforms"
#endif
#ifndef F_CPU
#error "F_CPU should be defined for AVR platforms"
#endif
// AVR should have a reasonable F_CPU (typically 8MHz or 16MHz)
#if F_CPU < 1000000 || F_CPU > 32000000
#warning "AVR F_CPU seems unusual - check if this is expected"
#endif
// Check for Arduino environment on AVR
#ifndef ARDUINO
#warning "ARDUINO macro not defined - may not be in Arduino environment"
#endif
// AVR-specific assembly optimizations should be enabled
#ifndef QADD8_AVRASM
#warning "AVR assembly optimizations may not be enabled"
#endif
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include "FastLED.h"
void wasm_tests() {
#if FASTLED_USE_PROGMEM != 0
#error "FASTLED_USE_PROGMEM should be 0 for WASM"
#endif
#if SKETCH_HAS_LOTS_OF_MEMORY != 1
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 1 for WASM"
#endif
#if FASTLED_ALLOW_INTERRUPTS != 1
#error "FASTLED_ALLOW_INTERRUPTS should be 1 for WASM"
#endif
#ifndef F_CPU
#error "F_CPU should be defined for WASM"
#endif
// WASM should have a high F_CPU since it's not real hardware
#if F_CPU < 1000000
#error "WASM F_CPU should be reasonably high (not real hardware constraint)"
#endif
// Check WASM-specific defines
#ifndef FASTLED_STUB_IMPL
#error "FASTLED_STUB_IMPL should be defined for WASM"
#endif
#ifndef digitalPinToBitMask
#error "digitalPinToBitMask should be defined for WASM"
#endif
}