ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
esphome::storage Namespace Reference

Data Structures

class  BlockDevice
 A device addressed in fixed size blocks, such as a flash chip, an SD card or a RAM buffer. More...
 
struct  BlockGeometry
 The shape of a block device. A block_count of 0 means no media is present. More...
 
struct  NullMutex
 Stands in for a mutex where nothing runs on other tasks. More...
 

Typedefs

using DeviceMutex = Mutex
 

Enumerations

enum class  StorageError : int8_t {
  STORAGE_ERROR_NONE = 0 , STORAGE_ERROR_IO = -1 , STORAGE_ERROR_NO_MEDIA = -2 , STORAGE_ERROR_READ_ONLY = -3 ,
  STORAGE_ERROR_INVALID = -4 , STORAGE_ERROR_TIMEOUT = -5
}
 
enum  BlockFlag : uint8_t { BLOCK_FLAG_NEEDS_ERASE = 1 << 0 , BLOCK_FLAG_REMOVABLE = 1 << 1 , BLOCK_FLAG_READ_ONLY = 1 << 2 , BLOCK_FLAG_TRIM = 1 << 3 }
 

Functions

 ESPHOME_LOG_TAG (TAG, "storage")
 
 PROGMEM_STRING_TABLE (StorageErrorStrings, "none", "I/O error", "no media", "read only", "invalid address or size", "timeout", "unknown")
 
const LogString * storage_error_to_string (StorageError error)
 

Typedef Documentation

◆ DeviceMutex

Definition at line 47 of file block_device.h.

Enumeration Type Documentation

◆ BlockFlag

Enumerator
BLOCK_FLAG_NEEDS_ERASE 
BLOCK_FLAG_REMOVABLE 
BLOCK_FLAG_READ_ONLY 
BLOCK_FLAG_TRIM 

Definition at line 21 of file block_device.h.

◆ StorageError

enum class esphome::storage::StorageError : int8_t
strong
Enumerator
STORAGE_ERROR_NONE 
STORAGE_ERROR_IO 
STORAGE_ERROR_NO_MEDIA 
STORAGE_ERROR_READ_ONLY 
STORAGE_ERROR_INVALID 
STORAGE_ERROR_TIMEOUT 

Definition at line 12 of file block_device.h.

Function Documentation

◆ ESPHOME_LOG_TAG()

esphome::storage::ESPHOME_LOG_TAG ( TAG ,
"storage"  )

◆ PROGMEM_STRING_TABLE()

esphome::storage::PROGMEM_STRING_TABLE ( StorageErrorStrings ,
"none" ,
"I/O error" ,
"no media" ,
"read only" ,
"invalid address or size" ,
"timeout" ,
"unknown"  )

◆ storage_error_to_string()

const LogString * esphome::storage::storage_error_to_string ( StorageError error)

Definition at line 16 of file block_device.cpp.