| 1383 | } |
| 1384 | |
| 1385 | void *modInstallMods(xsMachine *the, void *preparationIn, uint8_t *status) |
| 1386 | { |
| 1387 | txPreparation *preparation = preparationIn; |
| 1388 | void *result = NULL; |
| 1389 | |
| 1390 | if (!gPartitionAddress) |
| 1391 | return NULL; |
| 1392 | |
| 1393 | if (fxMapArchive(the, preparation, (void *)gPartition, kFlashSectorSize, spiRead, spiWrite)) { |
| 1394 | result = (void *)gPartitionAddress; |
| 1395 | fxSetArchive(the, result); |
| 1396 | } |
| 1397 | |
| 1398 | if (XS_ATOM_ERROR == c_read32be(4 + kModulesStart)) { |
| 1399 | *status = *(8 + (uint8_t *)kModulesStart); |
| 1400 | modLog("mod failed"); |
| 1401 | } |
| 1402 | else |
| 1403 | *status = 0; |
| 1404 | |
| 1405 | return result; |
| 1406 | } |
| 1407 | |
| 1408 | #else /* ESP8266 */ |
| 1409 |
no test coverage detected