From c95faf32a6a98975828717d596ff51dedeecdf56 Mon Sep 17 00:00:00 2001 From: Dien-Nhung Nguyen Date: Tue, 27 Aug 2024 20:08:24 +0700 Subject: Add animations (#15) * animation: add xbm animations * refactor: correct framebuffer terminology * animation: add animations and effect * animation: timing with TMOS scheduler --- src/fb.h | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/fb.h (limited to 'src/fb.h') diff --git a/src/fb.h b/src/fb.h deleted file mode 100644 index 4e5cb43..0000000 --- a/src/fb.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __FB_H__ -#define __FB_H__ - -#include -#include - -enum ANIMATION_MODES { - LEFT = 0, - RIGHT, - UP, - DOWN, - FIXED, - SNOWFLAKE, - PICTURE, - ANIMATION, - LASER, -}; - -typedef struct fb_st { - uint16_t *buf; - uint16_t width; - uint8_t modes; - int is_flash; - int is_marquee; - // TODO: feat: Brightness for each fb - int brightness; - // TODO: feat: Timeout for each fb to switch to next fb - uint32_t timeout; // zero mean no timeout - uint16_t scroll; - - struct fb_st *next; - struct fb_st *prev; -} fb_t; - -fb_t *fb_new(uint16_t width); -static inline void fb_free(fb_t *fb) -{ - free((fb)->buf); - free((fb)); -} - -fb_t *fblist_insert(fb_t *at, fb_t *new); -fb_t *fblist_append(fb_t *new); -fb_t *fblist_drop(fb_t *fb); - -fb_t *fblist_gonext(); -fb_t *fblist_goprev() ; -fb_t *fblist_gohead(); -fb_t *fblist_currentfb(); - -void fblist_init(uint16_t first_fb_width); - -#endif /* __FB_H__ */ -- cgit v1.2.3