summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/infinity/animations.c
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-08 22:48:18 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-04-09 18:34:59 +0300
commit306353bf06e5e5a76890ffb0c48a4dcca76c4399 (patch)
treed2563b3523b5ca189c86a3bd675d165481933902 /keyboards/ergodox/infinity/animations.c
parentc6ca996f4eaa4cce90e02c123230e1e655c9465a (diff)
Create a file for shared Ergodox Infinity animations
Diffstat (limited to 'keyboards/ergodox/infinity/animations.c')
-rw-r--r--keyboards/ergodox/infinity/animations.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/keyboards/ergodox/infinity/animations.c b/keyboards/ergodox/infinity/animations.c
new file mode 100644
index 0000000000..54ab994607
--- /dev/null
+++ b/keyboards/ergodox/infinity/animations.c
@@ -0,0 +1,54 @@
+/* Copyright 2017 Fred Sundvik
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "animations.h"
+#include "visualizer.h"
+#ifdef LCD_ENABLE
+#include "lcd_keyframes.h"
+#endif
+#ifdef LCD_BACKLIGHT_ENABLE
+#include "lcd_backlight_keyframes.h"
+#endif
+
+#if defined(VISUALIZER_ENABLE) && defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE)
+
+// Don't worry, if the startup animation is long, you can use the keyboard like normal
+// during that time
+keyframe_animation_t default_startup_animation = {
+ .num_frames = 4,
+ .loop = false,
+ .frame_lengths = {0, 0, 0, gfxMillisecondsToTicks(5000), 0},
+ .frame_functions = {
+ lcd_keyframe_enable,
+ backlight_keyframe_enable,
+ lcd_keyframe_draw_logo,
+ backlight_keyframe_animate_color,
+ },
+};
+
+keyframe_animation_t default_suspend_animation = {
+ .num_frames = 4,
+ .loop = false,
+ .frame_lengths = {0, gfxMillisecondsToTicks(1000), 0, 0},
+ .frame_functions = {
+ lcd_keyframe_display_layer_text,
+ backlight_keyframe_animate_color,
+ lcd_keyframe_disable,
+ backlight_keyframe_disable,
+ },
+};
+
+#endif