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

PWM: Set TOP to 0xfffe by default and fix get_max_duty #744

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

jannic
Copy link
Member

@jannic jannic commented Dec 27, 2023

A TOP value of 0xffff is incompatible with true 100% duty cycle. Therefore, the default TOP value is reduced to 0xfffe, and a warning regarding the 0xffff value is added the documentation of set_top.

The value returned by get_max_duty is corrected to be TOP + 1, if possible.

Closes #735

A TOP value of 0xffff is incompatible with true 100% duty cycle.
Therefore, the default TOP value is reduced to 0xfffe, and a warning
regarding the 0xffff value is added the documentation of `set_top`.

The value returned by get_max_duty is corrected to be TOP + 1, if
possible.
@jannic jannic merged commit e7128c5 into rp-rs:main Dec 28, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PWM get_max_duty() off by one
2 participants