summaryrefslogtreecommitdiffstats
path: root/keyboards/wilba_tech/wt_mono_backlight.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/wilba_tech/wt_mono_backlight.h')
-rw-r--r--keyboards/wilba_tech/wt_mono_backlight.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/keyboards/wilba_tech/wt_mono_backlight.h b/keyboards/wilba_tech/wt_mono_backlight.h
index 70031bedc7..2f913d2cb6 100644
--- a/keyboards/wilba_tech/wt_mono_backlight.h
+++ b/keyboards/wilba_tech/wt_mono_backlight.h
@@ -19,6 +19,36 @@
#include <stdint.h>
#include <stdbool.h>
+#include "quantum/color.h"
+
+typedef struct PACKED
+{
+ uint8_t h;
+ uint8_t s;
+} HS;
+
+typedef struct
+{
+ bool disable_when_usb_suspended:1; // |
+ bool __pad1:1; // |
+ bool __pad2:1; // |
+ bool __pad3:1; // |
+ bool __pad4:1; // |
+ bool __pad5:1; // |
+ bool __pad6:1; // |
+ bool __pad7:1; // 1 byte
+ uint8_t disable_after_timeout; // 1 byte
+ uint8_t brightness; // 1 byte
+ uint8_t effect; // 1 byte
+ uint8_t effect_speed; // 1 byte
+ HS color_1; // 2 bytes (Indicator Color for Xeno)
+} backlight_config; // = 7 bytes
+
+void backlight_config_load(void);
+void backlight_config_save(void);
+void backlight_config_set_value( uint8_t *data );
+void backlight_config_get_value( uint8_t *data );
+
void backlight_init_drivers(void);
void backlight_timer_init(void);
@@ -26,8 +56,24 @@ void backlight_timer_enable(void);
void backlight_timer_disable(void);
void backlight_set_suspend_state(bool state);
+void backlight_set_indicator_state(uint8_t state);
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
void backlight_update_pwm_buffers(void);
-void backlight_set_brightness_all( uint8_t value );
+// Handle backlight specific keycodes
+bool process_record_backlight(uint16_t keycode, keyrecord_t *record);
+
+void backlight_set_key_hit(uint8_t row, uint8_t col);
+
+void backlight_effect_increase(void);
+void backlight_effect_decrease(void);
+void backlight_effect_speed_increase(void);
+void backlight_effect_speed_decrease(void);
+
+void backlight_brightness_increase(void);
+void backlight_brightness_decrease(void);