diff --git a/src/RTC.cpp b/src/RTC.cpp index 328c4f3..94f7dca 100644 --- a/src/RTC.cpp +++ b/src/RTC.cpp @@ -142,6 +142,9 @@ void RTC::SetTime(RTC_TimeTypeDef* RTC_TimeStruct){ void RTC::GetData(RTC_DateTypeDef* RTC_DateStruct){ + GetDate(RTC_DateStruct); +} +void RTC::GetDate(RTC_DateTypeDef* RTC_DateStruct){ uint8_t buf[4] = {0}; @@ -174,6 +177,9 @@ void RTC::GetData(RTC_DateTypeDef* RTC_DateStruct){ void RTC::SetData(RTC_DateTypeDef* RTC_DateStruct){ + SetDate(RTC_DateStruct); +} +void RTC::SetDate(RTC_DateTypeDef* RTC_DateStruct){ if(RTC_DateStruct == NULL) return; diff --git a/src/RTC.h b/src/RTC.h index f77038e..2c6cc7f 100644 --- a/src/RTC.h +++ b/src/RTC.h @@ -27,10 +27,12 @@ class RTC { void GetBm8563Time(void); void SetTime(RTC_TimeTypeDef* RTC_TimeStruct); - void SetData(RTC_DateTypeDef* RTC_DateStruct); + void SetDate(RTC_DateTypeDef* RTC_DateStruct); + void SetData(RTC_DateTypeDef* RTC_DateStruct) __attribute__((deprecated)); void GetTime(RTC_TimeTypeDef* RTC_TimeStruct); - void GetData(RTC_DateTypeDef* RTC_DateStruct); + void GetDate(RTC_DateTypeDef* RTC_DateStruct); + void GetData(RTC_DateTypeDef* RTC_DateStruct) __attribute__((deprecated)); public: uint8_t Second; uint8_t Minute;