FastLED 3.9.15
Loading...
Searching...
No Matches
wait_spin_budget.h File Reference

Detailed Description

Runtime-tunable microsecond spin budget for the channel-manager and driver wait loops (Phase 1 of #2815 / #2818).

The wait sites in fl/channels/manager.cpp.hpp and fl/channels/driver.cpp.hpp use a tiered structure: Tier 1 - instant non-blocking condition check Tier 2 - bounded microsecond spin (this budget) Tier 3 - cooperator yield, NetworkDetector-gated (added by #2817)

Tier 2 catches short DMA tails (APA102 small strips, WS2812B <=8 LEDs) without paying the FreeRTOS >=1 ms tick floor. Default 250 us. Set to 0 to disable the spin tier entirely.

Public-facing entry points live on CFastLED: FastLED.setWaitSpinBudgetUs(N) FastLED.getWaitSpinBudgetUs()

Definition in file wait_spin_budget.h.

#include "fl/stl/noexcept.h"
#include "fl/stl/stdint.h"
+ Include dependency graph for wait_spin_budget.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::detail
 Compile-time linker keep-alive hook for a single fl::Bus.
 

Functions

fl::u32 fl::detail::getWaitSpinBudgetUs () FL_NOEXCEPT
 Get the current tiered-wait spin budget (microseconds).
 
void fl::detail::setWaitSpinBudgetUs (fl::u32 budget_us) FL_NOEXCEPT
 Set the tiered-wait spin budget (microseconds).