/** **************************************************************************** * @file rtc_service_port.h * @brief Адаптерная прослойка для RTC Service. **************************************************************************** */ #ifndef __RTC_SERVICE_PORT_H #define __RTC_SERVICE_PORT_H #include #include #include "rtc_service_types.h" typedef enum { RTC_SERVICE_PORT_OK = 0, RTC_SERVICE_PORT_RESULT_UNSUPPORTED_CLOCK, RTC_SERVICE_PORT_RESULT_HW_ERROR, RTC_SERVICE_PORT_RESULT_NO_STORAGE, } RtcService_PortResult; RtcService_PortResult RtcService_Port_InitClock(RtcService_ClockSource preferred_source, RtcService_ClockSource* actual_source); void RtcService_Port_EnableRtcClock(void); uint8_t RtcService_Port_IsPowerOnReset(void); RtcService_PortResult RtcService_Port_ReadRtc(RtcService_DateTime* dt); RtcService_PortResult RtcService_Port_WriteRtc(const RtcService_DateTime* dt); RtcService_PortResult RtcService_Port_ReadBackup(uint32_t* buffer, size_t words); RtcService_PortResult RtcService_Port_WriteBackup(const uint32_t* buffer, size_t words); RtcService_PortResult RtcService_Port_EraseBackup(void); #endif /* __RTC_SERVICE_PORT_H */