summaryrefslogtreecommitdiff
path: root/src/libs/lvgl/scripts/lv_conf_checker.py
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-01-28 17:07:28 +0000
committerJoaquim <joaquim.org@gmail.com>2021-01-28 17:07:28 +0000
commitefa99da44d52235bfbf40120f9c1faeb42ce36a7 (patch)
treebb2b9d04c53731efbc33eeedabcd019b5a5b5254 /src/libs/lvgl/scripts/lv_conf_checker.py
parent80838d1e42e83b50188d6237d16c81cfa27781a6 (diff)
LVGL V7 Upgrade
Diffstat (limited to 'src/libs/lvgl/scripts/lv_conf_checker.py')
-rwxr-xr-xsrc/libs/lvgl/scripts/lv_conf_checker.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/libs/lvgl/scripts/lv_conf_checker.py b/src/libs/lvgl/scripts/lv_conf_checker.py
deleted file mode 100755
index c2171ff8..00000000
--- a/src/libs/lvgl/scripts/lv_conf_checker.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python3.6
-
-'''
-Generates a checker file for lv_conf.h from lv_conf_templ.h define all the not defined values
-'''
-
-
-import re
-
-fin = open("../lv_conf_template.h", "r")
-fout = open("../src/lv_conf_checker.h", "w")
-
-
-fout.write(
-'''/**
- * GENERATED FILE, DO NOT EDIT IT!
- * @file lv_conf_checker.h
- * Make sure all the defines of lv_conf.h have a default value
-**/
-
-#ifndef LV_CONF_CHECKER_H
-#define LV_CONF_CHECKER_H
-'''
-)
-
-started = 0
-
-for i in fin.read().splitlines():
- if not started:
- if '#define LV_CONF_H' in i:
- started = 1
- continue
- else:
- continue
-
- if '/*--END OF LV_CONF_H--*/' in i: break
-
- r = re.search(r'^ *# *define ([^\s]+).*$', i)
-
- if r:
- line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
- fout.write(
- f'#ifndef {line}\n'
- f'{i}\n'
- '#endif\n'
- )
- elif re.search('^ *typedef .*;.*$', i):
- continue #ignore typedefs to avoide redeclaration
- else:
- fout.write(f'{i}\n')
-
-
-fout.write(
-'''
-#endif /*LV_CONF_CHECKER_H*/
-'''
-)
-
-fin.close()
-fout.close()