Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(ledc): max resolution review #11226

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

Draft
SuGlider wants to merge 8 commits into master
base: master
Choose a base branch
Loading
from ledc_max_resolution_review
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ledc): failing to execute shall issue error log
  • Loading branch information
SuGlider authored May 3, 2025
commit 08fea233766c5aebc40fe129ac6acca41773ddd5
2 changes: 1 addition & 1 deletion cores/esp32/esp32-hal-ledc.c
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void analogWrite(uint8_t pin, int value) {
// Therefore, it will adjust Arduino MAX Duty to be the LEDC MAx Duty
uint32_t max_duty = (1 << bus->channel_resolution) - 1;
if (value < 0 || value > max_duty) {
log_w("Duty is out of range. Valid duty range for pin d is 0 to %d", pin, max_duty);
log_e("Duty is out of range. Valid duty range for pin d is 0 to %d", pin, max_duty);
return;
}
if (value == max_duty) {
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /