From 1becf84faf9972d6d222a325233e09884d657586 Mon Sep 17 00:00:00 2001 From: sasaki takeru Date: Sat, 5 Oct 2019 14:55:24 +0900 Subject: [PATCH 1/2] Fix typo in RTC --- src/RTC.cpp | 4 ++-- src/RTC.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/RTC.cpp b/src/RTC.cpp index 328c4f3..e8a80e5 100644 --- a/src/RTC.cpp +++ b/src/RTC.cpp @@ -141,7 +141,7 @@ void RTC::SetTime(RTC_TimeTypeDef* RTC_TimeStruct){ -void RTC::GetData(RTC_DateTypeDef* RTC_DateStruct){ +void RTC::GetDate(RTC_DateTypeDef* RTC_DateStruct){ uint8_t buf[4] = {0}; @@ -173,7 +173,7 @@ void RTC::GetData(RTC_DateTypeDef* RTC_DateStruct){ } -void RTC::SetData(RTC_DateTypeDef* 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..e17fab9 100644 --- a/src/RTC.h +++ b/src/RTC.h @@ -27,10 +27,10 @@ class RTC { void GetBm8563Time(void); void SetTime(RTC_TimeTypeDef* RTC_TimeStruct); - void SetData(RTC_DateTypeDef* RTC_DateStruct); + void SetDate(RTC_DateTypeDef* RTC_DateStruct); void GetTime(RTC_TimeTypeDef* RTC_TimeStruct); - void GetData(RTC_DateTypeDef* RTC_DateStruct); + void GetDate(RTC_DateTypeDef* RTC_DateStruct); public: uint8_t Second; uint8_t Minute; From a3c20b61b5d5508cd5248b14bac634da850fc5e9 Mon Sep 17 00:00:00 2001 From: sasaki takeru Date: Fri, 1 Nov 2019 06:08:26 +0900 Subject: [PATCH 2/2] set deprecated to old functions --- src/RTC.cpp | 6 ++++++ src/RTC.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/RTC.cpp b/src/RTC.cpp index e8a80e5..94f7dca 100644 --- a/src/RTC.cpp +++ b/src/RTC.cpp @@ -141,6 +141,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}; @@ -173,6 +176,9 @@ void RTC::GetDate(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) diff --git a/src/RTC.h b/src/RTC.h index e17fab9..2c6cc7f 100644 --- a/src/RTC.h +++ b/src/RTC.h @@ -28,9 +28,11 @@ class RTC { void SetTime(RTC_TimeTypeDef* RTC_TimeStruct); void SetDate(RTC_DateTypeDef* RTC_DateStruct); + void SetData(RTC_DateTypeDef* RTC_DateStruct) __attribute__((deprecated)); void GetTime(RTC_TimeTypeDef* RTC_TimeStruct); void GetDate(RTC_DateTypeDef* RTC_DateStruct); + void GetData(RTC_DateTypeDef* RTC_DateStruct) __attribute__((deprecated)); public: uint8_t Second; uint8_t Minute;