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; Index: RTC.h =================================================================== diff -u -r99f91b0f1bed7da40da75e97d3bb7a3b00e9508d -r476fa5a4aac0ee83508e13573c245b772a391aa0 --- RTC.h (.../RTC.h) (revision 99f91b0f1bed7da40da75e97d3bb7a3b00e9508d) +++ RTC.h (.../RTC.h) (revision 476fa5a4aac0ee83508e13573c245b772a391aa0) @@ -89,6 +89,8 @@ void getDataFromRAM( U08* externalBuffer, U32 length ); BOOL testSetStopRTC( void ); +BOOL testSetRTCstatus( U32 status ); +BOOL testResetRTCstatus( void ); /**@}*/ Index: TestSupport.c =================================================================== diff -u -rd6afafc35efa5dcfd151a871843070e249c1c09f -r476fa5a4aac0ee83508e13573c245b772a391aa0 --- TestSupport.c (.../TestSupport.c) (revision d6afafc35efa5dcfd151a871843070e249c1c09f) +++ TestSupport.c (.../TestSupport.c) (revision 476fa5a4aac0ee83508e13573c245b772a391aa0) @@ -53,6 +53,15 @@ } +/*********************************************************************//** + * @brief + * The getU16OverrideValue function extracts the appropriate U16 + * value from a given U32 override record according to the record state. + * @details Inputs: none + * @details Outputs: none + * @param ovU32 pointer to a floating point override record + * @return overridden U16 point value from the record + *************************************************************************/ U16 getU16OverrideValue( OVERRIDE_U32_T *ovU32 ) { U16 result = (U16)( ovU32->data & MASK_OFF_MSW );