+ clock stub functions

This commit is contained in:
fros4943 2009-03-26 16:22:36 +00:00
parent 6a6bb53f2e
commit dda6de8438
4 changed files with 16 additions and 12 deletions

View File

@ -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:

View File

@ -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 <signal.h>
@ -62,9 +62,3 @@ rtimer_arch_schedule(rtimer_clock_t t)
{
}
/*---------------------------------------------------------------------------*/
rtimer_clock_t
rtimer_arch_now(void)
{
return clock_time();
}
/*---------------------------------------------------------------------------*/

View File

@ -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__ */

View File

@ -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)
{