[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/tsb
AccelDriverC.nc, 1.2, 1.3 AccelDriverM.nc, 1.2, 1.3 Accel.h,
1.2, 1.3 sensorboard.h, 1.2, 1.3
Joe Polastre
jpolastre at users.sourceforge.net
Wed Aug 3 17:13:17 PDT 2005
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/chips/AD524X/v2 AD524X.h, NONE,
1.1 AD524X.nc, NONE, 1.1 AD524XC.nc, NONE, 1.1 AD524XM.nc, NONE, 1.1
- Next message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Drain/tools/java/net/tinyos/drain
Drain.java, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/tsb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31815
Modified Files:
AccelDriverC.nc AccelDriverM.nc Accel.h sensorboard.h
Log Message:
updated for the final revision of the tsb
the earlier prototype revision has been tagged as tsb-rev-a in case you
ever need that code again
Index: AccelDriverC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/tsb/AccelDriverC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AccelDriverC.nc 11 Mar 2005 04:23:53 -0000 1.2
--- AccelDriverC.nc 4 Aug 2005 00:13:02 -0000 1.3
***************
*** 19,26 ****
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
*
! */
! /*
*
! * Authors: Joe Polastre
*
* $Id$
--- 19,31 ----
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
*
! * Copyright (c) 2005 Moteiv Corporation
! * All rights reserved.
*
! * This file is distributed under the terms in the attached MOTEIV-LICENSE
! * file. If you do not find these files, copies can be found at
! * http://www.moteiv.com/MOTEIV-LICENSE.txt and by emailing info at moteiv.com.
! */
! /**
! * @author Joe Polastre <info at moteiv.com>
*
* $Id$
***************
*** 42,46 ****
implementation
{
! components AccelDriverM, ADCC, AD5242C, MSP430InterruptC, LedsC;
AccelDriverM.Leds -> LedsC;
--- 47,51 ----
implementation
{
! components AccelDriverM, ADCC, AD524XC, MSP430InterruptC, LedsC;
AccelDriverM.Leds -> LedsC;
***************
*** 54,59 ****
AccelDriverM.ADCStdControl -> ADCC;
AccelDriverM.ADCControl -> ADCC;
! AccelDriverM.AD5242 -> AD5242C;
! AccelDriverM.AD5242Control -> AD5242C;
AccelDriverM.AccelInt -> MSP430InterruptC.Port23; // GIO2
--- 59,64 ----
AccelDriverM.ADCStdControl -> ADCC;
AccelDriverM.ADCControl -> ADCC;
! AccelDriverM.AD524X -> AD524XC;
! AccelDriverM.AD524XControl -> AD524XC;
AccelDriverM.AccelInt -> MSP430InterruptC.Port23; // GIO2
Index: AccelDriverM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/tsb/AccelDriverM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AccelDriverM.nc 11 Mar 2005 04:23:54 -0000 1.2
--- AccelDriverM.nc 4 Aug 2005 00:13:14 -0000 1.3
***************
*** 19,26 ****
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
*/
/**
! * @author Joe Polastre
* Revision: $Revision$
*
--- 19,33 ----
* ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
+ *
+ * Copyright (c) 2005 Moteiv Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached MOTEIV-LICENSE
+ * file. If you do not find these files, copies can be found at
+ * http://www.moteiv.com/MOTEIV-LICENSE.txt and by emailing info at moteiv.com.
*/
/**
! * @author Joe Polastre <info at moteiv.com>
* Revision: $Revision$
*
***************
*** 37,45 ****
}
uses {
! interface AD5242;
interface ADCControl;
interface StdControl as ADCStdControl;
interface StdControl as PotControl;
! interface StdControl as AD5242Control;
interface MSP430Interrupt as AccelInt;
interface Leds;
--- 44,52 ----
}
uses {
! interface AD524X;
interface ADCControl;
interface StdControl as ADCStdControl;
interface StdControl as PotControl;
! interface StdControl as AD524XControl;
interface MSP430Interrupt as AccelInt;
interface Leds;
***************
*** 73,77 ****
}
call ADCStdControl.init();
! call AD5242Control.init();
return post initDone();
}
--- 80,84 ----
}
call ADCStdControl.init();
! call AD524XControl.init();
return post initDone();
}
***************
*** 97,107 ****
TOSH_SEL_ADC0_MODFUNC();
TOSH_SEL_ADC1_MODFUNC();
! call AD5242Control.start();
! return call AD5242.start(AD5242_ACCEL_ADDR);
}
return FAIL;
}
! event void AD5242.startDone(uint8_t _addr, result_t _result) {
uint8_t _state = OFF;
atomic {
--- 104,114 ----
TOSH_SEL_ADC0_MODFUNC();
TOSH_SEL_ADC1_MODFUNC();
! call AD524XControl.start();
! return call AD524X.start(ACCEL_ADDR, ACCEL_TYPE);
}
return FAIL;
}
! event void AD524X.startDone(uint8_t addr, result_t result, ad524x_type_t type) {
uint8_t _state = OFF;
atomic {
***************
*** 112,116 ****
}
if (_state == START_O) {
! if (!(call AD5242.setOutput2(AD5242_ACCEL_ADDR, TRUE))) {
atomic state = IDLE;
signal SplitControl.startDone();
--- 119,123 ----
}
if (_state == START_O) {
! if (!(call AD524X.setOutput(ACCEL_ON_ADDR, ACCEL_ON_OUTPUT, TRUE, ACCEL_ON_TYPE))) {
atomic state = IDLE;
signal SplitControl.startDone();
***************
*** 132,141 ****
TOSH_SEL_ADC0_IOFUNC();
TOSH_SEL_ADC1_IOFUNC();
! return call AD5242.stop(AD5242_ACCEL_ADDR);
}
return FAIL;
}
!
! event void AD5242.stopDone(uint8_t _addr, result_t _result) {
uint8_t _state = OFF;
atomic {
--- 139,148 ----
TOSH_SEL_ADC0_IOFUNC();
TOSH_SEL_ADC1_IOFUNC();
! return call AD524X.stop(ACCEL_ADDR, ACCEL_TYPE);
}
return FAIL;
}
!
! event void AD524X.stopDone(uint8_t addr, result_t result, ad524x_type_t type) {
uint8_t _state = OFF;
atomic {
***************
*** 146,150 ****
}
if (_state == STOP_O) {
! if (!(call AD5242.setOutput2(AD5242_ACCEL_ADDR, FALSE))) {
atomic state = IDLE;
signal SplitControl.stopDone();
--- 153,157 ----
}
if (_state == STOP_O) {
! if (!(call AD524X.setOutput(ACCEL_ON_ADDR, ACCEL_ON_OUTPUT, FALSE, ACCEL_ON_TYPE))) {
atomic state = IDLE;
signal SplitControl.stopDone();
***************
*** 153,162 ****
}
! event void AD5242.setOutput1Done(uint8_t _addr, result_t _result) { }
!
! event void AD5242.setPot1Done(uint8_t _addr, result_t _result) { }
! event void AD5242.getPot1Done(uint8_t _addr, uint8_t _val, result_t _result) { }
! event void AD5242.getPot2Done(uint8_t _addr, uint8_t _val, result_t _result) { }
! event void AD5242.setPot2Done(uint8_t _addr, result_t _result) {
uint8_t _state = OFF;
atomic {
--- 160,164 ----
}
! event void AD524X.setPotDone(uint8_t addr, bool rdac, result_t _result, ad524x_type_t type) {
uint8_t _state = OFF;
atomic {
***************
*** 171,176 ****
}
}
!
! event void AD5242.setOutput2Done(uint8_t _addr, result_t _result) {
uint8_t _state = OFF;
atomic {
--- 173,178 ----
}
}
!
! event void AD524X.setOutputDone(uint8_t addr, bool output, result_t result, ad524x_type_t type) {
uint8_t _state = OFF;
atomic {
***************
*** 184,192 ****
signal SplitControl.startDone();
else if (_state == STOP_O) {
! call AD5242Control.stop();
signal SplitControl.stopDone();
}
}
command result_t AccelInterruptSettings.set(uint8_t _gain) {
uint8_t _state = OFF;
--- 186,196 ----
signal SplitControl.startDone();
else if (_state == STOP_O) {
! call AD524XControl.stop();
signal SplitControl.stopDone();
}
}
+ event void AD524X.getPotDone(uint8_t addr, bool rdac, uint8_t value, result_t result, ad524x_type_t type) { }
+
command result_t AccelInterruptSettings.set(uint8_t _gain) {
uint8_t _state = OFF;
***************
*** 199,203 ****
if (_state == GAIN) {
atomic gain = _gain;
! return call AD5242.setPot2(AD5242_ACCEL_ADDR, gain);
}
return FAIL;
--- 203,209 ----
if (_state == GAIN) {
atomic gain = _gain;
! if (call AD524X.setPot(ACCEL_INT_THRESH_ADDR, ACCEL_INT_THRESH_RDAC, gain, ACCEL_INT_THRESH_TYPE) == FAIL) {
! state = IDLE;
! }
}
return FAIL;
Index: Accel.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/tsb/Accel.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Accel.h 22 Feb 2005 01:28:23 -0000 1.2
--- Accel.h 4 Aug 2005 00:13:14 -0000 1.3
***************
*** 1,9 ****
#ifndef _H_ACCEL_H
#define _H_ACCEL_H
#include "MSP430ADC12.h"
enum {
! AD5242_ACCEL_ADDR = 0x02,
};
--- 1,27 ----
+ /*
+ * Copyright (c) 2005 Moteiv Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached MOTEIV-LICENSE
+ * file. If you do not find these files, copies can be found at
+ * http://www.moteiv.com/MOTEIV-LICENSE.txt and by emailing info at moteiv.com.
+ */
#ifndef _H_ACCEL_H
#define _H_ACCEL_H
+ #include "AD524X.h"
#include "MSP430ADC12.h"
enum {
! ACCEL_ADDR = 0x03, // 0x2F 1Mohm pot
! ACCEL_TYPE = TYPE_AD5241,
!
! ACCEL_ON_ADDR = 0x03,
! ACCEL_ON_OUTPUT = 0x00,
! ACCEL_ON_TYPE = TYPE_AD5241,
!
! ACCEL_INT_THRESH_ADDR = 0x03,
! ACCEL_INT_THRESH_RDAC = 0,
! ACCEL_INT_THRESH_TYPE = TYPE_AD5241,
};
***************
*** 12,16 ****
TOS_ADC_ACCELX_PORT = unique("ADCPort"),
TOS_ADC_ACCELY_PORT = unique("ADCPort"),
!
TOSH_ACTUAL_ADC_ACCELX_PORT = ASSOCIATE_ADC_CHANNEL(
INPUT_CHANNEL_A0,
--- 30,34 ----
TOS_ADC_ACCELX_PORT = unique("ADCPort"),
TOS_ADC_ACCELY_PORT = unique("ADCPort"),
!
TOSH_ACTUAL_ADC_ACCELX_PORT = ASSOCIATE_ADC_CHANNEL(
INPUT_CHANNEL_A0,
***************
*** 18,21 ****
--- 36,41 ----
REFVOLT_LEVEL_2_5
),
+
+
TOSH_ACTUAL_ADC_ACCELY_PORT = ASSOCIATE_ADC_CHANNEL(
INPUT_CHANNEL_A1,
***************
*** 23,26 ****
--- 43,47 ----
REFVOLT_LEVEL_2_5
),
+
};
Index: sensorboard.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/tsb/sensorboard.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sensorboard.h 11 Mar 2005 04:23:54 -0000 1.2
--- sensorboard.h 4 Aug 2005 00:13:14 -0000 1.3
***************
*** 1,2 ****
--- 1,10 ----
+ /*
+ * Copyright (c) 2005 Moteiv Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached MOTEIV-LICENSE
+ * file. If you do not find these files, copies can be found at
+ * http://www.moteiv.com/MOTEIV-LICENSE.txt and by emailing info at moteiv.com.
+ */
#ifndef _H_sensorboard_h
#define _H_sensorboard_h
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/chips/AD524X/v2 AD524X.h, NONE,
1.1 AD524X.nc, NONE, 1.1 AD524XC.nc, NONE, 1.1 AD524XM.nc, NONE, 1.1
- Next message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Drain/tools/java/net/tinyos/drain
Drain.java, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-beta-commits
mailing list