summaryrefslogtreecommitdiff
path: root/include/lightbar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lightbar.h')
-rw-r--r--include/lightbar.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/lightbar.h b/include/lightbar.h
index 293eeb2ab2..8648e3f3bd 100644
--- a/include/lightbar.h
+++ b/include/lightbar.h
@@ -34,6 +34,24 @@ enum lb_control {
LB_CONT_MAX
};
+#ifdef CONFIG_ALS_LIGHTBAR_DIMMING
+/*
+ * For dimming the lightbar in the dark, we define an array to
+ * describe the expected colors:
+ * if luminosity is more than 'lux', the color defined will be used.
+ * The last entry must have lux == 0.
+ * Defining brightness is not enough to prevent washed color in low
+ * lux setting.
+ */
+struct lb_brightness_def {
+ uint16_t lux;
+ struct rgb_s color[4];
+};
+
+extern struct lb_brightness_def lb_brightness_levels[];
+extern const unsigned lb_brightness_levels_count;
+#endif
+
/* Request a preset sequence from the lightbar task. */
void lightbar_sequence_f(enum lightbar_sequence num, const char *f);
#define lightbar_sequence(A) lightbar_sequence_f(A, __func__)