fix conflicts

This commit is contained in:
Gabor Kiss-Vamosi 2020-06-27 06:57:28 +02:00
commit 2d7423100a
6 changed files with 49 additions and 12 deletions

View File

@ -21,7 +21,6 @@ Available in the `dev` branch
## v7.1.0 (planned on 07.07.2020)
*Available in the `master` branch*
- Change some lv_style_t methods to support big endian hardware.
### New features
- Add `focus_parent` attribute to `lv_obj`
@ -31,10 +30,12 @@ Available in the `dev` branch
- Added `max_used` propriety to `lv_mem_monitor_t` struct
- In `lv_init` test if the the strings are UTF-8 encoded.
- Add `user_data` to themes
- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
### Bugfixes
- `lv_img` fix invalidation area when angle or zoom changes
- Update the style handling to support Big endian MCUs
- Change some methods to support big endian hardware.
## v7.0.2 (16.06.2020)

View File

@ -222,6 +222,10 @@ typedef void * lv_img_decoder_user_data_t;
/*=====================
* Compiler settings
*====================*/
/* For big endian systems set to 1 */
#define LV_BIG_ENDIAN_SYSTEM 0
/* Define a custom attribute to `lv_tick_inc` function */
#define LV_ATTRIBUTE_TICK_INC

View File

@ -266,6 +266,11 @@
#ifndef LV_USE_GPU_STM32_DMA2D
#define LV_USE_GPU_STM32_DMA2D 0
#endif
/*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor
e.g. "stm32f769xx.h" or "stm32f429xx.h" */
#ifndef LV_GPU_DMA2D_CMSIS_INCLUDE
#define LV_GPU_DMA2D_CMSIS_INCLUDE
#endif
/* 1: Enable file system (might be required for images */
#ifndef LV_USE_FILESYSTEM
@ -322,6 +327,12 @@
/*=====================
* Compiler settings
*====================*/
/* For big endian systems set to 1 */
#ifndef LV_BIG_ENDIAN_SYSTEM
#define LV_BIG_ENDIAN_SYSTEM 0
#endif
/* Define a custom attribute to `lv_tick_inc` function */
#ifndef LV_ATTRIBUTE_TICK_INC
#define LV_ATTRIBUTE_TICK_INC
@ -477,7 +488,7 @@
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
* The symbols are available via `LV_SYMBOL_...` defines
* More info about fonts: https://docs.lvgl.com/#Fonts
* More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
* To create a new font go to: https://lvgl.com/ttf-font-to-c-array
*/
@ -687,7 +698,7 @@
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
#endif
/* The control character to use for signaling text recoloring. */
/* The control character to use for signalling text recoloring. */
#ifndef LV_TXT_COLOR_CMD
#define LV_TXT_COLOR_CMD "#"
#endif

View File

@ -3244,8 +3244,9 @@ void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint8_t part, lv_draw_img_dsc_t *
draw_dsc->pivot.y = lv_area_get_height(&obj->coords) / 2;
draw_dsc->recolor_opa = lv_obj_get_style_image_recolor_opa(obj, part);
draw_dsc->recolor = lv_obj_get_style_image_recolor(obj, part);
if(draw_dsc->recolor_opa > 0) {
draw_dsc->recolor = lv_obj_get_style_image_recolor(obj, part);
}
#if LV_USE_BLEND_MODES
draw_dsc->blend_mode = lv_obj_get_style_image_blend_mode(obj, part);
#endif
@ -4244,4 +4245,3 @@ static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_fin
return false;
}

View File

@ -102,10 +102,26 @@ typedef uint8_t lv_img_cf_t;
/**
* LVGL image header
*/
/* 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 {
uint32_t h : 11; /*Height of the image map*/
uint32_t w : 11; /*Width of the image map*/
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`*/
} lv_img_header_t;
#else
typedef struct {
/* 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 */
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*/
@ -115,7 +131,7 @@ typedef struct {
uint32_t w : 11; /*Width of the image map*/
uint32_t h : 11; /*Height of the image map*/
} lv_img_header_t;
#endif
/** Image header it is compatible with
* the result from image converter utility*/

View File

@ -29,7 +29,7 @@
* STATIC VARIABLES
**********************/
static uint32_t sys_time = 0;
static volatile uint8_t tick_irq_flag;
static volatile uint32_t tick_irq_flag;
/**********************
* MACROS
@ -56,12 +56,17 @@ LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period)
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`. */
uint32_t result;
do {
tick_irq_flag = 1;
result = sys_time;
} while(!tick_irq_flag); /*'lv_tick_inc()' clears this flag which can be in an interrupt.
Continue until make a non interrupted cycle */
} while(!tick_irq_flag); /*Continue until see a non interrupted cycle */
return result;
#else