mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
b1724a7d1b
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. |
||
---|---|---|
.. | ||
can.c | ||
dac.c | ||
dma.c | ||
eeprom.c | ||
eth.c | ||
flash_common.c | ||
flashpage.c | ||
gpio.c | ||
hwrng.c | ||
i2c_1.c | ||
i2c_2.c | ||
Makefile | ||
pm.c | ||
pwm.c | ||
qdec.c | ||
rtc.c | ||
rtt.c | ||
spi.c | ||
timer.c | ||
uart.c |