1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/stm32_common
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
..
dist cpu: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
include cpu/stm32_common: fix STM32F7 CLOCK_LSI definition 2019-09-09 10:11:57 +02:00
ldscripts
periph periph/rtc: normalize struct tm before usage 2019-09-12 11:32:31 +02:00
cpu_common.c cpu/stm32_common: uniformize define alignments 2019-07-24 09:02:47 +02:00
cpu_init.c cpu: Moved stdio_init() into cpu_init() 2019-09-06 16:54:23 +02:00
doc.txt
Makefile
Makefile.features cpu/stm32_common: add support for uart_mode routine 2019-01-31 14:15:20 +01:00
Makefile.include cpu: do not locally export compilation variables 2019-08-29 10:35:53 +02:00
stm32_mem_lengths.mk stm32_common/stm32_mem_length: fix RAM_LEN for stm32l1xx-A/X cpu's 2019-07-09 08:56:35 +02:00
stmclk_common.c
stmclk_l0l1.c
stmclk.c cpu/stm32_common: uniformize define alignments 2019-07-24 09:02:47 +02:00