FastLED 3.10.10
Loading...
Searching...
No Matches
AutoResearchRemoteMemoryMethods.cpp
Go to the documentation of this file.
1// Request-scoped public-API memory benches (#3179 and #4733).
3
4#if FL_PLATFORM_HAS_LARGE_MEMORY && defined(FL_AUTORESEARCH_MEMORY_BENCH)
5
6#include <FastLED.h>
8#include "fl/remote/remote.h"
9#include "fl/stl/json.h"
10#include "fl/stl/vector.h"
11#include "fl/stl/singleton.h"
13#include "fl/system/heap.h"
14#include "fl/stl/chrono.h"
15
16#if FL_AUTORESEARCH_MEMORY_BENCH == 3
17#include "driver/spi_slave.h" // ok platform specific - a second native SPI peripheral is the independent wire receiver; no neutral core SPI-slave API exists.
18#include "driver/gpio.h" // ok platform specific - preserve master output while sampling its pads with SPI3.
19#include "esp_rom_gpio.h" // ok platform specific - SPI3 input initialization disconnects the existing SPI2 output matrix routes.
20#include "soc/gpio_sig_map.h" // ok platform specific - vendor-owned S3 signal IDs restore SPI2 output while preserving SPI3 input.
21#include "esp_heap_caps.h" // ok platform specific - measure and allocate the independent receiver's internal DMA storage.
22#include "esp_idf_version.h" // ok platform specific - local heap watermark measurement requires the current SDK API.
23#include "soc/soc_caps.h" // ok platform specific - verify that this target actually exposes SPI3.
24#endif
25
26namespace {
27
28int integerArg(const fl::json& args, const char* name, int fallback) {
29 return static_cast<int>(args[name].as_int().value_or(fallback));
30}
31
32#if FL_AUTORESEARCH_MEMORY_BENCH != 3
33fl::json bindingBench(const fl::json& args) {
35 const int pin = integerArg(args, "pin", 4);
38 // Hold the selected backend constant: the two builds differ only in
39 // whether registration retains the selected driver or every driver.
41 const fl::size heap_before = fl::getFreeHeap().free_sram;
42 const fl::size drivers_before = FastLED.getDriverCount();
43#if FL_AUTORESEARCH_MEMORY_BENCH == 1
44 auto channel = FastLED.add<fl::Bus::AUTO>(cfg);
45#else
46 auto channel = FastLED.add(cfg);
47#endif
48 const fl::size heap_registered = fl::getFreeHeap().free_sram;
49 const fl::size drivers_registered = FastLED.getDriverCount();
50 bool completed = channel != nullptr;
51 fl::size heap_first = heap_registered;
52 fl::size heap_steady = heap_registered;
53 for (int frame = 0; completed && frame < 20; ++frame) {
54 FastLED.show();
55 completed = FastLED.wait(1000);
56 if (frame == 0) heap_first = fl::getFreeHeap().free_sram;
57 if (frame == 2) heap_steady = fl::getFreeHeap().free_sram;
58 FastLED.watchdog().feed();
59 }
60 const fl::size heap_end = fl::getFreeHeap().free_sram;
61 const fl::string actual_driver = channel ? channel->getEngineName() : fl::string();
62 FastLED.remove(channel);
63 channel.reset();
64 const bool selected_drivers = FL_AUTORESEARCH_MEMORY_BENCH == 1
65 ? drivers_registered == 1 : drivers_registered > 0;
66 result.set("success", completed && drivers_before == 0 &&
67 selected_drivers && heap_steady == heap_end);
68 result.set("heapBefore", static_cast<int64_t>(heap_before));
69 result.set("heapAfterRegister", static_cast<int64_t>(heap_registered));
70 result.set("registrationBytes", static_cast<int64_t>(heap_before) - static_cast<int64_t>(heap_registered));
71 result.set("heapAfterFirst", static_cast<int64_t>(heap_first));
72 result.set("heapSteady", static_cast<int64_t>(heap_steady));
73 result.set("heapEnd", static_cast<int64_t>(heap_end));
74 result.set("driversBefore", static_cast<int64_t>(drivers_before));
75 result.set("driverCount", static_cast<int64_t>(drivers_registered));
76 result.set("selectedBus", static_cast<int>(cfg.options.mBus));
77 result.set("selectedBusName", fl::busName(cfg.options.mBus));
78 result.set("selectedDriverName", fl::busDriverName(cfg.options.mBus));
79 result.set("actualDriverName", actual_driver);
80 return result;
81}
82#endif
83
84#if FL_AUTORESEARCH_MEMORY_BENCH == 3
85
86FL_STATIC_ASSERT(SOC_SPI_PERIPH_NUM > 2, "SPI memory bench requires independent SPI2 and SPI3 peripherals"); // ok platform specific - require two real GP-SPI peripherals for independent TX/RX validation.
87
88// SPI3 samples the same physical MOSI/SCLK pads driven by SPI2, with input
89// enabled alongside output. CS is a bench-only GPIO held low over the WHOLE
90// frame, including every streamed chunk, then raised to finish the receiver.
91// ESP32-S3 SPI2/SPI3 exist in soc_caps.h (SOC_SPI_PERIPH_NUM == 3), and are
92// documented in the ESP32-S3 TRM "SPI Controller" chapter and the SDK SPI
93// Slave Driver guide. This measures SPI bits, rather than re-reading TX RAM.
94struct SpiWireReceiver {
95 fl::u8* bytes = nullptr;
96 spi_slave_transaction_t transaction = {};
97 bool initialized = false;
98 bool queued = false;
99 volatile bool armed = false;
100 const char* stage = "idle";
101 esp_err_t error = ESP_OK;
102
103 static void ready(spi_slave_transaction_t* transaction) {
104 static_cast<SpiWireReceiver*>(transaction->user)->armed = true;
105 }
106
107 bool begin(fl::size byte_count) {
108 stage = "allocateReceiver";
109 bytes = static_cast<fl::u8*>(heap_caps_malloc(byte_count + 4, MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL)); // ok platform specific - allocate SPI3 RX storage with the SDK DMA capability; the neutral heap API cannot request DMA memory.
110 if (!bytes) return false;
111 spi_bus_config_t bus = {};
112 bus.mosi_io_num = 1;
113 bus.miso_io_num = -1;
114 bus.sclk_io_num = 3;
115 bus.quadwp_io_num = -1;
116 bus.quadhd_io_num = -1;
117 bus.max_transfer_sz = static_cast<int>(byte_count + 4);
118 spi_slave_interface_config_t slave = {};
119 slave.spics_io_num = 4;
120 slave.queue_size = 1;
121 slave.mode = 0;
122 slave.post_setup_cb = &ready;
123 stage = "initializeReceiver";
124 error = spi_slave_initialize(SPI3_HOST, &bus, &slave, SPI_DMA_CH_AUTO); // ok platform specific - create the independent SPI3 wire receiver; there is no neutral SPI-slave API.
125 if (error != ESP_OK) return false;
126 initialized = true;
127 // Slave init enables its GPIO inputs but disables the pad outputs.
128 // Restore the already configured master output without changing its
129 // GPIO matrix signal, then retain input for independent SPI3 sampling.
130 gpio_set_direction(GPIO_NUM_1, GPIO_MODE_INPUT_OUTPUT); // ok platform specific - SPI3 input setup disabled the master MOSI output; retain input and output on the shared pad.
131 gpio_set_direction(GPIO_NUM_3, GPIO_MODE_INPUT_OUTPUT); // ok platform specific - SPI3 input setup disabled the master clock output; retain input and output on the shared pad.
132 gpio_set_direction(GPIO_NUM_4, GPIO_MODE_INPUT_OUTPUT); // ok platform specific - sample the software-controlled frame-wide CS through the same pad.
133 // SPI slave bus initialization routes these pads as inputs, replacing
134 // their output selections with SIG_GPIO_OUT_IDX. Output-enable alone
135 // does not reconnect the master. S3 gpio_sig_map.h names SPI2's data
136 // and clock FSPID_OUT_IDX/FSPICLK_OUT_IDX (103/101); SPI3 has separate
137 // input selectors, so both peripherals can observe the same pads.
138 esp_rom_gpio_connect_out_signal(1, FSPID_OUT_IDX, false, false); // ok platform specific - restore the measured SPI2 MOSI pad.
139 esp_rom_gpio_connect_out_signal(3, FSPICLK_OUT_IDX, false, false); // ok platform specific - restore the measured SPI2 clock pad.
140 esp_rom_gpio_connect_out_signal(4, SIG_GPIO_OUT_IDX, false, false); // ok platform specific - software GPIO owns the frame-wide slave CS.
141 esp_rom_gpio_connect_in_signal(1, SPI3_D_IN_IDX, false); // ok platform specific - independently sample SPI2 data through SPI3.
142 esp_rom_gpio_connect_in_signal(3, SPI3_CLK_IN_IDX, false); // ok platform specific - independently sample SPI2 clock through SPI3.
143 esp_rom_gpio_connect_in_signal(4, SPI3_CS0_IN_IDX, false); // ok platform specific - slave frame ends only on software CS rising.
144 gpio_set_level(GPIO_NUM_4, 1); // ok platform specific - deassert the independent SPI3 receiver CS without changing the measured master API.
145 transaction.length = (byte_count + 4) * 8;
146 transaction.rx_buffer = bytes;
147 transaction.user = this;
148 return true;
149 }
150
151 bool arm() {
152 stage = "queueReceiver";
153 armed = false;
154 transaction.trans_len = 0;
155 error = spi_slave_queue_trans(SPI3_HOST, &transaction, 0); // ok platform specific - arm an independent DMA wire capture; the neutral channel RX API cannot capture clocked SPI.
156 if (error != ESP_OK) return false;
157 queued = true;
158 const fl::u32 started = fl::micros();
159 stage = "waitReceiverArmed";
160 while (!armed && fl::micros() - started < 1000000u) {}
161 if (!armed) { error = ESP_ERR_TIMEOUT; return false; }
162 stage = "capture";
163 gpio_set_level(GPIO_NUM_4, 0); // ok platform specific - assert independent SPI3 receiver CS over the entire streamed frame.
164 return true;
165 }
166
167 bool finish() {
168 stage = "drainReceiver";
169 gpio_set_level(GPIO_NUM_4, 1); // ok platform specific - deassert the independent SPI3 receiver CS without changing the measured master API.
170 spi_slave_transaction_t* completed = nullptr;
171 error = spi_slave_get_trans_result(SPI3_HOST, &completed, pdMS_TO_TICKS(1000)); // ok platform specific - drain the independent SPI3 receiver before checking captured bytes.
172 if (error != ESP_OK) return false;
173 queued = false;
174 stage = "captured";
175 return completed == &transaction;
176 }
177
178 void close() {
179 // On timeout the singleton retains the descriptor and DMA buffer until
180 // board reset. Return diagnostics instead of freeing SDK-owned memory.
181 if (queued) return;
182 if (initialized) spi_slave_free(SPI3_HOST); // ok platform specific - release only the independent receiver peripheral after its DMA transaction drains.
183 heap_caps_free(bytes); // ok platform specific - return SPI3 RX storage to the same SDK allocator that supplied it.
184 bytes = nullptr;
185 initialized = false;
186 }
187};
188
189fl::json spiBench(const fl::json& args) {
191 static bool already_run = false;
192 if (already_run) {
193 result.set("success", false);
194 result.set("error", "ResetBoardBeforeNextBench");
195 return result;
196 }
197 const int pixels = integerArg(args, "pixels", 1000);
198 const int frames = integerArg(args, "frames", 20);
199 const fl::string chipset = args["chipset"].as_string().value_or("apa102");
200 if (pixels < 1 || pixels > 2048 || frames < 3 || frames > 100 ||
201 (chipset != "apa102" && chipset != "sk9822")) {
202 result.set("success", false);
203 result.set("error", "InvalidBenchArguments");
204 return result;
205 }
206 already_run = true;
207 // The registered legacy controller retains the array through firmware
208 // lifetime. Static ownership avoids the common bench stack-pointer bug.
209 static fl::vector<CRGB> leds;
210 leds.resize(pixels);
211 for (int i = 0; i < pixels; ++i) leds[i] = CRGB(255, static_cast<fl::u8>(i * 13 + 2), static_cast<fl::u8>(i * 7 + 3));
212 const fl::size heap_before = fl::getFreeHeap().free_sram;
213 if (chipset == "apa102") {
214 FastLED.addLeds<APA102, 1, 3, RGB, DATA_RATE_MHZ(6)>(leds.data(), pixels, fl::Esp32SpiBus::HOST2); // ok platform specific - the independent receiver requires this physical native SPI host; no neutral host selector exists.
215 } else {
216 FastLED.addLeds<SK9822, 1, 3, RGB, DATA_RATE_MHZ(6)>(leds.data(), pixels, fl::Esp32SpiBus::HOST2); // ok platform specific - the independent receiver requires this physical native SPI host; no neutral host selector exists.
217 }
218 FastLED.setBrightness(255);
219 FastLED.setDither(0);
220 FastLED.setCorrection(CRGB(255, 255, 255));
221 FastLED.setTemperature(CRGB(255, 255, 255));
222 const fl::size heap_registered = fl::getFreeHeap().free_sram;
223#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) // ok platform specific - scoped heap-watermark APIs are available in this validated IDF range, with no neutral equivalent.
224 const fl::size prime_before = heap_caps_get_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); // ok platform specific - sample internal byte-addressable heap with the same capability mask as the scoped watermark.
225 heap_caps_monitor_local_minimum_free_size_start(); // ok platform specific - start a scoped allocation watermark instead of inheriting boot-time lows; no neutral API exists.
226#endif
227 FastLED.show();
228 const bool prime_completed = FastLED.wait(1000);
229#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) // ok platform specific - scoped heap-watermark APIs are available in this validated IDF range, with no neutral equivalent.
230 const fl::size prime_low = heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); // ok platform specific - read the scoped internal-byte heap watermark using the pre-transfer capability mask.
231 heap_caps_monitor_local_minimum_free_size_stop(); // ok platform specific - end the SDK-local watermark window before unrelated RPC result allocations.
232#endif
233 const fl::size heap_prime = fl::getFreeHeap().free_sram;
234 if (!prime_completed) {
235 result.set("success", false);
236 result.set("error", "PrimeFailed");
237 return result;
238 }
239 const fl::size frame_bytes = 4 + 4 * pixels + 4 * (pixels / 32 + 1);
240 SpiWireReceiver& receiver = fl::Singleton<SpiWireReceiver>::instance();
241 if (!receiver.begin(frame_bytes)) {
242 result.set("success", false);
243 result.set("error", "Spi3ReceiverInitFailed");
244 result.set("stage", receiver.stage);
245 result.set("sdkError", static_cast<int>(receiver.error));
246 receiver.close();
247 return result;
248 }
249 fl::vector<fl::u32> timings;
250 timings.reserve(frames);
251 fl::vector<fl::u32> captured_bits;
252 captured_bits.reserve(frames);
253 bool completed = true;
254 fl::size mismatches = 0;
255 fl::size heap_steady = 0;
256 fl::size heap_end = 0;
257 fl::size peak_internal_bytes = 0;
258 fl::size peak_dma_bytes = 0;
259 fl::size first_bad_offset = frame_bytes;
260 int first_expected = -1;
261 int first_actual = -1;
262 fl::size min_captured_bits = frame_bytes * 8;
263 fl::size max_captured_bits = 0;
264 for (int frame = 0; frame < frames && completed; ++frame) {
265 // Change every payload across frames so a stale staging refill fails.
266 for (int i = 0; i < pixels; ++i) leds[i] = CRGB(255, static_cast<fl::u8>(i * 13 + frame), static_cast<fl::u8>(i * 7 + frame * 3));
267 if (!receiver.arm()) { completed = false; break; }
268#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) // ok platform specific - scoped heap-watermark APIs are available in this validated IDF range, with no neutral equivalent.
269 const fl::size before_internal = heap_caps_get_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); // ok platform specific - sample internal byte-addressable heap with the same capability mask as the scoped watermark.
270 const fl::size before_dma = heap_caps_get_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA); // ok platform specific - sample internal DMA-capable heap separately from general SRAM.
271 if (heap_caps_monitor_local_minimum_free_size_start() != ESP_OK) { completed = false; break; } // ok platform specific - start a scoped allocation watermark instead of inheriting boot-time lows; no neutral API exists.
272#endif
273 const fl::u32 started = fl::micros();
274 FastLED.show();
275 completed = FastLED.wait(1000);
276 const fl::u32 elapsed = fl::micros() - started;
277#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) // ok platform specific - scoped heap-watermark APIs are available in this validated IDF range, with no neutral equivalent.
278 const fl::size low_internal = heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); // ok platform specific - read the scoped internal-byte heap watermark using the pre-transfer capability mask.
279 const fl::size low_dma = heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA); // ok platform specific - read the scoped internal-DMA heap watermark using the pre-transfer capability mask.
280 heap_caps_monitor_local_minimum_free_size_stop(); // ok platform specific - end the SDK-local watermark window before unrelated RPC result allocations.
281 if (before_internal >= low_internal && before_internal - low_internal > peak_internal_bytes) peak_internal_bytes = before_internal - low_internal;
282 if (before_dma >= low_dma && before_dma - low_dma > peak_dma_bytes) peak_dma_bytes = before_dma - low_dma;
283#endif
284 completed = receiver.finish() && completed;
285 if (!completed) break;
286 const fl::size received_bits = receiver.transaction.trans_len;
287 captured_bits.push_back(static_cast<fl::u32>(received_bits));
288 if (received_bits < min_captured_bits) min_captured_bits = received_bits;
289 if (received_bits > max_captured_bits) max_captured_bits = received_bits;
290 const fl::size received_bytes = received_bits / 8 < frame_bytes
291 ? received_bits / 8 : frame_bytes;
292 mismatches += received_bits != frame_bytes * 8;
293 // Never treat untouched receiver storage as captured data. A missing
294 // frame is a length failure with actual=-1, not a random byte mismatch.
295 if (received_bytes < frame_bytes && first_bad_offset == frame_bytes) {
296 first_bad_offset = received_bytes;
297 }
298 for (fl::size offset = 0; offset < received_bytes; ++offset) {
299 fl::u8 expected = 0xFF;
300 if (offset < 4) expected = 0;
301 else if (offset < 4 + 4 * pixels) {
302 const fl::size pixel = (offset - 4) / 4;
303 const fl::size component = (offset - 4) % 4;
304 if (component != 0) expected = leds[pixel].raw[component - 1];
305 }
306 if (receiver.bytes[offset] != expected) {
307 ++mismatches;
308 if (first_bad_offset == frame_bytes) {
309 first_bad_offset = offset;
310 first_expected = expected;
311 first_actual = receiver.bytes[offset];
312 }
313 }
314 }
315 timings.push_back(elapsed);
316 heap_end = fl::getFreeHeap().free_sram;
317 if (frame == 2) heap_steady = heap_end;
318 FastLED.watchdog().feed();
319 }
320 result.set("success", completed && mismatches == 0 && heap_steady == heap_end);
321 result.set("chipset", chipset);
322 result.set("pixels", pixels);
323 result.set("frames", static_cast<int64_t>(timings.size()));
324 result.set("frameBytes", static_cast<int64_t>(frame_bytes));
325 result.set("wireMismatches", static_cast<int64_t>(mismatches));
326 result.set("stage", receiver.stage);
327 result.set("sdkError", static_cast<int>(receiver.error));
328 result.set("capturedBits", static_cast<int64_t>(receiver.transaction.trans_len));
329 result.set("minCapturedBits", static_cast<int64_t>(min_captured_bits));
330 result.set("maxCapturedBits", static_cast<int64_t>(max_captured_bits));
331 result.set("firstBadOffset", first_bad_offset == frame_bytes ? -1 : static_cast<int64_t>(first_bad_offset));
332 result.set("firstExpected", first_expected);
333 result.set("firstActual", first_actual);
334 result.set("heapBefore", static_cast<int64_t>(heap_before));
335 result.set("heapAfterRegister", static_cast<int64_t>(heap_registered));
336 result.set("heapAfterPrime", static_cast<int64_t>(heap_prime));
337#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0) // ok platform specific - scoped heap-watermark APIs are available in this validated IDF range, with no neutral equivalent.
338 result.set("primeBeforeInternal", static_cast<int64_t>(prime_before));
339 result.set("primeLowInternal", static_cast<int64_t>(prime_low));
340 result.set("primePeakInternalBytes", prime_before >= prime_low ? static_cast<int64_t>(prime_before - prime_low) : 0);
341#endif
342 result.set("heapSteady", static_cast<int64_t>(heap_steady));
343 result.set("heapEnd", static_cast<int64_t>(heap_end));
344 result.set("peakInternalBytes", static_cast<int64_t>(peak_internal_bytes));
345 result.set("peakDmaBytes", static_cast<int64_t>(peak_dma_bytes));
346 result.set("heapWatermarkMeasured", ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)); // ok platform specific - report whether the SDK-specific scoped-watermark path was compiled.
347 fl::json times = fl::json::array();
348 for (const fl::u32 us : timings) times.push_back(static_cast<int64_t>(us));
349 result.set("frameUs", times);
350 fl::json bit_counts = fl::json::array();
351 for (const fl::u32 bits : captured_bits) bit_counts.push_back(static_cast<int64_t>(bits));
352 result.set("frameBits", bit_counts);
353 receiver.close();
354 return result;
355}
356#endif
357
358} // namespace
359
360void bindMemoryBench(fl::Remote& remote) {
361 remote.bind("memoryBench", [](const fl::json& args) -> fl::json {
362#if FL_AUTORESEARCH_MEMORY_BENCH == 3
363 fl::json result = spiBench(args);
364#else
365 fl::json result = bindingBench(args);
366#endif
367 result.set("mode", FL_AUTORESEARCH_MEMORY_BENCH);
368 return result;
369 });
370}
371
372#endif
CRGB leds[1]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
@ SK9822
SK9822 LED chipset.
Definition FastLED.h:302
@ APA102
APA102 LED chipset.
Definition FastLED.h:301
fl::unique_ptr< fl::Remote > remote
Definition RpcClient.ino:43
FastLED chrono implementation - duration types for time measurements.
JSON-RPC server with scheduling support.
Definition remote.h:42
static T & instance() FL_NO_EXCEPT
Definition singleton.h:41
void push_back(const json &value) FL_NO_EXCEPT
Definition json.h:925
static json object() FL_NO_EXCEPT
Definition json.h:864
static json array() FL_NO_EXCEPT
Definition json.h:860
fl::size size() const FL_NO_EXCEPT
void reserve(fl::size n) FL_NO_EXCEPT
Definition vector.h:591
void push_back(const T &value) FL_NO_EXCEPT
Definition vector.h:624
fl::UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f)
constexpr EOrder RGB
Definition eorder.h:17
#define DATA_RATE_MHZ
Definition fastspi.h:95
fl::CRGB CRGB
Definition crgb.h:25
Platform-abstracted heap memory query functions.
FastLED's Elegant JSON Library: fl::json
constexpr T * begin(T(&array)[N]) FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:132
const char * busName(Bus b, fl::u8 which=0) FL_NO_EXCEPT
Definition bus.h:176
fl::u32 micros() FL_NO_EXCEPT
Universal microsecond timer - returns microseconds since system startup.
const char * busDriverName(Bus b, fl::u8 which=0, bool spi=false) FL_NO_EXCEPT
Concrete ChannelManager driver name for a portable bus.
Definition bus.h:193
@ AUTO
Definition bus.h:32
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31
HeapInfo getFreeHeap() FL_NO_EXCEPT
Query available heap memory.
Definition heap.cpp.hpp:68
constexpr ClocklessChipset makeClockless(int pin) FL_NO_EXCEPT
Build a ClocklessChipset from a compile-time TIMING trait.
Definition config.h:95
corkscrew_args args
Definition old.h:149
#define FL_STATIC_ASSERT(...)
Portable compile-time assertion wrapper.
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:629
Configuration for a single LED channel.
Definition config.h:167
fl::size free_sram
Free SRAM in bytes (internal fast memory)
Definition heap.h:18