fixed Sky platform for new sensor APIs

This commit is contained in:
joxe 2010-01-14 14:00:38 +00:00
parent 1d592b5680
commit 31ea888b75
3 changed files with 15 additions and 11 deletions

View file

@ -1,13 +1,15 @@
# $Id: Makefile.sky,v 1.29 2009/12/05 19:43:39 adamdunkels Exp $
# $Id: Makefile.sky,v 1.30 2010/01/14 14:00:38 joxe Exp $
ARCH=msp430.c leds.c watchdog.c light.c spi.c ds2411.c \
xmem.c i2c.c sht11.c battery-sensor.c acc-sensor.c ext-sensor.c \
cc2420.c cc2420-aes.c cc2420-arch.c cc2420-arch-sfd.c irq.c \
xmem.c i2c.c sht11.c light-sensor.c acc-sensor.c battery-sensor.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 uart1.c uip-ipchksum.c \
checkpoint-arch.c #slip.c slip_uart1.c
#ext-sensor.c irq.c \
CONTIKI_TARGET_DIRS = . dev apps net
ifndef CONTIKI_TARGET_MAIN
CONTIKI_TARGET_MAIN = contiki-sky-main.c

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)$Id: contiki-sky-main.c,v 1.59 2009/11/18 13:51:55 nifi Exp $
* @(#)$Id: contiki-sky-main.c,v 1.60 2010/01/14 14:00:38 joxe Exp $
*/
#include <signal.h>
@ -251,8 +251,10 @@ main(int argc, char **argv)
/*
* Initialize light and humidity/temp sensors.
*/
sensors_light_init();
battery_sensor.activate();
/*
light_sensor.configure(SENSORS_ACTIVE, (void *) 1);
battery_sensor.configure(SENSORS_ACTIVE, (void *) 1);
*/
sht11_init();
ctimer_init();
@ -353,7 +355,7 @@ main(int argc, char **argv)
}
#endif /* WITH_UIP */
button_sensor.activate();
button_sensor.configure(SENSORS_ACTIVE, (void *) 1);
energest_init();
ENERGEST_ON(ENERGEST_TYPE_CPU);

View file

@ -26,14 +26,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: battery-sensor.c,v 1.3 2010/01/14 13:53:06 joxe Exp $
* $Id: battery-sensor.c,v 1.4 2010/01/14 14:00:38 joxe Exp $
*
* -----------------------------------------------------------------
*
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne
* Created : 2005-11-01
* Updated : $Date: 2010/01/14 13:53:06 $
* $Revision: 1.3 $
* Updated : $Date: 2010/01/14 14:00:38 $
* $Revision: 1.4 $
*/
#include "dev/battery-sensor.h"
@ -41,7 +41,7 @@
#include "dev/irq.h"
const struct sensors_sensor battery_sensor;
static uint8_t active;
/*---------------------------------------------------------------------------*/
static void
activate(void)