diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-07-06 13:18:12 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-07-06 13:18:12 +0000 |
commit | 9b9e7833b19414060061d47a17acdf6015a9dbdd (patch) | |
tree | a02b808f527a7b02bb585bb57755b919568bb590 /os/hal/include/rtc.h | |
parent | fb4739b12b905317a2a9d680f5e0b79b2c780374 (diff) | |
download | ChibiOS-9b9e7833b19414060061d47a17acdf6015a9dbdd.tar.gz ChibiOS-9b9e7833b19414060061d47a17acdf6015a9dbdd.tar.bz2 ChibiOS-9b9e7833b19414060061d47a17acdf6015a9dbdd.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7010 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/rtc.h')
-rw-r--r-- | os/hal/include/rtc.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/os/hal/include/rtc.h b/os/hal/include/rtc.h index df11cbc92..bfa45553d 100644 --- a/os/hal/include/rtc.h +++ b/os/hal/include/rtc.h @@ -40,6 +40,11 @@ /*===========================================================================*/
/**
+ * @brief Base year of the calendar.
+ */
+#define RTC_BASE_YEAR 1980
+
+/**
* @name Date/Time bit masks for FAT format
* @{
*/
@@ -86,12 +91,12 @@ typedef struct RTCDriver RTCDriver; * @brief Type of a structure representing an RTC date/time stamp.
*/
typedef struct {
- uint32_t year:8;
- uint32_t month: 4;
- uint32_t dstflag: 1;
- uint32_t dayofweek: 3;
- uint32_t day: 5;
- uint32_t millisecond: 27;
+ uint32_t year:8; /**< @brief Years since 1980. */
+ uint32_t month: 4; /**< @brief Months 1..12. */
+ uint32_t dstflag: 1; /**< @brief DST correction flag. */
+ uint32_t dayofweek: 3; /**< @brief Day of week 1..7. */
+ uint32_t day: 5; /**< @brief Day of the month 1..31. */
+ uint32_t millisecond: 27; /**< @brief Milliseconds since midnight.*/
} RTCDateTime;
#include "rtc_lld.h"
@@ -108,7 +113,8 @@ typedef struct { *
* @iclass
*/
-#define rtcSetTimeI(rtcp, timespec) rtc_lld_set_time(rtcp, timespec)
+#define rtcSetTimeI(rtcp, timespec) \
+ rtc_lld_set_time(rtcp, timespec)
/**
* @brief Get current time.
@@ -118,7 +124,8 @@ typedef struct { *
* @iclass
*/
-#define rtcGetTimeI(rtcp, timespec) rtc_lld_get_time(rtcp, timespec)
+#define rtcGetTimeI(rtcp, timespec) \
+ rtc_lld_get_time(rtcp, timespec)
#if (RTC_ALARMS > 0) || defined(__DOXYGEN__)
/**
@@ -159,7 +166,8 @@ typedef struct { *
* @iclass
*/
-#define rtcSetCallbackI(rtcp, callback) rtc_lld_set_callback(rtcp, callback)
+#define rtcSetCallbackI(rtcp, callback) \
+ rtc_lld_set_callback(rtcp, callback)
#endif /* RTC_SUPPORTS_CALLBACKS */
/*===========================================================================*/
|