diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/power_led.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/power_led.h b/include/power_led.h index b255c557bb..ccee086f70 100644 --- a/include/power_led.h +++ b/include/power_led.h @@ -31,10 +31,16 @@ enum powerled_config { POWERLED_CONFIG_PWM, }; +#if defined(CONFIG_TASK_POWERLED) || defined(CONFIG_POWER_LED) /* Set the power adapter LED to the specified color. */ int powerled_set(enum powerled_color color); /* Set the power LED according to the specified state. */ void powerled_set_state(enum powerled_state state); +#else /* CONFIG_TASK_POWERLED */ +static inline int powerled_set(enum powerled_color color) { return 0; } +static inline void powerled_set_state(enum powerled_state state) {} +#endif /* CONFIG_TASK_POWERLED */ + #endif /* __CROS_EC_POWER_LED_H */ |