/************************************************************************** * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file TaskGeneral.c * * @date 19-Sep-2019 * @author S. Nash * * @brief General task handler. * **************************************************************************/ #include "gio.h" #include "lin.h" #include "Heaters.h" #include "OperationModes.h" #include "SystemComm.h" #include "SystemCommMessages.h" #include "WatchdogMgmt.h" #include "TaskGeneral.h" /************************************************************************* * @brief taskGeneral * The taskGeneral function handles the scheduled General Task interrupt.\n * Calls the executive functions for most monitors and controllers, the\n * operation modes, the system communications, and alarms.\n * @details * Inputs : none * Outputs : Executive for the TBD called. * @param none * @return none *************************************************************************/ void taskGeneral( void ) { // check in with watchdog manager checkInWithWatchdogMgmt( TASK_GENERAL ); // do this first to keep timing consistent with watchdog management // manage data received from other sub-systems execSystemCommRx(); // run operation mode state machine execOperationModes(); // manage data to be transmitted to other sub-systems execSystemCommTx(); // Primary heaters state machine //execPrimaryHeaters(); // Trimmer heater state machine execTrimmerHeater(); // toggle GPIO to indicate general task has executed // gioToggleBit( gioPORTB, 1 ); }