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

◆ bootGuardOnBoot()

FL_ALWAYS_INLINE BootGuardDecision fl::bootGuardOnBoot ( fl::u32 stored_boots,
fl::u32 escape_boots )

Boot-guard policy.

stored_boots is the count read from the record; escape_boots is the threshold (0 disables escaping). On escape the count is zeroed, so the firmware flashed next starts fresh.

Definition at line 98 of file boot_guard_record.h.

99 {
101 const fl::u32 boots = stored_boots + 1;
102 d.escape = escape_boots != 0 && boots >= escape_boots;
103 d.boots = d.escape ? 0 : boots;
104 return d;
105}
fl::u32 boots
count to store before continuing
bool escape
reboot into the bootloader now
What the early-boot hook does on this boot.

References fl::BootGuardDecision::boots, fl::BootGuardDecision::escape, and FL_ALWAYS_INLINE.