[remote_base] Keep the rc_switch protocol table in flash on ESP8266

This commit is contained in:
J. Nick Koston
2026-09-10 20:10:23 -05:00
parent 89c222eb94
commit 48a92430db
@@ -65,11 +65,11 @@ class RCSwitchBase {
uint32_t zero_low_{};
uint32_t one_high_{};
uint32_t one_low_{};
bool inverted_{};
uint32_t inverted_{}; // bool widened so every field is a word: the table is read from flash
};
// Constant-initialized: no global constructor, and in flash on platforms that map .rodata there
inline constexpr RCSwitchBase RC_SWITCH_PROTOCOLS[] = {
// Constant-initialized and kept in flash on every platform; all fields are 32-bit so ESP8266 can read it in place
inline constexpr RCSwitchBase RC_SWITCH_PROTOCOLS[] PROGMEM = {
{0, 0, 0, 0, 0, 0, false},
{350, 10850, 350, 1050, 1050, 350, false},
{650, 6500, 650, 1300, 1300, 650, false},