summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-08 20:10:20 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 18:34:59 +0300
commit3eb8785e8770c07e6a4280c50240d5d951461911 (patch)
tree5d5adfe0f8bef36732667cf832f64bda936670c6
parent995002fa912545128625ec2d8c53cff5de560b97 (diff)
downloadqmk_firmware-3eb8785e8770c07e6a4280c50240d5d951461911.tar.gz
qmk_firmware-3eb8785e8770c07e6a4280c50240d5d951461911.zip
Add automatic flush for the LCD screen
-rw-r--r--keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c1
-rw-r--r--keyboards/ergodox/infinity/visualizer.c2
-rw-r--r--keyboards/ergodox/keymaps/default/visualizer.c2
-rw-r--r--quantum/visualizer/lcd_keyframes.c5
-rw-r--r--quantum/visualizer/visualizer.c4
5 files changed, 5 insertions, 9 deletions
diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c
index 0de457a7ae..5b7b6d44c4 100644
--- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c
+++ b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c
@@ -262,6 +262,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
srcbit++;
}
}
+ g->flags |= GDISP_FLG_NEEDFLUSH;
}
#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
diff --git a/keyboards/ergodox/infinity/visualizer.c b/keyboards/ergodox/infinity/visualizer.c
index 2e10fdd709..6f9b0210a7 100644
--- a/keyboards/ergodox/infinity/visualizer.c
+++ b/keyboards/ergodox/infinity/visualizer.c
@@ -127,8 +127,6 @@ bool display_logo(keyframe_animation_t* animation, visualizer_state_t* state) {
// if you have full screen image, then just use 128 and 32 for both source and target dimensions
gdispGBlitArea(GDISP, 0, 0, 128, 32, 0, 0, 128, (pixel_t*)image_data_lcd_logo);
- // Always remember to flush the display
- gdispFlush();
return false;
}
diff --git a/keyboards/ergodox/keymaps/default/visualizer.c b/keyboards/ergodox/keymaps/default/visualizer.c
index f6159e1ef1..1b0f12f250 100644
--- a/keyboards/ergodox/keymaps/default/visualizer.c
+++ b/keyboards/ergodox/keymaps/default/visualizer.c
@@ -101,8 +101,6 @@ bool display_logo(keyframe_animation_t* animation, visualizer_state_t* state) {
// if you have full screen image, then just use 128 and 32 for both source and target dimensions
gdispGBlitArea(GDISP, 0, 0, 128, 32, 0, 0, 128, (pixel_t*)image_data_lcd_logo);
- // Always remember to flush the display
- gdispFlush();
return false;
}
diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c
index 74f6e3b470..c6e04d0ca4 100644
--- a/quantum/visualizer/lcd_keyframes.c
+++ b/quantum/visualizer/lcd_keyframes.c
@@ -23,7 +23,6 @@ bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer
(void)animation;
gdispClear(White);
gdispDrawString(0, 10, state->layer_text, state->font_dejavusansbold12, Black);
- gdispFlush();
return false;
}
@@ -62,7 +61,6 @@ bool lcd_keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualiz
gdispDrawString(0, 10, layer_buffer, state->font_fixed5x8, Black);
format_layer_bitmap_string(state->status.default_layer >> 16, state->status.layer >> 16, layer_buffer);
gdispDrawString(0, 20, layer_buffer, state->font_fixed5x8, Black);
- gdispFlush();
return false;
}
@@ -101,7 +99,6 @@ bool lcd_keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualize
format_mods_bitmap_string(state->status.mods, status_buffer);
gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black);
- gdispFlush();
return false;
}
@@ -140,7 +137,6 @@ bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer
get_led_state_string(output, state);
gdispClear(White);
gdispDrawString(0, 10, output, state->font_dejavusansbold12, Black);
- gdispFlush();
return false;
}
@@ -155,7 +151,6 @@ bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation,
y = 17;
}
gdispDrawString(0, y, state->layer_text, state->font_dejavusansbold12, Black);
- gdispFlush();
return false;
}
diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c
index 2479a64c7f..6f134097f0 100644
--- a/quantum/visualizer/visualizer.c
+++ b/quantum/visualizer/visualizer.c
@@ -313,6 +313,10 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
gdispGFlush(LED_DISPLAY);
#endif
+#ifdef LCD_ENABLE
+ gdispGFlush(LCD_DISPLAY);
+#endif
+
#ifdef EMULATOR
draw_emulator();
#endif