Exemplo n.º 1
0
// implementation
static int CommandReset(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    const void* cmdIoParam = pCmdIO->cmdIoParam;
    (*pCmdIO->pCmdApi->msg)(cmdIoParam, LINE_TERM " *** System Reboot ***\r\n" );

    SYS_RESET_SoftwareReset();

    return 1;
}
void AppConfig_SoftwareReset(bool resetToConfigurationMode)
{
    // Change boot-flag setting if required
    if (resetToConfigurationMode)
    {
        SYS_ASSERT(ConfigStore_Config_Read(), "ERROR: Could not read config_store memory.");

        if (ConfigStore_Config_IsValid())
        {
            // Push new setting to NVM - TODO clean up - use std routine
            ConfigStore_SetResetToConfigurationMode(true);

            if (ConfigStore_Config_UpdateCheckbyte() && ConfigStore_Config_IsValid())
                ConfigStore_Config_Write();
        }
    }
    SYS_RESET_SoftwareReset();

}
void platform_reset(void)
{
    SYS_RESET_SoftwareReset();
}