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

fix mistaken use of PWM channel for slice #5667

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Dec 6, 2021

In RP2040 PWM, the term channel is overloaded. Sometimes it means one of two channels (A or B) in a slice, sometimes it means one of 16 PWM output channels, and sometimes it is another name for slice (of which there are 8).

It appears we used an AB channel number when we meant to use a slice number. This caused #5556.

I renamed some uses of the word channel, when it meant an A or B slice channel. I renamed those channels to ab_channel, to make this clearer. But I'd kind of like another term for the 16-instance channels as well, maybe pwm_channel, or something.

I also made a doc issue for the RP2040 folks about the overloading: raspberrypi/pico-feedback#209

@dhalbert
Copy link
Collaborator Author

dhalbert commented Dec 6, 2021

black just got updated, and I had to fix the formatting on a couple of test .py files.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you! Agreed that the term "channel" is overloaded.

@tannewt tannewt merged commit be1d1d2 into adafruit:7.1.x Dec 6, 2021
@dhalbert dhalbert deleted the rp2-pwmout-counter-fix branch December 7, 2021 03:44
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