/************************************************************************* * * Copyright Diality, Inc. 2019-2020. All Rights Reserved. * 181 Technology, Ste. 150 * Irvine, CA 92618 * * Project Denali * * @file TaskGeneral.c * * @brief General task handler. * * @date 19-Sep-2019 * *************************************************************************/ #include "gio.h" #include "lin.h" #include "AlarmLamp.h" #include "OperationModes.h" #include "WatchdogMgmt.h" #include "TaskGeneral.h" // private data static int ledCounter = 0; /************************************************************************* * @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 ) { // run operation mode state machine execOperationModes(); // control alarm lamp execAlarmLamp(); // check in with watchdog manager checkInWithWatchdogMgmt( TASK_GENERAL ); // toggle GPIO to indicate general task has executed gioToggleBit( gioPORTA, 0 ); ledCounter++; // Temporary LED blinking for now - TODO: Remove this // if ( ledCounter >= 10 ) // { // ledCounter = 0; // gioToggleBit( gioPORTB, 1 ); // } }