fix(comment): remove the space after /* and before */

This commit is contained in:
Xiang Xiao
2021-03-15 02:03:27 +08:00
parent a7084509b5
commit 9254a7ea14
226 changed files with 1387 additions and 1374 deletions

View File

@@ -258,7 +258,7 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
switch(anim_type) {
case LV_SCR_LOAD_ANIM_NONE:
/* Create a dummy animation to apply the delay*/
/*Create a dummy animation to apply the delay*/
lv_anim_set_exec_cb(&a_new, set_x_anim);
lv_anim_set_values(&a_new, 0, 0);
break;

View File

@@ -225,7 +225,7 @@ static inline lv_coord_t lv_dpx(lv_coord_t n)
}
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DISP_H*/

View File

@@ -134,8 +134,8 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj)
if(next == NULL) return;
*next = obj;
/* If the head and the tail is equal then there is only one object in the linked list.
* In this case automatically activate it*/
/*If the head and the tail is equal then there is only one object in the linked list.
*In this case automatically activate it*/
if(_lv_ll_get_head(&group->obj_ll) == next) {
lv_group_refocus(group);
}
@@ -168,14 +168,14 @@ void lv_group_remove_obj(lv_obj_t * obj)
}
}
/* If the focuses object is still the same then it was the only object in the group but it will
* be deleted. Set the `obj_focus` to NULL to get back to the initial state of the group with
* zero objects*/
/*If the focuses object is still the same then it was the only object in the group but it will
*be deleted. Set the `obj_focus` to NULL to get back to the initial state of the group with
*zero objects*/
if(*g->obj_focus == obj) {
g->obj_focus = NULL;
}
/*Search the object and remove it from its group */
/*Search the object and remove it from its group*/
lv_obj_t ** i;
_LV_LL_READ(&g->obj_ll, i) {
if(*i == obj) {

View File

@@ -55,7 +55,7 @@ typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *);
* They are NOT for laying out objects on a screen (try `lv_cont` for that).
*/
typedef struct _lv_group_t {
lv_ll_t obj_ll; /**< Linked list to store the objects in the group */
lv_ll_t obj_ll; /**< Linked list to store the objects in the group*/
struct _lv_obj_t ** obj_focus; /**< The object in focus*/
lv_group_focus_cb_t focus_cb; /**< A function to call when a new object is focused (optional)*/
@@ -66,7 +66,7 @@ typedef struct _lv_group_t {
uint8_t frozen : 1; /**< 1: can't focus to new object*/
uint8_t editing : 1; /**< 1: Edit mode, 0: Navigate mode*/
uint8_t click_focus : 1; /**< 1: If an object in a group is clicked by an indev then it will be
focused */
focused*/
uint8_t refocus_policy : 1; /**< 1: Focus prev if focused on deletion. 0: Focus next if focused on
deletion.*/
uint8_t wrap : 1; /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
@@ -226,7 +226,7 @@ bool lv_group_get_wrap(lv_group_t * group);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_GROUP_H*/

View File

@@ -379,13 +379,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
/*Save the last key to compare it with the current latter on RELEASE*/
uint32_t prev_key = i->proc.types.keypad.last_key;
/* Save the last key.
* It must be done here else `lv_indev_get_key` will return the last key in events and signals*/
/*Save the last key.
*It must be done here else `lv_indev_get_key` will return the last key in events and signals*/
i->proc.types.keypad.last_key = data->key;
/* Save the previous state so we can detect state changes below and also set the last state now
* so if any signal/event handler on the way returns `LV_RES_INV` the last state is remembered
* for the next time*/
/*Save the previous state so we can detect state changes below and also set the last state now
*so if any signal/event handler on the way returns `LV_RES_INV` the last state is remembered
*for the next time*/
uint32_t prev_state = i->proc.types.keypad.last_state;
i->proc.types.keypad.last_state = data->state;
@@ -524,8 +524,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
i->proc.types.keypad.last_state = LV_INDEV_STATE_RELEASED; /*To skip the processing of release*/
}
/* Save the last keys before anything else.
* They need to be already saved if the function returns for any reason*/
/*Save the last keys before anything else.
*They need to be already saved if the function returns for any reason*/
lv_indev_state_t last_state = i->proc.types.keypad.last_state;
i->proc.types.keypad.last_state = data->state;
i->proc.types.keypad.last_key = data->key;
@@ -584,7 +584,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
}
/*Pressing*/
else if(data->state == LV_INDEV_STATE_PRESSED && last_state == LV_INDEV_STATE_PRESSED) {
/* Long press*/
/*Long press*/
if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver->long_press_time) {
i->proc.long_pr_sent = 1;
@@ -659,7 +659,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL);
if(indev_reset_check(&i->proc)) return;
}
/*An object is being edited and the button is released. */
/*An object is being edited and the button is released.*/
else if(g->editing) {
/*Ignore long pressed enter release because it comes from mode switch*/
if(!i->proc.long_pr_sent || _lv_ll_get_len(&g->obj_ll) <= 1) {
@@ -724,7 +724,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
*/
static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data)
{
/* Die gracefully if i->btn_points is NULL */
/*Die gracefully if i->btn_points is NULL*/
if(i->btn_points == NULL) {
LV_LOG_WARN("btn_points is NULL");
return;
@@ -829,7 +829,7 @@ static void indev_proc_press(lv_indev_proc_t * proc)
proc->types.pointer.last_obj = indev_obj_act;
if(indev_obj_act != NULL) {
/* Save the time when the obj pressed to count long press time.*/
/*Save the time when the obj pressed to count long press time.*/
proc->pr_timestamp = lv_tick_get();
proc->long_pr_sent = 0;
proc->types.pointer.scroll_sum.x = 0;
@@ -929,7 +929,7 @@ static void indev_proc_release(lv_indev_proc_t * proc)
indev_obj_act = proc->types.pointer.act_obj;
lv_obj_t * scroll_obj = proc->types.pointer.scroll_obj;
/*Forget the act obj and send a released signal */
/*Forget the act obj and send a released signal*/
if(indev_obj_act) {
LV_LOG_INFO("released");
@@ -1006,7 +1006,7 @@ static void indev_click_focus(lv_indev_proc_t * proc)
lv_group_t * g_act = lv_obj_get_group(obj_to_focus);
lv_group_t * g_prev = proc->types.pointer.last_pressed ? lv_obj_get_group(proc->types.pointer.last_pressed) : NULL;
/*If both the last and act. obj. are in the same group (or no group but it's also the same) */
/*If both the last and act. obj. are in the same group (or no group but it's also the same)*/
if(g_act == g_prev) {
/*The objects are in a group*/
if(g_act) {

View File

@@ -170,7 +170,7 @@ lv_obj_t * lv_indev_search_obj(lv_obj_t * obj, lv_point_t * point);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_INDEV_H*/

View File

@@ -158,7 +158,7 @@ void _lv_indev_scroll_throw_handler(lv_indev_proc_t * proc)
}
}
/*Check if the scroll has finished */
/*Check if the scroll has finished*/
if(proc->types.pointer.scroll_throw_vect.x == 0 && proc->types.pointer.scroll_throw_vect.y == 0) {
/*Revert if scrolled in*/
/*If vertically scrollable and not controlled by snap*/
@@ -247,13 +247,13 @@ static lv_obj_t * find_scroll_obj(lv_indev_proc_t * proc)
lv_indev_t * indev_act = lv_indev_get_act();
lv_coord_t scroll_limit = indev_act->driver->scroll_limit;
/* Go until find an scrollable object in the current direction
* More precisely:
* 1. Check the pressed object and all of its ancestors and try to find an object which is scrollable
* 2. Scrollable means it has some content out of it's area
* 3. If an object can be scrolled into the current direction then use it ("real match"")
* 4. If can be scrolled on the current axis (hor/ver) save it as candidate (at least show an elastic scroll effect)
* 5. Use the last candidate. Always the "deepest" parent or the object from point 3 */
/*Go until find an scrollable object in the current direction
*More precisely:
* 1. Check the pressed object and all of its ancestors and try to find an object which is scrollable
* 2. Scrollable means it has some content out of it's area
* 3. If an object can be scrolled into the current direction then use it ("real match"")
* 4. If can be scrolled on the current axis (hor/ver) save it as candidate (at least show an elastic scroll effect)
* 5. Use the last candidate. Always the "deepest" parent or the object from point 3*/
lv_obj_t * obj_act = proc->types.pointer.act_obj;
while(obj_act) {
if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLLABLE) == false) {
@@ -286,16 +286,16 @@ static lv_obj_t * find_scroll_obj(lv_indev_proc_t * proc)
if((scroll_dir & LV_DIR_TOP) == 0) up_en = false;
if((scroll_dir & LV_DIR_BOTTOM) == 0) down_en = false;
/*The object is scrollable to a direction if its content overflow in that direction. */
/*The object is scrollable to a direction if its content overflow in that direction.*/
lv_coord_t st = lv_obj_get_scroll_top(obj_act);
lv_coord_t sb = lv_obj_get_scroll_bottom(obj_act);
lv_coord_t sl = lv_obj_get_scroll_left(obj_act);
lv_coord_t sr = lv_obj_get_scroll_right(obj_act);
/* If this object is scrollable into the current scroll direction then save it as a candidate.
* It's important only to be scrollable on the current axis (hor/ver) because if the scroll
* is propagated to this object it can show at least elastic scroll effect.
* But if not hor/ver scrollable do not scroll it at all (so it's not a good candidate) */
/*If this object is scrollable into the current scroll direction then save it as a candidate.
*It's important only to be scrollable on the current axis (hor/ver) because if the scroll
*is propagated to this object it can show at least elastic scroll effect.
*But if not hor/ver scrollable do not scroll it at all (so it's not a good candidate)*/
if((st > 0 || sb > 0) &&
((up_en && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
(down_en && proc->types.pointer.scroll_sum.y <= - scroll_limit)))
@@ -317,7 +317,7 @@ static lv_obj_t * find_scroll_obj(lv_indev_proc_t * proc)
if(sl <= 0) left_en = false;
if(sr <= 0) right_en = false;
/*If the object really can be scrolled into the current direction the use it. */
/*If the object really can be scrolled into the current direction the use it.*/
if((left_en && proc->types.pointer.scroll_sum.x >= scroll_limit) ||
(right_en && proc->types.pointer.scroll_sum.x <= - scroll_limit) ||
(up_en && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
@@ -330,7 +330,7 @@ static lv_obj_t * find_scroll_obj(lv_indev_proc_t * proc)
/*If this object don't want to chain the scroll ot the parent stop searching*/
if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLL_CHAIN) == false) break;
/*Try the parent */
/*Try the parent*/
obj_act = lv_obj_get_parent(obj_act);
}
@@ -563,8 +563,8 @@ static lv_coord_t scroll_throw_predict_x(lv_indev_proc_t * proc)
static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_t scroll_start, lv_coord_t scroll_end, lv_dir_t dir)
{
if(lv_obj_has_flag(scroll_obj, LV_OBJ_FLAG_SCROLL_ELASTIC)) {
/* If there is snapping in the current direction don't use the elastic factor because
* it's natural that the first and last items are scrolled (snapped) in. */
/*If there is snapping in the current direction don't use the elastic factor because
*it's natural that the first and last items are scrolled (snapped) in.*/
lv_scroll_snap_t snap;
snap = dir == LV_DIR_HOR ? lv_obj_get_scroll_snap_x(scroll_obj) : lv_obj_get_scroll_snap_y(scroll_obj);

View File

@@ -59,7 +59,7 @@ void lv_indev_scroll_get_snap_dist(lv_obj_t * obj, lv_point_t * p);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_INDEV_SCROLL_H*/

View File

@@ -106,7 +106,7 @@ const lv_obj_class_t lv_obj_class = {
void lv_init(void)
{
/* Do nothing if already initialized */
/*Do nothing if already initialized*/
if(lv_initialized) {
LV_LOG_WARN("lv_init: already inited");
return;
@@ -207,9 +207,9 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, void * param)
return LV_RES_OK;
}
/* Build a simple linked list from the objects used in the events
* It's important to know if an this object was deleted by a nested event
* called from this `event_cb`. */
/*Build a simple linked list from the objects used in the events
*It's important to know if an this object was deleted by a nested event
*called from this `event_cb`.*/
lv_event_temp_data_t event_temp_data;
event_temp_data.obj = obj;
event_temp_data.deleted = false;
@@ -220,8 +220,8 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, void * param)
}
event_temp_data_head = &event_temp_data;
/* There could be nested event sending with different param.
* It needs to be saved for the current event context because `lv_event_get_data` returns a global param. */
/*There could be nested event sending with different param.
*It needs to be saved for the current event context because `lv_event_get_data` returns a global param.*/
void * event_act_param_save = event_act_param;
event_act_param = param;
@@ -437,8 +437,8 @@ void lv_obj_set_base_dir(lv_obj_t * obj, lv_bidi_dir_t dir)
obj->spec_attr->base_dir = dir;
lv_signal_send(obj, LV_SIGNAL_BASE_DIR_CHG, NULL);
/* Notify the children about the parent base dir has changed.
* (The children might have `LV_BIDI_DIR_INHERIT`)*/
/*Notify the children about the parent base dir has changed.
*(The children might have `LV_BIDI_DIR_INHERIT`)*/
base_dir_refr_children(obj);
}
@@ -679,7 +679,7 @@ static void lv_obj_constructor(lv_obj_t * obj, const lv_obj_t * copy)
}
/*Add to the same group*/
if(copy->spec_attr && copy->spec_attr->group_p) {
obj->spec_attr->group_p = NULL; /*It was simply copied */
obj->spec_attr->group_p = NULL; /*It was simply copied*/
lv_group_add_obj(copy->spec_attr->group_p, obj);
}
@@ -999,8 +999,8 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
}
}
else if(sign == LV_SIGNAL_BASE_DIR_CHG) {
/* The layout might depend on the base dir.
* E.g. the first is element is on the left or right*/
/*The layout might depend on the base dir.
*E.g. the first is element is on the left or right*/
lv_obj_mark_layout_as_dirty(obj);
}
else if(sign == LV_SIGNAL_SCROLL) {
@@ -1018,7 +1018,7 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
*s = LV_MAX(*s, d);
}
else if(sign == LV_SIGNAL_STYLE_CHG) {
/* Padding might have changed so the layout should be recalculated*/
/*Padding might have changed so the layout should be recalculated*/
lv_obj_mark_layout_as_dirty(obj);
/*Reposition non grid objects on by one*/

View File

@@ -44,8 +44,8 @@ struct _lv_obj_t;
typedef enum {
LV_EVENT_PRESSED, /**< The object has been pressed*/
LV_EVENT_PRESSING, /**< The object is being pressed (called continuously while pressing)*/
LV_EVENT_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */
LV_EVENT_SHORT_CLICKED, /**< User pressed object for a short period of time, then released it. Not called if scrolled. */
LV_EVENT_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object*/
LV_EVENT_SHORT_CLICKED, /**< User pressed object for a short period of time, then released it. Not called if scrolled.*/
LV_EVENT_LONG_PRESSED, /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if scrolled.*/
LV_EVENT_LONG_PRESSED_REPEAT, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every
`LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if scrolled.*/
@@ -59,13 +59,13 @@ typedef enum {
LV_EVENT_FOCUSED,
LV_EVENT_DEFOCUSED,
LV_EVENT_LEAVE,
LV_EVENT_VALUE_CHANGED, /**< The object's value has changed (i.e. slider moved) */
LV_EVENT_VALUE_CHANGED, /**< The object's value has changed (i.e. slider moved)*/
LV_EVENT_INSERT,
LV_EVENT_REFRESH,
LV_EVENT_DELETE, /**< Object is being deleted */
LV_EVENT_DELETE, /**< Object is being deleted*/
LV_EVENT_COVER_CHECK, /**< Check if the object fully covers the 'mask_p' area */
LV_EVENT_REFR_EXT_DRAW_SIZE, /**< Draw extras on the object */
LV_EVENT_COVER_CHECK, /**< Check if the object fully covers the 'mask_p' area*/
LV_EVENT_REFR_EXT_DRAW_SIZE, /**< Draw extras on the object*/
LV_EVENT_DRAW_MAIN_BEGIN,
LV_EVENT_DRAW_MAIN_END,
@@ -74,8 +74,8 @@ typedef enum {
LV_EVENT_DRAW_PART_BEGIN,
LV_EVENT_DRAW_PART_END,
LV_EVENT_READY, /**< A process has finished */
LV_EVENT_CANCEL, /**< A process has been cancelled */
LV_EVENT_READY, /**< A process has finished*/
LV_EVENT_CANCEL, /**< A process has been cancelled*/
_LV_EVENT_LAST /** Number of default events*/
}lv_event_t;
@@ -100,32 +100,32 @@ typedef struct {
/** Signals are for use by the object itself or to extend the object's functionality.
* They determine a widget with a given type should behave.
* Applications should use ::lv_obj_set_event_cb to be notified of events that occur
* on the object. */
* on the object.*/
typedef enum {
/*General signals*/
LV_SIGNAL_CHILD_CHG, /**< Child was removed/added */
LV_SIGNAL_COORD_CHG, /**< Object coordinates/size have changed */
LV_SIGNAL_STYLE_CHG, /**< Object's style has changed */
LV_SIGNAL_CHILD_CHG, /**< Child was removed/added*/
LV_SIGNAL_COORD_CHG, /**< Object coordinates/size have changed*/
LV_SIGNAL_STYLE_CHG, /**< Object's style has changed*/
LV_SIGNAL_BASE_DIR_CHG, /**< The base dir has changed*/
LV_SIGNAL_REFR_EXT_DRAW_SIZE, /**< Object's extra padding has changed */
LV_SIGNAL_REFR_EXT_DRAW_SIZE, /**< Object's extra padding has changed*/
LV_SIGNAL_GET_SELF_SIZE, /**< Get the internal size of a widget*/
/*Input device related*/
LV_SIGNAL_HIT_TEST, /**< Advanced hit-testing */
LV_SIGNAL_HIT_TEST, /**< Advanced hit-testing*/
LV_SIGNAL_PRESSED, /**< The object has been pressed*/
LV_SIGNAL_PRESSING, /**< The object is being pressed (called continuously while pressing)*/
LV_SIGNAL_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */
LV_SIGNAL_RELEASED, /**< User pressed object for a short period of time, then released it. Not called if scrolled. */
LV_SIGNAL_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object*/
LV_SIGNAL_RELEASED, /**< User pressed object for a short period of time, then released it. Not called if scrolled.*/
LV_SIGNAL_LONG_PRESS, /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if scrolled.*/
LV_SIGNAL_LONG_PRESS_REP, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if scrolled.*/
LV_SIGNAL_SCROLL_BEGIN, /**< The scrolling has just begun */
LV_SIGNAL_SCROLL, /**< The object has been scrolled */
LV_SIGNAL_SCROLL_END, /**< The scrolling has ended */
LV_SIGNAL_SCROLL_BEGIN, /**< The scrolling has just begun*/
LV_SIGNAL_SCROLL, /**< The object has been scrolled*/
LV_SIGNAL_SCROLL_END, /**< The scrolling has ended*/
LV_SIGNAL_GESTURE, /**< The object has been gesture*/
LV_SIGNAL_LEAVE, /**< Another object is clicked or chosen via an input device */
LV_SIGNAL_FOCUS, /**< The object was focused */
LV_SIGNAL_DEFOCUS, /**< The object was de-focused */
LV_SIGNAL_CONTROL, /**< Send a (control) character to the widget */
LV_SIGNAL_LEAVE, /**< Another object is clicked or chosen via an input device*/
LV_SIGNAL_FOCUS, /**< The object was focused*/
LV_SIGNAL_DEFOCUS, /**< The object was de-focused*/
LV_SIGNAL_CONTROL, /**< Send a (control) character to the widget*/
} lv_signal_t;
/**
@@ -155,7 +155,7 @@ enum {
LV_STATE_USER_3 = 0x4000,
LV_STATE_USER_4 = 0x8000,
LV_STATE_ANY = 0xFFFF, /**< Special value can be used in some functions to target all states */
LV_STATE_ANY = 0xFFFF, /**< Special value can be used in some functions to target all states*/
};
typedef uint16_t lv_state_t;
@@ -169,8 +169,8 @@ typedef uint16_t lv_state_t;
enum {
LV_PART_MAIN, /**< A background like rectangle*/
LV_PART_SCROLLBAR, /**< The scrollbar(s)*/
LV_PART_INDICATOR, /**< Indicator, e.g. for slider, bar, switch, or the tick box of the checkbox */
LV_PART_KNOB, /**< Like handle to grab to adjust the value */
LV_PART_INDICATOR, /**< Indicator, e.g. for slider, bar, switch, or the tick box of the checkbox*/
LV_PART_KNOB, /**< Like handle to grab to adjust the value*/
LV_PART_SELECTED, /**< Indicate the currently selected option or section*/
LV_PART_ITEMS, /**< Used if the widget has multiple similar elements (e.g. tabel cells)*/
LV_PART_TICKS, /**< Ticks on scale e.g. for a chart or meter*/
@@ -185,7 +185,7 @@ enum {
LV_PART_CUSTOM_7, /**< Extension point for custom widgets*/
LV_PART_CUSTOM_8, /**< Extension point for custom widgets*/
LV_PART_ANY = 0xFF, /**< Special value can be used in some functions to target all parts */
LV_PART_ANY = 0xFF, /**< Special value can be used in some functions to target all parts*/
};
typedef uint16_t lv_part_t;
@@ -195,24 +195,24 @@ typedef uint16_t lv_part_t;
* OR-ed values are possible
*/
enum {
LV_OBJ_FLAG_HIDDEN = (1 << 0), /**< Make the object hidden. (Like it wasn't there at all) */
LV_OBJ_FLAG_CLICKABLE = (1 << 1), /**< Make the object clickable by the input devices */
LV_OBJ_FLAG_CLICK_FOCUSABLE = (1 << 2), /**< Add focused state to the object when clicked */
LV_OBJ_FLAG_CHECKABLE = (1 << 3), /**< Toggle checked state when the object is clicked */
LV_OBJ_FLAG_HIDDEN = (1 << 0), /**< Make the object hidden. (Like it wasn't there at all)*/
LV_OBJ_FLAG_CLICKABLE = (1 << 1), /**< Make the object clickable by the input devices*/
LV_OBJ_FLAG_CLICK_FOCUSABLE = (1 << 2), /**< Add focused state to the object when clicked*/
LV_OBJ_FLAG_CHECKABLE = (1 << 3), /**< Toggle checked state when the object is clicked*/
LV_OBJ_FLAG_SCROLLABLE = (1 << 4), /**< Make the object scrollable*/
LV_OBJ_FLAG_SCROLL_ELASTIC = (1 << 5), /**< Allow scrolling inside but with slower speed*/
LV_OBJ_FLAG_SCROLL_MOMENTUM = (1 << 6), /**< Make the object scroll further when "thrown"*/
LV_OBJ_FLAG_SCROLL_ONE = (1 << 7), /**< Allow scrolling only one snapable children*/
LV_OBJ_FLAG_SCROLL_CHAIN = (1 << 8), /**< Allow propagating the scroll to a parent */
LV_OBJ_FLAG_SCROLL_CHAIN = (1 << 8), /**< Allow propagating the scroll to a parent*/
LV_OBJ_FLAG_SCROLL_ON_FOCUS = (1 << 9), /**< Automatically scroll object to make it visible when focused*/
LV_OBJ_FLAG_SNAPABLE = (1 << 10), /**< If scroll snap is enabled on the parent it can snap to this object*/
LV_OBJ_FLAG_PRESS_LOCK = (1 << 11), /**< Keep the object pressed even if the press slid from the object */
LV_OBJ_FLAG_EVENT_BUBBLE = (1 << 12), /**< Propagate the events to the parent too */
LV_OBJ_FLAG_GESTURE_BUBBLE = (1 << 13), /**< Propagate the gestures to the parent */
LV_OBJ_FLAG_FOCUS_BUBBLE = (1 << 14), /**< Propagate the focus to the parent */
LV_OBJ_FLAG_ADV_HITTEST = (1 << 15), /**< Allow performing more accurate hit (click) test. E.g. consider rounded corners. */
LV_OBJ_FLAG_IGNORE_LAYOUT = (1 << 16), /**< Make the object position-able by the layouts */
LV_OBJ_FLAG_FLOATING = (1 << 17), /**< Do not scroll the object when the parent scrolls and ignore layout */
LV_OBJ_FLAG_PRESS_LOCK = (1 << 11), /**< Keep the object pressed even if the press slid from the object*/
LV_OBJ_FLAG_EVENT_BUBBLE = (1 << 12), /**< Propagate the events to the parent too*/
LV_OBJ_FLAG_GESTURE_BUBBLE = (1 << 13), /**< Propagate the gestures to the parent*/
LV_OBJ_FLAG_FOCUS_BUBBLE = (1 << 14), /**< Propagate the focus to the parent*/
LV_OBJ_FLAG_ADV_HITTEST = (1 << 15), /**< Allow performing more accurate hit (click) test. E.g. consider rounded corners.*/
LV_OBJ_FLAG_IGNORE_LAYOUT = (1 << 16), /**< Make the object position-able by the layouts*/
LV_OBJ_FLAG_FLOATING = (1 << 17), /**< Do not scroll the object when the parent scrolls and ignore layout*/
LV_OBJ_FLAG_LAYOUT_1 = (1 << 23), /** Custom flag, free to use by layouts*/
LV_OBJ_FLAG_LAYOUT_2 = (1 << 24), /** Custom flag, free to use by layouts*/
@@ -246,23 +246,23 @@ extern const lv_obj_class_t lv_obj_class;
*/
typedef struct {
struct _lv_obj_t ** children; /**< Store the pointer of the children in an array.*/
uint32_t child_cnt; /**< Number of children */
uint32_t child_cnt; /**< Number of children*/
lv_group_t * group_p;
const lv_layout_dsc_t * layout_dsc; /**< Pointer to the layout descriptor*/
lv_event_dsc_t * event_dsc; /**< Dynamically allocated event callback and user data array */
lv_event_dsc_t * event_dsc; /**< Dynamically allocated event callback and user data array*/
lv_point_t scroll; /**< The current X/Y scroll offset*/
uint8_t ext_click_pad; /**< Extra click padding in all direction */
lv_coord_t ext_draw_size; /**< EXTend the size in every direction for drawing. */
uint8_t ext_click_pad; /**< Extra click padding in all direction*/
lv_coord_t ext_draw_size; /**< EXTend the size in every direction for drawing.*/
lv_scrollbar_mode_t scrollbar_mode :2; /**< How to display scrollbars*/
lv_scroll_snap_t scroll_snap_x : 2; /**< Where to align the snapable children horizontally*/
lv_scroll_snap_t scroll_snap_y : 2; /**< Where to align the snapable children horizontally*/
lv_dir_t scroll_dir :4; /**< The allowed scroll direction(s)*/
lv_bidi_dir_t base_dir : 2; /**< Base direction of texts related to this object */
uint8_t event_dsc_cnt; /**< Number of event callabcks stored in `event_cb` array */
lv_bidi_dir_t base_dir : 2; /**< Base direction of texts related to this object*/
uint8_t event_dsc_cnt; /**< Number of event callabcks stored in `event_cb` array*/
}lv_obj_spec_attr_t;
typedef struct _lv_obj_t{
@@ -554,7 +554,7 @@ bool lv_obj_is_valid(const lv_obj_t * obj);
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_OBJ_H*/

View File

@@ -55,8 +55,8 @@ lv_obj_t * lv_obj_create_from_class(const lv_obj_class_t * class_p, lv_obj_t * p
lv_obj_construct(obj, parent, copy);
if(parent) {
/* Send a signal to the parent to notify it about the new child.
* Also triggers layout update*/
/*Send a signal to the parent to notify it about the new child.
*Also triggers layout update*/
lv_signal_send(parent, LV_SIGNAL_CHILD_CHG, obj);
/*Invalidate the area if not screen created*/
@@ -153,7 +153,7 @@ static uint32_t get_instance_size(const lv_obj_class_t * class_p)
const lv_obj_class_t * base = class_p;
while(base && base->instance_size == 0) base = base->base_class;
if(base == NULL) return 0; /*Never happens: set at least in `lv_obj` class */
if(base == NULL) return 0; /*Never happens: set at least in `lv_obj` class*/
return base->instance_size;
}

View File

@@ -43,7 +43,7 @@ typedef struct _lv_obj_class_t{
void (*destructor_cb)(struct _lv_obj_t * obj);
lv_signal_cb_t signal_cb; /**< Object type specific signal function*/
lv_draw_cb_t draw_cb; /**< Object type specific draw function*/
uint32_t editable :2; /**< Value from ::lv_obj_class_editable_t */
uint32_t editable :2; /**< Value from ::lv_obj_class_editable_t*/
uint32_t instance_size :20;
}lv_obj_class_t;
@@ -74,7 +74,7 @@ bool lv_obj_is_editable(struct _lv_obj_t * obj);
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_OBJ_CLASS_H*/

View File

@@ -396,8 +396,8 @@ void lv_obj_refresh_ext_draw_size(lv_obj_t * obj)
if(obj->spec_attr) {
obj->spec_attr->ext_draw_size = s_new;
}
/* Allocate spec. attrs. only if the result is not zero.
* Zero is the default value if the spec. attr. are not defined. */
/*Allocate spec. attrs. only if the result is not zero.
*Zero is the default value if the spec. attr. are not defined.*/
else if(s_new != 0) {
lv_obj_allocate_spec_attr(obj);
obj->spec_attr->ext_draw_size = s_new;

View File

@@ -25,9 +25,9 @@ extern "C" {
struct _lv_obj_t;
/** Design results */
/** Design results*/
typedef enum {
LV_DRAW_RES_OK, /**< Draw ready */
LV_DRAW_RES_OK, /**< Draw ready*/
LV_DRAW_RES_COVER, /**< Returned on `LV_DRAW_COVER_CHK` if the areas is fully covered*/
LV_DRAW_RES_NOT_COVER, /**< Returned on `LV_DRAW_COVER_CHK` if the areas is not covered*/
LV_DRAW_RES_MASKED, /**< Returned on `LV_DRAW_COVER_CHK` if the areas is masked out (children also not cover)*/
@@ -53,11 +53,11 @@ typedef struct
const void * sub_part_ptr;
}lv_obj_draw_dsc_t;
/** Design modes */
/** Design modes*/
enum {
LV_DRAW_MODE_COVER_CHECK, /**< Check if the object fully covers the 'mask_p' area */
LV_DRAW_MODE_MAIN_DRAW, /**< Draw the main portion of the object */
LV_DRAW_MODE_POST_DRAW, /**< Draw extras on the object */
LV_DRAW_MODE_COVER_CHECK, /**< Check if the object fully covers the 'mask_p' area*/
LV_DRAW_MODE_MAIN_DRAW, /**< Draw the main portion of the object*/
LV_DRAW_MODE_POST_DRAW, /**< Draw extras on the object*/
};
typedef uint8_t lv_draw_mode_t;
@@ -155,7 +155,7 @@ lv_coord_t _lv_obj_get_ext_draw_size(const struct _lv_obj_t * obj);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_OBJ_DRAW_H*/

View File

@@ -80,8 +80,8 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
obj->w_set = w;
obj->h_set = h;
/* If the width or height is set to special layout related value save them in w_set and h_set
* but use the current size on the object width*/
/*If the width or height is set to special layout related value save them in w_set and h_set
*but use the current size on the object width*/
if(LV_COORD_IS_LAYOUT(w)) w = lv_obj_get_width(obj);
if(LV_COORD_IS_LAYOUT(h)) h = lv_obj_get_height(obj);
@@ -187,9 +187,9 @@ void lv_obj_update_layout(lv_obj_t * obj)
layout_update_core(obj);
}while(scr->layout_inv); /*Repeat until there where layout invalidations*/
/* Restore the global state because other calls of this function needs this info too.
* Other calls might use different start object, but they need to know if there is dirty layout somewhere.
* However if the screen was updated it's sure that all layouts are ready. */
/*Restore the global state because other calls of this function needs this info too.
*Other calls might use different start object, but they need to know if there is dirty layout somewhere.
*However if the screen was updated it's sure that all layouts are ready.*/
if(obj != scr) scr->layout_inv = 1;
}
@@ -472,9 +472,9 @@ void lv_obj_move_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, bool notify)
diff.x = x - obj->coords.x1;
diff.y = y - obj->coords.y1;
/* Do nothing if the position is not changed */
/* It is very important else recursive positioning can
* occur without position change*/
/*Do nothing if the position is not changed*/
/*It is very important else recursive positioning can
*occur without position change*/
if(diff.x == 0 && diff.y == 0) return;
/*Invalidate the original area*/
@@ -490,8 +490,8 @@ void lv_obj_move_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, bool notify)
if(parent) {
lv_obj_get_coords_fit(parent, &parent_fit_area);
/* If the object is already out of the parent and its position is changes
* surely the scrollbars also changes so invalidate them*/
/*If the object is already out of the parent and its position is changes
*surely the scrollbars also changes so invalidate them*/
on1 = _lv_area_is_in(&ori, &parent_fit_area, 0);
if(!on1) lv_obj_scrollbar_invalidate(parent);
}
@@ -512,8 +512,8 @@ void lv_obj_move_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, bool notify)
/*Invalidate the new area*/
lv_obj_invalidate(obj);
/* If the object was out of the parent invalidate the new scrollbar area too.
* If it wasn't out of the parent but out now, also invalidate the srollbars*/
/*If the object was out of the parent invalidate the new scrollbar area too.
*If it wasn't out of the parent but out now, also invalidate the srollbars*/
if(parent) {
bool on2 = _lv_area_is_in(&obj->coords, &parent_fit_area, 0);
if(on1 || (!on1 && on2)) lv_obj_scrollbar_invalidate(parent);
@@ -677,13 +677,13 @@ static bool refr_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
lv_obj_t * parent = lv_obj_get_parent(obj);
if(parent == NULL) return false;
/* If the size is managed by the layout don't let to overwrite it.*/
/*If the size is managed by the layout don't let to overwrite it.*/
if(obj->w_set == LV_SIZE_LAYOUT) w = lv_obj_get_width(obj);
if(obj->h_set == LV_SIZE_LAYOUT) h = lv_obj_get_height(obj);
/* Do nothing if the size is not changed */
/* It is very important else recursive resizing can
* occur without size change*/
/*Do nothing if the size is not changed*/
/*It is very important else recursive resizing can
*occur without size change*/
if(lv_obj_get_width(obj) == w && lv_obj_get_height(obj) == h) {
return false;
}
@@ -698,13 +698,13 @@ static bool refr_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
lv_area_t parent_fit_area;
lv_obj_get_coords_fit(parent, &parent_fit_area);
/* If the object is already out of the parent and its position is changes
* surely the scrollbars also changes so invalidate them*/
/*If the object is already out of the parent and its position is changes
*surely the scrollbars also changes so invalidate them*/
bool on1 = _lv_area_is_in(&ori, &parent_fit_area, 0);
if(!on1) lv_obj_scrollbar_invalidate(parent);
/* Set the length and height
* Be sure the content is not scrolled in an invalid position on the new size*/
/*Set the length and height
*Be sure the content is not scrolled in an invalid position on the new size*/
obj->coords.y2 = obj->coords.y1 + h - 1;
if(lv_obj_get_base_dir(obj) == LV_BIDI_DIR_RTL) {
obj->coords.x1 = obj->coords.x2 - w + 1;
@@ -722,8 +722,8 @@ static bool refr_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
/*Invalidate the new area*/
lv_obj_invalidate(obj);
/* If the object was out of the parent invalidate the new scrollbar area too.
* If it wasn't out of the parent but out now, also invalidate the srollbars*/
/*If the object was out of the parent invalidate the new scrollbar area too.
*If it wasn't out of the parent but out now, also invalidate the srollbars*/
bool on2 = _lv_area_is_in(&obj->coords, &parent_fit_area, 0);
if(on1 || (!on1 && on2)) lv_obj_scrollbar_invalidate(parent);
return true;

View File

@@ -327,7 +327,7 @@ bool lv_obj_hit_test(struct _lv_obj_t * obj, const lv_point_t * point);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_OBJ_POS_H*/

View File

@@ -158,8 +158,8 @@ lv_coord_t lv_obj_get_scroll_left(lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
/* Normally can't scroll the object out on the left.
* So simply use the current scroll position as "left size"*/
/*Normally can't scroll the object out on the left.
*So simply use the current scroll position as "left size"*/
if(lv_obj_get_base_dir(obj) != LV_BIDI_DIR_RTL) {
if(obj->spec_attr == NULL) return 0;
return -obj->spec_attr->scroll.x;
@@ -196,8 +196,8 @@ lv_coord_t lv_obj_get_scroll_right(lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
/* With RTL base dir can't scroll to the object out on the right.
* So simply use the current scroll position as "right size"*/
/*With RTL base dir can't scroll to the object out on the right.
*So simply use the current scroll position as "right size"*/
if(lv_obj_get_base_dir(obj) == LV_BIDI_DIR_RTL) {
if(obj->spec_attr == NULL) return 0;
return obj->spec_attr->scroll.x;
@@ -636,7 +636,7 @@ static void scroll_area_into_view(const lv_area_t * area, lv_obj_t * child, lv_p
break;
}
/* Remove any pending scroll animations.*/
/*Remove any pending scroll animations.*/
lv_anim_del(parent, scroll_x_anim);
lv_anim_del(parent, scroll_y_anim);

View File

@@ -24,7 +24,7 @@ extern "C" {
* TYPEDEFS
**********************/
/* Can't include lv_obj.h because it includes this header file */
/*Can't include lv_obj.h because it includes this header file*/
struct _lv_obj_t;
/** Scrollbar modes: shows when should the scrollbars be visible*/
@@ -37,12 +37,12 @@ enum {
typedef uint8_t lv_scrollbar_mode_t;
/** Scroll span align options. Tells where to align the snapable children when scroll stops. */
/** Scroll span align options. Tells where to align the snapable children when scroll stops.*/
enum {
LV_SCROLL_SNAP_NONE, /**< Do not align, leave where it is */
LV_SCROLL_SNAP_START, /**< Align to to the left/top */
LV_SCROLL_SNAP_END, /**< Align to to the right/bottom */
LV_SCROLL_SNAP_CENTER /**< Align to to the center */
LV_SCROLL_SNAP_NONE, /**< Do not align, leave where it is*/
LV_SCROLL_SNAP_START, /**< Align to to the left/top*/
LV_SCROLL_SNAP_END, /**< Align to to the right/bottom*/
LV_SCROLL_SNAP_CENTER /**< Align to to the center*/
};
typedef uint8_t lv_scroll_snap_t;
@@ -271,7 +271,7 @@ void lv_obj_scrollbar_invalidate(struct _lv_obj_t * obj);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_OBJ_SCROLL_H*/

View File

@@ -12,7 +12,7 @@
#if defined(LV_GC_INCLUDE)
#include LV_GC_INCLUDE
#endif /* LV_ENABLE_GC */
#endif /*LV_ENABLE_GC*/
/*********************
* DEFINES
@@ -89,7 +89,7 @@ void lv_obj_add_style(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_
break;
}
/*Now `i` is at the first normal style. Insert the new style before this */
/*Now `i` is at the first normal style. Insert the new style before this*/
/*Allocate space for the new style and shift the rest of the style to the end*/
obj->style_list.style_cnt++;
@@ -141,8 +141,8 @@ void lv_obj_remove_style(lv_obj_t * obj, uint32_t part, uint32_t state, lv_style
obj->style_list.styles = lv_mem_realloc(obj->style_list.styles, obj->style_list.style_cnt * sizeof(lv_obj_style_t));
deleted = true;
/* The style from the current `i` index is removed, so `i` points to the next style.
* Therefore it doesn't needs to be incremented*/
/*The style from the current `i` index is removed, so `i` points to the next style.
*Therefore it doesn't needs to be incremented*/
}
if(deleted) {
lv_obj_refresh_style(obj, part, LV_STYLE_PROP_ALL);
@@ -266,7 +266,7 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_style_prop_t prop, uint8
obj->state = new_state;
lv_obj_style_t * style_trans = get_trans_style(obj, part);
lv_style_set_prop(style_trans->style, prop, v1); /*Be sure `trans_style` has a valid value */
lv_style_set_prop(style_trans->style, prop, v1); /*Be sure `trans_style` has a valid value*/
if(prop == LV_STYLE_RADIUS) {
if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) {
@@ -419,8 +419,8 @@ static lv_style_t * get_local_style(lv_obj_t * obj, uint32_t part, uint32_t stat
obj->style_list.styles = lv_mem_realloc(obj->style_list.styles, obj->style_list.style_cnt * sizeof(lv_obj_style_t));
for(i = obj->style_list.style_cnt - 1; i > 0 ; i--) {
/* Copy only normal styles (not local and transition).
* The new local style will be added as the last local style*/
/*Copy only normal styles (not local and transition).
*The new local style will be added as the last local style*/
if(obj->style_list.styles[i - 1].is_local || obj->style_list.styles[i - 1].is_trans) break;
obj->style_list.styles[i] = obj->style_list.styles[i - 1];
}
@@ -497,8 +497,8 @@ static bool get_prop_core(const lv_obj_t * obj, uint8_t part, lv_style_prop_t pr
if((obj_style->style->has_group & group) == 0) continue;
/* Be sure the style not specifies other state than the requested.
* E.g. For HOVER+PRESS object state, HOVER style only is OK, but HOVER+FOCUS style is not*/
/*Be sure the style not specifies other state than the requested.
*E.g. For HOVER+PRESS object state, HOVER style only is OK, but HOVER+FOCUS style is not*/
if((obj_style->state & state_inv)) continue;
/*Check only better candidates*/
@@ -598,8 +598,8 @@ static bool trans_del(lv_obj_t * obj, uint8_t part, lv_style_prop_t prop, trans_
tr_prev = _lv_ll_get_prev(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
if(tr->obj == obj && (part == tr->part || part == LV_PART_ANY) && (prop == tr->prop || prop == LV_STYLE_PROP_ALL)) {
/* Remove the transitioned property from trans. style
* to allow changing it by normal styles*/
/*Remove the transitioned property from trans. style
*to allow changing it by normal styles*/
uint32_t i;
for(i = 0; i < obj->style_list.style_cnt; i++) {
if(obj->style_list.styles[i].is_trans && (part == LV_PART_ANY || obj->style_list.styles[i].part == part)) {
@@ -695,7 +695,7 @@ static void trans_anim_start_cb(lv_anim_t * a)
tr->prop = prop_tmp;
lv_obj_style_t * style_trans = get_trans_style(tr->obj, tr->part);
lv_style_set_prop(style_trans->style, tr->prop, tr->start_value); /*Be sure `trans_style` has a valid value */
lv_style_set_prop(style_trans->style, tr->prop, tr->start_value); /*Be sure `trans_style` has a valid value*/
}
@@ -705,9 +705,9 @@ static void trans_anim_ready_cb(lv_anim_t * a)
lv_obj_t * obj = tr->obj;
lv_style_prop_t prop = tr->prop;
/* Remove the transitioned property from trans. style
* if there no more transitions for this property
* It allows changing it by normal styles*/
/*Remove the transitioned property from trans. style
*if there no more transitions for this property
*It allows changing it by normal styles*/
bool running = false;
trans_t * tr_i;
_LV_LL_READ(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr_i) {

View File

@@ -23,7 +23,7 @@ extern "C" {
/**********************
* TYPEDEFS
**********************/
/* Can't include lv_obj.h because it includes this header file */
/*Can't include lv_obj.h because it includes this header file*/
struct _lv_obj_t;
typedef enum {
@@ -212,7 +212,7 @@ static inline void lv_obj_set_style_pad_gap(struct _lv_obj_t * obj, uint32_t par
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_TEMPL_H*/

View File

@@ -19,7 +19,7 @@
#if defined(LV_USER_DATA_FREE_INCLUDE)
#include LV_USER_DATA_FREE_INCLUDE
#endif /* LV_USE_USER_DATA_FREE */
#endif /*LV_USE_USER_DATA_FREE*/
/**********************
* TYPEDEFS
@@ -349,7 +349,7 @@ static void obj_del_core(lv_obj_t * obj)
lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL);
lv_obj_enable_style_refresh(true);
/* Reset all input devices if the object to delete is used*/
/*Reset all input devices if the object to delete is used*/
lv_indev_t * indev = lv_indev_get_next(NULL);
while(indev) {
if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) {
@@ -365,7 +365,7 @@ static void obj_del_core(lv_obj_t * obj)
indev = lv_indev_get_next(indev);
}
/* All children deleted. Now clean up the object specific data*/
/*All children deleted. Now clean up the object specific data*/
_lv_obj_destruct(obj);
/*Remove the screen for the screen list*/

View File

@@ -141,7 +141,7 @@ uint32_t lv_obj_get_child_id(const struct _lv_obj_t * obj);
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_OBJ_TREE_H*/

View File

@@ -25,7 +25,7 @@
/*********************
* DEFINES
*********************/
/* Draw translucent random colored areas on the invalidated (redrawn) areas*/
/*Draw translucent random colored areas on the invalidated (redrawn) areas*/
#define MASK_AREA_DEBUG 0
/**********************
@@ -192,7 +192,8 @@ void _lv_disp_refr_timer(lv_timer_t * tmr)
disp_refr = tmr->user_data;
#if LV_USE_PERF_MONITOR == 0
/* Ensure the timer does not run again automatically.
/**
* Ensure the timer does not run again automatically.
* This is done before refreshing in case refreshing invalidates something else.
*/
lv_timer_pause(tmr, true);
@@ -561,8 +562,8 @@ static void lv_refr_area_part(const lv_area_t * area_p)
lv_refr_obj_and_children(lv_disp_get_layer_top(disp_refr), &start_mask);
lv_refr_obj_and_children(lv_disp_get_layer_sys(disp_refr), &start_mask);
/* In true double buffered mode flush only once when all areas were rendered.
* In normal mode flush after every area */
/*In true double buffered mode flush only once when all areas were rendered.
*In normal mode flush after every area*/
if(lv_disp_is_true_double_buf(disp_refr) == false) {
draw_buf_flush();
}
@@ -578,7 +579,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
{
lv_obj_t * found_p = NULL;
/*If this object is fully cover the draw area check the children too */
/*If this object is fully cover the draw area check the children too*/
if(_lv_area_is_in(area_p, &obj->coords, 0) && lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN) == false) {
lv_draw_res_t draw_res = call_draw_cb(obj, area_p, LV_DRAW_MODE_COVER_CHECK);
if(draw_res == LV_DRAW_RES_MASKED) return NULL;
@@ -622,16 +623,16 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
*/
static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
{
/* Normally always will be a top_obj (at least the screen)
* but in special cases (e.g. if the screen has alpha) it won't.
* In this case use the screen directly */
/*Normally always will be a top_obj (at least the screen)
*but in special cases (e.g. if the screen has alpha) it won't.
*In this case use the screen directly*/
if(top_p == NULL) top_p = lv_disp_get_scr_act(disp_refr);
if(top_p == NULL) return; /*Shouldn't happen*/
/*Refresh the top object and its children*/
lv_refr_obj(top_p, mask_p);
/*Draw the 'younger' sibling objects because they can be on top_obj */
/*Draw the 'younger' sibling objects because they can be on top_obj*/
lv_obj_t * par;
lv_obj_t * border_p = top_p;
@@ -674,9 +675,9 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
/*Do not refresh hidden objects*/
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return;
bool union_ok; /* Store the return value of area_union */
/* Truncate the original mask to the coordinates of the parent
* because the parent and its children are visible only here */
bool union_ok; /*Store the return value of area_union*/
/*Truncate the original mask to the coordinates of the parent
*because the parent and its children are visible only here*/
lv_area_t obj_mask;
lv_area_t obj_ext_mask;
lv_area_t obj_area;
@@ -690,7 +691,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
/*Draw the parent and its children only if they ore on 'mask_parent'*/
if(union_ok != false) {
/* Redraw the object */
/*Redraw the object*/
lv_event_send(obj, LV_EVENT_DRAW_MAIN_BEGIN, &obj_ext_mask);
call_draw_cb(obj, &obj_ext_mask, LV_DRAW_MODE_MAIN_DRAW);
lv_event_send(obj, LV_EVENT_DRAW_MAIN_END, &obj_ext_mask);
@@ -721,11 +722,11 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
child_area.y1 -= ext_size;
child_area.x2 += ext_size;
child_area.y2 += ext_size;
/* Get the union (common parts) of original mask (from obj)
* and its child */
/*Get the union (common parts) of original mask (from obj)
*and its child*/
union_ok = _lv_area_intersect(&mask_child, &obj_mask, &child_area);
/*If the parent and the child has common area then refresh the child */
/*If the parent and the child has common area then refresh the child*/
if(union_ok) {
/*Refresh the next children*/
lv_refr_obj(child, &mask_child);
@@ -733,7 +734,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
}
}
/* If all the children are redrawn make 'post draw' draw */
/*If all the children are redrawn make 'post draw' draw*/
lv_event_send(obj, LV_EVENT_DRAW_POST_BEGIN, &obj_ext_mask);
call_draw_cb(obj, &obj_ext_mask, LV_DRAW_MODE_POST_DRAW);
lv_event_send(obj, LV_EVENT_DRAW_POST_END, &obj_ext_mask);
@@ -744,7 +745,7 @@ static void draw_buf_rotate_180(lv_disp_drv_t *drv, lv_area_t *area, lv_color_t
lv_coord_t area_w = lv_area_get_width(area);
lv_coord_t area_h = lv_area_get_height(area);
uint32_t total = area_w * area_h;
/* Swap the beginning and end values */
/*Swap the beginning and end values*/
lv_color_t tmp;
uint32_t i = total - 1, j = 0;
while(i > j) {
@@ -835,7 +836,7 @@ static void draw_buf_rotate(lv_area_t *area, lv_color_t *color_p) {
draw_buf_rotate_180(drv, area, color_p);
call_flush_cb(drv, area, color_p);
} else if(drv->rotated == LV_DISP_ROT_90 || drv->rotated == LV_DISP_ROT_270) {
/*Allocate a temporary buffer to store rotated image */
/*Allocate a temporary buffer to store rotated image*/
lv_color_t * rot_buf = NULL;
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
lv_coord_t area_w = lv_area_get_width(area);

View File

@@ -97,7 +97,7 @@ void _lv_disp_refr_timer(lv_timer_t * timer);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_REFR_H*/

View File

@@ -114,7 +114,7 @@ lv_color_t lv_theme_get_color_secondary(lv_obj_t * obj);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_THEME_H*/

View File

@@ -53,7 +53,7 @@ extern "C" {
*********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_H*/

View File

@@ -16,7 +16,7 @@
/*********************
* DEFINES
*********************/
#define SPLIT_RADIUS_LIMIT 10 /*With radius greater then this the arc will drawn in quarters. A quarter is drawn only if there is arc in it */
#define SPLIT_RADIUS_LIMIT 10 /*With radius greater then this the arc will drawn in quarters. A quarter is drawn only if there is arc in it*/
#define SPLIT_ANGLE_GAP_LIMIT 60 /*With small gaps in the arc don't bother with splitting because there is nothing to skip.*/
/**********************
@@ -515,7 +515,7 @@ static void get_rounded_area(int16_t angle, lv_coord_t radius, uint8_t thickness
cir_x = ((radius - thick_half) * lv_trigo_sin(90 - angle)) >> (LV_TRIGO_SHIFT - ps);
cir_y = ((radius - thick_half) * lv_trigo_sin(angle)) >> (LV_TRIGO_SHIFT - ps);
/* Actually the center of the pixel need to be calculated so apply 1/2 px offset*/
/*Actually the center of the pixel need to be calculated so apply 1/2 px offset*/
if(cir_x > 0) {
cir_x = (cir_x - pa) >> ps;
res_area->x1 = cir_x - thick_half + thick_corr;

View File

@@ -70,7 +70,7 @@ void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, uint16_t
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_ARC*/

View File

@@ -138,15 +138,15 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_fill(const lv_area_t * clip_area, const lv_
if(disp->driver->gpu_wait_cb) disp->driver->gpu_wait_cb(disp->driver);
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
lv_area_t draw_area;
bool is_common;
is_common = _lv_area_intersect(&draw_area, clip_area, fill_area);
if(!is_common) return;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -194,8 +194,8 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_a
if(opa < LV_OPA_MIN) return;
if(mask_res == LV_DRAW_MASK_RES_TRANSP) return;
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
lv_area_t draw_area;
bool is_common;
is_common = _lv_area_intersect(&draw_area, clip_area, map_area);
@@ -208,8 +208,8 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_a
if(disp->driver->gpu_wait_cb) disp->driver->gpu_wait_cb(disp->driver);
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -260,9 +260,9 @@ static void fill_set_px(const lv_area_t * disp_area, lv_color_t * disp_buf, con
}
}
else {
/* The mask is relative to the clipped area.
* In the cycles below mask will be indexed from `draw_area.x1`
* but it corresponds to zero index. So prepare `mask_tmp` accordingly. */
/*The mask is relative to the clipped area.
*In the cycles below mask will be indexed from `draw_area.x1`
*but it corresponds to zero index. So prepare `mask_tmp` accordingly.*/
const lv_opa_t * mask_tmp = mask - draw_area->x1;
/*Get the width of the `draw_area` it will be used to go to the next line of the mask*/
@@ -326,7 +326,7 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co
if(lv_gpu_nxp_vglite_fill(disp_buf, disp_w, lv_area_get_height(disp_area), draw_area, color, opa) == LV_RES_OK) {
return;
}
/* Fall down to SW render in case of error */
/*Fall down to SW render in case of error*/
}
#elif LV_USE_GPU_STM32_DMA2D
if(lv_area_get_size(draw_area) >= 240) {
@@ -358,7 +358,7 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co
if(lv_gpu_nxp_vglite_fill(disp_buf, disp_w, lv_area_get_height(disp_area), draw_area, color, opa) == LV_RES_OK) {
return;
}
/* Fall down to SW render in case of error */
/*Fall down to SW render in case of error*/
}
#endif
lv_color_t last_dest_color = lv_color_black();
@@ -558,9 +558,9 @@ static void fill_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, co
/*Get the width of the `draw_area` it will be used to go to the next line of the mask*/
int32_t draw_area_w = lv_area_get_width(draw_area);
/* The mask is relative to the clipped area.
* In the cycles below mask will be indexed from `draw_area.x1`
* but it corresponds to zero index. So prepare `mask_tmp` accordingly. */
/*The mask is relative to the clipped area.
*In the cycles below mask will be indexed from `draw_area.x1`
*but it corresponds to zero index. So prepare `mask_tmp` accordingly.*/
const lv_opa_t * mask_tmp = mask - draw_area->x1;
/*Buffer the result color to avoid recalculating the same color*/
@@ -622,9 +622,9 @@ static void map_set_px(const lv_area_t * disp_area, lv_color_t * disp_buf, cons
}
}
else {
/* The mask is relative to the clipped area.
* In the cycles below mask will be indexed from `draw_area.x1`
* but it corresponds to zero index. So prepare `mask_tmp` accordingly. */
/*The mask is relative to the clipped area.
*In the cycles below mask will be indexed from `draw_area.x1`
*but it corresponds to zero index. So prepare `mask_tmp` accordingly.*/
const lv_opa_t * mask_tmp = mask - draw_area->x1;
for(y = draw_area->y1; y <= draw_area->y2; y++) {
@@ -718,7 +718,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
if(lv_gpu_nxp_vglite_blit(&blit) == LV_RES_OK) {
return;
}
/* Fall down to SW render in case of error */
/*Fall down to SW render in case of error*/
}
#elif LV_USE_GPU_STM32_DMA2D
if(lv_area_get_size(draw_area) >= 240) {
@@ -768,7 +768,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
if(lv_gpu_nxp_vglite_blit(&blit) == LV_RES_OK) {
return;
}
/* Fall down to SW render in case of error */
/*Fall down to SW render in case of error*/
}
#elif LV_USE_GPU_STM32_DMA2D
if(lv_area_get_size(draw_area) >= 240) {
@@ -801,7 +801,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
else {
/*Only the mask matters*/
if(opa > LV_OPA_MAX) {
/*Go to the first pixel of the row */
/*Go to the first pixel of the row*/
int32_t x_end4 = draw_area_w - 4;
@@ -941,9 +941,9 @@ static void map_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, con
}
/*Masked*/
else {
/* The mask is relative to the clipped area.
* In the cycles below mask will be indexed from `draw_area.x1`
* but it corresponds to zero index. So prepare `mask_tmp` accordingly. */
/*The mask is relative to the clipped area.
*In the cycles below mask will be indexed from `draw_area.x1`
*but it corresponds to zero index. So prepare `mask_tmp` accordingly.*/
const lv_opa_t * mask_tmp = mask - draw_area->x1;
map_buf_tmp -= draw_area->x1;

View File

@@ -44,7 +44,7 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_a
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_BLEND_H*/

View File

@@ -248,8 +248,8 @@ LV_ATTRIBUTE_FAST_MEM static lv_res_t lv_img_draw_core(const lv_area_t * coords,
show_error(coords, clip_area, cdsc->dec_dsc.error_msg);
}
/* The decoder could open the image and gave the entire uncompressed image.
* Just draw it!*/
/*The decoder could open the image and gave the entire uncompressed image.
*Just draw it!*/
else if(cdsc->dec_dsc.img_data) {
lv_area_t map_area_rot;
lv_area_copy(&map_area_rot, coords);
@@ -276,7 +276,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_res_t lv_img_draw_core(const lv_area_t * coords,
lv_draw_map(coords, &mask_com, cdsc->dec_dsc.img_data, draw_dsc, chroma_keyed, alpha_byte);
}
/* The whole uncompressed image is not available. Try to read it line-by-line*/
/*The whole uncompressed image is not available. Try to read it line-by-line*/
else {
lv_area_t mask_com; /*Common area of mask and coords*/
bool union_ok;
@@ -339,7 +339,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
const lv_draw_img_dsc_t * draw_dsc,
bool chroma_key, bool alpha_byte)
{
/* Use the clip area as draw area*/
/*Use the clip area as draw area*/
lv_area_t draw_area;
lv_area_copy(&draw_area, clip_area);
@@ -347,8 +347,8 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
const lv_area_t * disp_area = &draw_buf->area;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -365,16 +365,16 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const
#if LV_DRAW_COMPLEX
#if LV_USE_GPU_NXP_PXP
/* Simple case without masking and transformations */
/*Simple case without masking and transformations*/
else if(other_mask_cnt == 0 && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && alpha_byte == false &&
chroma_key == true && draw_dsc->recolor_opa == LV_OPA_TRANSP) { /* copy with color keying (+ alpha) */
chroma_key == true && draw_dsc->recolor_opa == LV_OPA_TRANSP) { /*copy with color keying (+ alpha)*/
lv_gpu_nxp_pxp_enable_color_key();
_lv_blend_map(clip_area, map_area, (lv_color_t *)map_p, NULL, LV_DRAW_MASK_RES_FULL_COVER, draw_dsc->opa,
draw_dsc->blend_mode);
lv_gpu_nxp_pxp_disable_color_key();
}
else if(other_mask_cnt == 0 && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE && alpha_byte == false &&
chroma_key == false && draw_dsc->recolor_opa != LV_OPA_TRANSP) { /* copy with recolor (+ alpha) */
chroma_key == false && draw_dsc->recolor_opa != LV_OPA_TRANSP) { /*copy with recolor (+ alpha)*/
lv_gpu_nxp_pxp_enable_recolor(draw_dsc->recolor, draw_dsc->recolor_opa);
_lv_blend_map(clip_area, map_area, (lv_color_t *)map_p, NULL, LV_DRAW_MASK_RES_FULL_COVER, draw_dsc->opa,
draw_dsc->blend_mode);

View File

@@ -90,7 +90,7 @@ bool lv_img_cf_is_chroma_keyed(lv_img_cf_t cf);
bool lv_img_cf_has_alpha(lv_img_cf_t cf);
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_IMG_H*/

View File

@@ -274,10 +274,10 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(const lv_area_t * coords, const lv_area
cmd_state = CMD_STATE_PAR;
continue;
}
else if(cmd_state == CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */
else if(cmd_state == CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char*/
cmd_state = CMD_STATE_WAIT;
}
else if(cmd_state == CMD_STATE_IN) { /*Command end */
else if(cmd_state == CMD_STATE_IN) { /*Command end*/
cmd_state = CMD_STATE_WAIT;
continue;
}
@@ -413,21 +413,21 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_letter(const lv_point_t * pos_p, const
lv_font_glyph_dsc_t g;
bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0');
if(g_ret == false) {
/* Add warning if the dsc is not found
* but do not print warning for non printable ASCII chars (e.g. '\n')*/
/*Add warning if the dsc is not found
*but do not print warning for non printable ASCII chars (e.g. '\n')*/
if(letter >= 0x20) {
LV_LOG_WARN("lv_draw_letter: glyph dsc. not found");
}
return;
}
/* Don't draw anything if the character is empty. E.g. space */
/*Don't draw anything if the character is empty. E.g. space*/
if((g.box_h == 0) || (g.box_w == 0)) return;
int32_t pos_x = pos_p->x + g.ofs_x;
int32_t pos_y = pos_p->y + (font_p->line_height - font_p->base_line) - g.box_h - g.ofs_y;
/*If the letter is completely out of mask don't draw it */
/*If the letter is completely out of mask don't draw it*/
if(pos_x + g.box_w < clip_area->x1 ||
pos_x > clip_area->x2 ||
pos_y + g.box_h < clip_area->y1 ||
@@ -509,7 +509,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_coord_t pos_x, lv_coord_
int32_t box_h = g->box_h;
int32_t width_bit = box_w * bpp; /*Letter width in bits*/
/* Calculate the col/row start/end on the map*/
/*Calculate the col/row start/end on the map*/
int32_t col_start = pos_x >= clip_area->x1 ? 0 : clip_area->x1 - pos_x;
int32_t col_end = pos_x + box_w <= clip_area->x2 ? box_w : clip_area->x2 - pos_x + 1;
int32_t row_start = pos_y >= clip_area->y1 ? 0 : clip_area->y1 - pos_y;
@@ -521,7 +521,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_coord_t pos_x, lv_coord_
uint8_t letter_px;
uint32_t col_bit;
col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */
col_bit = bit_ofs & 0x7; /*"& 0x7" equals to "% 8" just faster*/
lv_coord_t hor_res = lv_disp_get_hor_res(_lv_refr_get_disp_refreshing());
uint32_t mask_buf_size = box_w * box_h > hor_res ? hor_res : box_w * box_h;
@@ -649,7 +649,7 @@ static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_
int32_t box_h = g->box_h;
int32_t width_bit = box_w * bpp; /*Letter width in bits*/
/* Calculate the col/row start/end on the map*/
/*Calculate the col/row start/end on the map*/
int32_t col_start = pos_x >= clip_area->x1 ? 0 : (clip_area->x1 - pos_x) * 3;
int32_t col_end = pos_x + box_w / 3 <= clip_area->x2 ? box_w : (clip_area->x2 - pos_x + 1) * 3;
int32_t row_start = pos_y >= clip_area->y1 ? 0 : clip_area->y1 - pos_y;
@@ -662,7 +662,7 @@ static void draw_letter_subpx(lv_coord_t pos_x, lv_coord_t pos_y, lv_font_glyph_
uint8_t letter_px;
lv_opa_t px_opa;
int32_t col_bit;
col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */
col_bit = bit_ofs & 0x7; /*"& 0x7" equals to "% 8" just faster*/
int32_t mask_buf_size = box_w * box_h > _LV_MASK_BUF_MAX_SIZE ? _LV_MASK_BUF_MAX_SIZE : g->box_w * g->box_h;
lv_opa_t * mask_buf = lv_mem_buf_get(mask_buf_size);

View File

@@ -59,7 +59,7 @@ typedef struct {
int32_t y;
/** The 'y1' coordinate of the label when the hint was saved.
* Used to invalidate the hint if the label has moved too much. */
* Used to invalidate the hint if the label has moved too much.*/
int32_t coord_y;
} lv_draw_label_hint_t;
@@ -99,7 +99,7 @@ extern const uint8_t _lv_bpp8_opa_table[];
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_LABEL_H*/

View File

@@ -152,14 +152,14 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(const lv_point_t * point1, const
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
const lv_area_t * disp_area = &draw_buf->area;
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
bool is_common;
is_common = _lv_area_intersect(&draw_area, clip, &draw_area);
if(!is_common) return;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -253,14 +253,14 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(const lv_point_t * point1, const
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
const lv_area_t * disp_area = &draw_buf->area;
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
bool is_common;
is_common = _lv_area_intersect(&draw_area, clip, &draw_area);
if(!is_common) return;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= draw_buf->area.x1;
draw_area.y1 -= draw_buf->area.y1;
draw_area.x2 -= draw_buf->area.x1;
@@ -361,9 +361,9 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(const lv_point_t * point1, cons
draw_area.y1 = LV_MIN(p1.y, p2.y) - w;
draw_area.y2 = LV_MAX(p1.y, p2.y) + w;
/* Get the union of `coords` and `clip`*/
/* `clip` is already truncated to the `draw_buf` size
* in 'lv_refr_area' function */
/*Get the union of `coords` and `clip`*/
/*`clip` is already truncated to the `draw_buf` size
*in 'lv_refr_area' function*/
bool is_common = _lv_area_intersect(&draw_area, &draw_area, clip);
if(is_common == false) return;
@@ -412,15 +412,15 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(const lv_point_t * point1, cons
const lv_area_t * disp_area = &draw_buf->area;
/*Store the coordinates of the `draw_a` relative to the draw_buf */
/*Store the coordinates of the `draw_a` relative to the draw_buf*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
draw_area.y2 -= disp_area->y1;
/* The real draw area is around the line.
* It's easy to calculate with steep lines, but the area can be very wide with very flat lines.
* So deal with it only with steep lines. */
/*The real draw area is around the line.
*It's easy to calculate with steep lines, but the area can be very wide with very flat lines.
*So deal with it only with steep lines.*/
int32_t draw_area_w = lv_area_get_width(&draw_area);
/*Draw the background line by line*/

View File

@@ -58,7 +58,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_LINE_H*/

View File

@@ -282,10 +282,10 @@ void lv_draw_mask_line_points_init(lv_draw_mask_line_param_t * param, lv_coord_t
void lv_draw_mask_line_angle_init(lv_draw_mask_line_param_t * param, lv_coord_t p1x, lv_coord_t py, int16_t angle,
lv_draw_mask_line_side_t side)
{
/* Find an optimal degree.
* lv_mask_line_points_init will swap the points to keep the smaller y in p1
* Theoretically a line with `angle` or `angle+180` is the same only the points are swapped
* Find the degree which keeps the origo in place */
/*Find an optimal degree.
*lv_mask_line_points_init will swap the points to keep the smaller y in p1
*Theoretically a line with `angle` or `angle+180` is the same only the points are swapped
*Find the degree which keeps the origo in place*/
if(angle > 180) angle -= 180; /*> 180 will swap the origo*/
int32_t p2x;
@@ -311,7 +311,7 @@ void lv_draw_mask_angle_init(lv_draw_mask_angle_param_t * param, lv_coord_t vert
lv_draw_mask_line_side_t start_side;
lv_draw_mask_line_side_t end_side;
/* Constrain the input angles */
/*Constrain the input angles*/
if(start_angle < 0)
start_angle = 0;
else if(start_angle > 359)
@@ -345,7 +345,7 @@ void lv_draw_mask_angle_init(lv_draw_mask_angle_param_t * param, lv_coord_t vert
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
}
else
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT; /* silence compiler */
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT; /*silence compiler*/
LV_ASSERT_MSG(end_angle >= 0 && start_angle <= 360, "Unexpected end angle");
@@ -356,7 +356,7 @@ void lv_draw_mask_angle_init(lv_draw_mask_angle_param_t * param, lv_coord_t vert
end_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
}
else
end_side = LV_DRAW_MASK_LINE_SIDE_RIGHT; /* silence compiler */
end_side = LV_DRAW_MASK_LINE_SIDE_RIGHT; /*silence compiler*/
lv_draw_mask_line_angle_init(&param->start_line, vertex_x, vertex_y, start_angle, start_side);
lv_draw_mask_line_angle_init(&param->end_line, vertex_x, vertex_y, end_angle, end_side);
@@ -514,8 +514,8 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_flat(lv_opa_t * mask_b
}
}
/* At the end of the mask if the limit line is smaller then the mask's y.
* Then the mask is in the "good" area*/
/*At the end of the mask if the limit line is smaller then the mask's y.
*Then the mask is in the "good" area*/
y_at_x = (int32_t)((int32_t)p->yx_steep * (abs_x + len)) >> 10;
if(p->yx_steep > 0) {
if(y_at_x < abs_y) {
@@ -607,8 +607,8 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_steep(lv_opa_t * mask_
{
int32_t k;
int32_t x_at_y;
/* At the beginning of the mask if the limit line is greater then the mask's y.
* Then the mask is in the "wrong" area*/
/*At the beginning of the mask if the limit line is greater then the mask's y.
*Then the mask is in the "wrong" area*/
x_at_y = (int32_t)((int32_t)p->xy_steep * abs_y) >> 10;
if(p->xy_steep > 0) x_at_y++;
if(x_at_y < abs_x) {
@@ -620,8 +620,8 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_steep(lv_opa_t * mask_
}
}
/* At the end of the mask if the limit line is smaller then the mask's y.
* Then the mask is in the "good" area*/
/*At the end of the mask if the limit line is smaller then the mask's y.
*Then the mask is in the "good" area*/
x_at_y = (int32_t)((int32_t)p->xy_steep * (abs_y)) >> 10;
if(x_at_y > abs_x + len) {
if(p->inv) {
@@ -758,7 +758,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_angle(lv_opa_t * ma
return LV_DRAW_MASK_RES_FULL_COVER;
}
/*Start angle mask can work only from the end of end angle mask */
/*Start angle mask can work only from the end of end angle mask*/
int32_t end_angle_first = (rel_y * p->end_line.xy_steep) >> 10;
int32_t start_angle_last = ((rel_y + 1) * p->start_line.xy_steep) >> 10;
@@ -800,7 +800,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_angle(lv_opa_t * ma
return LV_DRAW_MASK_RES_FULL_COVER;
}
/*Start angle mask can work only from the end of end angle mask */
/*Start angle mask can work only from the end of end angle mask*/
int32_t end_angle_first = (rel_y * p->end_line.xy_steep) >> 10;
int32_t start_angle_last = ((rel_y + 1) * p->start_line.xy_steep) >> 10;
@@ -950,14 +950,14 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
lv_sqrt_res_t x0;
lv_sqrt_res_t x1;
/* y = 0 should mean the top of the circle */
/*y = 0 should mean the top of the circle*/
int32_t y;
if(abs_y < radius) {
y = radius - abs_y;
/* Get the x intersection points for `abs_y` and `abs_y-1`
* Use the circle's equation x = sqrt(r^2 - y^2)
* Try to use the values from the previous run*/
/*Get the x intersection points for `abs_y` and `abs_y-1`
*Use the circle's equation x = sqrt(r^2 - y^2)
*Try to use the values from the previous run*/
if(y == p->y_prev) {
x0.f = p->y_prev_x.f;
x0.i = p->y_prev_x.i;
@@ -973,9 +973,9 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
else {
y = radius - (h - abs_y) + 1;
/* Get the x intersection points for `abs_y` and `abs_y-1`
* Use the circle's equation x = sqrt(r^2 - y^2)
* Try to use the values from the previous run*/
/*Get the x intersection points for `abs_y` and `abs_y-1`
*Use the circle's equation x = sqrt(r^2 - y^2)
*Try to use the values from the previous run*/
if((y - 1) == p->y_prev) {
x1.f = p->y_prev_x.f;
x1.i = p->y_prev_x.i;
@@ -990,8 +990,8 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
p->y_prev_x.i = x0.i;
}
/* If x1 is on the next round coordinate (e.g. x0: 3.5, x1:4.0)
* then treat x1 as x1: 3.99 to handle them as they were on the same pixel*/
/*If x1 is on the next round coordinate (e.g. x0: 3.5, x1:4.0)
*then treat x1 as x1: 3.99 to handle them as they were on the same pixel*/
if(x0.i == x1.i - 1 && x1.f == 0) {
x1.i--;
x1.f = 0xFF;
@@ -1089,8 +1089,8 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
/*Set all points which are crossed by the circle*/
for(; i <= x1.i; i++) {
/* These values are very close to each other. It's enough to approximate sqrt
* The non-approximated version is lv_sqrt(r2 - (i * i), &y_next, sqrt_mask); */
/*These values are very close to each other. It's enough to approximate sqrt
*The non-approximated version is lv_sqrt(r2 - (i * i), &y_next, sqrt_mask);*/
sqrt_approx(&y_next, &y_prev, r2 - (i * i));
m = (y_prev.f + y_next.f) >> 1;

View File

@@ -99,7 +99,7 @@ typedef struct {
lv_draw_mask_common_dsc_t dsc;
struct {
/*First point */
/*First point*/
lv_point_t p1;
/*Second point*/
@@ -112,23 +112,23 @@ typedef struct {
/*A point of the line*/
lv_point_t origo;
/* X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?*/
/*X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?*/
int32_t xy_steep;
/* Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?*/
/*Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?*/
int32_t yx_steep;
/*Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines */
/*Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines*/
int32_t steep;
/*Steepness in 1 px in 0..255 range. Used only by flat lines. */
/*Steepness in 1 px in 0..255 range. Used only by flat lines.*/
int32_t spx;
/*1: It's a flat line? (Near to horizontal)*/
uint8_t flat : 1;
/* Invert the mask. The default is: Keep the left part.
* It is used to select left/right/top/bottom*/
/*Invert the mask. The default is: Keep the left part.
*It is used to select left/right/top/bottom*/
uint8_t inv: 1;
} lv_draw_mask_line_param_t;
@@ -154,7 +154,7 @@ typedef struct {
struct {
lv_area_t rect;
lv_coord_t radius;
/* Invert the mask. 0: Keep the pixels inside.*/
/*Invert the mask. 0: Keep the pixels inside.*/
uint8_t outer: 1;
} cfg;
int32_t y_prev;
@@ -318,7 +318,7 @@ void lv_draw_mask_map_init(lv_draw_mask_map_param_t * param, const lv_area_t * c
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_MASK_H*/

View File

@@ -142,8 +142,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_bg(const lv_area_t * coords, const lv_are
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
lv_area_t draw_area;
bool is_common;
is_common = _lv_area_intersect(&draw_area, &coords_bg, clip);
@@ -151,8 +151,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_bg(const lv_area_t * coords, const lv_are
const lv_area_t * disp_area = &draw_buf->area;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -251,8 +251,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_bg(const lv_area_t * coords, const lv_are
grad_color = grad_get(dsc, lv_area_get_height(&coords_bg), y - coords_bg.y1);
}
/* If there is not other mask and drawing the corner area split the drawing to corner and middle areas
* because it the middle mask shouldn't be taken into account (therefore its faster)*/
/*If there is not other mask and drawing the corner area split the drawing to corner and middle areas
*because it the middle mask shouldn't be taken into account (therefore its faster)*/
if(simple_mode && split &&
(y < coords_bg.y1 + rout + 1 ||
y > coords_bg.y2 - rout - 1)) {
@@ -423,8 +423,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_border(const lv_area_t * coords, const lv
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
lv_area_t draw_area;
bool is_common;
is_common = _lv_area_intersect(&draw_area, coords, clip);
@@ -432,8 +432,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_border(const lv_area_t * coords, const lv
const lv_area_t * disp_area = &draw_buf->area;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -554,8 +554,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(const lv_area_t * coords, const lv
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
lv_area_t draw_area;
bool is_common;
is_common = _lv_area_intersect(&draw_area, &sh_area, clip);
@@ -563,8 +563,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(const lv_area_t * coords, const lv
const lv_area_t * disp_area = &draw_buf->area;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -598,7 +598,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(const lv_area_t * coords, const lv
lv_memcpy(sh_buf, sh_cache, corner_size * corner_size);
}
else {
/*A larger buffer is required for calculation */
/*A larger buffer is required for calculation*/
sh_buf = lv_mem_buf_get(corner_size * corner_size * sizeof(uint16_t));
shadow_draw_corner_buf(&sh_rect_area, (uint16_t *)sh_buf, dsc->shadow_width, r_sh);
@@ -1288,8 +1288,8 @@ static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * are
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp);
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
/*Get clipped fill area which is the real draw area.
*It is always the same or inside `fill_area`*/
lv_area_t draw_area;
bool is_common;
is_common = _lv_area_intersect(&draw_area, area_outer, clip);
@@ -1297,8 +1297,8 @@ static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * are
const lv_area_t * disp_area = &draw_buf->area;
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
/*Now `draw_area` has absolute coordinates.
*Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;
draw_area.y1 -= disp_area->y1;
draw_area.x2 -= disp_area->x1;
@@ -1364,7 +1364,7 @@ static void draw_full_border(const lv_area_t * area_inner, const lv_area_t * are
fill_area.y2++;
}
/*Draw the lower corner area */
/*Draw the lower corner area*/
int32_t lower_corner_end = area_outer->y2 - disp_area->y1 - corner_size;
if(lower_corner_end <= upper_corner_end) lower_corner_end = upper_corner_end + 1;
fill_area.y1 = disp_area->y1 + lower_corner_end;

View File

@@ -50,7 +50,7 @@ typedef struct {
lv_color_t border_color;
lv_coord_t border_width;
lv_opa_t border_opa;
uint8_t border_post : 1; /*There is a border it will be drawn later. */
uint8_t border_post : 1; /*There is a border it will be drawn later.*/
lv_border_side_t border_side :5;
/*Outline*/
@@ -109,7 +109,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_dra
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_RECT_H*/

View File

@@ -78,7 +78,7 @@ void lv_draw_polygon(const lv_point_t points[], uint16_t point_cnt, const lv_are
pcnt++;
}
}
/*The first and the last points are also adjacent */
/*The first and the last points are also adjacent*/
if(points[0].x != points[point_cnt - 1].x || points[0].y != points[point_cnt - 1].y) {
p[pcnt] = points[point_cnt - 1];
pcnt++;
@@ -133,7 +133,8 @@ void lv_draw_polygon(const lv_point_t points[], uint16_t point_cnt, const lv_are
i_next_right = y_min_i + 1;
if(i_next_right > point_cnt - 1) i_next_right = 0;
/* Check if the order of points is inverted or not.
/**
* Check if the order of points is inverted or not.
* The normal case is when the left point is on `y_min_i - 1`
* Explanation:
* if angle(p_left) < angle(p_right) -> inverted

View File

@@ -50,7 +50,7 @@ void lv_draw_polygon(const lv_point_t points[], uint16_t point_cnt, const lv_are
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_DRAW_TRIANGLE_H*/

View File

@@ -67,9 +67,9 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
uint8_t bit = x & 0x7;
x = x >> 3;
/* Get the current pixel.
* dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 8, 16, 24 ...*/
/*Get the current pixel.
*dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 8, 16, 24 ...*/
uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
p_color.full = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit);
}
@@ -78,9 +78,9 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
uint8_t bit = (x & 0x3) * 2;
x = x >> 2;
/* Get the current pixel.
* dsc->header.w + 3 means rounding up to 4 because the lines are byte aligned
* so the possible real width are 4, 8, 12 ...*/
/*Get the current pixel.
*dsc->header.w + 3 means rounding up to 4 because the lines are byte aligned
*so the possible real width are 4, 8, 12 ...*/
uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
p_color.full = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit);
}
@@ -89,9 +89,9 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
uint8_t bit = (x & 0x1) * 4;
x = x >> 1;
/* Get the current pixel.
* dsc->header.w + 1 means rounding up to 2 because the lines are byte aligned
* so the possible real width are 2, 4, 6 ...*/
/*Get the current pixel.
*dsc->header.w + 1 means rounding up to 2 because the lines are byte aligned
*so the possible real width are 2, 4, 6 ...*/
uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
p_color.full = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit);
}
@@ -127,9 +127,9 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
uint8_t bit = x & 0x7;
x = x >> 3;
/* Get the current pixel.
* dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 8 ,16, 24 ...*/
/*Get the current pixel.
*dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 8 ,16, 24 ...*/
uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
uint8_t px_opa = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit);
return px_opa ? LV_OPA_TRANSP : LV_OPA_COVER;
@@ -140,9 +140,9 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
uint8_t bit = (x & 0x3) * 2;
x = x >> 2;
/* Get the current pixel.
* dsc->header.w + 4 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 4 ,8, 12 ...*/
/*Get the current pixel.
*dsc->header.w + 4 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 4 ,8, 12 ...*/
uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
uint8_t px_opa = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit);
return opa_table[px_opa];
@@ -155,9 +155,9 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
uint8_t bit = (x & 0x1) * 4;
x = x >> 1;
/* Get the current pixel.
* dsc->header.w + 1 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 2 ,4, 6 ...*/
/*Get the current pixel.
*dsc->header.w + 1 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 2 ,4, 6 ...*/
uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
uint8_t px_opa = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit);
return opa_table[px_opa];
@@ -192,9 +192,9 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
uint8_t bit = x & 0x7;
x = x >> 3;
/* Get the current pixel.
* dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 8 ,16, 24 ...*/
/*Get the current pixel.
*dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 8 ,16, 24 ...*/
uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit));
buf_u8[px] = buf_u8[px] | ((opa & 0x1) << (7 - bit));
@@ -204,9 +204,9 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
uint8_t bit = (x & 0x3) * 2;
x = x >> 2;
/* Get the current pixel.
* dsc->header.w + 4 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 4 ,8, 12 ...*/
/*Get the current pixel.
*dsc->header.w + 4 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 4 ,8, 12 ...*/
uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit));
buf_u8[px] = buf_u8[px] | ((opa & 0x3) << (6 - bit));
@@ -216,9 +216,9 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
uint8_t bit = (x & 0x1) * 4;
x = x >> 1;
/* Get the current pixel.
* dsc->header.w + 1 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 2 ,4, 6 ...*/
/*Get the current pixel.
*dsc->header.w + 1 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 2 ,4, 6 ...*/
uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit));
buf_u8[px] = buf_u8[px] | ((opa & 0xF) << (4 - bit));
@@ -257,9 +257,9 @@ void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
uint8_t bit = x & 0x7;
x = x >> 3;
/* Get the current pixel.
* dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
* so the possible real width are 8 ,16, 24 ...*/
/*Get the current pixel.
*dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
*so the possible real width are 8 ,16, 24 ...*/
uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit));
buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit));
@@ -269,9 +269,9 @@ void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
uint8_t bit = (x & 0x3) * 2;
x = x >> 2;
/* Get the current pixel.
* dsc->header.w + 3 means rounding up to 4 because the lines are byte aligned
* so the possible real width are 4, 8 ,12 ...*/
/*Get the current pixel.
*dsc->header.w + 3 means rounding up to 4 because the lines are byte aligned
*so the possible real width are 4, 8 ,12 ...*/
uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit));
@@ -282,9 +282,9 @@ void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
uint8_t bit = (x & 0x1) * 4;
x = x >> 1;
/* Get the current pixel.
* dsc->header.w + 1 means rounding up to 2 because the lines are byte aligned
* so the possible real width are 2 ,4, 6 ...*/
/*Get the current pixel.
*dsc->header.w + 1 means rounding up to 2 because the lines are byte aligned
*so the possible real width are 2 ,4, 6 ...*/
uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit));
buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit));
@@ -329,21 +329,21 @@ void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c)
*/
lv_img_dsc_t * lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
{
/* Allocate image descriptor */
/*Allocate image descriptor*/
lv_img_dsc_t * dsc = lv_mem_alloc(sizeof(lv_img_dsc_t));
if(dsc == NULL)
return NULL;
lv_memset_00(dsc, sizeof(lv_img_dsc_t));
/* Get image data size */
/*Get image data size*/
dsc->data_size = lv_img_buf_get_img_size(w, h, cf);
if(dsc->data_size == 0) {
lv_mem_free(dsc);
return NULL;
}
/* Allocate raw buffer */
/*Allocate raw buffer*/
dsc->data = lv_mem_alloc(dsc->data_size);
if(dsc->data == NULL) {
lv_mem_free(dsc);
@@ -351,7 +351,7 @@ lv_img_dsc_t * lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
}
lv_memset_00((uint8_t *)dsc->data, dsc->data_size);
/* Fill in header */
/*Fill in header*/
dsc->header.always_zero = 0;
dsc->header.w = w;
dsc->header.h = h;
@@ -453,8 +453,8 @@ void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc)
dsc->tmp.img_dsc.header.w = dsc->cfg.src_w;
dsc->tmp.img_dsc.header.h = dsc->cfg.src_h;
/* The inverse of the zoom will be sued during the transformation
* + dsc->cfg.zoom / 2 for rounding*/
/*The inverse of the zoom will be sued during the transformation
* + dsc->cfg.zoom / 2 for rounding*/
dsc->tmp.zoom_inv = (((256 * 256) << _LV_ZOOM_INV_UPSCALE) + dsc->cfg.zoom / 2) / dsc->cfg.zoom;
dsc->res.opa = LV_OPA_COVER;

View File

@@ -77,35 +77,36 @@ enum {
LV_IMG_CF_ALPHA_4BIT, /**< Can have one color but 16 different alpha value*/
LV_IMG_CF_ALPHA_8BIT, /**< Can have one color but 256 different alpha value*/
LV_IMG_CF_RESERVED_15, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_16, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_17, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_18, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_19, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_20, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_21, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_22, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_23, /**< Reserved for further use. */
LV_IMG_CF_RESERVED_15, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_16, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_17, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_18, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_19, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_20, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_21, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_22, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_23, /**< Reserved for further use.*/
LV_IMG_CF_USER_ENCODED_0, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_1, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_2, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_3, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_4, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_5, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_6, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_7, /**< User holder encoding format. */
LV_IMG_CF_USER_ENCODED_0, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_1, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_2, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_3, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_4, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_5, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_6, /**< User holder encoding format.*/
LV_IMG_CF_USER_ENCODED_7, /**< User holder encoding format.*/
};
typedef uint8_t lv_img_cf_t;
/**
* LVGL image header
*/
/* The first 8 bit is very important to distinguish the different source types.
/**
* The first 8 bit is very important to distinguish the different source types.
* For more info see `lv_img_get_src_type()` in lv_img.c
* On big endian systems the order is reversed so cf and always_zero must be at
* the end of the struct.
* */
*/
#if LV_BIG_ENDIAN_SYSTEM
typedef struct {
@@ -114,13 +115,13 @@ typedef struct {
uint32_t reserved : 2; /*Reserved to be used later*/
uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
non-printable character*/
uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/
uint32_t cf : 5; /*Color format: See `lv_img_color_format_t`*/
} lv_img_header_t;
#else
typedef struct {
uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/
uint32_t cf : 5; /*Color format: See `lv_img_color_format_t`*/
uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
non-printable character*/
@@ -145,7 +146,7 @@ typedef struct {
lv_coord_t src_w; /*width of the image source*/
lv_coord_t src_h; /*height of the image source*/
lv_coord_t pivot_x; /*pivot x*/
lv_coord_t pivot_y; /* pivot y*/
lv_coord_t pivot_y; /*pivot y*/
int16_t angle; /*angle to rotate*/
uint16_t zoom; /*256 no zoom, 128 half size, 512 double size*/
lv_color_t color; /*a color used for `LV_IMG_CF_INDEXED_1/2/4/8BIT` color formats*/
@@ -304,7 +305,7 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_IMG_BUF_H*/

View File

@@ -23,7 +23,7 @@
#define LV_IMG_CACHE_LIFE_GAIN 1
/*Don't let life to be greater than this limit because it would require a lot of time to
* "die" from very high values */
* "die" from very high values*/
#define LV_IMG_CACHE_LIFE_LIMIT 1000
/**********************
@@ -84,9 +84,9 @@ lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color)
for(i = 0; i < entry_cnt; i++) {
if(color.full == cache[i].dec_dsc.color.full &&
lv_img_cache_match(src, cache[i].dec_dsc.src)) {
/* If opened increment its life.
* Image difficult to open should live longer to keep avoid frequent their recaching.
* Therefore increase `life` with `time_to_open`*/
/*If opened increment its life.
*Image difficult to open should live longer to keep avoid frequent their recaching.
*Therefore increase `life` with `time_to_open`*/
cached_src = &cache[i];
cached_src->life += cached_src->dec_dsc.time_to_open * LV_IMG_CACHE_LIFE_GAIN;
if(cached_src->life > LV_IMG_CACHE_LIFE_LIMIT) cached_src->life = LV_IMG_CACHE_LIFE_LIMIT;
@@ -123,7 +123,7 @@ lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color)
if(open_res == LV_RES_INV) {
LV_LOG_WARN("Image draw cannot open the image resource");
lv_memset_00(cached_src, sizeof(lv_img_cache_entry_t));
cached_src->life = INT32_MIN; /*Make the empty entry very "weak" to force its use */
cached_src->life = INT32_MIN; /*Make the empty entry very "weak" to force its us*/
return NULL;
}

View File

@@ -29,11 +29,11 @@ extern "C" {
* To avoid repeating this heavy load images can be cached.
*/
typedef struct {
lv_img_decoder_dsc_t dec_dsc; /**< Image information */
lv_img_decoder_dsc_t dec_dsc; /**< Image information*/
/** Count the cache entries's life. Add `time_to_open` to `life` when the entry is used.
* Decrement all lifes by one every in every ::lv_img_cache_open.
* If life == 0 the entry can be reused */
* If life == 0 the entry can be reused*/
int32_t life;
} lv_img_cache_entry_t;
@@ -71,7 +71,7 @@ void lv_img_cache_invalidate_src(const void * src);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_IMG_CACHE_H*/

View File

@@ -51,7 +51,7 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc,
/**
* Initialize the image decoder module
* */
*/
void _lv_img_decoder_init(void)
{
_lv_ll_init(&LV_GC_ROOT(_lv_img_decoder_ll), sizeof(lv_img_decoder_t));
@@ -298,11 +298,11 @@ lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * s
}
else if(src_type == LV_IMG_SRC_SYMBOL) {
/*The size depend on the font but it is unknown here. It should be handled outside of the
* function*/
*function*/
header->w = 1;
header->h = 1;
/* Symbols always have transparent parts. Important because of cover check in the draw
* function. The actual value doesn't matter because lv_draw_label will draw it*/
/*Symbols always have transparent parts. Important because of cover check in the draw
*function. The actual value doesn't matter because lv_draw_label will draw it*/
header->cf = LV_IMG_CF_ALPHA_1BIT;
}
else {
@@ -358,8 +358,8 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder
/*Process true color formats*/
if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
/* In case of uncompressed formats the image stored in the ROM/RAM.
* So simply give its pointer*/
/*In case of uncompressed formats the image stored in the ROM/RAM.
*So simply give its pointer*/
dsc->img_data = ((lv_img_dsc_t *)dsc->src)->data;
return LV_RES_OK;
}
@@ -420,7 +420,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder
return LV_RES_OK;
}
/*Alpha indexed images. */
/*Alpha indexed images.*/
else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || cf == LV_IMG_CF_ALPHA_4BIT ||
cf == LV_IMG_CF_ALPHA_8BIT) {
return LV_RES_OK; /*Nothing to process*/
@@ -455,8 +455,8 @@ lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_de
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
/* For TRUE_COLOR images read line required only for files.
* For variables the image data was returned in `open`*/
/*For TRUE_COLOR images read line required only for files.
*For variables the image data was returned in `open`*/
if(dsc->src_type == LV_IMG_SRC_FILE) {
res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf);
}

View File

@@ -30,17 +30,17 @@ extern "C" {
**********************/
/**
* Source of image. */
* Source of image.*/
enum {
LV_IMG_SRC_VARIABLE, /** Binary/C variable */
LV_IMG_SRC_FILE, /** File in filesystem */
LV_IMG_SRC_SYMBOL, /** Symbol (@ref lv_symbol_def.h) */
LV_IMG_SRC_UNKNOWN, /** Unknown source */
LV_IMG_SRC_VARIABLE, /** Binary/C variable*/
LV_IMG_SRC_FILE, /** File in filesystem*/
LV_IMG_SRC_SYMBOL, /** Symbol (@ref lv_symbol_def.h)*/
LV_IMG_SRC_UNKNOWN, /** Unknown source*/
};
typedef uint8_t lv_img_src_t;
/* Decoder function definitions */
/*Decoder function definitions*/
struct _lv_img_decoder;
struct _lv_img_decoder_dsc;
@@ -120,7 +120,7 @@ typedef struct _lv_img_decoder_dsc {
uint32_t time_to_open;
/**A text to display instead of the image when the image can't be opened.
* Can be set in `open` function or set NULL. */
* Can be set in `open` function or set NULL.*/
const char * error_msg;
/**Store any custom data here is required*/
@@ -263,7 +263,7 @@ void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_ds
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_IMG_DECODER_H*/

View File

@@ -191,7 +191,7 @@ static void flex_update(lv_obj_t * cont)
track_first_item = f->rev ? cont->spec_attr->child_cnt - 1 : 0;
track_t t;
while(track_first_item < (int32_t)cont->spec_attr->child_cnt && track_first_item >= 0) {
/*Search the first item of the next row */
/*Search the first item of the next row*/
next_track_first_item = find_track_end(cont, track_first_item, max_main_size, item_gap, &t);
total_track_cross_size += t.track_cross_size + track_gap;
track_cnt++;
@@ -200,7 +200,7 @@ static void flex_update(lv_obj_t * cont)
if(track_cnt) total_track_cross_size -= track_gap; /*No gap after the last track*/
/* Place the tracks to get the start position */
/*Place the tracks to get the start position*/
lv_coord_t max_cross_size = (row ? lv_obj_get_height_fit(cont) : lv_obj_get_width_fit(cont));
place_content(track_cross_place, max_cross_size, total_track_cross_size, track_cnt, cross_pos, &gap);
}
@@ -213,7 +213,7 @@ static void flex_update(lv_obj_t * cont)
while(track_first_item < (int32_t)cont->spec_attr->child_cnt && track_first_item >= 0) {
track_t t;
/*Search the first item of the next row */
/*Search the first item of the next row*/
next_track_first_item = find_track_end(cont, track_first_item, max_main_size, item_gap, &t);
if(rtl && !row) {
@@ -357,8 +357,8 @@ static void children_repos(lv_obj_t * cont, int32_t item_first_id, int32_t item_
lv_coord_t cross_pos = 0;
switch(f->cross_place) {
case LV_FLEX_PLACE_CENTER:
/* Round up the cross size to avoid rounding error when dividing by 2
* The issue comes up e,g, with column direction with center cross direction if an element's width changes*/
/*Round up the cross size to avoid rounding error when dividing by 2
*The issue comes up e,g, with column direction with center cross direction if an element's width changes*/
cross_pos = (((t->track_cross_size + 1) & (~1)) - area_get_cross_size(&item->coords)) / 2;
break;
case LV_FLEX_PLACE_END:

View File

@@ -31,7 +31,7 @@ LV_EXPORT_CONST_INT(LV_OBJ_FLAG_FLEX_IN_NEW_TRACK);
* TYPEDEFS
**********************/
/* Can't include lv_obj.h because it includes this header file */
/*Can't include lv_obj.h because it includes this header file*/
struct _lv_obj_t;
typedef enum {
@@ -119,7 +119,7 @@ extern const lv_flex_t lv_flex_row_even; /**< Place the items evenly
#endif /*LV_USE_FLEX*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_FLEX_H*/

View File

@@ -15,7 +15,7 @@
*********************/
/**
* Some helper defines
* */
*/
#define CELL_SHIFT 4
#define CELL_POS_MASK ((1 << CELL_SHIFT) - 1)
#define CELL_SPAN_MASK (CELL_POS_MASK << CELL_SHIFT)
@@ -145,8 +145,8 @@ static void full_refresh(lv_obj_t * cont)
item_repos_hint_t hint;
lv_memset_00(&hint, sizeof(hint));
/* Calculate the grids absolute x and y coordinates.
* It will be used as helper during item repositioning to avoid calculating this value for every children*/
/*Calculate the grids absolute x and y coordinates.
*It will be used as helper during item repositioning to avoid calculating this value for every children*/
lv_coord_t pad_left = lv_obj_get_style_pad_left(cont, LV_PART_MAIN);
lv_coord_t pad_top = lv_obj_get_style_pad_top(cont, LV_PART_MAIN);
hint.grid_abs.x = pad_left + cont->coords.x1 - lv_obj_get_scroll_x(cont);

View File

@@ -24,7 +24,7 @@ extern "C" {
* TYPEDEFS
**********************/
/* Can't include lv_obj.h because it includes this header file */
/*Can't include lv_obj.h because it includes this header file*/
struct _lv_obj_t;
typedef enum {
@@ -129,7 +129,7 @@ extern const lv_grid_t grid_12;
#endif /*LV_USE_GRID*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_GRID_H*/

View File

@@ -38,7 +38,7 @@ extern "C" {
#endif
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_LAYOUTS_H*/

View File

@@ -15,7 +15,7 @@
#if defined(LV_GC_INCLUDE)
#include LV_GC_INCLUDE
#endif /* LV_ENABLE_GC */
#endif /*LV_ENABLE_GC*/
/*********************
* DEFINES
@@ -523,9 +523,9 @@ lv_theme_t * lv_theme_default_init(lv_disp_t * disp, lv_color_palette_t palette_
const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_large)
{
/* This trick is required only to avoid the garbage collection of
* styles' data if LVGL is used in a binding (e.g. Micropython)
* In a general case styles could be in simple `static lv_style_t my_style...` variables*/
/*This trick is required only to avoid the garbage collection of
*styles' data if LVGL is used in a binding (e.g. Micropython)
*In a general case styles could be in simple `static lv_style_t my_style...` variables*/
if(!inited) {
LV_GC_ROOT(_lv_theme_default_styles) = lv_mem_alloc(sizeof(my_theme_styles_t));
styles = (my_theme_styles_t *)LV_GC_ROOT(_lv_theme_default_styles);

View File

@@ -49,7 +49,7 @@ bool lv_theme_default_is_inited(void);
#endif
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_THEME_DEFAULT_H*/

View File

@@ -32,7 +32,7 @@ extern "C" {
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_THEMES_H*/

View File

@@ -209,7 +209,7 @@ static void my_constructor(lv_obj_t * obj, const lv_obj_t * copy)
LV_UNUSED(copy);
lv_calendar_t * calendar = (lv_calendar_t *)obj;
/*Initialize the allocated 'ext' */
/*Initialize the allocated 'ext'*/
calendar->today.year = 2020;
calendar->today.month = 1;
calendar->today.day = 1;
@@ -365,4 +365,4 @@ static void highlight_update(lv_obj_t * obj)
}
}
#endif /* LV_USE_CALENDAR*/
#endif /*LV_USE_CALENDAR*/

View File

@@ -37,7 +37,7 @@ typedef struct {
/*Data of calendar*/
typedef struct {
lv_btnmatrix_t btnm;
/*New data for this type */
/*New data for this type*/
lv_calendar_date_t today; /*Date of today*/
lv_calendar_date_t showed_date; /*Currently visible month (day is ignored)*/
lv_calendar_date_t * highlighted_dates; /*Apply different style on these days (pointer to an array defined by the user)*/
@@ -145,10 +145,10 @@ bool lv_calendar_get_pressed_date(const lv_obj_t * calendar, lv_calendar_date_t
* MACROS
**********************/
#endif /* LV_USE_CALENDAR*/
#endif /*LV_USE_CALENDAR*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_CALENDAR_H*/

View File

@@ -43,7 +43,7 @@ lv_obj_t * lv_calendar_header_arrow_create(lv_obj_t * parent, lv_obj_t * calenda
#endif /*LV_USE_CALENDAR_HEADER_ARROW*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_CALENDAR_H*/

View File

@@ -42,7 +42,7 @@ lv_obj_t * lv_calendar_header_dropdown_create(lv_obj_t * parent, lv_obj_t * cale
#endif /*LV_USE_CALENDAR_HEADER_ARROW*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_CALENDAR_H*/

View File

@@ -17,7 +17,8 @@
#define LV_CPICKER_DEF_QF 3
/* The OUTER_MASK_WIDTH define is required to assist with the placing of a mask over the outer ring of the widget as when the
/**
* The OUTER_MASK_WIDTH define is required to assist with the placing of a mask over the outer ring of the widget as when the
* multicoloured radial lines are calculated for the outer ring of the widget their lengths are jittering because of the
* integer based arithmetic. From tests the maximum delta was found to be 2 so the current value is set to 3 to achieve
* appropriate masking.
@@ -264,7 +265,7 @@ static void draw_disc_grad(lv_obj_t * obj, const lv_area_t * mask)
lv_coord_t cir_w = lv_obj_get_style_arc_width(obj, LV_PART_MAIN);
#if LV_DRAW_COMPLEX
/* Mask outer and inner ring of widget to tidy up ragged edges of lines while drawing outer ring */
/*Mask outer and inner ring of widget to tidy up ragged edges of lines while drawing outer ring*/
lv_draw_mask_radius_param_t mask_out_param;
lv_draw_mask_radius_init(&mask_out_param, &obj->coords, LV_RADIUS_CIRCLE, false);
int16_t mask_out_id = lv_draw_mask_add(&mask_out_param, 0);
@@ -279,8 +280,8 @@ static void draw_disc_grad(lv_obj_t * obj, const lv_area_t * mask)
lv_draw_mask_radius_init(&mask_in_param, &mask_area, LV_RADIUS_CIRCLE, true);
int16_t mask_in_id = lv_draw_mask_add(&mask_in_param, 0);
/* The inner and outer line ends will be masked out.
* So make lines a little bit longer because the masking makes a more even result */
/*The inner and outer line ends will be masked out.
*So make lines a little bit longer because the masking makes a more even result*/
lv_coord_t cir_w_extra = line_dsc.width;
#else
lv_coord_t cir_w_extra = 0;
@@ -288,7 +289,7 @@ static void draw_disc_grad(lv_obj_t * obj, const lv_area_t * mask)
for(i = 0; i <= 256; i += LV_CPICKER_DEF_QF, a += 360 * LV_CPICKER_DEF_QF) {
line_dsc.color = angle_to_mode_color_fast(obj, i);
uint16_t angle_trigo = (uint16_t)(a >> 8); /* i * 360 / 256 is the scale to apply, but we can skip multiplication here */
uint16_t angle_trigo = (uint16_t)(a >> 8); /*i * 360 / 256 is the scale to apply, but we can skip multiplication here*/
lv_point_t p[2];
p[0].x = cx + ((r + cir_w_extra) * lv_trigo_sin(angle_trigo) >> LV_TRIGO_SHIFT);
@@ -362,7 +363,7 @@ static lv_area_t get_knob_area(lv_obj_t * obj)
*/
static lv_res_t lv_colorwheel_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
{
/* Include the ancient signal function */
/*Include the ancient signal function*/
lv_res_t res = lv_obj_signal_base(MY_CLASS, obj, sign, param);
if(res != LV_RES_OK) return res;
@@ -597,16 +598,17 @@ static lv_res_t double_click_reset(lv_obj_t * obj)
#define HSV_PTR_SWAP(sextant,r,g,b) if((sextant) & 2) { SWAPPTR((r), (b)); } if((sextant) & 4) { SWAPPTR((g), (b)); } if(!((sextant) & 6)) { \
if(!((sextant) & 1)) { SWAPPTR((r), (g)); } } else { if((sextant) & 1) { SWAPPTR((r), (g)); } }
/* Based on the idea from https://www.vagrearg.org/content/hsvrgb
Here we want to compute an approximate RGB value from a HSV input color space. We don't want to be accurate
(for that, there's lv_color_hsv_to_rgb), but we want to be fast.
Few tricks are used here: Hue is in range [0; 6 * 256] (so that the sextant is in the high byte and the fractional part is in the low byte)
both s and v are in [0; 255] range (very convenient to avoid divisions).
We fold all symmetry by swapping the R, G, B pointers so that the code is the same for all sextants.
We replace division by 255 by a division by 256, a.k.a a shift right by 8 bits.
This is wrong, but since this is only used to compute the pixels on the screen and not the final color, it's ok.
/**
* Based on the idea from https://www.vagrearg.org/content/hsvrgb
* Here we want to compute an approximate RGB value from a HSV input color space. We don't want to be accurate
* (for that, there's lv_color_hsv_to_rgb), but we want to be fast.
*
* Few tricks are used here: Hue is in range [0; 6 * 256] (so that the sextant is in the high byte and the fractional part is in the low byte)
* both s and v are in [0; 255] range (very convenient to avoid divisions).
*
* We fold all symmetry by swapping the R, G, B pointers so that the code is the same for all sextants.
* We replace division by 255 by a division by 256, a.k.a a shift right by 8 bits.
* This is wrong, but since this is only used to compute the pixels on the screen and not the final color, it's ok.
*/
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t *r, uint8_t *g , uint8_t *b);
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t *r, uint8_t *g , uint8_t *b)
@@ -614,21 +616,21 @@ static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t *r, uint8_t *
if (!s) { *r = *g = *b = v; return; }
uint8_t sextant = h >> 8;
HSV_PTR_SWAP(sextant, r, g, b); /* Swap pointers so the conversion code is the same */
HSV_PTR_SWAP(sextant, r, g, b); /*Swap pointers so the conversion code is the same*/
*g = v;
uint8_t bb = ~s;
uint16_t ww = v * bb; /* Don't try to be precise, but instead, be fast */
uint16_t ww = v * bb; /*Don't try to be precise, but instead, be fast*/
*b = ww >> 8;
uint8_t h_frac = h & 0xff;
if(!(sextant & 1)) {
/* Up slope */
ww = !h_frac ? ((uint16_t)s << 8) : (s * (uint8_t)(-h_frac)); /* Skip multiply if not required */
/*Up slope*/
ww = !h_frac ? ((uint16_t)s << 8) : (s * (uint8_t)(-h_frac)); /*Skip multiply if not required*/
} else {
/* Down slope */
/*Down slope*/
ww = s * h_frac;
}
bb = ww >> 8;
@@ -647,15 +649,15 @@ static lv_color_t angle_to_mode_color_fast(lv_obj_t * obj, uint16_t angle)
switch(ext->mode) {
default:
case LV_COLORWHEEL_MODE_HUE:
/* Don't recompute costly scaling if it does not change */
/*Don't recompute costly scaling if it does not change*/
if (m != ext->mode) {
s = (uint8_t)(((uint16_t)ext->hsv.s * 51) / 20); v = (uint8_t)(((uint16_t)ext->hsv.v * 51) / 20);
m = ext->mode;
}
fast_hsv2rgb(angle * 6, s, v, &r, &g, &b); /* A smart compiler will replace x * 6 by (x << 2) + (x << 1) if it's more efficient */
fast_hsv2rgb(angle * 6, s, v, &r, &g, &b); /*A smart compiler will replace x * 6 by (x << 2) + (x << 1) if it's more efficient*/
break;
case LV_COLORWHEEL_MODE_SATURATION:
/* Don't recompute costly scaling if it does not change */
/*Don't recompute costly scaling if it does not change*/
if (m != ext->mode) {
h = (uint16_t)(((uint32_t)ext->hsv.h * 6 * 256) / 360); v = (uint8_t)(((uint16_t)ext->hsv.v * 51) / 20);
m = ext->mode;
@@ -663,7 +665,7 @@ static lv_color_t angle_to_mode_color_fast(lv_obj_t * obj, uint16_t angle)
fast_hsv2rgb(h, angle, v, &r, &g, &b);
break;
case LV_COLORWHEEL_MODE_VALUE:
/* Don't recompute costly scaling if it does not change */
/*Don't recompute costly scaling if it does not change*/
if (m != ext->mode) {
h = (uint16_t)(((uint32_t)ext->hsv.h * 6 * 256) / 360); s = (uint8_t)(((uint16_t)ext->hsv.s * 51) / 20);
m = ext->mode;

View File

@@ -135,7 +135,7 @@ bool lv_colorwheel_get_color_mode_fixed(lv_obj_t * obj);
#endif /*LV_USE_COLORWHEEL*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_COLORWHEEL_H*/

View File

@@ -155,7 +155,7 @@ static void lv_imgbtn_constructor(lv_obj_t * obj, const lv_obj_t * copy)
LV_UNUSED(copy);
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *)obj;
/*Initialize the allocated 'ext' */
/*Initialize the allocated 'ext'*/
lv_memset_00((void *)imgbtn->img_src_mid, sizeof(imgbtn->img_src_mid));
lv_memset_00(imgbtn->img_src_left, sizeof(imgbtn->img_src_left));
lv_memset_00(imgbtn->img_src_right, sizeof(imgbtn->img_src_right));

View File

@@ -120,7 +120,7 @@ const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state)
#endif /*LV_USE_IMGBTN*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_IMGBTN_H*/

View File

@@ -350,4 +350,4 @@ static void lv_keyboard_update_map(lv_obj_t * obj)
lv_btnmatrix_set_ctrl_map(obj, kb_ctrl[keyboard->mode]);
}
#endif /* LV_USE_KEYBOARD*/
#endif /*LV_USE_KEYBOARD*/

View File

@@ -35,7 +35,7 @@ extern "C" {
* TYPEDEFS
**********************/
/** Current keyboard mode. */
/** Current keyboard mode.*/
enum {
LV_KEYBOARD_MODE_TEXT_LOWER,
LV_KEYBOARD_MODE_TEXT_UPPER,
@@ -144,10 +144,10 @@ void lv_keyboard_def_event_cb(lv_obj_t * kb, lv_event_t event);
* MACROS
**********************/
#endif /* LV_USE_KEYBOARD*/
#endif /*LV_USE_KEYBOARD*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_KEYBOARD_H*/

View File

@@ -93,7 +93,7 @@ uint8_t lv_led_get_brightness(const lv_obj_t * obj);
#endif /*LV_USE_LED*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif

View File

@@ -48,7 +48,7 @@ const char * lv_list_get_btn_text(lv_obj_t * list, lv_obj_t * btn);
#endif /*LV_USE_LIST*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_LIST_H*/

View File

@@ -46,7 +46,7 @@ extern "C" {
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_WIDGETS_H*/

View File

@@ -67,7 +67,7 @@ void lv_msgbox_close(lv_obj_t * mbox);
#endif /*LV_USE_MSGBOX*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_MSGBOX_H*/

View File

@@ -303,7 +303,7 @@ static void lv_spinbox_constructor(lv_obj_t * obj, const lv_obj_t * copy)
static lv_res_t lv_spinbox_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
{
/* Include the ancient signal function */
/*Include the ancient signal function*/
lv_res_t res = LV_RES_OK;
res = lv_obj_signal_base(MY_CLASS, obj, sign, param);
if(res != LV_RES_OK) return res;

View File

@@ -34,7 +34,7 @@ extern "C" {
/*Data of spinbox*/
typedef struct {
lv_textarea_t ta; /*Ext. of ancestor*/
/*New data for this type */
/*New data for this type*/
int32_t value;
int32_t range_max;
int32_t range_min;
@@ -166,6 +166,6 @@ void lv_spinbox_decrement(lv_obj_t * obj);
#endif /*LV_USE_SPINBOX*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_USE_SPINBOX*/

View File

@@ -43,7 +43,7 @@ lv_obj_t * lv_spinner_create(lv_obj_t * par, uint32_t time, uint32_t arc_length)
#endif /*LV_USE_SPINNER*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_SPINNER_H*/

View File

@@ -60,7 +60,7 @@ uint16_t lv_tabview_get_tab_act(lv_obj_t * tv);
#endif /*LV_USE_TABVIEW*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_TABVIEW_H*/

View File

@@ -65,7 +65,7 @@ void lv_obj_set_tile_id(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim
#endif /*LV_USE_TILEVIEW*/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_TILEVIEW_H*/

View File

@@ -45,7 +45,7 @@ lv_obj_t * lv_win_get_content(lv_obj_t * win);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_WIN_H*/

View File

@@ -33,9 +33,9 @@ extern "C" {
* General types
*-----------------*/
/** Describes the properties of a glyph. */
/** Describes the properties of a glyph.*/
typedef struct {
uint16_t adv_w; /**< The glyph needs this space. Draw the next glyph after this width. */
uint16_t adv_w; /**< The glyph needs this space. Draw the next glyph after this width.*/
uint16_t box_w; /**< Width of the glyph's bounding box*/
uint16_t box_h; /**< Height of the glyph's bounding box*/
int16_t ofs_x; /**< x offset of the bounding box*/
@@ -43,7 +43,7 @@ typedef struct {
uint8_t bpp; /**< Bit-per-pixel: 1, 2, 4, 8*/
} lv_font_glyph_dsc_t;
/** The bitmaps might be upscaled by 3 to achieve subpixel rendering. */
/** The bitmaps might be upscaled by 3 to achieve subpixel rendering.*/
enum {
LV_FONT_SUBPX_NONE,
LV_FONT_SUBPX_HOR,
@@ -71,7 +71,7 @@ typedef struct _lv_font_struct {
const void * dsc; /**< Store implementation specific or run_time data or caching here*/
#if LV_USE_USER_DATA
void * user_data; /**< Custom user data for font. */
void * user_data; /**< Custom user data for font.*/
#endif
} lv_font_t;
@@ -238,7 +238,7 @@ LV_FONT_CUSTOM_DECLARE
#endif
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*USE_FONT*/

View File

@@ -44,7 +44,7 @@ static int32_t kern_pair_16_compare(const void * ref, const void * element);
static inline void bits_write(uint8_t * out, uint32_t bit_pos, uint8_t val, uint8_t len);
static inline void rle_init(const uint8_t * in, uint8_t bpp);
static inline uint8_t rle_next(void);
#endif /* LV_USE_FONT_COMPRESSED */
#endif /*LV_USE_FONT_COMPRESSED*/
/**********************
* STATIC VARIABLES
@@ -56,7 +56,7 @@ static int32_t kern_pair_16_compare(const void * ref, const void * element);
static uint8_t rle_prev_v;
static uint8_t rle_cnt;
static rle_state_t rle_state;
#endif /* LV_USE_FONT_COMPRESSED */
#endif /*LV_USE_FONT_COMPRESSED*/
/**********************
* GLOBAL PROTOTYPES
@@ -123,7 +123,7 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], LV_GC_ROOT(_lv_font_decompr_buf), gdsc->box_w, gdsc->box_h,
(uint8_t)fdsc->bpp, prefilter);
return LV_GC_ROOT(_lv_font_decompr_buf);
#else /* !LV_USE_FONT_COMPRESSED */
#else /*!LV_USE_FONT_COMPRESSED*/
return NULL;
#endif
}
@@ -271,8 +271,8 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
/*Kern pairs*/
const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc;
if(kdsc->glyph_ids_size == 0) {
/* Use binary search to find the kern value.
* The pairs are ordered left_id first, then right_id secondly. */
/*Use binary search to find the kern value.
*The pairs are ordered left_id first, then right_id secondly.*/
const uint16_t * g_ids = kdsc->glyph_ids;
uint16_t g_id_both = (gid_right << 8) + gid_left; /*Create one number from the ids*/
uint16_t * kid_p = _lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 2, kern_pair_8_compare);
@@ -284,8 +284,8 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
}
}
else if(kdsc->glyph_ids_size == 1) {
/* Use binary search to find the kern value.
* The pairs are ordered left_id first, then right_id secondly. */
/*Use binary search to find the kern value.
*The pairs are ordered left_id first, then right_id secondly.*/
const uint32_t * g_ids = kdsc->glyph_ids;
uint32_t g_id_both = (gid_right << 16) + gid_left; /*Create one number from the ids*/
uint32_t * kid_p = _lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 4, kern_pair_16_compare);
@@ -307,8 +307,8 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
uint8_t left_class = kdsc->left_class_mapping[gid_left];
uint8_t right_class = kdsc->right_class_mapping[gid_right];
/* If class = 0, kerning not exist for that glyph
* else got the value form `class_pair_values` 2D array*/
/*If class = 0, kerning not exist for that glyph
*else got the value form `class_pair_values` 2D array*/
if(left_class > 0 && right_class > 0) {
value = kdsc->class_pair_values[(left_class - 1) * kdsc->right_class_cnt + (right_class - 1)];
}
@@ -567,7 +567,7 @@ static inline uint8_t rle_next(void)
return ret;
}
#endif /* LV_USE_FONT_COMPRESSED */
#endif /*LV_USE_FONT_COMPRESSED*/
/** Code Comparator.
*

View File

@@ -26,18 +26,18 @@ extern "C" {
* TYPEDEFS
**********************/
/** This describes a glyph. */
/** This describes a glyph.*/
typedef struct {
#if LV_FONT_FMT_TXT_LARGE == 0
uint32_t bitmap_index : 20; /**< Start index of the bitmap. A font can be max 1 MB. */
uint32_t adv_w : 12; /**< Draw the next glyph after this width. 8.4 format (real_value * 16 is stored). */
uint32_t bitmap_index : 20; /**< Start index of the bitmap. A font can be max 1 MB.*/
uint32_t adv_w : 12; /**< Draw the next glyph after this width. 8.4 format (real_value * 16 is stored).*/
uint8_t box_w; /**< Width of the glyph's bounding box*/
uint8_t box_h; /**< Height of the glyph's bounding box*/
int8_t ofs_x; /**< x offset of the bounding box*/
int8_t ofs_y; /**< y offset of the bounding box. Measured from the top of the line*/
#else
uint32_t bitmap_index; /**< Start index of the bitmap. A font can be max 4 GB. */
uint32_t adv_w; /**< Draw the next glyph after this width. 28.4 format (real_value * 16 is stored). */
uint32_t bitmap_index; /**< Start index of the bitmap. A font can be max 4 GB.*/
uint32_t adv_w; /**< Draw the next glyph after this width. 28.4 format (real_value * 16 is stored).*/
uint16_t box_w; /**< Width of the glyph's bounding box*/
uint16_t box_h; /**< Height of the glyph's bounding box*/
int16_t ofs_x; /**< x offset of the bounding box*/
@@ -45,7 +45,7 @@ typedef struct {
#endif
} lv_font_fmt_txt_glyph_dsc_t;
/** Format of font character map. */
/** Format of font character map.*/
enum {
LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL,
LV_FONT_FMT_TXT_CMAP_SPARSE_FULL,
@@ -55,19 +55,20 @@ enum {
typedef uint8_t lv_font_fmt_txt_cmap_type_t;
/* Map codepoints to a `glyph_dsc`s
/**
* Map codepoints to a `glyph_dsc`s
* Several formats are supported to optimize memory usage
* See https://github.com/lvgl/lv_font_conv/blob/master/doc/font_spec.md
*/
typedef struct {
/** First Unicode character for this range */
/** First Unicode character for this range*/
uint32_t range_start;
/** Number of Unicode characters related to this range.
* Last Unicode character = range_start + range_length - 1*/
uint16_t range_length;
/** First glyph ID (array index of `glyph_dsc`) for this range */
/** First glyph ID (array index of `glyph_dsc`) for this range*/
uint16_t glyph_id_start;
/*
@@ -155,7 +156,7 @@ typedef struct {
uint32_t last_glyph_id;
}lv_font_fmt_txt_glyph_cache_t;
/*Describe store additional data for fonts */
/*Describe store additional data for fonts*/
typedef struct {
/*The bitmaps of all glyphs*/
const uint8_t * glyph_bitmap;
@@ -163,11 +164,12 @@ typedef struct {
/*Describe the glyphs*/
const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc;
/* Map the glyphs to Unicode characters.
* Array of `lv_font_cmap_fmt_txt_t` variables*/
/*Map the glyphs to Unicode characters.
*Array of `lv_font_cmap_fmt_txt_t` variables*/
const lv_font_fmt_txt_cmap_t * cmaps;
/* Store kerning values.
/**
* Store kerning values.
* Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *`
* depending on `kern_classes`
*/
@@ -232,7 +234,7 @@ void _lv_font_clean_up_fmt_txt(void);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_FONT_FMT_TXT_H*/

View File

@@ -441,7 +441,7 @@ static int32_t load_glyph(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc,
int next_offset = (i < loca_count - 1) ? glyph_offset[i + 1] : (uint32_t)glyph_length;
int bmp_size = next_offset - glyph_offset[i] - nbits / 8;
if(nbits % 8 == 0) { /* Fast path */
if(nbits % 8 == 0) { /*Fast path*/
if(lv_fs_read(fp, &glyph_bmp[cur_bmp_size], bmp_size, NULL) != LV_FS_RES_OK) {
return -1;
}
@@ -485,7 +485,7 @@ static bool lvgl_load_font(lv_fs_file_t * fp, lv_font_t * font)
font->dsc = font_dsc;
/* header */
/*header*/
int32_t header_length = read_label(fp, 0, "head");
if(header_length < 0) {
return false;
@@ -508,14 +508,14 @@ static bool lvgl_load_font(lv_fs_file_t * fp, lv_font_t * font)
font_dsc->kern_scale = font_header.kerning_scale;
font_dsc->bitmap_format = font_header.compression_id;
/* cmaps */
/*cmaps*/
uint32_t cmaps_start = header_length;
int32_t cmaps_length = load_cmaps(fp, font_dsc, cmaps_start);
if(cmaps_length < 0) {
return false;
}
/* loca */
/*loca*/
uint32_t loca_start = cmaps_start + cmaps_length;
int32_t loca_length = read_label(fp, loca_start, "loca");
if(loca_length < 0) {
@@ -555,7 +555,7 @@ static bool lvgl_load_font(lv_fs_file_t * fp, lv_font_t * font)
return false;
}
/* glyph */
/*glyph*/
uint32_t glyph_start = loca_start + loca_length;
int32_t glyph_length = load_glyph(
fp, font_dsc, glyph_start, glyph_offset, loca_count, &font_header);
@@ -594,7 +594,7 @@ int32_t load_kern(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc, uint8_t f
return -1;
}
if(0 == kern_format_type) { /* sorted pairs */
if(0 == kern_format_type) { /*sorted pairs*/
lv_font_fmt_txt_kern_pair_t * kern_pair = lv_mem_alloc(sizeof(lv_font_fmt_txt_kern_pair_t));
memset(kern_pair, 0, sizeof(lv_font_fmt_txt_kern_pair_t));
@@ -631,7 +631,7 @@ int32_t load_kern(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc, uint8_t f
return -1;
}
}
else if(3 == kern_format_type) { /* array M*N of classes */
else if(3 == kern_format_type) { /*array M*N of classes*/
lv_font_fmt_txt_kern_classes_t * kern_classes = lv_mem_alloc(sizeof(lv_font_fmt_txt_kern_classes_t));

View File

@@ -34,7 +34,7 @@ void lv_font_free(lv_font_t * font);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_FONT_LOADER_H*/

View File

@@ -1,6 +1,6 @@
#ifndef LV_SYMBOL_DEF_H
#define LV_SYMBOL_DEF_H
/* clang-format off */
/*clang-format off*/
#ifdef __cplusplus
extern "C" {
@@ -12,7 +12,7 @@ extern "C" {
* Symbols from FontAwesome font
*-----------------------------*/
/* In the font converter use this list as range:
/*In the font converter use this list as range:
61441, 61448, 61451, 61452, 61453, 61457, 61459, 61461, 61465, 61468,
61473, 61478, 61479, 61480, 61502, 61512, 61515, 61516, 61517, 61521,
61522, 61523, 61524, 61543, 61544, 61550, 61552, 61553, 61556, 61559,
@@ -156,7 +156,7 @@ enum {
};
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_SYMBOL_DEF_H*/

View File

@@ -109,7 +109,7 @@ lv_res_t lv_gpu_nxp_pxp_init(lv_nxp_pxp_cfg_t * cfg)
}
PXP_Init(PXP);
PXP_EnableCsc1(PXP, false); /* Disable CSC1, it is enabled by default. */
PXP_EnableCsc1(PXP, false); /*Disable CSC1, it is enabled by default.*/
PXP_EnableInterrupts(PXP, kPXP_CompleteInterruptEnable);
pxp_cfg = *cfg;
@@ -147,10 +147,10 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_
lv_opa_t opa)
{
PXP_Init(LV_GPU_NXP_PXP_ID);
PXP_EnableCsc1(LV_GPU_NXP_PXP_ID, false); /* Disable CSC1, it is enabled by default. */
PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /* Block size 16x16 for higher performance */
PXP_EnableCsc1(LV_GPU_NXP_PXP_ID, false); /*Disable CSC1, it is enabled by default.*/
PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /*Block size 16x16 for higher performance*/
/* OUT buffer configure */
/*OUT buffer configure*/
pxp_output_buffer_config_t outputConfig = {
.pixelFormat = PXP_OUT_PIXEL_FORMAT,
.interlacedMode = kPXP_OutputProgressive,
@@ -165,17 +165,17 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_
PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputConfig);
if(opa > LV_OPA_MAX) {
/* Simple color fill without opacity - AS disabled, PS as color generator */
PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /* Disable AS. */
PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /* Disable PS. */
/*Simple color fill without opacity - AS disabled, PS as color generator*/
PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /*Disable AS.*/
PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /*Disable PS.*/
PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color));
}
else {
/* Fill with opacity - AS used as source (same as OUT), PS used as color generator, blended together */
/*Fill with opacity - AS used as source (same as OUT), PS used as color generator, blended together*/
pxp_as_buffer_config_t asBufferConfig;
pxp_porter_duff_config_t pdConfig;
/* Set AS to OUT */
/*Set AS to OUT*/
asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT;
asBufferConfig.bufferAddr = (uint32_t)outputConfig.buffer0Addr;
asBufferConfig.pitchBytes = outputConfig.pitchBytes;
@@ -184,11 +184,11 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_
PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, fill_area->x2 - fill_area->x1 + 1,
fill_area->y2 - fill_area->y1 + 1);
/* Disable PS, use as color generator */
/*Disable PS, use as color generator*/
PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color));
/* Configure Porter-Duff blending - For RGB 565 only! */
/*Configure Porter-Duff blending - For RGB 565 only!*/
pdConfig.enable = 1;
pdConfig.dstColorMode = kPXP_PorterDuffColorStraight;
pdConfig.srcColorMode = kPXP_PorterDuffColorStraight;
@@ -198,12 +198,12 @@ void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_
pdConfig.dstFactorMode = kPXP_PorterDuffFactorStraight;
pdConfig.srcGlobalAlpha = opa;
pdConfig.dstGlobalAlpha = 255 - opa;
pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */
pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */
pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig);
}
lv_gpu_nxp_pxp_run(); /* Start PXP task */
lv_gpu_nxp_pxp_run(); /*Start PXP task*/
}
/**
@@ -226,14 +226,14 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo
lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa)
{
if(recolorEnabled) { /* switch to recolor version of blit */
if(recolorEnabled) { /*switch to recolor version of blit*/
lv_gpu_nxp_pxp_blit_recolor(dest, dest_width, src, src_width, copy_width, copy_height, opa, recolor, recolorOpa);
return;
};
PXP_Init(PXP);
PXP_EnableCsc1(PXP, false); /* Disable CSC1, it is enabled by default. */
PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /* block size 16x16 for higher performance */
PXP_EnableCsc1(PXP, false); /*Disable CSC1, it is enabled by default.*/
PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /*block size 16x16 for higher performance*/
pxp_output_buffer_config_t outputBufferConfig;
pxp_as_buffer_config_t asBufferConfig;
@@ -245,12 +245,12 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo
asBlendConfig.ropMode = kPXP_RopMergeAs;
if(opa >= LV_OPA_MAX && !colorKeyEnabled) {
/* Simple blit, no effect - Disable PS buffer */
/*Simple blit, no effect - Disable PS buffer*/
PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
}
else {
/* Alpha blending or color keying enabled - PS must be enabled to fetch background pixels
PS and OUT buffers are the same, blend will be done in-place */
/*Alpha blending or color keying enabled - PS must be enabled to fetch background pixels
PS and OUT buffers are the same, blend will be done in-place*/
pxp_ps_buffer_config_t psBufferConfig = {
.pixelFormat = PXP_PS_PIXEL_FORMAT,
.swapByte = false,
@@ -264,7 +264,7 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo
PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1, copy_height - 1);
}
/* AS buffer - source image */
/*AS buffer - source image*/
asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT;
asBufferConfig.bufferAddr = (uint32_t)src;
asBufferConfig.pitchBytes = src_width * sizeof(lv_color_t);
@@ -280,7 +280,7 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo
}
PXP_EnableAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, colorKeyEnabled);
/* Output buffer. */
/*Output buffer.*/
outputBufferConfig.pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT;
outputBufferConfig.interlacedMode = kPXP_OutputProgressive;
outputBufferConfig.buffer0Addr = (uint32_t)dest;
@@ -293,7 +293,7 @@ void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_colo
lv_gpu_nxp_invalidate_cache(outputBufferConfig.buffer0Addr, outputBufferConfig.width, outputBufferConfig.height,
outputBufferConfig.pitchBytes, sizeof(lv_color_t));
lv_gpu_nxp_pxp_run(); /* Start PXP task */
lv_gpu_nxp_pxp_run(); /*Start PXP task*/
}
/**
@@ -375,21 +375,21 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width
pxp_as_buffer_config_t asBufferConfig;
if(colorKeyEnabled) {
/* should never get here, recolor & color keying not supported. Draw black box instead. */
/*should never get here, recolor & color keying not supported. Draw black box instead.*/
const lv_area_t fill_area = {.x1 = 0, .y1 = 0, .x2 = copy_width - 1, .y2 = copy_height - 1};
lv_gpu_nxp_pxp_fill(dest, dest_width, &fill_area, lv_color_black(), LV_OPA_MAX);
LV_LOG_WARN("Recoloring and color keying is not supported. Black rectangle rendered.");
return ;
}
else {
/* Recoloring without color keying */
/*Recoloring without color keying*/
if(opa > LV_OPA_MAX) {
/* Recolor with full opacity - AS source image, PS color generator, OUT destination */
/*Recolor with full opacity - AS source image, PS color generator, OUT destination*/
PXP_Init(PXP);
PXP_EnableCsc1(PXP, false); /* Disable CSC1, it is enabled by default. */
PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /* block size 16x16 for higher performance */
PXP_EnableCsc1(PXP, false); /*Disable CSC1, it is enabled by default.*/
PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /*block size 16x16 for higher performance*/
/* AS buffer - source image */
/*AS buffer - source image*/
asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT;
asBufferConfig.bufferAddr = (uint32_t)src;
asBufferConfig.pitchBytes = src_width * sizeof(lv_color_t);
@@ -399,11 +399,11 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width
lv_gpu_nxp_invalidate_cache(asBufferConfig.bufferAddr, copy_width, copy_height, asBufferConfig.pitchBytes,
sizeof(lv_color_t));
/* Disable PS buffer, use as color generator */
/*Disable PS buffer, use as color generator*/
PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(recolor));
/* Output buffer */
/*Output buffer*/
outputBufferConfig.pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT;
outputBufferConfig.interlacedMode = kPXP_OutputProgressive;
outputBufferConfig.buffer0Addr = (uint32_t)dest;
@@ -418,7 +418,7 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width
pxp_porter_duff_config_t pdConfig;
/* Configure Porter-Duff blending - For RGB 565 only! */
/*Configure Porter-Duff blending - For RGB 565 only!*/
pdConfig.enable = 1;
pdConfig.dstColorMode = kPXP_PorterDuffColorStraight;
pdConfig.srcColorMode = kPXP_PorterDuffColorStraight;
@@ -428,27 +428,27 @@ static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width
pdConfig.dstFactorMode = kPXP_PorterDuffFactorStraight;
pdConfig.srcGlobalAlpha = recolorOpa;
pdConfig.dstGlobalAlpha = 255 - recolorOpa;
pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */
pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /* don't care */
pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig);
lv_gpu_nxp_pxp_run(); /* Start PXP task */
lv_gpu_nxp_pxp_run(); /*Start PXP task*/
}
else {
/* Recolor with transparency */
/*Recolor with transparency*/
/* Step 1: Recolor with full opacity to temporary buffer */
/*Step 1: Recolor with full opacity to temporary buffer*/
lv_color_t * tmpBuf = (lv_color_t *)lv_mem_buf_get(copy_width * copy_height * sizeof(lv_color_t));
lv_gpu_nxp_pxp_blit_recolor(tmpBuf, copy_width, src, src_width, copy_width, copy_height, LV_OPA_COVER, recolor,
recolorOpa);
/* Step 2: BLIT temporary results with required opacity to output */
lv_gpu_nxp_pxp_disable_recolor(); /* make sure to take BLIT path, not the recolor */
/*Step 2: BLIT temporary results with required opacity to output*/
lv_gpu_nxp_pxp_disable_recolor(); /*make sure to take BLIT path, not the recolor*/
lv_gpu_nxp_pxp_blit(dest, dest_width, tmpBuf, copy_width, copy_width, copy_height, opa);
lv_gpu_nxp_pxp_enable_recolor(recolor, recolorOpa); /* restore state */
lv_gpu_nxp_pxp_enable_recolor(recolor, recolorOpa); /*restore state*/
/* Step 3: Clean-up memory */
/*Step 3: Clean-up memory*/
lv_mem_buf_release(tmpBuf);
}
}
@@ -473,4 +473,4 @@ static void lv_gpu_nxp_invalidate_cache(uint32_t address, uint32_t width, uint32
address += stride;
}
}
#endif /* LV_USE_GPU && LV_USE_GPU_NXP_PXP */
#endif /*LV_USE_GPU && LV_USE_GPU_NXP_PXP*/

View File

@@ -45,29 +45,29 @@ extern "C" {
* DEFINES
*********************/
/** PXP module instance to use */
/** PXP module instance to use*/
#define LV_GPU_NXP_PXP_ID PXP
/** PXP interrupt line ID */
/** PXP interrupt line I*/
#define LV_GPU_NXP_PXP_IRQ_ID PXP_IRQn
#ifndef LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT
/** Minimum area (in pixels) for image copy with 100% opacity to be handled by PXP */
/** Minimum area (in pixels) for image copy with 100% opacity to be handled by PXP*/
#define LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT 32
#endif
#ifndef LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT
/** Minimum area (in pixels) for image copy with transparency to be handled by PXP */
/** Minimum area (in pixels) for image copy with transparency to be handled by PXP*/
#define LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT 16
#endif
#ifndef LV_GPU_NXP_PXP_FILL_SIZE_LIMIT
/** Minimum area (in pixels) to be filled by PXP with 100% opacity */
/** Minimum area (in pixels) to be filled by PXP with 100% opacity*/
#define LV_GPU_NXP_PXP_FILL_SIZE_LIMIT 64
#endif
#ifndef LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT
/** Minimum area (in pixels) to be filled by PXP with transparency */
/** Minimum area (in pixels) to be filled by PXP with transparency*/
#define LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT 32
#endif
@@ -79,13 +79,13 @@ extern "C" {
* interrupt init/wait/deinit.
*/
typedef struct {
/** Callback for PXP interrupt initialization */
/** Callback for PXP interrupt initialization*/
lv_res_t (*pxp_interrupt_init)(void);
/** Callback for PXP interrupt de-initialization */
/** Callback for PXP interrupt de-initialization*/
void (*pxp_interrupt_deinit)(void);
/** Callback that should start PXP and wait for operation complete */
/** Callback that should start PXP and wait for operation complete*/
void (*pxp_run)(void);
} lv_nxp_pxp_cfg_t;
@@ -176,7 +176,7 @@ void lv_gpu_nxp_pxp_disable_recolor(void);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /* LV_SRC_LV_GPU_LV_GPU_NXP_PXP_H_ */
#endif /*LV_SRC_LV_GPU_LV_GPU_NXP_PXP_H_*/

View File

@@ -162,4 +162,4 @@ lv_nxp_pxp_cfg_t pxp_default_cfg = {
.pxp_run = _lv_gpu_nxp_pxp_run
};
#endif /* LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT */
#endif /*LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT*/

View File

@@ -41,7 +41,7 @@ extern lv_nxp_pxp_cfg_t pxp_default_cfg;
#endif
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /* LV_SRC_LV_GPU_LV_GPU_NXP_PXP_OSA_H_ */
#endif /*LV_SRC_LV_GPU_LV_GPU_NXP_PXP_OSA_H_*/

View File

@@ -91,7 +91,7 @@ lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv
vg_lite_buffer_t rt;
vg_lite_rectangle_t rect;
vg_lite_error_t err = VG_LITE_SUCCESS;
lv_color32_t col32 = {.full = lv_color_to32(color)}; /* Convert color to RGBA8888 */
lv_color32_t col32 = {.full = lv_color_to32(color)}; /*Convert color to RGBA8888*/
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
if(init_vg_buf(&rt, dest_width, dest_height, dest_width * sizeof(lv_color_t), dest_buf) != LV_RES_OK) {
@@ -101,24 +101,24 @@ lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv
return LV_RES_INV;
}
if(opa >= LV_OPA_MAX) { /* Opaque fill */
if(opa >= LV_OPA_MAX) { /*Opaque fill*/
rect.x = fill_area->x1;
rect.y = fill_area->y1;
rect.width = (fill_area->x2 - fill_area->x1) + 1;
rect.height = (fill_area->y2 - fill_area->y1) + 1;
if(disp && disp->driver->clean_dcache_cb) { /* Clean & invalidate cache */
if(disp && disp->driver->clean_dcache_cb) { /*Clean & invalidate cache*/
disp->driver->clean_dcache_cb(&disp->driver);
}
err |= vg_lite_clear(&rt, &rect, col32.full);
err |= vg_lite_finish();
}
else { /* fill with transparency */
else { /*fill with transparency*/
vg_lite_path_t path;
lv_color32_t colMix;
int16_t path_data[] = { /* VG rectangular path */
int16_t path_data[] = { /*VG rectangular path*/
VLC_OP_MOVE, fill_area->x1, fill_area->y1,
VLC_OP_LINE, fill_area->x2 + 1, fill_area->y1,
VLC_OP_LINE, fill_area->x2 + 1, fill_area->y2 + 1,
@@ -136,19 +136,19 @@ lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv
return LV_RES_INV;
}
colMix.ch.red = ((uint16_t)col32.ch.red * opa) >> 8; /* Pre-multiply color */
colMix.ch.red = ((uint16_t)col32.ch.red * opa) >> 8; /*Pre-multiply color*/
colMix.ch.green = ((uint16_t)col32.ch.green * opa) >> 8;
colMix.ch.blue = ((uint16_t)col32.ch.blue * opa) >> 8;
colMix.ch.alpha = opa;
if(disp && disp->driver->clean_dcache_cb) { /* Clean & invalidate cache */
if(disp && disp->driver->clean_dcache_cb) { /*Clean & invalidate cache*/
disp->driver->clean_dcache_cb(&disp->driver);
}
vg_lite_matrix_t matrix;
vg_lite_identity(&matrix);
/* Draw rectangle */
/*Draw rectangle*/
err |= vg_lite_draw(&rt, &path, VG_LITE_FILL_EVEN_ODD, &matrix, VG_LITE_BLEND_SRC_OVER, colMix.full);
if(err) {
#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
@@ -187,15 +187,15 @@ lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
if(blit->opa < LV_OPA_MIN) {
return LV_RES_OK; /* Nothing to BLIT */
return LV_RES_OK; /*Nothing to BLIT*/
}
if(!blit) {
/* Wrong parameter */
/*Wrong parameter*/
return LV_RES_INV;
}
/* Wrap src/dst buffer into VG-Lite buffer */
/*Wrap src/dst buffer into VG-Lite buffer*/
if(init_vg_buf(&src_vgbuf, blit->src_width, blit->src_height, blit->src_stride, blit->src) != LV_RES_OK) {
#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
LV_LOG_ERROR("init_vg_buf reported error. BLIT failed.");
@@ -210,7 +210,7 @@ lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
return LV_RES_INV;
}
rect[0] = 0; /* Crop */
rect[0] = 0; /*Crop*/
rect[1] = 0;
rect[2] = blit->src_width;
rect[3] = blit->src_height;
@@ -219,7 +219,7 @@ lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
vg_lite_identity(&matrix);
vg_lite_translate(blit->dst_area.x1, blit->dst_area.y1, &matrix);
if(disp && disp->driver->clean_dcache_cb) { /* Clean & invalidate cache */
if(disp && disp->driver->clean_dcache_cb) { /*Clean & invalidate cache*/
disp->driver->clean_dcache_cb(&disp->driver);
}
@@ -264,14 +264,14 @@ lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
static lv_res_t init_vg_buf(vg_lite_buffer_t * dst, uint32_t width, uint32_t height, uint32_t stride,
const lv_color_t * ptr)
{
if((((uintptr_t)ptr) % LV_ATTRIBUTE_MEM_ALIGN_SIZE) != 0x0) { /* Test for alignment */
if((((uintptr_t)ptr) % LV_ATTRIBUTE_MEM_ALIGN_SIZE) != 0x0) { /*Test for alignment*/
#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
LV_LOG_ERROR("ptr (0x%X) not aligned to %d.", (size_t) ptr, LV_ATTRIBUTE_MEM_ALIGN_SIZE);
#endif
return LV_RES_INV;
}
if((stride % LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) != 0x0) { /* Test for stride alignment */
if((stride % LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) != 0x0) { /*Test for stride alignment*/
#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
LV_LOG_ERROR("Buffer stride (%d px) not aligned to %d px.", stride, LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
#endif
@@ -296,4 +296,4 @@ static lv_res_t init_vg_buf(vg_lite_buffer_t * dst, uint32_t width, uint32_t hei
return LV_RES_OK;
}
#endif /* LV_USE_GPU_NXP_VG_LITE */
#endif /*LV_USE_GPU_NXP_VG_LITE*/

View File

@@ -43,31 +43,31 @@ extern "C" {
* DEFINES
*********************/
/** Stride in px required by VG-Lite HW. Don't change this. */
/** Stride in px required by VG-Lite HW. Don't change this.*/
#define LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX 16
#ifndef LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT
/** Minimum area (in pixels) to be filled by VG-Lite with 100% opacity */
/** Minimum area (in pixels) to be filled by VG-Lite with 100% opacity*/
#define LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT 32
#endif
#ifndef LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT
/** Minimum area (in pixels) to be filled by VG-Lite with transparency */
/** Minimum area (in pixels) to be filled by VG-Lite with transparency*/
#define LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT 32
#endif
#ifndef LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT
/** Minimum area (in pixels) for image copy with 100% opacity to be handled by VG-Lite */
/** Minimum area (in pixels) for image copy with 100% opacity to be handled by VG-Lite*/
#define LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT 32
#endif
#ifndef LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT
/** Minimum area (in pixels) for image copy with transparency to be handled by VG-Lite */
/** Minimum area (in pixels) for image copy with transparency to be handled by VG-Lite*/
#define LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT 32
#endif
#ifndef LV_GPU_NXP_VG_LITE_LOG_ERRORS
/** Enable logging of VG-Lite errors (\see LV_LOG_ERROR) */
/** Enable logging of VG-Lite errors (\see LV_LOG_ERROR)*/
#define LV_GPU_NXP_VG_LITE_LOG_ERRORS 1
#endif
@@ -80,19 +80,19 @@ extern "C" {
*/
typedef struct {
const lv_color_t * src; /**< Source buffer pointer (must be aligned on 32 bytes) */
lv_area_t src_area; /**< Area to be copied from source */
lv_coord_t src_width; /**< Source buffer width */
lv_coord_t src_height; /**< Source buffer height */
uint32_t src_stride; /**< Source buffer stride in bytes (must be aligned on 16 px) */
const lv_color_t * src; /**< Source buffer pointer (must be aligned on 32 bytes)*/
lv_area_t src_area; /**< Area to be copied from source*/
lv_coord_t src_width; /**< Source buffer width*/
lv_coord_t src_height; /**< Source buffer height*/
uint32_t src_stride; /**< Source buffer stride in bytes (must be aligned on 16 px)*/
const lv_color_t * dst; /**< Destination buffer pointer (must be aligned on 32 bytes) */
lv_area_t dst_area; /**< Target area in destination buffer (must be the same as src_area) */
lv_coord_t dst_width; /**< Destination buffer width */
lv_coord_t dst_height; /**< Destination buffer height */
uint32_t dst_stride; /**< Destination buffer stride in bytes (must be aligned on 16 px) */
const lv_color_t * dst; /**< Destination buffer pointer (must be aligned on 32 bytes)*/
lv_area_t dst_area; /**< Target area in destination buffer (must be the same as src_area)*/
lv_coord_t dst_width; /**< Destination buffer width*/
lv_coord_t dst_height; /**< Destination buffer height*/
uint32_t dst_stride; /**< Destination buffer stride in bytes (must be aligned on 16 px)*/
lv_opa_t opa; /**< Opacity - alpha mix (0 = source not copied, 255 = 100% opaque) */
lv_opa_t opa; /**< Opacity - alpha mix (0 = source not copied, 255 = 100% opaque)*/
} lv_gpu_nxp_vglite_blit_info_t;
@@ -127,7 +127,7 @@ lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv
lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit);
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /* LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_ */
#endif /*LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_*/

View File

@@ -62,7 +62,7 @@ static void wait_finish(void);
*/
void lv_gpu_stm32_dma2d_init(void)
{
/* Enable DMA2D clock */
/*Enable DMA2D clock*/
#if defined(STM32F4) || defined(STM32F7)
RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN;
#elif defined(STM32H7)
@@ -71,13 +71,13 @@ void lv_gpu_stm32_dma2d_init(void)
# warning "LVGL can't enable the clock of DMA2D"
#endif
/* Wait for hardware access to complete */
/*Wait for hardware access to complete*/
__asm volatile("DSB\n");
/* Delay after setting peripheral clock */
/*Delay after setting peripheral clock*/
volatile uint32_t temp = RCC->AHB1ENR;
/* set output colour mode */
/*set output colour mode*/
DMA2D->OPFCCR = LV_DMA2D_COLOR_FORMAT;
}
@@ -96,12 +96,12 @@ void lv_gpu_stm32_dma2d_fill(lv_color_t * buf, lv_coord_t buf_w, lv_color_t colo
DMA2D->CR = 0x30000;
DMA2D->OMAR = (uint32_t)buf;
/* as input color mode is same as output we don't need to convert here do we? */
/*as input color mode is same as output we don't need to convert here do we?*/
DMA2D->OCOLR = color.full;
DMA2D->OOR = buf_w - fill_w;
DMA2D->NLR = (fill_w << DMA2D_NLR_PL_Pos) | (fill_h << DMA2D_NLR_NL_Pos);
/* start transfer */
/*start transfer*/
DMA2D->CR |= DMA2D_CR_START_Msk;
wait_finish();
@@ -124,12 +124,12 @@ void lv_gpu_stm32_dma2d_fill_mask(lv_color_t * buf, lv_coord_t buf_w, lv_color_t
#if 0
invalidate_cache();
/* Configure the DMA2D Mode, Color Mode and line output offset */
/*Configure the DMA2D Mode, Color Mode and line output offset*/
hdma2d.Init.Mode = DMA2D_M2M_BLEND;
hdma2d.Init.ColorMode = DMA2D_OUTPUT_FORMAT;
hdma2d.Init.OutputOffset = buf_w - fill_w;
/* Configure the foreground -> The character */
/*Configure the foreground -> The character*/
lv_color32_t c32;
c32.full = lv_color_to32(color);
c32.ch.alpha = opa;
@@ -138,13 +138,13 @@ void lv_gpu_stm32_dma2d_fill_mask(lv_color_t * buf, lv_coord_t buf_w, lv_color_t
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_A8;
hdma2d.LayerCfg[1].InputOffset = 0;
/* Configure the background -> Display buffer */
/*Configure the background -> Display buffer*/
hdma2d.LayerCfg[0].AlphaMode = DMA2D_NO_MODIF_ALPHA;
hdma2d.LayerCfg[0].InputAlpha = 0x00;
hdma2d.LayerCfg[0].InputColorMode = DMA2D_INPUT_FORMAT;
hdma2d.LayerCfg[0].InputOffset = buf_w - fill_w;
/* DMA2D Initialization */
/*DMA2D Initialization*/
HAL_DMA2D_Init(&hdma2d);
HAL_DMA2D_ConfigLayer(&hdma2d, 0);
HAL_DMA2D_ConfigLayer(&hdma2d, 1);
@@ -169,7 +169,7 @@ void lv_gpu_stm32_dma2d_copy(lv_color_t * buf, lv_coord_t buf_w, const lv_color_
invalidate_cache();
DMA2D->CR = 0;
/* copy output colour mode, this register controls both input and output colour format */
/*copy output colour mode, this register controls both input and output colour format*/
DMA2D->FGPFCCR = LV_DMA2D_COLOR_FORMAT;
DMA2D->FGMAR = (uint32_t)map;
DMA2D->FGOR = map_w - copy_w;
@@ -177,7 +177,7 @@ void lv_gpu_stm32_dma2d_copy(lv_color_t * buf, lv_coord_t buf_w, const lv_color_
DMA2D->OOR = buf_w - copy_w;
DMA2D->NLR = (copy_w << DMA2D_NLR_PL_Pos) | (copy_h << DMA2D_NLR_NL_Pos);
/* start transfer */
/*start transfer*/
DMA2D->CR |= DMA2D_CR_START_Msk;
wait_finish();
}
@@ -204,9 +204,9 @@ void lv_gpu_stm32_dma2d_blend(lv_color_t * buf, lv_coord_t buf_w, const lv_color
DMA2D->BGOR = buf_w - copy_w;
DMA2D->FGPFCCR = (uint32_t)LV_DMA2D_COLOR_FORMAT
/* alpha mode 2, replace with foreground * alpha value */
/*alpha mode 2, replace with foreground * alpha value*/
| (2 << DMA2D_FGPFCCR_AM_Pos)
/* alpha value */
/*alpha value*/
| (opa << DMA2D_FGPFCCR_ALPHA_Pos);
DMA2D->FGMAR = (uint32_t)map;
DMA2D->FGOR = map_w - copy_w;
@@ -215,7 +215,7 @@ void lv_gpu_stm32_dma2d_blend(lv_color_t * buf, lv_coord_t buf_w, const lv_color
DMA2D->OOR = buf_w - copy_w;
DMA2D->NLR = (copy_w << DMA2D_NLR_PL_Pos) | (copy_h << DMA2D_NLR_NL_Pos);
/* start transfer */
/*start transfer*/
DMA2D->CR |= DMA2D_CR_START_Msk;
wait_finish();
}

View File

@@ -103,7 +103,7 @@ void lv_gpu_stm32_dma2d_wait_cb(lv_disp_drv_t * drv);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_GPU_STM32_DMA2D_H*/

View File

@@ -34,7 +34,7 @@ extern "C" {
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif

View File

@@ -195,7 +195,7 @@ void lv_disp_remove(lv_disp_t * disp)
bool was_default = false;
if(disp == lv_disp_get_default()) was_default = true;
/*Detach the input devices */
/*Detach the input devices*/
lv_indev_t * indev;
indev = lv_indev_get_next(NULL);
while(indev) {

View File

@@ -27,7 +27,7 @@ extern "C" {
* DEFINES
*********************/
#ifndef LV_INV_BUF_SIZE
#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas */
#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas*/
#endif
#ifndef LV_ATTRIBUTE_FLUSH_READY
@@ -47,8 +47,8 @@ struct _lv_theme_t;
* Structure for holding display buffer information.
*/
typedef struct {
void * buf1; /**< First display buffer. */
void * buf2; /**< Second display buffer. */
void * buf1; /**< First display buffer.*/
void * buf2; /**< Second display buffer.*/
/*Internal, used by the library*/
void * buf_act;
@@ -77,15 +77,15 @@ typedef enum {
*/
typedef struct _lv_disp_drv_t {
lv_coord_t hor_res; /**< Horizontal resolution. */
lv_coord_t ver_res; /**< Vertical resolution. */
lv_coord_t hor_res; /**< Horizontal resolution.*/
lv_coord_t ver_res; /**< Vertical resolution.*/
/** Pointer to a buffer initialized with `lv_disp_draw_buf_init()`.
* LVGL will use this buffer(s) to draw the screens contents */
* LVGL will use this buffer(s) to draw the screens contents*/
lv_disp_draw_buf_t * draw_buf;
uint32_t sw_rotate : 1; /**< 1: use software rotation (slower) */
uint32_t antialiasing : 1; /**< 1: anti-aliasing is enabled on this display. */
uint32_t sw_rotate : 1; /**< 1: use software rotation (slower)*/
uint32_t antialiasing : 1; /**< 1: anti-aliasing is enabled on this display.*/
uint32_t rotated : 2; /**< 1: turn the display by 90 degree. @warning Does not update coordinates for you!*/
/**Handle if the screen doesn't have a solid (opa == LV_OPA_COVER) background.
@@ -98,7 +98,7 @@ typedef struct _lv_disp_drv_t {
uint32_t dpi : 10;
/** MANDATORY: Write the internal buffer (draw_buf) to the display. 'lv_disp_flush_ready()' has to be
* called when finished */
* called when finished*/
void (*flush_cb)(struct _lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
/** OPTIONAL: Extend the invalidated areas to match with the display drivers requirements
@@ -107,23 +107,23 @@ typedef struct _lv_disp_drv_t {
/** OPTIONAL: Set a pixel in a buffer according to the special requirements of the display
* Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales
* @note Much slower then drawing with supported color formats. */
* @note Much slower then drawing with supported color formats.*/
void (*set_px_cb)(struct _lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
lv_color_t color, lv_opa_t opa);
/** OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the
* number of flushed pixels */
* number of flushed pixels*/
void (*monitor_cb)(struct _lv_disp_drv_t * disp_drv, uint32_t time, uint32_t px);
/** OPTIONAL: Called periodically while lvgl waits for operation to be completed.
* For example flushing or GPU
* User can execute very simple tasks here or yield the task */
* User can execute very simple tasks here or yield the task*/
void (*wait_cb)(struct _lv_disp_drv_t * disp_drv);
/** OPTIONAL: Called when lvgl needs any CPU cache that affects rendering to be cleaned */
/** OPTIONAL: Called when lvgl needs any CPU cache that affects rendering to be cleaned*/
void (*clean_dcache_cb)(struct _lv_disp_drv_t * disp_drv);
/** OPTIONAL: called to wait while the gpu is working */
/** OPTIONAL: called to wait while the gpu is working*/
void (*gpu_wait_cb)(struct _lv_disp_drv_t * disp_drv);
/** OPTIONAL: called when driver parameters are updated */
@@ -138,7 +138,7 @@ typedef struct _lv_disp_drv_t {
lv_color_t color_chroma_key;
#if LV_USE_USER_DATA
void * user_data; /**< Custom display driver user data */
void * user_data; /**< Custom display driver user data*/
#endif
} lv_disp_drv_t;
@@ -158,16 +158,16 @@ typedef struct _lv_disp_t {
struct _lv_theme_t * theme;
/** Screens of the display*/
struct _lv_obj_t ** screens; /**< Array of screen objects. */
struct _lv_obj_t * act_scr; /**< Currently active screen on this display */
struct _lv_obj_t * prev_scr; /**< Previous screen. Used during screen animations */
struct _lv_obj_t ** screens; /**< Array of screen objects.*/
struct _lv_obj_t * act_scr; /**< Currently active screen on this display*/
struct _lv_obj_t * prev_scr; /**< Previous screen. Used during screen animations*/
struct _lv_obj_t * scr_to_load; /**< The screen prepared to load in lv_scr_load_anim*/
struct _lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top */
struct _lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys */
struct _lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top*/
struct _lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys*/
uint32_t screen_cnt;
uint8_t del_prev : 1; /**< 1: Automatically delete the previous screen when the screen load animation is ready */
uint8_t del_prev : 1; /**< 1: Automatically delete the previous screen when the screen load animation is ready*/
lv_opa_t bg_opa; /**<Opacity of the background color or wallpaper */
lv_opa_t bg_opa; /**<Opacity of the background color or wallpaper*/
lv_color_t bg_color; /**< Default display color when screens are transparent*/
const void * bg_img; /**< An image source to display as wallpaper*/
@@ -177,7 +177,7 @@ typedef struct _lv_disp_t {
uint16_t inv_p;
/*Miscellaneous data*/
uint32_t last_activity_time; /**< Last time when there was activity on this display */
uint32_t last_activity_time; /**< Last time when there was activity on this display*/
} lv_disp_t;
/**********************
@@ -349,7 +349,7 @@ bool lv_disp_is_true_double_buf(lv_disp_t * disp);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif

View File

@@ -135,8 +135,8 @@ bool _lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
lv_memset_00(data, sizeof(lv_indev_data_t));
/* For touchpad sometimes users don't set the last pressed coordinate on release.
* So be sure a coordinates are initialized to the last point */
/*For touchpad sometimes users don't set the last pressed coordinate on release.
*So be sure a coordinates are initialized to the last point*/
if(indev->driver->type == LV_INDEV_TYPE_POINTER) {
data->point.x = indev->proc.types.pointer.act_point.x;
data->point.y = indev->proc.types.pointer.act_point.y;
@@ -145,7 +145,7 @@ bool _lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
else if(indev->driver->type == LV_INDEV_TYPE_KEYPAD) {
data->key = indev->proc.types.keypad.last_key;
}
/*For compatibility assume that used button was enter (encoder push) */
/*For compatibility assume that used button was enter (encoder push)*/
else if(indev->driver->type == LV_INDEV_TYPE_ENCODER) {
data->key = LV_KEY_ENTER;
}

View File

@@ -26,25 +26,25 @@ extern "C" {
* DEFINES
*********************/
/* Drag threshold in pixels */
/*Drag threshold in pixels*/
#define LV_INDEV_DEF_SCROLL_LIMIT 10
/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
/*Drag throw slow-down in [%]. Greater value -> faster slow-down*/
#define LV_INDEV_DEF_SCROLL_THROW 10
/* Long press time in milliseconds.
* Time to send `LV_EVENT_LONG_PRESSSED`) */
/*Long press time in milliseconds.
*Time to send `LV_EVENT_LONG_PRESSSED`)*/
#define LV_INDEV_DEF_LONG_PRESS_TIME 400
/* Repeated trigger period in long press [ms]
* Time between `LV_EVENT_LONG_PRESSED_REPEAT */
/*Repeated trigger period in long press [ms]
*Time between `LV_EVENT_LONG_PRESSED_REPEAT*/
#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
/* Gesture threshold in pixels */
/*Gesture threshold in pixels*/
#define LV_INDEV_DEF_GESTURE_LIMIT 50
/* Gesture min velocity at release before swipe (pixels)*/
/*Gesture min velocity at release before swipe (pixels)*/
#define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3
@@ -81,14 +81,14 @@ enum {
typedef uint8_t lv_indev_scroll_dir_t;
enum {
LV_GESTURE_DIR_TOP, /**< Gesture dir up. */
LV_GESTURE_DIR_BOTTOM, /**< Gesture dir down. */
LV_GESTURE_DIR_LEFT, /**< Gesture dir left. */
LV_GESTURE_DIR_RIGHT, /**< Gesture dir right. */
LV_GESTURE_DIR_TOP, /**< Gesture dir up.*/
LV_GESTURE_DIR_BOTTOM, /**< Gesture dir down.*/
LV_GESTURE_DIR_LEFT, /**< Gesture dir left.*/
LV_GESTURE_DIR_RIGHT, /**< Gesture dir right.*/
};
typedef uint8_t lv_gesture_dir_t;
/** Data structure passed to an input driver to fill */
/** Data structure passed to an input driver to fill*/
typedef struct {
lv_point_t point; /**< For LV_INDEV_TYPE_POINTER the currently pressed point*/
uint32_t key; /**< For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
@@ -106,7 +106,7 @@ typedef struct _lv_indev_drv_t {
/**< Function pointer to read input device data.
* Return 'true' if there is more data to be read (buffered).
* Most drivers can safely return 'false' */
* Most drivers can safely return 'false'*/
bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
/** Called when an action happened on the input device.
@@ -126,19 +126,19 @@ typedef struct _lv_indev_drv_t {
/**< Number of pixels to slide before actually drag the object*/
uint8_t scroll_limit;
/**< Drag throw slow-down in [%]. Greater value means faster slow-down */
/**< Drag throw slow-down in [%]. Greater value means faster slow-down*/
uint8_t scroll_throw;
/**< At least this difference should between two points to evaluate as gesture */
/**< At least this difference should between two points to evaluate as gesture*/
uint8_t gesture_min_velocity;
/**< At least this difference should be to send a gesture */
/**< At least this difference should be to send a gesture*/
uint8_t gesture_limit;
/**< Long press time in milliseconds*/
uint16_t long_press_time;
/**< Repeated trigger period in long press [ms] */
/**< Repeated trigger period in long press [ms]*/
uint16_t long_press_rep_time;
} lv_indev_drv_t;
@@ -146,7 +146,7 @@ typedef struct _lv_indev_drv_t {
* Internally used by the library, you should not need to touch it.
*/
typedef struct _lv_indev_proc_t {
lv_indev_state_t state; /**< Current state of the input device. */
lv_indev_state_t state; /**< Current state of the input device.*/
/*Flags*/
uint8_t long_pr_sent : 1;
uint8_t reset_query : 1;
@@ -156,9 +156,9 @@ typedef struct _lv_indev_proc_t {
union {
struct {
/*Pointer and button data*/
lv_point_t act_point; /**< Current point of input device. */
lv_point_t last_point; /**< Last point of input device. */
lv_point_t vect; /**< Difference between `act_point` and `last_point`. */
lv_point_t act_point; /**< Current point of input device.*/
lv_point_t last_point; /**< Last point of input device.*/
lv_point_t vect; /**< Difference between `act_point` and `last_point`.*/
lv_point_t scroll_sum; /*Count the dragged pixels to check LV_INDEV_DEF_SCROLL_LIMIT*/
lv_point_t scroll_throw_vect;
lv_point_t scroll_throw_vect_ori;
@@ -243,7 +243,7 @@ bool _lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif

View File

@@ -57,16 +57,16 @@ uint32_t lv_tick_get(void)
{
#if LV_TICK_CUSTOM == 0
/* If `lv_tick_inc` is called from an interrupt while `sys_time` is read
* the result might be corrupted.
* This loop detects if `lv_tick_inc` was called while reading `sys_time`.
* If `tick_irq_flag` was cleared in `lv_tick_inc` try to read again
* until `tick_irq_flag` remains `1`. */
/*If `lv_tick_inc` is called from an interrupt while `sys_time` is read
*the result might be corrupted.
*This loop detects if `lv_tick_inc` was called while reading `sys_time`.
*If `tick_irq_flag` was cleared in `lv_tick_inc` try to read again
*until `tick_irq_flag` remains `1`.*/
uint32_t result;
do {
tick_irq_flag = 1;
result = sys_time;
} while(!tick_irq_flag); /*Continue until see a non interrupted cycle */
} while(!tick_irq_flag); /*Continue until see a non interrupted cycle*/
return result;
#else

View File

@@ -61,7 +61,7 @@ uint32_t lv_tick_elaps(uint32_t prev_tick);
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_HAL_TICK_H*/

View File

@@ -41,7 +41,7 @@ static inline LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_task_handler(void)
**********************/
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_API_MAP_H*/

View File

@@ -6,18 +6,18 @@
#ifndef LV_CONF_INTERNAL_H
#define LV_CONF_INTERNAL_H
/* clang-format off */
/*clang-format off */
#include <stdint.h>
/* Handle special Kconfig options */
/*Handle special Kconfig options */
#include "lv_conf_kconfig.h"
#ifdef CONFIG_LV_CONF_SKIP
#define LV_CONF_SKIP
#endif
/* If "lv_conf.h" is available from here try to use it later.*/
/*If "lv_conf.h" is available from here try to use it later.*/
#if defined __has_include
# if __has_include("lv_conf.h")
# ifndef LV_CONF_INCLUDE_SIMPLE
@@ -41,7 +41,7 @@
# endif
#endif
/* clang-format off */
/*clang-format off */
#include <stdint.h>
@@ -50,7 +50,7 @@
COLOR SETTINGS
*====================*/
/* Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888) */
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888) */
#ifndef LV_COLOR_DEPTH
# ifdef CONFIG_LV_COLOR_DEPTH
# define LV_COLOR_DEPTH CONFIG_LV_COLOR_DEPTH
@@ -59,7 +59,7 @@
# endif
#endif
/* Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/
/*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/
#ifndef LV_COLOR_16_SWAP
# ifdef CONFIG_LV_COLOR_16_SWAP
# define LV_COLOR_16_SWAP CONFIG_LV_COLOR_16_SWAP
@@ -92,7 +92,7 @@
MEMORY SETTINGS
*=========================*/
/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()` */
/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()` */
#ifndef LV_MEM_CUSTOM
# ifdef CONFIG_LV_MEM_CUSTOM
# define LV_MEM_CUSTOM CONFIG_LV_MEM_CUSTOM
@@ -101,16 +101,16 @@
# endif
#endif
#if LV_MEM_CUSTOM == 0
/* Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
#ifndef LV_MEM_SIZE
# ifdef CONFIG_LV_MEM_SIZE
# define LV_MEM_SIZE CONFIG_LV_MEM_SIZE
# else
# define LV_MEM_SIZE (32U * 1024U) /* [bytes] */
# define LV_MEM_SIZE (32U * 1024U) /*[bytes] */
# endif
#endif
/* Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too. */
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too. */
#ifndef LV_MEM_ADR
# ifdef CONFIG_LV_MEM_ADR
# define LV_MEM_ADR CONFIG_LV_MEM_ADR
@@ -149,7 +149,7 @@
#endif
#endif /*LV_MEM_CUSTOM*/
/* Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster). */
/*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster). */
#ifndef LV_MEMCPY_MEMSET_STD
# ifdef CONFIG_LV_MEMCPY_MEMSET_STD
# define LV_MEMCPY_MEMSET_STD CONFIG_LV_MEMCPY_MEMSET_STD
@@ -162,7 +162,7 @@
HAL SETTINGS
*====================*/
/* Default display refresh period. LVG will redraw changed ares with this period time */
/*Default display refresh period. LVG will redraw changed ares with this period time */
#ifndef LV_DISP_DEF_REFR_PERIOD
# ifdef CONFIG_LV_DISP_DEF_REFR_PERIOD
# define LV_DISP_DEF_REFR_PERIOD CONFIG_LV_DISP_DEF_REFR_PERIOD
@@ -171,7 +171,7 @@
# endif
#endif
/* Input device read period in milliseconds */
/*Input device read period in milliseconds */
#ifndef LV_INDEV_DEF_READ_PERIOD
# ifdef CONFIG_LV_INDEV_DEF_READ_PERIOD
# define LV_INDEV_DEF_READ_PERIOD CONFIG_LV_INDEV_DEF_READ_PERIOD
@@ -260,7 +260,7 @@
# endif
#endif
/* Maximum buffer size to allocate for rotation. Only used if software rotation is enabled in the display driver. */
/*Maximum buffer size to allocate for rotation. Only used if software rotation is enabled in the display driver. */
#ifndef LV_DISP_ROT_MAX_BUF
# ifdef CONFIG_LV_DISP_ROT_MAX_BUF
# define LV_DISP_ROT_MAX_BUF CONFIG_LV_DISP_ROT_MAX_BUF
@@ -292,7 +292,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
#endif
#endif
/* Use NXP's PXP GPU iMX RTxxx platforms */
/*Use NXP's PXP GPU iMX RTxxx platforms */
#ifndef LV_USE_GPU_NXP_PXP
# ifdef CONFIG_LV_USE_GPU_NXP_PXP
# define LV_USE_GPU_NXP_PXP CONFIG_LV_USE_GPU_NXP_PXP
@@ -305,7 +305,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
* */
*/
#ifndef LV_USE_GPU_NXP_PXP_AUTO_INIT
# ifdef CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT
# define LV_USE_GPU_NXP_PXP_AUTO_INIT CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT
@@ -315,7 +315,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
#endif
#endif
/* Use NXP's VG-Lite GPU iMX RTxxx platforms */
/*Use NXP's VG-Lite GPU iMX RTxxx platforms */
#ifndef LV_USE_GPU_NXP_VG_LITE
# ifdef CONFIG_LV_USE_GPU_NXP_VG_LITE
# define LV_USE_GPU_NXP_VG_LITE CONFIG_LV_USE_GPU_NXP_VG_LITE
@@ -578,13 +578,13 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
# endif
#endif
#endif /* LV_ENABLE_GC */
#endif /*LV_ENABLE_GC */
/*=====================
* COMPILER SETTINGS
*====================*/
/* For big endian systems set to 1 */
/*For big endian systems set to 1 */
#ifndef LV_BIG_ENDIAN_SYSTEM
# ifdef CONFIG_LV_BIG_ENDIAN_SYSTEM
# define LV_BIG_ENDIAN_SYSTEM CONFIG_LV_BIG_ENDIAN_SYSTEM
@@ -593,7 +593,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Define a custom attribute to `lv_tick_inc` function */
/*Define a custom attribute to `lv_tick_inc` function */
#ifndef LV_ATTRIBUTE_TICK_INC
# ifdef CONFIG_LV_ATTRIBUTE_TICK_INC
# define LV_ATTRIBUTE_TICK_INC CONFIG_LV_ATTRIBUTE_TICK_INC
@@ -602,7 +602,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Define a custom attribute to `lv_timer_handler` function */
/*Define a custom attribute to `lv_timer_handler` function */
#ifndef LV_ATTRIBUTE_TIMER_HANDLER
# ifdef CONFIG_LV_ATTRIBUTE_TIMER_HANDLER
# define LV_ATTRIBUTE_TIMER_HANDLER CONFIG_LV_ATTRIBUTE_TIMER_HANDLER
@@ -611,7 +611,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Define a custom attribute to `lv_disp_flush_ready` function */
/*Define a custom attribute to `lv_disp_flush_ready` function */
#ifndef LV_ATTRIBUTE_FLUSH_READY
# ifdef CONFIG_LV_ATTRIBUTE_FLUSH_READY
# define LV_ATTRIBUTE_FLUSH_READY CONFIG_LV_ATTRIBUTE_FLUSH_READY
@@ -620,7 +620,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Required alignment size for buffers */
/*Required alignment size for buffers */
#ifndef LV_ATTRIBUTE_MEM_ALIGN_SIZE
# ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
# define LV_ATTRIBUTE_MEM_ALIGN_SIZE CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
@@ -639,7 +639,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Attribute to mark large constant arrays for example font's bitmaps */
/*Attribute to mark large constant arrays for example font's bitmaps */
#ifndef LV_ATTRIBUTE_LARGE_CONST
# ifdef CONFIG_LV_ATTRIBUTE_LARGE_CONST
# define LV_ATTRIBUTE_LARGE_CONST CONFIG_LV_ATTRIBUTE_LARGE_CONST
@@ -648,7 +648,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Complier prefix for a big array declaration in RAM*/
/*Complier prefix for a big array declaration in RAM*/
#ifndef LV_ATTRIBUTE_LARGE_RAM_ARRAY
# ifdef CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
# define LV_ATTRIBUTE_LARGE_RAM_ARRAY CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
@@ -657,7 +657,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Place performance critical functions into a faster memory (e.g RAM) */
/*Place performance critical functions into a faster memory (e.g RAM) */
#ifndef LV_ATTRIBUTE_FAST_MEM
# ifdef CONFIG_LV_ATTRIBUTE_FAST_MEM
# define LV_ATTRIBUTE_FAST_MEM CONFIG_LV_ATTRIBUTE_FAST_MEM
@@ -666,7 +666,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible */
/*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible */
#ifndef LV_ATTRIBUTE_DMA
# ifdef CONFIG_LV_ATTRIBUTE_DMA
# define LV_ATTRIBUTE_DMA CONFIG_LV_ATTRIBUTE_DMA
@@ -848,7 +848,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Demonstrate special features */
/*Demonstrate special features */
#ifndef LV_FONT_MONTSERRAT_12_SUBPX
# ifdef CONFIG_LV_FONT_MONTSERRAT_12_SUBPX
# define LV_FONT_MONTSERRAT_12_SUBPX CONFIG_LV_FONT_MONTSERRAT_12_SUBPX
@@ -926,7 +926,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Enables/disables support for compressed fonts. */
/*Enables/disables support for compressed fonts. */
#ifndef LV_USE_FONT_COMPRESSED
# ifdef CONFIG_LV_USE_FONT_COMPRESSED
# define LV_USE_FONT_COMPRESSED CONFIG_LV_USE_FONT_COMPRESSED
@@ -935,7 +935,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* Enable subpixel rendering */
/*Enable subpixel rendering */
#ifndef LV_USE_FONT_SUBPX
# ifdef CONFIG_LV_USE_FONT_SUBPX
# define LV_USE_FONT_SUBPX CONFIG_LV_USE_FONT_SUBPX
@@ -944,7 +944,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
#if LV_USE_FONT_SUBPX
/* Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
/*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
#ifndef LV_FONT_SUBPX_BGR
# ifdef CONFIG_LV_FONT_SUBPX_BGR
# define LV_FONT_SUBPX_BGR CONFIG_LV_FONT_SUBPX_BGR
@@ -962,7 +962,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
* Your IDE or editor should have the same character encoding
* - LV_TXT_ENC_UTF8
* - LV_TXT_ENC_ASCII
* */
*/
#ifndef LV_TXT_ENC
# ifdef CONFIG_LV_TXT_ENC
# define LV_TXT_ENC CONFIG_LV_TXT_ENC
@@ -1010,7 +1010,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* The control character to use for signalling text recoloring. */
/*The control character to use for signalling text recoloring. */
#ifndef LV_TXT_COLOR_CMD
# ifdef CONFIG_LV_TXT_COLOR_CMD
# define LV_TXT_COLOR_CMD CONFIG_LV_TXT_COLOR_CMD
@@ -1057,7 +1057,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
* WIDGET USAGE
*================*/
/* Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html */
/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html */
#ifndef LV_USE_ARC
# ifdef CONFIG_LV_USE_ARC
@@ -1383,7 +1383,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
/*-----------
* Themes
*----------*/
/* A simple, impressive and very complete theme */
/*A simple, impressive and very complete theme */
#ifndef LV_USE_THEME_DEFAULT
# ifdef CONFIG_LV_USE_THEME_DEFAULT
# define LV_USE_THEME_DEFAULT CONFIG_LV_USE_THEME_DEFAULT
@@ -1393,7 +1393,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
#endif
#if LV_USE_THEME_DEFAULT
/* 1: Light mode; 0: Dark mode*/
/*1: Light mode; 0: Dark mode*/
#ifndef LV_THEME_DEFAULT_PALETTE_LIGHT
# ifdef CONFIG_LV_THEME_DEFAULT_PALETTE_LIGHT
# define LV_THEME_DEFAULT_PALETTE_LIGHT CONFIG_LV_THEME_DEFAULT_PALETTE_LIGHT
@@ -1402,7 +1402,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# endif
#endif
/* 1: Enable grow on press*/
/*1: Enable grow on press*/
#ifndef LV_THEME_DEFAULT_GROW
# ifdef CONFIG_LV_THEME_DEFAULT_GROW
# define LV_THEME_DEFAULT_GROW CONFIG_LV_THEME_DEFAULT_GROW
@@ -1462,7 +1462,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
typedef void * lv_obj_user_data_t;
# endif
# if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
# if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /*Disable warnings for Visual Studio*/
# define _CRT_SECURE_NO_WARNINGS
# endif

View File

@@ -83,7 +83,8 @@ extern "C" {
* FONT SELECTION
*******************/
/* NOTE: In Kconfig instead of `LV_THEME_DEFAULT_FONT_SMALL`
/**
* NOTE: In Kconfig instead of `LV_THEME_DEFAULT_FONT_SMALL`
* `CONFIG_LV_THEME_DEFAULT_FONT_SMALL_<font_name>` is defined
* hence the large selection with if-s
*/
@@ -414,7 +415,7 @@ extern "C" {
#endif
#ifdef __cplusplus
} /* extern "C" */
} /*extern "C"*/
#endif
#endif /*LV_CONF_KCONFIG_H*/

Some files were not shown because too many files have changed in this diff Show More