MCPcopy Create free account
hub / github.com/SmingHub/Sming / f_read

Method f_read

Sming/Libraries/Spiffs/src/FileSystem.cpp:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90} // namespace
91
92s32_t FileSystem::f_read(struct spiffs_t* spiffs, u32_t addr, u32_t size, u8_t* dst)
93{
94 auto fs = static_cast<FileSystem*>(spiffs->user_data);
95 assert(fs != nullptr);
96 if(!fs->partition.read(addr, dst, size)) {
97 return SPIFFS_ERR_INTERNAL;
98 }
99 if(fs->profiler != nullptr) {
100 fs->profiler->write(addr, dst, size);
101 }
102 return SPIFFS_OK;
103}
104
105s32_t FileSystem::f_write(struct spiffs_t* spiffs, u32_t addr, u32_t size, u8_t* src)
106{

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected