Skip to content

Update esp32-hal-ledc.c #5962

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

Closed
wants to merge 1 commit into from
Closed

Conversation

oycq
Copy link

@oycq oycq commented Dec 2, 2021

IN LINE 209:
if(group) {
LEDC_CHAN(group, channel).conf0.low_speed_update = 1;}
->group 1 is a LOW speed group.

BUT WHY IN LINE 319:
(chan/8)?LEDC_LS_SIG_OUT0_IDX:LEDC_HS_SIG_OUT0_IDX) ?
->group 1 is a HIGH speed group.

I think there is a conflick

if(group) {
        LEDC_CHAN(group, channel).conf0.low_speed_update = 1;}
So group 1 is LOW speed right?
BUT WHY
(chan/8)?LEDC_LS_SIG_OUT0_IDX:LEDC_HS_SIG_OUT0_IDX) ?
@CLAassistant
Copy link

CLAassistant commented Dec 2, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@VojtechBartoska VojtechBartoska linked an issue Dec 2, 2021 that may be closed by this pull request
@me-no-dev
Copy link
Member

because group = chan/8 will produce 1 if it's the low speed group. Code is correct, maybe re-think how (chan/8)?LEDC_LS_SIG_OUT0_IDX:LEDC_HS_SIG_OUT0_IDX will evaluate :)

@me-no-dev me-no-dev closed this Dec 14, 2021
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.

A Bug in esp32-hal-ledc.c
3 participants