Browse Source

tests: periph_rtc: switch to xtimer

dev/timer
Kaspar Schleiser 7 years ago
parent
commit
c6c7e9e981
  1. 2
      tests/periph_rtc/Makefile
  2. 6
      tests/periph_rtc/main.c

2
tests/periph_rtc/Makefile

@ -3,6 +3,6 @@ include ../Makefile.tests_common
FEATURES_REQUIRED = periph_rtc
DISABLE_MODULE += auto_init
USEMODULE += xtimer
include $(RIOTBASE)/Makefile.include

6
tests/periph_rtc/main.c

@ -26,7 +26,7 @@
#include "periph_conf.h"
#include "periph/rtc.h"
#include "hwtimer.h"
#include "xtimer.h"
#define TM_YEAR_OFFSET (1900)
@ -74,7 +74,7 @@ int main(void)
time.tm_sec);
rtc_set_time(&time);
hwtimer_wait(100);
xtimer_usleep(100);
rtc_get_time(&time);
printf("Clock set to %04d-%02d-%02d %02d:%02d:%02d\n",
@ -97,7 +97,7 @@ int main(void)
time.tm_sec);
rtc_set_alarm(&time, cb, 0);
hwtimer_wait(100);
xtimer_usleep(100);
rtc_get_alarm(&time);
printf("Alarm set to %04d-%02d-%02d %02d:%02d:%02d\n",

Loading…
Cancel
Save