Skip to content

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

Merged
ivmarkov merged 1 commit into
esp-rs:masterfrom
zRedShift:add-hpoint-to-ledc
Nov 2, 2022
Merged

Ledc: Add SpeedMode enum, allow lpoint < hpoint < max_duty#155
ivmarkov merged 1 commit into
esp-rs:masterfrom
zRedShift:add-hpoint-to-ledc

Conversation

@zRedShift

Copy link
Copy Markdown
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.

@MabezDev MabezDev left a comment

Copy link
Copy Markdown
Member

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