FastLED 3.10.8
Loading...
Searching...
No Matches

◆ setup()

void setup ( )

Definition at line 115 of file DriverTest.ino.

115 {
116 // Initialize serial communication
117 Serial.begin(115200);
118 delay(1000); // Allow time for serial monitor connection
119
120 Serial.println("SpecialDrivers/ESP/DriverTest setup starting");
121
122#if defined(FL_QEMU_VALIDATE_LCD_CLOCKLESS)
123 // Espressif QEMU does not model LCD_CAM transmit-completion interrupts.
124 // Validate the strongest supported behavior: link and register the real
125 // ESP32-S3 LCD clockless driver without requiring a private BusTraits
126 // header in this public example.
127 FastLED.enableAllDrivers();
128 bool lcdClocklessRegistered = false;
129 const auto drivers = FastLED.getDriverInfos();
130 for (fl::size i = 0; i < drivers.size(); ++i) {
131 if (fl::strcmp(drivers[i].name.c_str(), "LCD_CLOCKLESS") == 0) {
132 lcdClocklessRegistered = true;
133 break;
134 }
135 }
136 Serial.println(lcdClocklessRegistered
137 ? "QEMU_LCD_CLOCKLESS_REGISTRATION: PASS"
138 : "QEMU_LCD_CLOCKLESS_REGISTRATION: FAIL");
139 return;
140#endif
141
142 // Initialize FastLED with WS2812 strip
143 // The driver can be switched at runtime using setExclusiveDriver()
144 FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
145 FastLED.setBrightness(TEST_BRIGHTNESS);
146
147 // Create and run the test suite
149 runner.runAllTests();
150 runner.printSummary();
151}
CRGB leds[1]
#define NUM_LEDS
#define DATA_PIN
Definition ClientReal.h:82
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
#define TEST_BRIGHTNESS
Brightness level (0-255), 64 = 25% for safe testing.
Main test runner that orchestrates all driver tests.
Definition TestRunner.h:61
constexpr EOrder GRB
Definition eorder.h:19
void delay(u32 ms, bool run_async=true) FL_NO_EXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
FASTLED_FORCE_INLINE int strcmp(const char *s1, const char *s2) FL_NO_EXCEPT
Definition cstring.h:60
#define Serial
Definition serial.h:309

References DATA_PIN, FastLED, GRB, leds, NUM_LEDS, DriverTestRunner::printSummary(), DriverTestRunner::runAllTests(), Serial, fl::strcmp(), and TEST_BRIGHTNESS.

+ Here is the call graph for this function: