29 #if HAL_STORAGE_SIZE >= 16384 30 #define STORAGE_NUM_AREAS 14 31 #elif HAL_STORAGE_SIZE >= 8192 32 #define STORAGE_NUM_AREAS 10 33 #elif HAL_STORAGE_SIZE >= 4096 34 #define STORAGE_NUM_AREAS 4 36 #error "Unsupported storage size" 55 static void erase(
void);
82 uint16_t
size(
void)
const {
return total_size; }
85 bool read_block(
void *dst, uint16_t src,
size_t n)
const;
86 bool write_block(uint16_t dst,
const void* src,
size_t n)
const;
89 uint8_t read_byte(uint16_t loc)
const;
90 uint16_t read_uint16(uint16_t loc)
const;
91 uint32_t read_uint32(uint16_t loc)
const;
93 void write_byte(uint16_t loc, uint8_t
value)
const;
94 void write_uint16(uint16_t loc, uint16_t value)
const;
95 void write_uint32(uint16_t loc, uint32_t value)
const;
static void set_layout_copter(void)
const StorageManager::StorageType type
static const StorageArea * layout
static const StorageArea layout_default[STORAGE_NUM_AREAS]
uint16_t size(void) const
static const StorageArea layout_copter[STORAGE_NUM_AREAS]
friend class StorageAccess