MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / begin

Method begin

ESP32_AP-Flasher/src/storage.cpp:177–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175#endif
176
177void DynStorage::begin() {
178 if(fsMutex == NULL) {
179 fsMutex = xSemaphoreCreateMutex();
180 }
181
182#ifndef SD_CARD_ONLY
183 initLittleFS();
184#endif
185
186#ifdef HAS_SDCARD
187 if(!sd_init_done) {
188 xSemaphoreTake(fsMutex, portMAX_DELAY);
189 initSDCard();
190 xSemaphoreGive(fsMutex);
191 sd_init_done = true;
192 }
193#ifndef SD_CARD_ONLY
194 copyIfNeeded("/index.html");
195 copyIfNeeded("/fonts");
196 copyIfNeeded("/www");
197 copyIfNeeded("/tagtypes");
198 copyIfNeeded("/AP_FW_Pack.bin");
199 copyIfNeeded("/tag_md5_db.json");
200 copyIfNeeded("/update_actions.json");
201 copyIfNeeded("/content_template.json");
202#endif
203#endif
204
205 if (!contentFS->exists("/current")) {
206 contentFS->mkdir("/current");
207 }
208 if (!contentFS->exists("/temp")) {
209 contentFS->mkdir("/temp");
210 }
211}
212
213void DynStorage::end() {
214#ifdef HAS_SDCARD

Callers 15

freeSpaceMethod · 0.95
initLittleFSFunction · 0.45
initSDCardFunction · 0.45
init_webFunction · 0.45
rxSerialTask2Function · 0.45
bringAPOnlineFunction · 0.45
BLETaskFunction · 0.45
getImgURLFunction · 0.45
getCalFeedFunction · 0.45
getDayAheadFeedFunction · 0.45
drawBuienradarFunction · 0.45

Calls 3

initLittleFSFunction · 0.70
initSDCardFunction · 0.70
copyIfNeededFunction · 0.70

Tested by

no test coverage detected