fix(script): add per image attribute for C array
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
@@ -606,7 +606,7 @@ class LVGLImage:
|
|||||||
flags += " | LV_IMAGE_FLAGS_COMPRESSED"
|
flags += " | LV_IMAGE_FLAGS_COMPRESSED"
|
||||||
|
|
||||||
compressed = LVGLCompressData(self.cf, compress, self.data)
|
compressed = LVGLCompressData(self.cf, compress, self.data)
|
||||||
|
macro = "LV_ATTRIBUTE_" + varname.upper()
|
||||||
header = f'''
|
header = f'''
|
||||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
@@ -621,12 +621,12 @@ class LVGLImage:
|
|||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_DUST
|
#ifndef {macro}
|
||||||
#define LV_ATTRIBUTE_IMG_DUST
|
#define {macro}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const
|
static const
|
||||||
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_DUST
|
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST {macro}
|
||||||
uint8_t {varname}_map[] = {{
|
uint8_t {varname}_map[] = {{
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user