-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
LEDC - Allow custom channel selection #9031
LEDC - Allow custom channel selection #9031
Conversation
👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
what happens on ESP32 where we have 2x8 channels? |
You can select channel 0-15. |
Excuse me, I just want to ask if the above modification to the ledc library has been added to the 3.0.0-Alpha3 version? Can I download the newest code if I download 3.0.0-Alpha3 from the Arduino IDE? Thank you. |
Hello @Hs-Cheng, this change was not merged yet. If you want to test/use this modification you need to manually update the source code with changes from this PR or if you use manual installation instead of board manager in Arduino IDE, you can simply checkout this PR. |
Description of Change
This PR adds a new API
ledcAttachChannel
to LEDC peripheral, so the LEDC channel can be specified and won't be automatically selected, like is done by theledcAttach
function.bool ledcAttachChannel(uint8_t pin, uint32_t freq, uint8_t resolution, uint8_t channel);
Also added info log message what channel is used when LEDC is attached to pin.
Tests scenarios
Tested on ESP32-C6 with edited LEDC Software fade example.
Related links
Closes #8967