Index: RTC.c =================================================================== diff -u -r3f0de5d7cc215f17a32a950da26043f812ecd07e -r9113cdc88dd46633aaac47652e93e12396c843bf --- RTC.c (.../RTC.c) (revision 3f0de5d7cc215f17a32a950da26043f812ecd07e) +++ RTC.c (.../RTC.c) (revision 9113cdc88dd46633aaac47652e93e12396c843bf) @@ -824,7 +824,7 @@ isBatteryLow = TRUE; } - status = ( hasReg1Failed | isBatteryLow ? TRUE : FALSE ); + status = ( ( FALSE == hasReg1Failed ) && ( FALSE == isBatteryLow ) ? TRUE : FALSE ); checkPersistentAlarm( reg1Alarm, hasReg1Failed, controlReg1, 0 ); checkPersistentAlarm( batteryAlarm, isBatteryLow, controlReg3, 0 ); Index: Utilities.c =================================================================== diff -u -r7574a250df6c0a773344ccafb62431c22930f6a3 -r9113cdc88dd46633aaac47652e93e12396c843bf --- Utilities.c (.../Utilities.c) (revision 7574a250df6c0a773344ccafb62431c22930f6a3) +++ Utilities.c (.../Utilities.c) (revision 9113cdc88dd46633aaac47652e93e12396c843bf) @@ -15,7 +15,8 @@ * ***************************************************************************/ -#include "Common.h" +#include "Common.h" +#include "FPGA.h" #include "Timers.h" #include "Utilities.h" @@ -764,5 +765,26 @@ { return ( TRUE == sempahoreStatus[ s ].isSemaphoreTaken ? FALSE : TRUE ); } + +#ifndef _RELEASE_ +/*********************************************************************//** + * @brief + * The getHardwareConfigStatus function returns the status of the hardware + * configuration. + * @details Inputs: none + * @details Outputs: none + * @return status of the hardware configuration + *************************************************************************/ +HARDWARE_CONFIG_T getHardwareConfigStatus( void ) +{ + HARDWARE_CONFIG_T configValue; + +#ifdef _DG_ + configValue = (HARDWARE_CONFIG_T)getFPGAHWConfiguration(); +#endif + + return configValue; +} +#endif /**@}*/ Index: Utilities.h =================================================================== diff -u -r7574a250df6c0a773344ccafb62431c22930f6a3 -r9113cdc88dd46633aaac47652e93e12396c843bf --- Utilities.h (.../Utilities.h) (revision 7574a250df6c0a773344ccafb62431c22930f6a3) +++ Utilities.h (.../Utilities.h) (revision 9113cdc88dd46633aaac47652e93e12396c843bf) @@ -70,6 +70,16 @@ NUM_OF_SEMAPHORES, ///< Number of semaphores } SEMAPHORE_T; +#ifndef _RELEASE_ +/// Hardware configuration +typedef enum Hardware_Configurations +{ + HW_CONFIG_BETA = 1, ///< Hardware configuration beta + HW_CONFIG_DVT, ///< Hardware configuration DVT + NUM_OF_HW_CONFIGS, ///< Number of hardware configurations +} HARDWARE_CONFIG_T; +#endif + /// Record structure for alarm data of any supported type. typedef union { @@ -112,7 +122,11 @@ void initSemaphores( void ); BOOL getSemaphore( SEMAPHORE_T s ); void releaseSemaphore( SEMAPHORE_T s ); -BOOL isSemaphoreReleased( SEMAPHORE_T s ); +BOOL isSemaphoreReleased( SEMAPHORE_T s ); + +#ifndef _RELEASE_ +HARDWARE_CONFIG_T getHardwareConfigStatus( void ); +#endif /**@}*/