Index: Utilities.c =================================================================== diff -u -r54a9bd09d6714d7faaa186959988a75ef3b83557 -r1a2123e2152f5290cae14add017ca258770b2ee2 --- Utilities.c (.../Utilities.c) (revision 54a9bd09d6714d7faaa186959988a75ef3b83557) +++ Utilities.c (.../Utilities.c) (revision 1a2123e2152f5290cae14add017ca258770b2ee2) @@ -537,6 +537,30 @@ /*********************************************************************//** * @brief + * The isCriticalDataSet function checks if the critical data has been set. + * @details Inputs: none + * @details Outputs: None + * @param data Ptr to a critical data record + * @return TRUE if critical data has been set, FALSE if not + *************************************************************************/ +BOOL isCriticalDataSet( CRITICAL_DATA_T *data ) +{ + BOOL result = FALSE; + CRITICAL_DATA_T d; + + _disable_IRQ(); + d = *data; + _enable_IRQ(); + // verify data integrity + if (( d.set != FALSE ) ) + { + result = TRUE; + } + return result; +} + +/*********************************************************************//** + * @brief * The hexStrToDec function convert hex string to decimal value. * @details Inputs: none * @details Outputs: none Index: Utilities.h =================================================================== diff -u -r54a9bd09d6714d7faaa186959988a75ef3b83557 -r1a2123e2152f5290cae14add017ca258770b2ee2 --- Utilities.h (.../Utilities.h) (revision 54a9bd09d6714d7faaa186959988a75ef3b83557) +++ Utilities.h (.../Utilities.h) (revision 1a2123e2152f5290cae14add017ca258770b2ee2) @@ -94,7 +94,8 @@ BOOL setCriticalData( CRITICAL_DATA_T *data, CRITICAL_DATAS_T value ); BOOL isCriticalDataInRange( CRITICAL_DATA_T *data ); void resetCriticalData( CRITICAL_DATA_T *data ); -U32 hexStrToDec( U08 const * const valuePtr, U08 size ); +U32 hexStrToDec( U08 const * const valuePtr, U08 size ); +BOOL isCriticalDataSet( CRITICAL_DATA_T *data ); ///< Determines if critcal data has been set. /**@}*/