aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h
diff options
context:
space:
mode:
authoredolomb <none@example.com>2019-01-17 15:19:20 +0000
committeredolomb <none@example.com>2019-01-17 15:19:20 +0000
commit29309f101a4828842c377ff11a3a59908aab05f2 (patch)
treef75aef8484bc3522621b128eb6bfeacd55ad0e47 /os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h
parent696701cd6fe254a4cb2e3f748cacabe853d42a9e (diff)
downloadChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.tar.gz
ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.tar.bz2
ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.zip
Updated SAMA drivers (still incomplete)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12543 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h')
-rw-r--r--os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h55
1 files changed, 7 insertions, 48 deletions
diff --git a/os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h b/os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h
index a5d4b8918..7b5fb3cd2 100644
--- a/os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h
+++ b/os/hal/ports/SAMA/LLD/RTCv1/hal_rtc_lld.h
@@ -80,17 +80,6 @@
/*===========================================================================*/
/**
- * @brief FileStream specific methods.
- */
-#define _rtc_driver_methods \
- _file_stream_methods
-
-/**
- * @brief Type of an RTC alarm number.
- */
-typedef uint32_t rtcalarm_t;
-
-/**
* @brief Type of an RTC event.
*/
typedef enum {
@@ -106,7 +95,7 @@ typedef void (*rtccb_t)(RTCDriver *rtcp, rtcevent_t event);
/**
* @brief Type of a structure representing an RTC alarm time stamp.
*/
-typedef struct {
+typedef struct hal_rtc_alarm {
/**
* @brief Type of an alarm as encoded in RTC registers.
*/
@@ -114,37 +103,14 @@ typedef struct {
uint32_t calralrm;
} RTCAlarm;
-#if RTC_HAS_STORAGE || defined(__DOXYGEN__)
/**
- * @extends FileStream
- *
- * @brief @p RTCDriver virtual methods table.
+ * @brief Implementation-specific @p RTCDriver fields.
*/
-struct RTCDriverVMT {
- _rtc_driver_methods
-};
-#endif
-
-/**
- * @brief Structure representing an RTC driver.
- */
-struct RTCDriver {
-#if RTC_HAS_STORAGE || defined(__DOXYGEN__)
- /**
- * @brief Virtual Methods Table.
- */
- const struct RTCDriverVMT *vmt;
-#endif
- /* End of the mandatory fields.*/
- /**
- * @brief Pointer to the RTC registers block.
- */
- Rtc *rtc;
- /**
- * @brief Callback pointer.
- */
- rtccb_t callback;
-};
+#define rtc_lld_driver_fields \
+ /* Pointer to the RTC registers block.*/ \
+ Rtc *rtc; \
+ /* Callback pointer.*/ \
+ rtccb_t callback
/*===========================================================================*/
/* Driver macros. */
@@ -182,13 +148,6 @@ struct RTCDriver {
/* External declarations. */
/*===========================================================================*/
-#if !defined(__DOXYGEN__)
-extern RTCDriver RTCD0;
-#if RTC_HAS_STORAGE
-extern struct RTCDriverVMT _rtc_lld_vmt;
-#endif
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif