mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-09 20:27:41 +08:00
feat(NemaGFX): Add nema libs for cortex M7 and M55 (#9374)
This commit is contained in:
@@ -82,18 +82,16 @@ def generate_config(path_destination: str, path_source: str, defaults: dict):
|
||||
dst_lines = []
|
||||
|
||||
for src_line in src_lines:
|
||||
res = re.search(r'#define\s+([A-Z0-9_]+)\s+(.+)', src_line)
|
||||
res = re.search(r'#define\s+([A-Z0-9_]+)', src_line)
|
||||
key = res.groups()[0] if res else None
|
||||
|
||||
if key in defaults.keys():
|
||||
value = defaults[key]
|
||||
pattern = r'(#define\s+[A-Z0-9_]+\s+)(.+)'
|
||||
repl = r'\g<1>' + value
|
||||
pattern = r'(#define\s+[A-Z0-9_]+[^\S\r\n]*)[^\n]*'
|
||||
has_space = re.search(pattern, src_line).groups()[0][-1].isspace()
|
||||
repl = r'\g<1>' + value if has_space else r'\g<1> ' + value
|
||||
dst_line, _ = re.subn(pattern, repl, src_line)
|
||||
|
||||
if not dst_line:
|
||||
fatal(f"Failed to apply key '{key}' to line '{src_line}'")
|
||||
|
||||
print(f"Applying: {key} = {value}")
|
||||
keys_used.add(key)
|
||||
elif 'Set this to "1" to enable content' in src_line:
|
||||
|
||||
@@ -69,6 +69,12 @@ fout.write(
|
||||
#define LV_DRAW_SW_ASM_RISCV_V 3
|
||||
#define LV_DRAW_SW_ASM_CUSTOM 255
|
||||
|
||||
#define LV_NEMA_LIB_NONE 0
|
||||
#define LV_NEMA_LIB_M33_REVC 1
|
||||
#define LV_NEMA_LIB_M33_NEMAPVG 2
|
||||
#define LV_NEMA_LIB_M55 3
|
||||
#define LV_NEMA_LIB_M7 4
|
||||
|
||||
#define LV_NEMA_HAL_CUSTOM 0
|
||||
#define LV_NEMA_HAL_STM32 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user