]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Fixed incorrect offset in Timer.setInputDivider(), and replaced the mask with positio...
authorvlahan <vlahan>
Fri, 15 Dec 2006 14:25:38 +0000 (14:25 +0000)
committervlahan <vlahan>
Fri, 15 Dec 2006 14:25:38 +0000 (14:25 +0000)
Bug reported and fix proposed by:
decescog@cab.cnea.gov.ar

This closes:
#1595578: MSP430TimerM.nc and MSP430TimerP.nc and its duplicate #1595636

tos/chips/msp430/timer/Msp430TimerP.nc

index f9f090c15af997b048796eec69f9467e40e82db1..da3d1d21fba6c72a61f62d26417ceba28cc5b0ea 100644 (file)
@@ -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()