feat(anim): add the function of getting global animation refresher timer (#3331)
* feat(anim): add dynamic setting animation refresh period support * add lv_anim_get_refr_period * add lv_anim_get_timer Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user