Skip to content

Conversation

@jannic
Copy link
Member

@jannic jannic commented Mar 10, 2025

Issue #907 showed that SetDutyCycle was difficult to use because its implementation depends on whether it's an A or B channel.

This change avoids the requirement to manually specify the channel type.

It also removes some unnecessary code duplication.

jannic added 3 commits March 10, 2025 08:23
Issue rp-rs#907 showed that
SetDutyCycle was difficult to use because its implementation depends on
whether it's an A or B channel.

This change avoids the requirement to manually specify the channel type.

It also removes some unnecessary code duplication.
@jannic jannic marked this pull request as ready for review March 11, 2025 20:26
Copy link
Member

@9names 9names left a comment

Choose a reason for hiding this comment

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

Much cleaner, thanks jannic

@9names 9names merged commit 7455d78 into rp-rs:main May 14, 2025
49 checks passed
cantudo pushed a commit to cantudo/rp-hal that referenced this pull request May 19, 2025
* Implement SetDutyCycle generically on ChannelId

Issue rp-rs#907 showed that
SetDutyCycle was difficult to use because its implementation depends on
whether it's an A or B channel.

This change avoids the requirement to manually specify the channel type.

It also removes some unnecessary code duplication.

* Remove some more code duplication in PWM implementation

* Copy changes to pwm code from rp2040-hal to rp235x-hal
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