drivers/periph_common: RTC: move RIOT_EPOCH to header, document it.
This commit is contained in:
parent
01e6b62667
commit
7543e714c1
@ -46,6 +46,18 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(RIOT_EPOCH) || DOXYGEN
|
||||||
|
/**
|
||||||
|
* @brief Earliest year of the RTC
|
||||||
|
*
|
||||||
|
* 01.01.$RIOT_EPOCH will be the reset value of the RTC if supported.
|
||||||
|
*
|
||||||
|
* Internal RTC helper functions such as @see rtc_mktime and @see rtc_localtime
|
||||||
|
* will not work on dates earlier than that.
|
||||||
|
*/
|
||||||
|
#define RIOT_EPOCH (2020)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Signature for alarm Callback
|
* @brief Signature for alarm Callback
|
||||||
*
|
*
|
||||||
|
|||||||
@ -31,10 +31,6 @@
|
|||||||
#define HOUR (60U * MINUTE)
|
#define HOUR (60U * MINUTE)
|
||||||
#define DAY (24U * HOUR)
|
#define DAY (24U * HOUR)
|
||||||
|
|
||||||
#ifndef RIOT_EPOCH
|
|
||||||
#define RIOT_EPOCH (2020)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The rules here are (to be checked in that explicit order):
|
* The rules here are (to be checked in that explicit order):
|
||||||
* 1. If the year is not a multiple of four, it is not a leap year.
|
* 1. If the year is not a multiple of four, it is not a leap year.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user