summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-02 01:29:50 +0200
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 17:34:59 +0200
commit5fbaf31dc26a7bb27eb276ec419255e92b293d60 (patch)
tree92d2f02959d8c03df72fea6dfcde82edeb7f1f67 /quantum
parent39385144e7dc3337e623cdc8147b4a441f22fd62 (diff)
downloadqmk_firmware-5fbaf31dc26a7bb27eb276ec419255e92b293d60.tar.gz
qmk_firmware-5fbaf31dc26a7bb27eb276ec419255e92b293d60.tar.xz
Brightness for Ergodox Infinity emulated LEDs
Diffstat (limited to 'quantum')
-rw-r--r--quantum/visualizer/lcd_backlight.h4
-rw-r--r--quantum/visualizer/visualizer.c2
-rw-r--r--quantum/visualizer/visualizer.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/quantum/visualizer/lcd_backlight.h b/quantum/visualizer/lcd_backlight.h
index dd3e37a06..14dde64a1 100644
--- a/quantum/visualizer/lcd_backlight.h
+++ b/quantum/visualizer/lcd_backlight.h
@@ -32,6 +32,10 @@ SOFTWARE.
#define LCD_SAT(color) ((color >> 8) & 0xFF)
#define LCD_INT(color) (color & 0xFF)
+inline uint32_t change_lcd_color_intensity(uint32_t color, uint8_t new_intensity) {
+ return (color & 0xFFFFFF00) | new_intensity;
+}
+
void lcd_backlight_init(void);
void lcd_backlight_color(uint8_t hue, uint8_t saturation, uint8_t intensity);
void lcd_backlight_brightness(uint8_t b);
diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c
index bff0df494..3b3f51b1f 100644
--- a/quantum/visualizer/visualizer.c
+++ b/quantum/visualizer/visualizer.c
@@ -484,7 +484,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
else {
visualizer_keyboard_status_t prev_status = state.status;
state.status = current_status;
- update_user_visualizer_state(&state, prev_status);
+ update_user_visualizer_state(&state, &prev_status);
}
state.prev_lcd_color = state.current_lcd_color;
}
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h
index beb8f2ab4..e8ace5b37 100644
--- a/quantum/visualizer/visualizer.h
+++ b/quantum/visualizer/visualizer.h
@@ -156,7 +156,7 @@ void visualizer_set_user_data(void* user_data);
// These functions have to be implemented by the user
void initialize_user_visualizer(visualizer_state_t* state);
-void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t prev_status);
+void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status);
void user_visualizer_suspend(visualizer_state_t* state);
void user_visualizer_resume(visualizer_state_t* state);