File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,17 @@ class Led : public BaseComponent {
37
37
ledc_mode_t speed_mode{
38
38
LEDC_LOW_SPEED_MODE}; /* *< The LEDC speed mode you want for this LED channel. */
39
39
bool output_invert{false }; /* *< Whether to invert the GPIO output for this LED channel. */
40
+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) || defined(_DOXYGEN_)
41
+ ledc_sleep_mode_t sleep_mode{
42
+ LEDC_SLEEP_MODE_KEEP_ALIVE}; /* *< The LEDC sleep mode you want for this
43
+ LED channel. Default is
44
+ LEDC_SLEEP_MODE_KEEP_ALIVE which will
45
+ keep the LEDC output when the system
46
+ enters light sleep. Note that this is
47
+ only useful if the LED's clock_config is
48
+ set to a clock source which supports
49
+ light sleep. */
50
+ #endif
40
51
};
41
52
42
53
/* *
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ Led::Led(const Config &config) noexcept
41
41
channel_conf.duty = actual_duty;
42
42
channel_conf.gpio_num = conf.gpio ;
43
43
channel_conf.speed_mode = conf.speed_mode ;
44
+ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
45
+ channel_conf.sleep_mode = conf.sleep_mode ;
46
+ #endif
44
47
channel_conf.hpoint = 0 ;
45
48
channel_conf.timer_sel = conf.timer ;
46
49
channel_conf.flags .output_invert = conf.output_invert ;
You can’t perform that action at this time.
0 commit comments