fix: fix parameter order in function prototypes (#2929)
* Fixed inconsistent header for find_track_end() * Fixed inconsistent header for lv_tileview_add_tile() * Made ptr const in lv_tlsf_free() * Made ptr const in lv_tlsf_free() * Corrected lv_bar_set_value() calls * Corrected use of bool for lv_anim_enable_t * Fixed uninitialised variable for performance monitor * Undo fix
This commit is contained in:
@@ -54,8 +54,8 @@ typedef struct {
|
|||||||
* STATIC PROTOTYPES
|
* STATIC PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
static void flex_update(lv_obj_t * cont, void * user_data);
|
static void flex_update(lv_obj_t * cont, void * user_data);
|
||||||
static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id, lv_coord_t item_gap,
|
static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id, lv_coord_t max_main_size,
|
||||||
lv_coord_t max_main_size, track_t * t);
|
lv_coord_t item_gap, track_t * t);
|
||||||
static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, int32_t item_last_id, lv_coord_t abs_x,
|
static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, int32_t item_last_id, lv_coord_t abs_x,
|
||||||
lv_coord_t abs_y, lv_coord_t max_main_size, lv_coord_t item_gap, track_t * t);
|
lv_coord_t abs_y, lv_coord_t max_main_size, lv_coord_t item_gap, track_t * t);
|
||||||
static void place_content(lv_flex_align_t place, lv_coord_t max_size, lv_coord_t content_size, lv_coord_t item_cnt,
|
static void place_content(lv_flex_align_t place, lv_coord_t max_size, lv_coord_t content_size, lv_coord_t item_cnt,
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ extern const lv_obj_class_t lv_tileview_tile_class;
|
|||||||
*/
|
*/
|
||||||
lv_obj_t * lv_tileview_create(lv_obj_t * parent);
|
lv_obj_t * lv_tileview_create(lv_obj_t * parent);
|
||||||
|
|
||||||
lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t row_id, uint8_t col_id, lv_dir_t dir);
|
lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir);
|
||||||
|
|
||||||
void lv_obj_set_tile(lv_obj_t * tv, lv_obj_t * tile_obj, lv_anim_enable_t anim_en);
|
void lv_obj_set_tile(lv_obj_t * tv, lv_obj_t * tile_obj, lv_anim_enable_t anim_en);
|
||||||
void lv_obj_set_tile_id(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en);
|
void lv_obj_set_tile_id(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en);
|
||||||
|
|||||||
@@ -1157,7 +1157,7 @@ void * lv_tlsf_memalign(lv_tlsf_t tlsf, size_t align, size_t size)
|
|||||||
return block_prepare_used(control, block, adjust);
|
return block_prepare_used(control, block, adjust);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_tlsf_free(lv_tlsf_t tlsf, void * ptr)
|
void lv_tlsf_free(lv_tlsf_t tlsf, const void * ptr)
|
||||||
{
|
{
|
||||||
/* Don't attempt to free a NULL pointer. */
|
/* Don't attempt to free a NULL pointer. */
|
||||||
if(ptr) {
|
if(ptr) {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ void lv_tlsf_remove_pool(lv_tlsf_t tlsf, lv_pool_t pool);
|
|||||||
void * lv_tlsf_malloc(lv_tlsf_t tlsf, size_t bytes);
|
void * lv_tlsf_malloc(lv_tlsf_t tlsf, size_t bytes);
|
||||||
void * lv_tlsf_memalign(lv_tlsf_t tlsf, size_t align, size_t bytes);
|
void * lv_tlsf_memalign(lv_tlsf_t tlsf, size_t align, size_t bytes);
|
||||||
void * lv_tlsf_realloc(lv_tlsf_t tlsf, void * ptr, size_t size);
|
void * lv_tlsf_realloc(lv_tlsf_t tlsf, void * ptr, size_t size);
|
||||||
void lv_tlsf_free(lv_tlsf_t tlsf, void * ptr);
|
void lv_tlsf_free(lv_tlsf_t tlsf, const void * ptr);
|
||||||
|
|
||||||
/* Returns internal block size, not original request size */
|
/* Returns internal block size, not original request size */
|
||||||
size_t lv_tlsf_block_size(void * ptr);
|
size_t lv_tlsf_block_size(void * ptr);
|
||||||
|
|||||||
@@ -130,11 +130,11 @@ void lv_bar_set_range(lv_obj_t * obj, int32_t min, int32_t max)
|
|||||||
|
|
||||||
if(bar->cur_value > max) {
|
if(bar->cur_value > max) {
|
||||||
bar->cur_value = max;
|
bar->cur_value = max;
|
||||||
lv_bar_set_value(obj, bar->cur_value, false);
|
lv_bar_set_value(obj, bar->cur_value, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
if(bar->cur_value < min) {
|
if(bar->cur_value < min) {
|
||||||
bar->cur_value = min;
|
bar->cur_value = min;
|
||||||
lv_bar_set_value(obj, bar->cur_value, false);
|
lv_bar_set_value(obj, bar->cur_value, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
lv_obj_invalidate(obj);
|
lv_obj_invalidate(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,10 +332,10 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
|||||||
/*Be sure the label's style is updated before processing the roller*/
|
/*Be sure the label's style is updated before processing the roller*/
|
||||||
if(label) lv_event_send(label, LV_EVENT_STYLE_CHANGED, NULL);
|
if(label) lv_event_send(label, LV_EVENT_STYLE_CHANGED, NULL);
|
||||||
lv_obj_refresh_self_size(obj);
|
lv_obj_refresh_self_size(obj);
|
||||||
refr_position(obj, false);
|
refr_position(obj, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
else if(code == LV_EVENT_SIZE_CHANGED) {
|
else if(code == LV_EVENT_SIZE_CHANGED) {
|
||||||
refr_position(obj, false);
|
refr_position(obj, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
else if(code == LV_EVENT_PRESSED) {
|
else if(code == LV_EVENT_PRESSED) {
|
||||||
roller->moved = 0;
|
roller->moved = 0;
|
||||||
@@ -365,7 +365,7 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
|||||||
if(!editing) {
|
if(!editing) {
|
||||||
if(roller->sel_opt_id != roller->sel_opt_id_ori) {
|
if(roller->sel_opt_id != roller->sel_opt_id_ori) {
|
||||||
roller->sel_opt_id = roller->sel_opt_id_ori;
|
roller->sel_opt_id = roller->sel_opt_id_ori;
|
||||||
refr_position(obj, true);
|
refr_position(obj, LV_ANIM_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*Save the current state when entered to edit mode*/
|
/*Save the current state when entered to edit mode*/
|
||||||
@@ -382,7 +382,7 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
|||||||
/*Revert the original state*/
|
/*Revert the original state*/
|
||||||
if(roller->sel_opt_id != roller->sel_opt_id_ori) {
|
if(roller->sel_opt_id != roller->sel_opt_id_ori) {
|
||||||
roller->sel_opt_id = roller->sel_opt_id_ori;
|
roller->sel_opt_id = roller->sel_opt_id_ori;
|
||||||
refr_position(obj, true);
|
refr_position(obj, LV_ANIM_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(code == LV_EVENT_KEY) {
|
else if(code == LV_EVENT_KEY) {
|
||||||
@@ -390,7 +390,7 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
|||||||
if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) {
|
if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) {
|
||||||
if(roller->sel_opt_id + 1 < roller->option_cnt) {
|
if(roller->sel_opt_id + 1 < roller->option_cnt) {
|
||||||
uint16_t ori_id = roller->sel_opt_id_ori; /*lv_roller_set_selected will overwrite this*/
|
uint16_t ori_id = roller->sel_opt_id_ori; /*lv_roller_set_selected will overwrite this*/
|
||||||
lv_roller_set_selected(obj, roller->sel_opt_id + 1, true);
|
lv_roller_set_selected(obj, roller->sel_opt_id + 1, LV_ANIM_ON);
|
||||||
roller->sel_opt_id_ori = ori_id;
|
roller->sel_opt_id_ori = ori_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -398,7 +398,7 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
|||||||
if(roller->sel_opt_id > 0) {
|
if(roller->sel_opt_id > 0) {
|
||||||
uint16_t ori_id = roller->sel_opt_id_ori; /*lv_roller_set_selected will overwrite this*/
|
uint16_t ori_id = roller->sel_opt_id_ori; /*lv_roller_set_selected will overwrite this*/
|
||||||
|
|
||||||
lv_roller_set_selected(obj, roller->sel_opt_id - 1, true);
|
lv_roller_set_selected(obj, roller->sel_opt_id - 1, LV_ANIM_ON);
|
||||||
roller->sel_opt_id_ori = ori_id;
|
roller->sel_opt_id_ori = ori_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user