From 8ec17560e414f6b6bd507e830d6fedc3d94b1e7a Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Thu, 20 Nov 2014 18:26:48 +0100 Subject: [PATCH] examples/default: use periph/rtc instead of rtc The rtc module is deprecated and will be removed. --- examples/default/Makefile | 1 + examples/default/main.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/examples/default/Makefile b/examples/default/Makefile index dfe50e843..bdb43dba9 100644 --- a/examples/default/Makefile +++ b/examples/default/Makefile @@ -37,6 +37,7 @@ USEMODULE += vtimer USEMODULE += defaulttransceiver FEATURES_OPTIONAL += transceiver +FEATURES_OPTIONAL += periph_rtc ifneq (,$(filter msb-430,$(BOARD))) USEMODULE += sht11 diff --git a/examples/default/main.c b/examples/default/main.c index 311a57605..437d4c5bd 100644 --- a/examples/default/main.c +++ b/examples/default/main.c @@ -31,6 +31,10 @@ #include "shell_commands.h" #include "board_uart0.h" +#if FEATURE_PERIPH_RTC +#include "periph/rtc.h" +#endif + #ifdef MODULE_LTC4150 #include "ltc4150.h" #endif @@ -156,6 +160,10 @@ int main(void) init_transceiver(); #endif +#ifdef FEATURE_PERIPH_RTC + rtc_init(); +#endif + (void) puts("Welcome to RIOT!"); shell_init(&shell, NULL, UART0_BUFSIZE, shell_readc, shell_putchar);