Index: firmware/App/Tasks/TaskBG.c =================================================================== diff -u -rde5a0d43bdef611d963d11855bc958a8d8899a09 -r4459be59bdc2896b44bcf6cd42d2762190e23c16 --- firmware/App/Tasks/TaskBG.c (.../TaskBG.c) (revision de5a0d43bdef611d963d11855bc958a8d8899a09) +++ firmware/App/Tasks/TaskBG.c (.../TaskBG.c) (revision 4459be59bdc2896b44bcf6cd42d2762190e23c16) @@ -23,46 +23,47 @@ #include "WatchdogMgmt.h" #include "TaskTimer.h" +/** + * @addtogroup TaskBackground + * @{ + */ + // ********** private definitions ********** -#define MAX_TIME_FOR_UI_TO_COMMUNICATE_MS 30000 // 30 seconds +#define MAX_TIME_FOR_UI_TO_COMMUNICATE_MS 30000 ///< Maximum time we wait for UI to communicate after power up (30 seconds). // ********** private data ********** -static U32 startUICommTimeout; -static BOOL uiIsCommunicating = FALSE; +static U32 startUICommTimeout; ///< Timer counter for UI to begin communicating. -/************************************************************************* - * @brief taskBackground +// ********** private function prototypes ********** + +/*********************************************************************//** + * @brief * The taskBackground function handles the idle Background Task loop. * Calls the Watchdog Mgmt. and NonVolatile Data services. * @details * Inputs : none - * Outputs : Executive for watchdog mgmt. and non-volatile data services called. + * Outputs : Executive for watchdog mgmt. and non-volatile data services called. + * @return none *************************************************************************/ void taskBackground( void ) { - startUICommTimeout = getMSTimerCount(); + startUICommTimeout = getMSTimerCount(); + #ifndef _VECTORCAST_ // can't have infinite loop in unit test tool while ( 1 ) #endif { // wait for UI to come up after power up - if ( FALSE == uiIsCommunicating ) + if ( FALSE == uiCommunicated() ) { - if ( TRUE == uiCommunicated() ) +#ifndef SIMULATE_UI + if ( TRUE == didTimeout( startUICommTimeout, MAX_TIME_FOR_UI_TO_COMMUNICATE_MS ) ) { - uiIsCommunicating = TRUE; + activateAlarmNoData( ALARM_ID_UI_COMM_POST_FAILED ); } - else - { -#ifndef SIMULATE_UI - if ( TRUE == didTimeout( startUICommTimeout, MAX_TIME_FOR_UI_TO_COMMUNICATE_MS ) ) - { - activateAlarmNoData( ALARM_ID_UI_COMM_POST_FAILED ); - } #endif - } } // manage the watchdog @@ -72,4 +73,5 @@ execNVDataMgmt(); } } - + +/**@}*/