[Tinyos-commits] CVS: tinyos-1.x/tos/platform/mica2 ADCC.nc, 1.3,
1.4 ADCREFM.nc, 1.6, 1.7
David Gay
idgay at users.sourceforge.net
Fri Apr 28 10:59:28 PDT 2006
Update of /cvsroot/tinyos/tinyos-1.x/tos/platform/mica2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4313
Modified Files:
ADCC.nc ADCREFM.nc
Log Message:
power management needs to know about adc state changes
Index: ADCC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/mica2/ADCC.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ADCC.nc 20 Nov 2003 01:37:33 -0000 1.3
--- ADCC.nc 28 Apr 2006 17:59:26 -0000 1.4
***************
*** 46,50 ****
implementation
{
! components Main, ADCREFM as ADCM, HPLADCM, TimerC;
Main.StdControl -> TimerC;
--- 46,50 ----
implementation
{
! components Main, ADCREFM as ADCM, HPLADCM, TimerC, HPLPowerManagementM;
Main.StdControl -> TimerC;
***************
*** 56,60 ****
ADCM.Timer -> TimerC.Timer[unique("Timer")];
ADCM.HPLADC -> HPLADCM;
!
}
--- 56,60 ----
ADCM.Timer -> TimerC.Timer[unique("Timer")];
ADCM.HPLADC -> HPLADCM;
! ADCM.PowerManagement -> HPLPowerManagementM;
}
Index: ADCREFM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/mica2/ADCREFM.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ADCREFM.nc 19 May 2005 17:35:00 -0000 1.6
--- ADCREFM.nc 28 Apr 2006 17:59:26 -0000 1.7
***************
*** 71,81 ****
interface HPLADC;
interface Timer;
}
-
}
-
implementation
{
-
enum {
IDLE = 0,
--- 71,79 ----
interface HPLADC;
interface Timer;
+ interface PowerManagement;
}
}
implementation
{
enum {
IDLE = 0,
***************
*** 176,179 ****
--- 174,178 ----
call HPLADC.samplePort(nextPort); // This function is interupt-safe
}
+ else call PowerManagement.adjustPower();
dbg(DBG_ADC, "adc_tick: port %d with value %i \n", donePort, (int)data);
***************
*** 210,213 ****
--- 209,213 ----
if (oldReqVector == 0) {
call HPLADC.samplePort(port);
+ call PowerManagement.adjustPower();
ReqPort = port;
}
More information about the Tinyos-commits
mailing list