diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2017-04-08 20:30:11 +0200 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2017-04-09 17:34:59 +0200 |
commit | 3074269c4a07ff7f1ab2a76ebdb8904cd642e283 (patch) | |
tree | 7d38c59d51c84c2022f73fa3f7a264a56c8b6b82 /quantum | |
parent | df67169d4260881443d88b142855d4aa2def6dc3 (diff) | |
download | qmk_firmware-3074269c4a07ff7f1ab2a76ebdb8904cd642e283.tar.gz qmk_firmware-3074269c4a07ff7f1ab2a76ebdb8904cd642e283.tar.xz |
Move the logo drawing keyframe to lcd_keyframes
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/visualizer/lcd_keyframes.c | 19 | ||||
-rw-r--r-- | quantum/visualizer/lcd_keyframes.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c index c6e04d0ca..df11861dd 100644 --- a/quantum/visualizer/lcd_keyframes.c +++ b/quantum/visualizer/lcd_keyframes.c @@ -18,6 +18,7 @@ #include <string.h> #include "action_util.h" #include "led.h" +#include "resources/resources.h" bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state) { (void)animation; @@ -154,6 +155,24 @@ bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation, return false; } +bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state) { + (void)state; + (void)animation; + // Read the uGFX documentation for information how to use the displays + // http://wiki.ugfx.org/index.php/Main_Page + gdispClear(White); + + // You can use static variables for things that can't be found in the animation + // or state structs, here we use the image + + //gdispGBlitArea is a tricky function to use since it supports blitting part of the image + // 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*)resource_lcd_logo); + + return false; +} + + bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { (void)animation; (void)state; diff --git a/quantum/visualizer/lcd_keyframes.h b/quantum/visualizer/lcd_keyframes.h index 8f79a541c..2e912b4c7 100644 --- a/quantum/visualizer/lcd_keyframes.h +++ b/quantum/visualizer/lcd_keyframes.h @@ -29,6 +29,8 @@ bool lcd_keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualize bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state); // Displays both the layer text and the led states bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation, visualizer_state_t* state); +// Displays the QMK logo on the LCD screen +bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state); bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); |