Index: firmware/App/Services/WatchdogMgmt.c =================================================================== diff -u -rc67def50892f9a7c2f1f22985b5351465a8f6773 -ra2bc96881a5fc3d8f779246b2abebf15a8de9384 --- firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision c67def50892f9a7c2f1f22985b5351465a8f6773) +++ firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision a2bc96881a5fc3d8f779246b2abebf15a8de9384) @@ -57,7 +57,7 @@ static void resetWDTaskCheckIns( void ); static BOOL haveAllTasksCheckedIn( void ); static void petWatchdog( void ); -static DATA_ARRAY_GET_PROTOTYPE( BOOL, hasTaskGeneralCheckedIn, task ); +static BOOL hasTaskGeneralCheckedIn( U32 task ); /*********************************************************************//** * @brief @@ -74,7 +74,7 @@ watchdogSelfTestState = WATCHDOG_SELF_TEST_STATE_START; watchdogSelfTestStatus = SELF_TEST_STATUS_IN_PROGRESS; watchdogSelfTestTimerCount = 0; - // initialize task check-ins to false + // Initialize task check-ins to false for ( i = 0; i < NUM_OF_TASKS; i++ ) { watchdogTaskCheckedIn[ i ].data = FALSE; @@ -95,35 +95,29 @@ { BOOL allTasksCheckedIn; - // called by background task, so give bg task credit for checking in + // Called by background task, so give bg task credit for checking in checkInWithWatchdogMgmt( TASK_BG ); - // check to see if all monitored tasks have checked in + // Check to see if all monitored tasks have checked in allTasksCheckedIn = haveAllTasksCheckedIn(); - // if all monitored tasks checked in, pet watchdog and clear the slate + // If all monitored tasks checked in, pet watchdog and clear the slate if ( ( TRUE == allTasksCheckedIn ) && ( didTimeout( lastWatchdogPetTime, MIN_WATCHDOG_PET_INTERVAL_MS ) ) ) { petWatchdog(); resetWDTaskCheckIns(); } -#ifndef RM46_EVAL_BOARD_TARGET - // check to see if watchdog has expired -#ifndef BREADBOARD_TARGET + // Check to see if watchdog has expired if ( getCPLDWatchdogExpired() == PIN_SIGNAL_LOW ) -#else - if ( getCPLDWatchdogExpired() == PIN_SIGNAL_HIGH ) -#endif { - // ignore expired watchdog until after watchdog POST + // Ignore expired watchdog until after watchdog POST if ( WATCHDOG_SELF_TEST_STATE_COMPLETE == watchdogSelfTestState ) { #ifndef DEBUG_ENABLED activateAlarmNoData( ALARM_ID_WATCHDOG_EXPIRED ); #endif } } -#endif } @@ -162,12 +156,12 @@ case WATCHDOG_SELF_TEST_STATE_START: watchdogSelfTestState = WATCHDOG_SELF_TEST_STATE_IN_PROGRESS; watchdogSelfTestTimerCount = getMSTimerCount(); - // no break here so we pass through directly to in progress processing + // No break here so we pass through directly to in progress processing case WATCHDOG_SELF_TEST_STATE_IN_PROGRESS: while ( FALSE == didTimeout( watchdogSelfTestTimerCount, WATCHDOG_POST_TIMEOUT_MS ) ) { - // waiting here for w.d. test period to prevent this task from checking in - watchdog should expire + // Waiting here for w.d. test period to prevent this task from checking in - watchdog should expire } if ( getCPLDWatchdogExpired() == PIN_SIGNAL_HIGH ) { @@ -191,7 +185,7 @@ break; case WATCHDOG_SELF_TEST_STATE_COMPLETE: - // if we get called in this state, assume we're doing self-test again + // If we get called in this state, assume we are doing self-test again watchdogSelfTestStatus = SELF_TEST_STATUS_IN_PROGRESS; watchdogSelfTestState = WATCHDOG_SELF_TEST_STATE_START; break; @@ -216,7 +210,7 @@ { U32 i; - // initialize task check-ins to false + // Initialize task check-ins to false for ( i = 0; i < NUM_OF_TASKS; i++ ) { watchdogTaskCheckedIn[ i ].data = FALSE; @@ -236,7 +230,7 @@ BOOL result = TRUE; U32 i; - // check that each task has checked in + // Check that each task has checked in for ( i = 0; i < NUM_OF_TASKS; i++ ) { if ( FALSE == hasTaskGeneralCheckedIn( i ) ) @@ -291,12 +285,10 @@ *************************************************************************/ static void petWatchdog( void ) { -#ifndef RM46_EVAL_BOARD_TARGET - // pulse the watchdog signal + // Pulse the watchdog signal toggleCPLDWatchdog(); -#endif - // remember when we last pet the watchdog + // Remember when we last pet the watchdog lastWatchdogPetTime = getMSTimerCount(); }