mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ccnl: use vtimer instead of rtc
This commit is contained in:
parent
0b390040f4
commit
51fa2ec5c5
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user