1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/lpc2387
Benjamin Valentin b1724a7d1b periph/rtc: normalize struct tm before usage
A naive implementation may set a RTC alarm in 30s by calling

	struct tm now;
	rtc_get_time(&now);
	now.tm_sec += 30;
	rtc_set_alarm(&now, _cb, NULL);

This works for RTC implementations that use a RTT internally and call
mktime() to convert the struct tm to a unix timestamp, as mktime() will
normalize the struct in the process.

Call rtc_tm_normalize() when the RTC uses separate registers for time / date
components to ensure it is normalized.

This also modifies tests/periph_rtc to exercise this case.
2019-09-12 11:32:31 +02:00
..
doc cpu*: fix doxygen grouping 2018-06-11 19:12:02 +02:00
include cpu/lpc2387: Various fixes for GPIO driver 2018-06-18 09:10:25 +02:00
ldscripts ldscripts: move .noinit section behind .bss section 2019-05-16 23:11:45 +02:00
mci cpu/lpc2387: Use PRIu32 in DEBUG() in mci 2018-08-14 15:35:12 +02:00
periph periph/rtc: normalize struct tm before usage 2019-09-12 11:32:31 +02:00
tools lpc2387: Replace tabs by spaces 2015-05-18 07:10:52 +02:00
asmfunc.s cpu: lpc2387: make comment a comment 2017-04-14 14:36:16 +02:00
cpu.c cpu/lpc2387: Fixed doc and attribute of arm_reset 2018-08-14 10:40:09 +02:00
lpc23xx-iap.c cpu/lpc2387: Fixed bug and readability in IAP 2018-08-14 15:31:43 +02:00
Makefile cpu: lpc2387: drop gpioint 2015-08-14 16:50:41 +02:00
Makefile.features cpu: arm7: reorganize Makefile.features 2017-11-02 12:59:45 +01:00
Makefile.include periph_common: add as dependency to periph drivers 2019-06-03 13:44:10 +02:00
startup.s cpu/arm7_common: Cleaned up interrupt vectors 2019-07-25 22:41:08 +02:00