MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / modInstallMods

Function modInstallMods

xs/platforms/pico/xsHost.c:546–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546void *modInstallMods(xsMachine *the, void *preparationIn, uint8_t *status)
547{
548 txPreparation *preparation = preparationIn;
549 void *result = NULL;
550
551 if (fxMapArchive(the, preparation, (void *)kModulesStart, kFlashSectorSize, spiRead, spiWrite)) {
552 result = (void *)kModulesStart;
553 fxSetArchive(the, result);
554 }
555
556 if (XS_ATOM_ERROR == c_read32be(4 + kModulesStart)) {
557 *status = *(8 + (uint8_t *)kModulesStart);
558 modLog("mod failed");
559 }
560 else
561 *status = 0;
562
563 return result;
564}
565
566#endif /* MODDEF_XS_MODS */
567

Callers

nothing calls this directly

Calls 2

fxMapArchiveFunction · 0.85
fxSetArchiveFunction · 0.85

Tested by

no test coverage detected