Index: RTC.c =================================================================== diff -u -r839935998cfe2a1a7594e6b6810301ad3c2aa872 -rfd1a4ea5198033bcbd17986c3079967afb1f220f --- RTC.c (.../RTC.c) (revision 839935998cfe2a1a7594e6b6810301ad3c2aa872) +++ RTC.c (.../RTC.c) (revision fd1a4ea5198033bcbd17986c3079967afb1f220f) @@ -179,13 +179,13 @@ // ********** private data ********** static RTC_SELF_TEST_STATE_T RTCSelfTestState; ///< Self test variable. -static RTC_GET_DATA_STATE_T RTCServiceState; ///< RTC get data variable. -static RTC_EXEC_STATE_T RTCExecState; ///< RTC exec state variable. -static SELF_TEST_STATUS_T RTCSelfTestResult; ///< RTC self-test status variable. -static RTC_RAM_STATUS_T RTCRAMStatus; ///< RTC RAM status variable. -static RTC_RAM_STATE_T RTCRAMState; ///< RTC RAM state. -static RTC_TIMESTAMP_T RTCTimestampStruct; ///< Timestamp record - last read from RTC. -static RTC_TIMESTAMP_T RTCNewTimestampStruct; ///< New timestamp record that will hold the new time to be written to RTC. +static RTC_GET_DATA_STATE_T RTCServiceState; ///< RTC get data variable. +static RTC_EXEC_STATE_T RTCExecState; ///< RTC exec state variable. +static SELF_TEST_STATUS_T RTCSelfTestResult; ///< RTC self-test status variable. +static RTC_RAM_STATUS_T RTCRAMStatus; ///< RTC RAM status variable. +static RTC_RAM_STATE_T RTCRAMState; ///< RTC RAM state. +static RTC_TIMESTAMP_T RTCTimestampStruct; ///< Timestamp record - last read from RTC. +static RTC_TIMESTAMP_T RTCNewTimestampStruct; ///< New timestamp record that will hold the new time to be written to RTC. static U32 RTCSelfTestTimer; ///< Self test timer. static U32 RTCPreviousSecond; ///< Previous second for self-test comparison. static U32 RAMBufferLength; ///< RAM buffer length for RAM operations. @@ -223,7 +223,6 @@ static RTC_SELF_TEST_STATE_T handleSelfTestWaitForFirstSecond( void ); static RTC_SELF_TEST_STATE_T handleSelfTestCheckAccuracy( void ); -static RTC_EXEC_STATE_T handleExecWaitForPostState( void ); static RTC_EXEC_STATE_T handleExecIdleState( void ); static RTC_EXEC_STATE_T handleExecReadState( void ); static RTC_EXEC_STATE_T handleExecPrepRAMState( void ); @@ -242,7 +241,7 @@ { RTCSelfTestState = RTC_SELF_TEST_STATE_START; RTCServiceState = RTC_SEND_COMMAND; - RTCExecState = RTC_EXEC_STATE_WAIT_FOR_POST; + RTCExecState = RTC_EXEC_STATE_IDLE; RTCSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; RTCRAMStatus = RTC_RAM_STATUS_IDLE; RTCRAMState = RTC_RAM_STATE_READY; @@ -399,10 +398,6 @@ { switch ( RTCExecState ) { - case RTC_EXEC_STATE_WAIT_FOR_POST: - RTCExecState = handleExecWaitForPostState(); - break; - case RTC_EXEC_STATE_IDLE: RTCExecState = handleExecIdleState(); break; @@ -1044,28 +1039,6 @@ /*********************************************************************//** * @brief - * The handleExecWaitForPostState checks whether POST has completed and what - * was the result of the POST test. It will either go to Idle of Fault. - * @details Inputs: RTCSelfTestState - * @details Outputs: none - * @return next state - *************************************************************************/ -static RTC_EXEC_STATE_T handleExecWaitForPostState( void ) // TODO remove this function -{ - RTC_EXEC_STATE_T result = RTC_EXEC_STATE_WAIT_FOR_POST; - - if ( RTCSelfTestState == RTC_SELF_TEST_STATE_COMPLETE ) - { - // After POST is finished, first read the current time so there is one time stamp - // available in the memory - result = RTC_EXEC_STATE_READ; - } - - return RTC_EXEC_STATE_IDLE; //result; -} - -/*********************************************************************//** - * @brief * The handleExecIdleState checks whether read or write to RTC or RAM has * been requested. If none of them have been requested, it will increment the * timer. @@ -1482,19 +1455,7 @@ return result; } -/*********************************************************************//** - * @brief - * The resetRTCPostState function resets the RTC self test state - * @details Inputs: none - * @details Outputs : RTCSelfTestState - * @return none - *************************************************************************/ -void resetRTCPostState( void ) // TODO remove this function -{ - RTCSelfTestState = RTC_SELF_TEST_STATE_START; -} - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/