- Notifications
You must be signed in to change notification settings - Fork13.3k
allow to set pin to OUTPUT_OPEN_DRAIN in analogWriteMode#7841
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
earlephilhower commentedJan 25, 2021
The problem w/this PR is that Maybe an |
klugem commentedJan 25, 2021
Thanks, I just noticed that.
I named it analogWriteMode() but we can rename it to analogWriteEx()
I think digitalWrite() does not set pin mode to OUTPUT or does it? |
earlephilhower commentedJan 25, 2021
No problem, your name makes sense.
That's correct, my mistake. I just checked upstream, too, and that's the Arduino way. |
earlephilhower left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, thx! Need other maintainer to give 👍 to merge since it does add a new API.
d-a-v left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
klugem commentedJan 26, 2021
I just saw that my editor removed a lot of whitespaces in |
earlephilhower commentedJan 26, 2021
@klugem you got the spaces thing fixed, but there's now a regression of a submodule, SoftwareSerial. Easiest thing to do is go to the libraries/SWSerial directory and |
klugem commentedJan 26, 2021
This was caused because I clicked on "Update branch"...I reverted this commit. |
dok-net commentedMay 1, 2021
@earlephilhower This commit is not OK, despite reviews. What is the intended function on an "open" analogWrite? You can't switch the mode in that case due to the "else": Plus, the comment about on and off has drifted far from anything that it might apply to :-) |
dok-net commentedMay 1, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I added an optional parameter in the analogWrite() function to allow open-drain PWM signals.
Also see#7836
edit:closes#7836