add LittlevGL demo
add LittlevGL demo on stm32f746 discovery board
This commit is contained in:
2455
components/gui/LittlevGL/3rdparty/lvgl/scripts/Doxyfile
vendored
Normal file
2455
components/gui/LittlevGL/3rdparty/lvgl/scripts/Doxyfile
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
components/gui/LittlevGL/3rdparty/lvgl/scripts/built_in_font/FontAwesome.ttf
vendored
Normal file
BIN
components/gui/LittlevGL/3rdparty/lvgl/scripts/built_in_font/FontAwesome.ttf
vendored
Normal file
Binary file not shown.
BIN
components/gui/LittlevGL/3rdparty/lvgl/scripts/built_in_font/Roboto-Regular.woff
vendored
Normal file
BIN
components/gui/LittlevGL/3rdparty/lvgl/scripts/built_in_font/Roboto-Regular.woff
vendored
Normal file
Binary file not shown.
47
components/gui/LittlevGL/3rdparty/lvgl/scripts/built_in_font/built_in_font_gen.py
vendored
Normal file
47
components/gui/LittlevGL/3rdparty/lvgl/scripts/built_in_font/built_in_font_gen.py
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import argparse
|
||||
from argparse import RawTextHelpFormatter
|
||||
import os
|
||||
import sys
|
||||
|
||||
parser = argparse.ArgumentParser(description="""Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv
|
||||
Example: python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4 -r 0x20-0x7F""", formatter_class=RawTextHelpFormatter)
|
||||
parser.add_argument('-s', '--size',
|
||||
type=int,
|
||||
metavar = 'px',
|
||||
nargs='?',
|
||||
help='Size of the font in px')
|
||||
parser.add_argument('--bpp',
|
||||
type=int,
|
||||
metavar = '1,2,4',
|
||||
nargs='?',
|
||||
help='Bit per pixel')
|
||||
parser.add_argument('-r', '--range',
|
||||
nargs='+',
|
||||
metavar = 'start-end',
|
||||
default='0x20-0x7F',
|
||||
help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F, 0x200, 324')
|
||||
parser.add_argument('--font',
|
||||
metavar = 'file',
|
||||
nargs='?',
|
||||
default='Roboto-Regular.woff',
|
||||
help='A TTF or WOFF file')
|
||||
parser.add_argument('-o', '--output',
|
||||
nargs='?',
|
||||
metavar='file',
|
||||
help='Output file name. E.g. my_font_20.c')
|
||||
parser.add_argument('--compressed', action='store_true',
|
||||
help='Compress the bitmaps')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.compressed == False:
|
||||
compr = "--no-compress --no-prefilter"
|
||||
else:
|
||||
compr = ""
|
||||
|
||||
#Built in symbols
|
||||
syms = "61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099"
|
||||
|
||||
#Run the command
|
||||
cmd = "lv_font_conv {} --bpp {} --size {} --font ./Roboto-Regular.woff -r {} --font FontAwesome.ttf -r {} --format lvgl -o {} --force-fast-kern-format".format(compr, args.bpp, args.size, args.range[0], syms, args.output)
|
||||
os.system(cmd)
|
13
components/gui/LittlevGL/3rdparty/lvgl/scripts/clang-formatter.sh
vendored
Normal file
13
components/gui/LittlevGL/3rdparty/lvgl/scripts/clang-formatter.sh
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
clang-format-7 -style=file ../src/lv_core/*.c -i
|
||||
clang-format-7 -style=file ../src/lv_draw/*.c -i
|
||||
clang-format-7 -style=file ../src/lv_hal/*.c -i
|
||||
clang-format-7 -style=file ../src/lv_misc/*.c -i
|
||||
clang-format-7 -style=file ../src/lv_objx/*.c -i
|
||||
clang-format-7 -style=file ../src/lv_themes/*.c -i
|
||||
|
||||
clang-format-7 -style=file ../src/lv_core/*.h -i
|
||||
clang-format-7 -style=file ../src/lv_draw/*.h -i
|
||||
clang-format-7 -style=file ../src/lv_hal/*.h -i
|
||||
clang-format-7 -style=file ../src/lv_misc/*.h -i
|
||||
clang-format-7 -style=file ../src/lv_objx/*.h -i
|
||||
clang-format-7 -style=file ../src/lv_themes/*.h -i
|
2
components/gui/LittlevGL/3rdparty/lvgl/scripts/cppcheck_run.sh
vendored
Normal file
2
components/gui/LittlevGL/3rdparty/lvgl/scripts/cppcheck_run.sh
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
cppcheck --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force
|
||||
|
54
components/gui/LittlevGL/3rdparty/lvgl/scripts/lv_conf_checker.py
vendored
Normal file
54
components/gui/LittlevGL/3rdparty/lvgl/scripts/lv_conf_checker.py
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
'''
|
||||
Generates a chechker 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(
|
||||
'/**\n\
|
||||
* GENERATED FILE, DO NOT EDIT IT!\n\
|
||||
* @file lv_conf_checker.h\n\
|
||||
* Make sure all the defines of lv_conf.h have a default value\n\
|
||||
**/\n\
|
||||
\n\
|
||||
#ifndef LV_CONF_CHECKER_H\n\
|
||||
#define LV_CONF_CHECKER_H\n\
|
||||
'
|
||||
)
|
||||
|
||||
inlines = fin.read().splitlines();
|
||||
|
||||
started = 0
|
||||
|
||||
for i in inlines:
|
||||
if(not started):
|
||||
if('#define LV_CONF_H' in i):
|
||||
started = 1
|
||||
continue
|
||||
else:
|
||||
continue
|
||||
|
||||
if('/*--END OF LV_CONF_H--*/' in i): break
|
||||
|
||||
if(re.search('^ *# *define .*$', i)):
|
||||
new = re.sub('^ *# *define', '#define ', i)
|
||||
new = re.sub(' +', ' ', new) #Remove extra white spaces
|
||||
splitted = new.split(' ')
|
||||
fout.write('#ifndef ' + splitted[1] + '\n')
|
||||
fout.write(i + '\n')
|
||||
fout.write('#endif\n')
|
||||
elif(re.search('^ *typedef .*;.*$', i)):
|
||||
continue; #igonre typedefs to avoide redeclaration
|
||||
else:
|
||||
fout.write(i + '\n')
|
||||
|
||||
|
||||
fout.write(
|
||||
'\n\
|
||||
#endif /*LV_CONF_CHECKER_H*/\n\
|
||||
')
|
Reference in New Issue
Block a user