Index: Utilities.c =================================================================== diff -u -r54a9bd09d6714d7faaa186959988a75ef3b83557 -r719d12b873b8f05e95414b3a87d8d9f76fec6988 --- Utilities.c (.../Utilities.c) (revision 54a9bd09d6714d7faaa186959988a75ef3b83557) +++ Utilities.c (.../Utilities.c) (revision 719d12b873b8f05e95414b3a87d8d9f76fec6988) @@ -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