]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Shared default animations
authorFred Sundvik <fsundvik@gmail.com>
Sun, 9 Jul 2017 14:50:01 +0000 (17:50 +0300)
committerJack Humbert <jack.humb@gmail.com>
Mon, 10 Jul 2017 13:01:59 +0000 (09:01 -0400)
12 files changed:
keyboards/ergodox/infinity/animations.c [deleted file]
keyboards/ergodox/infinity/animations.h [deleted file]
keyboards/ergodox/infinity/rules.mk
keyboards/ergodox/infinity/simple_visualizer.h
keyboards/ergodox/infinity/visualizer.c
keyboards/whitefox/animations.c [deleted file]
keyboards/whitefox/animations.h [deleted file]
keyboards/whitefox/rules.mk
keyboards/whitefox/visualizer.c
quantum/visualizer/default_animations.c [new file with mode: 0644]
quantum/visualizer/default_animations.h [new file with mode: 0644]
quantum/visualizer/visualizer.mk

diff --git a/keyboards/ergodox/infinity/animations.c b/keyboards/ergodox/infinity/animations.c
deleted file mode 100644 (file)
index faac962..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/* 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/>.
- */
-
-#if defined(VISUALIZER_ENABLE)
-
-#include "animations.h"
-#include "visualizer.h"
-#ifdef LCD_ENABLE
-#include "lcd_keyframes.h"
-#endif
-#ifdef LCD_BACKLIGHT_ENABLE
-#include "lcd_backlight_keyframes.h"
-#endif
-
-#ifdef BACKLIGHT_ENABLE
-#include "led_backlight_keyframes.h"
-#endif
-
-#include "visualizer_keyframes.h"
-
-
-#if defined(LCD_ENABLE) || defined(LCD_BACKLIGHT_ENABLE) || defined(BACKLIGHT_ENABLE)
-
-static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) {
-#ifdef LCD_ENABLE
-    lcd_keyframe_enable(animation, state);
-#endif
-#ifdef LCD_BACKLIGHT_ENABLE
-    lcd_backlight_keyframe_enable(animation, state);
-#endif
-#ifdef BACKLIGHT_ENABLE
-    led_backlight_keyframe_enable(animation, state);
-#endif
-    return false;
-}
-
-static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) {
-#ifdef LCD_ENABLE
-    lcd_keyframe_disable(animation, state);
-#endif
-#ifdef LCD_BACKLIGHT_ENABLE
-    lcd_backlight_keyframe_disable(animation, state);
-#endif
-#ifdef BACKLIGHT_ENABLE
-    led_backlight_keyframe_disable(animation, state);
-#endif
-    return false;
-}
-
-static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) {
-    bool ret = false;
-#ifdef LCD_BACKLIGHT_ENABLE
-    ret |= lcd_backlight_keyframe_animate_color(animation, state);
-#endif
-#ifdef BACKLIGHT_ENABLE
-    ret |= led_backlight_keyframe_fade_in_all(animation, state);
-#endif
-    return ret;
-}
-
-static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) {
-    bool ret = false;
-#ifdef LCD_BACKLIGHT_ENABLE
-    ret |= lcd_backlight_keyframe_animate_color(animation, state);
-#endif
-#ifdef BACKLIGHT_ENABLE
-    ret |= led_backlight_keyframe_fade_out_all(animation, state);
-#endif
-    return ret;
-}
-
-
-// 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 = 3,
-    .loop = false,
-    .frame_lengths = {0, 0, gfxMillisecondsToTicks(5000)},
-    .frame_functions = {
-            keyframe_enable,
-            lcd_keyframe_draw_logo,
-            keyframe_fade_in,
-    },
-};
-
-keyframe_animation_t default_suspend_animation = {
-    .num_frames = 3,
-    .loop = false,
-    .frame_lengths = {0, gfxMillisecondsToTicks(1000), 0},
-    .frame_functions = {
-            lcd_keyframe_display_layer_text,
-            keyframe_fade_out,
-            keyframe_disable,
-    },
-};
-#endif
-
-#if defined(BACKLIGHT_ENABLE)
-#define CROSSFADE_TIME 1000
-#define GRADIENT_TIME 3000
-
-keyframe_animation_t led_test_animation = {
-    .num_frames = 14,
-    .loop = true,
-    .frame_lengths = {
-        gfxMillisecondsToTicks(1000), // fade in
-        gfxMillisecondsToTicks(1000), // no op (leds on)
-        gfxMillisecondsToTicks(1000), // fade out
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in)
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
-        0,           // mirror leds
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out)
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
-        0,           // normal leds
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-
-    },
-    .frame_functions = {
-        led_backlight_keyframe_fade_in_all,
-        keyframe_no_operation,
-        led_backlight_keyframe_fade_out_all,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_left_to_right_gradient,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_top_to_bottom_gradient,
-        led_backlight_keyframe_mirror_orientation,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_left_to_right_gradient,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_top_to_bottom_gradient,
-        led_backlight_keyframe_normal_orientation,
-        led_backlight_keyframe_crossfade,
-    },
-};
-#endif
-
-#endif
diff --git a/keyboards/ergodox/infinity/animations.h b/keyboards/ergodox/infinity/animations.h
deleted file mode 100644 (file)
index 6d8b983..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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/>.
- */
-
-#ifndef KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
-#define KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
-
-#include "visualizer.h"
-
-// You can use these default animations, but of course you can also write your own custom ones instead
-extern keyframe_animation_t default_startup_animation;
-extern keyframe_animation_t default_suspend_animation;
-
-// An animation for testing and demonstrating the led support, should probably not be used for real world
-// cases
-extern keyframe_animation_t led_test_animation;
-
-#endif /* KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_ */
index 18171560da277a6c2f5eadf7065a08745504921c..2ccf98b8c50f9736df1e9401065d183407850f69 100644 (file)
@@ -1,7 +1,6 @@
 # project specific files
 SRC =  matrix.c \
-       led.c \
-       animations.c
+       led.c
 
 ## chip/board settings
 # - the next two should match the directories in
index 88e96f2af92181c8db5098193cce84ae91c9c2a5..73d0e088700af5b3f0d60dbb90bcc1982fc527f4 100644 (file)
@@ -34,7 +34,7 @@
 #include "lcd_backlight_keyframes.h"
 #include "system/serial_link.h"
 #include "led.h"
-#include "animations.h"
+#include "default_animations.h"
 
 static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF);
 static const uint32_t initial_color = LCD_COLOR(0, 0, 0);
index 047a1119ceee2b8a2b22f03deeb4bfab5df1e88e..4b16021abcd9da4a013452d23a8579fc25c0f767 100644 (file)
@@ -31,7 +31,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "lcd_keyframes.h"
 #include "lcd_backlight_keyframes.h"
 #include "system/serial_link.h"
-#include "animations.h"
+#include "default_animations.h"
 
 static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF);
 static const uint32_t initial_color = LCD_COLOR(0, 0, 0);
diff --git a/keyboards/whitefox/animations.c b/keyboards/whitefox/animations.c
deleted file mode 100644 (file)
index a15d46c..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/* 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/>.
- */
-
-#if defined(VISUALIZER_ENABLE)
-
-#include "animations.h"
-#include "visualizer.h"
-
-#ifdef BACKLIGHT_ENABLE
-#include "led_backlight_keyframes.h"
-#endif
-
-#include "visualizer_keyframes.h"
-
-
-#if defined(LCD_ENABLE) || defined(LCD_BACKLIGHT_ENABLE) || defined(BACKLIGHT_ENABLE)
-
-static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) {
-#ifdef BACKLIGHT_ENABLE
-    led_backlight_keyframe_enable(animation, state);
-#endif
-    return false;
-}
-
-static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) {
-#ifdef BACKLIGHT_ENABLE
-    led_backlight_keyframe_disable(animation, state);
-#endif
-    return false;
-}
-
-static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) {
-    bool ret = false;
-#ifdef BACKLIGHT_ENABLE
-    ret |= led_backlight_keyframe_fade_in_all(animation, state);
-#endif
-    return ret;
-}
-
-static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) {
-    bool ret = false;
-#ifdef BACKLIGHT_ENABLE
-    ret |= led_backlight_keyframe_fade_out_all(animation, state);
-#endif
-    return ret;
-}
-
-
-// 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 = 2,
-    .loop = false,
-    .frame_lengths = {0, gfxMillisecondsToTicks(5000)},
-    .frame_functions = {
-            keyframe_enable,
-            keyframe_fade_in,
-    },
-};
-
-keyframe_animation_t default_suspend_animation = {
-    .num_frames = 2,
-    .loop = false,
-    .frame_lengths = {gfxMillisecondsToTicks(1000), 0},
-    .frame_functions = {
-            keyframe_fade_out,
-            keyframe_disable,
-    },
-};
-#endif
-
-#if defined(BACKLIGHT_ENABLE)
-#define CROSSFADE_TIME 1000
-#define GRADIENT_TIME 3000
-
-keyframe_animation_t led_test_animation = {
-    .num_frames = 14,
-    .loop = true,
-    .frame_lengths = {
-        gfxMillisecondsToTicks(1000), // fade in
-        gfxMillisecondsToTicks(1000), // no op (leds on)
-        gfxMillisecondsToTicks(1000), // fade out
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in)
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
-        0,           // mirror leds
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out)
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-        gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
-        0,           // normal leds
-        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
-
-    },
-    .frame_functions = {
-        led_backlight_keyframe_fade_in_all,
-        keyframe_no_operation,
-        led_backlight_keyframe_fade_out_all,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_left_to_right_gradient,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_top_to_bottom_gradient,
-        led_backlight_keyframe_mirror_orientation,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_left_to_right_gradient,
-        led_backlight_keyframe_crossfade,
-        led_backlight_keyframe_top_to_bottom_gradient,
-        led_backlight_keyframe_normal_orientation,
-        led_backlight_keyframe_crossfade,
-    },
-};
-#endif
-
-#endif
diff --git a/keyboards/whitefox/animations.h b/keyboards/whitefox/animations.h
deleted file mode 100644 (file)
index 6d8b983..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* 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/>.
- */
-
-#ifndef KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
-#define KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
-
-#include "visualizer.h"
-
-// You can use these default animations, but of course you can also write your own custom ones instead
-extern keyframe_animation_t default_startup_animation;
-extern keyframe_animation_t default_suspend_animation;
-
-// An animation for testing and demonstrating the led support, should probably not be used for real world
-// cases
-extern keyframe_animation_t led_test_animation;
-
-#endif /* KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_ */
index c0effcb7b7c0c13be4ba6408f6e32e67ca7eaee4..3911480718646604721168ead358a7e6c2cb7ff9 100644 (file)
@@ -1,7 +1,6 @@
 # project specific files
 SRC =  matrix.c \
-       led.c \
-       animations.c
+       led.c
 
 ## chip/board settings
 # - the next two should match the directories in
index 167e0ec4de61f4c5af1b2ad43c732087cde1ccc7..e5bafcbe952e9a8504927256e3a69e9ef8a1b7e1 100644 (file)
@@ -20,7 +20,7 @@
 #include "visualizer.h"
 #include "visualizer_keyframes.h"
 #include "led.h"
-#include "animations.h"
+#include "default_animations.h"
 
 
 static bool initial_update = true;
diff --git a/quantum/visualizer/default_animations.c b/quantum/visualizer/default_animations.c
new file mode 100644 (file)
index 0000000..2d03273
--- /dev/null
@@ -0,0 +1,176 @@
+/* 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/>.
+ */
+
+#if defined(VISUALIZER_ENABLE)
+
+#include "default_animations.h"
+#include "visualizer.h"
+#ifdef LCD_ENABLE
+#include "lcd_keyframes.h"
+#endif
+#ifdef LCD_BACKLIGHT_ENABLE
+#include "lcd_backlight_keyframes.h"
+#endif
+
+#ifdef BACKLIGHT_ENABLE
+#include "led_backlight_keyframes.h"
+#endif
+
+#include "visualizer_keyframes.h"
+
+
+#if defined(LCD_ENABLE) || defined(LCD_BACKLIGHT_ENABLE) || defined(BACKLIGHT_ENABLE)
+
+static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) {
+#ifdef LCD_ENABLE
+    lcd_keyframe_enable(animation, state);
+#endif
+#ifdef LCD_BACKLIGHT_ENABLE
+    lcd_backlight_keyframe_enable(animation, state);
+#endif
+#ifdef BACKLIGHT_ENABLE
+    led_backlight_keyframe_enable(animation, state);
+#endif
+    return false;
+}
+
+static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) {
+#ifdef LCD_ENABLE
+    lcd_keyframe_disable(animation, state);
+#endif
+#ifdef LCD_BACKLIGHT_ENABLE
+    lcd_backlight_keyframe_disable(animation, state);
+#endif
+#ifdef BACKLIGHT_ENABLE
+    led_backlight_keyframe_disable(animation, state);
+#endif
+    return false;
+}
+
+static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) {
+    bool ret = false;
+#ifdef LCD_BACKLIGHT_ENABLE
+    ret |= lcd_backlight_keyframe_animate_color(animation, state);
+#endif
+#ifdef BACKLIGHT_ENABLE
+    ret |= led_backlight_keyframe_fade_in_all(animation, state);
+#endif
+    return ret;
+}
+
+static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) {
+    bool ret = false;
+#ifdef LCD_BACKLIGHT_ENABLE
+    ret |= lcd_backlight_keyframe_animate_color(animation, state);
+#endif
+#ifdef BACKLIGHT_ENABLE
+    ret |= led_backlight_keyframe_fade_out_all(animation, state);
+#endif
+    return ret;
+}
+
+
+// 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 = {
+#if LCD_ENABLE
+    .num_frames = 3,
+#else
+    .num_frames = 2,
+#endif
+    .loop = false,
+    .frame_lengths = {
+        0, 
+#if LCD_ENABLE
+        0, 
+#endif
+        gfxMillisecondsToTicks(5000)},
+    .frame_functions = {
+            keyframe_enable,
+#if LCD_ENABLE
+            lcd_keyframe_draw_logo,
+#endif
+            keyframe_fade_in,
+    },
+};
+
+keyframe_animation_t default_suspend_animation = {
+#if LCD_ENABLE
+    .num_frames = 3,
+#else
+    .num_frames = 2,
+#endif
+    .loop = false,
+    .frame_lengths = {
+#if LCD_ENABLE
+        0, 
+#endif
+        gfxMillisecondsToTicks(1000), 
+        0},
+    .frame_functions = {
+#if LCD_ENABLE
+            lcd_keyframe_display_layer_text,
+#endif
+            keyframe_fade_out,
+            keyframe_disable,
+    },
+};
+#endif
+
+#if defined(BACKLIGHT_ENABLE)
+#define CROSSFADE_TIME 1000
+#define GRADIENT_TIME 3000
+
+keyframe_animation_t led_test_animation = {
+    .num_frames = 14,
+    .loop = true,
+    .frame_lengths = {
+        gfxMillisecondsToTicks(1000), // fade in
+        gfxMillisecondsToTicks(1000), // no op (leds on)
+        gfxMillisecondsToTicks(1000), // fade out
+        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
+        gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in)
+        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
+        gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
+        0,           // mirror leds
+        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
+        gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out)
+        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
+        gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
+        0,           // normal leds
+        gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
+
+    },
+    .frame_functions = {
+        led_backlight_keyframe_fade_in_all,
+        keyframe_no_operation,
+        led_backlight_keyframe_fade_out_all,
+        led_backlight_keyframe_crossfade,
+        led_backlight_keyframe_left_to_right_gradient,
+        led_backlight_keyframe_crossfade,
+        led_backlight_keyframe_top_to_bottom_gradient,
+        led_backlight_keyframe_mirror_orientation,
+        led_backlight_keyframe_crossfade,
+        led_backlight_keyframe_left_to_right_gradient,
+        led_backlight_keyframe_crossfade,
+        led_backlight_keyframe_top_to_bottom_gradient,
+        led_backlight_keyframe_normal_orientation,
+        led_backlight_keyframe_crossfade,
+    },
+};
+#endif
+
+#endif
diff --git a/quantum/visualizer/default_animations.h b/quantum/visualizer/default_animations.h
new file mode 100644 (file)
index 0000000..51320b8
--- /dev/null
@@ -0,0 +1,30 @@
+/* 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/>.
+ */
+
+#ifndef DEFAULT_ANIMATIONS_H_
+#define DEFAULT_ANIMATIONS_H_
+
+#include "visualizer.h"
+
+// You can use these default animations, but of course you can also write your own custom ones instead
+extern keyframe_animation_t default_startup_animation;
+extern keyframe_animation_t default_suspend_animation;
+
+// An animation for testing and demonstrating the led support, should probably not be used for real world
+// cases
+extern keyframe_animation_t led_test_animation;
+
+#endif /* DEFAULT_ANIMATIONS_H_ */
index a04c9775fa859052917cbb4989cf227291fbfed9..3a0f771bcad6937c89785666a65106eb9ccb2f4d 100644 (file)
@@ -46,6 +46,8 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
 SRC += $(VISUALIZER_DIR)/led_backlight_keyframes.c
 endif
 
+SRC += $(VISUALIZER_DIR)/default_animations.c
+
 include $(GFXLIB)/gfx.mk
 # For the common_gfxconf.h
 GFXINC += quantum/visualizer