1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Rename attribute define to match existing options style

Moved static array declaration to top of file
Added attribute define to template and checker headers
This commit is contained in:
andrew 2020-06-08 08:40:50 +01:00
parent bb5c6437ff
commit 0867f72cb9
3 changed files with 14 additions and 3 deletions

View File

@ -249,6 +249,10 @@ typedef void * lv_img_decoder_user_data_t;
*/
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
/* Prefix variables that are used in GPU accelerated operations, often these need to be
* placed in RAM sections that are DMA accessible */
#define LV_ATTRIBUTE_DMA
/*===================
* HAL settings
*==================*/

View File

@ -363,6 +363,12 @@
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
#endif
/* 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
#define LV_ATTRIBUTE_DMA
#endif
/*===================
* HAL settings
*==================*/

View File

@ -60,6 +60,10 @@ static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_co
* STATIC VARIABLES
**********************/
#if LV_USE_GPU || LV_USE_GPU_STM32_DMA2D
LV_ATTRIBUTE_DMA static lv_color_t blend_buf[LV_HOR_RES_MAX];
#endif
/**********************
* MACROS
**********************/
@ -338,7 +342,6 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co
else {
#if LV_USE_GPU
if(disp->driver.gpu_blend_cb && lv_area_get_size(draw_area) > GPU_SIZE_LIMIT) {
LV_DMA_ATTR static lv_color_t blend_buf[LV_HOR_RES_MAX];
for(x = 0; x < draw_area_w ; x++) blend_buf[x].full = color.full;
for(y = draw_area->y1; y <= draw_area->y2; y++) {
@ -352,8 +355,6 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(const lv_area_t * disp_area, lv_co
#if LV_USE_GPU_STM32_DMA2D
if(lv_area_get_size(draw_area) >= 240) {
/* blend_buf MUST be in DMA accessible RAM (depending on linker this isn't always the case - CCMRAM) */
LV_DMA_ATTR static lv_color_t blend_buf[LV_HOR_RES_MAX] = {0};
if(blend_buf[0].full != color.full) lv_color_fill(blend_buf, color, LV_HOR_RES_MAX);
lv_coord_t line_h = LV_HOR_RES_MAX / draw_area_w;