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