]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fixed platform definition for btnode3
authorbeutel <beutel>
Thu, 21 Jun 2007 21:44:16 +0000 (21:44 +0000)
committerbeutel <beutel>
Thu, 21 Jun 2007 21:44:16 +0000 (21:44 +0000)
working apps are Null and Blink (on 4 leds!) - RadioCountToLed still has some weirdness...

tos/platforms/btnode3/.platform
tos/platforms/btnode3/PlatformLedsC.nc
tos/platforms/btnode3/VoltageC.nc [deleted file]
tos/platforms/btnode3/hardware.h

index f76588ceadf777b38cf6ae3cddf3915504018aab..439fdd74295fa0d0da34664ee4429131948196fd 100644 (file)
@@ -9,6 +9,7 @@
 #
 # $Id$
 #
+
 push( @includes, qw(
 
   %T/platforms/btnode3
@@ -16,20 +17,21 @@ push( @includes, qw(
   %T/platforms/mica
   %T/platforms/mica2
   %T/platforms/mica2/chips/cc1000
-  %T/chips/cc1000
+  %T/chips/cc1000_lpl
   %T/chips/atm128
   %T/chips/atm128/adc
+  %T/chips/atm128/i2c
   %T/chips/atm128/pins
   %T/chips/atm128/spi
   %T/chips/atm128/timer
+  %T/lib/timer
   %T/lib/serial
   %T/lib/power
-  %T/lib/timer
-  
+
 #  %T/platforms/mica2/chips/at45db not existent on btnode3
 #  %T/platforms/mica/chips/at45db  not existent on btnode3
 #  %T/chips/at45db
-  
+
 ) );
 
 @opts = qw(
index 085768b53212d3b99f516a6a735cd8db910d6949..32d8377463e0e73d0e0e31db561c20b1911a7d00 100644 (file)
@@ -1,7 +1,7 @@
 // $Id$
 
 /**
- * Copyright (c) 2006 ETH Zurich.  
+ * Copyright (c) 2006-2007 ETH Zurich.  
  * Copyright (c) 2004-2005 Crossbow Technology, Inc.  All rights reserved.
  *
  * Permission to use, copy, modify, and distribute this software and its
@@ -45,9 +45,9 @@ implementation
 
   Init = PlatformP.MoteInit;
     
-  Led0 = IO.PortC1;  // Pin C1 = Red LED
-  Led1 = IO.PortC3;  // Pin C3 = Green LED
+  Led0 = IO.PortC0;  // Pin C0 = Blue LED
+  Led1 = IO.PortC1;  // Pin C1 = Red LED
   Led2 = IO.PortC2;  // Pin C2 = Yellow LED
-  Led3 = IO.PortC0;  // Pin C0 = Blue LED
+  Led3 = IO.PortC3;  // Pin C3 = Green LED
 }
 
diff --git a/tos/platforms/btnode3/VoltageC.nc b/tos/platforms/btnode3/VoltageC.nc
deleted file mode 100644 (file)
index 8786d04..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/// $Id$
-
-/**
- * Copyright (c) 2006 ETH Zurich.  
- * 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 Hu Siquan <husq@xbow.com>
- * @author Jan Beutel
- */
-configuration VoltageC
-{
-  provides interface StdControl;       
-  provides interface Read<uint16_t>;
-}
-implementation
-{
-  components VoltageP, new AdcReadClientC() as VoltageChannel,
-    HplAtm128GeneralIOC as Pins;
-  
-  StdControl  = VoltageP;  
-  Read = VoltageChannel;
-  VoltageChannel.Atm128AdcConfig -> VoltageP;
-  VoltageP.BAT_MON -> Pins.PortF3;
-}
index 4a8722915fbed78d55699e6aa2d31d5c09c2e3e4..37732a76636c7aa5d8f137b355c133cff6c1953a 100644 (file)
@@ -4,7 +4,7 @@
  *  this license.  If you do not agree to this license, do not download,
  *  install, copy or use the software.
  *
- *  Copyright (c) 2006 ETH Zurich.
+ *  Copyright (c) 2006-2007 ETH Zurich.
  *  Copyright (c) 2004-2005 Crossbow Technology, Inc.
  *  Copyright (c) 2002-2003 Intel Corporation.
  *  Copyright (c) 2000-2003 The Regents of the University  of California.    
 #ifndef HARDWARE_H
 #define HARDWARE_H
 
+#ifndef MHZ
+/* Clock rate is ~8MHz except if specified by user 
+   (this value must be a power of 2, see MicaTimer.h and MeasureClockC.nc) */
+#define MHZ 8
+#endif
+
 #include <atm128hardware.h>
 #include <Atm128Adc.h>
 
@@ -54,7 +60,7 @@ enum {
 };
 
 enum {
-  PLATFORM_MHZ = 8 // Approximate clock frequency (closest power of 2)
+  PLATFORM_BAUDRATE = 57600L
 };
 
 #endif //HARDWARE_H