Index: RTC.h =================================================================== diff -u -rf5f58ba4dd4247da495c8f6656b0cc61390df596 -r59871c9964559b5137781af9c2eeed6bab18ef73 --- RTC.h (.../RTC.h) (revision f5f58ba4dd4247da495c8f6656b0cc61390df596) +++ RTC.h (.../RTC.h) (revision 59871c9964559b5137781af9c2eeed6bab18ef73) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * -* @file RTC.h +* @file RTC.h * -* @author (last) Sean Nash -* @date (last) 08-Sep-2020 +* @author (last) Michael Garthwaite +* @date (last) 01-Feb-2023 * -* @author (original) Dara Navaei -* @date (original) 11-Jan-2020 +* @author (original) Dara Navaei +* @date (original) 11-Jan-2020 * ***************************************************************************/ @@ -29,6 +29,8 @@ * @{ */ +// ********** public definitions ********** + /// RTC RAM status enumeration. typedef enum RTC_RAM_STATUS { @@ -49,15 +51,31 @@ } RTC_RAM_STATE_T; +/// Real time clock data structure +typedef struct +{ + U32 epochTime; ///< Epoch time +} RTC_DATA_T; + +// ********** public function prototypes ********** + void initRTC( void ); void execRTC( void ); BOOL setRTCTimestamp( U08 secs, U08 mins, U08 hours, U08 days, U08 months, U32 years ); + BOOL setRTCEpoch( U32 epoch ); U32 getRTCTimestamp( void ); +void resetRTCPOSTState( void ); + +#ifdef _DG_ +void signalSyncToHD( void ); +BOOL syncDG2HDDateTime( void ); +#endif + SELF_TEST_STATUS_T execRTCSelfTest( void ); RTC_RAM_STATUS_T writeToRAM( U32 address, U08* data, U32 length ); @@ -70,6 +88,12 @@ void getDataFromRAM( U08* externalBuffer, U32 length ); +BOOL testSetStopRTC( void ); +BOOL testSetRTCCtlReg1Status( U32 status ); +BOOL testResetRTCCtlReg1Status( void ); +BOOL testSetRTCCtlReg3Status( U32 status ); +BOOL testResetRTCCtlReg3Status( void ); + /**@}*/ #endif