| 281 | } |
| 282 | |
| 283 | void *modInstallMods(xsMachine *the, void *preparationIn, uint8_t *status) |
| 284 | { |
| 285 | txPreparation *preparation = preparationIn; |
| 286 | void *result = NULL; |
| 287 | |
| 288 | if (NULL == gFlashMutex) |
| 289 | gFlashMutex = xSemaphoreCreateMutex(); |
| 290 | |
| 291 | if (fxMapArchive(the, preparation, (void *)kModulesStart, kFlashSectorSize, spiRead, spiWrite)) { |
| 292 | result = (void *)kModulesStart; |
| 293 | fxSetArchive(the, result); |
| 294 | } |
| 295 | |
| 296 | if (XS_ATOM_ERROR == c_read32be((void *)(4 + kModulesStart))) { |
| 297 | *status = *(8 + (uint8_t *)kModulesStart); |
| 298 | modLog("mod failed"); |
| 299 | } |
| 300 | else |
| 301 | *status = 0; |
| 302 | |
| 303 | return result; |
| 304 | } |
| 305 | |
| 306 | #endif /* MODDEF_XS_MODS */ |
| 307 |
nothing calls this directly
no test coverage detected