From 769b8b686fee482cf745ab0eb0cf781f5bbb37e0 Mon Sep 17 00:00:00 2001 From: vlahan Date: Fri, 15 Dec 2006 14:25:38 +0000 Subject: [PATCH] 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 --- tos/chips/msp430/timer/Msp430TimerP.nc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.39.2