1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
-
- #include <stdint.h>
- #include <avr/io.h>
- #include <avr/wdt.h>
-
- #include <buffhelp.h>
- #include <cube.h>
-
-
- void simpleAnimation(void);
- void anotherAnimation(void);
-
-
- #define NUMOFANIMATIONS 2
- void (*animations[NUMOFANIMATIONS])(void) = {&simpleAnimation, &anotherAnimation};
-
- uint8_t numOfAnimations(void) {
- return NUMOFANIMATIONS;
- }
-
- void executeAnimation(uint8_t id) {
- if (id < NUMOFANIMATIONS) {
- animations[id]();
- }
- }
-
- void simpleAnimation(void) {
-
- wdt_reset();
-
- }
-
- void anotherAnimation(void) {
-
- }
|