[Tinyos-2-commits] CVS: tinyos-2.x/tos/sensorboards/mts300 SensorMts300C.nc, 1.7, 1.8 Mag.nc, 1.1, 1.2 MicReadStreamP.nc, 1.1, 1.2 MicStreamC.nc, 1.1, 1.2 ArbitratedTempDeviceP.nc, 1.1, 1.2 MagReadStreamP.nc, 1.1, 1.2 MagXStreamC.nc, 1.1, 1.2 MagConfigP.nc, 1.3, 1.4 MagXC.nc, 1.1, 1.2 MagReadP.nc, 1.1, 1.2 MagYStreamC.nc, 1.1, 1.2 TempC.nc, 1.3, 1.4 MicReadP.nc, 1.1, 1.2 MagYC.nc, 1.1, 1.2 MagP.nc, 1.2, 1.3
Razvan Musaloiu-E.
razvanm at users.sourceforge.net
Tue Jun 10 17:42:18 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/timer HalPXA27xAlarmM.nc, 1.2, 1.3 BusyWait32khzC.nc, 1.2, 1.3 HplPXA27xOSTimer.nc, 1.2, 1.3 CounterMilliC.nc, 1.2, 1.3 HalPXA27xOSTimerMapC.nc, 1.2, 1.3 HalPXA27xBusyWaitM.nc, 1.2, 1.3 HplPXA27xOSTimerWatchdog.nc, 1.2, 1.3 HalPXA27xCounterM.nc, 1.2, 1.3 Alarm32khzC.nc, 1.2, 1.3 HplPXA27xOSTimerC.nc, 1.2, 1.3 HplPXA27xOSTimerM.nc, 1.2, 1.3 Counter32khzC.nc, 1.2, 1.3 AlarmMilliC.nc, 1.2, 1.3 BusyWaitMicroC.nc, 1.2, 1.3
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/xe1205 LowPowerListening.nc, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9551/sensorboards/mts300
Modified Files:
SensorMts300C.nc Mag.nc MicReadStreamP.nc MicStreamC.nc
ArbitratedTempDeviceP.nc MagReadStreamP.nc MagXStreamC.nc
MagConfigP.nc MagXC.nc MagReadP.nc MagYStreamC.nc TempC.nc
MicReadP.nc MagYC.nc MagP.nc
Log Message:
Convert to Unix-style line terminators.
Index: SensorMts300C.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/SensorMts300C.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** SensorMts300C.nc 14 Mar 2007 04:14:13 -0000 1.7
--- SensorMts300C.nc 11 Jun 2008 00:42:14 -0000 1.8
***************
*** 1,68 ****
! /**
! * Copyright (c) 2005-2006 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 <mturon at xbow.com>
! * @author Hu Siquan <husq at xbow.com>
! *
! * $Id$
! */
!
! //configuration SensorMts300C
! generic configuration SensorMts300C()
! {
! provides
! {
! interface Mts300Sounder as Sounder; //!< sounder
! interface Read<uint16_t> as Vref; //!< voltage
! interface Read<uint16_t> as Temp; //!< Thermister
! interface Read<uint16_t> as Light; //!< Photo sensor
! interface Read<uint16_t> as Microphone; //!< Mic sensor
! interface Read<uint16_t> as AccelX; //!< Accelerometer sensor
! interface Read<uint16_t> as AccelY; //!< Accelerometer sensor
! interface Read<uint16_t> as MagX; //!< magnetometer sensor
! interface Read<uint16_t> as MagY; //!< magnetometer sensor
! }
! }
! implementation
! {
! components SounderC,
! new VoltageC(),
! new AccelXC(),
! new AccelYC(),
! new PhotoC(),
! new TempC(),
! new MicC(),
! new MagXC(),
! new MagYC();
!
! Sounder = SounderC;
! Vref = VoltageC;
! Temp = TempC;
! Light = PhotoC;
! Microphone = MicC;
! AccelX = AccelXC;
! AccelY = AccelYC;
! MagX = MagXC;
! MagY = MagYC;
! }
--- 1,68 ----
! /**
! * Copyright (c) 2005-2006 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 <mturon at xbow.com>
! * @author Hu Siquan <husq at xbow.com>
! *
! * $Id$
! */
!
! //configuration SensorMts300C
! generic configuration SensorMts300C()
! {
! provides
! {
! interface Mts300Sounder as Sounder; //!< sounder
! interface Read<uint16_t> as Vref; //!< voltage
! interface Read<uint16_t> as Temp; //!< Thermister
! interface Read<uint16_t> as Light; //!< Photo sensor
! interface Read<uint16_t> as Microphone; //!< Mic sensor
! interface Read<uint16_t> as AccelX; //!< Accelerometer sensor
! interface Read<uint16_t> as AccelY; //!< Accelerometer sensor
! interface Read<uint16_t> as MagX; //!< magnetometer sensor
! interface Read<uint16_t> as MagY; //!< magnetometer sensor
! }
! }
! implementation
! {
! components SounderC,
! new VoltageC(),
! new AccelXC(),
! new AccelYC(),
! new PhotoC(),
! new TempC(),
! new MicC(),
! new MagXC(),
! new MagYC();
!
! Sounder = SounderC;
! Vref = VoltageC;
! Temp = TempC;
! Light = PhotoC;
! Microphone = MicC;
! AccelX = AccelXC;
! AccelY = AccelYC;
! MagX = MagXC;
! MagY = MagYC;
! }
Index: Mag.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/Mag.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Mag.nc 15 Feb 2007 10:33:37 -0000 1.1
--- Mag.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,71 ****
! // $Id$
!
! /* tab:4
! * "Copyright (c) 2000-2003 The Regents of the University of California.
! * 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 THE UNIVERSITY OF CALIFORNIA 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 THE UNIVERSITY OF
! * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY 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 THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
! * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
! *
! * Copyright (c) 2002-2003 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
!
! /*
! * Authors: Alec Woo
! * Date lase modified: 8/20/02
! *
! * The MagSetting inteface provides an asynchronous mechanism for
! * setting the gain offset for the Magnetometer on the mica sensorboard.
! * This is particularly useful in calibrating the offset of the Magnetometer
! * such that X and Y axis can stay in the center for idle signals.
! * If not calibrated, the data you get may rail. (railing means
! * the data either stays at the maximum (~785) or minimum (~240)).
! *
! * The gain adjust has 256 steps ranging from 0 to 255.
! *
! */
!
! /**
! * @author Alec Woo
! */
!
! interface Mag {
! /* Effects: adjust pot setting on the X axis of the magnetometer.
! * Returns: return SUCCESS of FAILED.
! */
! command error_t gainAdjustX(uint8_t val);
!
! /* Effects: adjust pot setting on the Y axis of the magnetometer.
! * Returns: return SUCCESS of FAILED.
! */
! command error_t gainAdjustY(uint8_t val);
!
! /* Pot adjustment on the X axis of the magnetometer is finished.
! * Returns: return SUCCESS.
! */
! event error_t gainAdjustXDone(bool result);
!
! /* Pot adjustment on the Y axis of the magnetometer is finished.
! * Returns: return SUCCESS.
! */
! event error_t gainAdjustYDone(bool result);
! }
--- 1,71 ----
! // $Id$
!
! /* tab:4
! * "Copyright (c) 2000-2003 The Regents of the University of California.
! * 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 THE UNIVERSITY OF CALIFORNIA 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 THE UNIVERSITY OF
! * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY 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 THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
! * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
! *
! * Copyright (c) 2002-2003 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
!
! /*
! * Authors: Alec Woo
! * Date lase modified: 8/20/02
! *
! * The MagSetting inteface provides an asynchronous mechanism for
! * setting the gain offset for the Magnetometer on the mica sensorboard.
! * This is particularly useful in calibrating the offset of the Magnetometer
! * such that X and Y axis can stay in the center for idle signals.
! * If not calibrated, the data you get may rail. (railing means
! * the data either stays at the maximum (~785) or minimum (~240)).
! *
! * The gain adjust has 256 steps ranging from 0 to 255.
! *
! */
!
! /**
! * @author Alec Woo
! */
!
! interface Mag {
! /* Effects: adjust pot setting on the X axis of the magnetometer.
! * Returns: return SUCCESS of FAILED.
! */
! command error_t gainAdjustX(uint8_t val);
!
! /* Effects: adjust pot setting on the Y axis of the magnetometer.
! * Returns: return SUCCESS of FAILED.
! */
! command error_t gainAdjustY(uint8_t val);
!
! /* Pot adjustment on the X axis of the magnetometer is finished.
! * Returns: return SUCCESS.
! */
! event error_t gainAdjustXDone(bool result);
!
! /* Pot adjustment on the Y axis of the magnetometer is finished.
! * Returns: return SUCCESS.
! */
! event error_t gainAdjustYDone(bool result);
! }
Index: MicReadStreamP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MicReadStreamP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MicReadStreamP.nc 14 Mar 2007 05:41:52 -0000 1.1
--- MicReadStreamP.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,27 ****
! configuration MicReadStreamP
! {
! provides
! {
! interface MicSetting;
! interface ReadStream<uint16_t>[uint8_t client];
! }
! uses
! {
! interface ReadStream<uint16_t> as ActualRead[uint8_t client];
! }
! }
! implementation
! {
! enum {
! NMIC_CLIENTS = uniqueCount(UQ_MIC_RESOURCE)
! };
! components MicDeviceP,
! new ArbitratedReadStreamC(NMIC_CLIENTS, uint16_t);
!
! MicSetting = MicDeviceP;
!
! ReadStream = ArbitratedReadStreamC;
! ArbitratedReadStreamC.Resource -> MicDeviceP;
! ArbitratedReadStreamC.Service = ActualRead;
! }
!
--- 1,27 ----
! configuration MicReadStreamP
! {
! provides
! {
! interface MicSetting;
! interface ReadStream<uint16_t>[uint8_t client];
! }
! uses
! {
! interface ReadStream<uint16_t> as ActualRead[uint8_t client];
! }
! }
! implementation
! {
! enum {
! NMIC_CLIENTS = uniqueCount(UQ_MIC_RESOURCE)
! };
! components MicDeviceP,
! new ArbitratedReadStreamC(NMIC_CLIENTS, uint16_t);
!
! MicSetting = MicDeviceP;
!
! ReadStream = ArbitratedReadStreamC;
! ArbitratedReadStreamC.Resource -> MicDeviceP;
! ArbitratedReadStreamC.Service = ActualRead;
! }
!
Index: MicStreamC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MicStreamC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MicStreamC.nc 14 Mar 2007 05:41:52 -0000 1.1
--- MicStreamC.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,47 ****
! /**
! * Copyright (c) 2005-2006 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 Hu Siquan <husq at xbow.com>
! *
! * $Id$
! */
!
! #include "mts300.h"
!
! generic configuration MicStreamC() {
! provides interface ReadStream<uint16_t>;
! provides interface MicSetting;
! }
! implementation {
! enum {
! ID = unique(UQ_MIC_RESOURCE)
! };
! components MicReadStreamP, MicDeviceP, new AdcReadStreamClientC();
!
! ReadStream = MicReadStreamP.ReadStream[ID];
! MicReadStreamP.ActualRead[ID] -> AdcReadStreamClientC;
! AdcReadStreamClientC.Atm128AdcConfig -> MicDeviceP.Atm128AdcConfig;
! MicSetting = MicReadStreamP;
! }
--- 1,47 ----
! /**
! * Copyright (c) 2005-2006 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 Hu Siquan <husq at xbow.com>
! *
! * $Id$
! */
!
! #include "mts300.h"
!
! generic configuration MicStreamC() {
! provides interface ReadStream<uint16_t>;
! provides interface MicSetting;
! }
! implementation {
! enum {
! ID = unique(UQ_MIC_RESOURCE)
! };
! components MicReadStreamP, MicDeviceP, new AdcReadStreamClientC();
!
! ReadStream = MicReadStreamP.ReadStream[ID];
! MicReadStreamP.ActualRead[ID] -> AdcReadStreamClientC;
! AdcReadStreamClientC.Atm128AdcConfig -> MicDeviceP.Atm128AdcConfig;
! MicSetting = MicReadStreamP;
! }
Index: ArbitratedTempDeviceP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/ArbitratedTempDeviceP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArbitratedTempDeviceP.nc 14 Mar 2007 04:57:35 -0000 1.1
--- ArbitratedTempDeviceP.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,13 ****
! configuration ArbitratedTempDeviceP
! {
! provides interface Read<uint16_t>[uint8_t client];
! }
! implementation
! {
! components PhotoTempDeviceC,
! new ArbitratedReadC(uint16_t) as ArbitrateRead;
!
! Read = ArbitrateRead;
! ArbitrateRead.Service -> PhotoTempDeviceC.ReadTemp;
! ArbitrateRead.Resource -> PhotoTempDeviceC.TempResource;
! }
--- 1,13 ----
! configuration ArbitratedTempDeviceP
! {
! provides interface Read<uint16_t>[uint8_t client];
! }
! implementation
! {
! components PhotoTempDeviceC,
! new ArbitratedReadC(uint16_t) as ArbitrateRead;
!
! Read = ArbitrateRead;
! ArbitrateRead.Service -> PhotoTempDeviceC.ReadTemp;
! ArbitrateRead.Resource -> PhotoTempDeviceC.TempResource;
! }
Index: MagReadStreamP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagReadStreamP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MagReadStreamP.nc 14 Mar 2007 05:38:37 -0000 1.1
--- MagReadStreamP.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,63 ****
! // $Id$
!
! /* tab:4
! * "Copyright (c) 2000-2003 The Regents of the University of California.
! * 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 THE UNIVERSITY OF CALIFORNIA 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 THE UNIVERSITY OF
! * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY 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 THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
! * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
! *
! * Copyright (c) 2002-2003 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! #include "mts300.h"
!
! configuration MagReadStreamP
! {
! provides {
! interface Mag;
! interface ReadStream<uint16_t> as ReadStreamX[uint8_t client];
! interface ReadStream<uint16_t> as ReadStreamY[uint8_t client];
! }
! uses {
! interface ReadStream<uint16_t> as ActualX[uint8_t client];
! interface ReadStream<uint16_t> as ActualY[uint8_t client];
! }
! }
! implementation
! {
! enum {
! NMAG_CLIENTS = uniqueCount(UQ_MAG_RESOURCE)
! };
! components MagConfigP,
! new ArbitratedReadStreamC(NMAG_CLIENTS, uint16_t) as MultiplexX,
! new ArbitratedReadStreamC(NMAG_CLIENTS, uint16_t) as MultiplexY;
!
! Mag = MagConfigP;
!
! ReadStreamX = MultiplexX;
! MultiplexX.Resource -> MagConfigP;
! MultiplexX.Service = ActualX;
!
! ReadStreamY = MultiplexY;
! MultiplexY.Resource -> MagConfigP;
! MultiplexY.Service = ActualY;
}
\ No newline at end of file
--- 1,63 ----
! // $Id$
!
! /* tab:4
! * "Copyright (c) 2000-2003 The Regents of the University of California.
! * 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 THE UNIVERSITY OF CALIFORNIA 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 THE UNIVERSITY OF
! * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY 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 THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
! * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
! *
! * Copyright (c) 2002-2003 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! #include "mts300.h"
!
! configuration MagReadStreamP
! {
! provides {
! interface Mag;
! interface ReadStream<uint16_t> as ReadStreamX[uint8_t client];
! interface ReadStream<uint16_t> as ReadStreamY[uint8_t client];
! }
! uses {
! interface ReadStream<uint16_t> as ActualX[uint8_t client];
! interface ReadStream<uint16_t> as ActualY[uint8_t client];
! }
! }
! implementation
! {
! enum {
! NMAG_CLIENTS = uniqueCount(UQ_MAG_RESOURCE)
! };
! components MagConfigP,
! new ArbitratedReadStreamC(NMAG_CLIENTS, uint16_t) as MultiplexX,
! new ArbitratedReadStreamC(NMAG_CLIENTS, uint16_t) as MultiplexY;
!
! Mag = MagConfigP;
!
! ReadStreamX = MultiplexX;
! MultiplexX.Resource -> MagConfigP;
! MultiplexX.Service = ActualX;
!
! ReadStreamY = MultiplexY;
! MultiplexY.Resource -> MagConfigP;
! MultiplexY.Service = ActualY;
}
\ No newline at end of file
Index: MagXStreamC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagXStreamC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MagXStreamC.nc 14 Mar 2007 05:38:37 -0000 1.1
--- MagXStreamC.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,32 ****
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! *
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagXStreamC() {
! provides interface ReadStream<uint16_t>;
! provides interface Mag;
! }
! implementation {
! enum {
! ID = unique(UQ_ACCEL_RESOURCE)
! };
! components MagReadStreamP, MagConfigP, new AdcReadStreamClientC();
!
! Mag = MagReadStreamP;
!
! ReadStream = MagReadStreamP.ReadStreamX[ID];
! MagReadStreamP.ActualX[ID] -> AdcReadStreamClientC;
! AdcReadStreamClientC.Atm128AdcConfig -> MagConfigP.ConfigX;
! }
--- 1,32 ----
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! *
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagXStreamC() {
! provides interface ReadStream<uint16_t>;
! provides interface Mag;
! }
! implementation {
! enum {
! ID = unique(UQ_ACCEL_RESOURCE)
! };
! components MagReadStreamP, MagConfigP, new AdcReadStreamClientC();
!
! Mag = MagReadStreamP;
!
! ReadStream = MagReadStreamP.ReadStreamX[ID];
! MagReadStreamP.ActualX[ID] -> AdcReadStreamClientC;
! AdcReadStreamClientC.Atm128AdcConfig -> MagConfigP.ConfigX;
! }
Index: MagConfigP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagConfigP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MagConfigP.nc 14 Mar 2007 04:14:13 -0000 1.3
--- MagConfigP.nc 11 Jun 2008 00:42:14 -0000 1.4
***************
*** 1,51 ****
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * Internal component for basicsb photodiode. Arbitrates access to the photo
! * diode and automatically turns it on or off based on user requests.
! *
! * @author Alif Chen
! */
!
! #include "mts300.h"
! #include "I2C.h"
!
! configuration MagConfigP {
! provides {
! interface Mag;
! interface Resource[uint8_t client];
! interface Atm128AdcConfig as ConfigX;
! interface Atm128AdcConfig as ConfigY;
! }
! }
! implementation {
! components MagP, MicaBusC, new Atm128I2CMasterC() as I2CPot,
! new TimerMilliC() as WarmupTimer,
! new RoundRobinArbiterC(UQ_MAG_RESOURCE) as Arbiter,
! new SplitControlPowerManagerC() as PowerManager;
!
! Mag = MagP;
!
! Resource = Arbiter;
! ConfigX = MagP.ConfigX;
! ConfigY = MagP.ConfigY;
!
! PowerManager.ResourceDefaultOwner -> Arbiter;
! PowerManager.ArbiterInfo -> Arbiter;
! PowerManager.SplitControl -> MagP;
!
! MagP.I2CPacket -> I2CPot;
! MagP.I2CResource -> I2CPot;
!
! MagP.Timer -> WarmupTimer;
! MagP.MagPower -> MicaBusC.PW5;
! MagP.MagAdcX -> MicaBusC.Adc6;
! MagP.MagAdcY -> MicaBusC.Adc5;
! }
--- 1,51 ----
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * Internal component for basicsb photodiode. Arbitrates access to the photo
! * diode and automatically turns it on or off based on user requests.
! *
! * @author Alif Chen
! */
!
! #include "mts300.h"
! #include "I2C.h"
!
! configuration MagConfigP {
! provides {
! interface Mag;
! interface Resource[uint8_t client];
! interface Atm128AdcConfig as ConfigX;
! interface Atm128AdcConfig as ConfigY;
! }
! }
! implementation {
! components MagP, MicaBusC, new Atm128I2CMasterC() as I2CPot,
! new TimerMilliC() as WarmupTimer,
! new RoundRobinArbiterC(UQ_MAG_RESOURCE) as Arbiter,
! new SplitControlPowerManagerC() as PowerManager;
!
! Mag = MagP;
!
! Resource = Arbiter;
! ConfigX = MagP.ConfigX;
! ConfigY = MagP.ConfigY;
!
! PowerManager.ResourceDefaultOwner -> Arbiter;
! PowerManager.ArbiterInfo -> Arbiter;
! PowerManager.SplitControl -> MagP;
!
! MagP.I2CPacket -> I2CPot;
! MagP.I2CResource -> I2CPot;
!
! MagP.Timer -> WarmupTimer;
! MagP.MagPower -> MicaBusC.PW5;
! MagP.MagAdcX -> MicaBusC.Adc6;
! MagP.MagAdcY -> MicaBusC.Adc5;
! }
Index: MagXC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagXC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MagXC.nc 14 Mar 2007 05:38:37 -0000 1.1
--- MagXC.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,34 ****
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagXC()
! {
! provides interface Mag;
! provides interface Read<uint16_t>;
! }
! implementation {
! enum {
! ID = unique(UQ_MAG_RESOURCE)
! };
!
! components MagReadP,MagConfigP, new AdcReadClientC() as AdcX;
!
! Mag = MagReadP;
!
! Read = MagReadP.MagX[ID];
! MagReadP.ActualX[ID] -> AdcX;
! AdcX.Atm128AdcConfig -> MagConfigP.ConfigX;
! }
!
--- 1,34 ----
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagXC()
! {
! provides interface Mag;
! provides interface Read<uint16_t>;
! }
! implementation {
! enum {
! ID = unique(UQ_MAG_RESOURCE)
! };
!
! components MagReadP,MagConfigP, new AdcReadClientC() as AdcX;
!
! Mag = MagReadP;
!
! Read = MagReadP.MagX[ID];
! MagReadP.ActualX[ID] -> AdcX;
! AdcX.Atm128AdcConfig -> MagConfigP.ConfigX;
! }
!
Index: MagReadP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagReadP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MagReadP.nc 14 Mar 2007 05:38:37 -0000 1.1
--- MagReadP.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,62 ****
! // $Id$
!
! /* tab:4
! * "Copyright (c) 2000-2003 The Regents of the University of California.
! * 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 THE UNIVERSITY OF CALIFORNIA 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 THE UNIVERSITY OF
! * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY 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 THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
! * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
! *
! * Copyright (c) 2002-2003 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! #include "mts300.h"
!
! configuration MagReadP
! {
! provides
! {
! interface Mag;
! interface Read<uint16_t> as MagX[uint8_t client];
! interface Read<uint16_t> as MagY[uint8_t client];
! }
! uses
! {
! interface Read<uint16_t> as ActualX[uint8_t client];
! interface Read<uint16_t> as ActualY[uint8_t client];
! }
! }
! implementation
! {
! components MagConfigP,
! new ArbitratedReadC(uint16_t) as AdcX,
! new ArbitratedReadC(uint16_t) as AdcY;
!
! Mag = MagConfigP;
!
! MagX = AdcX;
! AdcX.Resource -> MagConfigP;
! AdcX.Service = ActualX;
!
! MagY = AdcY;
! AdcY.Resource -> MagConfigP;
! AdcY.Service = ActualY;
! }
--- 1,62 ----
! // $Id$
!
! /* tab:4
! * "Copyright (c) 2000-2003 The Regents of the University of California.
! * 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 THE UNIVERSITY OF CALIFORNIA 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 THE UNIVERSITY OF
! * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY 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 THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
! * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
! *
! * Copyright (c) 2002-2003 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! #include "mts300.h"
!
! configuration MagReadP
! {
! provides
! {
! interface Mag;
! interface Read<uint16_t> as MagX[uint8_t client];
! interface Read<uint16_t> as MagY[uint8_t client];
! }
! uses
! {
! interface Read<uint16_t> as ActualX[uint8_t client];
! interface Read<uint16_t> as ActualY[uint8_t client];
! }
! }
! implementation
! {
! components MagConfigP,
! new ArbitratedReadC(uint16_t) as AdcX,
! new ArbitratedReadC(uint16_t) as AdcY;
!
! Mag = MagConfigP;
!
! MagX = AdcX;
! AdcX.Resource -> MagConfigP;
! AdcX.Service = ActualX;
!
! MagY = AdcY;
! AdcY.Resource -> MagConfigP;
! AdcY.Service = ActualY;
! }
Index: MagYStreamC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagYStreamC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MagYStreamC.nc 14 Mar 2007 05:38:37 -0000 1.1
--- MagYStreamC.nc 11 Jun 2008 00:42:14 -0000 1.2
***************
*** 1,31 ****
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagYStreamC() {
! provides interface ReadStream<uint16_t>;
! provides interface Mag;
! }
! implementation {
! enum {
! ID = unique(UQ_ACCEL_RESOURCE)
! };
! components MagReadStreamP, MagConfigP, new AdcReadStreamClientC();
!
! Mag = MagReadStreamP;
!
! ReadStream = MagReadStreamP.ReadStreamY[ID];
! MagReadStreamP.ActualY[ID] -> AdcReadStreamClientC;
! AdcReadStreamClientC.Atm128AdcConfig -> MagConfigP.ConfigY;
! }
--- 1,31 ----
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagYStreamC() {
! provides interface ReadStream<uint16_t>;
! provides interface Mag;
! }
! implementation {
! enum {
! ID = unique(UQ_ACCEL_RESOURCE)
! };
! components MagReadStreamP, MagConfigP, new AdcReadStreamClientC();
!
! Mag = MagReadStreamP;
!
! ReadStream = MagReadStreamP.ReadStreamY[ID];
! MagReadStreamP.ActualY[ID] -> AdcReadStreamClientC;
! AdcReadStreamClientC.Atm128AdcConfig -> MagConfigP.ConfigY;
! }
Index: TempC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/TempC.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TempC.nc 14 Mar 2007 04:14:14 -0000 1.3
--- TempC.nc 11 Jun 2008 00:42:15 -0000 1.4
***************
*** 1,25 ****
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * Photodiode of the mts300 sensor board.
! *
! * @author David Gay
! */
!
! #include "mts300.h"
!
! generic configuration TempC() {
! provides interface Read<uint16_t>;
! }
! implementation {
! components ArbitratedTempDeviceP;
!
! Read = ArbitratedTempDeviceP.Read[unique(UQ_TEMP_RESOURCE)];
! }
--- 1,25 ----
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * Photodiode of the mts300 sensor board.
! *
! * @author David Gay
! */
!
! #include "mts300.h"
!
! generic configuration TempC() {
! provides interface Read<uint16_t>;
! }
! implementation {
! components ArbitratedTempDeviceP;
!
! Read = ArbitratedTempDeviceP.Read[unique(UQ_TEMP_RESOURCE)];
! }
Index: MicReadP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MicReadP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MicReadP.nc 14 Mar 2007 05:41:52 -0000 1.1
--- MicReadP.nc 11 Jun 2008 00:42:15 -0000 1.2
***************
*** 1,21 ****
! configuration MicReadP
! {
! provides
! {
! interface Read<uint16_t>[uint8_t client];
! }
! uses
! {
! interface Read<uint16_t> as ActualRead[uint8_t client];
! }
! }
! implementation
! {
! components MicDeviceP,
! new ArbitratedReadC(uint16_t);
!
! Read = ArbitratedReadC;
! ArbitratedReadC.Resource -> MicDeviceP;
! ArbitratedReadC.Service = ActualRead;
! }
!
--- 1,21 ----
! configuration MicReadP
! {
! provides
! {
! interface Read<uint16_t>[uint8_t client];
! }
! uses
! {
! interface Read<uint16_t> as ActualRead[uint8_t client];
! }
! }
! implementation
! {
! components MicDeviceP,
! new ArbitratedReadC(uint16_t);
!
! Read = ArbitratedReadC;
! ArbitratedReadC.Resource -> MicDeviceP;
! ArbitratedReadC.Service = ActualRead;
! }
!
Index: MagYC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagYC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MagYC.nc 14 Mar 2007 05:38:37 -0000 1.1
--- MagYC.nc 11 Jun 2008 00:42:15 -0000 1.2
***************
*** 1,34 ****
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagYC()
! {
! provides interface Mag;
! provides interface Read<uint16_t>;
! }
! implementation {
! enum {
! ID = unique(UQ_MAG_RESOURCE)
! };
!
! components MagReadP,MagConfigP, new AdcReadClientC() as AdcY;
!
! Mag = MagReadP;
!
! Read = MagReadP.MagY[ID];
! MagReadP.ActualY[ID] -> AdcY;
! AdcY.Atm128AdcConfig -> MagConfigP.ConfigY;
! }
!
--- 1,34 ----
! /* $Id$
! * Copyright (c) 2006 Intel Corporation
! * All rights reserved.
! *
! * This file is distributed under the terms in the attached INTEL-LICENSE
! * file. If you do not find these files, copies can be found by writing to
! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
! * 94704. Attention: Intel License Inquiry.
! */
! /**
! * @author Alif Chen
! */
!
! #include "mts300.h"
!
! generic configuration MagYC()
! {
! provides interface Mag;
! provides interface Read<uint16_t>;
! }
! implementation {
! enum {
! ID = unique(UQ_MAG_RESOURCE)
! };
!
! components MagReadP,MagConfigP, new AdcReadClientC() as AdcY;
!
! Mag = MagReadP;
!
! Read = MagReadP.MagY[ID];
! MagReadP.ActualY[ID] -> AdcY;
! AdcY.Atm128AdcConfig -> MagConfigP.ConfigY;
! }
!
Index: MagP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/sensorboards/mts300/MagP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MagP.nc 14 Mar 2007 03:25:05 -0000 1.2
--- MagP.nc 11 Jun 2008 00:42:15 -0000 1.3
***************
*** 1,124 ****
! #include "mts300.h"
! #include "Timer.h"
! #include "I2C.h"
!
! module MagP
! {
! provides interface SplitControl;
! provides interface Mag;
! provides interface Atm128AdcConfig as ConfigX;
! provides interface Atm128AdcConfig as ConfigY;
!
! uses interface Timer<TMilli>;
! uses interface GeneralIO as MagPower;
! uses interface MicaBusAdc as MagAdcX;
! uses interface MicaBusAdc as MagAdcY;
! uses interface I2CPacket<TI2CBasicAddr>;
! uses interface Resource as I2CResource;
! }
!
! implementation
! {
! uint8_t gainData[2];
!
! command error_t SplitControl.start()
! {
! call MagPower.makeOutput();
! call MagPower.set();
!
! call Timer.startOneShot(100);
! return SUCCESS;
! }
!
! event void Timer.fired() {
! signal SplitControl.startDone(SUCCESS);
! }
!
! command error_t SplitControl.stop()
! {
! call MagPower.clr();
! call MagPower.makeInput();
!
! signal SplitControl.stopDone(SUCCESS);
! return SUCCESS;
! }
!
! command error_t Mag.gainAdjustX(uint8_t val)
! {
! gainData[0] = 1; // pot subaddr
! gainData[1] = val; // value to write
! return call I2CResource.request();
! }
! command error_t Mag.gainAdjustY(uint8_t val)
! {
! gainData[0] = 0; // pot subaddr
! gainData[1] = val; // value to write
! return call I2CResource.request();
! }
! /**
! * Resource request
! *
! */
! event void I2CResource.granted()
! {
! if ( call I2CPacket.write(0x3,TOS_MAG_POT_ADDR, 2, gainData) == SUCCESS)
! {
! return ;
! }
! }
! /**
! * I2CPot2
! *
! */
! async event void I2CPacket.readDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
! {
! return ;
! }
!
! async event void I2CPacket.writeDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
! {
! call I2CResource.release();
! if (gainData[0] ==1)
! {
! signal Mag.gainAdjustXDone(error);
! }
! if (gainData[0] ==0)
! {
! signal Mag.gainAdjustYDone(error);
! }
! return ;
! }
!
! async command uint8_t ConfigX.getChannel() {
! return call MagAdcX.getChannel();
! }
!
! async command uint8_t ConfigX.getRefVoltage() {
! return ATM128_ADC_VREF_OFF;
! }
!
! async command uint8_t ConfigX.getPrescaler() {
! return ATM128_ADC_PRESCALE;
! }
!
! async command uint8_t ConfigY.getChannel() {
! return call MagAdcY.getChannel();
! }
!
! async command uint8_t ConfigY.getRefVoltage() {
! return ATM128_ADC_VREF_OFF;
! }
!
! async command uint8_t ConfigY.getPrescaler() {
! return ATM128_ADC_PRESCALE;
! }
!
! default event error_t Mag.gainAdjustXDone(bool result)
! {
! return result;
! }
! default event error_t Mag.gainAdjustYDone(bool result)
! {
! return result;
! }
}
\ No newline at end of file
--- 1,124 ----
! #include "mts300.h"
! #include "Timer.h"
! #include "I2C.h"
!
! module MagP
! {
! provides interface SplitControl;
! provides interface Mag;
! provides interface Atm128AdcConfig as ConfigX;
! provides interface Atm128AdcConfig as ConfigY;
!
! uses interface Timer<TMilli>;
! uses interface GeneralIO as MagPower;
! uses interface MicaBusAdc as MagAdcX;
! uses interface MicaBusAdc as MagAdcY;
! uses interface I2CPacket<TI2CBasicAddr>;
! uses interface Resource as I2CResource;
! }
!
! implementation
! {
! uint8_t gainData[2];
!
! command error_t SplitControl.start()
! {
! call MagPower.makeOutput();
! call MagPower.set();
!
! call Timer.startOneShot(100);
! return SUCCESS;
! }
!
! event void Timer.fired() {
! signal SplitControl.startDone(SUCCESS);
! }
!
! command error_t SplitControl.stop()
! {
! call MagPower.clr();
! call MagPower.makeInput();
!
! signal SplitControl.stopDone(SUCCESS);
! return SUCCESS;
! }
!
! command error_t Mag.gainAdjustX(uint8_t val)
! {
! gainData[0] = 1; // pot subaddr
! gainData[1] = val; // value to write
! return call I2CResource.request();
! }
! command error_t Mag.gainAdjustY(uint8_t val)
! {
! gainData[0] = 0; // pot subaddr
! gainData[1] = val; // value to write
! return call I2CResource.request();
! }
! /**
! * Resource request
! *
! */
! event void I2CResource.granted()
! {
! if ( call I2CPacket.write(0x3,TOS_MAG_POT_ADDR, 2, gainData) == SUCCESS)
! {
! return ;
! }
! }
! /**
! * I2CPot2
! *
! */
! async event void I2CPacket.readDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
! {
! return ;
! }
!
! async event void I2CPacket.writeDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
! {
! call I2CResource.release();
! if (gainData[0] ==1)
! {
! signal Mag.gainAdjustXDone(error);
! }
! if (gainData[0] ==0)
! {
! signal Mag.gainAdjustYDone(error);
! }
! return ;
! }
!
! async command uint8_t ConfigX.getChannel() {
! return call MagAdcX.getChannel();
! }
!
! async command uint8_t ConfigX.getRefVoltage() {
! return ATM128_ADC_VREF_OFF;
! }
!
! async command uint8_t ConfigX.getPrescaler() {
! return ATM128_ADC_PRESCALE;
! }
!
! async command uint8_t ConfigY.getChannel() {
! return call MagAdcY.getChannel();
! }
!
! async command uint8_t ConfigY.getRefVoltage() {
! return ATM128_ADC_VREF_OFF;
! }
!
! async command uint8_t ConfigY.getPrescaler() {
! return ATM128_ADC_PRESCALE;
! }
!
! default event error_t Mag.gainAdjustXDone(bool result)
! {
! return result;
! }
! default event error_t Mag.gainAdjustYDone(bool result)
! {
! return result;
! }
}
\ No newline at end of file
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/timer HalPXA27xAlarmM.nc, 1.2, 1.3 BusyWait32khzC.nc, 1.2, 1.3 HplPXA27xOSTimer.nc, 1.2, 1.3 CounterMilliC.nc, 1.2, 1.3 HalPXA27xOSTimerMapC.nc, 1.2, 1.3 HalPXA27xBusyWaitM.nc, 1.2, 1.3 HplPXA27xOSTimerWatchdog.nc, 1.2, 1.3 HalPXA27xCounterM.nc, 1.2, 1.3 Alarm32khzC.nc, 1.2, 1.3 HplPXA27xOSTimerC.nc, 1.2, 1.3 HplPXA27xOSTimerM.nc, 1.2, 1.3 Counter32khzC.nc, 1.2, 1.3 AlarmMilliC.nc, 1.2, 1.3 BusyWaitMicroC.nc, 1.2, 1.3
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/xe1205 LowPowerListening.nc, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list