[Tinyos-commits] CVS: tinyos-1.x/tos/platform/telos
HumidityInterruptC.nc, NONE, 1.1 HumidityC.nc, 1.1,
1.2 HumidityM.nc, 1.2, 1.3 HumidityProtocolC.nc, 1.2,
1.3 hardware.h, 1.15, 1.16
Joe Polastre
jpolastre at users.sourceforge.net
Mon Jun 13 13:59:53 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/tos/platform/telos
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv531
Modified Files:
HumidityC.nc HumidityM.nc HumidityProtocolC.nc hardware.h
Added Files:
HumidityInterruptC.nc
Log Message:
Move to a more modular design; Humidity primitives are now provided by
Humidity.h and the interrupt is provided by HumidityInterruptC. Allows you
to put the Humidity sensor on different pins than the defaults for telos
and still reuse the driver code
--- NEW FILE: HumidityInterruptC.nc ---
/* 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."
*
*/
/**
* @author Joe Polastre
*/
configuration HumidityInterruptC {
provides {
interface MSP430Interrupt;
}
}
implementation {
components MSP430InterruptC;
MSP430Interrupt = MSP430InterruptC.Port15;
}
Index: HumidityC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/telos/HumidityC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HumidityC.nc 24 Jun 2004 06:45:40 -0000 1.1
--- HumidityC.nc 13 Jun 2005 20:59:50 -0000 1.2
***************
*** 33,36 ****
--- 33,37 ----
* $Id$
*/
+ includes Humidity;
configuration HumidityC
Index: HumidityM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/telos/HumidityM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HumidityM.nc 13 Jun 2005 20:52:04 -0000 1.2
--- HumidityM.nc 13 Jun 2005 20:59:50 -0000 1.3
***************
*** 33,36 ****
--- 33,37 ----
* $Id$
*/
+ includes Humidity;
module HumidityM {
Index: HumidityProtocolC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/telos/HumidityProtocolC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HumidityProtocolC.nc 13 Jun 2005 20:52:04 -0000 1.2
--- HumidityProtocolC.nc 13 Jun 2005 20:59:50 -0000 1.3
***************
*** 45,50 ****
implementation {
components HumidityProtocolM
, TimerC
- , MSP430InterruptC
;
StdControl = HumidityProtocolM.StdControl;
--- 45,50 ----
implementation {
components HumidityProtocolM
+ , HumidityInterruptC
, TimerC
;
StdControl = HumidityProtocolM.StdControl;
***************
*** 54,58 ****
HumError = HumidityProtocolM.HumError;
! HumidityProtocolM.SensirionInterrupt -> MSP430InterruptC.Port15;
HumidityProtocolM.Timer -> TimerC.Timer[unique("Timer")];
--- 54,58 ----
HumError = HumidityProtocolM.HumError;
! HumidityProtocolM.SensirionInterrupt -> HumidityInterruptC;
HumidityProtocolM.Timer -> TimerC.Timer[unique("Timer")];
Index: hardware.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/telos/hardware.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** hardware.h 16 Mar 2005 05:12:31 -0000 1.15
--- hardware.h 13 Jun 2005 20:59:50 -0000 1.16
***************
*** 57,80 ****
TOSH_ASSIGN_PIN(GIO1, 2, 1);
- void HUMIDITY_MAKE_CLOCK_OUTPUT() { TOSH_MAKE_HUM_SCL_OUTPUT(); }
- void HUMIDITY_MAKE_CLOCK_INPUT() { TOSH_MAKE_HUM_SCL_INPUT(); }
- void HUMIDITY_CLEAR_CLOCK() { TOSH_CLR_HUM_SCL_PIN(); }
- void HUMIDITY_SET_CLOCK() { TOSH_SET_HUM_SCL_PIN(); }
- void HUMIDITY_MAKE_DATA_OUTPUT() { TOSH_MAKE_HUM_SDA_OUTPUT(); }
- void HUMIDITY_MAKE_DATA_INPUT() { TOSH_MAKE_HUM_SDA_INPUT(); }
- void HUMIDITY_CLEAR_DATA() { TOSH_CLR_HUM_SDA_PIN(); }
- void HUMIDITY_SET_DATA() { TOSH_SET_HUM_SDA_PIN(); }
- char HUMIDITY_GET_DATA() { return TOSH_READ_HUM_SDA_PIN(); }
-
- #define HUMIDITY_TIMEOUT_MS 30
- #define HUMIDITY_TIMEOUT_TRIES 20
-
- enum {
- // Sensirion Humidity addresses and commands
- TOSH_HUMIDITY_ADDR = 5,
- TOSH_HUMIDTEMP_ADDR = 3,
- TOSH_HUMIDITY_RESET = 0x1E
- };
-
// FLASH
TOSH_ASSIGN_PIN(FLASH_PWR, 4, 3);
--- 57,60 ----
More information about the Tinyos-commits
mailing list