Skip to content

Commit 4cad8b8

Browse files
committed
pwmStop() leaves pin HIGH
pwmStop() was doing a digitalWrite(pwmPin, LOW) after the kill() so unless the pin happened to be 0 the pwmPin might be left in the HIGH state causing motors or other devices to run HIGH after pwmStop(). Just removed the pwmPin = 0 from kill() and it passes all our loopback tests.
1 parent 0e4a0d4 commit 4cad8b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/CurieTimerOne/src/CurieTimerOne.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void CurieTimer::kill()
7676
tickCnt = 0;
7777
userCB = NULL;
7878
currState = IDLE;
79-
pauseCntrl = pauseCount = pwmPin = dutyCycle = nonDutyCycle = periodInUsec = 0;
79+
pauseCntrl = pauseCount = dutyCycle = nonDutyCycle = periodInUsec = 0;
8080
}
8181

8282

0 commit comments

Comments
 (0)