Skip to content

Ledc: Add SpeedMode enum, allow lpoint < hpoint < max_duty #155

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
Nov 2, 2022

Conversation

zRedShift
Copy link
Collaborator

The high speed mode is only present on ESP32 and it's guarded by a chip feature esp_idf_soc_ledc_support_hs_mode, which gets added during build. The equivalent esp-idf code.

Better than using esp_idf_sys::ledc_mode_t which is just a c_uint alias.

The ESP supports setting hpoint higher than duty (lpoint), as long as it's below max_duty., I don't know why I assumed it wasn't so in the prior PR.

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! This is what we do in esp-hal too :).

@ivmarkov ivmarkov merged commit ba0f427 into esp-rs:master Nov 2, 2022
@zRedShift zRedShift deleted the add-hpoint-to-ledc branch November 2, 2022 14:34
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.

3 participants