mirror of
https://github.com/esphome/esphome.git
synced 2026-10-03 09:46:03 +00:00
[remote_base] Keep the rc_switch protocol table in flash on ESP8266
This commit is contained in:
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user