From dda6de8438a113c6b6313a3b07a4f760280a96cc Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 26 Mar 2009 16:22:36 +0000 Subject: [PATCH] + clock stub functions --- platform/cooja/Makefile.cooja | 6 +++--- platform/cooja/rtimer-arch.c | 8 +------- platform/cooja/rtimer-arch.h | 6 +++++- platform/cooja/sys/clock.c | 8 +++++++- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/platform/cooja/Makefile.cooja b/platform/cooja/Makefile.cooja index faf1d0a87..7f3928181 100644 --- a/platform/cooja/Makefile.cooja +++ b/platform/cooja/Makefile.cooja @@ -1,4 +1,4 @@ -# $Id: Makefile.cooja,v 1.31 2009/03/20 13:23:44 fros4943 Exp $ +# $Id: Makefile.cooja,v 1.32 2009/03/26 16:22:36 fros4943 Exp $ ## The COOJA Simulator Contiki platform Makefile ## @@ -51,7 +51,7 @@ CONTIKI_APP_OBJ = $(CONTIKI_APP).co COOJA = $(CONTIKI)/platform/$(TARGET) CONTIKI_TARGET_DIRS = . dev lib sys cfs net -COOJA_BASE = simEnvChange.c irq.c cooja_mt.c cooja_mtarch.c +COOJA_BASE = simEnvChange.c irq.c cooja_mt.c cooja_mtarch.c rtimer-arch.c COOJA_INTFS = beep.c button-sensor.c ip.c leds-arch.c moteid.c \ pir-sensor.c rs232.c vib-sensor.c \ @@ -62,7 +62,7 @@ COOJA_CORE = random.c sensors.c leds.c symbols.c # (COOJA_SOURCEFILES contains additional sources set from simulator) CONTIKI_TARGET_SOURCEFILES = \ $(COOJA_BASE) $(COOJA_INTFS) $(COOJA_CORE) $(COOJA_SOURCEFILES) - + CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) .SUFFIXES: diff --git a/platform/cooja/rtimer-arch.c b/platform/cooja/rtimer-arch.c index 0451e86da..3c4eb002d 100644 --- a/platform/cooja/rtimer-arch.c +++ b/platform/cooja/rtimer-arch.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rtimer-arch.c,v 1.2 2007/11/25 22:48:35 fros4943 Exp $ + * $Id: rtimer-arch.c,v 1.3 2009/03/26 16:22:36 fros4943 Exp $ */ #include @@ -62,9 +62,3 @@ rtimer_arch_schedule(rtimer_clock_t t) { } /*---------------------------------------------------------------------------*/ -rtimer_clock_t -rtimer_arch_now(void) -{ - return clock_time(); -} -/*---------------------------------------------------------------------------*/ diff --git a/platform/cooja/rtimer-arch.h b/platform/cooja/rtimer-arch.h index 37f3998ab..19063c5ea 100644 --- a/platform/cooja/rtimer-arch.h +++ b/platform/cooja/rtimer-arch.h @@ -28,14 +28,18 @@ * * This file is part of the Contiki operating system. * - * $Id: rtimer-arch.h,v 1.1 2007/04/11 12:46:13 fros4943 Exp $ + * $Id: rtimer-arch.h,v 1.2 2009/03/26 16:22:36 fros4943 Exp $ */ #ifndef __RTIMER_ARCH_H__ #define __RTIMER_ARCH_H__ #include "contiki-conf.h" +#include "sys/clock.h" #define RTIMER_ARCH_SECOND CLOCK_CONF_SECOND +#define rtimer_arch_now() -1 + + #endif /* __RTIMER_ARCH_H__ */ diff --git a/platform/cooja/sys/clock.c b/platform/cooja/sys/clock.c index 754a018f6..d47c8a8bd 100644 --- a/platform/cooja/sys/clock.c +++ b/platform/cooja/sys/clock.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: clock.c,v 1.1 2006/08/21 12:11:20 fros4943 Exp $ + * $Id: clock.c,v 1.2 2009/03/26 16:22:37 fros4943 Exp $ */ #include "sys/clock.h" @@ -49,6 +49,12 @@ clock_time(void) return simCurrentTime; } /*-----------------------------------------------------------------------------------*/ +unsigned long +clock_seconds(void) +{ + return 0; +} +/*-----------------------------------------------------------------------------------*/ void clock_delay(unsigned int delay_time) {