static const uint32_t ENTER_SAFE_MODE_MAGIC
a magic number to indicate that safe mode should be entered on next boot
void set_safe_mode_pending(const bool &pending)
Set to true if the next startup will enter safe mode.
uint32_t safe_mode_boot_is_good_after_
The amount of time after which the boot is considered successful.
uint32_t safe_mode_rtc_value_
CallbackManager< void()> safe_mode_callback_
uint32_t safe_mode_start_time_
stores when safe mode was enabled
void add_on_safe_mode_callback(std::function< void()> &&callback)
bool should_enter_safe_mode(uint8_t num_attempts, uint32_t enable_time, uint32_t boot_is_good_after)
void on_safe_shutdown() override
void dump_config() override
float get_setup_priority() const override
bool boot_successful_
set to true after boot is considered successful
uint8_t safe_mode_num_attempts_
uint32_t safe_mode_enable_time_
The time safe mode should remain active for.
SafeModeComponent provides a safe way to recover from repeated boot failures.
Implementation of SPI Controller mode.
bool get_safe_mode_pending()
void write_rtc_(uint32_t val)