From: scipio Date: Thu, 13 Sep 2007 19:57:27 +0000 (+0000) Subject: This application is very out-of-date. It might be good to X-Git-Tag: release_tinyos_2_1_0_0~746 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=6c62284a00fcd74dc6bcc13342176db30ccf5360;p=tinyos-2.x.git This application is very out-of-date. It might be good to ressurect it at some point, but right now it is just compilation failure. --- diff --git a/apps/tests/mica2/I2C/Makefile b/apps/tests/mica2/I2C/Makefile deleted file mode 100644 index 0bbfd6d9..00000000 --- a/apps/tests/mica2/I2C/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -COMPONENT=TestI2CC -include $(MAKERULES) - diff --git a/apps/tests/mica2/I2C/TestI2CC.nc b/apps/tests/mica2/I2C/TestI2CC.nc deleted file mode 100644 index 655d577f..00000000 --- a/apps/tests/mica2/I2C/TestI2CC.nc +++ /dev/null @@ -1,46 +0,0 @@ -// $Id$ - -/** - * Copyright (c) 2004-2005 Crossbow Technology, Inc. All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice, the following - * two paragraphs and the author appear in all copies of this software. - * - * IN NO EVENT SHALL CROSSBOW TECHNOLOGY OR ANY OF ITS LICENSORS BE LIABLE TO - * ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL - * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN - * IF CROSSBOW OR ITS LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * CROSSBOW TECHNOLOGY AND ITS LICENSORS SPECIFICALLY DISCLAIM ALL WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND NEITHER CROSSBOW NOR ANY LICENSOR HAS ANY - * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR - * MODIFICATIONS. - */ - -/// @author Martin Turon - -/** This version of TestI2C is designed to test the ATmega128 I2C subsystem. */ -configuration TestI2CC -{ -} -implementation -{ - components - MainC, TestI2CM, LedsC, - new TimerMilliC() as Timer0, - HplAtm128I2CBusC as I2C; - //new Atm128I2CMasterC(0x58) as I2CPot; // ad5242 for mag on MTS310 - - TestI2CM -> MainC.Boot; - - - TestI2CM.Timer0 -> Timer0; - TestI2CM.Leds -> LedsC; - TestI2CM.I2C -> I2C; -} - diff --git a/apps/tests/mica2/I2C/TestI2CM.nc b/apps/tests/mica2/I2C/TestI2CM.nc deleted file mode 100644 index 7b9bcfff..00000000 --- a/apps/tests/mica2/I2C/TestI2CM.nc +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2004-2005 Crossbow Technology, Inc. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written - * agreement is hereby granted, provided that the above copyright - * notice, the (updated) modification history and the author appear in - * all copies of this source code. - * - * Permission is also granted to distribute this software under the - * standard BSD license as contained in the TinyOS distribution. - * - * 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 HOLDERS OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA, - * OR PROFITS) 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. - * - * @author Martin Turon - * - * $Id$ - */ - -/** - * Implementation for TestI2C application: - * Yellow == Every timer, post task for I2C ping if not already running - * Red & GREEN == task started - * Red == Device ping FAIL - * Green == Device ping SUCCESS - * - * @version 2005/9/11 mturon Initial version - */ - -#define I2C_DEVICE I2C_MTS300_MIC - -#define I2C_MTS310_MAG 0x58 -#define I2C_MTS300_MIC 0x5A -#define I2C_MDA300_ADC 0x94 -#define I2C_MDA300_EE 0xAE - -#include "Timer.h" - -module TestI2CM -{ - uses interface Timer as Timer0; - uses interface Leds; - uses interface Boot; - uses interface HplAtm128I2CBus as I2C; -} -implementation -{ - bool working; - - task void i2c_test() { - call Leds.led1On(); - call Leds.led0On(); - - if (call I2C.ping(I2C_DEVICE) == SUCCESS) { - call Leds.led0Off(); - } else { - call Leds.led1Off(); - } - - working = FALSE; - } - - void i2c_test_start() { - atomic { - if (!working) { - working = TRUE; - post i2c_test(); - } - } - } - - event void Boot.booted() { - working = FALSE; - call I2C.init(); - - call Timer0.startPeriodic( 10000 ); - - call Leds.led2On(); - i2c_test_start(); - } - - event void Timer0.fired() { - call Leds.led2Toggle(); - i2c_test_start(); - } - - async event void I2C.symbolSent() { } - -} -