diff --git a/examples/ccn-lite-client/Makefile b/examples/ccn-lite-client/Makefile index 66afa898ab..5e9d16fe5a 100644 --- a/examples/ccn-lite-client/Makefile +++ b/examples/ccn-lite-client/Makefile @@ -27,14 +27,12 @@ RIOTBASE ?= $(CURDIR)/../.. # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 -BOARD_INSUFFICIENT_RAM := chronos msb-430h telosb wsn430-v1_3b wsn430-v1_4 -BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu redbee-econotag udoo z1 qemu-i386 \ +BOARD_INSUFFICIENT_RAM := chronos msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1 redbee-econotag +BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu udoo qemu-i386 \ stm32f0discovery stm32f4discovery # mbed_lpc1768: see https://github.com/RIOT-OS/RIOT/issues/675 # msb-430: see https://github.com/RIOT-OS/RIOT/issues/658 # pttu: see https://github.com/RIOT-OS/RIOT/issues/659 -# redbee-econotag: see https://github.com/RIOT-OS/RIOT/issues/676 -# z1: lacks RTC features # qemu-i386: no transceiver, yet # stm32f0discovery: no transceiver, yet # stm32f4discovery: no transceiver, yet @@ -47,7 +45,7 @@ USEMODULE += posix USEMODULE += ps USEMODULE += random USEMODULE += defaulttransceiver -USEMODULE += rtc +USEMODULE += vtimer USEMODULE += ccn_lite USEMODULE += ccn_lite_client diff --git a/examples/ccn-lite-client/main.c b/examples/ccn-lite-client/main.c index b7d8e7c2ae..694b6fa0de 100644 --- a/examples/ccn-lite-client/main.c +++ b/examples/ccn-lite-client/main.c @@ -29,7 +29,7 @@ #include "shell.h" #include "board_uart0.h" #include "transceiver.h" -#include "rtc.h" +#include "vtimer.h" #include "ps.h" #include "ltc4150.h" @@ -214,7 +214,7 @@ static void riot_ccn_pit_test(int argc, char **argv) msg_t m; riot_ccnl_msg_t rmsg; char segment_string[16]; //max=999\0 - struct timeval now; + timex_t now; int segment; @@ -233,7 +233,7 @@ static void riot_ccn_pit_test(int argc, char **argv) msg_send(&m, relay_pid, 1); if ((segment % 50) == 0) { - rtc_time(&now); + vtimer_now(&now); printf("done: %d - %ld.%ld\n", segment, now.tv_sec, now.tv_usec); } } @@ -251,7 +251,7 @@ static void riot_ccn_fib_test(int argc, char **argv) riot_new_face(relay_pid, type, faceid, big_buf); - struct timeval now; + timex_t now; int i = -1; do { @@ -260,7 +260,7 @@ static void riot_ccn_fib_test(int argc, char **argv) riot_register_prefix(relay_pid, small_buf, faceid, big_buf); if (i % 50 == 0) { - rtc_time(&now); + vtimer_now(&now); printf("done: %d - %ld.%ld\n", i, now.tv_sec, now.tv_usec); } } diff --git a/examples/ccn-lite-relay/Makefile b/examples/ccn-lite-relay/Makefile index f9870f7624..46b9ad6a3d 100644 --- a/examples/ccn-lite-relay/Makefile +++ b/examples/ccn-lite-relay/Makefile @@ -27,14 +27,12 @@ RIOTBASE ?= $(CURDIR)/../.. # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 -BOARD_INSUFFICIENT_RAM := chronos msb-430h telosb wsn430-v1_3b wsn430-v1_4 -BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu redbee-econotag udoo z1 qemu-i386 \ +BOARD_INSUFFICIENT_RAM := chronos msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1 redbee-econotag +BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu udoo qemu-i386 \ stm32f0discovery stm32f4discovery # mbed_lpc1768: see https://github.com/RIOT-OS/RIOT/issues/675 # msb-430: see https://github.com/RIOT-OS/RIOT/issues/658 # pttu: see https://github.com/RIOT-OS/RIOT/issues/659 -# redbee-econotag: see https://github.com/RIOT-OS/RIOT/issues/676 -# z1: lacks RTC features # qemu-i386: no transceiver, yet # stm32f0discovery: no transceiver, yet # stm32f4discovery: no transceiver, yet diff --git a/sys/net/ccn_lite/ccn-lite-relay.c b/sys/net/ccn_lite/ccn-lite-relay.c index a8c4a89c7b..1fea87f4c7 100644 --- a/sys/net/ccn_lite/ccn-lite-relay.c +++ b/sys/net/ccn_lite/ccn-lite-relay.c @@ -41,7 +41,7 @@ #include "msg.h" #include "thread.h" #include "transceiver.h" -#include "hwtimer.h" +#include "vtimer.h" #include "ccnl-riot-compat.h" #include "ccn_lite/test_data/text.txt.ccnb.h" @@ -425,7 +425,7 @@ void ccnl_riot_relay_helper_start(void) { unsigned long us = CCNL_CHECK_RETRANSMIT_USEC; while (!theRelay.halt_flag) { - hwtimer_wait(HWTIMER_TICKS(us)); + vtimer_usleep(us); mutex_lock(&theRelay.global_lock); ccnl_run_events(); diff --git a/sys/net/ccn_lite/ccnl-platform.c b/sys/net/ccn_lite/ccnl-platform.c index 2622223166..12fb613e04 100644 --- a/sys/net/ccn_lite/ccnl-platform.c +++ b/sys/net/ccn_lite/ccnl-platform.c @@ -30,7 +30,7 @@ #include "ccnl-core.h" #include "ccnl-platform.h" -#include "rtc.h" +#include "vtimer.h" long timevaldelta(struct timeval *a, struct timeval *b) @@ -45,8 +45,12 @@ struct ccnl_timer_s *eventqueue; void ccnl_get_timeval(struct timeval *tv) { - //gettimeofday(tv, NULL); - rtc_time(tv); + timex_t now; + + vtimer_now(&now); + + tv->tv_sec = now.seconds; + tv->tv_usec = now.microseconds; } void *