Skip to content

cleaned up PWM rustdoc #523

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BartMassey
Copy link
Member

The PWM naming and usage is pretty confusing, and the Rustdoc does not clarify it. This is a bunch of doc changes to try to triage the situation. Should file an issue to maybe change the API, although at this late date not so likely probably.

@BartMassey BartMassey mentioned this pull request Jun 20, 2025
@BartMassey
Copy link
Member Author

Issue #524 addresses future work.

///
/// Subsequent use of `set_duty_on_common()`,
/// `set_duty_on_group()`, *etc* will override this duty
/// cycle setting.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What duty cycle setting? Isn't this setting the frequency rather than the duty cycle?

/// Cofigures how a sequence is read from RAM and is spread to the compare register.
/// Configures how a sequence is read from RAM and is
/// spread to the compare register. Disables
/// [Channel::C3] for [LoadMode::Waveform], and disables
Copy link
Member

@qwandor qwandor Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean "enables it otherwise", though I'm not sure why.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. I'm not sure why either — seems like just a bug, but wanted to document current behavior before thinking about it.

@BartMassey
Copy link
Member Author

Thanks for the review and the catches! I have a couple of other things to document as well at this point: I'll push an update RSN.

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.

2 participants