Skip to content

Commit 90c0ecd

Browse files
fix(lightbulb): Adjust the upper limit of pwm resolution to 12bit
1 parent c141b03 commit 90c0ecd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

components/led/lightbulb_driver/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Bug Fix:
66

77
- Adjust the power calculation algorithm
8+
- Adjust the upper limit of pwm resolution to 12bit
89

910
## v1.8.1 - 2025-04-17
1011

components/led/lightbulb_driver/drivers/pwm/pwm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ esp_err_t pwm_init(driver_pwm_t *config, void(*hook_func)(void *))
9696
s_pwm->ledc_config.speed_mode = LEDC_LOW_SPEED_MODE;
9797
s_pwm->ledc_config.clk_cfg = LEDC_USE_XTAL_CLK;
9898
#endif
99-
uint32_t preset_bit = LEDC_TIMER_13_BIT;
99+
uint32_t preset_bit = LEDC_TIMER_12_BIT;
100100
for (s_pwm->ledc_config.duty_resolution = preset_bit; s_pwm->ledc_config.duty_resolution >= LEDC_TIMER_10_BIT; s_pwm->ledc_config.duty_resolution--) {
101101
err = ledc_timer_config(&s_pwm->ledc_config);
102102
if (err == ESP_OK) {

0 commit comments

Comments
 (0)