Skip to content

Fix issues in CurieTimerOne #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libraries/CurieTimerOne/CurieTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ int CurieTimer::pwmStart(unsigned int outputPin, double dutyPercentage, unsigned
pinMode(pwmPin, OUTPUT);

if(dutyPercentage == 0.0) {
// If PWM is already running, reset the timer and set pin to LOW
kill();
digitalWrite(pwmPin, LOW);
return SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/CurieTimerOne/keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rdRstTickCount KEYWORD2
pause KEYWORD2
resume KEYWORD2
pwmStart KEYWORD2
pwdStop KEYWORD2
pwmStop KEYWORD2
#######################################
# Instances (KEYWORD2)
#######################################
Expand Down