Update lvgl to v8.4.0

This commit is contained in:
lewisxhe
2024-09-13 11:35:47 +08:00
parent 1a57bfcf2b
commit f285d52d61
641 changed files with 25425 additions and 30726 deletions
+53 -36
View File
@@ -44,10 +44,11 @@ typedef struct {
int16_t value; /*Current value of the arc*/
int16_t min_value; /*Minimum value of the arc*/
int16_t max_value; /*Maximum value of the arc*/
uint16_t dragging : 1;
uint16_t type : 2;
uint16_t min_close : 1; /*1: the last pressed angle was closer to minimum end*/
uint16_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/
uint32_t dragging : 1;
uint32_t type : 2;
uint32_t min_close : 1; /*1: the last pressed angle was closer to minimum end*/
uint32_t in_out : 1; /* 1: The click was within the background arc angles. 0: Click outside */
uint32_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/
uint32_t last_tick; /*Last dragging event timestamp of the arc*/
int16_t last_angle; /*Last dragging angle of the arc*/
} lv_arc_t;
@@ -85,83 +86,83 @@ lv_obj_t * lv_arc_create(lv_obj_t * parent);
/**
* Set the start angle of an arc. 0 deg: right, 90 bottom, etc.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param start the start angle
*/
void lv_arc_set_start_angle(lv_obj_t * arc, uint16_t start);
void lv_arc_set_start_angle(lv_obj_t * obj, uint16_t start);
/**
* Set the end angle of an arc. 0 deg: right, 90 bottom, etc.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param end the end angle
*/
void lv_arc_set_end_angle(lv_obj_t * arc, uint16_t end);
void lv_arc_set_end_angle(lv_obj_t * obj, uint16_t end);
/**
* Set the start and end angles
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param start the start angle
* @param end the end angle
*/
void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end);
void lv_arc_set_angles(lv_obj_t * obj, uint16_t start, uint16_t end);
/**
* Set the start angle of an arc background. 0 deg: right, 90 bottom, etc.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param start the start angle
*/
void lv_arc_set_bg_start_angle(lv_obj_t * arc, uint16_t start);
void lv_arc_set_bg_start_angle(lv_obj_t * obj, uint16_t start);
/**
* Set the start angle of an arc background. 0 deg: right, 90 bottom etc.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param end the end angle
*/
void lv_arc_set_bg_end_angle(lv_obj_t * arc, uint16_t end);
void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint16_t end);
/**
* Set the start and end angles of the arc background
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param start the start angle
* @param end the end angle
*/
void lv_arc_set_bg_angles(lv_obj_t * arc, uint16_t start, uint16_t end);
void lv_arc_set_bg_angles(lv_obj_t * obj, uint16_t start, uint16_t end);
/**
* Set the rotation for the whole arc
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param rotation rotation angle
*/
void lv_arc_set_rotation(lv_obj_t * arc, uint16_t rotation);
void lv_arc_set_rotation(lv_obj_t * obj, uint16_t rotation);
/**
* Set the type of arc.
* @param arc pointer to arc object
* @param obj pointer to arc object
* @param mode arc's mode
*/
void lv_arc_set_mode(lv_obj_t * arc, lv_arc_mode_t type);
void lv_arc_set_mode(lv_obj_t * obj, lv_arc_mode_t type);
/**
* Set a new value on the arc
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param value new value
*/
void lv_arc_set_value(lv_obj_t * arc, int16_t value);
void lv_arc_set_value(lv_obj_t * obj, int16_t value);
/**
* Set minimum and the maximum values of an arc
* @param arc pointer to the arc object
* @param obj pointer to the arc object
* @param min minimum value
* @param max maximum value
*/
void lv_arc_set_range(lv_obj_t * arc, int16_t min, int16_t max);
void lv_arc_set_range(lv_obj_t * obj, int16_t min, int16_t max);
/**
* Set a change rate to limit the speed how fast the arc should reach the pressed point.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @param rate the change rate
*/
void lv_arc_set_change_rate(lv_obj_t * arc, uint16_t rate);
void lv_arc_set_change_rate(lv_obj_t * obj, uint16_t rate);
/*=====================
* Getter functions
@@ -169,56 +170,56 @@ void lv_arc_set_change_rate(lv_obj_t * arc, uint16_t rate);
/**
* Get the start angle of an arc.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @return the start angle [0..360]
*/
uint16_t lv_arc_get_angle_start(lv_obj_t * obj);
/**
* Get the end angle of an arc.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @return the end angle [0..360]
*/
uint16_t lv_arc_get_angle_end(lv_obj_t * obj);
/**
* Get the start angle of an arc background.
* @param arc pointer to an arc object
* @return the start angle [0..360]
* @param obj pointer to an arc object
* @return the start angle [0..360]
*/
uint16_t lv_arc_get_bg_angle_start(lv_obj_t * obj);
/**
* Get the end angle of an arc background.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @return the end angle [0..360]
*/
uint16_t lv_arc_get_bg_angle_end(lv_obj_t * obj);
/**
* Get the value of an arc
* @param arc pointer to an arc object
* @return the value of the arc
* @param obj pointer to an arc object
* @return the value of the arc
*/
int16_t lv_arc_get_value(const lv_obj_t * obj);
/**
* Get the minimum value of an arc
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @return the minimum value of the arc
*/
int16_t lv_arc_get_min_value(const lv_obj_t * obj);
/**
* Get the maximum value of an arc
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @return the maximum value of the arc
*/
int16_t lv_arc_get_max_value(const lv_obj_t * obj);
/**
* Get whether the arc is type or not.
* @param arc pointer to an arc object
* @param obj pointer to an arc object
* @return arc's mode
*/
lv_arc_mode_t lv_arc_get_mode(const lv_obj_t * obj);
@@ -227,6 +228,22 @@ lv_arc_mode_t lv_arc_get_mode(const lv_obj_t * obj);
* Other functions
*====================*/
/**
* Align an object to the current position of the arc (knob)
* @param obj pointer to an arc object
* @param obj_to_align pointer to an object to align
* @param r_offset consider the radius larger with this value (< 0: for smaller radius)
*/
void lv_arc_align_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_align, lv_coord_t r_offset);
/**
* Rotate an object to the current position of the arc (knob)
* @param obj pointer to an arc object
* @param obj_to_align pointer to an object to rotate
* @param r_offset consider the radius larger with this value (< 0: for smaller radius)
*/
void lv_arc_rotate_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_rotate, lv_coord_t r_offset);
/**********************
* MACROS
**********************/