mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-18 12:05:11 +00:00
Z1: cleaned up non-required libraries from builds and moved SENSORS declaration to its own file
This commit is contained in:
parent
3550d43b47
commit
26c4a81331
@ -7,8 +7,11 @@ ZOLERTIA_Z1SP=0
|
||||
|
||||
CONTIKI_PROJECT = test-phidgets blink test-adxl345 test-tmp102 test-light-ziglet
|
||||
CONTIKI_PROJECT += test-battery test-relay-phidget test-tlc59116 test-sht25
|
||||
CONTIKI_SOURCEFILES += sht11.c reed-sensor.c
|
||||
APPS=serial-shell
|
||||
|
||||
CONTIKI_SOURCEFILES += reed-sensor.c sht25.c tlc59116.c light-ziglet.c \
|
||||
relay-phidget.c
|
||||
|
||||
MODULES += dev/sht11
|
||||
|
||||
ifeq ($(ZOLERTIA_Z1SP),1)
|
||||
CONTIKI_PROJECT += test-potent
|
||||
|
@ -12,14 +12,12 @@ endif
|
||||
|
||||
CLEAN += symbols.c symbols.h
|
||||
|
||||
ARCH=msp430.c leds.c watchdog.c xmem.c \
|
||||
spi.c cc2420.c cc2420-arch.c cc2420-arch-sfd.c\
|
||||
node-id.c sensors.c button-sensor.c cfs-coffee.c \
|
||||
radio-sensor.c uart0.c uart0-putchar.c uip-ipchksum.c \
|
||||
slip.c slip_uart0.c \
|
||||
z1-phidgets.c sht11.c sht11-sensor.c light-sensor.c \
|
||||
battery-sensor.c sky-sensors.c tmp102.c temperature-sensor.c light-ziglet.c \
|
||||
relay-phidget.c tlc59116.c sht25.c
|
||||
ARCH = msp430.c leds.c watchdog.c xmem.c i2cmaster.c \
|
||||
spi.c cc2420.c cc2420-arch.c cc2420-arch-sfd.c\
|
||||
node-id.c sensors.c button-sensor.c cfs-coffee.c \
|
||||
radio-sensor.c uart0.c uart0-putchar.c uip-ipchksum.c \
|
||||
slip.c slip_uart0.c z1-sensors.c adxl345.c temperature-sensor.c \
|
||||
z1-phidgets.c light-sensor.c battery-sensor.c sky-sensors.c tmp102.c
|
||||
|
||||
CONTIKI_TARGET_DIRS = . dev apps net
|
||||
ifndef CONTIKI_TARGET_MAIN
|
||||
@ -31,7 +29,6 @@ CFLAGS += -DMACID=$(nodemac)
|
||||
endif
|
||||
|
||||
CONTIKI_TARGET_SOURCEFILES += $(ARCH) $(UIPDRIVERS)
|
||||
CONTIKI_TARGET_SOURCEFILES += i2cmaster.c adxl345.c
|
||||
|
||||
MCU=msp430f2617
|
||||
|
||||
|
@ -12,4 +12,4 @@ endif
|
||||
MODULES += core/net \
|
||||
core/net/mac core/net/mac/contikimac \
|
||||
core/net/llsec \
|
||||
dev/cc2420 dev/sht11
|
||||
dev/cc2420
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "lib/random.h"
|
||||
#include "net/netstack.h"
|
||||
#include "net/mac/frame802154.h"
|
||||
#include "dev/button-sensor.h"
|
||||
#include "dev/adxl345.h"
|
||||
#include "sys/clock.h"
|
||||
|
||||
@ -58,12 +57,6 @@
|
||||
#include "cfs/cfs-coffee.h"
|
||||
#include "sys/autostart.h"
|
||||
|
||||
#include "dev/battery-sensor.h"
|
||||
#include "dev/button-sensor.h"
|
||||
#include "dev/sht11/sht11-sensor.h"
|
||||
|
||||
SENSORS(&button_sensor);
|
||||
|
||||
extern unsigned char node_mac[8];
|
||||
|
||||
#if DCOSYNCH_CONF_ENABLED
|
||||
@ -279,7 +272,7 @@ main(int argc, char **argv)
|
||||
set_rime_addr();
|
||||
|
||||
cc2420_init();
|
||||
accm_init();
|
||||
SENSORS_ACTIVATE(adxl345);
|
||||
|
||||
{
|
||||
uint8_t longaddr[8];
|
||||
|
47
platform/z1/dev/z1-sensors.c
Normal file
47
platform/z1/dev/z1-sensors.c
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Zolertia - http://www.zolertia.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \file
|
||||
* Zolertia Z1 on-board sensors
|
||||
* \author
|
||||
* Antonio Lignan, Zolertia <alinan@zolertia.com>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "contiki.h"
|
||||
#include "lib/sensors.h"
|
||||
#include "dev/button-sensor.h"
|
||||
#include "dev/tmp102.h"
|
||||
#include "dev/adxl345.h"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** \brief Exports global symbols for the sensor API */
|
||||
SENSORS(&button_sensor, &adxl345, &tmp102);
|
||||
/*---------------------------------------------------------------------------*/
|
Loading…
Reference in New Issue
Block a user