]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/ergodox/infinity/animations.c
Create a file for shared Ergodox Infinity animations
[qmk_firmware.git] / keyboards / ergodox / infinity / animations.c
1 /* Copyright 2017 Fred Sundvik
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  */
16
17 #include "animations.h"
18 #include "visualizer.h"
19 #ifdef LCD_ENABLE
20 #include "lcd_keyframes.h"
21 #endif
22 #ifdef LCD_BACKLIGHT_ENABLE
23 #include "lcd_backlight_keyframes.h"
24 #endif
25
26 #if defined(VISUALIZER_ENABLE) && defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE)
27
28 // Don't worry, if the startup animation is long, you can use the keyboard like normal
29 // during that time
30 keyframe_animation_t default_startup_animation = {
31     .num_frames = 4,
32     .loop = false,
33     .frame_lengths = {0, 0, 0, gfxMillisecondsToTicks(5000), 0},
34     .frame_functions = {
35             lcd_keyframe_enable,
36             backlight_keyframe_enable,
37             lcd_keyframe_draw_logo,
38             backlight_keyframe_animate_color,
39     },
40 };
41
42 keyframe_animation_t default_suspend_animation = {
43     .num_frames = 4,
44     .loop = false,
45     .frame_lengths = {0, gfxMillisecondsToTicks(1000), 0, 0},
46     .frame_functions = {
47             lcd_keyframe_display_layer_text,
48             backlight_keyframe_animate_color,
49             lcd_keyframe_disable,
50             backlight_keyframe_disable,
51     },
52 };
53
54 #endif