diff --git a/src/misc/lv_anim.c b/src/misc/lv_anim.c index ecb95840d..133b59ff3 100644 --- a/src/misc/lv_anim.c +++ b/src/misc/lv_anim.c @@ -177,6 +177,11 @@ lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb) return NULL; } +struct _lv_timer_t * lv_anim_get_timer(void) +{ + return _lv_anim_tmr; +} + uint16_t lv_anim_count_running(void) { uint16_t cnt = 0; diff --git a/src/misc/lv_anim.h b/src/misc/lv_anim.h index 18317eb38..3a8dc30f7 100644 --- a/src/misc/lv_anim.h +++ b/src/misc/lv_anim.h @@ -40,6 +40,7 @@ typedef enum { } lv_anim_enable_t; struct _lv_anim_t; +struct _lv_timer_t; /** Get the current value during an animation*/ typedef int32_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *); @@ -345,6 +346,12 @@ void lv_anim_del_all(void); */ lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb); +/** + * Get global animation refresher timer. + * @return pointer to the animation refresher timer. + */ +struct _lv_timer_t * lv_anim_get_timer(void); + /** * Delete an animation by getting the animated variable from `a`. * Only animations with `exec_cb` will be deleted.