]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add automatic flush for the LCD screen
authorFred Sundvik <fsundvik@gmail.com>
Sat, 8 Apr 2017 17:10:20 +0000 (20:10 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Sun, 9 Apr 2017 15:34:59 +0000 (18:34 +0300)
keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c
keyboards/ergodox/infinity/visualizer.c
keyboards/ergodox/keymaps/default/visualizer.c
quantum/visualizer/lcd_keyframes.c
quantum/visualizer/visualizer.c

index 0de457a7aecc8350907ef66f1b2c7b376e41bf3f..5b7b6d44c43b021c1d51986f505af9510e2f47aa 100644 (file)
@@ -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
index 2e10fdd70901b6531e8bd7caecac5268738cc82a..6f9b0210a7ccb504ec82178dd7d2551ab96eabdb 100644 (file)
@@ -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;
 }
 
index f6159e1ef157c85d726cea733a20949727fda6cc..1b0f12f25064ee82813e5dbe94adef8131e2c0c2 100644 (file)
@@ -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;
 }
 
index 74f6e3b47038816e4e20f948ae1aba9c4650fec8..c6e04d0ca437e0a4b6aed374057cf05535f3c619 100644 (file)
@@ -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;
 }
 
index 2479a64c7f658ffa5a26c27504087875fcde8b5d..6f134097f078a2fd94812014b7844394d57324e7 100644 (file)
@@ -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