Complete animation mode
This commit is contained in:
@@ -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;
|
||||
|
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user