aboutsummaryrefslogtreecommitdiff
path: root/quantum/visualizer
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-08 21:30:11 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 18:34:59 +0300
commit3074269c4a07ff7f1ab2a76ebdb8904cd642e283 (patch)
tree7d38c59d51c84c2022f73fa3f7a264a56c8b6b82 /quantum/visualizer
parentdf67169d4260881443d88b142855d4aa2def6dc3 (diff)
downloadqmk_firmware-3074269c4a07ff7f1ab2a76ebdb8904cd642e283.tar.gz
qmk_firmware-3074269c4a07ff7f1ab2a76ebdb8904cd642e283.zip
Move the logo drawing keyframe to lcd_keyframes
Diffstat (limited to 'quantum/visualizer')
-rw-r--r--quantum/visualizer/lcd_keyframes.c19
-rw-r--r--quantum/visualizer/lcd_keyframes.h2
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 @@
18#include <string.h> 18#include <string.h>
19#include "action_util.h" 19#include "action_util.h"
20#include "led.h" 20#include "led.h"
21#include "resources/resources.h"
21 22
22bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state) { 23bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state) {
23 (void)animation; 24 (void)animation;
@@ -154,6 +155,24 @@ bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation,
154 return false; 155 return false;
155} 156}
156 157
158bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state) {
159 (void)state;
160 (void)animation;
161 // Read the uGFX documentation for information how to use the displays
162 // http://wiki.ugfx.org/index.php/Main_Page
163 gdispClear(White);
164
165 // You can use static variables for things that can't be found in the animation
166 // or state structs, here we use the image
167
168 //gdispGBlitArea is a tricky function to use since it supports blitting part of the image
169 // if you have full screen image, then just use 128 and 32 for both source and target dimensions
170 gdispGBlitArea(GDISP, 0, 0, 128, 32, 0, 0, 128, (pixel_t*)resource_lcd_logo);
171
172 return false;
173}
174
175
157bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { 176bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) {
158 (void)animation; 177 (void)animation;
159 (void)state; 178 (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
29bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state); 29bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state);
30// Displays both the layer text and the led states 30// Displays both the layer text and the led states
31bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation, visualizer_state_t* state); 31bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation, visualizer_state_t* state);
32// Displays the QMK logo on the LCD screen
33bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state);
32 34
33bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); 35bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state);
34bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); 36bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state);