mirror of
https://github.com/esphome/esphome.git
synced 2025-09-29 16:42:19 +01:00
Configurable Flash Write Interval (#2119)
Co-authored-by: Alex <33379584+alexyao2015@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -37,6 +37,14 @@ class ESPPreferences {
|
||||
public:
|
||||
virtual ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash) = 0;
|
||||
virtual ESPPreferenceObject make_preference(size_t length, uint32_t type) = 0;
|
||||
|
||||
/**
|
||||
* Commit pending writes to flash.
|
||||
*
|
||||
* @return true if write is successful.
|
||||
*/
|
||||
virtual bool sync() = 0;
|
||||
|
||||
#ifndef USE_ESP8266
|
||||
template<typename T, typename std::enable_if<std::is_trivially_copyable<T>::value, bool>::type = true>
|
||||
#else
|
||||
|
Reference in New Issue
Block a user