prepare for IDF 5.4 based Arduino (#22793)

This commit is contained in:
Jason2866 2025-01-09 18:55:57 +01:00 committed by GitHub
parent 76fb95b166
commit e57b3e8b05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -315,6 +315,9 @@ int32_t analogAttach(uint32_t pin, bool output_invert) { // returns ledc chan
(ledc_timer_t)timer, // timer_sel (ledc_timer_t)timer, // timer_sel
0, // duty 0, // duty
0, // hpoint 0, // hpoint
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
(ledc_sleep_mode_t) 2,
#endif
{ output_invert ? 1u : 0u },// output_invert { output_invert ? 1u : 0u },// output_invert
}; };
ledc_channel_config(&ledc_channel); ledc_channel_config(&ledc_channel);