void ApplicationModeTasks(void) { // Debounce switch presses for rebooting to configuration mode if (AppConfig_CheckForConfigurationModeRebootButtonPress()) { CommandHandlers_ResetHandler(true); } // Hook to perform period tasks //time_t currentTime; //Creator_GetTime(¤tTime); //if ((currentTime - _PrevAppTaskTime) >= APP_TASK_SECONDS) //{ // _PrevAppTaskTime = currentTime; //} //Handle device reset request. if (CommandHandlers_IsResetPending()) { if (Shutdown()) { AppConfig_SoftwareReset(CommandHandlers_ResetToConfigurationMode()); } else CreatorConsole_Puts("Shutdown failed\r\n"); } else { UIControl_pollInputSensors(); } }
// ***************************************************************************** // ***************************************************************************** // Section: Application Initialization and State Machine // ***************************************************************************** // ***************************************************************************** void APP_Tasks_InteractiveMode( void ) { // Debounce switch presses for rebooting to configuration mode if (CheckForConfigurationModeRebootButtonPress()) { CommandHandlers_ResetHandler(true); } }