42 size_t size_on_disk,
size_t logical_block_size,
size_t logical_page_size,
43 size_t max_num_open_descriptors,
size_t cache_pages,
44 std::function<
void()> post_format_hook)
45 :
SPIFFS(physical_address, size_on_disk, flash->cfg().sectorSize_,
46 logical_block_size, logical_page_size, max_num_open_descriptors,
47 cache_pages, post_format_hook)
67#if (LOGLEVEL >= VERBOSE)
70 LOG(
VERBOSE,
"check [%x]=%02x%02x%02x%02x", (
unsigned)addr, db[0], db[1],
Generic SPIFFS base class.
void unmount()
Flushes caches and unmounts the filesystem.
Shared implementation for operating spiflash devices.
void write(uint32_t addr, const void *buf, size_t len)
Performs write to the device.
void read(uint32_t addr, void *buf, size_t len)
Reads data from the device.
void erase(uint32_t addr, size_t len)
Erases sector(s) of the device.
SPIFlash * flash_
Flash access helper.
SpiSPIFFS(SPIFlash *flash, size_t physical_address, size_t size_on_disk, size_t logical_block_size, size_t logical_page_size, size_t max_num_open_descriptors=16, size_t cache_pages=8, std::function< void()> post_format_hook=nullptr)
Constructor.
int32_t flash_read(uint32_t addr, uint32_t size, uint8_t *dst) override
SPIFFS callback to read flash, in context.
int32_t flash_write(uint32_t addr, uint32_t size, uint8_t *src) override
SPIFFS callback to write flash, in context.
int32_t flash_erase(uint32_t addr, uint32_t size) override
SPIFFS callback to erase flash, in context.
#define LOG(level, message...)
Conditionally write a message to the logging output.
static const int VERBOSE
Loglevel that is usually not printed, reporting debugging information.