Index: RTC.c =================================================================== diff -u -rd6afafc35efa5dcfd151a871843070e249c1c09f -r476fa5a4aac0ee83508e13573c245b772a391aa0 --- RTC.c (.../RTC.c) (revision d6afafc35efa5dcfd151a871843070e249c1c09f) +++ RTC.c (.../RTC.c) (revision 476fa5a4aac0ee83508e13573c245b772a391aa0) @@ -24,6 +24,7 @@ #include "SystemCommMessages.h" #include "Timers.h" #include "Utilities.h" +#include "TestSupport.h" /** * @addtogroup RTC @@ -207,7 +208,7 @@ static U16 prepRAMBuffer[ RTC_RAM_PREP_BUFFER_LENGTH ]; ///< Buffer to send prep read/write commands to RTC RAM. static U16 RAMBuffer[ MIBSPI_MAX_BUFFER_LENGTH ]; ///< Buffer to read RTC RAM data. static U16 previousFPGATimerCount; ///< Previous FPGA timer count; -static OVERRIDE_U32_T rtcControlRegister1 = { 0, 0, 0, 0 }; +static OVERRIDE_U32_T rtcControlRegister1 = { 0, 0, 0, 0 }; ///< RTC control register 1. #ifdef _DG_ static BOOL syncDG2HDDateTimeFlag; ///< Flag indicating whether DG RTC should be sync'd to HD RTC. #endif @@ -1576,6 +1577,13 @@ return state; } +/*********************************************************************//** + * @brief + * The getControlReg1 function gets the current RTC control register. + * @details Inputs: rtcControlRegister1 + * @details Outputs: none + * @return the current RTC control register word. + *************************************************************************/ static U16 getControlReg1( void ) { @@ -1627,7 +1635,15 @@ return result; } -BOOL testSetRTCstatus( U32 status) +/*********************************************************************//** + * @brief + * The testSetRTCstatus function overrides RTC control register 1 + * @details Inputs: none + * @details Outputs: rtcControlRegister1 + * @param status override RTC control register 1 with this value + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +BOOL testSetRTCstatus( U32 status ) { BOOL result = FALSE; @@ -1641,6 +1657,14 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetRTCstatus function resets the override + * of RTC control register 1. + * @details Inputs: none + * @details Outputs: rtcControlRegister1 + * @return TRUE if reset successful, FALSE if not + *************************************************************************/ BOOL testResetRTCstatus( void ) { BOOL result = FALSE;