From: vlahan Date: Fri, 15 Dec 2006 14:25:38 +0000 (+0000) Subject: Fixed incorrect offset in Timer.setInputDivider(), and replaced the mask with positio... X-Git-Tag: tinyos/2.0.1~248 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=769b8b686fee482cf745ab0eb0cf781f5bbb37e0;p=tinyos-2.x.git Fixed incorrect offset in Timer.setInputDivider(), and replaced the mask with positional flags as in Timer.setClockSource(). Bug reported and fix proposed by: decescog@cab.cnea.gov.ar This closes: #1595578: MSP430TimerM.nc and MSP430TimerP.nc and its duplicate #1595636 --- diff --git a/tos/chips/msp430/timer/Msp430TimerP.nc b/tos/chips/msp430/timer/Msp430TimerP.nc index f9f090c1..da3d1d21 100644 --- a/tos/chips/msp430/timer/Msp430TimerP.nc +++ b/tos/chips/msp430/timer/Msp430TimerP.nc @@ -109,7 +109,7 @@ implementation async command void Timer.setInputDivider( uint16_t inputDivider ) { - TxCTL = (TxCTL & ~(ID_1|ID_3)) | ((inputDivider << 8) & (ID_1|ID_3)); + TxCTL = (TxCTL & ~(ID0|ID1)) | ((inputDivider << 6) & (ID0|ID1)); } async event void VectorTimerX0.fired()