Skip to content
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

Adjust digitalWrite() on x41, 828 PWM pins #471

Closed
SpenceKonde opened this issue Oct 26, 2020 · 1 comment
Closed

Adjust digitalWrite() on x41, 828 PWM pins #471

SpenceKonde opened this issue Oct 26, 2020 · 1 comment
Labels
enhancement work complete but untested Stuff for 2.0.0 that is finished, but not yet testable because 2.0.0-dev won't compile anything.
Milestone

Comments

@SpenceKonde
Copy link
Owner

SpenceKonde commented Oct 26, 2020

Currently, when digitalWrite() is called on a PWM pin, both the timer's COMnx bits AND the TOCPMCOE register bits are changed. While one or the other is required in order to turn off PWM if it is currently on, both are not needed. Current behavior is stupid, and it makes life harder on people who take over the timers to generate advanced PWM (which is particularly popular on the 841/441, as the timing facilities on those parts are truly delightful). Instead, digitalWrite() should only switch the TOCPMCOE register bits.

@SpenceKonde SpenceKonde added the work complete but untested Stuff for 2.0.0 that is finished, but not yet testable because 2.0.0-dev won't compile anything. label Jun 1, 2021
@SpenceKonde
Copy link
Owner Author

Work is done and needs to be tested in v2.0.0-dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement work complete but untested Stuff for 2.0.0 that is finished, but not yet testable because 2.0.0-dev won't compile anything.
Projects
None yet
Development

No branches or pull requests

1 participant