From 7984ec38cebf3b326e88be652375d35367f6a63a Mon Sep 17 00:00:00 2001 From: joakime Date: Wed, 16 Mar 2011 13:56:29 +0100 Subject: [PATCH] fixed so that accelerometer is initialized and the isr vector is included --- platform/z1/Makefile.z1 | 2 +- platform/z1/contiki-z1-main.c | 3 +++ platform/z1/dev/adxl345.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/z1/Makefile.z1 b/platform/z1/Makefile.z1 index a470e2516..c18c67a3e 100644 --- a/platform/z1/Makefile.z1 +++ b/platform/z1/Makefile.z1 @@ -7,7 +7,7 @@ ARCH=msp430.c leds.c watchdog.c xmem.c \ spix.c cc2420.c cc2420-aes.c cc2420-arch.c cc2420-arch-sfd.c\ node-id.c sensors.c button-sensor.c cfs-coffee.c \ radio-sensor.c uart0x.c uart0-putchar.c uip-ipchksum.c \ - checkpoint-arch.c slip.c slip_uart0.c z1-phidgets.c + checkpoint-arch.c slip.c slip_uart0.c z1-phidgets.c adxl345.c i2cmaster.c CONTIKI_TARGET_DIRS = . dev apps net ifndef CONTIKI_TARGET_MAIN diff --git a/platform/z1/contiki-z1-main.c b/platform/z1/contiki-z1-main.c index 2ddfa4985..3206f6b12 100644 --- a/platform/z1/contiki-z1-main.c +++ b/platform/z1/contiki-z1-main.c @@ -69,6 +69,7 @@ SENSORS(&button_sensor); + #if DCOSYNCH_CONF_ENABLED static struct timer mgt_timer; #endif @@ -258,6 +259,8 @@ main(int argc, char **argv) set_rime_addr(); cc2420_init(); + accm_init(); + { uint8_t longaddr[8]; uint16_t shortaddr; diff --git a/platform/z1/dev/adxl345.c b/platform/z1/dev/adxl345.c index 14f6ec7b7..efa502e89 100644 --- a/platform/z1/dev/adxl345.c +++ b/platform/z1/dev/adxl345.c @@ -43,7 +43,7 @@ #include #include "contiki.h" #include "adxl345.h" -#include "cc2420-arch.c" +#include "cc2420.h" #include "i2cmaster.h" /* Callback pointers when interrupt occurs */ @@ -400,6 +400,7 @@ interrupt(PORT1_VECTOR) port1_isr (void) { } ENERGEST_OFF(ENERGEST_TYPE_IRQ); } + /*---------------------------------------------------------------------------*/