Skip to content

don't reset LEDC channel if it wasn't used by camera #1

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

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

dhalbert
Copy link

camera_disable_out_clock() stops the clock for LEDC channel g_ledc_channel. But if the camera was never enabled, it will stop channel 0, which might be used by other things. For instance, on CircuitPython display boards, that channel is usually used for PWM brightness control.

This tentative code prevents the clock stop if it was never started.

@jepler We can discuss other ways to do this, maybe inside CircuitPython.

@dhalbert dhalbert requested a review from jepler September 13, 2022 01:19
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Good catch, thank you. Should consider upstreaming this.

@dhalbert dhalbert merged commit 54c3f61 into pass-bus-to-sccb Sep 13, 2022
@dhalbert dhalbert deleted the safe-disable_out_clock branch September 16, 2022 00:41
@deshipu deshipu mentioned this pull request Dec 16, 2022
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