mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-14 17:13:50 +01:00
sys/rtc_utils: make parameter to rtc_mktime() const
This commit is contained in:
parent
a4026b78b8
commit
ba0060d3a6
@ -69,7 +69,7 @@ int rtc_tm_compare(const struct tm *a, const struct tm *b);
|
||||
*
|
||||
* @return elapsed seconds since `RIOT_EPOCH`
|
||||
*/
|
||||
uint32_t rtc_mktime(struct tm *t);
|
||||
uint32_t rtc_mktime(const struct tm *t);
|
||||
|
||||
/**
|
||||
* @brief Converts an RTC timestamp into a time struct.
|
||||
|
||||
@ -177,7 +177,7 @@ void rtc_tm_normalize(struct tm *t)
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t rtc_mktime(struct tm *t)
|
||||
uint32_t rtc_mktime(const struct tm *t)
|
||||
{
|
||||
unsigned year = t->tm_year + 1900;
|
||||
uint32_t time = t->tm_sec
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user