Complete animation mode

This commit is contained in:
2022-10-22 11:57:36 +02:00
parent d85591c41e
commit 7904dae4bf
6 changed files with 172 additions and 15 deletions

View File

@@ -11,8 +11,25 @@ enum animation_state {
ANI_FLASH_WHITE,
};
struct rgb_color {
uint8_t red;
uint8_t green;
uint8_t blue;
};
enum rainbow_state {
RAINBOW_RY,
RAINBOW_YG,
RAINBOW_GC,
RAINBOW_CB,
RAINBOW_BM,
RAINBOW_MR,
};
struct animation {
enum animation_state state;
enum rainbow_state rb_start_state;
struct rgb_color rb_start_color;
uint32_t step;
uint32_t last_tick;
uint32_t next_interval;

View File

@@ -2,8 +2,10 @@
#define _SYSTICK_H_
#include <stdint.h>
#include <stdbool.h>
void systick_wait_ms(uint32_t ms);
uint32_t systick_get_global_tick(void);
bool systick_get_blink_state(void);
#endif /* _SYSTICK_H_ */