More IntelliSense-friendly declarations

This commit is contained in:
Scott Lahteine
2021-03-24 05:40:28 -05:00
committed by Scott Lahteine
parent da4b6896f7
commit 2d2291d00e
32 changed files with 562 additions and 203 deletions

View File

@@ -34,7 +34,9 @@
class CaseLight {
public:
static bool on;
TERN_(CASELIGHT_USES_BRIGHTNESS, static uint8_t brightness);
#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
static uint8_t brightness;
#endif
static bool pin_is_pwm() { return TERN0(NEED_CASE_LIGHT_PIN, PWM_PIN(CASE_LIGHT_PIN)); }
static bool has_brightness() { return TERN0(CASELIGHT_USES_BRIGHTNESS, TERN(CASE_LIGHT_USE_NEOPIXEL, true, pin_is_pwm())); }
@@ -50,8 +52,10 @@ public:
static inline void update_brightness() { update(false); }
static inline void update_enabled() { update(true); }
private:
TERN_(CASE_LIGHT_IS_COLOR_LED, static LEDColor color);
#if ENABLED(CASE_LIGHT_IS_COLOR_LED)
private:
static LEDColor color;
#endif
};
extern CaseLight caselight;