add lv_anim_refr_now()
This commit is contained in:
@@ -73,6 +73,8 @@ void lv_refr_init(void)
|
||||
*/
|
||||
void lv_refr_now(lv_disp_t * disp)
|
||||
{
|
||||
lv_anim_refr_now();
|
||||
|
||||
if(disp) {
|
||||
lv_disp_refr_task(disp->refr_task);
|
||||
} else {
|
||||
|
||||
@@ -172,6 +172,17 @@ uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_va
|
||||
return time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually refresh the state of the animations.
|
||||
* Useful to make the animations running in a blocking process where
|
||||
* `lv_task_handler` can't run for a while.
|
||||
* Shouldn't be used directly because it is called in `lv_refr_now()`.
|
||||
*/
|
||||
void lv_anim_refr_now(void)
|
||||
{
|
||||
anim_task(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the current value of an animation applying linear characteristic
|
||||
* @param a pointer to an animation
|
||||
|
||||
@@ -268,6 +268,14 @@ uint16_t lv_anim_count_running(void);
|
||||
*/
|
||||
uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end);
|
||||
|
||||
/**
|
||||
* Manually refresh the state of the animations.
|
||||
* Useful to make the animations running in a blocking process where
|
||||
* `lv_task_handler` can't run for a while.
|
||||
* Shouldn't be used directly because it is called in `lv_refr_now()`.
|
||||
*/
|
||||
void lv_anim_refr_now(void);
|
||||
|
||||
/**
|
||||
* Calculate the current value of an animation applying linear characteristic
|
||||
* @param a pointer to an animation
|
||||
|
||||
Reference in New Issue
Block a user