From dbf616f8b33d53419b03d95197c5ceec0c3f0351 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 14 Oct 2018 12:31:41 +0000 Subject: Changes to the RTC driver to use the persistent storage interface, git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12366 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.h | 51 +++--------------------------- 1 file changed, 5 insertions(+), 46 deletions(-) (limited to 'os/hal/ports/STM32/LLD/RTCv1') diff --git a/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.h b/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.h index 98f750dc7..1903af378 100644 --- a/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.h +++ b/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.h @@ -84,23 +84,11 @@ /* Driver data structures and types. */ /*===========================================================================*/ -/** - * @brief FileStream specific methods. - */ -#define _rtc_driver_methods \ - _file_stream_methods - /** * @brief Type of a structure representing an RTC alarm time stamp. */ typedef struct RTCAlarm RTCAlarm; -/** - * @brief Type of an RTC alarm. - * @details Meaningful on platforms with more than 1 alarm comparator. - */ -typedef uint32_t rtcalarm_t; - /** * @brief Type of an RTC event. */ @@ -125,36 +113,14 @@ struct RTCAlarm { uint32_t tv_sec; }; -#if RTC_HAS_STORAGE || defined(__DOXYGEN__) -/** - * @extends FileStream - * - * @brief @p RTCDriver virtual methods table. - */ -struct RTCDriverVMT { - _rtc_driver_methods -}; -#endif - /** - * @brief Structure representing an RTC driver. + * @brief Implementation-specific @p RTCDriver fields. */ -struct RTCDriver{ -#if RTC_HAS_STORAGE || defined(__DOXYGEN__) - /** - * @brief Virtual Methods Table. - */ - const struct RTCDriverVMT *vmt; -#endif - /** - * @brief Pointer to the RTC registers block. - */ - RTC_TypeDef *rtc; - /** - * @brief Callback pointer. - */ +#define _rtc_lld_driver_fields \ + /* Pointer to the RTC registers block.*/ \ + RTC_TypeDef *rtc; \ + /* Callback pointer.*/ \ rtccb_t callback; -}; /*===========================================================================*/ /* Driver macros. */ @@ -164,13 +130,6 @@ struct RTCDriver{ /* External declarations. */ /*===========================================================================*/ -#if !defined(__DOXYGEN__) -extern RTCDriver RTCD1; -#if RTC_HAS_STORAGE -extern struct RTCDriverVMT _rtc_lld_vmt; -#endif -#endif - #ifdef __cplusplus extern "C" { #endif -- cgit v1.2.3