ESPHome  1.15.2
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::ESPPreferenceObject Class Reference

#include <preferences.h>

Public Member Functions

 ESPPreferenceObject ()
 
 ESPPreferenceObject (size_t offset, size_t length, uint32_t type)
 
template<typename T >
bool save (T *src)
 
template<typename T >
bool load (T *dest)
 
bool is_initialized () const
 

Protected Member Functions

bool save_ ()
 
bool load_ ()
 
bool save_internal_ ()
 
bool load_internal_ ()
 
uint32_t calculate_crc_ () const
 

Protected Attributes

size_t offset_
 
size_t length_words_
 
uint32_t type_
 
uint32_t * data_
 
bool in_flash_ {false}
 

Detailed Description

Definition at line 10 of file preferences.h.

Constructor & Destructor Documentation

◆ ESPPreferenceObject() [1/2]

esphome::ESPPreferenceObject::ESPPreferenceObject ( )

Definition at line 20 of file preferences.cpp.

◆ ESPPreferenceObject() [2/2]

esphome::ESPPreferenceObject::ESPPreferenceObject ( size_t  offset,
size_t  length,
uint32_t  type 
)

Definition at line 21 of file preferences.cpp.

Member Function Documentation

◆ calculate_crc_()

uint32_t esphome::ESPPreferenceObject::calculate_crc_ ( ) const
protected

Definition at line 297 of file preferences.cpp.

◆ is_initialized()

bool esphome::ESPPreferenceObject::is_initialized ( ) const

Definition at line 304 of file preferences.cpp.

◆ load()

template<typename T >
bool esphome::ESPPreferenceObject::load ( T *  dest)

Definition at line 100 of file preferences.h.

◆ load_()

bool esphome::ESPPreferenceObject::load_ ( )
protected

Definition at line 27 of file preferences.cpp.

◆ load_internal_()

bool esphome::ESPPreferenceObject::load_internal_ ( )
protected

Definition at line 151 of file preferences.cpp.

◆ save()

template<typename T >
bool esphome::ESPPreferenceObject::save ( T *  src)

Definition at line 92 of file preferences.h.

◆ save_()

bool esphome::ESPPreferenceObject::save_ ( )
protected

Definition at line 41 of file preferences.cpp.

◆ save_internal_()

bool esphome::ESPPreferenceObject::save_internal_ ( )
protected

Definition at line 128 of file preferences.cpp.

Field Documentation

◆ data_

uint32_t* esphome::ESPPreferenceObject::data_
protected

Definition at line 34 of file preferences.h.

◆ in_flash_

bool esphome::ESPPreferenceObject::in_flash_ {false}
protected

Definition at line 36 of file preferences.h.

◆ length_words_

size_t esphome::ESPPreferenceObject::length_words_
protected

Definition at line 32 of file preferences.h.

◆ offset_

size_t esphome::ESPPreferenceObject::offset_
protected

Definition at line 31 of file preferences.h.

◆ type_

uint32_t esphome::ESPPreferenceObject::type_
protected

Definition at line 33 of file preferences.h.


The documentation for this class was generated from the following files: