Index: PersistentAlarm.c =================================================================== diff -u -r254c4af0c7bfd773c693f7cc7a4ff794e44f1fdb -rbe8f80ce90292eecb7ddc58977a11f50e1f64cae --- PersistentAlarm.c (.../PersistentAlarm.c) (revision 254c4af0c7bfd773c693f7cc7a4ff794e44f1fdb) +++ PersistentAlarm.c (.../PersistentAlarm.c) (revision be8f80ce90292eecb7ddc58977a11f50e1f64cae) @@ -160,4 +160,19 @@ return isErrorConditionCleared; } +/*********************************************************************//** + * @brief + * The resetPersistentAlarmTimer function resets the start time for error + * condition clear start time and error start time. + * @details Inputs: none + * @details Outputs: reset condition clear start time and error occur start time + * @param alarmId Alarm id of the alarm to reset timer + * @return none + *************************************************************************/ +void resetPersistentAlarmTimer( ALARM_ID_T alarmId ) +{ + persistentAlarms[ alarmId ].errorOccurredStartTime = 0; + persistentAlarms[ alarmId ].errorClearedStartTime = 0; +} + /**@}*/ Index: PersistentAlarm.h =================================================================== diff -u -rd4443dc3a156ca5dad93af0617cfc2967b97e448 -rbe8f80ce90292eecb7ddc58977a11f50e1f64cae --- PersistentAlarm.h (.../PersistentAlarm.h) (revision d4443dc3a156ca5dad93af0617cfc2967b97e448) +++ PersistentAlarm.h (.../PersistentAlarm.h) (revision be8f80ce90292eecb7ddc58977a11f50e1f64cae) @@ -35,6 +35,7 @@ void initPersistentAlarm( ALARM_ID_T alarmIndex, U32 persistentClearPeriod, U32 persistentTriggerPeriod ); BOOL isPersistentAlarmTriggered( ALARM_ID_T alarmIndex, BOOL const isErrorOccurred ); BOOL isPersistentAlarmConditionCleared( ALARM_ID_T alarmIndex, BOOL const isErrorOccurred ); +void resetPersistentAlarmTimer( ALARM_ID_T alarmId ); /**@}*/