FastLED
3.9.15
Loading...
Searching...
No Matches
arm_test.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
FastLED.h
"
4
5
void
arm_tests
() {
6
#ifndef FASTLED_ARM
7
#error "FASTLED_ARM should be defined for ARM platforms"
8
#endif
9
10
#if FASTLED_USE_PROGMEM != 0 && FASTLED_USE_PROGMEM != 1
11
#error "FASTLED_USE_PROGMEM should be either 0 or 1 for ARM platforms"
12
#endif
13
14
#if defined(ARDUINO_TEENSYLC) || defined(ARDUINO_TEENSY30) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(ARDUINO_ARCH_RENESAS_UNO) || defined(STM32F1)
15
// Teensy LC, Teensy 3.0, Teensy 3.1/3.2, Renesas UNO, and STM32F1 have limited memory
16
#if SKETCH_HAS_LOTS_OF_MEMORY != 0
17
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 0 for Teensy LC, Teensy 3.0, Teensy 3.1/3.2, Renesas UNO, and STM32F1"
18
#endif
19
#else
20
// Most other ARM platforms have lots of memory
21
#if SKETCH_HAS_LOTS_OF_MEMORY != 1
22
#error "SKETCH_HAS_LOTS_OF_MEMORY should be 1 for most ARM platforms"
23
#endif
24
#endif
25
26
#if FASTLED_ALLOW_INTERRUPTS != 1 && FASTLED_ALLOW_INTERRUPTS != 0
27
#error "FASTLED_ALLOW_INTERRUPTS should be either 0 or 1 for ARM platforms"
28
#endif
29
30
// Check that F_CPU is defined
31
#ifndef F_CPU
32
#error "F_CPU should be defined for ARM platforms"
33
#endif
34
35
// Specific ARM variant checks
36
#if defined(ARDUINO_ARCH_STM32) || defined(STM32F1)
37
#if FASTLED_ALLOW_INTERRUPTS != 0
38
#error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0"
39
#endif
40
#if FASTLED_USE_PROGMEM != 0
41
#error "STM32 platforms should have FASTLED_USE_PROGMEM set to 0"
42
#endif
43
#endif
44
45
#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO)
46
#if FASTLED_USE_PROGMEM != 0
47
#error "RP2040 platforms should have FASTLED_USE_PROGMEM set to 0"
48
#endif
49
#if FASTLED_ALLOW_INTERRUPTS != 1
50
#error "RP2040 platforms should have FASTLED_ALLOW_INTERRUPTS set to 1"
51
#endif
52
#ifdef FASTLED_FORCE_SOFTWARE_SPI
53
// RP2040 forces software SPI - this is expected
54
#endif
55
#endif
56
57
#if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)
58
// Teensy platforms that use PROGMEM
59
#if FASTLED_USE_PROGMEM != 1
60
#error "Teensy K20/K66/MXRT1062 platforms should have FASTLED_USE_PROGMEM set to 1"
61
#endif
62
#endif
63
64
#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_SAM_DUE)
65
#if FASTLED_USE_PROGMEM != 0
66
#error "SAMD/SAM platforms should have FASTLED_USE_PROGMEM set to 0"
67
#endif
68
#endif
69
70
#if defined(NRF52_SERIES) || defined(ARDUINO_ARCH_NRF52)
71
#if FASTLED_USE_PROGMEM != 0
72
#error "NRF52 platforms should have FASTLED_USE_PROGMEM set to 0"
73
#endif
74
#ifndef CLOCKLESS_FREQUENCY
75
#error "NRF52 should have CLOCKLESS_FREQUENCY defined"
76
#endif
77
#endif
78
}
FastLED.h
central include file for FastLED, defines the CFastLED class/object
arm_tests
void arm_tests()
Definition
arm_test.h:5
examples
CompileTest
arm_test.h
Generated on Fri Aug 22 2025 20:59:33 for FastLED by
1.13.2