lv_anim: add lv_anim_count_running
This commit is contained in:
@@ -115,6 +115,19 @@ bool lv_anim_del(void * var, lv_anim_fp_t fp)
|
|||||||
return del;
|
return del;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of currently running animations
|
||||||
|
* @return the number of running animations
|
||||||
|
*/
|
||||||
|
uint16_t lv_anim_count_running(void)
|
||||||
|
{
|
||||||
|
uint16_t cnt = 0;
|
||||||
|
lv_anim_t * a;
|
||||||
|
LL_READ(anim_ll, a) cnt++;
|
||||||
|
|
||||||
|
return cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the time of an animation with a given speed and the start and end values
|
* Calculate the time of an animation with a given speed and the start and end values
|
||||||
* @param speed speed of animation in unit/sec
|
* @param speed speed of animation in unit/sec
|
||||||
|
|||||||
@@ -99,6 +99,12 @@ void lv_anim_create(lv_anim_t * anim_p);
|
|||||||
*/
|
*/
|
||||||
bool lv_anim_del(void * var, lv_anim_fp_t fp);
|
bool lv_anim_del(void * var, lv_anim_fp_t fp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of currently running animations
|
||||||
|
* @return the number of running animations
|
||||||
|
*/
|
||||||
|
uint16_t lv_anim_count_running(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the time of an animation with a given speed and the start and end values
|
* Calculate the time of an animation with a given speed and the start and end values
|
||||||
* @param speed speed of animation in unit/sec
|
* @param speed speed of animation in unit/sec
|
||||||
|
|||||||
Reference in New Issue
Block a user