diff --git a/lib/lvgl/.github/workflows/build_micropython.yml b/lib/lvgl/.github/workflows/build_micropython.yml
index dbad36c..a8bb912 100644
--- a/lib/lvgl/.github/workflows/build_micropython.yml
+++ b/lib/lvgl/.github/workflows/build_micropython.yml
@@ -8,7 +8,7 @@ jobs:
build:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
name: Build ${{ matrix.port }} port
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
continue-on-error: true
strategy:
matrix:
@@ -23,7 +23,7 @@ jobs:
- name: Clone lv_micropython
run: |
git clone https://github.com/lvgl/lv_micropython.git .
- git checkout master
+ git checkout release/v8
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
- name: Update ${{ matrix.port }} port submodules
diff --git a/lib/lvgl/.github/workflows/ccpp.yml b/lib/lvgl/.github/workflows/ccpp.yml
index 37f46e5..caf6788 100644
--- a/lib/lvgl/.github/workflows/ccpp.yml
+++ b/lib/lvgl/.github/workflows/ccpp.yml
@@ -36,6 +36,11 @@ jobs:
- uses: ammaraskar/gcc-problem-matcher@master
- name: Install prerequisites
run: scripts/install-prerequisites.sh
+ - name: Fix kernel mmap rnd bits
+ # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
+ # high-entropy ASLR in much newer kernels that GitHub runners are
+ # using leading to random crashes: https://reviews.llvm.org/D148280
+ run: sudo sysctl vm.mmap_rnd_bits=28
- name: Run tests
run: python tests/main.py --report test
- name: Upload coverage to Codecov
@@ -93,4 +98,12 @@ jobs:
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
run: |
+ if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
+ # ASan in llvm 14 provided in ubuntu-22.04 is incompatible with
+ # high-entropy ASLR configured in much newer kernels that GitHub
+ # runners are using leading to random crashes:
+ # https://github.com/actions/runner-images/issues/9491
+ # can remove this once the issue is fixed.
+ sysctl -w vm.mmap_rnd_bits=28
+ fi
env PATH="/usr/lib/ccache:$PATH" ASAN_OPTIONS=detect_leaks=0 python3 tests/main.py test
diff --git a/lib/lvgl/.github/workflows/check_style.yml b/lib/lvgl/.github/workflows/check_style.yml
index b5cec3e..876c44e 100644
--- a/lib/lvgl/.github/workflows/check_style.yml
+++ b/lib/lvgl/.github/workflows/check_style.yml
@@ -9,15 +9,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
+ - name: Checkout astyle
+ uses: actions/checkout@v4
+ with:
+ repository: szepeviktor/astyle
+ path: astyle
+ ref: v3.4.12
- name: Install astyle
run: |
- sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
- sudo apt-get update -y -qq
- sudo apt-get install astyle
+ cd astyle/build/gcc/
+ make
+ sudo make install
+ astyle --version
- name: Format code
run: python code-format.py
working-directory: scripts
diff --git a/lib/lvgl/.github/workflows/esp_upload_component.yml b/lib/lvgl/.github/workflows/esp_upload_component.yml
index 5c0ae10..08edfe2 100644
--- a/lib/lvgl/.github/workflows/esp_upload_component.yml
+++ b/lib/lvgl/.github/workflows/esp_upload_component.yml
@@ -3,21 +3,21 @@ name: Push LVGL release to Espressif Component Service
# If the commit is tagged, it will be uploaded. Other scenario silently fail.
on:
push:
- branches:
- - master
+ tags:
+ - v*
jobs:
upload_components:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@master
+ - uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Upload component to component registry
- uses: espressif/github-actions/upload_components@master
+ uses: espressif/upload-components-ci-action@v1
with:
name: "lvgl"
- version: "git"
+ version: ${{ github.ref_name }}
namespace: "lvgl"
api_token: ${{ secrets.ESP_IDF_COMPONENT_API_TOKEN }}
diff --git a/lib/lvgl/.github/workflows/makefile.yml b/lib/lvgl/.github/workflows/makefile.yml
new file mode 100644
index 0000000..39a9a13
--- /dev/null
+++ b/lib/lvgl/.github/workflows/makefile.yml
@@ -0,0 +1,21 @@
+name: Check Makefile
+
+on:
+ push:
+ branches: [ master, release/v8.* ]
+ pull_request:
+ branches: [ master, release/v8.* ]
+
+jobs:
+ build:
+ if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
+ runs-on: ubuntu-latest
+ name: Build using Makefile
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ammaraskar/gcc-problem-matcher@master
+ - name: Install prerequisites
+ run: scripts/install-prerequisites.sh
+ - name: Build
+ working-directory: tests/makefile
+ run: make test_file
diff --git a/lib/lvgl/.gitignore b/lib/lvgl/.gitignore
index 6a8878b..f057154 100644
--- a/lib/lvgl/.gitignore
+++ b/lib/lvgl/.gitignore
@@ -22,3 +22,6 @@ test_screenshot_error.h
build/
tests/build_*/
tests/report/
+.DS_Store
+.vscode
+*.bak
diff --git a/lib/lvgl/Kconfig b/lib/lvgl/Kconfig
index c1d3b8e..ccbbc7b 100644
--- a/lib/lvgl/Kconfig
+++ b/lib/lvgl/Kconfig
@@ -1,4 +1,4 @@
-# Kconfig file for LVGL v8.0
+# Kconfig file for LVGL v8.4
menu "LVGL configuration"
@@ -6,7 +6,7 @@ menu "LVGL configuration"
# without lv_conf.h file, the lv_conf_internal.h and
# lv_conf_kconfig.h files are used instead.
config LV_CONF_SKIP
- bool
+ bool "Uncheck this to use custom lv_conf.h"
default y
config LV_CONF_MINIMAL
@@ -42,11 +42,9 @@ menu "LVGL configuration"
config LV_COLOR_SCREEN_TRANSP
bool "Enable more complex drawing routines to manage screens transparency."
- depends on LV_COLOR_DEPTH_32
help
Can be used if the UI is above another layer, e.g. an OSD menu or video player.
- Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to
- non LV_OPA_COVER value
+ The screen's `bg_opa` should be set to non LV_OPA_COVER value
config LV_COLOR_MIX_ROUND_OFS
int "Adjust color mix functions rounding"
@@ -156,6 +154,15 @@ menu "LVGL configuration"
radiuses are saved).
Set to 0 to disable caching.
+ config LV_LAYER_SIMPLE_BUF_SIZE
+ int "Optimal size to buffer the widget with opacity"
+ default 24576
+ help
+ "Simple layers" are used when a widget has `style_opa < 255`
+ to buffer the widget into a layer and blend it as an image
+ with the given opacity. Note that `bg_opa`, `text_opa` etc
+ don't require buffering into layer.
+
config LV_IMG_CACHE_DEF_SIZE
int "Default image cache size. 0 to disable caching."
default 0
@@ -205,17 +212,14 @@ menu "LVGL configuration"
endmenu
menu "GPU"
- config LV_USE_EXTERNAL_RENDERER
- bool
-
config LV_USE_GPU_ARM2D
bool "Enable Arm's 2D image processing library (Arm-2D) for all Cortex-M processors."
- config LV_USE_GPU_STM32_DMA2D
- bool "Enable STM32 DMA2D (aka Chrom Art) GPU."
default n
help
Must deploy arm-2d library to your project and add include PATH for "arm_2d.h".
-
+
+ config LV_USE_GPU_STM32_DMA2D
+ bool "Enable STM32 DMA2D (aka Chrom Art) GPU."
config LV_GPU_DMA2D_CMSIS_INCLUDE
string "include path of CMSIS header of target processor"
depends on LV_USE_GPU_STM32_DMA2D
@@ -224,6 +228,26 @@ menu "LVGL configuration"
Must be defined to include path of CMSIS header of target processor
e.g. "stm32f769xx.h" or "stm32f429xx.h"
+ config LV_USE_GPU_RA6M3_G2D
+ bool "Enable RA6M3 G2D GPU."
+ config LV_GPU_RA6M3_G2D_INCLUDE
+ string "include path of target processor"
+ depends on LV_USE_GPU_RA6M3_G2D
+ default "hal_data.h"
+ help
+ Must be defined to include path of target processor
+ e.g. "hal_data.h"
+
+ config LV_USE_GPU_SWM341_DMA2D
+ bool "Enable SWM341 DMA2D GPU."
+ config LV_GPU_SWM341_DMA2D_INCLUDE
+ string "include path of CMSIS header of target processor"
+ depends on LV_USE_GPU_SWM341_DMA2D
+ default "SWM341.h"
+ help
+ Must be defined to include path of CMSIS header of target processor
+ e.g. "SWM341.h"
+
config LV_USE_GPU_NXP_PXP
bool "Use NXP's PXP GPU iMX RTxxx platforms."
config LV_USE_GPU_NXP_PXP_AUTO_INIT
@@ -244,12 +268,17 @@ menu "LVGL configuration"
config LV_USE_GPU_SDL
bool "Use SDL renderer API"
- select LV_USE_EXTERNAL_RENDERER
default n
config LV_GPU_SDL_INCLUDE_PATH
string "include path of SDL header"
depends on LV_USE_GPU_SDL
default "SDL2/SDL.h"
+ config LV_GPU_SDL_LRU_SIZE
+ int "Maximum buffer size to allocate for rotation"
+ depends on LV_USE_GPU_SDL
+ default 8388608
+ help
+ Texture cache size, 8MB by default.
endmenu
menu "Logging"
@@ -380,7 +409,7 @@ menu "LVGL configuration"
bool "Left middle"
config LV_PERF_MONITOR_ALIGN_RIGHT_MID
bool "Right middle"
- config LV_PERF_MONITOR_ALIGN_BOTTOM_CENTER
+ config LV_PERF_MONITOR_ALIGN_CENTER
bool "Center"
endchoice
@@ -409,7 +438,7 @@ menu "LVGL configuration"
bool "Left middle"
config LV_MEM_MONITOR_ALIGN_RIGHT_MID
bool "Right middle"
- config LV_MEM_MONITOR_ALIGN_BOTTOM_CENTER
+ config LV_MEM_MONITOR_ALIGN_CENTER
bool "Center"
endchoice
@@ -634,6 +663,10 @@ menu "LVGL configuration"
Set the pixel order of the display.
Important only if "subpx fonts" are used.
With "normal" font it doesn't matter.
+
+ config LV_USE_FONT_PLACEHOLDER
+ bool "Enable drawing placeholders when glyph dsc is not found."
+ default y
endmenu
menu "Text Settings"
@@ -821,6 +854,13 @@ menu "LVGL configuration"
config LV_USE_MSGBOX
bool "Msgbox."
default y if !LV_CONF_MINIMAL
+ config LV_USE_SPAN
+ bool "span"
+ default y if !LV_CONF_MINIMAL
+ config LV_SPAN_SNIPPET_STACK_SIZE
+ int "Maximum number of span descriptor"
+ default 64
+ depends on LV_USE_SPAN
config LV_USE_SPINBOX
bool "Spinbox."
default y if !LV_CONF_MINIMAL
@@ -836,13 +876,6 @@ menu "LVGL configuration"
config LV_USE_WIN
bool "Win"
default y if !LV_CONF_MINIMAL
- config LV_USE_SPAN
- bool "span"
- default y if !LV_CONF_MINIMAL
- config LV_SPAN_SNIPPET_STACK_SIZE
- int "Maximum number of span descriptor"
- default 64
- depends on LV_USE_SPAN
endmenu
menu "Themes"
@@ -881,13 +914,15 @@ menu "LVGL configuration"
config LV_USE_FS_STDIO
bool "File system on top of stdio API"
config LV_FS_STDIO_LETTER
- string "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65 )"
+ int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65 )"
+ default 0
depends on LV_USE_FS_STDIO
config LV_FS_STDIO_PATH
string "Set the working directory"
depends on LV_USE_FS_STDIO
config LV_FS_STDIO_CACHE_SIZE
- string ">0 to cache this number of bytes in lv_fs_read()"
+ int ">0 to cache this number of bytes in lv_fs_read()"
+ default 0
depends on LV_USE_FS_STDIO
config LV_USE_FS_POSIX
@@ -929,6 +964,17 @@ menu "LVGL configuration"
default 0
depends on LV_USE_FS_FATFS
+ config LV_USE_FS_LITTLEFS
+ bool "File system on top of LittleFS"
+ config LV_FS_LITTLEFS_LETTER
+ int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
+ default 0
+ depends on LV_USE_FS_LITTLEFS
+ config LV_FS_LITTLEFS_CACHE_SIZE
+ int ">0 to cache this number of bytes in lv_fs_read()"
+ default 0
+ depends on LV_USE_FS_LITTLEFS
+
config LV_USE_PNG
bool "PNG decoder library"
@@ -965,6 +1011,13 @@ menu "LVGL configuration"
endmenu
endif
+ config LV_USE_TINY_TTF
+ bool "Tiny TTF library"
+ config LV_TINY_TTF_FILE_SUPPORT
+ bool "Load TTF data from files"
+ depends on LV_USE_TINY_TTF
+ default n
+
config LV_USE_RLOTTIE
bool "Lottie library"
@@ -987,15 +1040,44 @@ menu "LVGL configuration"
config LV_USE_GRIDNAV
bool "Enable grid navigation"
- default n
+ default n
config LV_USE_FRAGMENT
bool "Enable lv_obj fragment"
- default n
+ default n
config LV_USE_IMGFONT
bool "draw img in label or span obj"
default n
+
+ config LV_USE_MSG
+ bool "Enable a published subscriber based messaging system"
+ default n
+
+ config LV_USE_IME_PINYIN
+ bool "Enable Pinyin input method"
+ default n
+ config LV_IME_PINYIN_USE_K9_MODE
+ bool "Enable Pinyin input method 9 key input mode"
+ depends on LV_USE_IME_PINYIN
+ default n
+ config LV_IME_PINYIN_K9_CAND_TEXT_NUM
+ int "Maximum number of candidate panels for 9-key input mode"
+ depends on LV_IME_PINYIN_USE_K9_MODE
+ default 3
+ config LV_IME_PINYIN_USE_DEFAULT_DICT
+ bool "Use built-in Thesaurus"
+ depends on LV_USE_IME_PINYIN
+ default y
+ help
+ If you do not use the default thesaurus, be sure to use lv_ime_pinyin after setting the thesauruss
+ config LV_IME_PINYIN_CAND_TEXT_NUM
+ int "Maximum number of candidate panels"
+ depends on LV_USE_IME_PINYIN
+ default 6
+ help
+ Set the maximum number of candidate panels that can be displayed.
+ This needs to be adjusted according to the size of the screen.
endmenu
menu "Examples"
@@ -1020,6 +1102,10 @@ menu "LVGL configuration"
config LV_USE_DEMO_BENCHMARK
bool "Benchmark your system"
default n
+ config LV_DEMO_BENCHMARK_RGB565A8
+ bool "Use RGB565A8 images with 16 bit color depth instead of ARGB8565"
+ depends on LV_USE_DEMO_BENCHMARK
+ default n
config LV_USE_DEMO_STRESS
bool "Stress test for LVGL"
diff --git a/lib/lvgl/README.md b/lib/lvgl/README.md
index 8a478ec..aea07a8 100644
--- a/lib/lvgl/README.md
+++ b/lib/lvgl/README.md
@@ -17,7 +17,7 @@ LVGL provides everything you need to create an embedded GUI with easy-to-use gra
-**English** | [中文](./README_zh.md) |
+**English** | [中文](./README_zh.md) | [Português do Brasil](./README_pt_BR.md)
---
@@ -40,7 +40,7 @@ LVGL provides everything you need to create an embedded GUI with easy-to-use gra
* Multi-language support with UTF-8 handling, CJK, Bidirectional and Arabic script support
* Fully customizable graphical elements via [CSS-like styles](https://docs.lvgl.io/master/overview/style.html)
* Powerful layouts inspired by CSS: [Flexbox](https://docs.lvgl.io/master/layouts/flex.html) and [Grid](https://docs.lvgl.io/master/layouts/grid.html)
-* OS, External memory and GPU are supported but not required. (built in support for STM32 DMA2D, and NXP PXP and VGLite)
+* OS, External memory and GPU are supported but not required. (built in support for STM32 DMA2D, SWM341 DMA2D, and NXP PXP and VGLite)
* Smooth rendering even with a [single frame buffer](https://docs.lvgl.io/master/porting/display.html)
* Written in C and compatible with C++
* Micropython Binding exposes [LVGL API in Micropython](https://blog.lvgl.io/2019-02-20/micropython-bindings)
@@ -99,15 +99,16 @@ Just to mention some platforms:
- STM32F1, STM32F3, STM32F4, STM32F7, STM32L4, STM32L5, STM32H7
- Microchip dsPIC33, PIC24, PIC32MX, PIC32MZ
- [Linux frame buffer](https://blog.lvgl.io/2018-01-03/linux_fb) (/dev/fb)
-- [Raspberry Pi](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
+- [Raspberry Pi](https://github.com/lvgl/lv_port_linux_frame_buffer)
- [Espressif ESP32](https://github.com/lvgl/lv_port_esp32)
- [Infineon Aurix](https://github.com/lvgl/lv_port_aurix)
- Nordic NRF52 Bluetooth modules
- Quectel modems
+- [SYNWIT SWM341](http://www.synwit.cn/)
LVGL is also available as:
- [Arduino library](https://docs.lvgl.io/master/get-started/platforms/arduino.html)
-- [PlatformIO package](https://platformio.org/lib/show/12440/lvgl)
+- [PlatformIO package](https://registry.platformio.org/libraries/lvgl/lvgl)
- [Zephyr library](https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LVGL.html)
- [ESP32 component](https://docs.lvgl.io/master/get-started/platforms/espressif.html)
- [NXP MCUXpresso component](https://www.nxp.com/design/software/embedded-software/lvgl-open-source-graphics-library:LITTLEVGL-OPEN-SOURCE-GRAPHICS-LIBRARY)
diff --git a/lib/lvgl/README_pt_BR.md b/lib/lvgl/README_pt_BR.md
new file mode 100644
index 0000000..f62f0a0
--- /dev/null
+++ b/lib/lvgl/README_pt_BR.md
@@ -0,0 +1,206 @@
+
LVGL - Biblioteca gráfica leve e versátil
+
+
+
+
+ O LVGL fornece tudo o que você precisa para criar uma GUI incorporada com elementos gráficos fáceis de usar, belos efeitos visuais e um baixo consumo de memória.
+
+
+
+[English](./README.md) | [中文](./README_zh.md) | **Português do Brasil**
+
+---
+
+### Tabela de conteúdo
+
+- [Visão Geral](#visão-geral)
+- [Iniciando](#iniciando)
+- [Exemplos](#exemplos)
+- [Serviços](#serviços)
+- [Contribuindo](#contribuindo)
+
+## Visão Geral
+
+### Recursos
+* Poderosos [widgets](https://docs.lvgl.io/master/widgets/index.html): botões, gráficos, listas, controles deslizantes (sliders), imagens, etc.
+* Mecanismo gráfico avançado: animações, anti-aliasing, opacidade, rolagem suave, modos de mesclagem (blending modes), etc.
+* Suporte à [vários dispositivos de entrada](https://docs.lvgl.io/master/overview/indev.html): tela sensível ao toque, mouse, teclado, codificador, botões, etc.
+* Suporte à [vários monitores](https://docs.lvgl.io/master/overview/display.html)
+* Pode ser usado com qualquer microcontrolador e display, independente do hardware
+* Escalável para operar com pouca memória (64 kB Flash, 16 kB RAM)
+* Suporte multilíngue com manipulação UTF-8, suporte ao alfabeto bidirecional, árabe e CJK (Chinês, Japonês e Coreano)
+* Elementos gráficos totalmente personalizáveis por meio de [CSS](https://docs.lvgl.io/master/overview/style.html)
+* Layouts poderosos inspirados em CSS: [Flexbox](https://docs.lvgl.io/master/layouts/flex.html) e [Grid](https://docs.lvgl.io/master/layouts/grid.html)
+* SO, memória externa e GPU são suportados, mas não obrigatórios. (suporte integrado para STM32 DMA2D, SWM341 DMA2D e NXP PXP e VGLite)
+* Renderização suave mesmo com um [buffer de quadro único](https://docs.lvgl.io/master/porting/display.html) (single frame buffer)
+* Escrito em C e compatível com C++
+* Uso do LittlevGL com Micropython simplificado com [LVGL API in Micropython](https://blog.lvgl.io/2019-02-20/micropython-bindings)
+* [Simulador](https://docs.lvgl.io/master/get-started/platforms/pc-simulator.html) para desenvolver no PC sem hardware embutido
+* Mais de 100 [exemplos simples](https://github.com/lvgl/lvgl/tree/master/examples)
+* [Documentação](http://docs.lvgl.io/) e referências de API online e em PDF
+
+### Requerimentos
+Basicamente, todo controlador moderno (que é capaz de acionar um display) é adequado para executar LVGL. Os requisitos mínimos são:
+
+
+
+
+ Nome
+
+
+ Minímo
+
+
+ Recomendado
+
+
+
+
+ Arquitetura
+
+ Microcontrolador ou processador de 16, 32 ou 64 bits
+
+
+
+ Clock
+
+ > 16 MHz
+ > 48 MHz
+
+
+
+ Flash/ROM
+
+ > 64 kB
+ > 180 kB
+
+
+
+
+ RAM estática
+
+ > 16 kB
+ > 48 kB
+
+
+
+
+ Draw buffer
+
+ > 1 × hor. res. pixels
+ > tamanho da tela de 1/10
+
+
+
+
+ Compilador
+
+ Padrão C99 ou mais recente
+
+
+
+*Observe que o uso de memória pode variar dependendo da arquitetura, do compilador e das opções de compilação.*
+
+### Plataformas suportadas
+O LVGL é completamente independente de plataforma e pode ser usado com qualquer MCU que atenda aos requisitos.
+Apenas para citar algumas plataformas:
+
+- NXP: Kinetis, LPC, iMX, iMX RT
+- STM32F1, STM32F3, STM32F4, STM32F7, STM32L4, STM32L5, STM32H7
+- Microchip dsPIC33, PIC24, PIC32MX, PIC32MZ
+- [Linux frame buffer](https://blog.lvgl.io/2018-01-03/linux_fb) (/dev/fb)
+- [Raspberry Pi](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
+- [Espressif ESP32](https://github.com/lvgl/lv_port_esp32)
+- [Infineon Aurix](https://github.com/lvgl/lv_port_aurix)
+- Nordic NRF52 Bluetooth modules
+- Quectel modems
+- [SYNWIT SWM341](https://www.synwit.cn/)
+
+LVGL também está disponível para:
+- [Arduino library](https://docs.lvgl.io/master/get-started/platforms/arduino.html)
+- [PlatformIO package](https://registry.platformio.org/libraries/lvgl/lvgl)
+- [Zephyr library](https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LVGL.html)
+- [ESP32 component](https://docs.lvgl.io/master/get-started/platforms/espressif.html)
+- [NXP MCUXpresso component](https://www.nxp.com/design/software/embedded-software/lvgl-open-source-graphics-library:LITTLEVGL-OPEN-SOURCE-GRAPHICS-LIBRARY)
+- [NuttX library](https://docs.lvgl.io/master/get-started/os/nuttx.html)
+- [RT-Thread RTOS](https://docs.lvgl.io/master/get-started/os/rt-thread.html)
+
+## Iniciando
+Esta lista mostra a maneira recomendada de aprender sobre a biblioteca:
+
+1. Confira as [demos on-line](https://lvgl.io/demos) para ver o LVGL em ação (3 minutos)
+2. Leia a [introdução](https://docs.lvgl.io/master/intro/index.html) da documentação (5 minutos)
+3. Familiarize-se com o básico da [Visão geral rápida](https://docs.lvgl.io/master/get-started/quick-overview.html) (15 minutos)
+4. Configure um [simulador](https://docs.lvgl.io/master/get-started/platforms/pc-simulator.html) (10 minutos)
+5. Experimente alguns [Exemplos](https://github.com/lvgl/lvgl/tree/master/examples)
+6. Placa para porta LVGL. Veja o guia [porting](https://docs.lvgl.io/master/porting/index.html) ou verifique o pronto para usar [Projects](https://github.com/lvgl?q=lv_port_)
+7. Leia a [visão geral](https://docs.lvgl.io/master/overview/index.html) para entender melhor a biblioteca (2-3 horas)
+8. Verifique a documentação dos [widgets](https://docs.lvgl.io/master/widgets/index.html) para ver seus recursos e como utilizá-los
+9. Se você tiver dúvidas, acesse o [fórum](http://forum.lvgl.io/)
+10. Leia o guia de [contribuição](https://docs.lvgl.io/master/CONTRIBUTING.html) para ver como você pode ajudar a melhorar o LVGL (15 minutos)
+
+## Exemplos
+Para mais exemplos, veja a pasta [examples](https://github.com/lvgl/lvgl/tree/master/examples).
+
+
+
+### C
+
+```c
+lv_obj_t * button = lv_btn_create(lv_scr_act()); /* Adiciona um botão à tela atual */
+lv_obj_set_pos(button, 10, 10); /* Define uma posição ao botão na tela */
+lv_obj_set_size(button, 100, 50); /* Define o tamanho */
+lv_obj_add_event_cb(button, button_event_callback, LV_EVENT_CLICKED, NULL); /* Atribui um retorno de chamada (callback) */
+
+lv_obj_t * label = lv_label_create(button); /* Adiciona um rótulo (label) */
+lv_label_set_text(label, "Clique aqui"); /* Define o texto do rótulo (label) */
+lv_obj_center(label); /* Alinha o texto ao centro */
+...
+
+void button_event_callback(lv_event_t * e)
+{
+ printf("Clicado\n");
+}
+```
+
+### Micropython
+Saiba mais em [Micropython](https://docs.lvgl.io/master/get-started/bindings/micropython.html)
+
+```python
+def button_event_callback(event):
+ print("Clicado")
+
+# Cria um botão e um rótulo (label)
+button = lv.btn(lv.scr_act())
+button.set_pos(10, 10)
+button.set_size(100, 50)
+button.add_event_cb(button_event_callback, lv.EVENT.CLICKED, None)
+
+label = lv.label(button)
+label.set_text("Cliquq aqui")
+label.center()
+```
+
+## Serviços
+O LVGL Kft foi estabelecido para fornecer uma base sólida para a biblioteca LVGL. Oferecemos vários tipos de serviços
+para ajudá-lo no desenvolvimento da interface do usuário:
+
+- Design gráfico
+- Implementação de IU
+- Consultoria/Suporte
+
+Para mais informações, consulte [LVGL Serviços](https://lvgl.io/services). Sinta-se à vontade para entrar em contato
+conosco se tiver alguma dúvida.
+
+## Contribuindo
+O LVGL é um projeto aberto e sua contribuição é muito bem-vinda. Há muitas maneiras de contribuir, desde simplesmente
+falando sobre seu projeto, escrevendo exemplos, melhorando a documentação, corrigindo bugs até hospedar seu próprio
+projeto sob a organização LVGL.
+
+Para obter uma descrição detalhada das oportunidades de contribuição, visite a seção de [contribuição](https://docs.lvgl.io/master/CONTRIBUTING.html) da documentação.
diff --git a/lib/lvgl/README_zh.md b/lib/lvgl/README_zh.md
index efa9403..cac080d 100644
--- a/lib/lvgl/README_zh.md
+++ b/lib/lvgl/README_zh.md
@@ -20,7 +20,7 @@ LVGL是一个高度可裁剪、低资源占用、界面美观且易用的嵌入
-[English](./README.md) | **中文** |
+[English](./README.md) | **中文** | [Português do Brasil](./README_pt_BR.md)
---
@@ -42,7 +42,7 @@ LVGL是一个高度可裁剪、低资源占用、界面美观且易用的嵌入
* 配置可裁剪(最低资源占用:64 kB Flash,16 kB RAM)
* 基于UTF-8的多语种支持,例如中文、日文、韩文、阿拉伯文等
* 可以通过[类CSS](https://docs.lvgl.io/master/overview/style.html)的方式来设计、布局图形界面(例如:[Flexbox](https://docs.lvgl.io/master/layouts/flex.html)、[Grid](https://docs.lvgl.io/master/layouts/grid.html))
-* 支持操作系统、外置内存、以及硬件加速(LVGL已内建支持STM32 DMA2D、NXP PXP和VGLite)
+* 支持操作系统、外置内存、以及硬件加速(LVGL已内建支持STM32 DMA2D、SWM341 DMA2D、NXP PXP和VGLite)
* 即便仅有[单缓冲区(frame buffer)](https://docs.lvgl.io/master/porting/display.html)的情况下,也可保证渲染如丝般顺滑
* 全部由C编写完成,并支持C++调用
* 支持Micropython编程,参见:[LVGL API in Micropython](https://blog.lvgl.io/2019-02-20/micropython-bindings)
@@ -107,6 +107,7 @@ LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求
- [Infineon Aurix](https://github.com/lvgl/lv_port_aurix)
- Nordic NRF52 Bluetooth modules
- Quectel modems
+- [SYNWIT SWM341](https://www.synwit.cn/)
LVGL也支持:
- [Arduino library](https://docs.lvgl.io/master/get-started/platforms/arduino.html)
diff --git a/lib/lvgl/demos/benchmark/README.md b/lib/lvgl/demos/benchmark/README.md
index 4057353..c913ae0 100644
--- a/lib/lvgl/demos/benchmark/README.md
+++ b/lib/lvgl/demos/benchmark/README.md
@@ -15,7 +15,8 @@ On to top of the screen the title of the current test step, and the result of th
- After `lv_init()` and initializing the drivers call `lv_demo_benchmark()`
- If you only want to run a specific scene for any purpose (e.g. debug, performance optimization etc.), you can call `lv_demo_benchmark_run_scene()` instead of `lv_demo_benchmark()`and pass the scene number.
- If you enabled trace output by setting macro `LV_USE_LOG` to `1` and trace level `LV_LOG_LEVEL` to `LV_LOG_LEVEL_USER` or higher, benchmark results are printed out in `csv` format.
-
+- If you want to know when the testing is finished, you can register a callback function via `lv_demo_benchmark_register_finished_handler()` before calling `lv_demo_benchmark()` or `lv_demo_benchmark_run_scene()`.
+- If you want to know the maximum rendering performance of the system, call `lv_demo_benchmark_set_max_speed(true)` before `lv_demo_benchmark()`.
## Interpret the result
@@ -32,29 +33,84 @@ In other words, the benchmark shows the FPS from the pure rendering time.
By default, only the changed areas are refreshed. It means if only a few pixels are changed in 1 ms the benchmark will show 1000 FPS. To measure the performance with full screen refresh uncomment `lv_obj_invalidate(lv_scr_act())` in `monitor_cb()` in `lv_demo_benchmark.c`.
-
+
If you are doing performance analysis for 2D image processing optimization, LCD latency (flushing data to LCD) introduced by `disp_flush()` might dilute the performance results of the LVGL drawing process, hence make it harder to see your optimization results (gain or loss). To avoid such problem, please:
-1. Temporarily remove the code for flushing data to LCD inside `disp_flush()`. For example:
+1. Use a flag to control the LCD flushing inside `disp_flush()`. For example:
```c
+volatile bool disp_flush_enabled = true;
+
+/* Enable updating the screen (the flushing process) when disp_flush() is called by LVGL
+ */
+void disp_enable_update(void)
+{
+ disp_flush_enabled = true;
+}
+
+/* Disable updating the screen (the flushing process) when disp_flush() is called by LVGL
+ */
+void disp_disable_update(void)
+{
+ disp_flush_enabled = false;
+}
+
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
{
-#if 0 //!< remove LCD latency
- GLCD_DrawBitmap(area->x1, //!< x
- area->y1, //!< y
- area->x2 - area->x1 + 1, //!< width
- area->y2 - area->y1 + 1, //!< height
- (const uint8_t *)color_p);
-#endif
+ if(disp_flush_enabled) {
+ GLCD_DrawBitmap(area->x1, //!< x
+ area->y1, //!< y
+ area->x2 - area->x1 + 1, //!< width
+ area->y2 - area->y1 + 1, //!< height
+ (const uint8_t *)color_p);
+ }
+
/*IMPORTANT!!!
*Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
}
```
-2. Use trace output to get the benchmark results by:
+2. Disable flushing before calling `lv_demo_benchmark()` or `lv_demo_benchmark_run_scene()`, for example:
+
+```c
+extern void disp_enable_update(void);
+extern void disp_disable_update(void);
+
+static void on_benchmark_finished(void)
+{
+ disp_enable_update();
+}
+
+int main(void)
+{
+ lv_init();
+ lv_port_disp_init();
+ lv_port_indev_init();
+
+ LV_LOG("Running LVGL Benchmark...");
+ LV_LOG("Please stand by...");
+ LV_LOG("NOTE: You will NOT see anything until the end.");
+
+ disp_disable_update();
+
+ lv_demo_benchmark_set_finished_cb(&on_benchmark_finished);
+ lv_demo_benchmark_set_max_speed(true);
+ lv_demo_benchmark();
+
+ //lv_demo_benchmark_run_scene(43); // run scene no 31
+
+ ...
+ while(1){
+ lv_timer_handler(); //! run lv task at the max speed
+ }
+}
+```
+
+
+
+3. Alternatively, you can use trace output to get the benchmark results in csv format by:
- Setting macro `LV_USE_LOG` to `1`
- Setting trace level `LV_LOG_LEVEL` to `LV_LOG_LEVEL_USER` or higher.
diff --git a/lib/lvgl/demos/benchmark/assets/img_benchmark_cogwheel_rgb565a8.c b/lib/lvgl/demos/benchmark/assets/img_benchmark_cogwheel_rgb565a8.c
new file mode 100644
index 0000000..7d93948
--- /dev/null
+++ b/lib/lvgl/demos/benchmark/assets/img_benchmark_cogwheel_rgb565a8.c
@@ -0,0 +1,224 @@
+#include "../../../lvgl.h"
+
+#ifndef LV_ATTRIBUTE_MEM_ALIGN
+#define LV_ATTRIBUTE_MEM_ALIGN
+#endif
+
+#ifndef LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_RGB565A8
+#define LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_RGB565A8
+#endif
+
+const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_RGB565A8 uint8_t img_benchmark_cogwheel_rgb565a8_map[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x94, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb2, 0x63, 0x33, 0x74, 0x5a, 0xc6, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0x74, 0x7c, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xb2, 0x63, 0xd2, 0x6b, 0x74, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xdf, 0x33, 0x7c, 0xd2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd2, 0x63, 0x13, 0x74, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xbe, 0x36, 0x9d, 0xdc, 0xde, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x1d, 0xdf, 0xf6, 0x8c, 0x34, 0x74, 0x57, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xd6, 0x54, 0x7c, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0xd2, 0x6b, 0x13, 0x74, 0xdc, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xb5, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x12, 0x74, 0xf5, 0x94, 0x1c, 0xdf, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xbe, 0xd6, 0x8c, 0x95, 0x84, 0x74, 0x7c, 0x34, 0x74, 0x54, 0x7c, 0xb8, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xb5, 0x54, 0x7c, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0xd2, 0x6b, 0x12, 0x74, 0xb4, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0xef, 0x74, 0x84, 0x90, 0x5b, 0x90, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0x12, 0x74, 0x94, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xad, 0x75, 0x7c, 0x34, 0x74, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x33, 0x74, 0x95, 0x84, 0x7d, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x94, 0x33, 0x74, 0xf3, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0xf2, 0x6b, 0xf2, 0x73, 0x32, 0x7c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x36, 0x9d, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x5b, 0x50, 0x5b, 0x90, 0x63, 0x5d, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0xf7, 0xd6, 0x8c, 0x34, 0x74, 0x55, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x34, 0x74, 0x54, 0x7c, 0xb8, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0x84, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0x12, 0x7c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0x33, 0x74, 0x91, 0x5b, 0xd1, 0x6b, 0xd1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x39, 0xc6, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x95, 0x54, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x74, 0x54, 0x7c, 0xfc, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x84, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd2, 0x6b, 0xf2, 0x73, 0x5a, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xad, 0xf2, 0x6b, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xd1, 0x6b, 0x15, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x9d, 0x75, 0x7c, 0x55, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x13, 0x74, 0x37, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xde, 0x98, 0xa5, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0x53, 0x84, 0x3a, 0xc6, 0xff, 0xff, 0x00, 0x00, 0xbb, 0xd6, 0x12, 0x74, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xd1, 0x6b, 0xf5, 0x9c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x9d, 0x74, 0x7c, 0x54, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x57, 0x9d, 0x7b, 0xc6, 0x5a, 0xce, 0x1a, 0xbe, 0x78, 0xa5, 0xb5, 0x84, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0x54, 0x7c, 0x36, 0x9d, 0xf8, 0xb5, 0x94, 0x84, 0xb1, 0x63, 0xb1, 0x63, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xd1, 0x73, 0x36, 0xa5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xbe, 0x95, 0x84, 0x54, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x34, 0x7c, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x63, 0xf2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xd1, 0x73, 0xbb, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x95, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x34, 0x7c, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0x12, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb0, 0x63, 0xd0, 0x73, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0xef, 0xf5, 0x94, 0x1c, 0xdf, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xe7, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xbe, 0x95, 0x84, 0x54, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x74, 0x54, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0x12, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xd0, 0x73, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0x57, 0xa5, 0x12, 0x74, 0xb1, 0x63, 0xf1, 0x6b, 0x56, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xad, 0x17, 0x95, 0x38, 0x9d, 0x3d, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x9d, 0x75, 0x7c, 0x54, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x74, 0x34, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0x12, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xd1, 0x6b, 0x56, 0xa5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x94, 0xd1, 0x6b, 0x4f, 0x5b, 0x70, 0x5b, 0x0f, 0x53, 0xb0, 0x63, 0xf5, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x9d, 0xd6, 0x8c, 0x75, 0x7c, 0x96, 0x84, 0xd6, 0x8c, 0xbc, 0xce, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xa5, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x73, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x12, 0x74, 0x36, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xef, 0x73, 0x7c, 0x90, 0x63, 0x4f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x2f, 0x53, 0x90, 0x63, 0xb4, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0xa5, 0xd6, 0x8c, 0x96, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x76, 0x84, 0xb6, 0x84, 0xb9, 0xad, 0xbf, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0xb5, 0xd6, 0x8c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x74, 0x34, 0x74, 0x33, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x73, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xf2, 0x73, 0x39, 0xbe, 0xfc, 0xde, 0x12, 0x74, 0x90, 0x63, 0x4f, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x2e, 0x53, 0x90, 0x63, 0x36, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xad, 0xd7, 0x8c, 0x96, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x96, 0x84, 0xb6, 0x84, 0x78, 0xa5, 0x5e, 0xef, 0xff, 0xff, 0xf9, 0xb5, 0xd6, 0x8c, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x13, 0x74, 0xf2, 0x6b, 0xb1, 0x63, 0x70, 0x5b, 0x6f, 0x5b, 0x4f, 0x53, 0x6f, 0x5b, 0xf2, 0x6b, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xb1, 0x63, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb0, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x32, 0x74, 0x12, 0x74, 0x70, 0x5b, 0x4f, 0x5b, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x53, 0x7c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x9d, 0x96, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x96, 0x84, 0x75, 0x84, 0x95, 0x84, 0xb6, 0x84, 0x95, 0x84, 0x95, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x75, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x54, 0x7c, 0x33, 0x74, 0xf2, 0x6b, 0xd1, 0x6b, 0x90, 0x63, 0x6f, 0x5b, 0x2e, 0x53, 0x0d, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0x2e, 0x53, 0xd2, 0x6b, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0x90, 0x63, 0x0e, 0x53, 0xed, 0x4a, 0x0d, 0x4b, 0x0e, 0x4b, 0x2e, 0x53, 0x4f, 0x5b, 0x6f, 0x5b, 0x90, 0x63, 0x91, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0x6f, 0x5b, 0x94, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x9d, 0x96, 0x84, 0x96, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x96, 0x84, 0x96, 0x84, 0x96, 0x84, 0x96, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x54, 0x7c, 0x34, 0x7c, 0xf2, 0x6b, 0xb1, 0x63, 0x4f, 0x53, 0x0d, 0x53, 0x0d, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0d, 0x4b, 0x2f, 0x53, 0xd2, 0x6b, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0x90, 0x63, 0x2e, 0x53, 0x0d, 0x4b, 0x0d, 0x4b, 0x0d, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x4f, 0x53, 0x90, 0x5b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x5b, 0x90, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x70, 0x63, 0x70, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x2f, 0x53, 0xb0, 0x6b, 0x35, 0xa5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0xc6, 0xb6, 0x84, 0x75, 0x84, 0x96, 0x84, 0x96, 0x84, 0x96, 0x84, 0x96, 0x84, 0x96, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x75, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x54, 0x7c, 0xf2, 0x6b, 0x90, 0x5b, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x0d, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x2f, 0x53, 0xd2, 0x6b, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0x91, 0x63, 0x2e, 0x53, 0xed, 0x4a, 0x0d, 0x4b, 0x0d, 0x4b, 0x0d, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x4f, 0x53, 0x4f, 0x5b, 0x70, 0x5b, 0x91, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0xd1, 0x7b, 0x1c, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xbe, 0x75, 0x84, 0x96, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x96, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x75, 0x7c, 0x13, 0x74, 0xb1, 0x63, 0x4f, 0x5b, 0x0e, 0x53, 0x0d, 0x4b, 0x0d, 0x4b, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xee, 0x4a, 0xed, 0x4a, 0x0e, 0x53, 0x4f, 0x63, 0x90, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xd2, 0x6b, 0x4f, 0x5b, 0xcc, 0x52, 0x0d, 0x53, 0x6f, 0x5b, 0x4e, 0x5b, 0xed, 0x4a, 0xcd, 0x42, 0xed, 0x4a, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x4f, 0x5b, 0x6f, 0x5b, 0x90, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0x8f, 0x6b, 0xd4, 0x9c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0xb5, 0x96, 0x84, 0x75, 0x7c, 0xb6, 0x84, 0x96, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x54, 0x7c, 0xf2, 0x6b, 0x70, 0x5b, 0x0e, 0x53, 0xed, 0x4a, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x0e, 0x53, 0x2e, 0x5b, 0x90, 0x6b, 0x52, 0x84, 0x15, 0x9d, 0xbb, 0xde, 0x39, 0xc6, 0x54, 0x84, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xb1, 0x6b, 0x2e, 0x5b, 0x4e, 0x6b, 0x56, 0xad, 0xdb, 0xde, 0xdb, 0xd6, 0xf8, 0xbd, 0x73, 0x84, 0xd1, 0x6b, 0x2e, 0x53, 0xee, 0x4a, 0x0e, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x2e, 0x5b, 0xd0, 0x7b, 0x3d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xf7, 0xf7, 0x94, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x54, 0x7c, 0xb1, 0x63, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x2e, 0x53, 0x4f, 0x63, 0xd0, 0x73, 0x52, 0x8c, 0x7a, 0xd6, 0x9e, 0xf7, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x94, 0x13, 0x74, 0xf3, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xb1, 0x63, 0x90, 0x6b, 0x35, 0xa5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xce, 0x73, 0x84, 0xb0, 0x6b, 0x6f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x6f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x0e, 0x53, 0x6f, 0x6b, 0x55, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0xe7, 0xf7, 0x94, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x96, 0x84, 0x95, 0x84, 0x34, 0x74, 0x90, 0x63, 0x2e, 0x53, 0x0d, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x2e, 0x63, 0xf1, 0x7b, 0xf8, 0xbd, 0x9e, 0xf7, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x9d, 0x33, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xb1, 0x6b, 0xd1, 0x73, 0x3e, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xef, 0x5d, 0xef, 0xb7, 0xad, 0xd1, 0x6b, 0x4f, 0x5b, 0x4f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x2f, 0x5b, 0xf1, 0x7b, 0x7e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x95, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x96, 0x84, 0x95, 0x84, 0x33, 0x74, 0x90, 0x63, 0x0e, 0x53, 0x0d, 0x4b, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x52, 0x2e, 0x5b, 0xd0, 0x73, 0xb7, 0xb5, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x33, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xd1, 0x6b, 0xf1, 0x73, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xe7, 0x97, 0xad, 0xf1, 0x73, 0x2f, 0x53, 0x4f, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0x12, 0x74, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xb5, 0xb6, 0x84, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x33, 0x74, 0x90, 0x5b, 0x0e, 0x53, 0x0e, 0x4b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x6f, 0x63, 0x31, 0x8c, 0x18, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x33, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xd1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xb5, 0x32, 0x74, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0xb0, 0x63, 0x15, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xd6, 0x8c, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x33, 0x74, 0x90, 0x5b, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x8f, 0x73, 0x35, 0xad, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x33, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xd1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0xef, 0x94, 0x84, 0x90, 0x63, 0x90, 0x63, 0xb0, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0x90, 0x63, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xce, 0xf5, 0x94, 0x73, 0x84, 0x32, 0x7c, 0xdc, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x9d, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x54, 0x74, 0x90, 0x63, 0x0e, 0x53, 0x0e, 0x4b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0d, 0x53, 0xf0, 0x7b, 0xf8, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf3, 0x6b, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0x9d, 0xf2, 0x73, 0x90, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0x4f, 0x5b, 0x94, 0x84, 0x77, 0xad, 0x97, 0xad, 0x56, 0x9d, 0xd4, 0x8c, 0x12, 0x74, 0x90, 0x63, 0x2e, 0x53, 0x0e, 0x53, 0x12, 0x74, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0xef, 0xf6, 0x94, 0x17, 0x95, 0x9b, 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xad, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x54, 0x7c, 0xb1, 0x63, 0x0e, 0x53, 0x0d, 0x4b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0x0e, 0x5b, 0xf1, 0x83, 0xf8, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0x12, 0x74, 0xf2, 0x6b, 0xd1, 0x6b, 0xf2, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xa5, 0x12, 0x74, 0xb1, 0x63, 0xd1, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0xb0, 0x63, 0xb0, 0x6b, 0x6f, 0x5b, 0x2e, 0x53, 0x0e, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x93, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0xf7, 0xd6, 0x8c, 0x54, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0xb5, 0x84, 0x17, 0x95, 0xd9, 0xb5, 0x98, 0xa5, 0xd6, 0x8c, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x75, 0x84, 0x75, 0x7c, 0x95, 0x84, 0x75, 0x7c, 0xd1, 0x63, 0x0e, 0x53, 0x0d, 0x4b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0d, 0x53, 0x11, 0x84, 0x19, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0x12, 0x6c, 0x12, 0x6c, 0xf2, 0x6b, 0xd1, 0x6b, 0x12, 0x7c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xa5, 0x12, 0x74, 0xd1, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x53, 0xee, 0x4a, 0xd1, 0x6b, 0x7d, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xd6, 0x95, 0x84, 0x34, 0x74, 0x75, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0xb6, 0x84, 0xb5, 0x84, 0x75, 0x7c, 0x75, 0x84, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x75, 0x7c, 0xf2, 0x6b, 0x4f, 0x53, 0x0d, 0x4b, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xf0, 0x7b, 0x39, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xd1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xa5, 0xf2, 0x73, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x0e, 0x4b, 0x4f, 0x5b, 0x97, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0xb5, 0x8c, 0x54, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x55, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x34, 0x74, 0x70, 0x5b, 0x0d, 0x4b, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x8f, 0x73, 0xf8, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xb1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x8c, 0xd2, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0xd1, 0x6b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xf1, 0x73, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xef, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x54, 0x7c, 0xb1, 0x63, 0x2e, 0x53, 0x0d, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xed, 0x52, 0x6f, 0x6b, 0x55, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xb1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xdf, 0x94, 0x84, 0xf2, 0x6b, 0xf3, 0x6b, 0x33, 0x74, 0xf2, 0x73, 0xb1, 0x63, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x4f, 0x5b, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xc6, 0x34, 0x74, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x75, 0x7c, 0x13, 0x74, 0x4f, 0x53, 0x0d, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x63, 0x72, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xce, 0x33, 0x74, 0xf3, 0x6b, 0x33, 0x74, 0x33, 0x74, 0xf2, 0x6b, 0x90, 0x63, 0x4f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0x2e, 0x53, 0x52, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xc6, 0x54, 0x7c, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x74, 0x7c, 0x75, 0x7c, 0x54, 0x7c, 0xb1, 0x63, 0x0e, 0x53, 0x0e, 0x4b, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x11, 0x84, 0xfc, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb1, 0x6b, 0xf1, 0x7b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0x33, 0x74, 0x13, 0x74, 0x34, 0x74, 0x33, 0x74, 0xb1, 0x63, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x0e, 0x53, 0x2e, 0x5b, 0x11, 0x84, 0x7a, 0xce, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xad, 0x54, 0x7c, 0x13, 0x74, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x75, 0x7c, 0xf2, 0x6b, 0x4f, 0x5b, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x4f, 0x6b, 0x18, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xe7, 0x95, 0x84, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb1, 0x6b, 0xf2, 0x73, 0x5a, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe6, 0x74, 0x84, 0xf3, 0x6b, 0x54, 0x7c, 0x54, 0x7c, 0xf2, 0x6b, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x0e, 0x53, 0x4f, 0x63, 0x93, 0x94, 0xfc, 0xde, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xd6, 0x37, 0x9d, 0x75, 0x84, 0x33, 0x74, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0xb1, 0x63, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x5b, 0x11, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0x7a, 0xce, 0xf6, 0x94, 0x13, 0x74, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0x74, 0x84, 0x3a, 0xc6, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xa5, 0x33, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x34, 0x74, 0xb1, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2e, 0x53, 0xed, 0x52, 0x8f, 0x73, 0xf4, 0xa4, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xb5, 0x95, 0x84, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x13, 0x74, 0x90, 0x63, 0x0e, 0x53, 0x2e, 0x53, 0x2f, 0x53, 0x0e, 0x53, 0x8f, 0x6b, 0x59, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xce, 0x94, 0x84, 0x53, 0x7c, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x33, 0x74, 0xb4, 0x8c, 0xfc, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xe7, 0xb5, 0x8c, 0x34, 0x74, 0x54, 0x7c, 0x75, 0x7c, 0xf2, 0x6b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0xed, 0x52, 0x2e, 0x6b, 0x15, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, 0xff, 0xb9, 0xb5, 0x95, 0x84, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0xd1, 0x6b, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x5b, 0x11, 0x84, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xe7, 0x77, 0xa5, 0x33, 0x74, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x91, 0x63, 0xb1, 0x63, 0x12, 0x74, 0x98, 0xad, 0x5e, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xb5, 0x34, 0x74, 0x54, 0x7c, 0x95, 0x84, 0x33, 0x74, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x0e, 0x5b, 0x52, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xce, 0x95, 0x84, 0x34, 0x74, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x34, 0x74, 0x90, 0x63, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x4e, 0x63, 0x35, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xef, 0xd5, 0x8c, 0xd2, 0x6b, 0x91, 0x63, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd1, 0x63, 0x70, 0x5b, 0xb1, 0x63, 0xb4, 0x8c, 0x7d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xdf, 0x74, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x54, 0x7c, 0xd2, 0x6b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x5b, 0x4f, 0x53, 0x4f, 0x5b, 0xd8, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0xbe, 0x54, 0x7c, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x74, 0x54, 0x7c, 0x13, 0x74, 0x6f, 0x5b, 0x0e, 0x4b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xd0, 0x7b, 0x1c, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x8c, 0xb1, 0x63, 0x70, 0x5b, 0xd1, 0x6b, 0x12, 0x74, 0x12, 0x74, 0xd2, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb0, 0x63, 0x6f, 0x5b, 0x4f, 0x5b, 0x90, 0x63, 0xf5, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xef, 0xd6, 0x8c, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x13, 0x74, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x53, 0x2e, 0x53, 0xf4, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xbe, 0x13, 0x74, 0x54, 0x7c, 0x34, 0x74, 0x34, 0x74, 0x54, 0x74, 0x33, 0x74, 0xf2, 0x6b, 0x4f, 0x5b, 0x0e, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x5b, 0xd4, 0x9c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xad, 0xf2, 0x6b, 0x4f, 0x53, 0x6f, 0x5b, 0xb4, 0x8c, 0x36, 0x9d, 0x74, 0x84, 0xd2, 0x6b, 0x91, 0x63, 0x90, 0x63, 0x90, 0x63, 0xb0, 0x63, 0xb1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xf1, 0x73, 0xf1, 0x73, 0xf1, 0x73, 0x6f, 0x5b, 0x4f, 0x5b, 0xd1, 0x6b, 0x3a, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0xc6, 0xb6, 0x84, 0x95, 0x84, 0xb6, 0x84, 0x54, 0x7c, 0x6f, 0x5b, 0x2e, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0xee, 0x4a, 0x32, 0x7c, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xad, 0xf3, 0x6b, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x34, 0x74, 0x33, 0x74, 0xd1, 0x63, 0x4f, 0x5b, 0x2e, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4e, 0x63, 0x9b, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0xce, 0x54, 0x7c, 0xb2, 0x63, 0x70, 0x5b, 0x31, 0x74, 0xff, 0xff, 0x00, 0x00, 0x9e, 0xf7, 0x74, 0x84, 0x32, 0x7c, 0x93, 0x84, 0xf4, 0x94, 0xd4, 0x94, 0x15, 0x9d, 0x56, 0x9d, 0xd5, 0x8c, 0x13, 0x74, 0x33, 0x7c, 0x15, 0x9d, 0xff, 0xff, 0xff, 0xff, 0x74, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x32, 0x74, 0x1c, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xe7, 0xd6, 0x8c, 0x75, 0x7c, 0xd6, 0x8c, 0x75, 0x7c, 0x90, 0x63, 0x2f, 0x5b, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x5b, 0x0e, 0x4b, 0xb0, 0x6b, 0x5a, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x94, 0xf2, 0x6b, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x34, 0x74, 0x13, 0x74, 0x90, 0x63, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xb0, 0x73, 0x1c, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xdf, 0x94, 0x84, 0xf2, 0x6b, 0xf2, 0x6b, 0x91, 0x63, 0x93, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xf7, 0x39, 0xc6, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x19, 0xbe, 0xdc, 0xde, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x94, 0x91, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x15, 0x95, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xe7, 0xf7, 0x94, 0x76, 0x7c, 0xd7, 0x8c, 0x95, 0x84, 0xf2, 0x6b, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x5b, 0x2e, 0x53, 0x4f, 0x5b, 0x73, 0x84, 0xdb, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xd6, 0xb5, 0x8c, 0xf3, 0x6b, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x34, 0x74, 0x13, 0x74, 0x70, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x5b, 0x11, 0x7c, 0x7e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xc6, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x73, 0xd2, 0x6b, 0x53, 0x7c, 0x5a, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xb5, 0x33, 0x7c, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0xf1, 0x6b, 0x7b, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xef, 0x17, 0x95, 0x75, 0x7c, 0xd7, 0x8c, 0x96, 0x84, 0x13, 0x74, 0x70, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x6f, 0x63, 0x32, 0x7c, 0x7d, 0xef, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xbf, 0xef, 0xfc, 0xde, 0xb8, 0xad, 0xb5, 0x84, 0x33, 0x74, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x34, 0x74, 0x13, 0x74, 0x90, 0x63, 0x6f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x63, 0x32, 0x84, 0x9b, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbe, 0xf7, 0x98, 0xa5, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x6b, 0xd1, 0x6b, 0x32, 0x74, 0x5f, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0x7c, 0x91, 0x63, 0x90, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x70, 0x5b, 0xf5, 0x94, 0x9e, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xd6, 0x95, 0x84, 0x34, 0x74, 0x75, 0x7c, 0x54, 0x7c, 0xf2, 0x6b, 0x70, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x0e, 0x4b, 0x0d, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0x4e, 0x5b, 0xf1, 0x6b, 0xff, 0xff,
+ 0x00, 0x00, 0x5e, 0xef, 0x57, 0x9d, 0x16, 0x95, 0xd5, 0x8c, 0x74, 0x84, 0x54, 0x7c, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x12, 0x7c, 0xb5, 0x8c, 0xf9, 0xb5, 0x9b, 0xce, 0x3a, 0xc6, 0x3a, 0xbe, 0x3a, 0xbe, 0x19, 0xbe, 0x39, 0xbe, 0x19, 0xbe, 0x19, 0xbe, 0x19, 0xbe, 0x5a, 0xc6, 0xb8, 0xad, 0xd5, 0x8c, 0x33, 0x7c, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf3, 0x73, 0x70, 0x5b, 0x90, 0x63, 0x39, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xf7, 0x12, 0x74, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x70, 0x5b, 0xd1, 0x6b, 0x73, 0x84, 0xf5, 0x94, 0xf5, 0x94, 0xd5, 0x94, 0xd5, 0x8c, 0xd5, 0x8c, 0xd4, 0x8c, 0xd4, 0x8c, 0xd4, 0x8c, 0xd4, 0x8c, 0xd4, 0x8c, 0xd4, 0x8c, 0xd4, 0x8c, 0xd5, 0x94, 0x73, 0x84, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0xcd, 0x4a, 0x0e, 0x53, 0xff, 0xff,
+ 0xff, 0xff, 0x13, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf3, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0x70, 0x5b, 0x90, 0x63, 0x3c, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0x84, 0xd1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xcd, 0x42, 0x4e, 0x53, 0xfc, 0xe6,
+ 0x1c, 0xdf, 0x13, 0x74, 0xd2, 0x63, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x6c, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0x70, 0x5b, 0xb0, 0x6b, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x95, 0xf2, 0x6b, 0x90, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xcd, 0x42, 0x2e, 0x53, 0x97, 0xad,
+ 0xfc, 0xde, 0x33, 0x74, 0xd2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x73, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x70, 0x5b, 0xd1, 0x73, 0x7e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0xa5, 0x13, 0x74, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0x0e, 0x53, 0x52, 0x84,
+ 0x5e, 0xef, 0x33, 0x74, 0xd2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x12, 0x74, 0x12, 0x74, 0xf2, 0x73, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x90, 0x63, 0xd1, 0x73, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0x9d, 0xf2, 0x73, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xcd, 0x42, 0x0d, 0x4b, 0x32, 0x84,
+ 0x5d, 0xef, 0x13, 0x74, 0xd2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x63, 0xd2, 0x63, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0x90, 0x63, 0xf1, 0x73, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x8c, 0xd2, 0x6b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x2f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0xed, 0x4a, 0xcd, 0x4a, 0x4e, 0x5b, 0xb7, 0xb5,
+ 0x9e, 0xef, 0xf2, 0x73, 0xb1, 0x63, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf3, 0x73, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0x13, 0x6c, 0xf2, 0x6b, 0xf2, 0x6b, 0x12, 0x74, 0x12, 0x74, 0x12, 0x74, 0x12, 0x74, 0xf2, 0x73, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x91, 0x63, 0x12, 0x74, 0x3d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x7c, 0x91, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x70, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x5b, 0x8f, 0x6b, 0x52, 0x84, 0xff, 0xff,
+ 0xff, 0xff, 0x74, 0x7c, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x73, 0xf2, 0x73, 0x12, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xb0, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x4f, 0x63, 0xb1, 0x73, 0x73, 0x8c, 0xf8, 0xb5, 0xbb, 0xd6, 0xbb, 0xd6, 0xbb, 0xd6, 0x9b, 0xce, 0x9b, 0xce, 0xbb, 0xd6, 0x9b, 0xce, 0x9b, 0xce, 0xdc, 0xd6, 0xf9, 0xbd, 0xb5, 0x8c, 0x12, 0x74, 0xd1, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x91, 0x63, 0x12, 0x74, 0x7a, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xd6, 0x12, 0x74, 0x50, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x5b, 0x4f, 0x5b, 0x4f, 0x63, 0xb0, 0x73, 0x32, 0x84, 0xb4, 0x94, 0x97, 0xad, 0xf8, 0xb5, 0xd8, 0xb5, 0xd8, 0xb5, 0xd8, 0xb5, 0xd8, 0xb5, 0xd8, 0xb5, 0xd8, 0xb5, 0xb7, 0xb5, 0x15, 0x9d, 0x32, 0x7c, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x70, 0x5b, 0x6f, 0x5b, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xcd, 0x4a, 0xed, 0x5a, 0xaf, 0x73, 0x73, 0x8c, 0x18, 0xbe, 0x5d, 0xef, 0x7d, 0xef, 0xff, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0xbe, 0xf7, 0xd8, 0xb5, 0xd5, 0x8c, 0x94, 0x8c, 0x94, 0x84, 0x74, 0x84, 0x53, 0x7c, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x73, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x73, 0x13, 0x74, 0xd1, 0x6b, 0x4f, 0x5b, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x52, 0x6f, 0x6b, 0x76, 0xb5, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0xad, 0xb1, 0x63, 0xd1, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0x32, 0x7c, 0xfc, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x33, 0x7c, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x5b, 0x6f, 0x63, 0xf0, 0x83, 0x9a, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7a, 0xce, 0x12, 0x74, 0x91, 0x63, 0xd1, 0x6b, 0xb1, 0x63, 0x90, 0x63, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xac, 0x52, 0xd0, 0x83, 0x7a, 0xd6, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf9, 0xbd, 0x74, 0x84, 0x12, 0x74, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0x12, 0x74, 0xd2, 0x6b, 0x4f, 0x5b, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0x73, 0x8c, 0x9e, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xce, 0x12, 0x74, 0xb1, 0x63, 0xd2, 0x6b, 0xb1, 0x63, 0xd1, 0x73, 0xf4, 0x9c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xde, 0x12, 0x74, 0x4f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x11, 0x7c, 0x9a, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0xef, 0x53, 0x7c, 0xb1, 0x63, 0xf2, 0x6b, 0xd1, 0x6b, 0x90, 0x63, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xed, 0x52, 0x6e, 0x6b, 0x18, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xd6, 0x74, 0x7c, 0xb1, 0x63, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x70, 0x5b, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x0d, 0x4b, 0x72, 0x8c, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xe7, 0xb4, 0x8c, 0xb1, 0x63, 0xb1, 0x63, 0x70, 0x5b, 0x12, 0x74, 0x7e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xc6, 0xf6, 0x94, 0xdc, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xf7, 0xd9, 0xb5, 0x5e, 0xef, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x8c, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0xd1, 0x73, 0x5a, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xe7, 0x33, 0x74, 0xb1, 0x63, 0xf2, 0x6b, 0xd1, 0x6b, 0x70, 0x5b, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0xed, 0x52, 0x11, 0x84, 0xfc, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0xa5, 0xb1, 0x63, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x90, 0x63, 0x2e, 0x53, 0x0d, 0x4b, 0xed, 0x4a, 0x0d, 0x4b, 0xf1, 0x73, 0x1c, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xd6, 0x33, 0x74, 0x91, 0x63, 0x70, 0x5b, 0x12, 0x74, 0xbb, 0xd6, 0xff, 0xff, 0x3d, 0xe7, 0x33, 0x7c, 0xf2, 0x6b, 0x74, 0x84, 0x36, 0x9d, 0x37, 0x9d, 0x57, 0x9d, 0x77, 0xa5, 0xb5, 0x8c, 0x13, 0x74, 0x53, 0x7c, 0x1c, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x94, 0xd2, 0x6b, 0x2f, 0x53, 0xd1, 0x6b, 0x39, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0xc6, 0x13, 0x74, 0xd2, 0x6b, 0xf2, 0x73, 0xd1, 0x6b, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0x0d, 0x53, 0x93, 0x94, 0xbe, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xbd, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0x2f, 0x53, 0x0d, 0x4b, 0x0d, 0x4b, 0x0d, 0x4b, 0x8f, 0x63, 0xfc, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0xbe, 0xb1, 0x63, 0x70, 0x5b, 0xd1, 0x6b, 0x74, 0x84, 0xd5, 0x8c, 0x33, 0x7c, 0x70, 0x5b, 0x90, 0x5b, 0xb1, 0x63, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xb1, 0x63, 0x50, 0x5b, 0x4f, 0x5b, 0x12, 0x74, 0xf5, 0x94, 0xf6, 0x94, 0x74, 0x84, 0xb1, 0x63, 0x70, 0x5b, 0x97, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0xef, 0xd5, 0x8c, 0xf2, 0x6b, 0xf2, 0x6b, 0xf3, 0x73, 0xb1, 0x63, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xed, 0x4a, 0x4f, 0x63, 0xf8, 0xc5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xbe, 0x13, 0x74, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd1, 0x6b, 0x4f, 0x53, 0x0d, 0x4b, 0x0e, 0x4b, 0x0d, 0x4b, 0x2e, 0x53, 0xdb, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0xa5, 0xb1, 0x63, 0xb1, 0x63, 0xd2, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0x90, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0xd1, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0xb1, 0x6b, 0xb7, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xdf, 0x33, 0x74, 0xf2, 0x6b, 0x13, 0x74, 0xf2, 0x6b, 0xb1, 0x63, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xed, 0x4a, 0xb0, 0x6b, 0xfb, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xe7, 0xb5, 0x8c, 0xb1, 0x63, 0xd1, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0x6f, 0x5b, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0x35, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x9d, 0xd1, 0x6b, 0x70, 0x5b, 0x90, 0x63, 0xb0, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb0, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0xb0, 0x63, 0x16, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xce, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0x90, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0x6f, 0x5b, 0x97, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xef, 0xb4, 0x84, 0xb1, 0x63, 0xd1, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x90, 0x63, 0x2e, 0x53, 0x0e, 0x4b, 0x0d, 0x4b, 0xcd, 0x4a, 0xf1, 0x73, 0x1c, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xf7, 0xd8, 0xb5, 0x32, 0x74, 0x90, 0x63, 0x2f, 0x53, 0x70, 0x5b, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x50, 0x5b, 0x90, 0x63, 0x97, 0xad, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x95, 0xf3, 0x6b, 0x13, 0x74, 0x33, 0x74, 0xd1, 0x6b, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xd0, 0x6b, 0x76, 0xa5, 0x3f, 0xe7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xef, 0x36, 0x9d, 0xf2, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0xb1, 0x63, 0x4f, 0x5b, 0x0d, 0x4b, 0x0d, 0x4b, 0xed, 0x4a, 0x2e, 0x53, 0xd4, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xe7, 0x36, 0x9d, 0x33, 0x7c, 0xf2, 0x73, 0xb1, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0xf1, 0x73, 0x59, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xd6, 0x74, 0x7c, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0xb1, 0x63, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0d, 0x4b, 0xed, 0x4a, 0x8f, 0x63, 0x76, 0xa5, 0x7d, 0xef, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0xa5, 0x53, 0x7c, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x70, 0x5b, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0xed, 0x4a, 0xf1, 0x73, 0xbe, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xe7, 0xf9, 0xb5, 0xd1, 0x6b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x63, 0xf1, 0x7b, 0x5a, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x94, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0xf2, 0x6b, 0x70, 0x5b, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0d, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0x4f, 0x5b, 0xf1, 0x6b, 0x5f, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xc6, 0x94, 0x84, 0xf2, 0x6b, 0x90, 0x5b, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0x91, 0x63, 0x4f, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0x6f, 0x5b, 0xf8, 0xb5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x4f, 0x5b, 0x2e, 0x5b, 0xaf, 0x73, 0x7a, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xbe, 0x74, 0x7c, 0x13, 0x74, 0x54, 0x7c, 0x33, 0x74, 0xb1, 0x63, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xcd, 0x42, 0xcd, 0x42, 0xb7, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0xad, 0xf2, 0x6b, 0x70, 0x5b, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xd1, 0x6b, 0xb1, 0x63, 0x70, 0x5b, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x11, 0x74, 0xbe, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x8c, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x5b, 0x2f, 0x5b, 0x4f, 0x6b, 0xf5, 0xa4, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x84, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x13, 0x74, 0x70, 0x5b, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0xed, 0x4a, 0xed, 0x4a, 0xb3, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x7e, 0xf7, 0xf2, 0x6b, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xb0, 0x63, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x2f, 0x53, 0x77, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x8c, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x90, 0x6b, 0x3d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xbe, 0x54, 0x7c, 0x34, 0x74, 0x74, 0x7c, 0x34, 0x7c, 0xd1, 0x6b, 0x4f, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0xed, 0x4a, 0x0e, 0x53, 0x15, 0x9d, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0x33, 0x7c, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x5b, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xb0, 0x63, 0x97, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0xce, 0x95, 0x84, 0x54, 0x7c, 0x74, 0x7c, 0x75, 0x7c, 0x13, 0x74, 0x6f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0d, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x4e, 0x5b, 0x39, 0xc6, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0xbe, 0xd1, 0x6b, 0x70, 0x5b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x6f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x0e, 0x53, 0x11, 0x74, 0x19, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x73, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0xe6, 0xf6, 0x94, 0x34, 0x74, 0x75, 0x7c, 0x95, 0x84, 0x54, 0x7c, 0xb1, 0x63, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0xcd, 0x42, 0xcd, 0x42, 0xed, 0x42, 0xed, 0x4a, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0xb0, 0x73, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xef, 0x12, 0x74, 0x70, 0x5b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x91, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x12, 0x74, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x73, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x94, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x75, 0x7c, 0xf2, 0x6b, 0x4f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0d, 0x4b, 0xed, 0x52, 0x4e, 0x5b, 0xb0, 0x63, 0xd0, 0x6b, 0x8f, 0x5b, 0x2e, 0x53, 0xed, 0x4a, 0xcd, 0x4a, 0x4f, 0x5b, 0x93, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xbe, 0xf7, 0x94, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x91, 0x63, 0x90, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x5b, 0xf5, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0xa5, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x33, 0x74, 0x90, 0x5b, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xcd, 0x4a, 0xed, 0x5a, 0x31, 0x84, 0x5a, 0xce, 0xfc, 0xde, 0xf4, 0x94, 0xd0, 0x6b, 0x4f, 0x5b, 0x4e, 0x5b, 0x31, 0x7c, 0x7d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xef, 0x12, 0x74, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xf1, 0x73, 0x32, 0x84, 0x93, 0x8c, 0x12, 0x74, 0x90, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xb0, 0x63, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x90, 0x63, 0xd5, 0x94, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x63, 0x6f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0x58, 0x9d, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x54, 0x7c, 0x90, 0x63, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x2e, 0x5b, 0x72, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0xe7, 0xd5, 0x94, 0x16, 0x9d, 0x56, 0xa5, 0x56, 0xa5, 0xd8, 0xbd, 0x9e, 0xf7, 0xff, 0xff, 0x19, 0xc6, 0x73, 0x84, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x63, 0xd4, 0x8c, 0x7e, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x63, 0x6f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0xa5, 0x96, 0x84, 0x96, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0x54, 0x7c, 0xb1, 0x63, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x52, 0xf0, 0x7b, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xef, 0x12, 0x74, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x32, 0x7c, 0x19, 0xbe, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x94, 0x84, 0x90, 0x5b, 0x4f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xd6, 0xf7, 0x94, 0x75, 0x7c, 0xb6, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0x75, 0x7c, 0xd1, 0x6b, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x4e, 0x6b, 0x96, 0xb5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0xa5, 0xd1, 0x6b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x12, 0x74, 0x97, 0xad, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xf7, 0x93, 0x84, 0x70, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0x9e, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xad, 0xd6, 0x8c, 0x96, 0x84, 0xb6, 0x84, 0xd6, 0x8c, 0xb6, 0x84, 0x75, 0x7c, 0xd1, 0x6b, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0xed, 0x4a, 0xed, 0x5a, 0xf0, 0x83, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x15, 0x95, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xb0, 0x63, 0x70, 0x5b, 0xf2, 0x6b, 0x36, 0x9d, 0x1d, 0xdf, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xbf, 0xf7, 0x93, 0x84, 0x70, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0xb0, 0x6b, 0xbe, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xde, 0x57, 0x9d, 0x96, 0x84, 0x75, 0x7c, 0x96, 0x84, 0xd7, 0x8c, 0xd7, 0x8c, 0x75, 0x7c, 0xb1, 0x63, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xcd, 0x4a, 0x4e, 0x63, 0xd8, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xad, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xf2, 0x6b, 0x57, 0xa5, 0x3d, 0xe7, 0x9e, 0xef, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xbf, 0xf7, 0x94, 0x84, 0x70, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x2f, 0x5b, 0xb0, 0x6b, 0xff, 0xf7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xef, 0x5e, 0xef, 0xd9, 0xad, 0x75, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0xb6, 0x84, 0xb6, 0x8c, 0xb6, 0x84, 0x54, 0x7c, 0xb1, 0x63, 0x2e, 0x53, 0x0d, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xcd, 0x4a, 0x4f, 0x5b, 0x59, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0x73, 0x84, 0x4f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xd2, 0x6b, 0xd1, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x94, 0x84, 0x7a, 0xce, 0xbf, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x84, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2e, 0x53, 0x90, 0x6b, 0x9e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xf7, 0x5a, 0xc6, 0xd6, 0x8c, 0x95, 0x84, 0x75, 0x84, 0x75, 0x7c, 0x95, 0x84, 0xb6, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x33, 0x74, 0x90, 0x5b, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x0e, 0x53, 0xf1, 0x6b, 0x3d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0xa5, 0xb1, 0x63, 0x50, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x63, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0x91, 0x63, 0xd1, 0x6b, 0xd2, 0x6b, 0xf2, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x63, 0xf2, 0x6b, 0x74, 0x7c, 0xf6, 0x94, 0xd9, 0xb5, 0x9b, 0xce, 0x1d, 0xe7, 0xff, 0xff, 0xbe, 0xf7, 0x32, 0x7c, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2e, 0x53, 0x90, 0x6b, 0xd8, 0xb5, 0x3d, 0xef, 0x3d, 0xe7, 0xbb, 0xd6, 0x98, 0xa5, 0xd6, 0x8c, 0x75, 0x84, 0x34, 0x7c, 0x54, 0x7c, 0x75, 0x7c, 0x95, 0x84, 0xb6, 0x84, 0x96, 0x84, 0x54, 0x7c, 0xd2, 0x6b, 0x6f, 0x5b, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0xed, 0x4a, 0x2e, 0x53, 0x52, 0x7c, 0x5d, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0xc6, 0x90, 0x63, 0x4f, 0x53, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x90, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xd2, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x13, 0x74, 0xf2, 0x6b, 0xd2, 0x6b, 0xd2, 0x6b, 0x13, 0x74, 0xb5, 0x84, 0xb8, 0xad, 0x77, 0xa5, 0xb1, 0x6b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x90, 0x63, 0x53, 0x7c, 0xd5, 0x8c, 0x95, 0x84, 0x13, 0x74, 0xf3, 0x6b, 0x13, 0x74, 0x54, 0x74, 0x74, 0x7c, 0x95, 0x84, 0x95, 0x84, 0x95, 0x84, 0x54, 0x7c, 0xf2, 0x6b, 0x90, 0x63, 0x4e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0xcd, 0x42, 0x4f, 0x5b, 0xb3, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xd6, 0x32, 0x74, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0xb1, 0x63, 0xd1, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x34, 0x74, 0x13, 0x74, 0x90, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x91, 0x63, 0xf2, 0x6b, 0x13, 0x74, 0x13, 0x74, 0x33, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x74, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x34, 0x74, 0x12, 0x74, 0xb1, 0x63, 0x4f, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0xcc, 0x42, 0xd0, 0x6b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x8c, 0x90, 0x5b, 0x4f, 0x5b, 0x90, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0xd2, 0x6b, 0xf2, 0x6b, 0x13, 0x74, 0x33, 0x74, 0x33, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x54, 0x7c, 0x33, 0x74, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x91, 0x63, 0xf3, 0x6b, 0x33, 0x74, 0x33, 0x74, 0x33, 0x74, 0x34, 0x74, 0x54, 0x7c, 0x54, 0x7c, 0x13, 0x74, 0xd2, 0x6b, 0x90, 0x5b, 0x4f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0d, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0xed, 0x4a, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0xac, 0x3a, 0xb0, 0x63, 0x1c, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0x7c, 0x4f, 0x53, 0x4f, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0x12, 0x6c, 0x33, 0x74, 0x54, 0x7c, 0x95, 0x84, 0x54, 0x7c, 0x90, 0x63, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x91, 0x63, 0x13, 0x74, 0x33, 0x74, 0x13, 0x74, 0xf2, 0x73, 0xf2, 0x6b, 0xd1, 0x63, 0x90, 0x63, 0x6f, 0x5b, 0x4f, 0x5b, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x52, 0x2e, 0x5b, 0x2e, 0x53, 0xed, 0x4a, 0xed, 0x4a, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0xf1, 0x73, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x94, 0x90, 0x63, 0x2f, 0x53, 0x70, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x70, 0x5b, 0x4f, 0x53, 0x2e, 0x5b, 0x6f, 0x63, 0x90, 0x63, 0x4f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x6f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x70, 0x5b, 0x90, 0x63, 0xb1, 0x63, 0xd1, 0x6b, 0xf2, 0x6b, 0xd2, 0x6b, 0x70, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x70, 0x5b, 0xb1, 0x63, 0xb1, 0x63, 0xb1, 0x63, 0x90, 0x63, 0x70, 0x5b, 0x4f, 0x5b, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x2e, 0x63, 0xd0, 0x7b, 0x97, 0xb5, 0x18, 0xbe, 0x11, 0x74, 0x0e, 0x4b, 0xcd, 0x42, 0x0e, 0x4b, 0x0e, 0x4b, 0xed, 0x4a, 0xcd, 0x42, 0xb0, 0x6b, 0x56, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0x32, 0x7c, 0x70, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x70, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x6f, 0x63, 0xb0, 0x7b, 0x73, 0x94, 0xb4, 0x8c, 0x12, 0x74, 0xb0, 0x63, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x5b, 0x6f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0d, 0x53, 0xed, 0x52, 0x4e, 0x63, 0x52, 0x8c, 0x9a, 0xde, 0xff, 0xff, 0x00, 0x00, 0xfb, 0xde, 0x32, 0x7c, 0x2e, 0x53, 0xed, 0x4a, 0xcd, 0x42, 0x0e, 0x53, 0xb0, 0x6b, 0xf4, 0x9c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0xf7, 0x32, 0x7c, 0x90, 0x63, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x6f, 0x5b, 0xd0, 0x73, 0x52, 0x8c, 0xdc, 0xe6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0xad, 0x11, 0x74, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0xed, 0x4a, 0xcc, 0x52, 0x6f, 0x73, 0x76, 0xb5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xad, 0x2e, 0x53, 0x2e, 0x53, 0xd0, 0x6b, 0xb7, 0xb5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x94, 0xb1, 0x6b, 0x4f, 0x5b, 0xd1, 0x6b, 0x73, 0x8c, 0xdb, 0xde, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xef, 0x73, 0x84, 0x6f, 0x5b, 0x2e, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xcc, 0x4a, 0x4e, 0x6b, 0x96, 0xb5, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0xa5, 0x15, 0x95, 0xb8, 0xb5, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0xa5, 0x90, 0x63, 0x0e, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0d, 0x4b, 0xed, 0x52, 0x11, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x94, 0x90, 0x63, 0x0e, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0d, 0x4b, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0x0e, 0x53, 0x72, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x73, 0x4f, 0x5b, 0x2e, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x2f, 0x53, 0x2f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0x0d, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0d, 0x4b, 0x0e, 0x4b, 0x32, 0x7c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x5b, 0x2f, 0x53, 0x4f, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x2f, 0x53, 0x0e, 0x53, 0xed, 0x52, 0x6f, 0x63, 0xd0, 0x6b, 0xb0, 0x63, 0x4f, 0x5b, 0x2e, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0xed, 0x52, 0x4e, 0x5b, 0x8f, 0x6b, 0xd0, 0x73, 0x52, 0x84, 0x73, 0x84, 0x6f, 0x63, 0xcd, 0x42, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0d, 0x4b, 0xed, 0x4a, 0xf1, 0x73, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xce, 0x4f, 0x5b, 0x0e, 0x53, 0x4f, 0x5b, 0x4f, 0x5b, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x4f, 0x53, 0x0e, 0x53, 0xed, 0x5a, 0xd0, 0x7b, 0xb7, 0xbd, 0xbb, 0xd6, 0x5a, 0xc6, 0xf5, 0x94, 0x6f, 0x5b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0x2e, 0x5b, 0xd0, 0x7b, 0xd8, 0xbd, 0x9a, 0xd6, 0x7a, 0xd6, 0x3c, 0xe7, 0x9f, 0xf7, 0x35, 0x9d, 0x0e, 0x4b, 0x0d, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x4b, 0x0e, 0x53, 0x0e, 0x4b, 0xcd, 0x42, 0xb0, 0x63, 0x39, 0xc6, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x8c, 0x2f, 0x53, 0x0e, 0x4b, 0x4f, 0x5b, 0x4f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x8f, 0x73, 0x59, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0xd0, 0x6b, 0x2e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0xed, 0x4a, 0xed, 0x52, 0xd0, 0x7b, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xef, 0x32, 0x74, 0xed, 0x4a, 0xed, 0x4a, 0x0e, 0x53, 0x0e, 0x4b, 0x0e, 0x4b, 0x0d, 0x4b, 0xcd, 0x42, 0x6f, 0x5b, 0xb3, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xa5, 0x2e, 0x53, 0xed, 0x4a, 0x2e, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2f, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x6f, 0x63, 0x76, 0xad, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x11, 0x74, 0x4f, 0x5b, 0x0e, 0x4b, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0xed, 0x4a, 0x2e, 0x63, 0xf4, 0xa4, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0xad, 0x2e, 0x53, 0xcd, 0x42, 0x0e, 0x4b, 0x0e, 0x4b, 0xed, 0x4a, 0xed, 0x4a, 0xcd, 0x42, 0xb0, 0x6b, 0x9b, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf7, 0x52, 0x7c, 0x6f, 0x5b, 0xee, 0x4a, 0xed, 0x4a, 0x0e, 0x4b, 0x0e, 0x53, 0xee, 0x4a, 0x2e, 0x5b, 0x32, 0x84, 0xbe, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x8c, 0x6f, 0x5b, 0xed, 0x4a, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x4b, 0xed, 0x4a, 0x6f, 0x63, 0xdb, 0xde, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x5d, 0xef, 0x12, 0x74, 0xcd, 0x42, 0xac, 0x42, 0xcd, 0x4a, 0x0e, 0x53, 0x4f, 0x5b, 0xf1, 0x73, 0x5a, 0xce, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xf7, 0xd8, 0xb5, 0x52, 0x7c, 0xd1, 0x6b, 0x6f, 0x5b, 0x2e, 0x53, 0x6f, 0x5b, 0x52, 0x84, 0x9a, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x94, 0x6f, 0x5b, 0xed, 0x4a, 0x0e, 0x53, 0x0e, 0x53, 0x0e, 0x53, 0x2e, 0x53, 0x0e, 0x4b, 0x0e, 0x53, 0x6f, 0x6b, 0xbe, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xce, 0x52, 0x7c, 0xb0, 0x6b, 0x12, 0x74, 0xb3, 0x8c, 0x39, 0xc6, 0x9e, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xf7, 0x3d, 0xe7, 0xf5, 0x94, 0x11, 0x74, 0xf8, 0xb5, 0xbf, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x9d, 0x4f, 0x5b, 0xcd, 0x42, 0x0d, 0x4b, 0x0d, 0x4b, 0x0d, 0x4b, 0x0e, 0x4b, 0xed, 0x4a, 0x0e, 0x53, 0xd0, 0x73, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xff, 0xdf, 0xf7, 0xdf, 0xff, 0xdf, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xef, 0x8f, 0x63, 0xed, 0x4a, 0x0d, 0x4b, 0x0d, 0x4b, 0x0d, 0x4b, 0xed, 0x4a, 0xcd, 0x4a, 0x4f, 0x5b, 0x93, 0x94, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x76, 0xa5, 0x11, 0x74, 0x11, 0x74, 0x11, 0x74, 0x11, 0x74, 0xf1, 0x73, 0xd0, 0x6b, 0x73, 0x84, 0x7e, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /*alpha channel*/
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0f, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x53, 0xff, 0x28, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x2b, 0xff, 0xff, 0xa5, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x4b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x51, 0xff, 0xff, 0xff, 0xff, 0xff, 0x28, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x8c, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xaa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xb2, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x67, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xc4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00, 0x00, 0x00, 0x01, 0x7c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x0e, 0x00, 0x00, 0x00, 0x07, 0x2d, 0x82, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x46, 0x05, 0x00, 0x31, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xdc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbb, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa9, 0x3b, 0x34, 0x4e, 0xac, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xa8, 0x59, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xf3, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf3, 0xf0, 0xf3, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe5, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x95, 0x2e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x4b, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xec, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x86, 0xe6, 0xff, 0xff, 0x93, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xaf, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xd2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xf4, 0xff, 0xff, 0xdc, 0xff, 0xff, 0xb1, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xcc, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x89, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0x83, 0x02, 0x00, 0x00, 0x0d, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xbf, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc8, 0xff, 0xff, 0xf9, 0xf9, 0xff, 0xff, 0xbb, 0x19, 0x00, 0x00, 0x02, 0x78, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0x6b, 0x2c, 0xf7, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xa7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9f, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xe6, 0x20, 0x06, 0x76, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xd7, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb9, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc4, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x8f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x8e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0x12, 0x2a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x62, 0x19, 0x14, 0x31, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x29, 0x0f, 0x04, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0x03, 0x00, 0x00, 0x00, 0x07, 0x36, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x55, 0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0b, 0x4f, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x40, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x5e, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0x89, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xc1, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x44, 0x7c, 0x70, 0x86, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xb0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x70, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xac, 0x80, 0x80, 0x78, 0x9b, 0xff, 0xff, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xf3, 0xe8, 0x64, 0x0b, 0x01, 0x02, 0x00, 0x04, 0x94, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xe6, 0xe8, 0xe6, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x11, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xcd, 0xcf, 0xad, 0xd5, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x51, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x7b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x78, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4f, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x92, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xad, 0x29, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x05, 0x41, 0xd8, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x46, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xa6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x7f, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0x85, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x17, 0x79, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x8c, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xf7, 0xff, 0xff, 0x5b, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x6d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0x8a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb9, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xff, 0xff, 0xf7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xfb, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xe9, 0xff, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xde, 0xff, 0xb6, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0x91, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc6, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x95, 0xff, 0xf4, 0xff, 0xd9, 0xcc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xce, 0xfb, 0xf7, 0xff, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xff, 0xff, 0xff, 0xd5, 0x04, 0x00, 0x0f, 0xff, 0xff, 0xe8, 0xaf, 0xb5, 0xb4, 0xae, 0xe6, 0xff, 0xff, 0xb3, 0x03, 0x01, 0xcb, 0xff, 0xff, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xed, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0xff, 0xff, 0xf8, 0xff, 0xdd, 0x02, 0x00, 0x00, 0x15, 0x79, 0x0d, 0x00, 0x01, 0x01, 0x00, 0x0a, 0x77, 0x3b, 0x01, 0x00, 0x02, 0xdf, 0xff, 0xf3, 0xff, 0xcb, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x26, 0x01, 0x02, 0x02, 0x03, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xf4, 0xff, 0xff, 0xff, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xff, 0xff, 0xff, 0xf7, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xd5, 0xdc, 0xdf, 0xff, 0xe6, 0x0d, 0x00,
+ 0x00, 0x00, 0x09, 0x11, 0x0b, 0x1a, 0x50, 0xb5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x42, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05, 0x04, 0x04, 0x04, 0x05, 0x03, 0x05, 0x13, 0x81, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0xff, 0xff, 0xfb, 0xff, 0xfb, 0xff, 0xb1, 0x11, 0x03, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x02, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x01,
+ 0x00, 0x20, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x65, 0x81, 0x80, 0x89, 0x8b, 0x89, 0x88, 0x87, 0x89, 0x78, 0xaf, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x08,
+ 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb6, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xec, 0x3a,
+ 0x51, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xaf,
+ 0x60, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff,
+ 0x3b, 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff,
+ 0x3d, 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8e,
+ 0x2d, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b,
+ 0x0b, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x93, 0x56, 0x5b, 0x5b, 0x62, 0x62, 0x5a, 0x5c, 0x64, 0x53, 0x90, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0x9f, 0x79, 0x85, 0x83, 0x83, 0x83, 0x83, 0x7e, 0x8b, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0x60, 0x16, 0x0d, 0x08, 0x00,
+ 0x00, 0x16, 0xa1, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0x1d, 0x04, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x02, 0x03, 0x02, 0x05, 0x11, 0x71, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xff, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf8, 0xff, 0xfb, 0xff, 0xff, 0xf7, 0xff, 0xff, 0x2b, 0x03, 0x06, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x37, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x32, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x05, 0x0c, 0x0b, 0x07, 0x19, 0x90, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xb2, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x50, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x29, 0x00, 0x02, 0x78, 0xed, 0x40, 0x01, 0x02, 0x02, 0x01, 0x20, 0x9e, 0x23, 0x00, 0x00, 0x02, 0xd9, 0xff, 0xfb, 0xff, 0xff, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7c, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xff, 0xff, 0xff, 0xff, 0x58, 0x06, 0x2e, 0xff, 0xff, 0xff, 0xbc, 0xbe, 0xc1, 0xbc, 0xfc, 0xff, 0xff, 0x37, 0x02, 0x07, 0xd9, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x68, 0xff, 0xff, 0xff, 0xff, 0xe8, 0xfc, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xda, 0xd9, 0xf8, 0xff, 0xff, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x54, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x8d, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xef, 0xff, 0x6d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xee, 0xff, 0xfc, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xf8, 0xff, 0xd9, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x6a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6c, 0xff, 0xff, 0xfc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x76, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x53, 0x09, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x29, 0x90, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xa4, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x84, 0x18, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x90, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x35, 0x65, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x57, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x64, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5b, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x05, 0x86, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x09, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x1b, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x05, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x7d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x58, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x07, 0x84, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x11, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x15, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x27, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x11, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x15, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x92, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x11, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe9, 0x55, 0x35, 0xca, 0xd6, 0xca, 0xdc, 0xf8, 0x19, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0xc6, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xc8, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x11, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xce, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xaa, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xbd, 0x9b, 0x99, 0xa3, 0x93, 0x25, 0x0b, 0x74, 0xf6, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xd5, 0x2b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xb1, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x2c, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x48, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x7a, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x92, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xcd, 0x38, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x13, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3e, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xac, 0x31, 0x22, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x13, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x1f, 0x23, 0x86, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x57, 0x1a, 0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x0f, 0x28, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x75, 0x3b, 0x33, 0x12, 0x26, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0x3b, 0x2d, 0x39, 0xa3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xac, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xba, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xe8, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xee, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xe2, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xd2, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0x8b, 0x73, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xf9, 0xff, 0xff, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xeb, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xdd, 0xd2, 0xe3, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xfc, 0x4e, 0x03, 0x00, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbd, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xe6, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xe8, 0x42, 0x09, 0x03, 0x0c, 0x93, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x72, 0x07, 0x00, 0x00, 0x00, 0x00, 0x10, 0x66, 0xf6, 0xd8, 0xe6, 0x8b, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xd0, 0xff, 0xff, 0xff, 0xf6, 0x4e, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x37, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7b, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x0c, 0x0f, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x9b, 0xa0, 0x91, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xe6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf9, 0xf9, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf9, 0xf7, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x66, 0x3a, 0x50, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0x58, 0x40, 0x4e, 0x3f, 0x2e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x59, 0x00, 0x00, 0x00, 0x24, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xc2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x05, 0x00, 0x01, 0x00, 0x0c, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xce, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x82, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x29, 0x00, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x50, 0x00, 0x00, 0x01, 0x00, 0x00, 0x12, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x68, 0xff, 0xff, 0xff, 0xff, 0x6a, 0x25, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0a, 0x16, 0x39, 0xeb, 0xff, 0x63, 0x17, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x1e, 0x1e, 0x1f, 0x1c, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x1a, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0xb8, 0xff, 0xe7, 0xe2, 0xe4, 0xe7, 0xff, 0xf7, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0c, 0x0c, 0x0b, 0x10, 0x18, 0x12, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+};
+
+const lv_img_dsc_t img_benchmark_cogwheel_rgb565a8 = {
+ .header.cf = LV_IMG_CF_RGB565A8,
+ .header.always_zero = 0,
+ .header.reserved = 0,
+ .header.w = 100,
+ .header.h = 100,
+ .data_size = 30000,
+ .data = img_benchmark_cogwheel_rgb565a8_map,
+};
diff --git a/lib/lvgl/demos/benchmark/assets/img_cogwheel_argb.png b/lib/lvgl/demos/benchmark/assets/img_cogwheel_argb.png
deleted file mode 100644
index 9cd0f44..0000000
Binary files a/lib/lvgl/demos/benchmark/assets/img_cogwheel_argb.png and /dev/null differ
diff --git a/lib/lvgl/demos/benchmark/assets/img_cogwheel_chroma_keyed.png b/lib/lvgl/demos/benchmark/assets/img_cogwheel_chroma_keyed.png
deleted file mode 100644
index d184a2f..0000000
Binary files a/lib/lvgl/demos/benchmark/assets/img_cogwheel_chroma_keyed.png and /dev/null differ
diff --git a/lib/lvgl/demos/benchmark/assets/img_cogwheel_indexed16.png b/lib/lvgl/demos/benchmark/assets/img_cogwheel_indexed16.png
deleted file mode 100644
index 85f1f31..0000000
Binary files a/lib/lvgl/demos/benchmark/assets/img_cogwheel_indexed16.png and /dev/null differ
diff --git a/lib/lvgl/demos/benchmark/assets/img_cogwheel_rgb.png b/lib/lvgl/demos/benchmark/assets/img_cogwheel_rgb.png
deleted file mode 100644
index 21337d9..0000000
Binary files a/lib/lvgl/demos/benchmark/assets/img_cogwheel_rgb.png and /dev/null differ
diff --git a/lib/lvgl/demos/benchmark/lv_demo_benchmark.c b/lib/lvgl/demos/benchmark/lv_demo_benchmark.c
index 85f2900..76047f3 100644
--- a/lib/lvgl/demos/benchmark/lv_demo_benchmark.c
+++ b/lib/lvgl/demos/benchmark/lv_demo_benchmark.c
@@ -69,8 +69,16 @@ typedef struct {
static lv_style_t style_common;
static bool opa_mode = true;
+static bool run_max_speed = false;
+static finished_cb_t * benchmark_finished_cb = NULL;
+static uint32_t disp_ori_timer_period;
+static uint32_t anim_ori_timer_period;
-LV_IMG_DECLARE(img_benchmark_cogwheel_argb);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ LV_IMG_DECLARE(img_benchmark_cogwheel_rgb565a8);
+#else
+ LV_IMG_DECLARE(img_benchmark_cogwheel_argb);
+#endif
LV_IMG_DECLARE(img_benchmark_cogwheel_rgb);
LV_IMG_DECLARE(img_benchmark_cogwheel_chroma_keyed);
LV_IMG_DECLARE(img_benchmark_cogwheel_indexed16);
@@ -81,7 +89,7 @@ LV_FONT_DECLARE(lv_font_benchmark_montserrat_16_compr_az);
LV_FONT_DECLARE(lv_font_benchmark_montserrat_28_compr_az);
static void monitor_cb(lv_disp_drv_t * drv, uint32_t time, uint32_t px);
-static void scene_next_task_cb(lv_timer_t * timer);
+static void next_scene_timer_cb(lv_timer_t * timer);
static void rect_create(lv_style_t * style);
static void img_create(lv_style_t * style, const void * src, bool rotate, bool zoom, bool aa);
static void txt_create(lv_style_t * style);
@@ -90,6 +98,7 @@ static void arc_create(lv_style_t * style);
static void fall_anim(lv_obj_t * obj);
static void rnd_reset(void);
static int32_t rnd_next(int32_t min, int32_t max);
+static void report_cb(lv_timer_t * timer);
static void rectangle_cb(void)
{
@@ -217,7 +226,6 @@ static void shadow_small_ofs_cb(void)
rect_create(&style_common);
}
-
static void shadow_large_cb(void)
{
lv_style_reset(&style_common);
@@ -241,7 +249,6 @@ static void shadow_large_ofs_cb(void)
rect_create(&style_common);
}
-
static void img_rgb_cb(void)
{
lv_style_reset(&style_common);
@@ -253,8 +260,12 @@ static void img_argb_cb(void)
{
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
- img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false);
+#else
+ img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false);
+#endif
}
static void img_ckey_cb(void)
@@ -280,7 +291,6 @@ static void img_alpha_cb(void)
img_create(&style_common, &img_benchmark_cogwheel_alpha16, false, false, false);
}
-
static void img_rgb_recolor_cb(void)
{
lv_style_reset(&style_common);
@@ -295,7 +305,11 @@ static void img_argb_recolor_cb(void)
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
lv_style_set_img_recolor_opa(&style_common, LV_OPA_50);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false);
+#else
img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false);
+#endif
}
static void img_ckey_recolor_cb(void)
@@ -333,14 +347,22 @@ static void img_argb_rot_cb(void)
{
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, false);
+#else
img_create(&style_common, &img_benchmark_cogwheel_argb, true, false, false);
+#endif
}
static void img_argb_rot_aa_cb(void)
{
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, true);
+#else
img_create(&style_common, &img_benchmark_cogwheel_argb, true, false, true);
+#endif
}
static void img_rgb_zoom_cb(void)
@@ -357,22 +379,28 @@ static void img_rgb_zoom_aa_cb(void)
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
img_create(&style_common, &img_benchmark_cogwheel_rgb, false, true, true);
-
}
static void img_argb_zoom_cb(void)
{
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, false);
+#else
img_create(&style_common, &img_benchmark_cogwheel_argb, false, true, false);
+#endif
}
-
static void img_argb_zoom_aa_cb(void)
{
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, true);
+#else
img_create(&style_common, &img_benchmark_cogwheel_argb, false, true, true);
+#endif
}
static void txt_small_cb(void)
@@ -429,7 +457,6 @@ static void txt_large_compr_cb(void)
}
-
static void line_cb(void)
{
lv_style_reset(&style_common);
@@ -457,7 +484,6 @@ static void arc_thick_cb(void)
}
-
static void sub_rectangle_cb(void)
{
lv_style_reset(&style_common);
@@ -496,8 +522,11 @@ static void sub_img_cb(void)
lv_style_reset(&style_common);
lv_style_set_img_opa(&style_common, opa_mode ? LV_OPA_50 : LV_OPA_COVER);
lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE);
+#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
+ img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false);
+#else
img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false);
-
+#endif
}
static void sub_line_cb(void)
{
@@ -527,8 +556,6 @@ static void sub_text_cb(void)
txt_create(&style_common);
}
-
-
/**********************
* STATIC VARIABLES
**********************/
@@ -600,7 +627,7 @@ static lv_obj_t * scene_bg;
static lv_obj_t * title;
static lv_obj_t * subtitle;
static uint32_t rnd_act;
-
+static lv_timer_t * next_scene_timer;
static const uint32_t rnd_map[] = {
0xbd13204f, 0x67d8167f, 0x20211c99, 0xb0a7cc05,
@@ -634,6 +661,18 @@ static void benchmark_init(void)
lv_disp_t * disp = lv_disp_get_default();
disp->driver->monitor_cb = monitor_cb;
+ /*Force to run at maximum frame rate*/
+ if(run_max_speed) {
+ if(disp->refr_timer) {
+ disp_ori_timer_period = disp->refr_timer->period;
+ lv_timer_set_period(disp->refr_timer, 1);
+ }
+
+ lv_timer_t * anim_timer = lv_anim_get_timer();
+ anim_ori_timer_period = anim_timer->period;
+ lv_timer_set_period(anim_timer, 1);
+ }
+
lv_obj_t * scr = lv_scr_act();
lv_obj_remove_style_all(scr);
lv_obj_set_style_bg_opa(scr, LV_OPA_COVER, 0);
@@ -654,13 +693,61 @@ static void benchmark_init(void)
lv_obj_update_layout(scr);
}
-
void lv_demo_benchmark(void)
{
benchmark_init();
/*Manually start scenes*/
- scene_next_task_cb(NULL);
+ next_scene_timer_cb(NULL);
+}
+
+void lv_demo_benchmark_close(void)
+{
+ if(next_scene_timer) lv_timer_del(next_scene_timer);
+ next_scene_timer = NULL;
+
+ lv_anim_del(NULL, NULL);
+
+ lv_style_reset(&style_common);
+
+ lv_obj_clean(lv_scr_act());
+
+}
+
+void lv_demo_benchmark_run_scene(int_fast16_t scene_no)
+{
+ benchmark_init();
+
+ if(((scene_no >> 1) >= dimof(scenes))) {
+ /* invalid scene number */
+ return ;
+ }
+
+ opa_mode = scene_no & 0x01;
+ scene_act = scene_no >> 1;
+
+ if(scenes[scene_act].create_cb) {
+ lv_label_set_text_fmt(title, "%"LV_PRId32"/%"LV_PRId32": %s%s", scene_act * 2 + (opa_mode ? 1 : 0),
+ (int32_t)(dimof(scenes) * 2) - 2,
+ scenes[scene_act].name, opa_mode ? " + opa" : "");
+ lv_label_set_text(subtitle, "");
+
+ rnd_reset();
+ scenes[scene_act].create_cb();
+
+ lv_timer_t * t = lv_timer_create(report_cb, SCENE_TIME, NULL);
+ lv_timer_set_repeat_count(t, 1);
+ }
+}
+
+void lv_demo_benchmark_set_finished_cb(finished_cb_t * finished_cb)
+{
+ benchmark_finished_cb = finished_cb;
+}
+
+void lv_demo_benchmark_set_max_speed(bool en)
+{
+ run_max_speed = en;
}
/**********************
@@ -701,7 +788,6 @@ static void generate_report(void)
weight_opa_sum += w;
}
-
fps_sum = fps_normal_sum + fps_opa_sum;
weight_sum = weight_normal_sum + weight_opa_sum;
@@ -711,10 +797,13 @@ static void generate_report(void)
uint32_t opa_speed_pct = (fps_opa_unweighted * 100) / fps_normal_unweighted;
+ if(NULL != benchmark_finished_cb) {
+ (*benchmark_finished_cb)();
+ }
+
lv_obj_clean(lv_scr_act());
scene_bg = NULL;
-
lv_obj_set_flex_flow(lv_scr_act(), LV_FLEX_FLOW_COLUMN);
title = lv_label_create(lv_scr_act());
@@ -750,7 +839,6 @@ static void generate_report(void)
// lv_obj_add_style(table, LV_TABLE_PART_CELL3, &style_cell_very_slow);
// lv_obj_add_style(table, LV_TABLE_PART_CELL4, &style_cell_title);
-
uint16_t row = 0;
lv_table_add_cell_ctrl(table, row, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
lv_table_set_cell_value(table, row, 0, "Slow but common cases");
@@ -760,6 +848,8 @@ static void generate_report(void)
"LVGL v%d.%d.%d " LVGL_VERSION_INFO
" Benchmark (in csv format)\r\n",
LVGL_VERSION_MAJOR, LVGL_VERSION_MINOR, LVGL_VERSION_PATCH);
+ LV_LOG("Weighted FPS: %"LV_PRIu32"\r\n", fps_weighted);
+ LV_LOG("Opa. speed: %"LV_PRIu32"%%\r\n", opa_speed_pct);
row++;
char buf[256];
@@ -774,7 +864,7 @@ static void generate_report(void)
// lv_table_set_cell_type(table, row, 0, 2);
// lv_table_set_cell_type(table, row, 1, 2);
- LV_LOG("%s,%s\r\n", scenes[i].name, buf);
+ //LV_LOG("%s,%s\r\n", scenes[i].name, buf);
row++;
}
@@ -783,14 +873,14 @@ static void generate_report(void)
lv_snprintf(buf, sizeof(buf), "%s + opa", scenes[i].name);
lv_table_set_cell_value(table, row, 0, buf);
- LV_LOG("%s,", buf);
+ //LV_LOG("%s,", buf);
lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_opa);
lv_table_set_cell_value(table, row, 1, buf);
// lv_table_set_cell_type(table, row, 0, 2);
// lv_table_set_cell_type(table, row, 1, 2);
- LV_LOG("%s\r\n", buf);
+ //LV_LOG("%s\r\n", buf);
row++;
}
@@ -835,7 +925,6 @@ static void generate_report(void)
lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_opa);
lv_table_set_cell_value(table, row, 1, buf);
-
if(scenes[i].fps_opa < 10) {
// lv_table_set_cell_type(table, row, 0, 3);
// lv_table_set_cell_type(table, row, 1, 3);
@@ -855,82 +944,39 @@ static void generate_report(void)
static void report_cb(lv_timer_t * timer)
{
+ if(NULL != benchmark_finished_cb) {
+ (*benchmark_finished_cb)();
+ }
+
if(opa_mode) {
if(scene_act >= 0) {
if(scenes[scene_act].time_sum_opa == 0) scenes[scene_act].time_sum_opa = 1;
scenes[scene_act].fps_opa = (1000 * scenes[scene_act].refr_cnt_opa) / scenes[scene_act].time_sum_opa;
- if(scenes[scene_act].create_cb) scene_act++; /*If still there are scenes go to the next*/
}
- else {
- scene_act++;
- }
- opa_mode = false;
+
+ lv_label_set_text_fmt(subtitle, "Result : %"LV_PRId32" FPS",
+ scenes[scene_act].fps_opa);
+ LV_LOG("Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act].name,
+ scenes[scene_act].fps_opa);
}
else {
if(scenes[scene_act].time_sum_normal == 0) scenes[scene_act].time_sum_normal = 1;
scenes[scene_act].fps_normal = (1000 * scenes[scene_act].refr_cnt_normal) / scenes[scene_act].time_sum_normal;
- opa_mode = true;
- }
- if(opa_mode) {
- lv_label_set_text_fmt(subtitle, "Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name,
+ lv_label_set_text_fmt(subtitle, "Result : %"LV_PRId32" FPS",
scenes[scene_act].fps_normal);
LV_LOG("Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name,
scenes[scene_act].fps_normal);
}
- else if(scene_act > 0) {
- lv_label_set_text_fmt(subtitle, "Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act - 1].name,
- scenes[scene_act - 1].fps_opa);
- LV_LOG("Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act - 1].name,
- scenes[scene_act - 1].fps_opa);
- }
- else {
- lv_label_set_text(subtitle, "");
- }
}
-void lv_demo_benchmark_run_scene(int_fast16_t scene_no)
-{
- benchmark_init();
-
- if(((scene_no >> 1) >= dimof(scenes))) {
- /* invalid scene number */
- return ;
- }
-
- opa_mode = scene_no & 0x01;
- scene_act = scene_no >> 1;
-
- if(scenes[scene_act].create_cb) {
- lv_label_set_text_fmt(title, "%"LV_PRId32"/%d: %s%s", scene_act * 2 + (opa_mode ? 1 : 0), (dimof(scenes) * 2) - 2,
- scenes[scene_act].name, opa_mode ? " + opa" : "");
- if(opa_mode) {
- lv_label_set_text_fmt(subtitle, "Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name,
- scenes[scene_act].fps_normal);
- }
- else {
- if(scene_act > 0) {
- lv_label_set_text_fmt(subtitle, "Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act - 1].name,
- scenes[scene_act - 1].fps_opa);
- }
- else {
- lv_label_set_text(subtitle, "");
- }
- }
-
- rnd_reset();
- scenes[scene_act].create_cb();
-
- lv_timer_t * t = lv_timer_create(report_cb, SCENE_TIME, NULL);
- lv_timer_set_repeat_count(t, 1);
- }
-}
-
-static void scene_next_task_cb(lv_timer_t * timer)
+static void next_scene_timer_cb(lv_timer_t * timer)
{
LV_UNUSED(timer);
lv_obj_clean(scene_bg);
+ next_scene_timer = NULL;
+
if(opa_mode) {
if(scene_act >= 0) {
if(scenes[scene_act].time_sum_opa == 0) scenes[scene_act].time_sum_opa = 1;
@@ -949,8 +995,8 @@ static void scene_next_task_cb(lv_timer_t * timer)
}
if(scenes[scene_act].create_cb) {
- lv_label_set_text_fmt(title, "%"LV_PRId32"/%d: %s%s", scene_act * 2 + (opa_mode ? 1 : 0),
- (dimof(scenes) * 2) - 2, scenes[scene_act].name, opa_mode ? " + opa" : "");
+ lv_label_set_text_fmt(title, "%"LV_PRId32"/%"LV_PRId32": %s%s", scene_act * 2 + (opa_mode ? 1 : 0),
+ (int32_t)(dimof(scenes) * 2) - 2, scenes[scene_act].name, opa_mode ? " + opa" : "");
if(opa_mode) {
lv_label_set_text_fmt(subtitle, "Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name,
scenes[scene_act].fps_normal);
@@ -967,17 +1013,29 @@ static void scene_next_task_cb(lv_timer_t * timer)
rnd_reset();
scenes[scene_act].create_cb();
- lv_timer_t * t = lv_timer_create(scene_next_task_cb, SCENE_TIME, NULL);
- lv_timer_set_repeat_count(t, 1);
+ next_scene_timer = lv_timer_create(next_scene_timer_cb, SCENE_TIME, NULL);
+ lv_timer_set_repeat_count(next_scene_timer, 1);
}
/*Ready*/
else {
+
+ /*Restore original frame rate*/
+ if(run_max_speed) {
+ lv_timer_t * anim_timer = lv_anim_get_timer();
+ lv_timer_set_period(anim_timer, anim_ori_timer_period);
+
+ lv_disp_t * disp = lv_disp_get_default();
+ lv_timer_t * refr_timer = _lv_disp_get_refr_timer(disp);
+ if(refr_timer) {
+ lv_timer_set_period(refr_timer, disp_ori_timer_period);
+ }
+ }
+
generate_report(); /* generate report */
}
}
-
static void rect_create(lv_style_t * style)
{
uint32_t i;
@@ -995,7 +1053,6 @@ static void rect_create(lv_style_t * style)
}
}
-
static void img_create(lv_style_t * style, const void * src, bool rotate, bool zoom, bool aa)
{
uint32_t i;
@@ -1014,7 +1071,6 @@ static void img_create(lv_style_t * style, const void * src, bool rotate, bool z
}
}
-
static void txt_create(lv_style_t * style)
{
uint32_t i;
@@ -1030,7 +1086,6 @@ static void txt_create(lv_style_t * style)
}
}
-
static void line_create(lv_style_t * style)
{
static lv_point_t points[OBJ_NUM][LINE_POINT_NUM];
@@ -1045,7 +1100,6 @@ static void line_create(lv_style_t * style)
points[i][j].y = rnd_next(LINE_POINT_DIFF_MIN, LINE_POINT_DIFF_MAX);
}
-
lv_obj_t * obj = lv_line_create(scene_bg);
lv_obj_remove_style_all(obj);
lv_obj_add_style(obj, style, 0);
@@ -1058,6 +1112,10 @@ static void line_create(lv_style_t * style)
}
}
+static void arc_anim_end_angle_cb(void * var, int32_t v)
+{
+ lv_arc_set_end_angle(var, v);
+}
static void arc_create(lv_style_t * style)
{
@@ -1076,7 +1134,7 @@ static void arc_create(lv_style_t * style)
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
- lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_arc_set_end_angle);
+ lv_anim_set_exec_cb(&a, arc_anim_end_angle_cb);
lv_anim_set_values(&a, 0, 359);
lv_anim_set_time(&a, t);
lv_anim_set_playback_time(&a, t);
@@ -1087,6 +1145,10 @@ static void arc_create(lv_style_t * style)
}
}
+static void fall_anim_y_cb(void * var, int32_t v)
+{
+ lv_obj_set_y(var, v);
+}
static void fall_anim(lv_obj_t * obj)
{
@@ -1097,7 +1159,7 @@ static void fall_anim(lv_obj_t * obj)
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
- lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_obj_set_y);
+ lv_anim_set_exec_cb(&a, fall_anim_y_cb);
lv_anim_set_values(&a, 0, lv_obj_get_height(scene_bg) - lv_obj_get_height(obj));
lv_anim_set_time(&a, t);
lv_anim_set_playback_time(&a, t);
diff --git a/lib/lvgl/demos/benchmark/lv_demo_benchmark.h b/lib/lvgl/demos/benchmark/lv_demo_benchmark.h
index 3a85d4f..693861e 100644
--- a/lib/lvgl/demos/benchmark/lv_demo_benchmark.h
+++ b/lib/lvgl/demos/benchmark/lv_demo_benchmark.h
@@ -22,14 +22,25 @@ extern "C" {
/**********************
* TYPEDEFS
**********************/
+typedef void finished_cb_t(void);
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_demo_benchmark(void);
+void lv_demo_benchmark_close(void);
+
void lv_demo_benchmark_run_scene(int_fast16_t scene_no);
+void lv_demo_benchmark_set_finished_cb(finished_cb_t * finished_cb);
+
+/**
+ * Make the benchmark work at the highest frame rate
+ * @param en true: highest frame rate; false: default frame rate
+ */
+void lv_demo_benchmark_set_max_speed(bool en);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/demos/benchmark/screenshot1.png b/lib/lvgl/demos/benchmark/screenshot1.png
deleted file mode 100644
index 845f2be..0000000
Binary files a/lib/lvgl/demos/benchmark/screenshot1.png and /dev/null differ
diff --git a/lib/lvgl/demos/benchmark/screenshot2.png b/lib/lvgl/demos/benchmark/screenshot2.png
deleted file mode 100644
index 0a0023b..0000000
Binary files a/lib/lvgl/demos/benchmark/screenshot2.png and /dev/null differ
diff --git a/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.c b/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.c
index c20af7d..0f4006e 100644
--- a/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.c
+++ b/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.c
@@ -46,8 +46,11 @@ static lv_obj_t * t2;
void lv_demo_keypad_encoder(void)
{
- g = lv_group_create();
- lv_group_set_default(g);
+ g = lv_group_get_default();
+ if(g == NULL) {
+ g = lv_group_create();
+ lv_group_set_default(g);
+ }
lv_indev_t * cur_drv = NULL;
for(;;) {
@@ -76,6 +79,12 @@ void lv_demo_keypad_encoder(void)
msgbox_create();
}
+void lv_demo_keypad_encoder_close(void)
+{
+ lv_obj_clean(lv_scr_act());
+ lv_obj_clean(lv_layer_top());
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -166,9 +175,6 @@ static void msgbox_create(void)
lv_obj_add_event_cb(mbox, msgbox_event_cb, LV_EVENT_ALL, NULL);
lv_group_focus_obj(lv_msgbox_get_btns(mbox));
lv_obj_add_state(lv_msgbox_get_btns(mbox), LV_STATE_FOCUS_KEY);
-#if LV_EX_MOUSEWHEEL
- lv_group_set_editing(g, true);
-#endif
lv_group_focus_freeze(g, true);
lv_obj_align(mbox, LV_ALIGN_CENTER, 0, 0);
diff --git a/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.h b/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.h
index c509d66..1916670 100644
--- a/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.h
+++ b/lib/lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.h
@@ -27,6 +27,7 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
void lv_demo_keypad_encoder(void);
+void lv_demo_keypad_encoder_close(void);
/**********************
* MACROS
diff --git a/lib/lvgl/demos/keypad_encoder/screenshot1.gif b/lib/lvgl/demos/keypad_encoder/screenshot1.gif
deleted file mode 100644
index 67222ad..0000000
Binary files a/lib/lvgl/demos/keypad_encoder/screenshot1.gif and /dev/null differ
diff --git a/lib/lvgl/demos/keypad_encoder/screenshot1.png b/lib/lvgl/demos/keypad_encoder/screenshot1.png
deleted file mode 100644
index 4b54ed5..0000000
Binary files a/lib/lvgl/demos/keypad_encoder/screenshot1.png and /dev/null differ
diff --git a/lib/lvgl/demos/lv_demos.h b/lib/lvgl/demos/lv_demos.h
index 46053e1..1a45ddc 100644
--- a/lib/lvgl/demos/lv_demos.h
+++ b/lib/lvgl/demos/lv_demos.h
@@ -47,7 +47,6 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
-
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/demos/music/README.md b/lib/lvgl/demos/music/README.md
index 1abd7f8..90e9fd2 100644
--- a/lib/lvgl/demos/music/README.md
+++ b/lib/lvgl/demos/music/README.md
@@ -4,7 +4,7 @@
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
-
+
## Run the demo
- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_MUSIC 1`
diff --git a/lib/lvgl/demos/music/lv_demo_music.c b/lib/lvgl/demos/music/lv_demo_music.c
index cb72ed1..7393dfd 100644
--- a/lib/lvgl/demos/music/lv_demo_music.c
+++ b/lib/lvgl/demos/music/lv_demo_music.c
@@ -103,6 +103,12 @@ static const uint32_t time_list[] = {
2 * 60 + 19,
};
+#if LV_DEMO_MUSIC_AUTO_PLAY
+ static lv_timer_t * auto_step_timer;
+#endif
+
+static lv_color_t original_screen_bg_color;
+
/**********************
* MACROS
**********************/
@@ -113,16 +119,33 @@ static const uint32_t time_list[] = {
void lv_demo_music(void)
{
+ original_screen_bg_color = lv_obj_get_style_bg_color(lv_scr_act(), 0);
lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x343247), 0);
list = _lv_demo_music_list_create(lv_scr_act());
ctrl = _lv_demo_music_main_create(lv_scr_act());
#if LV_DEMO_MUSIC_AUTO_PLAY
- lv_timer_create(auto_step_cb, 1000, NULL);
+ auto_step_timer = lv_timer_create(auto_step_cb, 1000, NULL);
#endif
}
+void lv_demo_music_close(void)
+{
+ /*Delete all aniamtions*/
+ lv_anim_del(NULL, NULL);
+
+#if LV_DEMO_MUSIC_AUTO_PLAY
+ lv_timer_del(auto_step_timer);
+#endif
+ _lv_demo_music_list_close();
+ _lv_demo_music_main_close();
+
+ lv_obj_clean(lv_scr_act());
+
+ lv_obj_set_style_bg_color(lv_scr_act(), original_screen_bg_color, 0);
+}
+
const char * _lv_demo_music_get_title(uint32_t track_id)
{
if(track_id >= sizeof(title_list) / sizeof(title_list[0])) return NULL;
diff --git a/lib/lvgl/demos/music/lv_demo_music.h b/lib/lvgl/demos/music/lv_demo_music.h
index d17b539..3c393d6 100644
--- a/lib/lvgl/demos/music/lv_demo_music.h
+++ b/lib/lvgl/demos/music/lv_demo_music.h
@@ -36,9 +36,11 @@ extern "C" {
**********************/
void lv_demo_music(void);
-const char *_lv_demo_music_get_title(uint32_t track_id);
-const char *_lv_demo_music_get_artist(uint32_t track_id);
-const char *_lv_demo_music_get_genre(uint32_t track_id);
+void lv_demo_music_close(void);
+
+const char * _lv_demo_music_get_title(uint32_t track_id);
+const char * _lv_demo_music_get_artist(uint32_t track_id);
+const char * _lv_demo_music_get_genre(uint32_t track_id);
uint32_t _lv_demo_music_get_track_length(uint32_t track_id);
/**********************
diff --git a/lib/lvgl/demos/music/lv_demo_music_list.c b/lib/lvgl/demos/music/lv_demo_music_list.c
index 88e79ec..52b9491 100644
--- a/lib/lvgl/demos/music/lv_demo_music_list.c
+++ b/lib/lvgl/demos/music/lv_demo_music_list.c
@@ -130,6 +130,18 @@ lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent)
return list;
}
+void _lv_demo_music_list_close(void)
+{
+ lv_style_reset(&style_scrollbar);
+ lv_style_reset(&style_btn);
+ lv_style_reset(&style_btn_pr);
+ lv_style_reset(&style_btn_chk);
+ lv_style_reset(&style_btn_dis);
+ lv_style_reset(&style_title);
+ lv_style_reset(&style_artist);
+ lv_style_reset(&style_time);
+}
+
void _lv_demo_music_list_btn_check(uint32_t track_id, bool state)
{
lv_obj_t * btn = lv_obj_get_child(list, track_id);
@@ -205,7 +217,6 @@ static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id)
return btn;
}
-
static void btn_click_event_cb(lv_event_t * e)
{
lv_obj_t * btn = lv_event_get_target(e);
@@ -215,4 +226,3 @@ static void btn_click_event_cb(lv_event_t * e)
_lv_demo_music_play(idx);
}
#endif /*LV_USE_DEMO_MUSIC*/
-
diff --git a/lib/lvgl/demos/music/lv_demo_music_list.h b/lib/lvgl/demos/music/lv_demo_music_list.h
index 48e6e17..d03c6d1 100644
--- a/lib/lvgl/demos/music/lv_demo_music_list.h
+++ b/lib/lvgl/demos/music/lv_demo_music_list.h
@@ -28,6 +28,8 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent);
+void _lv_demo_music_list_close(void);
+
void _lv_demo_music_list_btn_check(uint32_t track_id, bool state);
/**********************
diff --git a/lib/lvgl/demos/music/lv_demo_music_main.c b/lib/lvgl/demos/music/lv_demo_music_main.c
index 8f5e5bd..45a8054 100644
--- a/lib/lvgl/demos/music/lv_demo_music_main.c
+++ b/lib/lvgl/demos/music/lv_demo_music_main.c
@@ -60,8 +60,9 @@ static void prev_click_event_cb(lv_event_t * e);
static void next_click_event_cb(lv_event_t * e);
static void timer_cb(lv_timer_t * t);
static void track_load(uint32_t id);
-static void stop_start_anim(lv_timer_t * t);
+static void stop_start_anim_timer_cb(lv_timer_t * t);
static void spectrum_end_cb(lv_anim_t * a);
+static void album_fade_anim_cb(void * var, int32_t v);
static int32_t get_cos(int32_t deg, int32_t a);
static int32_t get_sin(int32_t deg, int32_t a);
@@ -83,6 +84,7 @@ static uint32_t spectrum_lane_ofs_start = 0;
static uint32_t bar_rot = 0;
static uint32_t time_act;
static lv_timer_t * sec_counter_timer;
+static lv_timer_t * stop_start_anim_timer;
static const lv_font_t * font_small;
static const lv_font_t * font_large;
static uint32_t track_id;
@@ -231,8 +233,8 @@ lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent)
start_anim = true;
- lv_timer_t * timer = lv_timer_create(stop_start_anim, INTRO_TIME + 6000, NULL);
- lv_timer_set_repeat_count(timer, 1);
+ stop_start_anim_timer = lv_timer_create(stop_start_anim_timer_cb, INTRO_TIME + 6000, NULL);
+ lv_timer_set_repeat_count(stop_start_anim_timer, 1);
lv_anim_init(&a);
lv_anim_set_path_cb(&a, lv_anim_path_bounce);
@@ -291,6 +293,12 @@ lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent)
return main_cont;
}
+void _lv_demo_music_main_close(void)
+{
+ if(stop_start_anim_timer) lv_timer_del(stop_start_anim_timer);
+ lv_timer_del(sec_counter_timer);
+}
+
void _lv_demo_music_album_next(bool next)
{
uint32_t id = track_id;
@@ -667,9 +675,14 @@ static void track_load(uint32_t id)
lv_label_set_text(artist_label, _lv_demo_music_get_artist(track_id));
lv_label_set_text(genre_label, _lv_demo_music_get_genre(track_id));
- lv_obj_fade_out(album_img_obj, 500, 0);
-
lv_anim_t a;
+ lv_anim_init(&a);
+ lv_anim_set_var(&a, album_img_obj);
+ lv_anim_set_values(&a, lv_obj_get_style_img_opa(album_img_obj, 0), LV_OPA_TRANSP);
+ lv_anim_set_exec_cb(&a, album_fade_anim_cb);
+ lv_anim_set_time(&a, 500);
+ lv_anim_start(&a);
+
lv_anim_init(&a);
lv_anim_set_var(&a, album_img_obj);
lv_anim_set_time(&a, 500);
@@ -702,7 +715,6 @@ static void track_load(uint32_t id)
lv_anim_start(&a);
album_img_obj = album_img_create(spectrum_obj);
- lv_obj_fade_in(album_img_obj, 500, 100);
lv_anim_set_path_cb(&a, lv_anim_path_overshoot);
lv_anim_set_var(&a, album_img_obj);
@@ -712,6 +724,14 @@ static void track_load(uint32_t id)
lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb);
lv_anim_set_ready_cb(&a, NULL);
lv_anim_start(&a);
+
+ lv_anim_init(&a);
+ lv_anim_set_var(&a, album_img_obj);
+ lv_anim_set_values(&a, 0, LV_OPA_COVER);
+ lv_anim_set_exec_cb(&a, album_fade_anim_cb);
+ lv_anim_set_time(&a, 500);
+ lv_anim_set_delay(&a, 100);
+ lv_anim_start(&a);
}
int32_t get_cos(int32_t deg, int32_t a)
@@ -749,7 +769,7 @@ static void spectrum_draw_event_cb(lv_event_t * e)
lv_obj_t * obj = lv_event_get_target(e);
lv_draw_ctx_t * draw_ctx = lv_event_get_draw_ctx(e);
- lv_opa_t opa = lv_obj_get_style_opa(obj, LV_PART_MAIN);
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN);
if(opa < LV_OPA_MIN) return;
lv_point_t poly[4];
@@ -961,7 +981,6 @@ static void next_click_event_cb(lv_event_t * e)
}
}
-
static void timer_cb(lv_timer_t * t)
{
LV_UNUSED(t);
@@ -976,12 +995,16 @@ static void spectrum_end_cb(lv_anim_t * a)
_lv_demo_music_album_next(true);
}
-
-static void stop_start_anim(lv_timer_t * t)
+static void stop_start_anim_timer_cb(lv_timer_t * t)
{
LV_UNUSED(t);
start_anim = false;
+ stop_start_anim_timer = NULL;
lv_obj_refresh_ext_draw_size(spectrum_obj);
}
-#endif /*LV_USE_DEMO_MUSIC*/
+static void album_fade_anim_cb(void * var, int32_t v)
+{
+ lv_obj_set_style_img_opa(var, v, 0);
+}
+#endif /*LV_USE_DEMO_MUSIC*/
diff --git a/lib/lvgl/demos/music/lv_demo_music_main.h b/lib/lvgl/demos/music/lv_demo_music_main.h
index a2cf939..a190f00 100644
--- a/lib/lvgl/demos/music/lv_demo_music_main.h
+++ b/lib/lvgl/demos/music/lv_demo_music_main.h
@@ -28,6 +28,8 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent);
+void _lv_demo_music_main_close(void);
+
void _lv_demo_music_play(uint32_t id);
void _lv_demo_music_resume(void);
void _lv_demo_music_pause(void);
@@ -38,7 +40,6 @@ void _lv_demo_music_album_next(bool next);
**********************/
#endif /*LV_USE_DEMO_MUSIC*/
-
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/lib/lvgl/demos/music/screenshot1.gif b/lib/lvgl/demos/music/screenshot1.gif
deleted file mode 100644
index 33b0f27..0000000
Binary files a/lib/lvgl/demos/music/screenshot1.gif and /dev/null differ
diff --git a/lib/lvgl/demos/stress/README.md b/lib/lvgl/demos/stress/README.md
index 72f5920..df6ad10 100644
--- a/lib/lvgl/demos/stress/README.md
+++ b/lib/lvgl/demos/stress/README.md
@@ -5,7 +5,7 @@
A stress test for LVGL.
It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
-
+
## Run the demo
- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_STRESS 1`
diff --git a/lib/lvgl/demos/stress/lv_demo_stress.c b/lib/lvgl/demos/stress/lv_demo_stress.c
index b247443..2b59707 100644
--- a/lib/lvgl/demos/stress/lv_demo_stress.c
+++ b/lib/lvgl/demos/stress/lv_demo_stress.c
@@ -25,7 +25,7 @@ static void msgbox_del(lv_timer_t * tmr);
static void set_y_anim(void * obj, int32_t v);
static void set_width_anim(void * obj, int32_t v);
static void arc_set_end_angle_anim(void * obj, int32_t v);
-static void obj_test_task_cb(lv_timer_t * tmr);
+static void obj_test_timer_cb(lv_timer_t * tmr);
/**********************
* STATIC VARIABLES
@@ -34,6 +34,10 @@ static lv_obj_t * main_page;
static lv_obj_t * ta;
static const char * mbox_btns[] = {"Ok", "Cancel", ""};
static uint32_t mem_free_start = 0;
+static lv_timer_t * obj_test_timer;
+static int16_t state;
+static lv_timer_t * msgbox_tmr;
+
/**********************
* MACROS
**********************/
@@ -45,23 +49,34 @@ static uint32_t mem_free_start = 0;
void lv_demo_stress(void)
{
LV_LOG_USER("Starting stress test. (< 100 bytes permanent memory leak is normal due to fragmentation)");
- lv_timer_create(obj_test_task_cb, LV_DEMO_STRESS_TIME_STEP, NULL);
+ obj_test_timer = lv_timer_create(obj_test_timer_cb, LV_DEMO_STRESS_TIME_STEP, NULL);
+ state = -1;
+}
+
+void lv_demo_stress_close(void)
+{
+ lv_timer_del(obj_test_timer);
+ obj_test_timer = NULL;
+ if(msgbox_tmr) {
+ lv_timer_del(msgbox_tmr);
+ msgbox_tmr = NULL;
+ }
+
+ lv_obj_clean(lv_scr_act());
+ lv_obj_clean(lv_layer_top());
}
/**********************
* STATIC FUNCTIONS
**********************/
-static void obj_test_task_cb(lv_timer_t * tmr)
+static void obj_test_timer_cb(lv_timer_t * tmr)
{
(void) tmr; /*Unused*/
- static int16_t state = -1;
lv_anim_t a;
lv_obj_t * obj;
- // printf("step start: %d\n", state);
-
switch(state) {
case -1: {
lv_res_t res = lv_mem_test();
@@ -83,7 +98,6 @@ static void obj_test_task_cb(lv_timer_t * tmr)
lv_obj_set_size(main_page, LV_HOR_RES / 2, LV_VER_RES);
lv_obj_set_flex_flow(main_page, LV_FLEX_FLOW_COLUMN);
-
obj = lv_btn_create(main_page);
lv_obj_set_size(obj, 100, 70);
obj = lv_label_create(obj);
@@ -246,8 +260,7 @@ static void obj_test_task_cb(lv_timer_t * tmr)
case 14:
obj = lv_msgbox_create(NULL, "Title", "Some text on the message box with average length", mbox_btns, true);
-
- lv_timer_t * msgbox_tmr = lv_timer_create(msgbox_del, LV_DEMO_STRESS_TIME_STEP * 5 + 30, obj);
+ msgbox_tmr = lv_timer_create(msgbox_del, LV_DEMO_STRESS_TIME_STEP * 5 + 30, obj);
lv_timer_set_repeat_count(msgbox_tmr, 1);
lv_obj_align(obj, LV_ALIGN_RIGHT_MID, -10, 0);
break;
@@ -439,6 +452,7 @@ static void auto_del(lv_obj_t * obj, uint32_t delay)
static void msgbox_del(lv_timer_t * tmr)
{
+ msgbox_tmr = NULL;
lv_msgbox_close(tmr->user_data);
}
diff --git a/lib/lvgl/demos/stress/lv_demo_stress.h b/lib/lvgl/demos/stress/lv_demo_stress.h
index f718366..aacc9e1 100644
--- a/lib/lvgl/demos/stress/lv_demo_stress.h
+++ b/lib/lvgl/demos/stress/lv_demo_stress.h
@@ -30,6 +30,8 @@ extern "C" {
**********************/
void lv_demo_stress(void);
+void lv_demo_stress_close(void);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/demos/stress/screenshot1.gif b/lib/lvgl/demos/stress/screenshot1.gif
deleted file mode 100644
index 0c1a9b7..0000000
Binary files a/lib/lvgl/demos/stress/screenshot1.gif and /dev/null differ
diff --git a/lib/lvgl/demos/stress/screenshot1.png b/lib/lvgl/demos/stress/screenshot1.png
deleted file mode 100644
index e5a1436..0000000
Binary files a/lib/lvgl/demos/stress/screenshot1.png and /dev/null differ
diff --git a/lib/lvgl/demos/widgets/assets/avatar.png b/lib/lvgl/demos/widgets/assets/avatar.png
deleted file mode 100644
index 39c8043..0000000
Binary files a/lib/lvgl/demos/widgets/assets/avatar.png and /dev/null differ
diff --git a/lib/lvgl/demos/widgets/assets/clothes.png b/lib/lvgl/demos/widgets/assets/clothes.png
deleted file mode 100644
index f6369c8..0000000
Binary files a/lib/lvgl/demos/widgets/assets/clothes.png and /dev/null differ
diff --git a/lib/lvgl/demos/widgets/assets/lvgl_logo.png b/lib/lvgl/demos/widgets/assets/lvgl_logo.png
deleted file mode 100644
index b032d1b..0000000
Binary files a/lib/lvgl/demos/widgets/assets/lvgl_logo.png and /dev/null differ
diff --git a/lib/lvgl/demos/widgets/lv_demo_widgets.c b/lib/lvgl/demos/widgets/lv_demo_widgets.c
index e9586b6..dad25c3 100644
--- a/lib/lvgl/demos/widgets/lv_demo_widgets.c
+++ b/lib/lvgl/demos/widgets/lv_demo_widgets.c
@@ -86,6 +86,8 @@ static uint32_t session_desktop = 1000;
static uint32_t session_tablet = 1000;
static uint32_t session_mobile = 1000;
+static lv_timer_t * meter2_timer;
+
/**********************
* MACROS
**********************/
@@ -196,6 +198,22 @@ void lv_demo_widgets(void)
color_changer_create(tv);
}
+void lv_demo_widgets_close(void)
+{
+ /*Delete all animation*/
+ lv_anim_del(NULL, NULL);
+
+ lv_timer_del(meter2_timer);
+ meter2_timer = NULL;
+
+ lv_obj_clean(lv_scr_act());
+
+ lv_style_reset(&style_text_muted);
+ lv_style_reset(&style_title);
+ lv_style_reset(&style_icon);
+ lv_style_reset(&style_bullet);
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -340,7 +358,6 @@ static void profile_create(lv_obj_t * parent)
LV_GRID_TEMPLATE_LAST
};
-
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
lv_obj_set_grid_cell(panel1, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
@@ -368,7 +385,6 @@ static void profile_create(lv_obj_t * parent)
lv_obj_set_grid_cell(gender, LV_GRID_ALIGN_STRETCH, 0, 1, LV_GRID_ALIGN_CENTER, 6, 1);
lv_obj_set_grid_cell(gender_label, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 5, 1);
-
lv_obj_set_grid_cell(panel3, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_STRETCH, 1, 1);
lv_obj_set_grid_dsc_array(panel3, grid_2_col_dsc, grid_2_row_dsc);
lv_obj_set_grid_cell(panel3_title, LV_GRID_ALIGN_START, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
@@ -383,7 +399,6 @@ static void profile_create(lv_obj_t * parent)
static lv_coord_t grid_main_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static lv_coord_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
-
/*Create the top panel*/
static lv_coord_t grid_1_col_dsc[] = {LV_GRID_CONTENT, 1, LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static lv_coord_t grid_1_row_dsc[] = {
@@ -411,7 +426,6 @@ static void profile_create(lv_obj_t * parent)
LV_GRID_TEMPLATE_LAST
};
-
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
lv_obj_set_grid_cell(panel1, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
@@ -456,7 +470,6 @@ static void profile_create(lv_obj_t * parent)
static lv_coord_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
-
/*Create the top panel*/
static lv_coord_t grid_1_col_dsc[] = {LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static lv_coord_t grid_1_row_dsc[] = {LV_GRID_CONTENT, /*Avatar*/
@@ -471,7 +484,6 @@ static void profile_create(lv_obj_t * parent)
lv_obj_set_grid_dsc_array(panel1, grid_1_col_dsc, grid_1_row_dsc);
-
static lv_coord_t grid_2_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static lv_coord_t grid_2_row_dsc[] = {
LV_GRID_CONTENT, /*Title*/
@@ -526,7 +538,6 @@ static void profile_create(lv_obj_t * parent)
}
}
-
static void analytics_create(lv_obj_t * parent)
{
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_ROW_WRAP);
@@ -698,7 +709,7 @@ static void analytics_create(lv_obj_t * parent)
lv_meter_set_indicator_start_value(meter2, meter2_indic[2], 70);
lv_meter_set_indicator_end_value(meter2, meter2_indic[2], 99);
- lv_timer_create(meter2_timer_cb, 100, meter2_indic);
+ meter2_timer = lv_timer_create(meter2_timer_cb, 100, meter2_indic);
meter3 = create_meter_box(parent, "Network Speed", "Low speed", "Normal Speed", "High Speed");
if(disp_size < DISP_LARGE) lv_obj_add_flag(lv_obj_get_parent(meter3), LV_OBJ_FLAG_FLEX_IN_NEW_TRACK);
@@ -840,7 +851,6 @@ void shop_create(lv_obj_t * parent)
lv_obj_set_size(chart3, lv_pct(100), lv_pct(100));
lv_obj_set_style_pad_column(chart3, LV_DPX(30), 0);
-
lv_obj_set_grid_dsc_array(panel1, grid1_col_dsc, grid1_row_dsc);
lv_obj_set_grid_cell(title, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 0, 1);
lv_obj_set_grid_cell(date, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 1, 1);
@@ -956,7 +966,6 @@ void shop_create(lv_obj_t * parent)
cb = lv_checkbox_create(notifications);
lv_checkbox_set_text(cb, "Out of stock");
-
}
static void color_changer_create(lv_obj_t * parent)
@@ -1083,10 +1092,10 @@ static void color_event_cb(lv_event_t * e)
lv_palette_t * palette_primary = lv_event_get_user_data(e);
lv_palette_t palette_secondary = (*palette_primary) + 3; /*Use another palette as secondary*/
if(palette_secondary >= _LV_PALETTE_LAST) palette_secondary = 0;
-
+#if LV_USE_THEME_DEFAULT
lv_theme_default_init(NULL, lv_palette_main(*palette_primary), lv_palette_main(palette_secondary),
LV_THEME_DEFAULT_DARK, font_normal);
-
+#endif
lv_color_t color = lv_palette_main(*palette_primary);
lv_style_set_text_color(&style_icon, color);
lv_chart_set_series_color(chart1, ser1, color);
@@ -1162,7 +1171,6 @@ static lv_obj_t * create_meter_box(lv_obj_t * parent, const char * title, const
lv_obj_set_grid_cell(label3, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_START, 4, 1);
}
-
return meter;
}
@@ -1380,7 +1388,6 @@ static void chart_event_cb(lv_event_t * e)
}
#endif
-
const lv_chart_series_t * ser = dsc->sub_part_ptr;
if(lv_chart_get_pressed_point(obj) == dsc->id) {
@@ -1446,7 +1453,6 @@ static void chart_event_cb(lv_event_t * e)
}
}
-
static void shop_chart_event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -1498,7 +1504,6 @@ static void shop_chart_event_cb(lv_event_t * e)
}
}
-
static void meter1_indic1_anim_cb(void * var, int32_t v)
{
lv_meter_set_indicator_end_value(meter1, var, v);
@@ -1535,7 +1540,6 @@ static void meter2_timer_cb(lv_timer_t * timer)
static bool down2 = false;
static bool down3 = false;
-
if(down1) {
session_desktop -= 137;
if(session_desktop < 1400) down1 = false;
diff --git a/lib/lvgl/demos/widgets/lv_demo_widgets.h b/lib/lvgl/demos/widgets/lv_demo_widgets.h
index 66dddaf..8d70df1 100644
--- a/lib/lvgl/demos/widgets/lv_demo_widgets.h
+++ b/lib/lvgl/demos/widgets/lv_demo_widgets.h
@@ -27,6 +27,7 @@ extern "C" {
* GLOBAL PROTOTYPES
**********************/
void lv_demo_widgets(void);
+void lv_demo_widgets_close(void);
/**********************
* MACROS
diff --git a/lib/lvgl/demos/widgets/screenshot1.gif b/lib/lvgl/demos/widgets/screenshot1.gif
deleted file mode 100644
index 74cda6f..0000000
Binary files a/lib/lvgl/demos/widgets/screenshot1.gif and /dev/null differ
diff --git a/lib/lvgl/demos/widgets/screenshot1.png b/lib/lvgl/demos/widgets/screenshot1.png
deleted file mode 100644
index 33736f8..0000000
Binary files a/lib/lvgl/demos/widgets/screenshot1.png and /dev/null differ
diff --git a/lib/lvgl/docs/CHANGELOG.md b/lib/lvgl/docs/CHANGELOG.md
deleted file mode 100644
index 42edfa1..0000000
--- a/lib/lvgl/docs/CHANGELOG.md
+++ /dev/null
@@ -1,1475 +0,0 @@
-# Changelog
-
-
-## [v8.2.0](https://github.com/littlevgl/lvgl/compare/v8.1.0...v8.2.0) 31 January 2022
-
-
-### Overview
-
-Among many fixes and minor updates these are the most important features in v8.2.0:
-- Abstract render layer to make it easier to attach external draw engines
-- Add `LV_FLAD_OVERFLOW_VISIBLE`. If enabled the children of an object won't be clipped to the boundary of the object
-- Add ffmpeg decoder support to play videos and open a wide variety of image formats
-- Add font fallback support
-- Add gradient dithering support
-- Add "monkey test"
-- Add cmsis-pack support
-- Add Grid navigation (`lv_gridnav`)
-
-The GPU support for NXP microcontrollers is still not updated to the new draw architecture. See [#3052](https://github.com/lvgl/lvgl/issues/3052)
-
-### Breaking Changes
-
-- :warning: feat(fs): add caching option for lv_fs-read [`2979`](https://github.com/littlevgl/lvgl/pull/2979)
-- :warning: feat(span): lv_spangroup_get_expand_width() adds a parameter [`2968`](https://github.com/littlevgl/lvgl/pull/2968)
-- :warning: arch(draw): allow replacing the draw engine [`db53ea9`](https://github.com/littlevgl/lvgl/commit/db53ea925c9502b20f38db0fc30c4ef599bdfc33)
-- :warning: indexed images are not chroma keyed. Use the alpha chaneel instead.
-
-### Architectural
-
-- arch(draw): separate SW renderer to allow replacing it [`2803`](https://github.com/littlevgl/lvgl/pull/2803)
-- arch: merge lv_demos [`5414652`](https://github.com/littlevgl/lvgl/commit/5414652a4108dc6761b859fbb48a43e37e67a37a)
-- arch(sdl): migrated to use new backend architecture [`2840`](https://github.com/littlevgl/lvgl/pull/2840)
-- arch(env): move rt-thread into env_support folder [`3025`](https://github.com/littlevgl/lvgl/pull/3025)
-- arch(env): arch(env): move the cmake folder into the env_support folder [`773d50f`](https://github.com/littlevgl/lvgl/commit/773d50f0acafa279fa7440ddcf15e80cf07eda54)
-- arch(env): move the zephyr folder into the env_support folder [`4bd1e7e`](https://github.com/littlevgl/lvgl/commit/4bd1e7e9f7acc5295b65440477e76a048094afbf)
-
-### New Features
-
-- feat(cmsis-pack): prepare for lvgl v8.2.0 release [`3062`](https://github.com/littlevgl/lvgl/pull/3062)
-- feat(gridnav): add lv_gridnav [`2911`](https://github.com/littlevgl/lvgl/pull/2911)
-- feat: update the cmsis-pack to 0.8.3 [`3021`](https://github.com/littlevgl/lvgl/pull/3021)
-- feat(sdl): support rounded images [`3012`](https://github.com/littlevgl/lvgl/pull/3012)
-- feat(cmsis-pack): add cmsis-pack support [`2993`](https://github.com/littlevgl/lvgl/pull/2993)
-- feat(event): add preprocessing and stop bubbling features for events [`3003`](https://github.com/littlevgl/lvgl/pull/3003)
-- feat(draw): add gradient dithering support [`2872`](https://github.com/littlevgl/lvgl/pull/2872)
-- feat(symbols): add guards to LV_SYMBOL_* to allow redefining them [`2973`](https://github.com/littlevgl/lvgl/pull/2973)
-- feat(obj): subdivide LV_OBJ_FLAG_SCROLL_CHAIN into ...CHAIN_HOR and ...CHAIN_VER [`2961`](https://github.com/littlevgl/lvgl/pull/2961)
-- feat(draw): add draw_bg callback to draw_ctx #2934 [`2935`](https://github.com/littlevgl/lvgl/pull/2935)
-- feat(docs): add Chinese readme [`2919`](https://github.com/littlevgl/lvgl/pull/2919)
-- feat(txt): add used_width parameter to _lv_txt_get_next_line() [`2898`](https://github.com/littlevgl/lvgl/pull/2898)
-- feat(others) add monkey test [`2885`](https://github.com/littlevgl/lvgl/pull/2885)
-- feat(rlottie): add animation control options [`2857`](https://github.com/littlevgl/lvgl/pull/2857)
-- feat(lv_hal_indev): add missing lv_indev_delete() [`2854`](https://github.com/littlevgl/lvgl/pull/2854)
-- feat(freetype): optimize memory allocation [`2849`](https://github.com/littlevgl/lvgl/pull/2849)
-- feat(Kconfig): add FreeType config [`2846`](https://github.com/littlevgl/lvgl/pull/2846)
-- feat(widgets): add menu widget [`2603`](https://github.com/littlevgl/lvgl/pull/2603)
-- feat(refr): add reset function for FPS statistics [`2832`](https://github.com/littlevgl/lvgl/pull/2832)
-- feat(Kconfig): add monitor position configuration [`2834`](https://github.com/littlevgl/lvgl/pull/2834)
-- feat(examples) add micropython versions of the external library examples [`2762`](https://github.com/littlevgl/lvgl/pull/2762)
-- feat(freetype): support bold and italic [`2824`](https://github.com/littlevgl/lvgl/pull/2824)
-- feat(font) add fallback support and mem. font load option to FreeType [`2796`](https://github.com/littlevgl/lvgl/pull/2796)
-- feat(lib) add ffmpeg video and image decoder [`2805`](https://github.com/littlevgl/lvgl/pull/2805)
-- feat(obj): add LV_OBJ_FLAG_OVERFLOW_VISIBLE [`e7ac0e4`](https://github.com/littlevgl/lvgl/commit/e7ac0e41988e5fda772e17292c05d65bcaf58394)
-- feat(scrollbar): add more control over scrollbar paddings [`4197b2f`](https://github.com/littlevgl/lvgl/commit/4197b2fd6ebec4b4dcfeeb2c41b724e09b77d1d0)
-- feat(dropdown): keep the list on open/close for simpler styling [`9d3134b`](https://github.com/littlevgl/lvgl/commit/9d3134b66e40882c232afa79498c41294603f437)
-- feat(qrcode) use destructor instead of lv_qrcode_delete() [`318edd8`](https://github.com/littlevgl/lvgl/commit/318edd8a3f61a65be3ed15a97c0870de0ad4125a)
-- feat(disp) allow decoupling the disp_refr timer [`85cc84a`](https://github.com/littlevgl/lvgl/commit/85cc84ad947786bb3d4857290503047946a55c43)
-- feat(obj): add lv_obj_get_event_user_data() [`53ececc`](https://github.com/littlevgl/lvgl/commit/53ececc5ec6f62ee4ab47ea66a847679e3836f52)
-- feat(obj) add LV_OBJ_FLAG_SCROLL_WITH_ARROW [`70327bd`](https://github.com/littlevgl/lvgl/commit/70327bdb2d758336340c5a3b378ab876bfee2d53)
-- feat(slider): consider ext_click_area on the knob with LV_OBJ_FLAG_ADV_HITTEST [`9d3fb41`](https://github.com/littlevgl/lvgl/commit/9d3fb418969c13b93f01a6b0342a1cd8d02e9b6c)
-
-### Performance
-
-- perf(sdl): optimize the use of SDL_RenderSetClipRect [`2941`](https://github.com/littlevgl/lvgl/pull/2941)
-- perf(color): add faster lv_color_hex function [`2864`](https://github.com/littlevgl/lvgl/pull/2864)
-
-### Fixes
-
-- fix(micropython) update examples for new API [`3059`](https://github.com/littlevgl/lvgl/pull/3059)
-- fix: increase default value of LV_MEM_SIZE for lv_demo_widgets #3057 [`3058`](https://github.com/littlevgl/lvgl/pull/3058)
-- fix(cmsis-pack): fix issue #3032 [`3056`](https://github.com/littlevgl/lvgl/pull/3056)
-- fix(porting): add missing function prototypes [`3054`](https://github.com/littlevgl/lvgl/pull/3054)
-- fix(kconfig): add missing default values [`3050`](https://github.com/littlevgl/lvgl/pull/3050)
-- fix(canvas): force canvas to use sw draw [`3045`](https://github.com/littlevgl/lvgl/pull/3045)
-- fix(rt-thread): use ARCH_CPU_BIG_ENDIAN to replace RT_USING_BIG_ENDIAN [`3044`](https://github.com/littlevgl/lvgl/pull/3044)
-- fix(gradient): general cleanup and fix for alignment issues [`3036`](https://github.com/littlevgl/lvgl/pull/3036)
-- fix(draw): rendering issues for vertical gradient with and without dithering [`3034`](https://github.com/littlevgl/lvgl/pull/3034)
-- fix uninitialized variable [`3033`](https://github.com/littlevgl/lvgl/pull/3033)
-- fix(lru): lower dependency for standard C functions [`3024`](https://github.com/littlevgl/lvgl/pull/3024)
-- fix(env_support): move cmsis-pack to env_support folder [`3026`](https://github.com/littlevgl/lvgl/pull/3026)
-- fix(doc): full covering opacity is 255, not 256 [`3022`](https://github.com/littlevgl/lvgl/pull/3022)
-- fix uninitialized variables [`3023`](https://github.com/littlevgl/lvgl/pull/3023)
-- fix various issues for esp32 [`3007`](https://github.com/littlevgl/lvgl/pull/3007)
-- fix(sdl): fix clipped image drawing [`2992`](https://github.com/littlevgl/lvgl/pull/2992)
-- fix(draw): missed bg_color renaming in the draw function [`3002`](https://github.com/littlevgl/lvgl/pull/3002)
-- fix(porting): fix typo and an unmatched prototype [`2998`](https://github.com/littlevgl/lvgl/pull/2998)
-- fix(conf) add missing LV_LOG_LEVEL default definition [`2996`](https://github.com/littlevgl/lvgl/pull/2996)
-- fix(refr): crash if full_refresh = 1 [`2999`](https://github.com/littlevgl/lvgl/pull/2999)
-- fix(Kconfig): adapt to lvgl's built-in demos [`2989`](https://github.com/littlevgl/lvgl/pull/2989)
-- fix(Makefile): compilation errors [`2944`](https://github.com/littlevgl/lvgl/pull/2944)
-- fix(rlottie): fix variable name [`2971`](https://github.com/littlevgl/lvgl/pull/2971)
-- fix(group): in lv_group_del() remove group from indev (lvgl#2963) [`2964`](https://github.com/littlevgl/lvgl/pull/2964)
-- fix(obj): old parent's scroll is not updated in lv_obj_set_parent() [`2965`](https://github.com/littlevgl/lvgl/pull/2965)
-- fix(fatfs) add missing cast [`2969`](https://github.com/littlevgl/lvgl/pull/2969)
-- fix(snapshot) fix memory leak [`2970`](https://github.com/littlevgl/lvgl/pull/2970)
-- fix(examples) move event callback registration outside loop in `lv_example_event_3` [`2959`](https://github.com/littlevgl/lvgl/pull/2959)
-- fix(canvas): off by one error in size check in lv_canvas_copy_buf [`2950`](https://github.com/littlevgl/lvgl/pull/2950)
-- fix(indev) add braces to avoid compiler warning [`2947`](https://github.com/littlevgl/lvgl/pull/2947)
-- fix: fix parameter order in function prototypes [`2929`](https://github.com/littlevgl/lvgl/pull/2929)
-- fix(style):add const qualifier for lv_style_get_prop() [`2933`](https://github.com/littlevgl/lvgl/pull/2933)
-- fix(dropdown): in lv_dropdown_get_selected_str handle if there are no options [`2925`](https://github.com/littlevgl/lvgl/pull/2925)
-- fix: lv_deinit/lv_init crash or hang [`2910`](https://github.com/littlevgl/lvgl/pull/2910)
-- fix(rt-thread): improve the structure [`2912`](https://github.com/littlevgl/lvgl/pull/2912)
-- fix: removed string format warnings for int32_t and uint32_t [`2924`](https://github.com/littlevgl/lvgl/pull/2924)
-- fix(lv_fs_win32): add missing include of <stdio.h> [`2918`](https://github.com/littlevgl/lvgl/pull/2918)
-- fix: use unsigned integer literal for bit shifing. [`2888`](https://github.com/littlevgl/lvgl/pull/2888)
-- chore(lottie) move rlottie_capi.h to lv_rlottie.c [`2902`](https://github.com/littlevgl/lvgl/pull/2902)
-- fix(qrcodegen) add brackets around assert calls [`2897`](https://github.com/littlevgl/lvgl/pull/2897)
-- fix(list) guard image creation with LV_USE_IMG [`2881`](https://github.com/littlevgl/lvgl/pull/2881)
-- fix(snapshot): make fake display size big enough to avoid align issue. [`2883`](https://github.com/littlevgl/lvgl/pull/2883)
-- fix(sdl) correct makefile [`2884`](https://github.com/littlevgl/lvgl/pull/2884)
-- fix(draw): fix set_px_cb memory write overflow crash. [`2882`](https://github.com/littlevgl/lvgl/pull/2882)
-- fix(freetype): fix memset error [`2877`](https://github.com/littlevgl/lvgl/pull/2877)
-- fix(span): fix align and break word [`2861`](https://github.com/littlevgl/lvgl/pull/2861)
-- fix(refr): swap buffers only on the last area with direct mode [`2867`](https://github.com/littlevgl/lvgl/pull/2867)
-- fix(arc) free memory when drawing full-circle arc [`2869`](https://github.com/littlevgl/lvgl/pull/2869)
-- fix(indev): update lv_indev_drv_update to free the read_timer [`2850`](https://github.com/littlevgl/lvgl/pull/2850)
-- fix(draw): fix memory access out of bounds when using blend subtract [`2860`](https://github.com/littlevgl/lvgl/pull/2860)
-- fix(chart) add lv_chart_refresh() to the functions which modify the data [`2841`](https://github.com/littlevgl/lvgl/pull/2841)
-- fix(conf) mismatched macro judgment [`2843`](https://github.com/littlevgl/lvgl/pull/2843)
-- fix(ffmpeg): when disabled LV_FFMPEG_AV_DUMP_FORMAT makes av_log quiet [`2838`](https://github.com/littlevgl/lvgl/pull/2838)
-- fix(rt-thread): fix a bug of log [`2811`](https://github.com/littlevgl/lvgl/pull/2811)
-- fix(log): to allow printf and custom_print_cb to work at same time [`2837`](https://github.com/littlevgl/lvgl/pull/2837)
-- fix(keyboard): add missing functions [`2835`](https://github.com/littlevgl/lvgl/pull/2835)
-- fix(checkbox) remove unnecessary events [`2829`](https://github.com/littlevgl/lvgl/pull/2829)
-- fix(qrcode): replace memcpy() with lv_memcpy() and delete useless macros [`2827`](https://github.com/littlevgl/lvgl/pull/2827)
-- fix(font) improve builtin font source files generation process [`2825`](https://github.com/littlevgl/lvgl/pull/2825)
-- fix(CMake) split CMakeLists.txt, add options, includes and dependencies [`2753`](https://github.com/littlevgl/lvgl/pull/2753)
-- fix(obj): make lv_obj_fade_in/out use the current opa as start value [`2819`](https://github.com/littlevgl/lvgl/pull/2819)
-- fix(qrcode):minimize margins as much as possible [`2804`](https://github.com/littlevgl/lvgl/pull/2804)
-- fix(scripts): switch all scripts to python3 [`2820`](https://github.com/littlevgl/lvgl/pull/2820)
-- fix(event): event_send_core crash in special case. [`2807`](https://github.com/littlevgl/lvgl/pull/2807)
-- fix(Kconfig) remove duplicate LV_BUILD_EXAMPLES configuration [`2813`](https://github.com/littlevgl/lvgl/pull/2813)
-- fix(obj): in obj event use the current target instead of target [`2785`](https://github.com/littlevgl/lvgl/pull/2785)
-- fix(draw_label): radius Mask doesn't work in Specific condition [`2784`](https://github.com/littlevgl/lvgl/pull/2784)
-- fix(draw_mask): will crash if get_width/height < 0 [`2793`](https://github.com/littlevgl/lvgl/pull/2793)
-- fix(theme) make the basic theme really basic [`a369f18`](https://github.com/littlevgl/lvgl/commit/a369f18c57c6b9d20a37959d621f9cb16348ef99)
-- fix(arc): fix knob invalidation [`345f688`](https://github.com/littlevgl/lvgl/commit/345f6882c9802dd9be55dfda5fe50c17e8c002b0)
-- fix(theme): add arc, spinner and colorwheel to basic theme [`adc218a`](https://github.com/littlevgl/lvgl/commit/adc218a7b303c564da021714e5a109a5d003fc30)
-- fix(conf) define LV_LOG_TRACE_... to 0 in lv_conf_internal.h to avoid warnings [`305284c`](https://github.com/littlevgl/lvgl/commit/305284c2b5aadec7bcfa68c6517c98d44be7c8a9)
-- fix(draw): consider opa and clip corner on bg_img [`d51aea4`](https://github.com/littlevgl/lvgl/commit/d51aea4dffc706876ac729373c33a74743bc05e9)
-- fix(draw): add grad_cache_mem to GC_ROOTs [`138db9c`](https://github.com/littlevgl/lvgl/commit/138db9c5d6b1f1d42c48d1307f5f508149ab0fda)
-- fix(bar, slider): fix shadow drawing on short indicators [`364ca3c`](https://github.com/littlevgl/lvgl/commit/364ca3ca1763fb732a049bfce689e2f588593cd4)
-- fix(theme): fix theme initialization issue introduced in 6e0072479 [`d231644`](https://github.com/littlevgl/lvgl/commit/d2316447c5c240960236d41814ef20e63cd56f00)
-- fix(draw): add lv_draw_sw_bg [`49642d3`](https://github.com/littlevgl/lvgl/commit/49642d3891c563b6c82bb407bacc4b73329a8c93)
-- fix(draw) border_draw crash is special case [`075831a`](https://github.com/littlevgl/lvgl/commit/075831a54c30d294879619c90ca4d16676c0775a)
-- fix(theme): fix crash in lv_theme_basic_init [`ca5f04c`](https://github.com/littlevgl/lvgl/commit/ca5f04cfe33e1db0b72a07812557634b86028c27)
-- fix(draw): fix indexed image drawing [`5a0dbcc`](https://github.com/littlevgl/lvgl/commit/5a0dbccf890b7a86315140dfe052da6b6aeca531)
-- fix(roller): clip overflowing text [`5709528`](https://github.com/littlevgl/lvgl/commit/5709528550f7bdb0a16da1c05ea8094fc085db08)
-- fix(align) fix LV_SIZE_CONTENT size calculation with not LEFT or TOP alignment [`9c67642`](https://github.com/littlevgl/lvgl/commit/9c676421ff159de1a96409f5557d36090c1728f9)
-- fix(draw): futher bg_img draw fixes [`81bfb76`](https://github.com/littlevgl/lvgl/commit/81bfb765e5baba359e61dcb030f3ee96160a6335)
-- fix(btnmatrix): keep the selected button even on release [`d47cd1d`](https://github.com/littlevgl/lvgl/commit/d47cd1d7fe910efc189e2f43f046a09184cfff13)
-- fix(sw): make knob size calculation more intuitive [`5ec532d`](https://github.com/littlevgl/lvgl/commit/5ec532dfd5ffa0d47a1ac80c9a468d6362f3d933)
-- fix(switch): make knob height calculation similar to slider [`0921dfc`](https://github.com/littlevgl/lvgl/commit/0921dfc8cd9d00e70ead8cbef8a898711af8f43e)
-- fix(span): explicitly set span->txt to the return value of lv_mem_realloc(#3005) [`a9a6cb8`](https://github.com/littlevgl/lvgl/commit/a9a6cb8efd16c55a175791a43a3f4043a3a5e01f)
-- fix(example): update LVGL_Arduino.ino [`d79283c`](https://github.com/littlevgl/lvgl/commit/d79283c145f92124c800453bcaf1caf1f9684bc5)
-- fix(draw) simplify how outline_pad is compnesated [`81d8be1`](https://github.com/littlevgl/lvgl/commit/81d8be13d67d6b17b663bc703c1e0e18a18890a7)
-- fix(obj) make LV_OBJ_FLAG_SCROLL_CHAIN part of the enum instead of define [`f8d8856`](https://github.com/littlevgl/lvgl/commit/f8d88567f635f325d6738ce2343f3b3c29f1e40a)
-- fix(label): dot not add dots if the label height > 1 font line height [`4d61f38`](https://github.com/littlevgl/lvgl/commit/4d61f3802013b31b0af5f08f66bb86f5179db141)
-- fix(event): crash if an object was deleted in an event [`9810920`](https://github.com/littlevgl/lvgl/commit/9810920fc5d34a984bddf6e41156e87e509cfd27)
-- fix(build) fix sdl build with make [`43729d1`](https://github.com/littlevgl/lvgl/commit/43729d1502dad0ca797b4b6fb8c69a48c81a2af7)
-- fix(config): fix anonymous choice [`71c739c`](https://github.com/littlevgl/lvgl/commit/71c739cc2dbcebf16e8adc805dda182011e725da)
-- chore(docs): fix lv_list_add_text [`a5fbf22`](https://github.com/littlevgl/lvgl/commit/a5fbf22d415a52cb2641c6dfda6937a10e4952cc)
-- fix(png) check png magic number to be sure it's a png image [`1092550`](https://github.com/littlevgl/lvgl/commit/1092550775c464f9ae8c406786fe02115776d5c6)
-- fix(btnmatrix): fix crash if an empty btnmatrix is pressed [`2392f58`](https://github.com/littlevgl/lvgl/commit/2392f585bb9317153f6fb648d2a660cbdc3e276f)
-- fix(mem/perf monitor): fix issue introduced in #2910 [`0788d91`](https://github.com/littlevgl/lvgl/commit/0788d918990fd1c03bd7a04941cfbbdf6d21987c)
-- fix(layout) fix layout recalculation trigger in lv_obj_add/clear_fleg [`ee65410`](https://github.com/littlevgl/lvgl/commit/ee65410c3725070ed1779c95fb8742107cdd9267)
-- fix(obj) fix lv_obj_fade_in [`4931384`](https://github.com/littlevgl/lvgl/commit/49313840ee9b249f2ef9142e872657856810acfc)
-- fix(draw): fix clipping children to parent [`5c98ac8`](https://github.com/littlevgl/lvgl/commit/5c98ac85117c24f4da61803f0dc5a9bb6cfd1fdc)
-- fix: remove symlinks to be accepted as an Ardunio library [`6701d36`](https://github.com/littlevgl/lvgl/commit/6701d36afe40130479dc83efc05d4860f3f29636)
-- chore: fix typos in FATFS config [`74091c4`](https://github.com/littlevgl/lvgl/commit/74091c42f7cf4e85e46e706692accb65879741e2)
-- fix(refr): fix missed buffer switch in double full-screen buffer + direct_mode [`731ef5a`](https://github.com/littlevgl/lvgl/commit/731ef5a75ea7feb7319315bd15bc1a43b899c1ca)
-- chore(qrcode): fix warnings [`e9d7080`](https://github.com/littlevgl/lvgl/commit/e9d70803e11378eddf435e66c2181c0fa77211c7)
-- docs(event): tell to not adjust widgets in draw events [`933d67f`](https://github.com/littlevgl/lvgl/commit/933d67fe5b8596da203c318aa9551aad1c2887e6)
-- fix(table, chart): fix memory leaks [`8d52de1`](https://github.com/littlevgl/lvgl/commit/8d52de14b33262a11de87f5d782611a38726a1a7)
-- fix(event): handle object deletion in indev->fedback_cb [`bfc8edf`](https://github.com/littlevgl/lvgl/commit/bfc8edf802382f78e96125c886427c99c7f9a600)
-- fix(roller): snap on press lost [`fa9340c`](https://github.com/littlevgl/lvgl/commit/fa9340c45fd4a86b4a44878286850f3f67133bf4)
-- fix(dropdown) be sure the list is the top object on the screen [`cb7fc2b`](https://github.com/littlevgl/lvgl/commit/cb7fc2bb59f788ce8024d62a5b1e821575a9cb74)
-- fix(img) fix invalidation issue on transformations [`d5ede0e`](https://github.com/littlevgl/lvgl/commit/d5ede0ebc6685d4857b5ac554d53c0a7373d7532)
-- fix(obj) fix comments of lv_obj_set_pos/x/y [`b9a5078`](https://github.com/littlevgl/lvgl/commit/b9a5078cd9d57662fc6e684d57a0ee4e70ca49c0)
-
-### Examples
-
-- example: add non-null judgment to lv_example_obj_2 [`2799`](https://github.com/littlevgl/lvgl/pull/2799)
-- example(table): fix text alignment [`b03dc9c`](https://github.com/littlevgl/lvgl/commit/b03dc9cf862584c2e2be2c900fa4ff6e67b336f8)
-
-### Docs
-
-- docs(demos) update information to reflect new layout [`3029`](https://github.com/littlevgl/lvgl/pull/3029)
-- docs(porting): remove duplicated content [`2984`](https://github.com/littlevgl/lvgl/pull/2984)
-- docs(display) fix typo [`2946`](https://github.com/littlevgl/lvgl/pull/2946)
-- docs(get-started) add introduction for Tasmota and Berry [`2874`](https://github.com/littlevgl/lvgl/pull/2874)
-- docs fix spelling, parameter descriptions, comments, etc [`2865`](https://github.com/littlevgl/lvgl/pull/2865)
-- docs: spelling fixes [`2828`](https://github.com/littlevgl/lvgl/pull/2828)
-- docs(style) minor style fix [`2818`](https://github.com/littlevgl/lvgl/pull/2818)
-- docs(porting/display) fix formatting [`2812`](https://github.com/littlevgl/lvgl/pull/2812)
-- docs(roadmap) update [`084439e`](https://github.com/littlevgl/lvgl/commit/084439e9476339ff571820e38bb677157edef135)
-- docs(widgets) fix edit links [`7ed1a56`](https://github.com/littlevgl/lvgl/commit/7ed1a5625a5139ede832c0058b2bc6309b395321)
-- docs(contributing) update commit message format [`1cd851f`](https://github.com/littlevgl/lvgl/commit/1cd851f8c09e813d75feaf9bf312f887f5ba76f0)
-- docs(porting): add more details about adding lvgl to your project [`6ce7348`](https://github.com/littlevgl/lvgl/commit/6ce73486d319bfdb1c379d090036a7eeaabf5b43)
-- docs(indev): add description about gestures [`2719862`](https://github.com/littlevgl/lvgl/commit/2719862fc3065b5d72c74c3f5f0923c3f6cc82c6)
-- docs(style): describe const styles [`28ffae8`](https://github.com/littlevgl/lvgl/commit/28ffae8c931ff01a4e5d426a2e496053e840c094)
-- docs(faq): add "LVGL doesn't start, nothing is drawn on the display" section [`0388d92`](https://github.com/littlevgl/lvgl/commit/0388d9218a36debf6c989eb999ae68478d8f6b02)
-- docs add demos [`02a6614`](https://github.com/littlevgl/lvgl/commit/02a6614b38b7d94e56d8fc1f858b0e40a46c024d)
-- docs(fs): update fs interface description to the latest API [`285e6b3`](https://github.com/littlevgl/lvgl/commit/285e6b39f99c078e57a611cf84cbfc3b546e112e)
-- docs(format) let wrap [`4bf49a8`](https://github.com/littlevgl/lvgl/commit/4bf49a82a3df422ebbfc4e47d4a93c945afdf0fa)
-- docs(imgbtn) fix typo [`d792c5f`](https://github.com/littlevgl/lvgl/commit/d792c5f6c2e9d85c693e4f8089cb59c82d8cf805)
-- docs(porting) clarify that displays must be registered before input devices [`1c64b78`](https://github.com/littlevgl/lvgl/commit/1c64b78866b4bb920db75a4b19f8ff1eb7f68a76)
-- docs(event) fix lv_event_get_original_target vs lv_event_get_current_target [`cdd5128`](https://github.com/littlevgl/lvgl/commit/cdd5128bc0e17b2ffa3f9fc8f5f133d35fca4e35)
-- docs(events) rename LV_EVENT_APPLY to LV_EVENT_READY (#2791) [`bf6837f`](https://github.com/littlevgl/lvgl/commit/bf6837f4c045b01144842ae63c4052e4cac7dafb)
-- docs(gpu): link style properties and boxing model [`6266851`](https://github.com/littlevgl/lvgl/commit/6266851381d3b1f1e350dc4689e6bc71ece2f5c1)
-- docs(gesture): clarify gesture triggering with scrolling [`e3b43ee`](https://github.com/littlevgl/lvgl/commit/e3b43eec943db48f7cbee83e07e531d41bc61ac0)
-- docs(contributing): remove the mentioning of the dev branch [`00d4ef3`](https://github.com/littlevgl/lvgl/commit/00d4ef3c53d9b53e993c76d1eb0bafa7b1c9b721)
-- docs(bar) fix default range [`eeee48b`](https://github.com/littlevgl/lvgl/commit/eeee48b1c943fc288521e4479d874348f4690842)
-- docs(event): tell to not adjust widgets in draw events [`933d67f`](https://github.com/littlevgl/lvgl/commit/933d67fe5b8596da203c318aa9551aad1c2887e6)
-- docs(switch) improve wording [`b4986ab`](https://github.com/littlevgl/lvgl/commit/b4986ab5dceb47f934c0a44a58152367f1bf8f43)
-- docs(font) fix example to match v8 [`2f80896`](https://github.com/littlevgl/lvgl/commit/2f808965a1892e11cb84f50c6546871d2f2aa122)
-
-### CI and tests
-
-- test(bar): add unit tests [`2845`](https://github.com/littlevgl/lvgl/pull/2845)
-- test(switch): add initial unit test [`2794`](https://github.com/littlevgl/lvgl/pull/2794)
-- test(demo) add tests for widget and stress demos [`3bd6ad8`](https://github.com/littlevgl/lvgl/commit/3bd6ad80e7e7d0936b6e54ca88760db551f7848b)
-- test(dropdown) fix to pass again [`918b3de`](https://github.com/littlevgl/lvgl/commit/918b3defd78245136da92f46fac937815ef35a1a)
-- test add support for using system heap [`446b1eb`](https://github.com/littlevgl/lvgl/commit/446b1ebf2bc1ba38b5349c660534f113a9a066a9)
-- ci remove formatting request workflow [`6de89e4`](https://github.com/littlevgl/lvgl/commit/6de89e4b7b0a0f72cf53e59a90bd22362088eb71)
-- ci initial support for cross-architecture tests [`7008770`](https://github.com/littlevgl/lvgl/commit/7008770261903170d19472a52b54fedaafa7bbda)
-- ci create handler for formatting requests [`7af7849`](https://github.com/littlevgl/lvgl/commit/7af78498a898cba6263b51094ffbc486d6b30b3a)
-- test(style) add test for gradient [`da8f345`](https://github.com/littlevgl/lvgl/commit/da8f34566b0c0f3335c471c518f0766bdeb65766)
-- test(event) add test for #2886 [`51ef9c2`](https://github.com/littlevgl/lvgl/commit/51ef9c242ccfff37905d71132aab33d2f642b427)
-- ci add workflow to check code formatting [`a2b555e`](https://github.com/littlevgl/lvgl/commit/a2b555e096f7d401b5d8e877a6b5e81ff81c747a)
-- ci attempt to speed up cross tests [`80408f7`](https://github.com/littlevgl/lvgl/commit/80408f704e8442a27f6dca96c41f1d3bded7ce52)
-- ci apply my updates to the verify-formatting action [`02f02fa`](https://github.com/littlevgl/lvgl/commit/02f02fa78fc4101b1cde87fe912cb3105a689195)
-- ci: add arduino linter action [`f79b00c`](https://github.com/littlevgl/lvgl/commit/f79b00cce0d31c7e5519a871b27d803fdb30fdfd)
-- ci update action [`be9722c`](https://github.com/littlevgl/lvgl/commit/be9722c420a1ac2e9efde79135bf96bc508edb33)
-- ci more formatting action updates [`1f6037c`](https://github.com/littlevgl/lvgl/commit/1f6037ce98c8617221d321d3371ad6dc8649553a)
-- ci disable LeakSanitizer on dockerized tests [`c9e1927`](https://github.com/littlevgl/lvgl/commit/c9e19272c62f01544ff7cb5ef15d65b0d4fce5a5)
-- ci one last try at this for tonight [`dddafae`](https://github.com/littlevgl/lvgl/commit/dddafaec942b7886722cdec28e2bd0f20f2a3413)
-- ci try alternate checkout mechanism [`cb3de30`](https://github.com/littlevgl/lvgl/commit/cb3de308fdcdebb9c980df1d167a6be3657b2540)
-- test(style) fix compile error [`ba083df`](https://github.com/littlevgl/lvgl/commit/ba083dfd6dc31d1d9127542cd1aff860d5a0153c)
-- test(template) simplify _test_template.c [`b279f63`](https://github.com/littlevgl/lvgl/commit/b279f63d6bf84159aab855b962a9f431d5c40eb3)
-- ci force ccache to be saved every time [`a7c590f`](https://github.com/littlevgl/lvgl/commit/a7c590f10d4c39ae33d89ad86ef608092030654b)
-- ci switch to codecov v2 [`6b84155`](https://github.com/littlevgl/lvgl/commit/6b841555cd847d07375b92b54a814c41ccb522de)
-- ci more debugging for formatting action [`2f8e4bc`](https://github.com/littlevgl/lvgl/commit/2f8e4bc4c43fa395676e2be5d3d55999206190b4)
-- ci inline apt-get commands [`90e2b9f`](https://github.com/littlevgl/lvgl/commit/90e2b9f05e73527dfa2b2df0b1da30512827b8a8)
-- ci(micropython) use ESP-IDF 4.4 [`b34fe9e`](https://github.com/littlevgl/lvgl/commit/b34fe9ed8b945fd83a1956cf4ddf2d40485a62ca)
-- ci add 5k stack limit [`4122dda`](https://github.com/littlevgl/lvgl/commit/4122dda399679baa3b8bbd2e7055412b132227ab)
-- ci force use of ccache in PATH [`6de3fa8`](https://github.com/littlevgl/lvgl/commit/6de3fa8004639ea02d45c1be2985290e65a3d6c0)
-- ci add back stack usage check at 4 kilobytes [`89135d6`](https://github.com/littlevgl/lvgl/commit/89135d663daca34c9d9695a4c12b4208ef4ba217)
-- ci temporarily disable stack usage check [`1900c21`](https://github.com/littlevgl/lvgl/commit/1900c215482b9b1b5af1dd7c5cb8a95e89906b77)
-- ci(cross) use python3 instead of python [`df7eaa0`](https://github.com/littlevgl/lvgl/commit/df7eaa020d656c519b5197cd3d19c587cb1dd234)
-- ci use specific version tag [`59b4769`](https://github.com/littlevgl/lvgl/commit/59b476934452d5821424c70954aa32be6f476608)
-- ci fix check style action [`5bb3686`](https://github.com/littlevgl/lvgl/commit/5bb3686ea8b6feb55d6bb2b345f5c6cee52d514a)
-- ci fix typo in formatting action [`d1ccbf6`](https://github.com/littlevgl/lvgl/commit/d1ccbf607fd3aec61c4606a8f2c268225654b792)
-- ci test formatting action [`065d821`](https://github.com/littlevgl/lvgl/commit/065d821c7050af6ad94c7d6dc2d4976a817e54a0)
-- ci(micropython) switch to newer GCC action [`1fa7257`](https://github.com/littlevgl/lvgl/commit/1fa7257801f4e0d3c184be438fd7ecb067818c48)
-- ci(style) force color on diff to help highlight whitespace changes [`04f47ea`](https://github.com/littlevgl/lvgl/commit/04f47eae0d40c8385535428566d1851ff8ea20eb)
-- ci(cross) install build-essential [`772f219`](https://github.com/littlevgl/lvgl/commit/772f219c0af4ba013ee9b71883e7dc265e5d22f9)
-- ci force pushing to upstream branch [`8277f78`](https://github.com/littlevgl/lvgl/commit/8277f78d132b4c397f39a9e17cdb7bdd381d1778)
-- ci ensure lvgl-bot is used to make commits [`9fcf52a`](https://github.com/littlevgl/lvgl/commit/9fcf52a82bb4dbcfc47e69b7875d66a3d25ba87f)
-
-
-
-
-## [v8.1.0](https://github.com/lvgl/lvgl/compare/v8.0.2...v8.1.0) 10 November 2021
-
-### Overview
-v8.1 is a minor release, so besides many fixes it contains a lot of new features too.
-
-Some of the most important features are
-- Built in support for SDL based GPU drawing
-- Much faster circle drawing in the software renderer
-- Several [3rd party libraries](https://docs.lvgl.io/master/libs/index.html) are merged directly into LVGL.
-- Add LVGL as an [RT-Thread](https://packages.rt-thread.org/en/detail.html?package=LVGL) and [ESP32](https://components.espressif.com/component/lvgl/lvgl) component
-
-### Breaking Changes
-
-- :warning: feat(calendar): add the header directly into the calendar widget [`2e08f80`](https://github.com/lvgl/lvgl/commit/2e08f80361a9d7e5b97f49af6afc3549ffbf2758)
-
-### Architectural
-
-- arch add small 3rd party libs to lvgl [`2569`](https://github.com/lvgl/lvgl/pull/2569)
-
-### New Features
-
-- feat(display) add direct_mode drawing mode [`2460`](https://github.com/lvgl/lvgl/pull/2460)
-- feat(conf): make LV_MEM_BUF_MAX_NUM configurable [`2747`](https://github.com/lvgl/lvgl/pull/2747)
-- feat(disp): add non-fullscreen display utilities [`2724`](https://github.com/lvgl/lvgl/pull/2724)
-- feat(rlottie) add LVGL-Rlottie interface as 3rd party lib [`2700`](https://github.com/lvgl/lvgl/pull/2700)
-- feat(rtthread): prepare for porting the device-driver of rt-thread [`2719`](https://github.com/lvgl/lvgl/pull/2719)
-- feat(fsdrv) add driver based on Win32 API [`2701`](https://github.com/lvgl/lvgl/pull/2701)
-- feat(span) indent supports percent for fix and break mode [`2693`](https://github.com/lvgl/lvgl/pull/2693)
-- feat(rt-thread): implement rt-thread sconscirpt [`2674`](https://github.com/lvgl/lvgl/pull/2674)
-- feat(lv_spinbox) support both right-to-left and left-to-right digit steps when clicking encoder button [`2644`](https://github.com/lvgl/lvgl/pull/2644)
-- feat add support for rt-thread RTOS [`2660`](https://github.com/lvgl/lvgl/pull/2660)
-- feat(disp): Enable rendering to display subsection [`2583`](https://github.com/lvgl/lvgl/pull/2583)
-- feat(keyboard): add user-defined modes [`2651`](https://github.com/lvgl/lvgl/pull/2651)
-- feat(event) add LV_EVENT_CHILD_CREATED/DELETED [`2618`](https://github.com/lvgl/lvgl/pull/2618)
-- feat(btnmatrix/keyboard): add option to show popovers on button press [`2537`](https://github.com/lvgl/lvgl/pull/2537)
-- feat(msgbox) add a content area for custom content [`2561`](https://github.com/lvgl/lvgl/pull/2561)
-- feat(tests): Include debug information to test builds [`2568`](https://github.com/lvgl/lvgl/pull/2568)
-- feat(drawing) hardware accelerated rendering by SDL2 [`2484`](https://github.com/lvgl/lvgl/pull/2484)
-- feat(msgbox): omit title label unless needed [`2539`](https://github.com/lvgl/lvgl/pull/2539)
-- feat(msgbox): add function to get selected button index [`2538`](https://github.com/lvgl/lvgl/pull/2538)
-- feat(make) add lvgl interface target for micropython [`2529`](https://github.com/lvgl/lvgl/pull/2529)
-- feat(obj) add lv_obj_move_to_index(obj, index), renamed lv_obj_get_child_id(obj) to lv_obj_get_index(obj) [`2514`](https://github.com/lvgl/lvgl/pull/2514)
-- feat(obj) add lv_obj_swap() function [`2461`](https://github.com/lvgl/lvgl/pull/2461)
-- feat(mem) LV_MEM_POOL_ALLOC [`2458`](https://github.com/lvgl/lvgl/pull/2458)
-- feat(switch) add smooth animation when changing state [`2442`](https://github.com/lvgl/lvgl/pull/2442)
-- feat(anim) add interface for handling lv_anim user data. [`2415`](https://github.com/lvgl/lvgl/pull/2415)
-- feat(obj) add lv_is_initialized [`2402`](https://github.com/lvgl/lvgl/pull/2402)
-- feat(obj) Backport keypad and encoder scrolling from v7 `lv_page` to v8 `lv_obj` [`2390`](https://github.com/lvgl/lvgl/pull/2390)
-- feat(snapshot) add API to take snapshot for object [`2353`](https://github.com/lvgl/lvgl/pull/2353)
-- feat(anim) add anim timeline [`2309`](https://github.com/lvgl/lvgl/pull/2309)
-- feat(span) Add missing spangroup functions [`2379`](https://github.com/lvgl/lvgl/pull/2379)
-- feat(img) add img_size property [`2284`](https://github.com/lvgl/lvgl/pull/2284)
-- feat(calendar) improve MicroPython example [`2366`](https://github.com/lvgl/lvgl/pull/2366)
-- feat(spinbox ) add function to set cursor to specific position [`2314`](https://github.com/lvgl/lvgl/pull/2314)
-
-- feat(timer) check if lv_tick_inc is called [`aa6641a`](https://github.com/lvgl/lvgl/commit/aa6641a6f1c1311ce7e0f94783ee7f582452a88f)
-- feat(event, widgets) improve the parameter of LV_EVENT_DRAW_PART_BEGIN/END [`88c4859`](https://github.com/lvgl/lvgl/commit/88c485949fca2686357a7dee88d5730678ba9bc7)
-- feat(docs) improvements to examples [`4b8c73a`](https://github.com/lvgl/lvgl/commit/4b8c73a5770657ab55bbe825f7887e28c55a8a4a)
-- feat(obj) send LV_EVENT_DRAW_PART_BEGIN/END for MAIN and SCROLLBAR parts [`b203167`](https://github.com/lvgl/lvgl/commit/b203167c7583905e2cb4006e57a16432841a2353)
-- feat(led) send LV_EVENT_DRAW_PART_BEGIN/END [`fcd4aa3`](https://github.com/lvgl/lvgl/commit/fcd4aa3924469c2a92ab6a04b7bc6de6304cc54a)
-- feat(chart) send LV_EVENT_DRAW_PART_BEGIN/END before/after the division line drawing section. [`e0ae2aa`](https://github.com/lvgl/lvgl/commit/e0ae2aa106874b1cf60ba54dd043cde8f834f7e9)
-- feat(tests) upload coverage to codecov [`4fff99d`](https://github.com/lvgl/lvgl/commit/4fff99da1dd2f8bd0c1e0012d81d46aaadb0d5a3)
-- feat(conf) add better check for Kconfig default [`f8fe536`](https://github.com/lvgl/lvgl/commit/f8fe5366bb051cd5090e4a06658eb0d32decc0b3)
-- feat(draw) add LV_BLEND_MODE_MULTIPLY [`cc78ef4`](https://github.com/lvgl/lvgl/commit/cc78ef450649a10f260649dc3ba19ac8a6b88e86)
-- feat(test) add assert for screenshot compare [`2f7a005`](https://github.com/lvgl/lvgl/commit/2f7a005bd31c10d0a048f55641e4af11bcb5bbfa)
-- feat(event) pass the scroll animation to LV_EVENT_SCROLL_BEGIN [`ca54ecf`](https://github.com/lvgl/lvgl/commit/ca54ecfe0eac880203d23b2d2244b9b63b9f7b77)
-- feat(obj) place the scrollbar to the left with RTL base dir. [`906448e`](https://github.com/lvgl/lvgl/commit/906448ef6321f160859f21c5937180bb89d8ef1e)
-- feat(log) allow overwriting LV_LOG_... macros [`17b8a76`](https://github.com/lvgl/lvgl/commit/17b8a76c4a887c9cf464484406a6631ea0194ad5)
-- feat(arc) add support to LV_OBJ_FLAG_ADV_HITTEST [`dfa4f5c`](https://github.com/lvgl/lvgl/commit/dfa4f5cff561a60b4ffcec17e025f1e056854fff)
-- feat(event) add LV_SCREEN_(UN)LOAD_START [`7bae9e3`](https://github.com/lvgl/lvgl/commit/7bae9e3ddde9d6bdc06ae437f20a789cd330a556)
-- feat(obj) add lv_obj_del_delayed() [`c6a2e15`](https://github.com/lvgl/lvgl/commit/c6a2e15ec23c8e96f71bafa8e43ef67fc4a73d0a)
-- feat(docs) add view on GitHub link [`a716ac6`](https://github.com/lvgl/lvgl/commit/a716ac6ed267e0a2e019fe7d2fda1bef0046cdc7)
-- feat(event) add LV_EVENT_SCREEN_LOADED/UNLOADED events [`ee5369e`](https://github.com/lvgl/lvgl/commit/ee5369e2d2ce12f47c78a2bf339aa6fb2421ba2b)
-- feat(textarea) remove the need of lv_textarea_set_align [`56ebb1a`](https://github.com/lvgl/lvgl/commit/56ebb1a4c8cc988482ac9f118fa3c654553db941)
-- feat(rt-thread): support LVGL projects with GCC/Keil(AC5)/Keil(AC6)/IAR [`32d33fe`](https://github.com/lvgl/lvgl/commit/32d33fe4d9a38f6c215a6b9a631eb987339677ae)
-- feat(docs) lazy load individual examples as well [`918d948`](https://github.com/lvgl/lvgl/commit/918d94801f2ee4ad7b6c075d96d2e9195459fbb8)
-
-- feat: add LV_USE_MEM_PERF/MONITOR_POS [`acd0f4f`](https://github.com/lvgl/lvgl/commit/acd0f4fbc71ffbfeb382b7af1fa52caf3cdcda6c)
-- feat(canvas) add lv_canvas_set_px_opa [`b3b3ffc`](https://github.com/lvgl/lvgl/commit/b3b3ffc2b3b322f7401d15c4ba2ef0cdb00e2990)
-- feat(event) add lv_obj_remove_event_cb_with_user_data [`4eddeb3`](https://github.com/lvgl/lvgl/commit/4eddeb35abee1f9cd2d1fd210f11cc096cb609c7)
-- feat(obj) add lv_obj_get_x/y_aligned [`98bc1fe`](https://github.com/lvgl/lvgl/commit/98bc1fe09e12a64333e91b4c25327c283a700af5)
-
-### Performance
-
-- perf(draw) reimplement circle drawing algorithms [`2374`](https://github.com/lvgl/lvgl/pull/2374)
-- perf(anim_timeline) add lv_anim_timeline_stop() [`2411`](https://github.com/lvgl/lvgl/pull/2411)
-
-- perf(obj) remove lv_obj_get_child_cnt from cycle limit checks [`ebb9ce9`](https://github.com/lvgl/lvgl/commit/ebb9ce913e604055724fd5f72562c9de0933ff73)
-- perf(draw) reimplement rectangle drawing algorithms [`5b3d3dc`](https://github.com/lvgl/lvgl/commit/5b3d3dc8b35bdd16e5dea00ffc40b7a20471079d)
-- perf(draw) ignore masks if they don't affect the current draw area [`a842791`](https://github.com/lvgl/lvgl/commit/a8427915c747dfe562f7f7e80adb6d1be5b2eeae)
-- perf(refresh) optimize where to wait for lv_disp_flush_ready with 2 buffers [`d0172f1`](https://github.com/lvgl/lvgl/commit/d0172f14a454c98e6979322e7c2622a7001bb3e6)
-- perf(draw) speed up additive blending [`3abe517`](https://github.com/lvgl/lvgl/commit/3abe517abf3b62366f2eb4bed77d5c7a691f7ed5)
-
-### Fixes
-
-- fix(bidi): add weak characters to the previous strong character's run [`2777`](https://github.com/lvgl/lvgl/pull/2777)
-- fix(draw_img): radius mask doesn't work in specific condition [`2786`](https://github.com/lvgl/lvgl/pull/2786)
-- fix(border_post): ignore bg_img_opa draw when draw border_post [`2788`](https://github.com/lvgl/lvgl/pull/2788)
-- fix(refresh) switch to portable format specifiers [`2781`](https://github.com/lvgl/lvgl/pull/2781)
-- fix(stm32) Mark unused variable in stm32 DMA2D driver [`2782`](https://github.com/lvgl/lvgl/pull/2782)
-- fix(conf): Make LV_COLOR_MIX_ROUND_OFS configurable [`2766`](https://github.com/lvgl/lvgl/pull/2766)
-- fix(misc): correct the comment and code style [`2769`](https://github.com/lvgl/lvgl/pull/2769)
-- fix(draw_map) use existing variables instead function calls [`2776`](https://github.com/lvgl/lvgl/pull/2776)
-- fix(draw_img): fix typos in API comments [`2773`](https://github.com/lvgl/lvgl/pull/2773)
-- fix(draw_img):radius Mask doesn't work in Specific condition [`2775`](https://github.com/lvgl/lvgl/pull/2775)
-- fix(proto) Remove redundant prototype declarations [`2771`](https://github.com/lvgl/lvgl/pull/2771)
-- fix(conf) better support bool option from Kconfign [`2555`](https://github.com/lvgl/lvgl/pull/2555)
-- fix(draw_border):draw error if radius == 0 and parent clip_corner == true [`2764`](https://github.com/lvgl/lvgl/pull/2764)
-- fix(msgbox) add declaration for lv_msgbox_content_class [`2761`](https://github.com/lvgl/lvgl/pull/2761)
-- fix(core) add L suffix to enums to ensure 16-bit compatibility [`2760`](https://github.com/lvgl/lvgl/pull/2760)
-- fix(anim): add lv_anim_get_playtime [`2745`](https://github.com/lvgl/lvgl/pull/2745)
-- fix(area) minor fixes [`2749`](https://github.com/lvgl/lvgl/pull/2749)
-- fix(mem): ALIGN_MASK should equal 0x3 on 32bit platform [`2748`](https://github.com/lvgl/lvgl/pull/2748)
-- fix(template) prototype error [`2755`](https://github.com/lvgl/lvgl/pull/2755)
-- fix(anim): remove time_orig from lv_anim_t [`2744`](https://github.com/lvgl/lvgl/pull/2744)
-- fix(draw_rect):bottom border lost if enable clip_corner [`2742`](https://github.com/lvgl/lvgl/pull/2742)
-- fix(anim) and improvement [`2738`](https://github.com/lvgl/lvgl/pull/2738)
-- fix(draw border):border draw error if border width > radius [`2739`](https://github.com/lvgl/lvgl/pull/2739)
-- fix(fsdrv): remove the seek call in fs_open [`2736`](https://github.com/lvgl/lvgl/pull/2736)
-- fix(fsdrv): skip the path format if LV_FS_xxx_PATH not defined [`2726`](https://github.com/lvgl/lvgl/pull/2726)
-- fix: mark unused variable with LV_UNUSED(xxx) instead of (void)xxx [`2734`](https://github.com/lvgl/lvgl/pull/2734)
-- fix(fsdrv): fix typo error in commit 752fba34f677ad73aee [`2732`](https://github.com/lvgl/lvgl/pull/2732)
-- fix(fsdrv): return error in case of the read/write failure [`2729`](https://github.com/lvgl/lvgl/pull/2729)
-- fix(refr) silence compiler warning due to integer type mismatch [`2722`](https://github.com/lvgl/lvgl/pull/2722)
-- fix(fs): fix the off-by-one error in the path function [`2725`](https://github.com/lvgl/lvgl/pull/2725)
-- fix(timer): remove the code duplication in lv_timer_exec [`2708`](https://github.com/lvgl/lvgl/pull/2708)
-- fix(async): remove the wrong comment from lv_async_call [`2707`](https://github.com/lvgl/lvgl/pull/2707)
-- fix(kconfig): change CONFIG_LV_THEME_DEFAULT_FONT to CONFIG_LV_FONT_DEFAULT [`2703`](https://github.com/lvgl/lvgl/pull/2703)
-- fix add MP support for LVGL 3rd party libraries [`2666`](https://github.com/lvgl/lvgl/pull/2666)
-- fix(png) memory leak for sjpg and use lv_mem_... in lv_png [`2704`](https://github.com/lvgl/lvgl/pull/2704)
-- fix(gif) unified whence and remove off_t [`2690`](https://github.com/lvgl/lvgl/pull/2690)
-- fix(rt-thread): include the rt-thread configuration header file [`2692`](https://github.com/lvgl/lvgl/pull/2692)
-- fix(rt-thread): fix the ci error [`2691`](https://github.com/lvgl/lvgl/pull/2691)
-- fix(fsdrv) minor fs issue [`2682`](https://github.com/lvgl/lvgl/pull/2682)
-- fix(hal) fix typos and wording in docs for lv_hal_indev.h [`2685`](https://github.com/lvgl/lvgl/pull/2685)
-- fix(hal tick): add precompile !LV_TICK_CUSTOM for global variables and lv_tick_inc() [`2675`](https://github.com/lvgl/lvgl/pull/2675)
-- fix(anim_timeline) avoid calling lv_anim_del(NULL, NULL) [`2628`](https://github.com/lvgl/lvgl/pull/2628)
-- fix(kconfig) sync Kconfig with the latest lv_conf_template.h [`2662`](https://github.com/lvgl/lvgl/pull/2662)
-- fix(log) reduce the stack usage in log function [`2649`](https://github.com/lvgl/lvgl/pull/2649)
-- fix(conf) make a better style alignment in lv_conf_internal.h [`2652`](https://github.com/lvgl/lvgl/pull/2652)
-- fix(span) eliminate warning in lv_get_snippet_cnt() [`2659`](https://github.com/lvgl/lvgl/pull/2659)
-- fix(config): remove the nonexistent Kconfig [`2654`](https://github.com/lvgl/lvgl/pull/2654)
-- fix(Kconfig): add LV_MEM_ADDR config [`2653`](https://github.com/lvgl/lvgl/pull/2653)
-- fix(log): replace printf with fwrite to save the stack size [`2655`](https://github.com/lvgl/lvgl/pull/2655)
-- fix typos [`2634`](https://github.com/lvgl/lvgl/pull/2634)
-- fix LV_FORMAT_ATTRIBUTE fix for gnu > 4.4 [`2631`](https://github.com/lvgl/lvgl/pull/2631)
-- fix(meter) make lv_meter_indicator_type_t of type uint8_t [`2632`](https://github.com/lvgl/lvgl/pull/2632)
-- fix(span):crash if span->txt = "" [`2616`](https://github.com/lvgl/lvgl/pull/2616)
-- fix(disp) set default theme also for non-default displays [`2596`](https://github.com/lvgl/lvgl/pull/2596)
-- fix(label):LONG_DOT mode crash if text Utf-8 encode > 1 [`2591`](https://github.com/lvgl/lvgl/pull/2591)
-- fix( example) in lv_example_scroll_3.py float_btn should only be created once [`2602`](https://github.com/lvgl/lvgl/pull/2602)
-- fix lv_deinit when LV_USE_GPU_SDL is enabled [`2598`](https://github.com/lvgl/lvgl/pull/2598)
-- fix add missing LV_ASSERT_OBJ checks [`2575`](https://github.com/lvgl/lvgl/pull/2575)
-- fix(lv_conf_internal_gen.py) formatting fixes on the generated file [`2542`](https://github.com/lvgl/lvgl/pull/2542)
-- fix(span) opa bug [`2584`](https://github.com/lvgl/lvgl/pull/2584)
-- fix(snapshot) snapshot is affected by parent's style because of wrong coords [`2579`](https://github.com/lvgl/lvgl/pull/2579)
-- fix(label):make draw area contain ext_draw_size [`2587`](https://github.com/lvgl/lvgl/pull/2587)
-- fix(btnmatrix): make ORed values work correctly with lv_btnmatrix_has_btn_ctrl [`2571`](https://github.com/lvgl/lvgl/pull/2571)
-- fix compiling of examples when cmake is used [`2572`](https://github.com/lvgl/lvgl/pull/2572)
-- fix(lv_textarea) fix crash while delete non-ascii character in pwd mode [`2549`](https://github.com/lvgl/lvgl/pull/2549)
-- fix(lv_log.h): remove the duplicated semicolon from LV_LOG_xxx [`2544`](https://github.com/lvgl/lvgl/pull/2544)
-- fix(zoom) multiplication overflow on 16-bit platforms [`2536`](https://github.com/lvgl/lvgl/pull/2536)
-- fix(printf) use __has_include for more accurate limits information [`2532`](https://github.com/lvgl/lvgl/pull/2532)
-- fix(font) add assert in lv_font.c if the font is NULL [`2533`](https://github.com/lvgl/lvgl/pull/2533)
-- fix(lv_types.h): remove c/c++ compiler version check [`2525`](https://github.com/lvgl/lvgl/pull/2525)
-- fix(lv_utils.c): remove the unneeded header inclusion [`2526`](https://github.com/lvgl/lvgl/pull/2526)
-- fix(Kconfig) fix the comment in LV_THEME_DEFAULT_DARK [`2524`](https://github.com/lvgl/lvgl/pull/2524)
-- fix(sprintf) add format string for rp2 port [`2512`](https://github.com/lvgl/lvgl/pull/2512)
-- fix(span) fix some bugs (overflow,decor,align) [`2518`](https://github.com/lvgl/lvgl/pull/2518)
-- fix(color) Bad cast in lv_color_mix() caused UB with 16bpp or less [`2509`](https://github.com/lvgl/lvgl/pull/2509)
-- fix(imgbtn) displayed incorrect when the coordinate is negative [`2501`](https://github.com/lvgl/lvgl/pull/2501)
-- fix(event) be sure to move all elements in copy “lv_obj_remove_event_cb” [`2492`](https://github.com/lvgl/lvgl/pull/2492)
-- fix(draw) use correct pointer in lv_draw_mask assertion [`2483`](https://github.com/lvgl/lvgl/pull/2483)
-- feat(mem) LV_MEM_POOL_ALLOC [`2458`](https://github.com/lvgl/lvgl/pull/2458)
-- fix(cmake) require 'main' for Micropython [`2444`](https://github.com/lvgl/lvgl/pull/2444)
-- fix(docs) add static keyword to driver declaration [`2452`](https://github.com/lvgl/lvgl/pull/2452)
-- fix(build) remove main component dependency [`2420`](https://github.com/lvgl/lvgl/pull/2420)
-- fix circle drawing algorithms [`2413`](https://github.com/lvgl/lvgl/pull/2413)
-- fix(docs) wrong spelling of words in pictures [`2409`](https://github.com/lvgl/lvgl/pull/2409)
-- fix(chart) fixed point-following cursor during vertical scroll in charts [`2400`](https://github.com/lvgl/lvgl/pull/2400)
-- fix(chart) fixed cursor positioning with large Y rescaling without LV_USE_LARGE_COORD [`2399`](https://github.com/lvgl/lvgl/pull/2399)
-- fix(grid.h) typos [`2395`](https://github.com/lvgl/lvgl/pull/2395)
-- fix(anim_timeline) heap use after free [`2394`](https://github.com/lvgl/lvgl/pull/2394)
-- fix(snapshot) add missing import on MicroPython example [`2389`](https://github.com/lvgl/lvgl/pull/2389)
-- fix(disp) Fix assert failure in lv_disp_remove [`2382`](https://github.com/lvgl/lvgl/pull/2382)
-- fix(span) modify the underline position [`2376`](https://github.com/lvgl/lvgl/pull/2376)
-- fix(color) remove extraneous _LV_COLOR_MAKE_TYPE_HELPER [`2372`](https://github.com/lvgl/lvgl/pull/2372)
-- fix(spinner) should not be clickable [`2373`](https://github.com/lvgl/lvgl/pull/2373)
-- fix(workflow) silence SDL warning for MicroPython [`2367`](https://github.com/lvgl/lvgl/pull/2367)
-- fix (span) fill LV_EVENT_GET_SELF_SIZE [`2360`](https://github.com/lvgl/lvgl/pull/2360)
-- fix(workflow) change MicroPython workflow to use master [`2358`](https://github.com/lvgl/lvgl/pull/2358)
-- fix(disp) fix memory leak in lv_disp_remove [`2355`](https://github.com/lvgl/lvgl/pull/2355)
-- fix(lv_obj.h)typos [`2350`](https://github.com/lvgl/lvgl/pull/2350)
-- fix(obj) delete useless type conversion [`2343`](https://github.com/lvgl/lvgl/pull/2343)
-- fix(lv_obj_scroll.h) typos [`2345`](https://github.com/lvgl/lvgl/pull/2345)
-- fix(txt) enhance the function of break_chars [`2327`](https://github.com/lvgl/lvgl/pull/2327)
-
-- fix(vglite): update for v8 [`e3e3eea`](https://github.com/lvgl/lvgl/commit/e3e3eeaf8c1593d384c6537244a301cdc1abd3d9)
-- fix(widgets) use lv_obj_class for all the widgets [`3fb8baf`](https://github.com/lvgl/lvgl/commit/3fb8baf503411e006765020f60f295a4be16ba2d)
-- fix(refr) reduce the nesting level in lv_refr_area [`2df1282`](https://github.com/lvgl/lvgl/commit/2df12827dda3f217fa26d2c98445a9b3f1ff22ab)
-- fix(pxp): update for v8 [`8a2a4a1`](https://github.com/lvgl/lvgl/commit/8a2a4a11c81d029ff737980b883c62dfbb4b44c6)
-- fix(obj) move clean ups from lv_obj_del to lv_obj_destructor [`b063937`](https://github.com/lvgl/lvgl/commit/b06393747f61e36996a0cb22f9309c951f900ded)
-- fix (draw) fix arc bg image drawing with full arcs [`c3b6c6d`](https://github.com/lvgl/lvgl/commit/c3b6c6dc64735e1bde492a8d5570f3e3a9500a0b)
-- fix(pxp): update RTOS macro for SDK 2.10 [`00c3eb1`](https://github.com/lvgl/lvgl/commit/00c3eb197cb85e480809d97eb722589d75d81d94)
-- fix(textarea) style update in oneline mode + improve sroll to cursor [`60d9a5e`](https://github.com/lvgl/lvgl/commit/60d9a5e493bf17ee9887ba44890d00905bc55970)
-- feat(led) send LV_EVENT_DRAW_PART_BEGIN/END [`fcd4aa3`](https://github.com/lvgl/lvgl/commit/fcd4aa3924469c2a92ab6a04b7bc6de6304cc54a)
-- fix warnings introduced by 3fb8baf5 [`e302403`](https://github.com/lvgl/lvgl/commit/e3024032dc5de2ece4fa17059ebad4189a5fa670)
-- fix(roller) fix partial redraw of the selected area [`6bc40f8`](https://github.com/lvgl/lvgl/commit/6bc40f8c4417a94ab26b25220324e471e03ce443)
-- fix(flex) fix layout update and invalidation issues [`5bd82b0`](https://github.com/lvgl/lvgl/commit/5bd82b038b841c0f7c93bbdacdbd61d6b9585846)
-- fix(indev) focus on objects on release instead of press [`76a8293`](https://github.com/lvgl/lvgl/commit/76a8293375b705a5e02e4f9c8f8a42d99db762e2)
-- fix tests [`449952e`](https://github.com/lvgl/lvgl/commit/449952e3b78d02802960dabb0207b960c82e8e5a)
-- fix(dropdown) forget the selected option on encoder longpress [`e66b935`](https://github.com/lvgl/lvgl/commit/e66b9350617eee15e94fb6a353283433e4c2c494)
-- fix(obj) improve how the focusing indev is determined [`a04f2de`](https://github.com/lvgl/lvgl/commit/a04f2dea644787ea25ef988a43e10c5005c57066)
-- fix(workflow) speed up MicroPython workflow [`38ad5d5`](https://github.com/lvgl/lvgl/commit/38ad5d548b2024f0f742ba769a6715fc376541a1)
-- fix(test) do not including anything in test files when not running tests [`9043860`](https://github.com/lvgl/lvgl/commit/90438603ad020799b14bc9839a51dceedfdabd7a)
-- fix tests [`36b9db3`](https://github.com/lvgl/lvgl/commit/36b9db38b728b40096b9ee613f4482ef9654d570)
-- fix(scroll) fire LV_EVENT_SCROLL_BEGIN in the same spot for both axes [`b158932`](https://github.com/lvgl/lvgl/commit/b1589326d41924292fbc2c62b474dec288bc9da5)
-- fix(btnmatrix) fix button invalidation on focus change [`77cedfa`](https://github.com/lvgl/lvgl/commit/77cedfa08f3f8aec67c6a2fe8e5ae9bab5a0e7c7)
-- fix(tlsf) do not use <assert.h> [`c9745b9`](https://github.com/lvgl/lvgl/commit/c9745b9c4ea9e7c6de4bd8ad9a0d8001bfb91165)
-- fix(template) include lvgl.h in lv_port_*_template.c files [`0ae15bd`](https://github.com/lvgl/lvgl/commit/0ae15bd470548ff159f44e7c3f4b225ab3eec928)
-- fix(docs) add margin for example description [`b5f632e`](https://github.com/lvgl/lvgl/commit/b5f632ee7a265ce4f2472522b422b8cd5366aaa9)
-- fix(imgbtn) use the correct src in LV_EVENT_GET_SELF_SIZE [`04c515a`](https://github.com/lvgl/lvgl/commit/04c515adac764761e60094db789269130ac89b36)
-- fix(color) remove extraneous cast for 8-bit color [`157534c`](https://github.com/lvgl/lvgl/commit/157534cdbfaa7b769114126f74c38661b99d025b)
-- fix(workflow) use same Unix port variant for MicroPython submodules [`ac68b10`](https://github.com/lvgl/lvgl/commit/ac68b10e539ddb8bde47ec453a99f2b876e12c65)
-- fix(README) improve grammar [`de81889`](https://github.com/lvgl/lvgl/commit/de81889cbdc889360e8bc00684f9ca77ff97d89f)
-- fix(printf) skip defining attribute if pycparser is used [`ee9bbea`](https://github.com/lvgl/lvgl/commit/ee9bbea29c807707353e8b9ec09048990de18e4e)
-- fix(README) spelling correction [`41869f2`](https://github.com/lvgl/lvgl/commit/41869f238e773e599959c9ef2fee0b7206712ee2)
-- fix(color) overflow with 16-bit color depth [`fe6d8d7`](https://github.com/lvgl/lvgl/commit/fe6d8d7636ae283afda68e85b2d1f143d8d05462)
-- fix(docs) consider an example to be visible over a wider area [`145a0fa`](https://github.com/lvgl/lvgl/commit/145a0fad0857dad7f2066e7d22436827e0d3fd7d)
-- fix(codecov) disable uploading coverage for pull requests [`27d88de`](https://github.com/lvgl/lvgl/commit/27d88de899e91cd5bb9fc69fe9d71cb180cfb44b)
-- fix(arc) disable LV_OBJ_FLAG_SCROLL_CHAIN by default [`f172eb3`](https://github.com/lvgl/lvgl/commit/f172eb3fd78481d6076ead395abfd765646ad21e)
-- fix(template) update lv_objx_template to v8 [`38bb8af`](https://github.com/lvgl/lvgl/commit/38bb8afc16720e8d8fe6e72be6fae4f9da593bbc)
-- fix(align) avoid circular references with LV_SIZE_CONTENT [`038b781`](https://github.com/lvgl/lvgl/commit/038b78122e72db67cec886d09eb2d21aaa019df7)
-- fix(draw) with additive blending with 32-bit color depth [`786db2a`](https://github.com/lvgl/lvgl/commit/786db2afe6458e24681b8a40fa798429956d3420)
-- fix(arc) fix arc invalidation again [`5ced080`](https://github.com/lvgl/lvgl/commit/5ced08001c384bf7c840750c0e254b5f0115a070)
-- fix(align) fix lv_obj_align_to [`93b38e9`](https://github.com/lvgl/lvgl/commit/93b38e92be9ed3ae050a1ee6e5b680ab43fd4850)
-- fix(scroll) keep the scroll position on object deleted [`52edbb4`](https://github.com/lvgl/lvgl/commit/52edbb46b0741d2761a11ef1b3d516ec96a7c8b3)
-- fix(dropdown) handle LV_KEY_ENTER [`8a50edd`](https://github.com/lvgl/lvgl/commit/8a50edd0689c7133ca18fd476596ddc4088f86a9)
-- fix various minor warnings [`924bc75`](https://github.com/lvgl/lvgl/commit/924bc754adcbabaf3518bac6067e7ea37f2f0f04)
-- fix(textarea) various cursor drawing fixes [`273a0eb`](https://github.com/lvgl/lvgl/commit/273a0eb32f04e81f326288a71682bea1c812c76a)
-- fix(label) consider base dir lv_label_get_letter_pos in special cases [`6df5122`](https://github.com/lvgl/lvgl/commit/6df51225c261b252f0935804b0357d6e585da53d)
-- fix(imgbtn) add lv_imgbtn_set_state [`26e15fa`](https://github.com/lvgl/lvgl/commit/26e15fa577f97d510b218fb95fc9a4bd440b00bc)
-- fix(printf) add (int) casts to log messages to avoid warnings on %d [`d9d3f27`](https://github.com/lvgl/lvgl/commit/d9d3f271267e760c8459b65c392914143a58b89c)
-- fix(test) silence make [`7610d38`](https://github.com/lvgl/lvgl/commit/7610d38bb044b1bd95dd68ab57f79f82e2527cca)
-- fix(test) silence make [`37fd9d8`](https://github.com/lvgl/lvgl/commit/37fd9d8a24c276079ed26b5d6704bcefc9f8dc70)
-- fix(calendar) update the MP example [`0bab4a7`](https://github.com/lvgl/lvgl/commit/0bab4a72cf769872a9adfd5bfa1c4536e6f909a8)
-- fix(scroll) fix scroll_area_into_view with objects larger than the parent [`5240fdd`](https://github.com/lvgl/lvgl/commit/5240fdda5ccc33d166f8201818868add5d1d6d0d)
-- fix(msgbox) handle NULL btn map parameter [`769c4a3`](https://github.com/lvgl/lvgl/commit/769c4a30cf962be1f74e0b1cd7ebaefbd6ba8a8b)
-- fix (scroll) do not send unnecessary scroll end events [`3ce5226`](https://github.com/lvgl/lvgl/commit/3ce5226c9d9db279904c4f076ae77e6e03572e4c)
-- fix(obj_pos) consider all alignments in content size calculation but only if x and y = 0 [`5b27ebb`](https://github.com/lvgl/lvgl/commit/5b27ebb4097166f8c4a50ee5d39249939bf79814)
-- fix(img decoder) add error handling if the dsc->data = NULL [`d0c1c67`](https://github.com/lvgl/lvgl/commit/d0c1c673a8ec17b842ebf97d5f21938ec8901346)
-- fix(txt): skip basic arabic vowel characters when processing conjunction [`5b54800`](https://github.com/lvgl/lvgl/commit/5b548006eda0695cabf2ee237a7faee8c69e4659)
-- fix(typo) rename LV_OBJ_FLAG_SNAPABLE to LV_OBJ_FLAG_SNAPPABLE [`e697807`](https://github.com/lvgl/lvgl/commit/e697807cf5c01be2531fc52df78ecad75ce39a7a)
-- fix(lv_printf.h): to eliminate the errors in Keil and IAR [`f6d7dc7`](https://github.com/lvgl/lvgl/commit/f6d7dc7f00d0a20f7f1966ed890a225b1fc87107)
-- fix(draw) fix horizontal gradient drawing [`4c034e5`](https://github.com/lvgl/lvgl/commit/4c034e56e049ad3d9bca5eb4b3e8721e60c11d36)
-- fix(dropdown) use LV_EVENT_READY/CANCEL on list open/close [`4dd1d56`](https://github.com/lvgl/lvgl/commit/4dd1d566fc30bbaf1424dda8b78df97c6bf07402)
-- fix(table) clip overflowing content [`8c15933`](https://github.com/lvgl/lvgl/commit/8c15933030cad6cdbfe4967f566ed6959547fada)
-- fix(test) add #if guard to exclude test related files from the build [`c12a22e`](https://github.com/lvgl/lvgl/commit/c12a22ee87681d1344696a3b9531e9100808eb85)
-- fix(test) add #if guard to exclude test related files from the build [`fc364a4`](https://github.com/lvgl/lvgl/commit/fc364a466c0693aefa0401f5eddee2bbc3037ef0)
-- fix(freetype) fix underline calculation [`76c8ee6`](https://github.com/lvgl/lvgl/commit/76c8ee6b7e81d8640aa5ba620947660a1c90482b)
-- fix(style) refresh ext. draw pad for padding and bg img [`37a5d0c`](https://github.com/lvgl/lvgl/commit/37a5d0c85ac28718f4f32eadff3ddaf6b474cf75)
-- fix(draw) underflow in subpixel font drawing [`6d5ac70`](https://github.com/lvgl/lvgl/commit/6d5ac702ad20ac3092c224ca36e412b0d6cec321)
-- fix(scrollbar) hide the scrollbar if the scrollble flag is removed [`188a946`](https://github.com/lvgl/lvgl/commit/188a9467b1bd45d42368a687736a9151d081c1e8)
-- fix(color): minor fixes(#2767) [`a4978d0`](https://github.com/lvgl/lvgl/commit/a4978d0913be705caffe3c080524bb7915a5e3e2)
-- fix(group) skip object if an of the parents is hidden [`5799c10`](https://github.com/lvgl/lvgl/commit/5799c1084398b365c7a9669406d4fbe258a501ef)
-- fix(obj) fix size invalidation issue on padding change [`33ba722`](https://github.com/lvgl/lvgl/commit/33ba7225f55f0cb17f73ce891466c7ebe1327898)
-- fix(label) do not bidi process text in lv_label_ins_text [`e95efc1`](https://github.com/lvgl/lvgl/commit/e95efc152f52b7495acb011353a55b3663f7860e)
-- fix(refr) set disp_drv->draw_buf->flushing_last correctly with sw rotation [`c514bdd`](https://github.com/lvgl/lvgl/commit/c514bddd9b4064e2eba0c3ec4c7a51415acd74e4)
-- fix(draw) fix drawing small arcs [`8081599`](https://github.com/lvgl/lvgl/commit/8081599e9b65c758bbdc0168f857515bebaf1c80)
-- fix(chart) invalidation with LV_CHART_UPDATE_MODE_SHIFT [`d61617c`](https://github.com/lvgl/lvgl/commit/d61617cd67f792908a1554a44c663c73a41bb357)
-- fix(build) fix micropython build error [`54338f6`](https://github.com/lvgl/lvgl/commit/54338f6e57518a59615bdd191fcf5af1365eabea)
-- fix(draw) fix border width of simple (radius=0, no masking) borders [`20f1867`](https://github.com/lvgl/lvgl/commit/20f186759664f31f07d6613ea8d77df256cd4597)
-- fix(calendar) fix calculation today and highlighted day [`8f0b5ab`](https://github.com/lvgl/lvgl/commit/8f0b5ab0230007fa72127b78db500b9ceb84bf35)
-- fix(style) initialize colors to black instead of zero [`524f8dd`](https://github.com/lvgl/lvgl/commit/524f8dd50b4407c78fa6cd947c42e73eab401da1)
-- fix(sjpg) remove unnecessary typedefs [`c2d93f7`](https://github.com/lvgl/lvgl/commit/c2d93f78b98ba347001bd29d58b6654492bb8d70)
-- fix(label) fix clipped italic letters [`2efa6dc`](https://github.com/lvgl/lvgl/commit/2efa6dce78604cdf422ff233a99f7dd5f06b821c)
-- fix(draw) shadow drawing with large shadow width [`f810265`](https://github.com/lvgl/lvgl/commit/f810265c0d91135b71ae110d33d43841ec0e44f8)
-- fix(dropdown) add missing invalidations [`33b5d4a`](https://github.com/lvgl/lvgl/commit/33b5d4a4fe6f28962ee7988f74d5ae842dc49b04)
-- fix(dropdown) adjust the handling of keys sent to the dropdown [`e41c507`](https://github.com/lvgl/lvgl/commit/e41c50780495c7d6ac6a2b0edf12fc98c9d85a6b)
-- fix(disp) be sure the pending scr load animation is finished in lv_scr_load_anim [`eb6ae52`](https://github.com/lvgl/lvgl/commit/eb6ae526432453e4b9dbc7a760cd65d164050548)
-- fix(color) fox color premult precision with 16-bit color depth [`f334226`](https://github.com/lvgl/lvgl/commit/f3342269f272c474265700527f52d3ba92111531)
-- fix(obj_pos) save x,y even if the object is on a layout [`a9b660c`](https://github.com/lvgl/lvgl/commit/a9b660c278658224f05fbe43d0199c48711db9fd)
-- fix(scrollbar) hide the scrollbar if the scrollable flag is removed [`d9c6ad0`](https://github.com/lvgl/lvgl/commit/d9c6ad0425e761d605124e4555adc72854fec4a6)
-- fix(dropdown) fix list position with RTL base direction [`79edb37`](https://github.com/lvgl/lvgl/commit/79edb37b0ab5015111bade6074fda81ae101b91b)
-- fix(obj) fix lv_obj_align_to with RTL base direction [`531afcc`](https://github.com/lvgl/lvgl/commit/531afcc6cec7f67df06e369a185aef6fdc85af7b)
-- fix(chart) fix sending LV_EVENT_DRAW_PART_BEGIN/END for the cursor [`34b8cd9`](https://github.com/lvgl/lvgl/commit/34b8cd9c12604bc1029efa39bd66322b8b771dbe)
-- fix(arduino) fix the prototype of my_touchpad_read in the LVGL_Arduino.ino [`1a62f7a`](https://github.com/lvgl/lvgl/commit/1a62f7a619faa93406bc5895ac3338c232de2226)
-- fix(checkbox) consider the bg border when positioning the indicator [`a39dac9`](https://github.com/lvgl/lvgl/commit/a39dac9e5c82ecabd135953acafa335941ca0a89)
-- fix(dropdown) send LV_EVENT_VALUE_CHANGED to allow styling of the list [`dae7039`](https://github.com/lvgl/lvgl/commit/dae7039803030f908986602b3ce308dc1c3974af)
-- fix(group) fix infinite loop [`bdce0bc`](https://github.com/lvgl/lvgl/commit/bdce0bc60cb6e938ce39a0defe5b24249bc66a99)
-- fix(keyboard) use LVGL heap functions instead of POSIX [`b20a706`](https://github.com/lvgl/lvgl/commit/b20a706112a3107db13bbd405991ece4cbe00a88)
-- fix(blend) fix green channel with additive blending [`78158f0`](https://github.com/lvgl/lvgl/commit/78158f039f19eb17bf1b7c173922c1af26c1e528)
-- fix(btnmatrix) do not show pressed, focused or focus key states on disabled buttons [`3df2a74`](https://github.com/lvgl/lvgl/commit/3df2a7444758d2df023f321ccb5931de44af2a48)
-- fix(font) handle the last pixel of the glyphs in font loader correctly [`fa98989`](https://github.com/lvgl/lvgl/commit/fa9898941f8efa1966cb6f326d1eebdd31211d04)
-- fix(table) fix an off-by-one issue in self size calculation [`ea2545a`](https://github.com/lvgl/lvgl/commit/ea2545ae5dade0845889174737d072137bbb6591)
-- fix shadowed variable [`e209260`](https://github.com/lvgl/lvgl/commit/e20926056b28bb64f38abc764a4fca045757e800)
-- fix shadowed variable [`df60018`](https://github.com/lvgl/lvgl/commit/df600183f211bde0ff34add973a7a401a1da9af1)
-- fix(chart) be sure the chart doesn't remain scrolled out on zoom out [`ad5b1bd`](https://github.com/lvgl/lvgl/commit/ad5b1bdc00a4a44e775a280f8b686353ef4f2a38)
-- fix(docs) commit to meta repo as lvgl-bot instead of actual commit author [`f0e8549`](https://github.com/lvgl/lvgl/commit/f0e8549fe14d4e95aedcc98a63acce5a4ad1145b)
-- fix(table) invalidate the table on cell value change [`cb3692e`](https://github.com/lvgl/lvgl/commit/cb3692e3029ae452eab04dce21715b7863a9f2a1)
-- fix(group) allow refocusing objects [`1520208`](https://github.com/lvgl/lvgl/commit/1520208b14c38713719f507273024624a0f54f1a)
-- fix(tabview) fix with left and right tabs [`17c5744`](https://github.com/lvgl/lvgl/commit/17c57449eeae8a693ad5601cf4169cf44d57d5c9)
-- fix(msgbox) create modals on top layer instead of act screen [`5cf6303`](https://github.com/lvgl/lvgl/commit/5cf6303e741ec22e2e87f69af4109855eb637e63)
-- fix(theme) show disabled state on buttons of btnmatrix, msgbox and keyboard [`0be582b`](https://github.com/lvgl/lvgl/commit/0be582b391e60774d6158411b835b679b010a99b)
-- fix(label) update lv_label_get_letter_pos to work with LV_BASE_DIR_AUTO too [`580e05a`](https://github.com/lvgl/lvgl/commit/580e05a0e1531d86d5229ade4ced2c336fbce634)
-- fix(label) fix in lv_label_get_letter_pos with when pos==line_start [`58f3f56`](https://github.com/lvgl/lvgl/commit/58f3f5625c2b29278c3e122d8eeba4d9bc597db9)
-- fix(gif) replace printf statement with LVGL logging [`56f62b8`](https://github.com/lvgl/lvgl/commit/56f62b8d7356017319d21d44a8f450705ec6486b)
-- fix(docs) add fsdrv back [`64527a5`](https://github.com/lvgl/lvgl/commit/64527a5a1ba9d37883c1303a3d4ee1a41e9b4ed3)
-- fix(table) remove unnecessary invalidation on pressing [`6f90f9c`](https://github.com/lvgl/lvgl/commit/6f90f9cefba0bc1ea74e737e0e659402f0309cf7)
-- fix(chart) draw line chart indicator (bullet) [`fba37a3`](https://github.com/lvgl/lvgl/commit/fba37a30abd1b4d7af78a288fb61dccacc99da08)
-- fix(anim) return the first anim if exec_cb is NULL in lv_anim_get() [`fb7ea10`](https://github.com/lvgl/lvgl/commit/fb7ea1040153bd0f2d5c282f9fb31add32c55ce9)
-- fix(label) fix lv_label_get_letter_on with BIDI enabled [`192419e`](https://github.com/lvgl/lvgl/commit/192419e7bb300bd64b51d684827719fe1c22cfdb)
-- fix(checkbox) add missing invalidations [`bb39e9d`](https://github.com/lvgl/lvgl/commit/bb39e9d6f95235445e3ea1bc52b0d5a1b7a2e24a)
-- fix(draw) fix gradient calculation of the rectangle is clipped [`13e3470`](https://github.com/lvgl/lvgl/commit/13e347055bd54c37e7fcb645120ea9ab3134ebec)
-- fix(chart) fix typo in 655f42b8 [`6118d63`](https://github.com/lvgl/lvgl/commit/6118d63c2f23e2a157c84a010dcfa0d1fa851382)
-- fix(example) fix lv_example_chart_2 [`89081c2`](https://github.com/lvgl/lvgl/commit/89081c2d6ee418b326538e1f39345d43864993c8)
-- fix(calendar) fix the position calculation today [`ad05e19`](https://github.com/lvgl/lvgl/commit/ad05e196fb3937ebcba211495013700c0022f777)
-- fix(tick) minor optimization on lv_tick_inc call test [`b4305df`](https://github.com/lvgl/lvgl/commit/b4305df5745684a785be071149de8dd342817db4)
-- fix(docs) use let instead of const for variable which gets changed [`3cf5751`](https://github.com/lvgl/lvgl/commit/3cf5751461d6a85974da4e5c66593736ae140a1a)
-- fix(theme) fix the switch style in the default theme [`0c0dc8e`](https://github.com/lvgl/lvgl/commit/0c0dc8ea30289254732cbba7ada7fd4f092caf22)
-- fix(tlsf) undef printf before define-ing it [`cc935b8`](https://github.com/lvgl/lvgl/commit/cc935b87f69e6107d12d9ba4a2c83103f7dd4356)
-- fix(msgbox) prevent the buttons being wider than the msgbox [`73e036b`](https://github.com/lvgl/lvgl/commit/73e036bba748e8677f219f573cba5f82c4158a17)
-- fix(chart) don't draw series lines with < 1 points [`655f42b`](https://github.com/lvgl/lvgl/commit/655f42b852669f27ab8bfde84bf70cf0b7ea027d)
-- fix(tests) remove src/test_runners when cleaning [`6726b0f`](https://github.com/lvgl/lvgl/commit/6726b0f5df3f4689368782b601bb01f76498123b)
-- fix(label) remove duplicated lv_obj_refresh_self_size [`a070ecf`](https://github.com/lvgl/lvgl/commit/a070ecfe8c1cf7c07c035ba6c35c3ffaef56d6e1)
-- fix(colorwheel) disable LV_OBJ_FLAG_SCROLL_CHAIN by default [`48d1c29`](https://github.com/lvgl/lvgl/commit/48d1c292a3c19380d5669baf911954cc1b083d43)
-
-- fix(obj) do not set the child's position in lv_obj_set_parent [`d89a5fb`](https://github.com/lvgl/lvgl/commit/d89a5fbbd2af33cf759c120e6a14b334099c4c98)
-- feat: add LV_USE_MEM_PERF/MONITOR_POS [`acd0f4f`](https://github.com/lvgl/lvgl/commit/acd0f4fbc71ffbfeb382b7af1fa52caf3cdcda6c)
-- fix(scroll) in scroll to view functions respect disabled LV_OBJ_FLAG_SCROLLABLE [`9318e02`](https://github.com/lvgl/lvgl/commit/9318e02ef5e29d2f6ce0ab4b2aa67c6542752822)
-- fix(flex) remove unused variable [`747b6a2`](https://github.com/lvgl/lvgl/commit/747b6a2a9af9bafe4e6c778cca23e278cb7e4ea4)
-- feat(canvas) add lv_canvas_set_px_opa [`b3b3ffc`](https://github.com/lvgl/lvgl/commit/b3b3ffc2b3b322f7401d15c4ba2ef0cdb00e2990)
-- fix(textarea) allow using cursor with not full bg_opa [`c9d3965`](https://github.com/lvgl/lvgl/commit/c9d396571d0726aab5d011f37df648d337e5bc12)
-- fix(txt) _lv_txt_get_next_line return 0 on empty texts [`82f3fbc`](https://github.com/lvgl/lvgl/commit/82f3fbcad7b710a89b876c32f3583090c99e847c)
-- fix(btnmatrix) always update row_cnt [`86012ae`](https://github.com/lvgl/lvgl/commit/86012aefc7197209357290c780029aa39b3738dc)
-- fix(scroll) minor fixes on obj scroll handling [`a4128a8`](https://github.com/lvgl/lvgl/commit/a4128a83562e0daacd949333ba7cbfec650f8050)
-- fix(table) consider border width for cell positions [`f2987b6`](https://github.com/lvgl/lvgl/commit/f2987b6591046f1384b0089187fd81da10834021)
-- fix(log) be sure LV_LOG_... is not empty if logs are disabled [`47734c4`](https://github.com/lvgl/lvgl/commit/47734c4abedf6b6005069d15a8c4c2fcff73f85e)
-- fix(arc) fix LV_ARC_MODE_REVERSE [`df3b969`](https://github.com/lvgl/lvgl/commit/df3b96900b1266ed4856438d9121e39905d510bb)
-- fix(obj) in lv_obj_move_to_index() do not send LV_EVENT_CHILD_CHANGED on all changed child [`32e8276`](https://github.com/lvgl/lvgl/commit/32e8276db7403d8dc9c9b9f0c77d331049e8c07d)
-- feat(event) add lv_obj_remove_event_cb_with_user_data [`4eddeb3`](https://github.com/lvgl/lvgl/commit/4eddeb35abee1f9cd2d1fd210f11cc096cb609c7)
-- fix(draw) fix shadow drawing with radius=0 [`4250e3c`](https://github.com/lvgl/lvgl/commit/4250e3c62737697cd8bc78d991a3d66216efa437)
-- fix(msgbox) directly store the pointer of all children [`eb5eaa3`](https://github.com/lvgl/lvgl/commit/eb5eaa39406473cd90a7f78d710ce950cbf47548)
-- fix(draw) use the filtered colors in lv_obj_init_draw_xxx_dsc() functions [`78725f2`](https://github.com/lvgl/lvgl/commit/78725f23da24fe22543ab3388c87bf3cfbd0e51a)
-- fix(arc) fix full arc invalidation [`98b9ce5`](https://github.com/lvgl/lvgl/commit/98b9ce599751c9de0421acd419430cc6ccd7cad9)
-- chore(led) expose LV_LED_BRIGHT_MIN/MAX in led.h [`3f18b23`](https://github.com/lvgl/lvgl/commit/3f18b234f601edefb16b1ffdb0c539e823b1c025)
-- fix(group) keep the focused object in lv_group_swap_obj [`a997147`](https://github.com/lvgl/lvgl/commit/a9971471ba34352a1d7b307977cb2f635b28a031)
-- fix(obj) swap objects in the group too in lv_obj_swap() [`52c7558`](https://github.com/lvgl/lvgl/commit/52c7558ab46a7024e05499edb483f115b13086f0)
-- fix(theme) use opacity on button's shadow in the default theme [`c5342e9`](https://github.com/lvgl/lvgl/commit/c5342e9324c492c70b65f8c228d44b7a290cf110)
-- fix(win) enable clip_corner and border_post by default [`493ace3`](https://github.com/lvgl/lvgl/commit/493ace352fea0eaa37abccaa0938c0c4a12a995a)
-- fix(draw) fix rectangle drawing with clip_corner enabled [`01237da`](https://github.com/lvgl/lvgl/commit/01237da474b9703fb544163db5f66645c2b6935c)
-- fix(arc) fix other invalidation issues [`b0a7337`](https://github.com/lvgl/lvgl/commit/b0a733766daee1edfabaec8df4a5fedd0180ccaf)
-- feat(obj) add lv_obj_get_x/y_aligned [`98bc1fe`](https://github.com/lvgl/lvgl/commit/98bc1fe09e12a64333e91b4c25327c283a700af5)
-- fix(calendar) fix incorrect highlight of today [`adbac52`](https://github.com/lvgl/lvgl/commit/adbac5220b2d75f08de110b3f426066e24f46998)
-- fix(arc, meter) fix invalidation in special cases [`0f14f49`](https://github.com/lvgl/lvgl/commit/0f14f49465ca701c98f76ac95bda4a537c0fadfa)
-- fix(canvas) invalidate the image on delete [`a1b362c`](https://github.com/lvgl/lvgl/commit/a1b362c98622ecbc063cfb17fb091fdab4522e8a)
-- fix(msgbox) return the correct pointer from lv_msgbox_get_text [`50ea6fb`](https://github.com/lvgl/lvgl/commit/50ea6fb3fefb3a6edc958154c575dcdcacbfdb3a)
-- fix(bidi) fix the handling of LV_BASE_DIR_AUTO in several widgets [`7672847`](https://github.com/lvgl/lvgl/commit/7672847ce325e909981582b4153993025da7fe50)
-- fix(build) remove main component dependency (#2420) [`f2c2393`](https://github.com/lvgl/lvgl/commit/f2c2393b305cd71d2fc01ff8945965dccb8488b4)
-- fix(meter) fix inner mask usage [`c28c146`](https://github.com/lvgl/lvgl/commit/c28c14631040fd08da122e192458cb0c65bc9faf)
-- fix(log) fix warning for empty log macros [`4dba8df`](https://github.com/lvgl/lvgl/commit/4dba8df2a196fc7a2b7a8686efb6e47fc6cf0fc6)
-- fix(theme) improve button focus of keyboard [`2504b7e`](https://github.com/lvgl/lvgl/commit/2504b7e4361ad8009e005faf112987585c2e8356)
-- fix(tabview) send LV_EVENT_VALUE_CHANGED only once [`933d282`](https://github.com/lvgl/lvgl/commit/933d2829aca8bc269c0b481f2a535274626374bc)
-- fix(obj style) fix children reposition if the parent's padding changes. [`57cf661`](https://github.com/lvgl/lvgl/commit/57cf6610a9ec2e6458035abfdaa5554f4296c89c)
-- fix(template) update indev template for v8 [`d8a3d3d`](https://github.com/lvgl/lvgl/commit/d8a3d3d0d759ad0145f134a3f08433f3fdffcb75)
-- fix(obj) detecting which indev sent LV_EVENT_FOCUS [`f03d4b8`](https://github.com/lvgl/lvgl/commit/f03d4b8cb9928077a04b839db0bd5c625919d903)
-- fix(roller) adjust the size of the selected area correctly [`01d1c87`](https://github.com/lvgl/lvgl/commit/01d1c873e19d0d77e1444ba79468db63f26a448a)
-- fix(imgbtn) consider width==LV_SIZE_CONTENT if only mid. img is set [`7e49f48`](https://github.com/lvgl/lvgl/commit/7e49f48894c5c3eb9793dbf1c8630f3cfdc3c091)
-- fix(flex) fix NULL pointer dereference [`97ba12f`](https://github.com/lvgl/lvgl/commit/97ba12f280f0fa5400ff18c5317b9736063d8391)
-- fix(obj, switch) do not send LV_EVENT_VALUE_CHANGED twice [`713b39e`](https://github.com/lvgl/lvgl/commit/713b39ecdb7e8e219cc295bad7d953ff2136f138)
-- fix(coords) fix using large coordinates [`428db94`](https://github.com/lvgl/lvgl/commit/428db9494dc43d65026a9c1fb42c50daede82fc2)
-- fix(chart) fix crash if no series are added [`c728b5c`](https://github.com/lvgl/lvgl/commit/c728b5ceda0a5a93d5a0859eb88261db582cf1eb)
-- fix(meter) fix needle image invalidation [`54d8e81`](https://github.com/lvgl/lvgl/commit/54d8e8170bd4964909cee15a256408e7f08ccf21)
-- fix(mem) add lv_ prefix to tlsf functions and types [`0d52b59`](https://github.com/lvgl/lvgl/commit/0d52b59cb16dda377f8a1ac581a851b830b7bf53)
-- fix(pxp) change LV_COLOR_TRANSP to LV_COLOR_CHROMA_KEY to v8 compatibility [`81f3068`](https://github.com/lvgl/lvgl/commit/81f3068dd77d47e7079e6697ea5d00f69202c1bd)
-
-### Examples
-
-- example(chart) add area chart example [`2507`](https://github.com/lvgl/lvgl/pull/2507)
-- example(anim) add demo to use cubic-bezier [`2393`](https://github.com/lvgl/lvgl/pull/2393)
-- feat(example) add lv_example_chart_9.py [`2604`](https://github.com/lvgl/lvgl/pull/2604)
-- feat(example) add lv_example_chart_8.py [`2611`](https://github.com/lvgl/lvgl/pull/2611)
-- feat(example) chart example to add gap between the old and new data [`2565`](https://github.com/lvgl/lvgl/pull/2565)
-- feat(example) add lv example list 2 [`2545`](https://github.com/lvgl/lvgl/pull/2545)
-- feat(examples) add MicroPython version of lv_example_anim_3 and allow loading roller font dynamically [`2412`](https://github.com/lvgl/lvgl/pull/2412)
-- feat(examples) added MP version of second tabview example [`2347`](https://github.com/lvgl/lvgl/pull/2347)
-- fix(example):format codes [`2731`](https://github.com/lvgl/lvgl/pull/2731)
-- fix(example) minor fixes in lv_example_chart_2.py [`2601`](https://github.com/lvgl/lvgl/pull/2601)
-- feat(example) add text with gradient example [`462fbcb`](https://github.com/lvgl/lvgl/commit/462fbcbf49f47b9f329b6c15d2ca04ef09806cd9)
-- fix(example_roller_3) mask free param bug [`2553`](https://github.com/lvgl/lvgl/pull/2553)
-- fix(examples) don't compile assets unless needed [`2523`](https://github.com/lvgl/lvgl/pull/2523)
-- fix(example) scroll example sqort types [`2498`](https://github.com/lvgl/lvgl/pull/2498)
-- fix(examples) join usage [`2425`](https://github.com/lvgl/lvgl/pull/2425)
-- fix(examples) add missing lv.PART.INDICATOR [`2423`](https://github.com/lvgl/lvgl/pull/2423)
-- fix(examples) use lv.grid_fr for MicroPython [`2419`](https://github.com/lvgl/lvgl/pull/2419)
-- fix(examples) remove symlinks [`2406`](https://github.com/lvgl/lvgl/pull/2406)
-- fix(examples) import 'u'-prefixed versions of modules [`2365`](https://github.com/lvgl/lvgl/pull/2365)
-- fix(examples) remove cast in MP scripts [`2354`](https://github.com/lvgl/lvgl/pull/2354)
-- fix(examples) fix MicroPython examples and run the examples with CI [`2339`](https://github.com/lvgl/lvgl/pull/2339)
-- fix(examples) align with renamed Micropython APIs [`2338`](https://github.com/lvgl/lvgl/pull/2338)
-
-- fix(examples) adjust canvas example for MicroPython API change [`52d1c2e`](https://github.com/lvgl/lvgl/commit/52d1c2e5b53eda4270abc0caa0eb309b35c010c8)
-- fix(example) revert test code [`77e2c1f`](https://github.com/lvgl/lvgl/commit/77e2c1ff3d3ff035a3613f2ed0e5538513e8b4a1)
-- feat(example) add checkbox example for radio buttons [`d089b36`](https://github.com/lvgl/lvgl/commit/d089b364e700d1216813106f7b4dfa6cee9aa806)
-- feat(example) add text with gradient example [`462fbcb`](https://github.com/lvgl/lvgl/commit/462fbcbf49f47b9f329b6c15d2ca04ef09806cd9)
-- fix(examples) exclude example animimg images if animimg is disabled [`4d7d306`](https://github.com/lvgl/lvgl/commit/4d7d30677af9ef158fe51fb1d8900d234ea5e181)
-- fix(example) adjust the object sizes in lv_example_anim_timeline_1() [`71a10e4`](https://github.com/lvgl/lvgl/commit/71a10e4ecd4acfddcea279a0b5da219dfb002ff7)
-- fix(example) revert text code from lv_example_checkbox_2 [`28e9593`](https://github.com/lvgl/lvgl/commit/28e9593e5802a2e7d493515059c6327e60ccbf28)
-
-
-### Docs
-
-- docs: fix typo [`2765`](https://github.com/lvgl/lvgl/pull/2765)
-- docs(colorwheel) fix old API names [`2643`](https://github.com/lvgl/lvgl/pull/2643)
-- docs(display) fix typo [`2624`](https://github.com/lvgl/lvgl/pull/2624)
-- docs add static for lv_indev_drv_t [`2605`](https://github.com/lvgl/lvgl/pull/2605)
-- docs(animimg) add to extra widgets index and fix example [`2610`](https://github.com/lvgl/lvgl/pull/2610)
-- docs(animimg) Add missing animation image page [`2609`](https://github.com/lvgl/lvgl/pull/2609)
-- docs(group) remove reference to lv_cont which is gone in v8 [`2580`](https://github.com/lvgl/lvgl/pull/2580)
-- docs(style) use correct API name for local styles [`2550`](https://github.com/lvgl/lvgl/pull/2550)
-- docs(all) Proofread, fix typos and add clarifications in confusing areas [`2528`](https://github.com/lvgl/lvgl/pull/2528)
-- docs(flex) update flex.md [`2517`](https://github.com/lvgl/lvgl/pull/2517)
-- docs more spelling fixes [`2499`](https://github.com/lvgl/lvgl/pull/2499)
-- docs fix typo: arae -> area [`2488`](https://github.com/lvgl/lvgl/pull/2488)
-- docs(readme) fix typo: hosing → hosting. [`2477`](https://github.com/lvgl/lvgl/pull/2477)
-- docs update company name and year [`2476`](https://github.com/lvgl/lvgl/pull/2476)
-- docs fix typos [`2472`](https://github.com/lvgl/lvgl/pull/2472)
-- docs(overview) fix typo [`2465`](https://github.com/lvgl/lvgl/pull/2465)
-- docs(bar) fix typos in widget examples [`2463`](https://github.com/lvgl/lvgl/pull/2463)
-- docs(overview) fix typo [`2454`](https://github.com/lvgl/lvgl/pull/2454)
-- docs(chart) typos [`2427`](https://github.com/lvgl/lvgl/pull/2427)
-- docs(layout) add internal padding paragraph to grid and flex layout p… [`2392`](https://github.com/lvgl/lvgl/pull/2392)
-- docs(porting) fix indev example to remove v7 bool return [`2381`](https://github.com/lvgl/lvgl/pull/2381)
-- docs(README) fix broken references [`2329`](https://github.com/lvgl/lvgl/pull/2329)
-- docs(grid) typo fix [`2310`](https://github.com/lvgl/lvgl/pull/2310)
-- docs(color) language fixes [`2302`](https://github.com/lvgl/lvgl/pull/2302)
-- docs(lv_obj_style) update add_style and remove_style function headers [`2287`](https://github.com/lvgl/lvgl/pull/2287)
-
-- docs(contributing) add commit message format section [`3668e54`](https://github.com/lvgl/lvgl/commit/3668e54f06b9e51f407b6f6eb24829c03e3d0ac5)
-- docs minor typo fixes [`84c0086`](https://github.com/lvgl/lvgl/commit/84c00862ae0213a54469e08900da7acf435ed5fe)
-- docs(arduino) update some outdated information [`9a77102`](https://github.com/lvgl/lvgl/commit/9a77102c40f68140d0ba2c6c5e493e51a8773f64)
-- docs(keyboard) add note regarding event handler [`255f729`](https://github.com/lvgl/lvgl/commit/255f7294d387d65bbc56c0f8af84f7fa2f3cfdfa)
-- docs minor CSS fix [`acbb680`](https://github.com/lvgl/lvgl/commit/acbb680683fc726e942f59d4296501838e90bde1)
-- docs minor CSS improvements [`7f367d6`](https://github.com/lvgl/lvgl/commit/7f367d6956c4d87b75a90cf1798550e986c5c248)
-- docs(keyboard) change `LV_KEYBOARD_MODE_NUM` to `LV_KEYBOARD_MODE_NUMBER` [`6e83d37`](https://github.com/lvgl/lvgl/commit/6e83d378e933c426550a7d6bc8fd0dd7fa9ba051)
-- docs(textarea) clarify the use of text selection bg_color [`65673c0`](https://github.com/lvgl/lvgl/commit/65673c0e15c48b5926da26ae1a1b8d0a0a8161a3)
-- docs list all examples on one page [`25acaf4`](https://github.com/lvgl/lvgl/commit/25acaf45ca87271106b23b52d0d941228e117859)
-- docs(examples) add MicroPython examples [`6f37c4f`](https://github.com/lvgl/lvgl/commit/6f37c4fc560c13545177e15576c5b3085c8f2c2a)
-- docs(filesystem) update to v8 [`7971ade`](https://github.com/lvgl/lvgl/commit/7971ade47b15898efb6fca17d34ca30f1ee5c926)
-- docs(style) complete the description of style the properties [`55e8846`](https://github.com/lvgl/lvgl/commit/55e8846871f812f888c8354e4ec8974ac0650165)
-- docs example list fixes [`cd600d1`](https://github.com/lvgl/lvgl/commit/cd600d105650bae08f9732a654c6a2c85e610cd5)
-- docs(style) complete the description of style the properties [`ff087da`](https://github.com/lvgl/lvgl/commit/ff087dafb4ecd016ee4920bfe4f162b1db58f7cb)
-- docs(README) update links, examples, and add services menu [`3471bd1`](https://github.com/lvgl/lvgl/commit/3471bd1c698ee58f6632415559dcc34e9d2ee3c0)
-- docs(color) update colors' docs [`9056b5e`](https://github.com/lvgl/lvgl/commit/9056b5ee1bfea6796307bdf983a4a00ea47fe9f0)
-- docs update lv_fs.h, layer and align.png to v8 [`31ab062`](https://github.com/lvgl/lvgl/commit/31ab0628d5cfc57e55f42e5f59689388b034177c)
-- docs(color) minor fix [`ac8f453`](https://github.com/lvgl/lvgl/commit/ac8f4534a51b418377c2eac62dbd731b9be71977)
-- docs update changelog [`c386110`](https://github.com/lvgl/lvgl/commit/c386110e2390399ab97936622e59c510ba414e19)
-- docs(extra) add extra/README.md [`8cd504d`](https://github.com/lvgl/lvgl/commit/8cd504d58bb679fe1f260e3eee59fcb0b85cb589)
-- docs add lazy load to the iframes of the examples [`c49e830`](https://github.com/lvgl/lvgl/commit/c49e830aad2c847611f3398767e85c193909559a)
-- docs(os) add example and clarify some points [`d996453`](https://github.com/lvgl/lvgl/commit/d996453207caa50a90a66d05565431fa288be96b)
-- docs(rlottie) fix build error [`ce0b564`](https://github.com/lvgl/lvgl/commit/ce0b56458846daa65288f901e9b8ef1083eab468)
-- docs include paths in libs [`f5f9562`](https://github.com/lvgl/lvgl/commit/f5f956233657f95b45a45d872e5d6e68c05eecd4)
-- docs libs fixes [`8e7bba6`](https://github.com/lvgl/lvgl/commit/8e7bba6acec66a4f6b80496de9fd21a8e3c4c6ee)
-- docs(obj) add comment lv_obj_get_x/y/width/height about postponed layout recalculation [`533066e`](https://github.com/lvgl/lvgl/commit/533066e6accbe2cbe1b60556eb61ebb2a07185a2)
-- docs fix example list [`ed77ed1`](https://github.com/lvgl/lvgl/commit/ed77ed1dae088ef29194cf3c6bb552e1ee67d78b)
-- docs describe the options to include or skip lv_conf.h [`174ef66`](https://github.com/lvgl/lvgl/commit/174ef6692e0b05338890a1cf524d9dcbf5c25f6c)
-- docs(overview) spelling fixes [`d2efb8c`](https://github.com/lvgl/lvgl/commit/d2efb8c6e5ceedbb9d9c1a1c89ef709e6570e360)
-- docs(table) describe keypad/encoder navigation [`749d1b3`](https://github.com/lvgl/lvgl/commit/749d1b3ec31ec2ef27f594ed0a4af93edb2c10f0)
-- docs update CHANGELOG [`0f8bc18`](https://github.com/lvgl/lvgl/commit/0f8bc18f6aacb6a74e0bda59068d3d178fa66434)
-- docs(image) mention the frame_id parameter of lv_img_decoder_open [`2433732`](https://github.com/lvgl/lvgl/commit/2433732570a817f566308e025d89227a8c650f5f)
-- docs(arduino) update how to use the examples [`06962a5`](https://github.com/lvgl/lvgl/commit/06962a564fd668eced22b2e9bc19e7732abf94ec)
-- docs(rlottie): fix typo in commands [`ed9169c`](https://github.com/lvgl/lvgl/commit/ed9169c56dc1f34b1f021457b78c9f3eccba13cf)
-- docs(indev, layer) update lv_obj_set_click() to lv_obj_add_flag() [`bcd99e8`](https://github.com/lvgl/lvgl/commit/bcd99e8e438cc1b63762f8933d26bbb38fd42a2d)
-- docs update version support table [`e6e98ab`](https://github.com/lvgl/lvgl/commit/e6e98abbc25cc4aa20b05d1002a651e4012ebff7)
-- docs fix example list [`c6f99ad`](https://github.com/lvgl/lvgl/commit/c6f99ad200c7862c2f3cca3811bc2bdc2c95e971)
-- docs(examples) add <hr/> to better separate examples [`a1b59e3`](https://github.com/lvgl/lvgl/commit/a1b59e34dd23fb12bd6e9ab0ffa92b2bfcec66b3)
-- docs(checkbox) update the comment lv_checkbox_set_text_static [`3e0ddd0`](https://github.com/lvgl/lvgl/commit/3e0ddd028511c6c4a0ba33a15526f404b31a50b8)
-- docs(grid) fix missing article [`da0c97a`](https://github.com/lvgl/lvgl/commit/da0c97a367746573fa2385d0ddd184f27ca20dbd)
-- docs(display) fix grammar in one spot [`5dbea7d`](https://github.com/lvgl/lvgl/commit/5dbea7d72522e78f66fb468e1d5a98fa28179ed1)
-- docs(style) fix typo in style property descriptions [`4e3b860`](https://github.com/lvgl/lvgl/commit/4e3b86020fdc8e183335c6c9b8604129e3e3ddcc)
-- docs(flex) fix typo in flex grow section [`e5fafc4`](https://github.com/lvgl/lvgl/commit/e5fafc412214ab01d46ebd37e272e3ffc3164ea4)
-- docs(indev) clarify purpose of `continue_reading` flag [`706f81e`](https://github.com/lvgl/lvgl/commit/706f81e5862af27fb0b60cdaf02c650c31787c78)
-- docs(license) update company name and year [`7c1eb00`](https://github.com/lvgl/lvgl/commit/7c1eb0064535f2d914b9dc885ebb2a2d0d73381d)
-- docs fix typo [`8ab8064`](https://github.com/lvgl/lvgl/commit/8ab806459c1b99990b91b4cd6a656ff6736c1b63)
-- docs add libs to the main index [`1a8fed5`](https://github.com/lvgl/lvgl/commit/1a8fed5df02545fe97845e3acd86e33f7048cd8e)
-- docs add btn_example.png [`8731ef1`](https://github.com/lvgl/lvgl/commit/8731ef141e2ad2f022b1c01e1bf7605f983b013f)
-
-- docs(btnmatrix) fix typo with set_all/clear_all parameters [`51a82a1`](https://github.com/lvgl/lvgl/commit/51a82a17ffe938d07d94660f49fd18962060943a)
-
-### CI and tests
-
-- ci(micropython) fix git fetch [`2757`](https://github.com/lvgl/lvgl/pull/2757)
-- test(txt) initial unit tests and general code cleanup/fixes [`2623`](https://github.com/lvgl/lvgl/pull/2623)
-- test add setUp and tearDown to test template [`2648`](https://github.com/lvgl/lvgl/pull/2648)
-- test(arc) add initial unit tests [`2617`](https://github.com/lvgl/lvgl/pull/2617)
-- ci(micropython) add ESP32 and STM32 tests [`2629`](https://github.com/lvgl/lvgl/pull/2629)
-- test(checkbox) add initial tests [`2551`](https://github.com/lvgl/lvgl/pull/2551)
-- test(ci) build and run tests in parallel. [`2515`](https://github.com/lvgl/lvgl/pull/2515)
-- ci(tests) run tests using ctest [`2503`](https://github.com/lvgl/lvgl/pull/2503)
-- ci(tests) add dependency on GNU parallel [`2510`](https://github.com/lvgl/lvgl/pull/2510)
-- ci(tests) use common script to install development prereqs [`2504`](https://github.com/lvgl/lvgl/pull/2504)
-- test convert Makefile to CMake [`2495`](https://github.com/lvgl/lvgl/pull/2495)
-- test Refactor unit test scripts. [`2473`](https://github.com/lvgl/lvgl/pull/2473)
-
-- test(font_loader) migrate the existing font loader test [`bc5b3be`](https://github.com/lvgl/lvgl/commit/bc5b3be61f7751852dc99509a6ab83faaf6d1235)
-- test add build test again, add dropdown test, integrate gcov and gvocr [`e35b1d0`](https://github.com/lvgl/lvgl/commit/e35b1d04bdc7d531d72ebce7d1f031be2631e776)
-- test(dropdown) add tess for keypad and encoder [`4143b80`](https://github.com/lvgl/lvgl/commit/4143b804c8f4b4324141ad0f529bac4e9acf1442)
-- test add keypad and encoder emulators [`e536bb6`](https://github.com/lvgl/lvgl/commit/e536bb6325728db21ef5c729a99f2161a8125625)
-- tests add mouse emulator [`2ba810b`](https://github.com/lvgl/lvgl/commit/2ba810b8de19afc3e9ac18e5bd8ab16af10a4433)
-- tests add README [`b765643`](https://github.com/lvgl/lvgl/commit/b765643e4902de359e88fdf6d314e9afdb2daa9a)
-- test add move tests to test_cases and test_runners directories [`e9e010a`](https://github.com/lvgl/lvgl/commit/e9e010a8468ee307c350e071251f22459173e601)
-- test fix CI build error [`c38cae2`](https://github.com/lvgl/lvgl/commit/c38cae22fbf6cef7564fbebe2145a7def20d52e1)
-- ci add config for 8bpp [`3eacc59`](https://github.com/lvgl/lvgl/commit/3eacc5923c0a554e7ff4489776a8982dfc142115)
-- test move more source files to src folder [`3672f87`](https://github.com/lvgl/lvgl/commit/3672f873328b4471ac9d5d23696f7bc99a87bc43)
-- test update CI for the new tests [`a3898b9`](https://github.com/lvgl/lvgl/commit/a3898b931e81860acf197bc88fd3dd6f8885eb2c)
-- test cleaned up report folder [`b9b4ba5`](https://github.com/lvgl/lvgl/commit/b9b4ba5b2608f5709678463f62b3d3f937780235)
-- test fix build error [`61cda59`](https://github.com/lvgl/lvgl/commit/61cda59cbe8569326ef9d366c520b89be292f5ea)
-- test(font_loader) migrate the existing font loader test [`d6dbbaa`](https://github.com/lvgl/lvgl/commit/d6dbbaaa34304b4c889415439ab562056e0840a5)
-- test add move tests to test_cases and test_runners directories [`d2e735e`](https://github.com/lvgl/lvgl/commit/d2e735ef36bd99c16ccaa281dcaa5f418e2dec98)
-- test add 3rd party libs to all tests and also fix them [`7a95fa9`](https://github.com/lvgl/lvgl/commit/7a95fa9e2de9639a3c2f1990ff63b467be54a7aa)
-- test(arc): add test case for adv_hittest [`e83df6f`](https://github.com/lvgl/lvgl/commit/e83df6f14de1a9eb1d137b123fac96c25a1b7715)
-- ci create check for lv_conf_internal.h [`5d8285e`](https://github.com/lvgl/lvgl/commit/5d8285e2d37e19670c1daeff229e1dc331f053c4)
-- test fix warning and docs build error [`d908f31`](https://github.com/lvgl/lvgl/commit/d908f31f8f50024d8b3c8d0a11aff9cc1b011049)
-- ci(micropython) add rp2 port [`1ab5c96`](https://github.com/lvgl/lvgl/commit/1ab5c9689f61fd2991653beec7d023472fc96239)
-- test(dropdown) remove dummy test case [`9fb98da`](https://github.com/lvgl/lvgl/commit/9fb98da8a280dc3d5753da1d2aa79eeb1cba47e0)
-- ci(codecov) hide statuses on commits for now [`0b7be77`](https://github.com/lvgl/lvgl/commit/0b7be778a29412fe5562a736855121d19350889c)
-- ci(docs) run apt-get update before installation [`f215174`](https://github.com/lvgl/lvgl/commit/f215174999a18b0e5904e97bfda48f3b81271aa1)
-- test fix LV_USE_LOG_LEVEL -> LV_LOG_LEVEL typo [`80f0b09`](https://github.com/lvgl/lvgl/commit/80f0b09e34596564ca6ec7c23d148f4ce2e17ca3)
-- ci(micropython) add GCC problem matcher [`ab316a0`](https://github.com/lvgl/lvgl/commit/ab316a07bc4d89a633fdd00bc7ff8c5db4b00ad8)
-
-- test convert Makefile to CMake (#2495) [`9c846ee`](https://github.com/lvgl/lvgl/commit/9c846ee493862ef11b46942a6e5af3c1ed8468d1)
-
-### Others
-
-- chore: replace (void)xxx with LV_UNUSED(xxx) [`2779`](https://github.com/lvgl/lvgl/pull/2779)
-- animation improvement [`2743`](https://github.com/lvgl/lvgl/pull/2743)
-- Improve LV_FORMAT_ATTRIBUTE usage [`2673`](https://github.com/lvgl/lvgl/pull/2673)
-- Fix typo in commands to build rlottie [`2723`](https://github.com/lvgl/lvgl/pull/2723)
-- del(.gitmodules): delete .gitmodules [`2718`](https://github.com/lvgl/lvgl/pull/2718)
-- lv_obj_draw_part_dsc_t.text_length added [`2694`](https://github.com/lvgl/lvgl/pull/2694)
-- expose LV_COLOR_DEPTH and LV_COLOR_16_SWAP in micropython [`2679`](https://github.com/lvgl/lvgl/pull/2679)
-- sync lvgl/lv_fs_if [`2676`](https://github.com/lvgl/lvgl/pull/2676)
-- build: always enable CMake install rule in default configuration [`2636`](https://github.com/lvgl/lvgl/pull/2636)
-- build: fix lib name in CMakeLists [`2641`](https://github.com/lvgl/lvgl/pull/2641)
-- build: remove use of 'project' keyword in CMakeLists [`2640`](https://github.com/lvgl/lvgl/pull/2640)
-- build add install rule to CMakeList.txt [`2621`](https://github.com/lvgl/lvgl/pull/2621)
-- Fixed row size calculation [`2633`](https://github.com/lvgl/lvgl/pull/2633)
-- arch add small 3rd party libs to lvgl [`2569`](https://github.com/lvgl/lvgl/pull/2569)
-- Kconfig: Add missing options [`2597`](https://github.com/lvgl/lvgl/pull/2597)
-- Espressif IDF component manager [`2521`](https://github.com/lvgl/lvgl/pull/2521)
-- chore(btnmatrix) removed unnecessary semicolon [`2520`](https://github.com/lvgl/lvgl/pull/2520)
-- Update README.md [`2516`](https://github.com/lvgl/lvgl/pull/2516)
-- Corrected a function name in obj.md [`2511`](https://github.com/lvgl/lvgl/pull/2511)
-- Simple spelling fixes [`2496`](https://github.com/lvgl/lvgl/pull/2496)
-- added lv_obj_move_up() and lv_obj_move_down() [`2467`](https://github.com/lvgl/lvgl/pull/2467)
-- Fix buf name error for "lv_port_disp_template.c" and optimize the arduino example [`2475`](https://github.com/lvgl/lvgl/pull/2475)
-- Fix two examples in the docs with new v8 api [`2486`](https://github.com/lvgl/lvgl/pull/2486)
-- kconfig: minor fix for default dark theme option [`2426`](https://github.com/lvgl/lvgl/pull/2426)
-- doc(table) update doc on cell merging [`2397`](https://github.com/lvgl/lvgl/pull/2397)
-- added example lv_example_anim_timeline_1.py [`2387`](https://github.com/lvgl/lvgl/pull/2387)
-- refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt [`2332`](https://github.com/lvgl/lvgl/pull/2332)
-- Update win.md [`2352`](https://github.com/lvgl/lvgl/pull/2352)
-- Nxp pxp vglite v8 dev [`2313`](https://github.com/lvgl/lvgl/pull/2313)
-- More Snapable --> Snappable replacements [`2304`](https://github.com/lvgl/lvgl/pull/2304)
-- Spelling and other language fixes to documentation [`2293`](https://github.com/lvgl/lvgl/pull/2293)
-- Update quick-overview.md [`2295`](https://github.com/lvgl/lvgl/pull/2295)
-- adding micropython examples [`2286`](https://github.com/lvgl/lvgl/pull/2286)
-
-- format run code-formtter.sh [`d67dd94`](https://github.com/lvgl/lvgl/commit/d67dd943cadb3d21a3d9488b6354f669e2e58c65)
-- Update ROADMAP.md [`2b1ae3c`](https://github.com/lvgl/lvgl/commit/2b1ae3c107539dec130b988cddca5ddb2b5af652)
-- Create .codecov.yml [`e53aa82`](https://github.com/lvgl/lvgl/commit/e53aa82658a1d7324f328c986cb5b7b669803ba2)
-- refactor(examples) drop JS-specific code from header.py [`ef41450`](https://github.com/lvgl/lvgl/commit/ef41450ed87f4f4dd936b63349b5a0c9ce880618)
-- make test run on master and release/v8.* [`227402a`](https://github.com/lvgl/lvgl/commit/227402a81a1cdd34cd57ec04682166d3961c4481)
-- Update release.yml [`0838f12`](https://github.com/lvgl/lvgl/commit/0838f1296b2c55c0b265650ee4310a79730536dd)
-- refactor(examples) drop usys import from header.py [`ad1f91a`](https://github.com/lvgl/lvgl/commit/ad1f91ab32c38cab7f0d1448ce3c4e67b47f4526)
-- Update ROADMAP.md [`a38fcf2`](https://github.com/lvgl/lvgl/commit/a38fcf2c7aa5fd156d3f2b6965ec4f81d7ff5503)
-- Revert "feat(conf) add better check for Kconfig default" [`a5793c7`](https://github.com/lvgl/lvgl/commit/a5793c70a9a60340a5f1c5d33ba1d118af0a76e2)
-- remove temporary test file [`a958c29`](https://github.com/lvgl/lvgl/commit/a958c29af7df66f84520036766929232e0c437c4)
-- start to implement release/patch [`1626a0c`](https://github.com/lvgl/lvgl/commit/1626a0c029504f26e568677debcb7ab0f6053f83)
-- chore(indev) minor formatting [`79ab3d2`](https://github.com/lvgl/lvgl/commit/79ab3d29b01e5f0bff1c754fdc36230584aeaaae)
-- add basic patch release script [`1c3ecf1`](https://github.com/lvgl/lvgl/commit/1c3ecf1cc14f5501a345472278cc485a24b8ab9c)
-- chore(example) minor improvements on lv_example_list_2 [`bb6d6b7`](https://github.com/lvgl/lvgl/commit/bb6d6b77999fde33f560bde92b394a8811303868)
-- tool: add changelog_gen.sh to automatically generate changelog [`6d95521`](https://github.com/lvgl/lvgl/commit/6d955210765de972f78b8c307df2f2387e4580ed)
-- update version numbers to v8.1.0-dev [`8691611`](https://github.com/lvgl/lvgl/commit/8691611de2206669cd22e3e97c844fdf2bf494b0)
-- chore(test) improve prints [`ea8bed3`](https://github.com/lvgl/lvgl/commit/ea8bed34b49343a4e881bdd42096f69d245ef66e)
-- chore(test) improve prints [`0c4bca0`](https://github.com/lvgl/lvgl/commit/0c4bca0f9cbeefaf20fd41e3a561d0e1799bc6b0)
-- chore: update lv_conf_internal.h [`41c2dd1`](https://github.com/lvgl/lvgl/commit/41c2dd16ee87f85338603399bb92e1f6eab84bf6)
-- chore(format) lv_conf_template.h minor formatting [`3c86d77`](https://github.com/lvgl/lvgl/commit/3c86d777c10c80ec9a4c5d3d403bd1395834004a)
-- chore(docs) always deploy master to docs/master as well [`6d05692`](https://github.com/lvgl/lvgl/commit/6d05692d7820a2b833751d6881704b283f1fe618)
-- Update CHANGELOG.md [`48fd73d`](https://github.com/lvgl/lvgl/commit/48fd73d20da4f19556660a9fca7faf042c965f56)
-- Fix compile errors [`6c956cc`](https://github.com/lvgl/lvgl/commit/6c956cc0f402b96512ed07f8a93003a0319fc49c)
-- Update textarea.md [`6d8799f`](https://github.com/lvgl/lvgl/commit/6d8799fbbfb1477ad2e0887644fb4cd900817199)
-- chore(assert) add warning about higher memory usage if LV_USE_ASSERT_STYLE is enabled [`33e4330`](https://github.com/lvgl/lvgl/commit/33e433008e23b48540e83bc5399fd0ccb9e90630)
-- Update page.html [`9573bab`](https://github.com/lvgl/lvgl/commit/9573bab5cbe2da643f5146e62c176bdd0113d954)
-- chore(docs) force docs rebuild [`4a0f413`](https://github.com/lvgl/lvgl/commit/4a0f4139eb98e73b37abf62f66e2cf1c5d4e58db)
-- Fix typo error in color.md [`572880c`](https://github.com/lvgl/lvgl/commit/572880ccd3374ccbe81cf09a0620bf95659ca883)
-- Update arc.md [`2a9b9e6`](https://github.com/lvgl/lvgl/commit/2a9b9e6e1119db8294fdc63d93548fe06e2b6aa2)
-- Update index.rst [`9ce2c77`](https://github.com/lvgl/lvgl/commit/9ce2c7702d15d74f64b7d4bf6273cba442b48c09)
-- chore(docs) minor formatting on example's GitHub link [`75209e8`](https://github.com/lvgl/lvgl/commit/75209e893e89b6aa9d6a231af4661ce6a6dd6161)
-- chore(lv_conf_template) fix spelling mistake [`9d134a9`](https://github.com/lvgl/lvgl/commit/9d134a99e3f59412ee4a941f20bf70053dd4326d)
-- Update CHANGELOG.md [`8472360`](https://github.com/lvgl/lvgl/commit/847236044da01096beae4a586c874b4980f21a55)
-- chore(stale) disable on forks [`93c1303`](https://github.com/lvgl/lvgl/commit/93c1303ee7989d25216262e1d0ea244b59b975f6)
-- Revert "fix(tests) remove src/test_runners when cleaning" [`ae15a1b`](https://github.com/lvgl/lvgl/commit/ae15a1bbfe122115e5c8ac1f707929673843ad37)
-
-- style fix usage of clang-format directives [`2122583`](https://github.com/lvgl/lvgl/commit/2122583ec23d82422e1e3d6f2b5a20745fa5dd6d)
-- Revert "fix(indev) focus on objects on release instead of press" [`f61b2ca`](https://github.com/lvgl/lvgl/commit/f61b2ca45502472cde8ac0983b73dbf153de2b20)
-
-## v8.0.2 (16.07.2021)
-- fix(theme) improve button focus of keyboard
-- fix(tabview) send LV_EVENT_VALUE_CHANGED only once
-- fix(imgbtn) use the correct src in LV_EVENT_GET_SELF_SIZE
-- fix(color) remove extraneous cast for 8-bit color
-- fix(obj style) fix children reposition if the parent's padding changes.
-- fix(color) remove extraneous _LV_COLOR_MAKE_TYPE_HELPER (#2372)
-- fix(spinner) should not be clickable (#2373)
-- fix(obj) improve how the focusing indev is determined
-- fix(template) update indev template for v8
-- fix(printf) skip defining attribute if pycparser is used
-- refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt (#2332)
-- fix(template) include lvgl.h in lv_port_*_template.c files
-- fix(obj) detecting which indev sent LV_EVENT_FOCUS
-- fix (span) fill LV_EVENT_GET_SELF_SIZE (#2360)
-- fix(arc) disable LV_OBJ_FLAG_SCROLL_CHAIN by default
-- fix (draw) fix arc bg image drawing with full arcs
-- fix(disp) fix memory leak in lv_disp_remove (#2355)
-- fix warnings introduced by 3fb8baf5
-- fix(widgets) use lv_obj_class for all the widgets
-- fix(obj) move clean ups from lv_obj_del to lv_obj_destructor
-- fix(roller) fix partial redraw of the selected area
-- fix(roller) adjust the size of the selected area correctly
-- fix(obj) delete useless type conversion (#2343)
-- fix(lv_obj_scroll.h) typos (#2345)
-- fix(scroll) fire LV_EVENT_SCROLL_BEGIN in the same spot for both axes
-- fix(btnmatrix) fix button invalidation on focus change
-- fix(textarea) style update in oneline mode + improve scroll to cursor
-- fix(tlsf) do not use
-- fix(imgbtn) consider width==LV_SIZE_CONTENT if only mid. img is set
-- fix(refr) reduce the nesting level in lv_refr_area
-- fix(txt) enhance the function of break_chars (#2327)
-- fix(pxp): update RTOS macro for SDK 2.10
-- fix(vglite): update for v8
-- fix(pxp): update for v8
-- fix(flex) fix layout update and invalidation issues
-- fix(flex) fix NULL pointer dereference
-- fix(obj, switch) do not send LV_EVENT_VALUE_CHANGED twice
-- fix(color) overflow with 16-bit color depth
-- fix(coords) fix using large coordinates
-- fix(chart) fix crash if no series are added
-- fix(chart) invalidation with LV_CHART_UPDATE_MODE_SHIFT
-- fix(align) fix lv_obj_align_to G
-- fix(table) invalidate the table on cell value change
-- fix(label) remove duplicated lv_obj_refresh_self_size
-- fix(draw) underflow in subpixel font drawing
-- fix (scroll) do not send unnecessary scroll end events
-
-
-## v8.0.1 (14.06.2021)
-- docs(filesystem) update to v8 7971ade4
-- fix(msgbox) create modals on top layer instead of act screen 5cf6303e
-- fix(colorwheel) disable LV_OBJ_FLAG_SCROLL_CHAIN by default 48d1c292
-- docs(grid) typo fix (#2310) 69d109d2
-- fix(arduino) fix the prototype of my_touchpad_read in the LVGL_Arduino.ino 1a62f7a6
-- fix(meter) fix needle image invalidation 54d8e817
-- fix(mem) add lv_ prefix to tlsf functions and types 0d52b59c
-- fix(calendar) fix the position calculation today ad05e196
-- fix(typo) rename LV_OBJ_FLAG_SNAPABLE to LV_OBJ_FLAG_SNAPPABLE e697807c
-- docs(color) language fixes (#2302) 07ecc9f1
-- fix(tick) minor optimization on lv_tick_inc call test b4305df5
-- Spelling and other language fixes to documentation (#2293) d0aaacaf
-- fix(theme) show disabled state on buttons of btnmatrix, msgbox and keyboard 0be582b3
-- fix(scroll) keep the scroll position on object deleted 52edbb46
-- fix(msgbox) handle NULL btn map parameter 769c4a30
-- fix(group) allow refocusing objects 1520208b
-- docs(overview) spelling fixes d2efb8c6
-- Merge branch 'master' of https://github.com/lvgl/lvgl 45960838
-- feat(timer) check if lv_tick_inc is called aa6641a6
-- feat(docs) add view on GitHub link a716ac6e
-- fix(theme) fix the switch style in the default theme 0c0dc8ea
-- docs fix typo 8ab80645
-- Merge branch 'master' of https://github.com/lvgl/lvgl e796448f
-- feat(event) pass the scroll animation to LV_EVENT_SCROLL_BEGIN ca54ecfe
-- fix(tabview) fix with left and right tabs 17c57449
-- chore(docs) force docs rebuild 4a0f4139
-- chore(docs) always deploy master to docs/master as well 6d05692d
-- fix(template) update lv_objx_template to v8 38bb8afc
-- docs(extra) add extra/README.md 8cd504d5
-- Update CHANGELOG.md 48fd73d2
-- Update quick-overview.md (#2295) 5616471c
-- fix(pxp) change LV_COLOR_TRANSP to LV_COLOR_CHROMA_KEY to v8 compatibility 81f3068d
-- adding micropython examples (#2286) c60ed68e
-- docs(color) minor fix ac8f4534
-- fix(example) revert test code 77e2c1ff
-- fix(draw) with additive blending with 32-bit color depth 786db2af
-- docs(color) update colors' docs 9056b5ee
-- Merge branch 'master' of https://github.com/lvgl/lvgl a711a1dd
-- perf(refresh) optimize where to wait for lv_disp_flush_ready with 2 buffers d0172f14
-- docs(lv_obj_style) update add_style and remove_style function headers (#2287) 60f7bcbf
-- fix memory leak of spangroup (#2285) 33e0926a
-- fix make lv_img_cache.h public because cache invalidation is public 38ebcd81
-- Merge branch 'master' of https://github.com/lvgl/lvgl 2b292495
-- fix(btnmatrix) fix focus event handling 3b58ef14
-- Merge pull request #2280 from lvgl/dependabot/pip/docs/urllib3-1.26.5 a2f45b26
-- fix(label) calculating the clip area 57e211cc
-- chore(deps): bump urllib3 from 1.26.4 to 1.26.5 in /docs b2f77dfc
-- fix(docs) add docs about the default group 29bfe604
-
-## v8.0.0 (01.06.2021)
-
-v8.0 brings many new features like simplified and more powerful scrolling, new layouts inspired by CSS Flexbox and Grid, simplified and improved widgets, more powerful events, hookable drawing, and more.
-
-v8 is a major change and therefore it's not backward compatible with v7.
-
-### Directory structure
-- The `lv_` prefix is removed from the folder names
-- The `docs` is moved to the `lvgl` repository
-- The `examples` are moved to the `lvgl` repository
-- Create an `src/extra` folder for complex widgets:
- - It makes the core LVGL leaner
- - In `extra` we can have a lot and specific widgets
- - Good place for contributions
-
-### Widget changes
-- `lv_cont` removed, layout features are moved to `lv_obj`
-- `lv_page` removed, scroll features are moved to `lv_obj`
-- `lv_objmask` the same can be achieved by events
-- `lv_meter` added as the union of `lv_linemeter` and `lv_gauge`
-- `lv_span` new widget mimicking HTML ``
-- `lv_animing` new widget for simple slideshow animations
-- \+ many minor changes and improvements
-
-### New scrolling
-- Support "elastic" scrolling when scrolled in
-- Support scroll chaining among any objects types (not only `lv_pages`s)
-- Remove `lv_drag`. Similar effect can be achieved by setting the position in `LV_EVENT_PRESSING`
-- Add snapping
-- Add snap stop to scroll max 1 snap point
-
-### New layouts
-- [CSS Grid](https://css-tricks.com/snippets/css/a-guide-to-grid/)-like layout support
-- [CSS Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)-like layout support
-
-### Styles
-- Optimize and simplify styles
-- State is saved in the object instead of the style property
-- Object size and position can be set in styles too
-
-### Events
-- Allow adding multiple events to an object
-- A `user_data` can be attached to the added events
-
-### Driver changes
-- `lv_disp_drv_t`, `lv_indev_drv_t`, `lv_fs_drv_t` needs to be `static`
-- `...disp_buf...` is renamed to `draw_buf`. See an initialization example [here](https://github.com/lvgl/lv_sim_eclipse_sdl/blob/release/v8.0/main.c#L128-L141).
-- No partial update if two screen sized buffers are set
-- `disp_drv->full_refresh = 1` makes always the whole display redraw.
-- `hor_res` and `ver_res` need to be set in `disp_drv`
-- `indev_read_cb` returns `void`. To indicate that there is more that to read set `data->continue_reading = 1` in the `read_cb`
-
-### Other changes
-- Remove the copy parameter from create functions
-- Simplified File system interface API
-- Use a more generic inheritance
-- The built-in themes are reworked
-- `lv_obj_align` now saved the alignment and realigns the object automatically but can't be used to align to other than the parent
-- `lv_obj_align_to` can align to an object but doesn't save the alignment
-- `lv_pct(x)` can be used to set the size and position in percentage
-- There are many other changes in widgets that are not detailed here. Please refer to the documentation of the widgets.
-
-### New release policy
-- We will follow [Release branches with GitLab flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html#release-branches-with-gitlab-flow)
-- Minor releases are expected in every 3-4 month
-- `master` will always contain the latest changes
-
-### Migrating from v7 to v8
-- First and foremost, create a new `lv_conf.h` based on `lv_conf_template.h`.
-- To try the new version it's recommended to use a simulator project and see the examples.
-- When migrating your project to v8
- - Update the drivers are described above
- - Update the styles
- - Update the events
- - Use the new layouts instead of `lv_cont` features
- - Use `lv_obj` instead of `lv_page`
- - See the changes in [Colors](https://docs.lvgl.io/8.0/overview/color.html)
- - The other parts are mainly minor renames and refactoring. See the functions' documentation for descriptions.
-
-## v7.11.0 (16.03.2021)
-
-### New features
-- Add better screen orientation management with software rotation support
-- Decide text animation's direction based on base_dir (when using LV_USE_BIDI)
-
-### Bugfixes
-- fix(gauge) fix needle invalidation
-- fix(bar) correct symmetric handling for vertical sliders
-
-## v7.10.1 (16.02.2021)
-
-### Bugfixes
-- fix(draw) overlap outline with background to prevent aliasing artifacts
-- fix(indev) clear the indev's `act_obj` in `lv_indev_reset`
-- fix(text) fix out of bounds read in `_lv_txt_get_width`
-- fix(list) scroll list when button is focused using LV_KEY_NEXT/PREV
-- fix(text) improve Arabic contextual analysis by adding hyphen processing and proper handling of lam-alef sequence
-- fix(delete) delete animation after the children are deleted
-- fix(gauge) consider paddings for needle images
-
-## v7.10.0 (02.02.2021)
-
-### New features
-- feat(indev) allow input events to be passed to disabled objects
-- feat(spinbox) add inline get_step function for MicroPython support
-
-### Bugfixes
-- fix(btnmatrix) fix lv_btnmatrix_get_active_btn_text() when used in a group
-
-## v7.9.1 (19.01.2021)
-
-### Bugfixes
-- fix(cpicker) fix division by zero
-- fix(dropdown) fix selecting options after the last one
-- fix(msgbox) use the animation time provided
-- fix(gpu_nxp_pxp) fix incorrect define name
-- fix(indev) don't leave edit mode if there is only one object in the group
-- fix(draw_rect) fix draw pattern stack-use-after-scope error
-
-
-## v7.9.0 (05.01.2021)
-
-### New features
-- feat(chart) add lv_chart_remove_series and lv_chart_hide_series
-- feat(img_cache) allow disabling image caching
-- calendar: make get_day_of_week() public
-- Added support for Zephyr integration
-
-### Bugfixes
-- fix(draw_rect) free buffer used for arabic processing
-- fix(win) arabic process the title of the window
-- fix(dropdown) arabic process the option in lv_dropdown_add_option
-- fix(textarea) buffer overflow in password mode with UTF-8 characters
-- fix(textarea) cursor position after hiding character in password mode
-- fix(linemeter) draw critical lines with correct color
-- fix(lv_conf_internal) be sure Kconfig defines are always uppercase
-- fix(kconfig) handle disable sprintf float correctly.
-- fix(layout) stop layout after recursion threshold is reached
-- fix(gauge) fix redraw with image needle
-
-## v7.8.1 (15.12.2020)
-
-### Bugfixes
-- fix(lv_scr_load_anim) fix when multiple screens are loaded at the same time with delay
-- fix(page) fix LV_SCROLLBAR_MODE_DRAG
-
-## v7.8.0 (01.12.2020)
-
-### New features
-- make DMA2D non blocking
-- add unscii-16 built-in font
-- add KConfig
-- add lv_refr_get_fps_avg()
-
-### Bugfixes
-- fix(btnmatrix) handle arabic texts in button matrices
-- fix(indev) disabled object shouldn't absorb clicks but let the parent to be clicked
-- fix(arabic) support processing again already processed texts with _lv_txt_ap_proc
-- fix(textarea) support Arabic letter connections
-- fix(dropdown) support Arabic letter connections
-- fix(value_str) support Arabic letter connections in value string property
-- fix(indev) in LV_INDEV_TYPE_BUTTON recognize 1 cycle long presses too
-- fix(arc) make arc work with encoder
-- fix(slider) adjusting the left knob too with encoder
-- fix reference to LV_DRAW_BUF_MAX_NUM in lv_mem.c
-- fix(polygon draw) join adjacent points if they are on the same coordinate
-- fix(linemeter) fix invalidation when setting new value
-- fix(table) add missing invalidation when changing cell type
-- refactor(roller) rename LV_ROLLER_MODE_INIFINITE -> LV_ROLLER_MODE_INFINITE
-
-## v7.7.2 (17.11.2020)
-### Bugfixes
-- fix(draw_triangle): fix polygon/triangle drawing when the order of points is counter-clockwise
-- fix(btnmatrix): fix setting the same map with modified pointers
-- fix(arc) fix and improve arc dragging
-- label: Repair calculate back `dot` character logical error which cause infinite loop.
-- fix(theme_material): remove the bottom border from tabview header
-- fix(imgbtn) guess the closest available state with valid src
-- fix(spinbox) update cursor position in lv_spinbox_set_step
-
-## v7.7.1 (03.11.2020)
-### Bugfixes
-- Respect btnmatrix's `one_check` in `lv_btnmatrix_set_btn_ctrl`
-- Gauge: make the needle images to use the styles from `LV_GAUGE_PART_PART`
-- Group: fix in `lv_group_remove_obj` to handle deleting hidden objects correctly
-
-## v7.7.0 (20.10.2020)
-
-### New features
-- Add PXP GPU support (for NXP MCUs)
-- Add VG-Lite GPU support (for NXP MCUs)
-- Allow max. 16 cell types for table
-- Add `lv_table_set_text_fmt()`
-- Use margin on calendar header to set distances and padding to the size of the header
-- Add `text_sel_bg` style property
-
-### Bugfixes
-- Theme update to support text selection background
-- Fix imgbtn state change
-- Support RTL in table (draw columns right to left)
-- Support RTL in pretty layout (draw columns right to left)
-- Skip objects in groups if they are in disabled state
-- Fix dropdown selection with RTL basedirection
-- Fix rectangle border drawing with large width
-- Fix `lv_win_clean()`
-
-## v7.6.1 (06.10.2020)
-
-### Bugfixes
-- Fix BIDI support in dropdown list
-- Fix copying base dir in `lv_obj_create`
-- Handle sub pixel rendering in font loader
-- Fix transitions with style caching
-- Fix click focus
-- Fix imgbtn image switching with empty style
-- Material theme: do not set the text font to allow easy global font change
-
-## v7.6.0 (22.09.2020)
-
-### New features
-- Check whether any style property has changed on a state change to decide if any redraw is required
-
-### Bugfixes
-- Fix selection of options with non-ASCII letters in dropdown list
-- Fix font loader to support LV_FONT_FMT_TXT_LARGE
-
-## v7.5.0 (15.09.2020)
-
-### New features
-- Add `clean_dcache_cb` and `lv_disp_clean_dcache` to enable users to use their own cache management function
-- Add `gpu_wait_cb` to wait until the GPU is working. It allows to run CPU a wait only when the rendered data is needed.
-- Add 10px and 8ox built in fonts
-
-### Bugfixes
-- Fix unexpected DEFOCUS on lv_page when clicking to bg after the scrollable
-- Fix `lv_obj_del` and `lv_obj_clean` if the children list changed during deletion.
-- Adjust button matrix button width to include padding when spanning multiple units.
-- Add rounding to btnmatrix line height calculation
-- Add `decmopr_buf` to GC roots
-- Fix division by zero in draw_pattern (lv_draw_rect.c) if the image or letter is not found
-- Fix drawing images with 1 px height or width
-
-## v7.4.0 (01.09.2020)
-
-The main new features of v7.4 are run-time font loading, style caching and arc knob with value setting by click.
-
-### New features
-- Add `lv_font_load()` function - Loads a `lv_font_t` object from a binary font file
-- Add `lv_font_free()` function - Frees the memory allocated by the `lv_font_load()` function
-- Add style caching to reduce access time of properties with default value
-- arc: add set value by click feature
-- arc: add `LV_ARC_PART_KNOB` similarly to slider
-- send gestures event if the object was dragged. User can check dragging with `lv_indev_is_dragging(lv_indev_act())` in the event function.
-
-### Bugfixes
-- Fix color bleeding on border drawing
-- Fix using 'LV_SCROLLBAR_UNHIDE' after 'LV_SCROLLBAR_ON'
-- Fix cropping of last column/row if an image is zoomed
-- Fix zooming and rotating mosaic images
-- Fix deleting tabview with LEFT/RIGHT tab position
-- Fix btnmatrix to not send event when CLICK_TRIG = true and the cursor slid from a pressed button
-- Fix roller width if selected text is larger than the normal
-
-## v7.3.1 (18.08.2020)
-
-### Bugfixes
-- Fix drawing value string twice
-- Rename `lv_chart_clear_serie` to `lv_chart_clear_series` and `lv_obj_align_origo` to `lv_obj_align_mid`
-- Add linemeter's mirror feature again
-- Fix text decor (underline strikethrough) with older versions of font converter
-- Fix setting local style property multiple times
-- Add missing background drawing and radius handling to image button
-- Allow adding extra label to list buttons
-- Fix crash if `lv_table_set_col_cnt` is called before `lv_table_set_row_cnt` for the first time
-- Fix overflow in large image transformations
-- Limit extra button click area of button matrix's buttons. With large paddings it was counter-intuitive. (Gaps are mapped to button when clicked).
-- Fix `lv_btnmatrix_set_one_check` not forcing exactly one button to be checked
-- Fix color picker invalidation in rectangle mode
-- Init disabled days to gray color in calendar
-
-## v7.3.0 (04.08.2020)
-
-### New features
-- Add `lv_task_get_next`
-- Add `lv_event_send_refresh`, `lv_event_send_refresh_recursive` to easily send `LV_EVENT_REFRESH` to object
-- Add `lv_tabview_set_tab_name()` function - used to change a tab's name
-- Add `LV_THEME_MATERIAL_FLAG_NO_TRANSITION` and `LV_THEME_MATERIAL_FLAG_NO_FOCUS` flags
-- Reduce code size by adding: `LV_USE_FONT_COMPRESSED` and `LV_FONT_USE_SUBPX` and applying some optimization
-- Add `LV_MEMCPY_MEMSET_STD` to use standard `memcpy` and `memset`
-
-### Bugfixes
-- Do not print warning for missing glyph if its height OR width is zero.
-- Prevent duplicated sending of `LV_EVENT_INSERT` from text area
-- Tidy outer edges of cpicker widget.
-- Remove duplicated lines from `lv_tabview_add_tab`
-- btnmatrix: handle combined states of buttons (e.g. checked + disabled)
-- textarea: fix typo in lv_textarea_set_scrollbar_mode
-- gauge: fix image needle drawing
-- fix using freed memory in _lv_style_list_remove_style
-
-## v7.2.0 (21.07.2020)
-
-### New features
-- Add screen transitions with `lv_scr_load_anim()`
-- Add display background color, wallpaper and opacity. Shown when the screen is transparent. Can be used with `lv_disp_set_bg_opa/color/image()`.
-- Add `LV_CALENDAR_WEEK_STARTS_MONDAY`
-- Add `lv_chart_set_x_start_point()` function - Set the index of the x-axis start point in the data array
-- Add `lv_chart_set_ext_array()` function - Set an external array of data points to use for the chart
-- Add `lv_chart_set_point_id()` function - Set an individual point value in the chart series directly based on index
-- Add `lv_chart_get_x_start_point()` function - Get the current index of the x-axis start point in the data array
-- Add `lv_chart_get_point_id()` function - Get an individual point value in the chart series directly based on index
-- Add `ext_buf_assigned` bit field to `lv_chart_series_t` structure - it's true if external buffer is assigned to series
-- Add `lv_chart_set_series_axis()` to assign series to primary or secondary axis
-- Add `lv_chart_set_y_range()` to allow setting range of secondary y-axis (based on `lv_chart_set_range` but extended with an axis parameter)
-- Allow setting different font for the selected text in `lv_roller`
-- Add `theme->apply_cb` to replace `theme->apply_xcb` to make it compatible with the MicroPython binding
-- Add `lv_theme_set_base()` to allow easy extension of built-in (or any) themes
-- Add `lv_obj_align_x()` and `lv_obj_align_y()` functions
-- Add `lv_obj_align_origo_x()` and `lv_obj_align_origo_y()` functions
-
-### Bugfixes
-- `tileview` fix navigation when not screen sized
-- Use 14px font by default to for better compatibility with smaller displays
-- `linemeter` fix conversation of current value to "level"
-- Fix drawing on right border
-- Set the cursor image non-clickable by default
-- Improve mono theme when used with keyboard or encoder
-
-## v7.1.0 (07.07.2020)
-
-### New features
-- Add `focus_parent` attribute to `lv_obj`
-- Allow using buttons in encoder input device
-- Add lv_btnmatrix_set/get_align capability
-- DMA2D: Remove dependency on ST CubeMX HAL
-- Added `max_used` propriety to `lv_mem_monitor_t` struct
-- In `lv_init` test if the strings are UTF-8 encoded.
-- Add `user_data` to themes
-- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
-- Add inline function lv_checkbox_get_state(const lv_obj_t * cb) to extend the checkbox functionality.
-- Add inline function lv_checkbox_set_state(const lv_obj_t * cb, lv_btn_state_t state ) to extend the checkbox functionality.
-
-### Bugfixes
-- `lv_img` fix invalidation area when angle or zoom changes
-- Update the style handling to support Big endian MCUs
-- Change some methods to support big endian hardware.
-- remove use of c++ keyword 'new' in parameter of function lv_theme_set_base().
-- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
-- Fix inserting chars in text area in big endian hardware.
-
-## v7.0.2 (16.06.2020)
-
-### Bugfixes
-- `lv_textarea` fix wrong cursor position when clicked after the last character
-- Change all text related indices from 16-bit to 32-bit integers throughout whole library. #1545
-- Fix gestures
-- Do not call `set_px_cb` for transparent pixel
-- Fix list button focus in material theme
-- Fix crash when a text area is cleared with the backspace of a keyboard
-- Add version number to `lv_conf_template.h`
-- Add log in true double buffering mode with `set_px_cb`
-- `lv_dropdown`: fix missing `LV_EVENT_VALUE_CHANGED` event when used with encoder
-- `lv_tileview`: fix if not the {0;0} tile is created first
-- `lv_debug`: restructure to allow asserting in from `lv_misc` too
-- add assert if `_lv_mem_buf_get()` fails
-- `lv_textarea`: fix character delete in password mode
-- Update `LV_OPA_MIN` and `LV_OPA_MAX` to widen the opacity processed range
-- `lv_btnm` fix sending events for hidden buttons
-- `lv_gaguge` make `lv_gauge_set_angle_offset` offset the labels and needles too
-- Fix typo in the API `scrllable` -> `scrollable`
-- `tabview` by default allow auto expanding the page only to right and bottom (#1573)
-- fix crash when drawing gradient to the same color
-- chart: fix memory leak
-- `img`: improve hit test for transformed images
-
-## v7.0.1 (01.06.2020)
-
-### Bugfixes
-- Make Micropython working by adding the required variables as GC_ROOT
-- Prefix some internal API functions with `_` to reduce the API of LVGL
-- Fix built-in SimSun CJK font
-- Fix UTF-8 encoding when `LV_USE_ARABIC_PERSIAN_CHARS` is enabled
-- Fix DMA2D usage when 32 bit images directly blended
-- Fix lv_roller in infinite mode when used with encoder
-- Add `lv_theme_get_color_secondary()`
-- Add `LV_COLOR_MIX_ROUND_OFS` to adjust color mixing to make it compatible with the GPU
-- Improve DMA2D blending
-- Remove memcpy from `lv_ll` (caused issues with some optimization settings)
-- `lv_chart` fix X tick drawing
-- Fix vertical dashed line drawing
-- Some additional minor fixes and formattings
-
-## v7.0.0 (18.05.2020)
-
-### Documentation
-The docs for v7 is available at https://docs.littlevgl.com/v7/en/html/index.html
-
-### Legal changes
-
-The name of the project is changed to LVGL and the new website is on https://lvgl.io
-
-LVGL remains free under the same conditions (MIT license) and a company is created to manage LVGL and offer services.
-
-### New drawing system
-Complete rework of LVGL's draw engine to use "masks" for more advanced and higher quality graphical effects.
-A possible use-case of this system is to remove the overflowing content from the rounded edges.
-It also allows drawing perfectly anti-aliased circles, lines, and arcs.
-Internally, the drawings happen by defining masks (such as rounded rectangle, line, angle).
-When something is drawn the currently active masks can make some pixels transparent.
-For example, rectangle borders are drawn by using 2 rectangle masks: one mask removes the inner part and another the outer part.
-
-The API in this regard remained the same but some new functions were added:
-- `lv_img_set_zoom`: set image object's zoom factor
-- `lv_img_set_angle`: set image object's angle without using canvas
-- `lv_img_set_pivot`: set the pivot point of rotation
-
-The new drawing engine brought new drawing features too. They are highlighted in the "style" section.
-
-### New style system
-The old style system is replaced with a new more flexible and lightweighted one.
-It uses an approach similar to CSS: support cascading styles, inheriting properties and local style properties per object.
-As part of these updates, a lot of objects were reworked and the APIs have been changed.
-
-- more shadows options: *offset* and *spread*
-- gradient stop position to shift the gradient area and horizontal gradient
-- `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE` blending modes
-- *clip corner*: crop the content on the rounded corners
-- *text underline* and *strikethrough*
-- dashed vertical and horizontal lines (*dash gap*, *dash_width*)
-- *outline*: a border-like part drawn out of the background. Can have spacing to the background.
-- *pattern*: display and image in the middle of the background or repeat it
-- *value* display a text which is stored in the style. It can be used e.g. as a light-weighted text on buttons too.
-- *margin*: similar to *padding* but used to keep space outside the object
-
-Read the [Style](https://docs.littlevgl.com/v7/en/html/overview/style.html) section of the documentation to learn how the new styles system works.
-
-### GPU integration
-To better utilize GPUs, from this version GPU usage can be integrated into LVGL. In `lv_conf.h` any supported GPUs can be enabled with a single configuration option.
-
-Right now, only ST's DMA2D (Chrom-ART) is integrated. More will in the upcoming releases.
-
-### Renames
-The following object types are renamed:
-- sw -> switch
-- ta -> textarea
-- cb -> checkbox
-- lmeter -> linemeter
-- mbox -> msgbox
-- ddlist -> dropdown
-- btnm -> btnmatrix
-- kb -> keyboard
-- preload -> spinner
-- lv_objx folder -> lv_widgets
-- LV_FIT_FILL -> LV_FIT_PARENT
-- LV_FIT_FLOOD -> LV_FLOOD_MAX
-- LV_LAYOUT_COL_L/M/R -> LV_LAYOUT_COLUMN_LEFT/MID/RIGHT
-- LV_LAYOUT_ROW_T/M/B -> LV_LAYOUT_ROW_TOP/MID/BOTTOM
-
-### Reworked and improved object
-- `dropdown`: Completely reworked. Now creates a separate list when opened and can be dropped to down/up/left/right.
-- `label`: `body_draw` is removed, instead, if its style has a visible background/border/shadow etc it will be drawn. Padding really makes the object larger (not just virtually as before)
-- `arc`: can draw background too.
-- `btn`: doesn't store styles for each state because it's done naturally in the new style system.
-- `calendar`: highlight the pressed datum. The used styles are changed: use `LV_CALENDAR_PART_DATE` normal for normal dates, checked for highlighted, focused for today, pressed for the being pressed. (checked+pressed, focused+pressed also work)
-- `chart`: only has `LINE` and `COLUMN` types because with new styles all the others can be described. LV_CHART_PART_SERIES sets the style of the series. bg_opa > 0 draws an area in LINE mode. `LV_CHART_PART_SERIES_BG` also added to set a different style for the series area. Padding in `LV_CHART_PART_BG` makes the series area smaller, and it ensures space for axis labels/numbers.
-- `linemeter`, `gauge`: can have background if the related style properties are set. Padding makes the scale/lines smaller. scale_border_width and scale_end_border_width allow to draw an arc on the outer part of the scale lines.
-- `gauge`: `lv_gauge_set_needle_img` allows use image as needle
-- `canvas`: allow drawing to true color alpha and alpha only canvas, add `lv_canvas_blur_hor/ver` and rename `lv_canvas_rotate` to `lv_canvas_transform`
-- `textarea`: If available in the font use bullet (`U+2022`) character in text area password
-
-### New object types
-- `lv_objmask`: masks can be added to it. The children will be masked accordingly.
-
-### Others
-- Change the built-in fonts to [Montserrat](https://fonts.google.com/specimen/Montserrat) and add built-in fonts from 12 px to 48 px for every 2nd size.
-- Add example CJK and Arabic/Persian/Hebrew built-in font
-- Add ° and "bullet" to the built-in fonts
-- Add Arabic/Persian script support: change the character according to its position in the text.
-- Add `playback_time` to animations.
-- Add `repeat_count` to animations instead of the current "repeat forever".
-- Replace `LV_LAYOUT_PRETTY` with `LV_LAYOUT_PRETTY_TOP/MID/BOTTOM`
-
-### Demos
-- [lv_examples](https://github.com/littlevgl/lv_examples) was reworked and new examples and demos were added
-
-### New release policy
-- Maintain this Changelog for every release
-- Save old major version in new branches. E.g. `release/v6`
-- Merge new features and fixes directly into `master` and release a patch or minor releases every 2 weeks.
-
-### Migrating from v6 to v7
-- First and foremost, create a new `lv_conf.h` based on `lv_conf_template.h`.
-- To try the new version it suggested using a simulator project and see the examples.
-- If you have a running project, the most difficult part of the migration is updating to the new style system. Unfortunately, there is no better way than manually updating to the new format.
-- The other parts are mainly minor renames and refactoring as described above.
diff --git a/lib/lvgl/docs/CODE_OF_CONDUCT.md b/lib/lvgl/docs/CODE_OF_CONDUCT.md
deleted file mode 100644
index 4052ad6..0000000
--- a/lib/lvgl/docs/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team using the [contact form](https://lvgl.io/about). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/lib/lvgl/docs/CODING_STYLE.md b/lib/lvgl/docs/CODING_STYLE.md
deleted file mode 100644
index d45f0fc..0000000
--- a/lib/lvgl/docs/CODING_STYLE.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Coding style
-
-## File format
-Use [misc/lv_templ.c](https://github.com/lvgl/lvgl/blob/master/src/misc/lv_templ.c) and [misc/lv_templ.h](https://github.com/lvgl/lvgl/blob/master/src/misc/lv_templ.h)
-
-## Naming conventions
-* Words are separated by '_'
-* In variable and function names use only lower case letters (e.g. *height_tmp*)
-* In enums and defines use only upper case letters (e.g. *e.g. MAX_LINE_NUM*)
-* Global names (API):
- * start with *lv*
- * followed by module name: *btn*, *label*, *style* etc.
- * followed by the action (for functions): *set*, *get*, *refr* etc.
- * closed with the subject: *name*, *size*, *state* etc.
-* Typedefs
- * prefer `typedef struct` and `typedef enum` instead of `struct name` and `enum name`
- * always end `typedef struct` and `typedef enum` type names with `_t`
-* Abbreviations:
- * Only words longer or equal than 6 characters can be abbreviated.
- * Abbreviate only if it makes the word at least half as long
- * Use only very straightforward and well-known abbreviations (e.g. pos: position, def: default, btn: button)
-
-## Coding guide
-* Functions:
- * Try to write function shorter than is 50 lines
- * Always shorter than 200 lines (except very straightforwards)
-* Variables:
- * One line, one declaration (BAD: char x, y;)
- * Use `` (*uint8_t*, *int32_t* etc)
- * Declare variables where needed (not all at function start)
- * Use the smallest required scope
- * Variables in a file (outside functions) are always *static*
- * Do not use global variables (use functions to set/get static variables)
-
-## Comments
-Before every function have a comment like this:
-
-```c
-/**
- * Return with the screen of an object
- * @param obj pointer to an object
- * @return pointer to a screen
- */
-lv_obj_t * lv_obj_get_scr(lv_obj_t * obj);
-```
-
-Always use `/*Something*/` format and NOT `//Something`
-
-Write readable code to avoid descriptive comments like:
-`x++; /*Add 1 to x*/`.
-The code should show clearly what you are doing.
-
-You should write **why** have you done this:
-`x++; /*Because of closing '\0' of the string*/`
-
-Short "code summaries" of a few lines are accepted. E.g. `/*Calculate the new coordinates*/`
-
-In comments use \` \` when referring to a variable. E.g. ``/*Update the value of `x_act`*/``
-
-### Formatting
-Here is example to show bracket placing and using of white spaces:
-```c
-/**
- * Set a new text for a label. Memory will be allocated to store the text by the label.
- * @param label pointer to a label object
- * @param text '\0' terminated character string. NULL to refresh with the current text.
- */
-void lv_label_set_text(lv_obj_t * label, const char * text)
-{ /*Main brackets of functions in new line*/
-
- if(label == NULL) return; /*No bracket only if the command is inline with the if statement*/
-
- lv_obj_inv(label);
-
- lv_label_ext_t * ext = lv_obj_get_ext(label);
-
- /*Comment before a section*/
- if(text == ext->txt || text == NULL) { /*Bracket of statements start inline*/
- lv_label_refr_text(label);
- return;
- }
-
- ...
-}
-```
-
-Use 4 spaces indentation instead of tab.
-
-You can use **astyle** to format the code. Run `code-formatter.sh` from the `scrips` folder.
-
-#### pre-commit
-
-[pre-commit](https://pre-commit.com/) is a multi-language package manager for pre-commit hooks.
-See the [instalation guide](https://pre-commit.com/#installation) to get pre-commit python package
-installed into your development machine.
-
-Once you have `pre-commit` installed you will need to [set up the git hook scripts](https://pre-commit.com/#3-install-the-git-hook-scripts) with:
-```console
-pre-commit install
-```
-
-now `pre-commit` will run automatically on `git commit`!
-
-##### Hooks
-
-The `format-source` local hook (see `.pre-commit-config.yaml`) runs **astyle** on all the staged source and header
-files (that are not excluded, see `exclude` key of the hook configuration) before entering the commit message,
-if any file gets formatted by **astyle** you will need to add the change to the staging area and run `git commit` again.
-
-The `trailing-whitespace` hook fixes trailing whitespaces on all of the files.
-
-##### Skipping hooks
-
-If you want to skip any particular hook you can do so with:
-```console
-SKIP=name-of-the-hook git commit
-```
-
-##### Testing hooks
-
-It's no necessary to do a commit to test the hooks, you can test hooks by adding the files into the staging area and run:
-```console
-pre-commit run name-of-the-hook
-```
\ No newline at end of file
diff --git a/lib/lvgl/docs/CONTRIBUTING.md b/lib/lvgl/docs/CONTRIBUTING.md
deleted file mode 100644
index f3ffee9..0000000
--- a/lib/lvgl/docs/CONTRIBUTING.md
+++ /dev/null
@@ -1,300 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/CONTRIBUTING.md
-```
-
-# Contributing
-
-## Introduction
-
-Join LVGL's community and leave your footprint in the library!
-
-There are a lot of ways to contribute to LVGL even if you are new to the library or even new to programming.
-
-It might be scary to make the first step but you have nothing to be afraid of.
-A friendly and helpful community is waiting for you. Get to know like-minded people and make something great together.
-
-So let's find which contribution option fits you the best and help you join the development of LVGL!
-
-Before getting started here are some guidelines to make contribution smoother:
-- Be kind and friendly.
-- Be sure to read the relevant part of the documentation before posting a question.
-- Ask questions in the [Forum](https://forum.lvgl.io/) and use [GitHub](https://github.com/lvgl/) for development-related discussions.
-- Always fill out the post or issue templates in the Forum or GitHub (or at least provide equivalent information). It makes understanding your contribution or issue easier and you will get a useful response faster.
-- If possible send an absolute minimal but buildable code example in order to reproduce the issue. Be sure it contains all the required variable declarations, constants, and assets (images, fonts).
-- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your posts. You can learn it in 10 minutes.
-- Speak about one thing in one issue or topic. It makes your post easier to find later for someone with the same question.
-- Give feedback and close the issue or mark the topic as solved if your question is answered.
-- For non-trivial fixes and features, it's better to open an issue first to discuss the details instead of sending a pull request directly.
-- Please read and follow the Coding style guide.
-
-## Pull request
-
-Merging new code into the lvgl, documentation, blog, examples, and other repositories happen via *Pull requests* (PR for short).
-A PR is a notification like "Hey, I made some updates to your project. Here are the changes, you can add them if you want."
-To do this you need a copy (called fork) of the original project under your account, make some changes there, and notify the original repository about your updates.
-You can see what it looks like on GitHub for LVGL here: [https://github.com/lvgl/lvgl/pulls](https://github.com/lvgl/lvgl/pulls).
-
-To add your changes you can edit files online on GitHub and send a new Pull request from there (recommended for small changes) or
- add the updates in your favorite editor/IDE and use git to publish the changes (recommended for more complex updates).
-
-### From GitHub
-1. Navigate to the file you want to edit.
-2. Click the Edit button in the top right-hand corner.
-3. Add your changes to the file.
-4. Add a commit message on the bottom of the page.
-5. Click the *Propose changes* button.
-
-### From command line
-
-The instructions describe the main `lvgl` repository but it works the same way for the other repositories.
-1. Fork the [lvgl repository](https://github.com/lvgl/lvgl). To do this click the "Fork" button in the top right corner.
-It will "copy" the `lvgl` repository to your GitHub account (`https://github.com/?tab=repositories`)
-2. Clone your forked repository.
-3. Add your changes. You can create a *feature branch* from *master* for the updates: `git checkout -b the-new-feature`
-4. Commit and push your changes to the forked `lvgl` repository.
-5. Create a PR on GitHub from the page of your `lvgl` repository (`https://github.com//lvgl`) by clicking the *"New pull request"* button. Don't forget to select the branch where you added your changes.
-7. Set the base branch. It means where you want to merge your update. In the `lvgl` repo both the fixes and new features go to `master` branch.
-8. Describe what is in the update. An example code is welcome if applicable.
-9. If you need to make more changes, just update your forked `lvgl` repo with new commits. They will automatically appear in the PR.
-
-### Commit message format
-The commit messages format is inspired by [Angular Commit Format](https://gist.github.com/brianclements/841ea7bffdb01346392c).
-
-The following structure should be used:
-```
-():
-
-
-
-
-```
-
-Possible ``s:
-- `fix` bugfix in the source code.
-- `feat` new feature
-- `arch` architectural changes
-- `perf` changes that affect the performance
-- `example` anything related to examples (even fixes and new examples)
-- `docs` anything related to the documentation (even fixes, formatting, and new pages)
-- `test` anything related to tests (new and updated tests or CI actions)
-- `chore` any minor formatting or style changes that would make the changelog noisy
-
-`` is the module, file, or sub-system that is affected by the commit. It's usually one word and can be chosen freely.
-For example `img`, `layout`, `txt`, `anim`. The scope can be omitted.
-
-`` contains a short description of the change:
-- use the imperative, present tense: "change" not "changed" nor "changes"
-- don't capitalize the first letter
-- no dot (.) at the end
-- max 90 characters
-
-`` optional and can be used to describe the details of this change.
-
-`` shall contain
-- the words "BREAKING CHANGE" if the changes break the API
-- reference to the GitHub issue or Pull Request if applicable.
-
-Some examples:
-```
-fix(img): update size if a new source is set
-```
-
-```
-fix(bar): fix memory leak
-
-The animations weren't deleted in the destructor.
-
-Fixes: #1234
-```
-
-```
-feat: add span widget
-
-The span widget allows mixing different font sizes, colors and styles.
-It's similar to HTML
-```
-
-```
-docs(porting): fix typo
-```
-
-## Developer Certification of Origin (DCO)
-
-### Overview
-
-To ensure all licensing criteria are met for every repository of the LVGL project, we apply a process called DCO (Developer's Certificate of Origin).
-
-The text of DCO can be read here: [https://developercertificate.org/](https://developercertificate.org/).
-
-By contributing to any repositories of the LVGL project you agree that your contribution complies with the DCO.
-
-If your contribution fulfills the requirements of the DCO no further action is needed. If you are unsure feel free to ask us in a comment.
-
-### Accepted licenses and copyright notices
-
-To make the DCO easier to digest, here are some practical guides about specific cases:
-
-#### Your own work
-
-The simplest case is when the contribution is solely your own work.
-In this case you can just send a Pull Request without worrying about any licensing issues.
-
-#### Use code from online source
-
-If the code you would like to add is based on an article, post or comment on a website (e.g. StackOverflow) the license and/or rules of that site should be followed.
-
-For example in case of StackOverflow a notice like this can be used:
-```
-/* The original version of this code-snippet was published on StackOverflow.
- * Post: http://stackoverflow.com/questions/12345
- * Author: http://stackoverflow.com/users/12345/username
- * The following parts of the snippet were changed:
- * - Check this or that
- * - Optimize performance here and there
- */
- ... code snippet here ...
-```
-
-#### Use MIT licensed code
-As LVGL is MIT licensed, other MIT licensed code can be integrated without issues.
-The MIT license requires a copyright notice be added to the derived work. Any derivative work based on MIT licensed code must copy the original work's license file or text.
-
-#### Use GPL licensed code
-The GPL license is not compatible with the MIT license. Therefore, LVGL can not accept GPL licensed code.
-
-## Ways to contribute
-
-Even if you're just getting started with LVGL there are plenty of ways to get your feet wet.
-Most of these options don't even require knowing a single line of LVGL code.
-
-Below we have collected some opportunities about the ways you can contribute to LVGL.
-
-### Give LVGL a Star
-
-Show that you like LVGL by giving it star on GitHub!
-
-
-
-Star
-
-This simple click makes LVGL more visible on GitHub and makes it more attractive to other people.
-So with this, you already helped a lot!
-
-### Tell what you have achieved
-
-Have you already started using LVGL in a [Simulator](/get-started/platforms/pc-simulator), a development board, or on your custom hardware?
-Was it easy or were there some obstacles? Are you happy with the result?
-Showing your project to others is a win-win situation because it increases your and LVGL's reputation at the same time.
-
-You can post about your project on Twitter, Facebook, LinkedIn, create a YouTube video, and so on.
-Only one thing: On social media don't forget to add a link to `https://lvgl.io` or `https://github.com/lvgl` and use the hashtag `#lvgl`. Thank you! :)
-
-You can also open a new topic in the [My projects](https://forum.lvgl.io/c/my-projects/10) category of the Forum.
-
-The [LVGL Blog](https://blog.lvgl.io) welcomes posts from anyone.
-It's a good place to talk about a project you created with LVGL, write a tutorial, or share some nice tricks.
-The latest blog posts are shown on the [homepage of LVGL](https://lvgl.io) to make your work more visible.
-
-The blog is hosted on GitHub. If you add a post GitHub automatically turns it into a website.
-See the [README](https://github.com/lvgl/blog) of the blog repo to see how to add your post.
-
-Any of these help to spread the word and familiarize new developers with LVGL.
-
-If you don't want to speak about your project publicly, feel free to use [Contact form](https://lvgl.io/#contact) on lvgl.io to private message to us.
-
-### Write examples
-As you learn LVGL you will probably play with the features of widgets. Why not publish your experiments?
-
-Each widgets' documentation contains examples. For instance, here are the examples of the [Drop-down list](/widgets/core/dropdown#examples) widget.
-The examples are directly loaded from the [lvgl/examples](https://github.com/lvgl/lvgl/tree/master/examples) folder.
-
-So all you need to do is send a [Pull request](#pull-request) to the [lvgl](https://github.com/lvgl/lvgl) repository and follow some conventions:
-- Name the examples like `lv_example__`.
-- Make the example as short and simple as possible.
-- Add comments to explain what the example does.
-- Use 320x240 resolution.
-- Update `index.rst` in the example's folder with your new example. To see how other examples are added, look in the [lvgl/examples/widgets](https://github.com/lvgl/lvgl/tree/master/examples/widgets) folder.
-
-### Improve the docs
-
-As you read the documentation you might see some typos or unclear sentences. All the documentation is located in the [lvgl/docs](https://github.com/lvgl/lvgl/tree/master/docs) folder.
-For typos and straightforward fixes, you can simply edit the file on GitHub.
-
-Note that the documentation is also formatted in [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
-
-### Report bugs
-As you use LVGL you might find bugs. Before reporting them be sure to check the relevant parts of the documentation.
-
-If it really seems like a bug feel free to open an [issue on GitHub](https://github.com/lvgl/lvgl/issues).
-
-When filing the issue be sure to fill out the template. It helps find the root of the problem while avoiding extensive questions and exchanges with other developers.
-
-### Send fixes
-The beauty of open-source software is you can easily dig in to it to understand how it works. You can also fix or adjust it as you wish.
-
-If you found and fixed a bug don't hesitate to send a [Pull request](#pull-request) with the fix.
-
-In your Pull request please also add a line to [`CHANGELOG.md`](https://github.com/lvgl/lvgl/blob/master/CHANGELOG.md).
-
-### Join the conversations in the Forum
-It feels great to know you are not alone if something is not working. It's even better to help others when they struggle with something.
-
-While you were learning LVGL you might have had questions and used the Forum to get answers. As a result, you probably have more knowledge about how LVGL works.
-
-One of the best ways to give back is to use the Forum and answer the questions of newcomers - like you were once.
-
-Just read the titles and if you are familiar with the topic don't hesitate to share your thoughts and suggestions.
-
-Participating in the discussions is one of the best ways to become part of the project and get to know like-minded people!
-
-### Add features
-If you have created a cool widget, or added useful feature to LVGL feel free to open a new PR for it.
-We collect the optional features (a.k.a. plugins) in [lvgl/src/extra](https://github.com/lvgl/lvgl/tree/master/src/extra) folder so if you are interested in adding a new features please use this folder.
-The [README](https://github.com/lvgl/lvgl/blob/master/src/extra/README.md) file describes the basics rules of contribution and also lists some ideas.
-
-For further ideas take a look at the [Roadmap](/ROADMAP) page. If you are interested in any of them feel free to share your opinion and/or participate in the implementation.
-
-Other features which are (still) not on the road map are listed in the [Feature request](https://forum.lvgl.io/c/feature-request/9) category of the Forum.
-
-When adding a new features the followings also needs to be updated:
-- Update [lv_conf_template.h](https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h)
-- Add description in the [docs](https://github.com/lvgl/lvgl/tree/master/docs)
-- Add [examples](https://github.com/lvgl/lvgl/tree/master/examples)
-- Update the [changelog](https://github.com/lvgl/lvgl/tree/master/docs/CHANGELOG.md)
-
-### Become a maintainer
-
-If you want to become part of the core development team, you can become a maintainer of a repository.
-
-By becoming a maintainer:
-- You get write access to that repo:
- - Add code directly without sending a pull request
- - Accept pull requests
- - Close/reopen/edit issues
-- Your input has higher impact when we are making decisions
-
-You can become a maintainer by invitation, however the following conditions need to met
-1. Have > 50 replies in the Forum. You can look at your stats [here](https://forum.lvgl.io/u?period=all)
-2. Send > 5 non-trivial pull requests to the repo where you would like to be a maintainer
-
-
-If you are interested, just send a message (e.g. from the Forum) to the current maintainers of the repository. They will check if the prerequisites are met.
-Note that meeting the prerequisites is not a guarantee of acceptance, i.e. if the conditions are met you won't automatically become a maintainer.
-It's up to the current maintainers to make the decision.
-
-### Move your project repository under LVGL organization
-Besides the core `lvgl` repository there are other repos for ports to development boards, IDEs or other environment.
-If you ported LVGL to a new platform we can host it under the LVGL organization among the other repos.
-
-This way your project will become part of the whole LVGL project and can get more visibility.
-If you are interested in this opportunity just open an [issue in lvgl repo](https://github.com/lvgl/lvgl/issues) and tell what you have!
-
-If we agree that your port fit well into the LVGL organization, we will open a repository for your project where you will have admin rights.
-
-To make this concept sustainable there a few rules to follow:
-- You need to add a README to your repo.
-- We expect to maintain the repo to some extent:
- - Follow at least the major versions of LVGL
- - Respond to the issues (in a reasonable time)
-- If there is no activity in a repo for 1 year it will be archived
diff --git a/lib/lvgl/docs/ROADMAP.md b/lib/lvgl/docs/ROADMAP.md
deleted file mode 100644
index 0d1a35e..0000000
--- a/lib/lvgl/docs/ROADMAP.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Roadmap
-
-This is a summary for planned new features and a collection of ideas.
-This list indicates only the current intention and it can be changed.
-
-## v8.2
-See [#2790](https://github.com/lvgl/lvgl/issues/2790)
-
-## Ideas
-- Reconsider color format management for run time color format setting, and custom color format usage. (Also [RGB888](https://github.com/lvgl/lvgl/issues/1722))
-- Make gradients more versatile
-- Image transformations matrix
-- Switch to RGBA colors in styles
-- Consider direct binary font format support
-- Simplify `group`s. Discussion is [here](https://forum.lvgl.io/t/lv-group-tabindex/2927/3).
-- lv_mem_alloc_aligned(size, align)
-- Text node. See [#1701](https://github.com/lvgl/lvgl/issues/1701#issuecomment-699479408)
-- CPP binding. See [Forum](https://forum.lvgl.io/t/is-it-possible-to-officially-support-optional-cpp-api/2736)
-- Optimize font decompression
-- Need static analyze (via coverity.io or something else)
-- Support dot_begin and dot_middle long modes for labels
-- Add new label alignment modes. [#1656](https://github.com/lvgl/lvgl/issues/1656)
-- Support larger images: [#1892](https://github.com/lvgl/lvgl/issues/1892)
-- Curved text on path
-- Variable binding improvements like Redux?
-- Functional programming support, pure view? See [here](https://www.freecodecamp.org/news/the-revolution-of-pure-views-aed339db7da4/)
-- Circle layout. See [#2871](https://github.com/lvgl/lvgl/issues/2871)
diff --git a/lib/lvgl/docs/_ext/lv_example.py b/lib/lvgl/docs/_ext/lv_example.py
deleted file mode 100644
index d4db6a0..0000000
--- a/lib/lvgl/docs/_ext/lv_example.py
+++ /dev/null
@@ -1,98 +0,0 @@
-import os
-
-from docutils import nodes
-from docutils.parsers.rst import Directive, directives
-from docutils.parsers.rst.directives.images import Image
-from sphinx.directives.code import LiteralInclude
-
-
-def excluded_list(argument):
- return argument.split(',')
-
-
-
-
-class LvExample(Directive):
- required_arguments = 1
- option_spec = {
- 'excluded_languages': excluded_list,
- 'language': directives.unchanged,
- 'description': directives.unchanged
- }
- def get_example_code_path(self, example_path, language):
- return os.path.abspath("../examples/" + example_path + "." + language)
- def human_language_name(self, language):
- if language == 'py':
- return 'MicroPython'
- elif language == 'c':
- return 'C'
- else:
- return language
- def github_path(self, example_path, language):
- env = self.state.document.settings.env
- return f"https://github.com/lvgl/lvgl/blob/{env.config.repo_commit_hash}/examples/{example_path}.{language}"
- def embed_code(self, example_file, example_path, language, buttons={}):
- toggle = nodes.container('', literal_block=False, classes=['toggle'])
- header = nodes.container('', literal_block=False, classes=['header'])
- toggle.append(header)
- try:
- with open(example_file) as f:
- contents = f.read()
- except FileNotFoundError:
- contents = 'Error encountered while trying to open ' + example_file
- literal_list = nodes.literal_block(contents, contents)
- literal_list['language'] = language
- toggle.append(literal_list)
- paragraph_node = nodes.raw(text=f"{self.human_language_name(language)} code
", format='html')
- for text, url in buttons.items():
- paragraph_node.append(nodes.raw(text=f"{text} ", format='html'))
- header.append(paragraph_node)
- return toggle
- def run(self):
- example_path = self.arguments[0]
- example_name = os.path.split(example_path)[1]
- excluded_languages = self.options.get('excluded_languages', [])
- node_list = []
-
- env = self.state.document.settings.env
-
- iframe_html = ""
-
- c_path = self.get_example_code_path(example_path, 'c')
- py_path = self.get_example_code_path(example_path, 'py')
-
- c_code = self.embed_code(c_path, example_path, 'c', buttons={
- ' GitHub': self.github_path(example_path, 'c')
- })
- py_code = self.embed_code(py_path, example_path, 'py', buttons={
- ' GitHub': self.github_path(example_path, 'py'),
- ' Simulator': f"https://sim.lvgl.io/v{env.config.version}/micropython/ports/javascript/index.html?script_startup=https://raw.githubusercontent.com/lvgl/lvgl/{env.config.repo_commit_hash}/examples/header.py&script=https://raw.githubusercontent.com/lvgl/lvgl/{env.config.repo_commit_hash}/examples/{example_path}.py"
- })
-
- if not 'c' in excluded_languages:
- if env.app.tags.has('html'):
- iframe_html = f"
"
-
- description_html = f"{self.options.get('description', '')}
"
- layout_node = nodes.raw(text=f"{iframe_html}{description_html}
", format='html')
-
- node_list.append(layout_node)
- if not 'c' in excluded_languages:
- node_list.append(c_code)
- if not 'py' in excluded_languages:
- node_list.append(py_code)
-
- trailing_node = nodes.raw(text=f" ", format='html')
- node_list.append(trailing_node)
-
- return node_list
-
-def setup(app):
- app.add_directive("lv_example", LvExample)
- app.add_config_value("repo_commit_hash", "", "env")
-
- return {
- 'version': '0.1',
- 'parallel_read_safe': True,
- 'parallel_write_safe': True,
- }
diff --git a/lib/lvgl/docs/_static/css/custom.css b/lib/lvgl/docs/_static/css/custom.css
deleted file mode 100644
index e4832f2..0000000
--- a/lib/lvgl/docs/_static/css/custom.css
+++ /dev/null
@@ -1,113 +0,0 @@
-table, th, td {
- border: 1px solid #bbb;
- padding: 10px;
-}
-
-td {
- text-align:center;
-}
-span.pre
-{
- padding-right:8px;
-}
-
-span.pre:first-child
-{
- padding-right:0px;
-}
-
-
-code.sig-name
-{
- /*margin-left:8px;*/
-}
-
-.toggle .header {
- display: block;
- clear: both;
- cursor: pointer;
- font-weight: bold;
-}
-
-.toggle .header:before {
- font-family: FontAwesome, "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
- content: "\f0da \00a0 Show ";
- display: inline-block;
- font-size: 1.1em;
-}
-
-.toggle .header.open:before {
- content: "\f0d7 \00a0 Hide ";
-}
-
-.header p {
- display: inline-block;
- font-size: 1.1em;
- margin-bottom: 8px;
-}
-
-.wy-side-nav-search {
- background-color: #f5f5f5;
-}
-.wy-side-nav-search>div.version {
- color: #333;
- display: none; /*replaced by dropdown*/
-}
-
-
-.home-img {
- width:32%;
- transition: transform .3s ease-out;
-}
-
-.home-img:hover {
- transform: translate(0, -10px);
-}
-
-/*Let `code` wrap*/
-.rst-content code, .rst-content tt, code {
- white-space: normal;
-}
-
-.lv-example, .lv-example > iframe {
- border: none;
- outline: none;
- padding: none;
- display: block;
- width: 320px;
- height: 240px;
- flex: none;
- position: relative;
-}
-
-.lv-example > iframe {
- position: absolute;
- top: 0;
- left: 0;
-}
-
-.lv-example-container {
- display: flex;
- padding-bottom: 16px;
-}
-.lv-example-description {
- flex: 1 1 auto;
- margin-left: 1rem;
-}
-
-.lv-example-link-button {
- display: inline-block;
- padding: 4px 8px;
- border-radius: 4px;
- background-color: #2980b9;
- color: white;
- margin: 0 4px;
-}
-.lv-example-link-button:hover {
- color: white;
- filter: brightness(120%);
-}
-
-.lv-example-link-button:visited {
- color: white;
-}
diff --git a/lib/lvgl/docs/_static/css/fontawesome.min.css b/lib/lvgl/docs/_static/css/fontawesome.min.css
deleted file mode 100644
index deb5b4a..0000000
--- a/lib/lvgl/docs/_static/css/fontawesome.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Font Awesome Free 5.9.0 by @fontawesome - https://fontawesome.com
- * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
- */
-.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}
\ No newline at end of file
diff --git a/lib/lvgl/docs/_static/img/home_1.png b/lib/lvgl/docs/_static/img/home_1.png
deleted file mode 100644
index 608acfe..0000000
Binary files a/lib/lvgl/docs/_static/img/home_1.png and /dev/null differ
diff --git a/lib/lvgl/docs/_static/img/home_2.png b/lib/lvgl/docs/_static/img/home_2.png
deleted file mode 100644
index d61ee51..0000000
Binary files a/lib/lvgl/docs/_static/img/home_2.png and /dev/null differ
diff --git a/lib/lvgl/docs/_static/img/home_3.png b/lib/lvgl/docs/_static/img/home_3.png
deleted file mode 100644
index da0c2b8..0000000
Binary files a/lib/lvgl/docs/_static/img/home_3.png and /dev/null differ
diff --git a/lib/lvgl/docs/_static/img/home_4.png b/lib/lvgl/docs/_static/img/home_4.png
deleted file mode 100644
index b059da7..0000000
Binary files a/lib/lvgl/docs/_static/img/home_4.png and /dev/null differ
diff --git a/lib/lvgl/docs/_static/img/home_5.png b/lib/lvgl/docs/_static/img/home_5.png
deleted file mode 100644
index 1d002ea..0000000
Binary files a/lib/lvgl/docs/_static/img/home_5.png and /dev/null differ
diff --git a/lib/lvgl/docs/_static/img/home_6.png b/lib/lvgl/docs/_static/img/home_6.png
deleted file mode 100644
index c95b466..0000000
Binary files a/lib/lvgl/docs/_static/img/home_6.png and /dev/null differ
diff --git a/lib/lvgl/docs/_static/img/home_banner.jpg b/lib/lvgl/docs/_static/img/home_banner.jpg
deleted file mode 100644
index 099cd90..0000000
Binary files a/lib/lvgl/docs/_static/img/home_banner.jpg and /dev/null differ
diff --git a/lib/lvgl/docs/_templates/layout.html b/lib/lvgl/docs/_templates/layout.html
deleted file mode 100644
index d3c25f0..0000000
--- a/lib/lvgl/docs/_templates/layout.html
+++ /dev/null
@@ -1,31 +0,0 @@
-{% extends "!layout.html" %}
-
-{%- block extrahead %}
-{{ super() }}
-
-
-
-{% endblock %}
-
-{% block footer %}
-{{ super() }}
-
-{% endblock %}
diff --git a/lib/lvgl/docs/_templates/page.html b/lib/lvgl/docs/_templates/page.html
deleted file mode 100644
index 90320b1..0000000
--- a/lib/lvgl/docs/_templates/page.html
+++ /dev/null
@@ -1,82 +0,0 @@
-{% extends "!page.html" %}
-
-{% block footer %}
-
-
-
-
-
-{% endblock %}
diff --git a/lib/lvgl/docs/build.py b/lib/lvgl/docs/build.py
deleted file mode 100644
index 2bf9aba..0000000
--- a/lib/lvgl/docs/build.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-import os
-import subprocess
-import re
-import example_list as ex
-
-langs = ['en']
-
-# Change to script directory for consistency
-abspath = os.path.abspath(__file__)
-dname = os.path.dirname(abspath)
-os.chdir(dname)
-
-def cmd(s):
- print("")
- print(s)
- print("-------------------------------------")
- r = os.system(s)
- if r != 0:
- print("Exit build due to previous error")
- exit(-1)
-
-# Get the current branch name
-status, br = subprocess.getstatusoutput("git branch | grep '*'")
-_, gitcommit = subprocess.getstatusoutput("git rev-parse HEAD")
-br = re.sub('\* ', '', br)
-
-# Generate the list of examples
-ex.exec()
-
-urlpath = re.sub('release/', '', br)
-
-# Be sure the GitHub links point to the right branch
-f = open("header.rst", "w")
-f.write(".. |github_link_base| replace:: https://github.com/lvgl/lvgl/blob/" + gitcommit + "/docs")
-f.close()
-
-base_html = "html_baseurl = 'https://docs.lvgl.io/" + urlpath + "/en/html/'"
-
-os.system("sed -i \"s|html_baseurl = .*|" + base_html +"|\" conf.py")
-
-clean = 0
-trans = 0
-skip_latex = False
-args = sys.argv[1:]
-if len(args) >= 1:
- if "clean" in args: clean = 1
- if "skip_latex" in args: skip_latex = True
-
-lang = "en"
-print("")
-print("****************")
-print("Building")
-print("****************")
-if clean:
- cmd("rm -rf " + lang)
- cmd("mkdir " + lang)
-
-
-print("Running doxygen")
-cmd("cd ../scripts && doxygen Doxyfile")
-# BUILD PDF
-
-if not skip_latex:
- # Silly workaround to include the more or less correct PDF download link in the PDF
- #cmd("cp -f " + lang +"/latex/LVGL.pdf LVGL.pdf | true")
- cmd("sphinx-build -b latex . out_latex")
-
- # Generate PDF
- cmd("cd out_latex && latexmk -pdf 'LVGL.tex'")
- # Copy the result PDF to the main directory to make it available for the HTML build
- cmd("cd out_latex && cp -f LVGL.pdf ../LVGL.pdf")
-else:
- print("skipping latex build as requested")
-
-# BUILD HTML
-cmd("sphinx-build -b html . ../out_html")
-
diff --git a/lib/lvgl/docs/conf.py b/lib/lvgl/docs/conf.py
deleted file mode 100644
index a9e919c..0000000
--- a/lib/lvgl/docs/conf.py
+++ /dev/null
@@ -1,239 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-#
-# LVGL documentation build configuration file, created by
-# sphinx-quickstart on Wed Jun 12 16:38:40 2019.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
-import os
-import sys
-import subprocess
-sys.path.insert(0, os.path.abspath('./_ext'))
-
-import recommonmark
-from recommonmark.transform import AutoStructify
-from sphinx.builders.html import StandaloneHTMLBuilder
-from subprocess import Popen, PIPE
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#
-# needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = ['sphinx.ext.autodoc',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.todo',
- 'recommonmark',
- 'sphinx_markdown_tables',
- 'breathe',
- 'sphinx_sitemap',
- 'lv_example'
- ]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The default language to highlight source code in. The default is 'python'.
-# The value should be a valid Pygments lexer name, see Showing code examples for more details.
-
-
-highlight_language = 'c'
-
-# The suffix(es) of source filenames.
-# You can specify multiple suffix as a list of string:
-#
-source_suffix = ['.rst', '.md']
-
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = 'LVGL'
-copyright = '2021, LVGL Kft'
-author = 'LVGL community'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-# embeddedt: extract using scripts/find_version.sh
-
-version = subprocess.run(["../scripts/find_version.sh"], capture_output=True).stdout.decode("utf-8").strip()
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = None
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This patterns also effect to html_static_path and html_extra_path
-exclude_patterns = ['_build', 'doxygen_html', 'Thumbs.db', '.DS_Store',
- 'README.md', 'lv_examples', 'out_html' ]
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# If true, `todo` and `todoList` produce output, else they produce nothing.
-todo_include_todos = True
-
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-#
-html_theme = 'sphinx_rtd_theme'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#
-html_theme_options = {
- 'collapse_navigation' : False,
- 'logo_only': True,
-}
-# For site map generation
-html_baseurl = 'https://docs.lvgl.io/master/en/html/'
-sitemap_url_scheme = "{link}"
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Custom sidebar templates, must be a dictionary that maps document names
-# to template names.
-#
-# This is required for the alabaster theme
-# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
-html_sidebars = {
- '**': [
- 'relations.html', # needs 'show_related': True theme option to display
- 'searchbox.html',
- ]
-}
-
-html_favicon = 'favicon.png'
-html_logo = 'logo_lvgl.png'
-
-# -- Options for HTMLHelp output ------------------------------------------
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'LVGLdoc'
-
-html_last_updated_fmt = ''
-
-# -- Options for LaTeX output ---------------------------------------------
-
-latex_engine = 'xelatex'
-latex_use_xindy = False
-latex_elements = {
- # The paper size ('letterpaper' or 'a4paper').
- #
- # 'papersize': 'letterpaper',
-
- # The font size ('10pt', '11pt' or '12pt').
- #
- # 'pointsize': '10pt',
-
- # Additional stuff for the LaTeX preamble.
- #
- # 'preamble': '',
-
- # Latex figure (float) alignment
- #
- # 'figure_align': 'htbp',
-
- 'inputenc': '',
- 'utf8extra': '',
- 'classoptions': ',openany,oneside',
- 'babel': '\\usepackage{babel}',
- 'passoptionstopackages': r'''
-\PassOptionsToPackage{bookmarksdepth=5}{hyperref}% depth of pdf bookmarks
-''',
- 'preamble': r'''
-\usepackage{fontspec}
-\setmonofont{DejaVu Sans Mono}
-\usepackage{silence}
-\WarningsOff*
-''',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- (master_doc, 'LVGL.tex', 'LVGL Documentation ' + version,
- 'LVGL community', 'manual'),
-]
-
-
-# -- Options for manual page output ---------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- (master_doc, 'lvgl', 'LVGL Documentation ' + version,
- [author], 1)
-]
-
-
-# -- Options for Texinfo output -------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- (master_doc, 'LVGL', 'LVGL Documentation ' + version,
- author, 'Contributors of LVGL', 'One line description of project.',
- 'Miscellaneous'),
-]
-
-
-breathe_projects = {
- "lvgl":"xml/",
-}
-
-StandaloneHTMLBuilder.supported_image_types = [
- 'image/svg+xml',
- 'image/gif', #prefer gif over png
- 'image/png',
- 'image/jpeg'
-]
-
-smartquotes = False
-
-_, repo_commit_hash = subprocess.getstatusoutput("git rev-parse HEAD")
-
-
-# Example configuration for intersphinx: refer to the Python standard library.
-
-def setup(app):
- app.add_config_value('recommonmark_config', {
- 'enable_eval_rst': True,
- 'enable_auto_toc_tree': 'True',
- }, True)
- app.add_transform(AutoStructify)
- app.add_css_file('css/custom.css')
- app.add_css_file('css/fontawesome.min.css')
diff --git a/lib/lvgl/docs/example_list.py b/lib/lvgl/docs/example_list.py
deleted file mode 100644
index c968ce6..0000000
--- a/lib/lvgl/docs/example_list.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env python3
-import os
-
-
-def process_index_rst(path):
-# print(path)
- with open(path) as fp:
- last_line=""
- line=""
- title_tmp=""
- line = fp.readline()
- d = {}
- while line:
- if line[0:3] == '"""':
- title_tmp = last_line
- elif line[0:15] ==".. lv_example::":
- name = line[16:].strip()
- title_tmp = title_tmp.strip()
- d[name] = title_tmp
- last_line = line
- line = fp.readline()
-
- return(d)
-
-h1= {
- "get_started":"Get started",
- "styles":"Styles",
- "anim":"Animations",
- "event":"Events",
- "layouts":"Layouts",
- "scroll":"Scrolling",
- "widgets":"Widgets"
-}
-
-widgets = {
-"obj":"Base object",
-"arc":"Arc",
-"bar":"Bar",
-"btn":"Button",
-"btnmatrix":"Button matrix",
-"calendar":"Calendar",
-"canvas":"Canvas",
-"chart":"Chart",
-"checkbox":"Checkbox",
-"colorwheel":"Colorwheel",
-"dropdown":"Dropdown",
-"img":"Image",
-"imgbtn":"Image button",
-"keyboard":"Keyboard",
-"label":"Label",
-"led":"LED",
-"line":"Line",
-"list":"List",
-"menu":"Menu",
-"meter":"Meter",
-"msgbox":"Message box",
-"roller":"Roller",
-"slider":"Slider",
-"span":"Span",
-"spinbox":"Spinbox",
-"spinner":"Spinner",
-"switch":"Switch",
-"table":"Table",
-"tabview":"Tabview",
-"textarea":"Textarea",
-"tileview":"Tabview",
-"win":"Window",
-}
-
-layouts = {
-"flex":"Flex",
-"grid":"Grid",
-}
-
-
-def print_item(path, lvl, d, fout):
- for k in d:
- v = d[k]
- if k.startswith(path + "/lv_example_"):
- fout.write("#"*lvl + " " + v + "\n")
- fout.write('```eval_rst\n')
- fout.write(f".. lv_example:: {k}\n")
- fout.write('```\n')
- fout.write("\n")
-
-def exec():
- paths = [ "../examples/", "../demos/"]
- fout = open("examples.md", "w")
- filelist = []
-
- for path in paths:
- for root, dirs, files in os.walk(path):
- for f in files:
- #append the file name to the list
- filelist.append(os.path.join(root,f))
-
- filelist = [ fi for fi in filelist if fi.endswith("index.rst") ]
-
- d_all = {}
- #print all the file names
- for fn in filelist:
- d_act = process_index_rst(fn)
- d_all.update(d_act)
-
- fout.write("```eval_rst\n")
- fout.write(".. include:: /header.rst\n")
- fout.write(":github_url: |github_link_base|/examples.md\n")
- fout.write("```\n")
- fout.write("\n")
- fout.write("# Examples\n")
-
- for h in h1:
- fout.write("## " + h1[h] + "\n")
-
- if h == "widgets":
- for w in widgets:
- fout.write("### " + widgets[w] + "\n")
- print_item(h + "/" + w, 4, d_all, fout)
- elif h == "layouts":
- for l in layouts:
- fout.write("### " + layouts[l] + "\n")
- print_item(h + "/" + l, 4, d_all, fout)
- else:
- print_item(h, 3, d_all, fout)
-
- fout.write("")
-
diff --git a/lib/lvgl/docs/favicon.png b/lib/lvgl/docs/favicon.png
deleted file mode 100644
index 9f65ea5..0000000
Binary files a/lib/lvgl/docs/favicon.png and /dev/null differ
diff --git a/lib/lvgl/docs/get-started/bindings/cpp.md b/lib/lvgl/docs/get-started/bindings/cpp.md
deleted file mode 100644
index 0b2225c..0000000
--- a/lib/lvgl/docs/get-started/bindings/cpp.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/bindings/micropython.md
-```
-# Cpp
-
-In progress: https://github.com/lvgl/lv_binding_cpp
-
diff --git a/lib/lvgl/docs/get-started/bindings/index.md b/lib/lvgl/docs/get-started/bindings/index.md
deleted file mode 100644
index b1620e3..0000000
--- a/lib/lvgl/docs/get-started/bindings/index.md
+++ /dev/null
@@ -1,16 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/bindings/index.md
-```
-# Bindings
-
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- micropython
- cpp
-```
-
diff --git a/lib/lvgl/docs/get-started/bindings/micropython.md b/lib/lvgl/docs/get-started/bindings/micropython.md
deleted file mode 100644
index 9ae738a..0000000
--- a/lib/lvgl/docs/get-started/bindings/micropython.md
+++ /dev/null
@@ -1,96 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/bindings/micropython.md
-```
-# Micropython
-
-## What is Micropython?
-
-[Micropython](http://micropython.org/) is Python for microcontrollers.
-Using Micropython, you can write Python3 code and run it even on a bare metal architecture with limited resources.
-
-### Highlights of Micropython
-
-- **Compact** - Fits and runs within just 256k of code space and 16k of RAM. No OS is needed, although you can also run it with an OS, if you want.
-- **Compatible** - Strives to be as compatible as possible with normal Python (known as CPython).
-- **Versatile** - Supports many architectures (x86, x86-64, ARM, ARM Thumb, Xtensa).
-- **Interactive** - No need for the compile-flash-boot cycle. With the REPL (interactive prompt) you can type commands and execute them immediately, run scripts, etc.
-- **Popular** - Many platforms are supported. The user base is growing bigger. Notable forks: [MicroPython](https://github.com/micropython/micropython), [CircuitPython](https://github.com/adafruit/circuitpython), [MicroPython_ESP32_psRAM_LoBo](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo)
-- **Embedded Oriented** - Comes with modules specifically for embedded systems, such as the [machine module](https://docs.micropython.org/en/latest/library/machine.html#classes) for accessing low-level hardware (I/O pins, ADC, UART, SPI, I2C, RTC, Timers etc.)
-
----
-
-## Why Micropython + LVGL?
-
-Currently, Micropython [does not have a good high-level GUI library](https://forum.micropython.org/viewtopic.php?f=18&t=5543) by default. LVGL is an [Object-Oriented Component Based](https://blog.lvgl.io/2018-12-13/extend-lvgl-objects) high-level GUI library, which seems to be a natural candidate to map into a higher level language, such as Python. LVGL is implemented in C and its APIs are in C.
-
-### Here are some advantages of using LVGL in Micropython:
-
-- Develop GUI in Python, a very popular high level language. Use paradigms such as Object-Oriented Programming.
-- Usually, GUI development requires multiple iterations to get things right. With C, each iteration consists of **`Change code` > `Build` > `Flash` > `Run`**.
-In Micropython it's just **`Change code` > `Run`** ! You can even run commands interactively using the [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) (the interactive prompt)
-
-### Micropython + LVGL could be used for:
-
-- Fast prototyping GUI.
-- Shortening the cycle of changing and fine-tuning the GUI.
-- Modelling the GUI in a more abstract way by defining reusable composite objects, taking advantage of Python's language features such as Inheritance, Closures, List Comprehension, Generators, Exception Handling, Arbitrary Precision Integers and others.
-- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
-This goes well with [CircuitPython vision](https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython). CircuitPython was designed with education in mind, to make it easier for new or inexperienced users to get started with embedded development.
-- Creating tools to work with LVGL at a higher level (e.g. drag-and-drop designer).
-
----
-
-## So what does it look like?
-
-> TL;DR:
-> It's very much like the C API, but Object-Oriented for LVGL components.
-
-Let's dive right into an example!
-
-### A simple example
-
-```python
-import lvgl as lv
-lv.init()
-scr = lv.obj()
-btn = lv.btn(scr)
-btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
-label = lv.label(btn)
-label.set_text("Button")
-lv.scr_load(scr)
-```
-
-## How can I use it?
-
-### Online Simulator
-
-If you want to experiment with LVGL + Micropython without downloading anything - you can use our online simulator!
-It's a fully functional LVGL + Micropython that runs entirely in the browser and allows you to edit a python script and run it.
-
-[Click here to experiment on the online simulator](https://sim.lvgl.io/)
-
-[Hello World](https://sim.lvgl.io/v7/micropython/ports/javascript/bundle_out/index.html?script=https://gist.githubusercontent.com/amirgon/51299ce9b6448328a855826149482ae6/raw/0f235c6d40462fd2f0e55364b874f14fe3fd613c/lvgl_hello_world.py&script_startup=https://gist.githubusercontent.com/amirgon/7bf15a66ba6d959bbf90d10f3da571be/raw/8684b5fa55318c184b1310663b187aaab5c65be6/init_lv_mp_js.py)
-
-Note: the online simulator is available for lvgl v6 and v7.
-
-### PC Simulator
-
-Micropython is ported to many platforms. One notable port is "unix", which allows you to build and run Micropython (+LVGL) on a Linux machine. (On a Windows machine you might need Virtual Box or WSL or MinGW or Cygwin etc.)
-
-[Click here to know more information about building and running the unix port](https://github.com/lvgl/lv_micropython)
-
-### Embedded platform
-
-In the end, the goal is to run it all on an embedded platform.
-Both Micropython and LVGL can be used on many embedded architectures, such as stm32, ESP32 etc.
-You would also need display and input drivers. We have some sample drivers (ESP32+ILI9341, as well as some other examples), but chances are you would want to create your own input/display drivers for your specific hardware.
-Drivers can be implemented either in C as a Micropython module, or in pure Micropython!
-
-## Where can I find more information?
-
-- In this [Blog Post](https://blog.lvgl.io/2019-02-20/micropython-bindings)
-- `lv_micropython` [README](https://github.com/lvgl/lv_micropython)
-- `lv_binding_micropython` [README](https://github.com/lvgl/lv_binding_micropython)
-- The [LVGL micropython forum](https://forum.lvgl.io/c/micropython) (Feel free to ask anything!)
-- At Micropython: [docs](http://docs.micropython.org/en/latest/) and [forum](https://forum.micropython.org/)
diff --git a/lib/lvgl/docs/get-started/index.md b/lib/lvgl/docs/get-started/index.md
deleted file mode 100644
index 0379c29..0000000
--- a/lib/lvgl/docs/get-started/index.md
+++ /dev/null
@@ -1,30 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/index.md
-```
-# Get started
-
-There are several ways to get your feet wet with LVGL. Here is one recommended order of documents to read and things to play with when you are learning to use LVGL:
-1. Check the [Online demos](https://lvgl.io/demos) to see LVGL in action (3 minutes)
-2. Read the [Introduction](https://docs.lvgl.io/latest/en/html/intro/index.html) page of the documentation (5 minutes)
-3. Read the [Quick overview](https://docs.lvgl.io/master/get-started/quick-overview.html) page of the documentation (15 minutes)
-4. Set up a [Simulator](https://docs.lvgl.io/master/get-started/platforms/pc-simulator.html) (10 minutes)
-5. Try out some [Examples](https://docs.lvgl.io/master/examples.html)
-6. Check out the Platform-specific tutorials. (in this section below). (10 minutes)
-7. Port LVGL to a board. See the [Porting](https://docs.lvgl.io/master/porting/index.html) guide or check the ready to use [Projects](https://github.com/lvgl?q=lv_port_&type=&language=)
-8. Read the [Overview](https://docs.lvgl.io/master/overview/index.html) page to get a better understanding of the library. (2-3 hours)
-9. Check the documentation of the [Widgets](https://docs.lvgl.io/master/widgets/index.html) to see their features and usage
-10. If you have questions got to the [Forum](http://forum.lvgl.io/)
-11. Read the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) guide to see how you can help to improve LVGL (15 minutes)
-
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- platforms/index
- os/index
- bindings/index
-```
-
diff --git a/lib/lvgl/docs/get-started/os/freertos.md b/lib/lvgl/docs/get-started/os/freertos.md
deleted file mode 100644
index 0cc6d45..0000000
--- a/lib/lvgl/docs/get-started/os/freertos.md
+++ /dev/null
@@ -1,7 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/os/freertos.md
-```
-# FreeRTOS
-
-TODO
\ No newline at end of file
diff --git a/lib/lvgl/docs/get-started/os/index.md b/lib/lvgl/docs/get-started/os/index.md
deleted file mode 100644
index eff37b7..0000000
--- a/lib/lvgl/docs/get-started/os/index.md
+++ /dev/null
@@ -1,17 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/os/index.md
-```
-# (RT)OS
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- nuttx
- rt-thread
- freertos
- zephyr
-```
-
diff --git a/lib/lvgl/docs/get-started/os/nuttx.md b/lib/lvgl/docs/get-started/os/nuttx.md
deleted file mode 100644
index dd2bb1a..0000000
--- a/lib/lvgl/docs/get-started/os/nuttx.md
+++ /dev/null
@@ -1,101 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/os/nuttx.md
-```
-# NuttX RTOS
-
-## What is NuttX?
-
-[NuttX](https://nuttx.apache.org/) is a mature and secure real-time operating system (RTOS) with an emphasis on technical standards compliance and small size.
-It is scalable from 8-bit to 64-bit microcontrollers and microprocessors and compliant with the Portable Operating System Interface (POSIX) and the American National Standards Institute (ANSI) standards and with many Linux-like subsystems.
-The best way to think about NuttX is to think of it as a small Unix/Linux for microcontrollers.
-
-### Highlights of NuttX
-
-- **Small** - Fits and runs in microcontrollers as small as 32 kB Flash and 8 kB of RAM.
-- **Compliant** - Strives to be as compatible as possible with POSIX and Linux.
-- **Versatile** - Supports many architectures (ARM, ARM Thumb, AVR, MIPS, OpenRISC, RISC-V 32-bit and 64-bit, RX65N, x86-64, Xtensa, Z80/Z180, etc.).
-- **Modular** - Its modular design allows developers to select only what really matters and use modules to include new features.
-- **Popular** - NuttX is used by many companies around the world. Probably you already used a product with NuttX without knowing it was running NuttX.
-- **Predictable** - NuttX is a preemptible Realtime kernel, so you can use it to create predictable applications for realtime control.
-
----
-
-## Why NuttX + LVGL?
-
-Although NuttX has its own graphic library called [NX](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629474), LVGL is a good alternative because users could find more eye-candy demos and they can reuse code from previous projects.
-LVGL is an [Object-Oriented Component Based](https://blog.lvgl.io/2018-12-13/extend-lvgl-objects) high-level GUI library, that could fit very well for a RTOS with advanced features like NuttX.
-LVGL is implemented in C and its APIs are in C.
-
-### Here are some advantages of using LVGL in NuttX
-
-- Develop GUI in Linux first and when it is done just compile it for NuttX. Nothing more, no wasting of time.
-- Usually, GUI development for low level RTOS requires multiple iterations to get things right, where each iteration consists of **`Change code` > `Build` > `Flash` > `Run`**.
-Using LVGL, Linux and NuttX you can reduce this process and just test everything on your computer and when it is done, compile it on NuttX and that is it.
-
-### NuttX + LVGL could be used for
-
-- GUI demos to demonstrate your board graphics capacities.
-- Fast prototyping GUI for MVP (Minimum Viable Product) presentation.
-- visualize sensor data directly and easily on the board without using a computer.
-- Final products with a GUI without a touchscreen (i.e. 3D Printer Interface using Rotary Encoder to Input data).
-- Final products with a touchscreen (and all sorts of bells and whistles).
-
----
-
-## How to get started with NuttX and LVGL?
-
-There are many boards in the [NuttX mainline](https://github.com/apache/incubator-nuttx) with support for LVGL.
-Let's use the [STM32F429IDISCOVERY](https://www.st.com/en/evaluation-tools/32f429idiscovery.html) as an example because it is a very popular board.
-
-### First you need to install the pre-requisites on your system
-
-Let's use the [Windows Subsystem for Linux](https://acassis.wordpress.com/2018/01/10/how-to-build-nuttx-on-windows-10/)
-
-```shell
-$ sudo apt-get install automake bison build-essential flex gcc-arm-none-eabi gperf git libncurses5-dev libtool libusb-dev libusb-1.0.0-dev pkg-config kconfig-frontends openocd
-```
-
-### Now let's create a workspace to save our files
-
-```shell
-$ mkdir ~/nuttxspace
-$ cd ~/nuttxspace
-```
-
-### Clone the NuttX and Apps repositories:
-
-```shell
-$ git clone https://github.com/apache/incubator-nuttx nuttx
-$ git clone https://github.com/apache/incubator-nuttx-apps apps
-```
-
-### Configure NuttX to use the stm32f429i-disco board and the LVGL Demo
-
-```shell
-$ ./tools/configure.sh stm32f429i-disco:lvgl
-$ make
-```
-
-If everything went fine you should have now the file `nuttx.bin` to flash on your board:
-
-```shell
-$ ls -l nuttx.bin
--rwxrwxr-x 1 alan alan 287144 Jun 27 09:26 nuttx.bin
-```
-
-### Flashing the firmware in the board using OpenOCD:
-```shell
-$ sudo openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
-```
-
-Reset the board and using the 'NSH>' terminal start the LVGL demo:
-```shell
-nsh> lvgldemo
-```
-
-## Where can I find more information?
-
-- This blog post: [LVGL on LPCXpresso54628](https://acassis.wordpress.com/2018/07/19/running-nuttx-on-lpcxpresso54628-om13098/)
-- NuttX mailing list: [Apache NuttX Mailing List](http://nuttx.incubator.apache.org/community/)
-
diff --git a/lib/lvgl/docs/get-started/os/rt-thread.md b/lib/lvgl/docs/get-started/os/rt-thread.md
deleted file mode 100644
index 4f6ec77..0000000
--- a/lib/lvgl/docs/get-started/os/rt-thread.md
+++ /dev/null
@@ -1,48 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/os/rt-thread.md
-```
-# RT-Thread RTOS
-
-
-
-## What is RT-Thread?
-
-[Introduce about RT-Thread and how to run LVGL on RT-Thread in simulators](https://www.youtube.com/watch?v=k7QYk6hSwnc)
-
-[**RT-Thread**](https://www.rt-thread.io/) is an [open source](https://github.com/RT-Thread/rt-thread), neutral, and community-based real-time operating system (RTOS). RT-Thread has **Standard version** and **Nano version**. For resource-constrained microcontroller (MCU) systems, the Nano version that requires only 3 KB Flash and 1.2 KB RAM memory resources can be tailored with easy-to-use tools. For resource-rich IoT devices, RT-Thread can use the **online software package** management tool, together with system configuration tools, to achieve intuitive and rapid modular cutting, seamlessly import rich software packages; thus, achieving complex functions like Android's graphical interface and touch sliding effects, smart voice interaction effects, and so on.
-
-### Key features
-
-- Designed for resource-constrained devices, the minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
-- A variety of standard interfaces, such as POSIX, CMSIS, C++ application environment.
-- Has rich components and a prosperous and fast growing package ecosystem
-- Elegant code style, easy to use, read and master.
-- High Scalability. RT-Thread has high-quality scalable software architecture, loose coupling, modularity, is easy to tailor and expand.
-- Supports high-performance applications.
-- Supports all mainstream compiling tools such as GCC, Keil and IAR.
-- Supports a wide range of architectures and chips .
-
-
-## How to run LVGL on RT-Thread?
-
-[中文文档](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/packages-manual/lvgl-docs/introduction)
-
-LVGL has registered as a [software package](https://packages.rt-thread.org/en/detail.html?package=LVGL) of RT-Thread. By using [Env tool](https://www.rt-thread.io/download.html?download=Env) or [RT-Thread Studio IDE](https://www.rt-thread.io/download.html?download=Studio), RT-Thread users can easily download LVGL source code and combine with RT-Thread project. RT-Thread community has port LVGL to several BSPs:
-
-| BSP | Note |
-| ------------------------------------------------------------ | ---- |
-| [QEMU simulator](https://github.com/RT-Thread/rt-thread/tree/master/bsp/qemu-vexpress-a9/applications/lvgl) | |
-| [Visual Studio simulator](https://github.com/RT-Thread/rt-thread/tree/master/bsp/simulator/applications/lvgl) | |
-| [Nuvoton numaker-iot-m487](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-iot-m487/applications/lvgl) | |
-| [Nuvoton numaker-pfm-m487](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-pfm-m487/applications/lvgl) | |
-| [Nuvoton nk-980iot](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/nk-980iot/applications/lvgl) | |
-| [Nuvoton numaker-m2354](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-m2354/applications/lvgl) | |
-| [Nuvoton nk-n9h30](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/nk-n9h30/applications/lvgl) | |
-| [Nuvoton numaker-m032ki](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-m032ki/applications/lvgl) | |
-| [NXP imxrt1060-evk](https://github.com/RT-Thread/rt-thread/tree/master/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl) | |
-| [STM32L475 pandora](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32l475-atk-pandora/applications/lvgl) | |
-| [STM32F407 explorer](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32f407-atk-explorer/applications/lvgl) | |
-| [STM32F469 Discovery](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32f469-st-disco/applications/lvgl) | |
-| [Raspberry PICO](https://github.com/RT-Thread/rt-thread/tree/master/bsp/raspberry-pico/applications/lvgl) | |
-
diff --git a/lib/lvgl/docs/get-started/os/zephyr.md b/lib/lvgl/docs/get-started/os/zephyr.md
deleted file mode 100644
index 32abd3d..0000000
--- a/lib/lvgl/docs/get-started/os/zephyr.md
+++ /dev/null
@@ -1,7 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/os/zephyr.md
-```
-# Zephyr
-
-TODO
\ No newline at end of file
diff --git a/lib/lvgl/docs/get-started/platforms/arduino.md b/lib/lvgl/docs/get-started/platforms/arduino.md
deleted file mode 100644
index 2596553..0000000
--- a/lib/lvgl/docs/get-started/platforms/arduino.md
+++ /dev/null
@@ -1,83 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platforms/arduino.md
-```
-
-# Arduino
-
-The [LVGL library](https://github.com/lvgl/lvgl) is directly available as Arduino libraries.
-
-Note that you need to choose a board powerful enough to run LVGL and your GUI. See the [requirements of LVGL](https://docs.lvgl.io/master/intro/index.html#requirements).
-
-For example ESP32 is a good candidate to create UI's with LVGL.
-
-## Get the LVGL Arduino library
-
-LVGL can be installed via the Arduino IDE Library Manager or as a .ZIP library.
-
-You can [Download](https://github.com/lvgl/lvgl/archive/refs/heads/master.zip) the latest version of LVGL from GitHub and simply copy it to Arduino's library folder.
-
-## Set up drivers
-
-To get started it's recommended to use [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library as a TFT driver to simplify testing.
-To make it work, setup `TFT_eSPI` according to your TFT display type via editing either
-- `User_Setup.h`
-- or by selecting a configuration in the `User_Setup_Select.h`
-
-Both files are located in `TFT_eSPI` library's folder.
-
-## Configure LVGL
-
-LVGL has its own configuration file called `lv_conf.h`. When LVGL is installed, follow these configuration steps:
-1. Go to the directory of the installed Arduino libraries
-2. Go to `lvgl` and copy `lv_conf_template.h` as `lv_conf.h` into the Arduino Libraries directory next to the `lvgl` library folder.
-3. Open `lv_conf.h` and change the first `#if 0` to `#if 1` to enable the content of the file
-4. Set the color depth of you display in `LV_COLOR_DEPTH`
-5. Set `LV_TICK_CUSTOM 1`
-
-Finally the layout with `lv_conf.h` should look like this:
-```
-arduino
- |-libraries
- |-lvgl
- |-other_lib_1
- |-other_lib_2
- |-lv_conf.h
-```
-
-## Initialize and run LVGL
-
-Take a look at [LVGL_Arduino.ino](https://github.com/lvgl/lvgl/blob/master/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino) to see how to initialize LVGL.
-`TFT_eSPI` is used as the display driver.
-
-In the INO file you can see how to register a display and a touchpad for LVGL and call an example.
-
-## Use the examples and demos
-
-Note that, there is no dedicated INO file for every example. Instead, you can load an example by calling an `lv_example_...` function. For example `lv_example_btn_1()`.
-
-**IMPORTANT**
-Due to some the limitations of Arduino's build system you need to copy `lvgl/examples` to `lvgl/src/examples`. Similarly for the demos `lvgl/demos` to `lvgl/src/demos`.
-
-## Debugging and logging
-
-LVGL can display debug information in case of trouble.
-In the `LVGL_Arduino.ino` example there is a `my_print` method, which sends this debug information to the serial interface.
-To enable this feature you have to edit the `lv_conf.h` file and enable logging in the section `log settings`:
-
-```c
-/*Log settings*/
-#define USE_LV_LOG 1 /*Enable/disable the log module*/
-#if LV_USE_LOG
-/* How important log should be added:
- * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
- * LV_LOG_LEVEL_INFO Log important events
- * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
- * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
- * LV_LOG_LEVEL_NONE Do not log anything
- */
-# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
-```
-
-After enabling the log module and setting LV_LOG_LEVEL accordingly, the output log is sent to the `Serial` port @ 115200 bps.
-
diff --git a/lib/lvgl/docs/get-started/platforms/cmake.md b/lib/lvgl/docs/get-started/platforms/cmake.md
deleted file mode 100644
index 11e82ef..0000000
--- a/lib/lvgl/docs/get-started/platforms/cmake.md
+++ /dev/null
@@ -1,93 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platforms/cmake.md
-```
-
-# CMake
-LVGL supports integrating with [CMake](https://cmake.org/). It comes with preconfigured targets for:
-- [Espressif (ESP32)](https://docs.espressif.com/projects/esp-idf/en/v3.3/get-started-cmake/index.html)
-- [MicroPython](https://docs.micropython.org/en/v1.15/develop/cmodules.html)
-- [Zephyr](https://docs.zephyrproject.org/latest/guides/zephyr_cmake_package.html)
-
-On top of the preconfigured targets you can also use "plain" CMake to integrate LVGL into any custom C/C++ project.
-
-### Prerequisites
-- CMake ( >= 3.12.4 )
-- Compatible build tool e.g.
- - [Make](https://www.gnu.org/software/make/)
- - [Ninja](https://ninja-build.org/)
-
-## Building LVGL with CMake
-There are many ways to include external CMake projects into your own. A modern one also used in this example is the CMake [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) module. This module conveniently allows us to download dependencies directly at configure time from e.g. [GitHub](https://github.com/). Here is an example how we might include LVGL into our own project.
-
-```cmake
-cmake_minimum_required(VERSION 3.14)
-include(FetchContent)
-
-project(MyProject LANGUAGES C CXX)
-
-# Build an executable called "MyFirmware"
-add_executable(MyFirmware src/main.c)
-
-# Specify path to own LVGL config header
-set(LV_CONF_PATH
- ${CMAKE_CURRENT_SOURCE_DIR}/src/lv_conf.h
- CACHE STRING "" FORCE)
-
-# Fetch LVGL from GitHub
-FetchContent_Declare(lvgl URL https://github.com/lvgl/lvgl.git)
-FetchContent_MakeAvailable(lvgl)
-
-# The target "MyFirmware" depends on LVGL
-target_link_libraries(MyFirmware PRIVATE lvgl::lvgl)
-```
-
-This configuration declares a dependency between the two targets **MyFirmware** and **lvgl**. Upon building the target **MyFirmware** this dependency will be resolved and **lvgl** will be built and linked with it. Since LVGL requires a config header called [lv_conf.h](https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h) to be includable by its sources we also set the option `LV_CONF_PATH` to point to our own copy of it.
-
-### Additional CMake options
-Besides `LV_CONF_PATH` there are two additional CMake options to specify include paths.
-
-`LV_LVGL_H_INCLUDE_SIMPLE` which specifies whether to `#include "lvgl.h"` absolut or relative
-
-| ON (default) | OFF |
-| ------------ | -------------- |
-| "lvgl.h" | "../../lvgl.h" |
-
-`LV_CONF_INCLUDE_SIMPLE` which specifies whether to `#include "lv_conf.h"` and `"lv_drv_conf.h"` absolut or relative
-
-| ON (default) | OFF |
-| --------------- | --------------------- |
-| "lv_conf.h" | "../../lv_conf.h" |
-| "lv_drv_conf.h" | "../../lv_drv_conf.h" |
-
-I do not recommend disabling those options unless your folder layout makes it absolutely necessary.
-
-## Building LVGL examples with CMake
-LVGL [examples](https://docs.lvgl.io/master/examples.html) have their own CMake target. If you want to build the examples simply add them to your dependencies.
-
-```cmake
-# The target "MyFirmware" depends on LVGL and examples
-target_link_libraries(MyFirmware PRIVATE lvgl::lvgl lvgl::examples)
-```
-
-## Building LVGL drivers and demos with CMake
-Exactly the same goes for the [drivers](https://github.com/lvgl/lv_drivers) and the [demos](https://github.com/lvgl/lvgl/demos).
-
-```cmake
-FetchContent_Declare(lv_drivers
- GIT_REPOSITORY https://github.com/lvgl/lv_drivers)
-FetchContent_MakeAvailable(lv_drivers)
-
-# The target "MyFirmware" depends on LVGL, drivers and demos
-target_link_libraries(MyFirmware PRIVATE lvgl::lvgl lvgl::drivers lvgl::examples)
-```
-
-# Build shared libraries with CMake
-By default, LVGL will be built as a static library (archive). CMake can instead be instructed to build LVGL as shared library (.so/.dll/etc.):
-```cmake
-set(BUILD_SHARED_LIBS ON)
-```
-OR
-```
-$ cmake "-DBUILD_SHARED_LIBS=ON" .
-```
diff --git a/lib/lvgl/docs/get-started/platforms/espressif.md b/lib/lvgl/docs/get-started/platforms/espressif.md
deleted file mode 100644
index 4508815..0000000
--- a/lib/lvgl/docs/get-started/platforms/espressif.md
+++ /dev/null
@@ -1,62 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platforms/espressif.md
-```
-
-# Espressif (ESP32 chip series)
-LVGL can be used and configured as a standard [ESP-IDF](https://github.com/espressif/esp-idf) component.
-
-More information about ESP-IDF build system can be found [here](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html).
-
-## LVGL demo project for ESP32
-
-We've created [lv_port_esp32](https://github.com/lvgl/lv_port_esp32), a project using ESP-IDF and LVGL to show one of the demos from [demos](https://github.com/lvgl/lvgl/demos).
-You can configure the project to use one of the many supported display controllers and targets (chips).
-
-See [lvgl_esp32_drivers](https://github.com/lvgl/lvgl_esp32_drivers) repository for a complete list
-of supported display and indev (touch) controllers and targets.
-
-## Using LVGL in your ESP-IDF project
-
-### Prerequisites
-
- * ESP-IDF v4.1 and above
- * ESP evaluation board with a display
-
-### Obtaining LVGL
-
-__Option 1:__ git submodule
-
-Simply clone LVGL into your `project_root/components` directory and it will be automatically integrated into the project.
-If the project is a git repository you can include LVGL as a git submodule:
-
-```sh
-git submodule add https://github.com/lvgl/lvgl.git components/lvgl
-```
-
-The above command will clone LVGL's main repository into the `components/lvgl` directory. LVGL includes a `CMakeLists.txt` file that sets some configuration options so you can use LVGL right away.
-
-__Option 2:__ IDF Component Manager
-
-LVGL is also distributed through [IDF Component Manager](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html).
-It allows users to seamlessly integrate [LVGL component](https://components.espressif.com/component/lvgl/lvgl) into their project with following command:
-
-```sh
-idf.py add-dependency lvgl/lvgl>=8.*
-```
-
-During next project build, LVGL component will be fetched from the component registry and added to project build.
-
-### Configuration
-
-When you are ready to configure LVGL, launch the configuration menu with `idf.py menuconfig` in your project root directory, go to `Component config` and then `LVGL configuration`.
-
-## Using lvgl_esp32_drivers in ESP-IDF project
-
-You can also add `lvgl_esp32_drivers` as a "component". This component should be located inside a directory named "components" in your project root directory.
-
-When your project is a git repository you can include `lvgl_esp32_drivers` as a git submodule:
-
-```sh
-git submodule add https://github.com/lvgl/lvgl_esp32_drivers.git components/lvgl_esp32_drivers
-```
diff --git a/lib/lvgl/docs/get-started/platforms/index.md b/lib/lvgl/docs/get-started/platforms/index.md
deleted file mode 100644
index 35306fd..0000000
--- a/lib/lvgl/docs/get-started/platforms/index.md
+++ /dev/null
@@ -1,20 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/index.md
-```
-# Platforms
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- pc-simulator
- nxp
- stm32
- espressif
- arduino
- tasmota-berry
- cmake
-```
-
diff --git a/lib/lvgl/docs/get-started/platforms/nxp.md b/lib/lvgl/docs/get-started/platforms/nxp.md
deleted file mode 100644
index b2fe197..0000000
--- a/lib/lvgl/docs/get-started/platforms/nxp.md
+++ /dev/null
@@ -1,71 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platforms/nxp.md
-```
-# NXP
-NXP has integrated LVGL into the MCUXpresso SDK packages for several of their general
-purpose and crossover microcontrollers, allowing easy evaluation and migration into your
-product design. [Download an SDK for a supported board](https://www.nxp.com/design/software/embedded-software/littlevgl-open-source-graphics-library:LITTLEVGL-OPEN-SOURCE-GRAPHICS-LIBRARY?&tid=vanLITTLEVGL-OPEN-SOURCE-GRAPHICS-LIBRARY)
-today and get started with your next GUI application.
-
-## Creating new project with LVGL
-Downloading the MCU SDK example project is recommended as a starting point. It comes fully
-configured with LVGL (and with PXP support if module is present), no additional integration
-work is required.
-
-## Adding HW acceleration for NXP iMX RT platforms using PXP (PiXel Pipeline) engine for existing projects
-Several drawing features in LVGL can be offloaded to the PXP engine. The CPU is available for other operations while the PXP is running. An RTOS is required to block the LVGL drawing thread and switch to another task or suspend the CPU for power savings.
-
-#### Features supported:
- - RGB565 color format
- - Area fill + optional transparency
- - BLIT (BLock Image Transfer) + optional transparency
- - Color keying + optional transparency
- - Recoloring (color tint) + optional transparency
- - RTOS integration layer
- - Default FreeRTOS and bare metal code provided
-
-#### Basic configuration:
- - Select NXP PXP engine in lv_conf.h: Set `LV_USE_GPU_NXP_PXP` to 1
- - Enable default implementation for interrupt handling, PXP start function and automatic initialization: Set `LV_USE_GPU_NXP_PXP_AUTO_INIT` to 1
- - If `FSL_RTOS_FREE_RTOS` symbol is defined, FreeRTOS implementation will be used, otherwise bare metal code will be included
-
-#### Basic initialization:
- - If `LV_USE_GPU_NXP_PXP_AUTO_INIT` is enabled, no user code is required; PXP is initialized automatically in `lv_init()`
- - For manual PXP initialization, default configuration structure for callbacks can be used. Initialize PXP before calling `lv_init()`
-```c
- #if LV_USE_GPU_NXP_PXP
- #include "lv_gpu/lv_gpu_nxp_pxp.h"
- #include "lv_gpu/lv_gpu_nxp_pxp_osa.h"
- #endif
- . . .
- #if LV_USE_GPU_NXP_PXP
- if (lv_gpu_nxp_pxp_init(&pxp_default_cfg) != LV_RES_OK) {
- PRINTF("PXP init error. STOP.\n");
- for ( ; ; ) ;
- }
- #endif
-```
-
-#### Project setup:
- - Add PXP related files to project:
- - lv_gpu/lv_gpu_nxp.c, lv_gpu/lv_gpu_nxp.h: low level drawing calls for LVGL
- - lv_gpu/lv_gpu_nxp_osa.c, lv_gpu/lv_gpu_osa.h: default implementation of OS-specific functions (bare metal and FreeRTOS only)
- - optional, required only if `LV_USE_GPU_NXP_PXP_AUTO_INIT` is set to 1
- - PXP related code depends on two drivers provided by MCU SDK. These drivers need to be added to project:
- - fsl_pxp.c, fsl_pxp.h: PXP driver
- - fsl_cache.c, fsl_cache.h: CPU cache handling functions
-
-#### Advanced configuration:
- - Implementation depends on multiple OS-specific functions. The struct `lv_nxp_pxp_cfg_t` with callback pointers is used
- as a parameter for the `lv_gpu_nxp_pxp_init()` function. Default implementation for FreeRTOS and baremetal is provided in lv_gpu_nxp_osa.c
- - `pxp_interrupt_init()`: Initialize PXP interrupt (HW setup, OS setup)
- - `pxp_interrupt_deinit()`: Deinitialize PXP interrupt (HW setup, OS setup)
- - `pxp_run()`: Start PXP job. Use OS-specific mechanism to block drawing thread. PXP must finish drawing before leaving this function.
- - There are configurable area thresholds which are used to decide whether the area will be processed by CPU, or by PXP. Areas smaller than a
- defined value will be processed by CPU and those bigger than the threshold will be processed by PXP. These thresholds may be defined as
- preprocessor variables. Default values are defined lv_gpu/lv_gpu_nxp_pxp.h
- - `GPU_NXP_PXP_BLIT_SIZE_LIMIT`: size threshold for image BLIT, BLIT with color keying, and BLIT with recolor (OPA > LV_OPA_MAX)
- - `GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT`: size threshold for image BLIT and BLIT with color keying with transparency (OPA < LV_OPA_MAX)
- - `GPU_NXP_PXP_FILL_SIZE_LIMIT`: size threshold for fill operation (OPA > LV_OPA_MAX)
- - `GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT`: size threshold for fill operation with transparency (OPA < LV_OPA_MAX)
diff --git a/lib/lvgl/docs/get-started/platforms/pc-simulator.md b/lib/lvgl/docs/get-started/platforms/pc-simulator.md
deleted file mode 100644
index c57a9e3..0000000
--- a/lib/lvgl/docs/get-started/platforms/pc-simulator.md
+++ /dev/null
@@ -1,98 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platoforms/simulator.md
-```
-# Simulator on PC
-
-
-You can try out LVGL **using only your PC** (i.e. without any development boards). LVGL will run on a simulator environment on the PC where anyone can write and experiment with real LVGL applications.
-
-Using the simulator on a PC has the following advantages:
-- Hardware independent - Write code, run it on the PC and see the result on a monitor.
-- Cross-platform - Any Windows, Linux or macOS system can run the PC simulator.
-- Portability - The written code is portable, which means you can simply copy it when migrating to embedded hardware.
-- Easy Validation - The simulator is also very useful to report bugs because it provides a common platform for every user. So it's a good idea to reproduce a bug in the simulator and use that code snippet in the [Forum](https://forum.lvgl.io).
-
-## Select an IDE
-
-The simulator is ported to various IDEs (Integrated Development Environments). Choose your favorite IDE, read its README on GitHub, download the project, and load it to the IDE.
-
-- [Eclipse with SDL driver](https://github.com/lvgl/lv_sim_eclipse_sdl): Recommended on Linux and Mac
-- [CodeBlocks](https://github.com/lvgl/lv_sim_codeblocks_win): Recommended on Windows
-- [VisualStudio with SDL driver](https://github.com/lvgl/lv_sim_visual_studio_sdl): For Windows
-- [VSCode with SDL driver](https://github.com/lvgl/lv_sim_vscode_sdl): Recommended on Linux and Mac
-- [PlatformIO with SDL driver](https://github.com/lvgl/lv_platformio): Recommended on Linux and Mac
-
-You can use any IDE for development but, for simplicity, the configuration for Eclipse CDT is what we'll focus on in this tutorial.
-The following section describes the set-up guide of Eclipse CDT in more detail.
-
-**Note: If you are on Windows, it's usually better to use the Visual Studio or CodeBlocks projects instead. They work out of the box without requiring extra steps.**
-
-## Set-up Eclipse CDT
-
-### Install Eclipse CDT
-
-[Eclipse CDT](https://eclipse.org/cdt/) is a C/C++ IDE.
-
-Eclipse is a Java-based tool so be sure **Java Runtime Environment** is installed on your system.
-
-On Debian-based distros (e.g. Ubuntu): `sudo apt-get install default-jre`
-
-Note: If you are using other distros, then please install a 'Java Runtime Environment' suitable to your distro.
-Note: If you are using macOS and get a "Failed to create the Java Virtual Machine" error, uninstall any other Java JDK installs and install Java JDK 8u. This should fix the problem.
-
-You can download Eclipse's CDT from: [https://www.eclipse.org/cdt/downloads.php](https://www.eclipse.org/cdt/downloads.php). Start the installer and choose *Eclipse CDT* from the list.
-
-### Install SDL 2
-
-The PC simulator uses the [SDL 2](https://www.libsdl.org/download-2.0.php) cross-platform library to simulate a TFT display and a touchpad.
-
-#### Linux
-On **Linux** you can easily install SDL2 using a terminal:
-
-1. Find the current version of SDL2: `apt-cache search libsdl2 (e.g. libsdl2-2.0-0)`
-2. Install SDL2: `sudo apt-get install libsdl2-2.0-0` (replace with the found version)
-3. Install SDL2 development package: `sudo apt-get install libsdl2-dev`
-4. If build essentials are not installed yet: `sudo apt-get install build-essential`
-
-#### Windows
-If you are using **Windows** firstly you need to install MinGW ([64 bit version](http://mingw-w64.org/doku.php/download)). After installing MinGW, do the following steps to add SDL2:
-
-1. Download the development libraries of SDL.
-Go to [https://www.libsdl.org/download-2.0.php](https://www.libsdl.org/download-2.0.php) and download _Development Libraries: SDL2-devel-2.0.5-mingw.tar.gz_
-2. Decompress the file and go to _x86_64-w64-mingw32_ directory (for 64 bit MinGW) or to _i686-w64-mingw32_ (for 32 bit MinGW)
-3. Copy _..._mingw32/include/SDL2_ folder to _C:/MinGW/.../x86_64-w64-mingw32/include_
-4. Copy _..._mingw32/lib/_ content to _C:/MinGW/.../x86_64-w64-mingw32/lib_
-5. Copy _..._mingw32/bin/SDL2.dll_ to _{eclipse_workspace}/pc_simulator/Debug/_. Do it later when Eclipse is installed.
-
-Note: If you are using **Microsoft Visual Studio** instead of Eclipse then you don't have to install MinGW.
-
-#### OSX
-On **OSX** you can easily install SDL2 with brew: `brew install sdl2`
-
-If something is not working, then please refer [this tutorial](http://lazyfoo.net/tutorials/SDL/01_hello_SDL/index.php) to get started with SDL.
-
-### Pre-configured project
-
-A pre-configured graphics library project (based on the latest release) is always available to get started easily.
-You can find the latest one on [GitHub](https://github.com/lvgl/lv_sim_eclipse_sdl).
-(Please note that, the project is configured for Eclipse CDT).
-
-### Add the pre-configured project to Eclipse CDT
-
-Run Eclipse CDT. It will show a dialogue about the **workspace path**. Before accepting the path, check that path and copy (and unzip) the downloaded pre-configured project there. After that, you can accept the workspace path. Of course you can modify this path but in that case copy the project to the corresponding location.
-
-Close the start-up window and go to **File->Import** and choose **General->Existing project into Workspace**. **Browse the root directory** of the project and click **Finish**
-
-On **Windows** you have to do two additional things:
-
-- Copy the **SDL2.dll** into the project's Debug folder
-- Right-click on the project -> Project properties -> C/C++ Build -> Settings -> Libraries -> Add ... and add _mingw32_ above SDLmain and SDL. (The order is important: mingw32, SDLmain, SDL)
-
-### Compile and Run
-
-Now you are ready to run LVGL on your PC. Click on the Hammer Icon on the top menu bar to Build the project. If you have done everything right, then you will not get any errors. Note that on some systems additional steps might be required to "see" SDL 2 from Eclipse but in most cases the configuration in the downloaded project is enough.
-
-After a successful build, click on the Play button on the top menu bar to run the project. Now a window should appear in the middle of your screen.
-
-Now you are ready to use LVGL and begin development on your PC.
diff --git a/lib/lvgl/docs/get-started/platforms/stm32.md b/lib/lvgl/docs/get-started/platforms/stm32.md
deleted file mode 100644
index aa9c31d..0000000
--- a/lib/lvgl/docs/get-started/platforms/stm32.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platforms/stm32.md
-```
-
-# STM32
-
-TODO
diff --git a/lib/lvgl/docs/get-started/platforms/tasmota-berry.md b/lib/lvgl/docs/get-started/platforms/tasmota-berry.md
deleted file mode 100644
index 9e74221..0000000
--- a/lib/lvgl/docs/get-started/platforms/tasmota-berry.md
+++ /dev/null
@@ -1,77 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/platforms/tasmota-berry.md
-```
-# Tasmota and berry
-
-## What is Tasmota?
-
-[Tasmota](https://github.com/arendst/Tasmota) is a widely used open-source firmware for ESP8266 and EPS32 based devices. It supports a wide variety of devices, sensors and integrations to Home Automation and Cloud services. Tasmota firmware is downloaded more than 200,000 times each month, and has an active and growing community.
-
-Tasmota provides access to hundreds of supported devices, full support of MQTT, HTTP(S), integration with major Home Automation systems, myriad of sensors, IR, RF, Zigbee, Bluetooth, AWS IoT, Azure IoT, Alexa and many more.
-
-## What is Berry?
-
-[Berry](https://github.com/berry-lang/berry) is a ultra-lightweight dynamically typed embedded scripting language. It is designed for lower-performance embedded devices. The interpreter of Berry include a one-pass compiler and register-based VM, all the code is written in ANSI C99. Berry offers a syntax very similar to Python, and is inspired from LUA VM. It is fully integrated in Tasmota
-
-### Highlights of Berry
-
-Berry has the following advantages:
-
-- Lightweight: A well-optimized interpreter with very little resources. Ideal for use in microprocessors.
-- Fast: optimized one-pass bytecode compiler and register-based virtual machine.
-- Powerful: supports imperative programming, object-oriented programming, functional programming.
-- Flexible: Berry is a dynamic type script, and it's intended for embedding in applications. It can provide good dynamic scalability for the host system.
-- Simple: simple and natural syntax, support garbage collection, and easy to use FFI (foreign function interface).
-- RAM saving: With compile-time object construction, most of the constant objects are stored in read-only code data segments, so the RAM usage of the interpreter is very low when it starts.
-
-All features are detailed in the [Berry Reference Manual](https://github.com/berry-lang/berry/wiki/Reference)
-
----
-
-## Why LVGL + Tasmota + Berry?
-
-In 2021, Tasmota added full support of LVGL for ESP32 based devices. It also introduced the Berry scripting language, a small-footprint language similar to Python and fully integrated in Tasmota.
-
-A comprehensive mapping of LVGL in Berry language is now available, similar to the mapping of Micropython. It allows to use +98% of all LVGL features. It is also possible to write custom widgets in Berry.
-
-Versions supported: LVGL v8.0.2, LodePNG v20201017, Freetype 2.10.4
-
-### Tasmota + Berry + LVGL could be used for:
-
-- Fast prototyping GUI.
-- Shortening the cycle of changing and fine-tuning the GUI.
-- Modelling the GUI in a more abstract way by defining reusable composite objects, taking advantage of Berry's language features such as Inheritance, Closures, Exception Handling...
-- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
-
-A higher level interface compatible with [OpenHASP](https://github.com/HASwitchPlate/openHASP) is also under development.
-
----
-
-## So what does it look like?
-
-> TL;DR:
-> Similar to MicroPython, it's very much like the C API, but Object-Oriented for LVGL components.
-
-Let's dive right into an example!
-
-### A simple example
-
-```python
-lv.start() # start LVGL
-scr = lv.scr_act() # get default screen
-btn = lv.btn(scr) # create button
-btn.center()
-label = lv.label(btn) # create a label in the button
-label.set_text("Button") # set a label to the button
-```
-
-## How can I use it?
-
-You can start in less than 10 minutes on a M5Stack or equivalent device in less than 10 minutes in this [short tutorial](https://tasmota.github.io/docs/LVGL_in_10_minutes/)
-
-## Where can I find more information?
-
-- [Tasmota Documentation](https://tasmota.github.io/docs/)
-- [Berry Documentation](https://github.com/berry-lang/berry/wiki/Reference)
-- [Tasmota LVGL Berry documentation](https://tasmota.github.io/docs/LVGL/)
diff --git a/lib/lvgl/docs/get-started/quick-overview.md b/lib/lvgl/docs/get-started/quick-overview.md
deleted file mode 100644
index 6d6167d..0000000
--- a/lib/lvgl/docs/get-started/quick-overview.md
+++ /dev/null
@@ -1,270 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/get-started/quick-overview.md
-```
-
-# Quick overview
-
-Here you can learn the most important things about LVGL.
-You should read this first to get a general impression and read the detailed [Porting](/porting/index) and [Overview](/overview/index) sections after that.
-
-## Get started in a simulator
-
-Instead of porting LVGL to embedded hardware straight away, it's highly recommended to get started in a simulator first.
-
-LVGL is ported to many IDEs to be sure you will find your favorite one.
-Go to the [Simulators](/get-started/pc-simulator) section to get ready-to-use projects that can be run on your PC.
-This way you can save the time of porting for now and get some experience with LVGL immediately.
-
-## Add LVGL into your project
-If you would rather try LVGL on your own project follow these steps:
-
-- [Download](https://github.com/lvgl/lvgl/archive/master.zip) or clone the library from GitHub with `git clone https://github.com/lvgl/lvgl.git`.
-- Copy the `lvgl` folder into your project.
-- Copy `lvgl/lv_conf_template.h` as `lv_conf.h` next to the `lvgl` folder, change the first `#if 0` to `1` to enable the file's content and set the `LV_COLOR_DEPTH` defines.
-- Include `lvgl/lvgl.h` in files where you need to use LVGL related functions.
-- Call `lv_tick_inc(x)` every `x` milliseconds in a Timer or Task (`x` should be between 1 and 10). It is required for the internal timing of LVGL.
-Alternatively, configure `LV_TICK_CUSTOM` (see `lv_conf.h`) so that LVGL can retrieve the current time directly.
-- Call `lv_init()`
-- Create a draw buffer: LVGL will render the graphics here first, and send the rendered image to the display.
-The buffer size can be set freely but 1/10 screen size is a good starting point.
-```c
-static lv_disp_draw_buf_t draw_buf;
-static lv_color_t buf1[DISP_HOR_RES * DISP_VER_RES / 10]; /*Declare a buffer for 1/10 screen size*/
-lv_disp_draw_buf_init(&draw_buf, buf1, NULL, MY_DISP_HOR_RES * MY_DISP_VER_SER / 10); /*Initialize the display buffer.*/
-```
-- Implement and register a function which can copy the rendered image to an area of your display:
-```c
-static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
-lv_disp_drv_init(&disp_drv); /*Basic initialization*/
-disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/
-disp_drv.draw_buf = &draw_buf; /*Assign the buffer to the display*/
-disp_drv.hor_res = MY_DISP_HOR_RES; /*Set the horizontal resolution of the display*/
-disp_drv.ver_res = MY_DISP_VER_RES; /*Set the vertical resolution of the display*/
-lv_disp_drv_register(&disp_drv); /*Finally register the driver*/
-
-void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p)
-{
- int32_t x, y;
- /*It's a very slow but simple implementation.
- *`set_pixel` needs to be written by you to a set pixel on the screen*/
- for(y = area->y1; y <= area->y2; y++) {
- for(x = area->x1; x <= area->x2; x++) {
- set_pixel(x, y, *color_p);
- color_p++;
- }
- }
-
- lv_disp_flush_ready(disp); /* Indicate you are ready with the flushing*/
-}
-
-```
-- Implement and register a function which can read an input device. E.g. for a touchpad:
-```c
-static lv_indev_drv_t indev_drv; /*Descriptor of a input device driver*/
-lv_indev_drv_init(&indev_drv); /*Basic initialization*/
-indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/
-indev_drv.read_cb = my_touchpad_read; /*Set your driver function*/
-lv_indev_drv_register(&indev_drv); /*Finally register the driver*/
-
-void my_touchpad_read(lv_indev_t * indev, lv_indev_data_t * data)
-{
- /*`touchpad_is_pressed` and `touchpad_get_xy` needs to be implemented by you*/
- if(touchpad_is_pressed()) {
- data->state = LV_INDEV_STATE_PRESSED;
- touchpad_get_xy(&data->point.x, &data->point.y);
- } else {
- data->state = LV_INDEV_STATE_RELEASED;
- }
-
-}
-```
-- Call `lv_timer_handler()` periodically every few milliseconds in the main `while(1)` loop or in an operating system task.
-It will redraw the screen if required, handle input devices, animation etc.
-
-For a more detailed guide go to the [Porting](/porting/index) section.
-
-## Learn the basics
-
-### Widgets
-
-The graphical elements like Buttons, Labels, Sliders, Charts etc. are called objects or widgets. Go to [Widgets](/widgets/index) to see the full list of available widgets.
-
-Every object has a parent object where it is created. For example, if a label is created on a button, the button is the parent of label.
-
-The child object moves with the parent and if the parent is deleted the children will be deleted too.
-
-Children can be visible only within their parent's bounding area. In other words, the parts of the children outside the parent are clipped.
-
-A Screen is the "root" parent. You can have any number of screens.
-
-To get the current screen call `lv_scr_act()`, and to load a screen use `lv_scr_load(scr1)`.
-
-You can create a new object with `lv__create(parent)`. It will return an `lv_obj_t *` variable that can be used as a reference to the object to set its parameters.
-
-For example:
-```c
-lv_obj_t * slider1 = lv_slider_create(lv_scr_act());
-```
-
-To set some basic attributes `lv_obj_set_(obj, )` functions can be used. For example:
-```c
-lv_obj_set_x(btn1, 30);
-lv_obj_set_y(btn1, 10);
-lv_obj_set_size(btn1, 200, 50);
-```
-
-Along with the basic attributes, widgets can have type specific parameters which are set by `lv__set_(obj, )` functions. For example:
-```c
-lv_slider_set_value(slider1, 70, LV_ANIM_ON);
-```
-
-To see the full API visit the documentation of the widgets or the related header file (e.g. [lvgl/src/widgets/lv_slider.h](https://github.com/lvgl/lvgl/blob/master/src/widgets/lv_slider.h)).
-
-
-
-### Events
-Events are used to inform the user that something has happened with an object.
-You can assign one or more callbacks to an object which will be called if the object is clicked, released, dragged, being deleted, etc.
-
-A callback is assigned like this:
-
-```c
-lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_CLICKED, NULL); /*Assign a callback to the button*/
-
-...
-
-void btn_event_cb(lv_event_t * e)
-{
- printf("Clicked\n");
-}
-```
-
-`LV_EVENT_ALL` can be used instead of `LV_EVENT_CLICKED` to invoke the callback for any event.
-
-From `lv_event_t * e` the current event code can be retrieved with:
-```c
-lv_event_code_t code = lv_event_get_code(e);
-```
-
-The object that triggered the event can be retrieved with:
-```c
-lv_obj_t * obj = lv_event_get_target(e);
-```
-
-To learn all features of the events go to the [Event overview](/overview/event) section.
-
-### Parts
-Widgets might be built from one or more *parts*. For example, a button has only one part called `LV_PART_MAIN`.
-However, a [Slider](/widgets/core/slider) has `LV_PART_MAIN`, `LV_PART_INDICATOR` and `LV_PART_KNOB`.
-
-By using parts you can apply different styles to sub-elements of a widget. (See below)
-
-Read the widgets' documentation to learn which parts each uses.
-
-### States
-LVGL objects can be in a combination of the following states:
-- `LV_STATE_DEFAULT` Normal, released state
-- `LV_STATE_CHECKED` Toggled or checked state
-- `LV_STATE_FOCUSED` Focused via keypad or encoder or clicked via touchpad/mouse
-- `LV_STATE_FOCUS_KEY` Focused via keypad or encoder but not via touchpad/mouse
-- `LV_STATE_EDITED` Edit by an encoder
-- `LV_STATE_HOVERED` Hovered by mouse (not supported now)
-- `LV_STATE_PRESSED` Being pressed
-- `LV_STATE_SCROLLED` Being scrolled
-- `LV_STATE_DISABLED` Disabled
-
-For example, if you press an object it will automatically go to the `LV_STATE_FOCUSED` and `LV_STATE_PRESSED` states and when you release it the `LV_STATE_PRESSED` state will be removed while focus remains active.
-
-To check if an object is in a given state use `lv_obj_has_state(obj, LV_STATE_...)`. It will return `true` if the object is currently in that state.
-
-To manually add or remove states use:
-```c
-lv_obj_add_state(obj, LV_STATE_...);
-lv_obj_clear_state(obj, LV_STATE_...);
-```
-
-### Styles
-A style instance contains properties such as background color, border width, font, etc. that describe the appearance of objects.
-
-Styles are represented with `lv_style_t` variables. Only their pointer is saved in the objects so they need to be defined as static or global.
-Before using a style it needs to be initialized with `lv_style_init(&style1)`. After that, properties can be added to configure the style. For example:
-```
-static lv_style_t style1;
-lv_style_init(&style1);
-lv_style_set_bg_color(&style1, lv_color_hex(0xa03080))
-lv_style_set_border_width(&style1, 2))
-```
-See the full list of properties [here](/overview/style.html#properties).
-
-
-Styles are assigned using the ORed combination of an object's part and state. For example to use this style on the slider's indicator when the slider is pressed:
-```c
-lv_obj_add_style(slider1, &style1, LV_PART_INDICATOR | LV_STATE_PRESSED);
-```
-
-If the *part* is `LV_PART_MAIN` it can be omitted:
-```c
-lv_obj_add_style(btn1, &style1, LV_STATE_PRESSED); /*Equal to LV_PART_MAIN | LV_STATE_PRESSED*/
-```
-
-Similarly, `LV_STATE_DEFAULT` can be omitted too:
-```c
-lv_obj_add_style(slider1, &style1, LV_PART_INDICATOR); /*Equal to LV_PART_INDICATOR | LV_STATE_DEFAULT*/
-```
-
-For `LV_STATE_DEFAULT` and `LV_PART_MAIN` simply write `0`:
-```c
-lv_obj_add_style(btn1, &style1, 0); /*Equal to LV_PART_MAIN | LV_STATE_DEFAULT*/
-```
-
-
-Styles can be cascaded (similarly to CSS). It means you can add more styles to a part of an object.
-For example `style_btn` can set a default button appearance, and `style_btn_red` can overwrite the background color to make the button red:
-```c
-lv_obj_add_style(btn1, &style_btn, 0);
-lv_obj_add_style(btn1, &style1_btn_red, 0);
-```
-
-
-If a property is not set on for the current state, the style with `LV_STATE_DEFAULT` will be used. A default value is used if the property is not defined in the default state.
-
-Some properties (typically the text-related ones) can be inherited. This means if a property is not set in an object it will be searched for in its parents too.
-For example, you can set the font once in the screen's style and all text on that screen will inherit it by default.
-
-
-Local style properties also can be added to objects. This creates a style which resides inside the object and is used only by the object:
-```c
-lv_obj_set_style_bg_color(slider1, lv_color_hex(0x2080bb), LV_PART_INDICATOR | LV_STATE_PRESSED);
-```
-
-To learn all the features of styles see the [Style overview](/overview/style) section.
-
-
-### Themes
-
-Themes are the default styles for objects. Styles from a theme are applied automatically when objects are created.
-
-The theme for your application is a compile time configuration set in `lv_conf.h`.
-
-## Examples
-
-```eval_rst
-
-.. include:: ../../examples/get_started/index.rst
-```
-
-## Micropython
-Learn more about [Micropython](/get-started/micropython).
-```python
-# Create a Button and a Label
-scr = lv.obj()
-btn = lv.btn(scr)
-btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
-label = lv.label(btn)
-label.set_text("Button")
-
-# Load the screen
-lv.scr_load(scr)
-```
-
diff --git a/lib/lvgl/docs/header.rst b/lib/lvgl/docs/header.rst
deleted file mode 100644
index 1ae003b..0000000
--- a/lib/lvgl/docs/header.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. |github_link_base| replace:: https://github.com/lvgl/lvgl/blob/8a8153219163b689e8f96d6a97c1f128eefd7ce2/docs
\ No newline at end of file
diff --git a/lib/lvgl/docs/index.md b/lib/lvgl/docs/index.md
deleted file mode 100644
index a7cb046..0000000
--- a/lib/lvgl/docs/index.md
+++ /dev/null
@@ -1,42 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/index.md
-```
-
-```eval_rst
-
-PDF version: :download:`LVGL.pdf `
-```
-
-# Welcome to the documentation of LVGL!
-
-
-
-
-
-
-
-```eval_rst
-.. toctree::
- :maxdepth: 2
-
- intro/index
- examples
- get-started/index
- porting/index
- overview/index
- widgets/index
- layouts/index
- libs/index
- others/index
- CONTRIBUTING
- CHANGELOG
- ROADMAP
-```
diff --git a/lib/lvgl/docs/intro/index.md b/lib/lvgl/docs/intro/index.md
deleted file mode 100644
index 195ab37..0000000
--- a/lib/lvgl/docs/intro/index.md
+++ /dev/null
@@ -1,219 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/intro/index.md
-```
-
-# Introduction
-
-LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create an embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.
-
-
-## Key features
-- Powerful building blocks such as buttons, charts, lists, sliders, images, etc.
-- Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
-- Various input devices such as touchpad, mouse, keyboard, encoder, etc.
-- Multi-language support with UTF-8 encoding
-- Multi-display support, i.e. use multiple TFT, monochrome displays simultaneously
-- Fully customizable graphic elements with CSS-like styles
-- Hardware independent: use with any microcontroller or display
-- Scalable: able to operate with little memory (64 kB Flash, 16 kB RAM)
-- OS, external memory and GPU are supported but not required
-- Single frame buffer operation even with advanced graphic effects
-- Written in C for maximal compatibility (C++ compatible)
-- Simulator to start embedded GUI design on a PC without embedded hardware
-- Binding to MicroPython
-- Tutorials, examples, themes for rapid GUI design
-- Documentation is available online and as PDF
-- Free and open-source under MIT license
-
-## Requirements
-Basically, every modern controller which is able to drive a display is suitable to run LVGL. The minimal requirements are:
-
- 16, 32 or 64 bit microcontroller or processor
-> 16 MHz clock speed is recommended
- Flash/ROM: > 64 kB for the very essential components (> 180 kB is recommended)
- RAM:
-
- Static RAM usage: ~2 kB depending on the used features and object types
- Stack: > 2kB (> 8 kB is recommended)
- Dynamic data (heap): > 4 KB (> 32 kB is recommended if using several objects).
- Set by LV_MEM_SIZE in lv_conf.h .
- Display buffer: > "Horizontal resolution" pixels (> 10 × "Horizontal resolution" is recommended)
- One frame buffer in the MCU or in an external display controller
-
-
- C99 or newer compiler
- Basic C (or C++) knowledge:
- pointers ,
- structs ,
- callbacks .
-
-Note that memory usage may vary depending on architecture, compiler and build options.
-
-## License
-The LVGL project (including all repositories) is licensed under [MIT license](https://github.com/lvgl/lvgl/blob/master/LICENCE.txt).
-This means you can use it even in commercial projects.
-
-It's not mandatory, but we highly appreciate it if you write a few words about your project in the [My projects](https://forum.lvgl.io/c/my-projects/10) category of the forum or a private message to [lvgl.io](https://lvgl.io/#contact).
-
-Although you can get LVGL for free there is a massive amount of work behind it. It's created by a group of volunteers who made it available for you in their free time.
-
-To make the LVGL project sustainable, please consider [contributing](/CONTRIBUTING) to the project.
-You can choose from [many different ways of contributing](/CONTRIBUTING) such as simply writing a tweet about you using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer.
-
-## Repository layout
-All repositories of the LVGL project are hosted on GitHub: https://github.com/lvgl
-
-You will find these repositories there:
-- [lvgl](https://github.com/lvgl/lvgl) The library itself with many [examples](https://github.com/lvgl/lvgl/blob/master/examples/) and [demos](https://github.com/lvgl/lvgl/blob/master/demos/).
-- [lv_drivers](https://github.com/lvgl/lv_drivers) Display and input device drivers
-- [blog](https://github.com/lvgl/blog) Source of the blog's site (https://blog.lvgl.io)
-- [sim](https://github.com/lvgl/sim) Source of the online simulator's site (https://sim.lvgl.io)
-- [lv_port_...](https://github.com/lvgl?q=lv_port&type=&language=) LVGL ports to development boards or environments
-- [lv_binding_..](https://github.com/lvgl?q=lv_binding&type=&language=l) Bindings to other languages
-
-## Release policy
-
-The core repositories follow the rules of [Semantic versioning](https://semver.org/):
-- Major versions for incompatible API changes. E.g. v5.0.0, v6.0.0
-- Minor version for new but backward-compatible functionalities. E.g. v6.1.0, v6.2.0
-- Patch version for backward-compatible bug fixes. E.g. v6.1.1, v6.1.2
-
-Tags like `vX.Y.Z` are created for every release.
-
-### Release cycle
-- Bug fixes: Released on demand even weekly
-- Minor releases: Every 3-4 months
-- Major releases: Approximately yearly
-
-### Branches
-The core repositories have at least the following branches:
-- `master` latest version, patches are merged directly here.
-- `release/vX.Y` stable versions of the minor releases
-- `fix/some-description` temporary branches for bug fixes
-- `feat/some-description` temporary branches for features
-
-
-### Changelog
-
-The changes are recorded in [CHANGELOG.md](/CHANGELOG).
-
-### Version support
-Before v8 the last minor release of each major series was supported for 1 year.
-Starting from v8, every minor release is supported for 1 year.
-
-| Version | Release date | Support end | Active |
-|---------|--------------|-------------|--------|
-| v5.3 | Feb 1, 2019 |Feb 1, 2020 | No |
-| v6.1 | Nov 26, 2019 |Nov 26, 2020 | No |
-| v7.11 | Mar 16, 2021 |Mar 16, 2022 | No |
-| v8.0 | 1 Jun, 2021 |1 Jun, 2022 | Yes |
-| v8.1 | 10 Nov, 2021 |10 Nov, 2022 | Yes |
-| v8.2 | In progress | | |
-
-
-## FAQ
-
-### Where can I ask questions?
-You can ask questions in the forum: [https://forum.lvgl.io/](https://forum.lvgl.io/).
-
-We use [GitHub issues](https://github.com/lvgl/lvgl/issues) for development related discussion.
-You should use them only if your question or issue is tightly related to the development of the library.
-
-Before posting a question, please ready this FAQ section as you might find answer to your issue here too.
-
-### Is my MCU/hardware supported?
-Every MCU which is capable of driving a display via parallel port, SPI, RGB interface or anything else and fulfills the [Requirements](#requirements) is supported by LVGL.
-
-This includes:
-- "Common" MCUs like STM32F, STM32H, NXP Kinetis, LPC, iMX, dsPIC33, PIC32 etc.
-- Bluetooth, GSM, Wi-Fi modules like Nordic NRF and Espressif ESP32
-- Linux with frame buffer device such as /dev/fb0. This includes Single-board computers like the Raspberry Pi
-- Anything else with a strong enough MCU and a peripheral to drive a display
-
-### Is my display supported?
-LVGL needs just one simple driver function to copy an array of pixels into a given area of the display.
-If you can do this with your display then you can use it with LVGL.
-
-Some examples of the supported display types:
-- TFTs with 16 or 24 bit color depth
-- Monitors with an HDMI port
-- Small monochrome displays
-- Gray-scale displays
-- even LED matrices
-- or any other display where you can control the color/state of the pixels
-
-See the [Porting](/porting/display) section to learn more.
-
-### LVGL doesn't start, randomly crashes or nothing is drawn on the display. What can be the problem?
-- Try increasing `LV_MEM_SIZE`.
-- Be sure `lv_disp_drv_t`, `lv_indev_drv_t` and `lv_fs_drv_t` are global or `static`.
-- Be sure your display works without LVGL. E.g. paint it to red on start up.
-- Enable [Logging](porting/log)
-- Enable asserts in `lv_conf.h` (`LV_USE_ASSERT_...`)
-- If you use an RTOS
- - increase the stack size of the task which calls `lv_timer_handler()`
- - Be sure you used a mutex as [described here](/porting/os)
-
-### My display driver is not called. What have I missed?
-Be sure you are calling `lv_tick_inc(x)` in an interrupt and `lv_timer_handler()` in your main `while(1)`.
-
-Learn more in the [Tick](/porting/tick) and [Timer handler](/porting/timer-handler) sections.
-
-### Why is the display driver called only once? Only the upper part of the display is refreshed.
-Be sure you are calling `lv_disp_flush_ready(drv)` at the end of your "*display flush callback*".
-
-### Why do I see only garbage on the screen?
-Probably there a bug in your display driver. Try the following code without using LVGL. You should see a square with red-blue gradient.
-
-```c
-#define BUF_W 20
-#define BUF_H 10
-
-lv_color_t buf[BUF_W * BUF_H];
-lv_color_t * buf_p = buf;
-uint16_t x, y;
-for(y = 0; y < BUF_H; y++) {
- lv_color_t c = lv_color_mix(LV_COLOR_BLUE, LV_COLOR_RED, (y * 255) / BUF_H);
- for(x = 0; x < BUF_W; x++){
- (*buf_p) = c;
- buf_p++;
- }
-}
-
-lv_area_t a;
-a.x1 = 10;
-a.y1 = 40;
-a.x2 = a.x1 + BUF_W - 1;
-a.y2 = a.y1 + BUF_H - 1;
-my_flush_cb(NULL, &a, buf);
-```
-
-### Why do I see nonsense colors on the screen?
-Probably LVGL's color format is not compatible with your display's color format. Check `LV_COLOR_DEPTH` in *lv_conf.h*.
-
-If you are using 16-bit colors with SPI (or another byte-oriented interface) you probably need to set `LV_COLOR_16_SWAP 1` in *lv_conf.h*.
-It swaps the upper and lower bytes of the pixels.
-
-### How to speed up my UI?
-- Turn on compiler optimization and enable cache if your MCU has it
-- Increase the size of the display buffer
-- Use two display buffers and flush the buffer with DMA (or similar peripheral) in the background
-- Increase the clock speed of the SPI or parallel port if you use them to drive the display
-- If your display has an SPI port consider changing to a model with a parallel interface because it has much higher throughput
-- Keep the display buffer in internal RAM (not in external SRAM) because LVGL uses it a lot and it should have a fast access time
-
-### How to reduce flash/ROM usage?
-You can disable all the unused features (such as animations, file system, GPU etc.) and object types in *lv_conf.h*.
-
-If you are using GCC you can add `-fdata-sections -ffunction-sections` compiler flags and `--gc-sections` linker flag to remove unused functions and variables from the final binary.
-
-### How to reduce the RAM usage
-- Lower the size of the *Display buffer*
-- Reduce `LV_MEM_SIZE` in *lv_conf.h*. This memory is used when you create objects like buttons, labels, etc.
-- To work with lower `LV_MEM_SIZE` you can create objects only when required and delete them when they are not needed anymore
-
-### How to work with an operating system?
-
-To work with an operating system where tasks can interrupt each other (preemptively) you should protect LVGL related function calls with a mutex.
-See the [Operating system and interrupts](/porting/os) section to learn more.
diff --git a/lib/lvgl/docs/layouts/flex.md b/lib/lvgl/docs/layouts/flex.md
deleted file mode 100644
index 22ef804..0000000
--- a/lib/lvgl/docs/layouts/flex.md
+++ /dev/null
@@ -1,123 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/layouts/flex.md
-```
-
-# Flex
-
-## Overview
-
-The Flexbox (or Flex for short) is a subset of [CSS Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/).
-
-It can arrange items into rows or columns (tracks), handle wrapping, adjust the spacing between the items and tracks, handle *grow* to make the item(s) fill the remaining space with respect to min/max width and height.
-
-To make an object flex container call `lv_obj_set_layout(obj, LV_LAYOUT_FLEX)`.
-
-Note that the flex layout feature of LVGL needs to be globally enabled with `LV_USE_FLEX` in `lv_conf.h`.
-
-## Terms
-- tracks: the rows or columns
-- main direction: row or column, the direction in which the items are placed
-- cross direction: perpendicular to the main direction
-- wrap: if there is no more space in the track a new track is started
-- grow: if set on an item it will grow to fill the remaining space on the track.
-The available space will be distributed among items respective to their grow value (larger value means more space)
-- gap: the space between the rows and columns or the items on a track
-
-## Simple interface
-
-With the following functions you can set a Flex layout on any parent.
-
-### Flex flow
-
-`lv_obj_set_flex_flow(obj, flex_flow)`
-
-The possible values for `flex_flow` are:
-- `LV_FLEX_FLOW_ROW` Place the children in a row without wrapping
-- `LV_FLEX_FLOW_COLUMN` Place the children in a column without wrapping
-- `LV_FLEX_FLOW_ROW_WRAP` Place the children in a row with wrapping
-- `LV_FLEX_FLOW_COLUMN_WRAP` Place the children in a column with wrapping
-- `LV_FLEX_FLOW_ROW_REVERSE` Place the children in a row without wrapping but in reversed order
-- `LV_FLEX_FLOW_COLUMN_REVERSE` Place the children in a column without wrapping but in reversed order
-- `LV_FLEX_FLOW_ROW_WRAP_REVERSE` Place the children in a row with wrapping but in reversed order
-- `LV_FLEX_FLOW_COLUMN_WRAP_REVERSE` Place the children in a column with wrapping but in reversed order
-
-### Flex align
-To manage the placement of the children use `lv_obj_set_flex_align(obj, main_place, cross_place, track_cross_place)`
-
-- `main_place` determines how to distribute the items in their track on the main axis. E.g. flush the items to the right on `LV_FLEX_FLOW_ROW_WRAP`. (It's called `justify-content` in CSS)
-- `cross_place` determines how to distribute the items in their track on the cross axis. E.g. if the items have different height place them to the bottom of the track. (It's called `align-items` in CSS)
-- `track_cross_place` determines how to distribute the tracks (It's called `align-content` in CSS)
-
-The possible values are:
-- `LV_FLEX_ALIGN_START` means left on a horizontally and top vertically. (default)
-- `LV_FLEX_ALIGN_END` means right on a horizontally and bottom vertically
-- `LV_FLEX_ALIGN_CENTER` simply center
-- `LV_FLEX_ALIGN_SPACE_EVENLY` items are distributed so that the spacing between any two items (and the space to the edges) is equal. Does not apply to `track_cross_place`.
-- `LV_FLEX_ALIGN_SPACE_AROUND` items are evenly distributed in the track with equal space around them.
-Note that visually the spaces aren’t equal, since all the items have equal space on both sides.
-The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Not applies to `track_cross_place`.
-- `LV_FLEX_ALIGN_SPACE_BETWEEN` items are evenly distributed in the track: first item is on the start line, last item on the end line. Not applies to `track_cross_place`.
-
-
-### Flex grow
-
-Flex grow can be used to make one or more children fill the available space on the track. When more children have grow parameters, the available space will be distributed proportionally to the grow values.
-For example, there is 400 px remaining space and 4 objects with grow:
-- `A` with grow = 1
-- `B` with grow = 1
-- `C` with grow = 2
-
-`A` and `B` will have 100 px size, and `C` will have 200 px size.
-
-Flex grow can be set on a child with `lv_obj_set_flex_grow(child, value)`. `value` needs to be > 1 or 0 to disable grow on the child.
-
-
-## Style interface
-
-All the Flex-related values are style properties under the hood and you can use them similarly to any other style property. The following flex related style properties exist:
-
-- `FLEX_FLOW`
-- `FLEX_MAIN_PLACE`
-- `FLEX_CROSS_PLACE`
-- `FLEX_TRACK_PLACE`
-- `FLEX_GROW`
-
-### Internal padding
-
-To modify the minimum space flexbox inserts between objects, the following properties can be set on the flex container style:
-
-- `pad_row` Sets the padding between the rows.
-
-- `pad_column` Sets the padding between the columns.
-
-These can for example be used if you don't want any padding between your objects: `lv_style_set_pad_column(&row_container_style,0)`
-
-## Other features
-
-### RTL
-If the base direction of the container is set the `LV_BASE_DIR_RTL` the meaning of `LV_FLEX_ALIGN_START` and `LV_FLEX_ALIGN_END` is swapped on `ROW` layouts. I.e. `START` will mean right.
-
-The items on `ROW` layouts, and tracks of `COLUMN` layouts will be placed from right to left.
-
-### New track
-
-You can force Flex to put an item into a new line with `lv_obj_add_flag(child, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK)`.
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/layouts/flex/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_flex.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/layouts/grid.md b/lib/lvgl/docs/layouts/grid.md
deleted file mode 100644
index 631777d..0000000
--- a/lib/lvgl/docs/layouts/grid.md
+++ /dev/null
@@ -1,117 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/layouts/grid.md
-```
-
-# Grid
-
-## Overview
-
-The Grid layout is a subset of [CSS Flexbox](https://css-tricks.com/snippets/css/complete-guide-grid/).
-
-It can arrange items into a 2D "table" that has rows or columns (tracks). The item can span through multiple columns or rows.
-The track's size can be set in pixel, to the largest item (`LV_GRID_CONTENT`) or in "Free unit" (FR) to distribute the free space proportionally.
-
-To make an object a grid container call `lv_obj_set_layout(obj, LV_LAYOUT_GRID)`.
-
-Note that the grid layout feature of LVGL needs to be globally enabled with `LV_USE_GRID` in `lv_conf.h`.
-
-## Terms
-- tracks: the rows or columns
-- free unit (FR): if set on track's size is set in `FR` it will grow to fill the remaining space on the parent.
-- gap: the space between the rows and columns or the items on a track
-
-## Simple interface
-
-With the following functions you can easily set a Grid layout on any parent.
-
-### Grid descriptors
-
-First you need to describe the size of rows and columns. It can be done by declaring 2 arrays and the track sizes in them. The last element must be `LV_GRID_TEMPLATE_LAST`.
-
-For example:
-```
-static lv_coord_t column_dsc[] = {100, 400, LV_GRID_TEMPLATE_LAST}; /*2 columns with 100 and 400 ps width*/
-static lv_coord_t row_dsc[] = {100, 100, 100, LV_GRID_TEMPLATE_LAST}; /*3 100 px tall rows*/
-```
-
-To set the descriptors on a parent use `lv_obj_set_grid_dsc_array(obj, col_dsc, row_dsc)`.
-
-Besides simple settings the size in pixel you can use two special values:
-- `LV_GRID_CONTENT` set the width to the largest children on this track
-- `LV_GRID_FR(X)` tell what portion of the remaining space should be used by this track. Larger value means larger space.
-
-### Grid items
-By default, the children are not added to the grid. They need to be added manually to a cell.
-
-To do this call `lv_obj_set_grid_cell(child, column_align, column_pos, column_span, row_align, row_pos, row_span)`.
-
-`column_align` and `row_align` determine how to align the children in its cell. The possible values are:
-- `LV_GRID_ALIGN_START` means left on a horizontally and top vertically. (default)
-- `LV_GRID_ALIGN_END` means right on a horizontally and bottom vertically
-- `LV_GRID_ALIGN_CENTER` simply center
-
-`colum_pos` and `row_pos` means the zero based index of the cell into the item should be placed.
-
-`colum_span` and `row_span` means how many tracks should the item involve from the start cell. Must be > 1.
-
-### Grid align
-
-If there are some empty space the track can be aligned several ways:
-- `LV_GRID_ALIGN_START` means left on a horizontally and top vertically. (default)
-- `LV_GRID_ALIGN_END` means right on a horizontally and bottom vertically
-- `LV_GRID_ALIGN_CENTER` simply center
-- `LV_GRID_ALIGN_SPACE_EVENLY` items are distributed so that the spacing between any two items (and the space to the edges) is equal. Not applies to `track_cross_place`.
-- `LV_GRID_ALIGN_SPACE_AROUND` items are evenly distributed in the track with equal space around them.
-Note that visually the spaces aren’t equal, since all the items have equal space on both sides.
-The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Not applies to `track_cross_place`.
-- `LV_GRID_ALIGN_SPACE_BETWEEN` items are evenly distributed in the track: first item is on the start line, last item on the end line. Not applies to `track_cross_place`.
-
-To set the track's alignment use `lv_obj_set_grid_align(obj, column_align, row_align)`.
-
-## Style interface
-
-All the Grid related values are style properties under the hood and you can use them similarly to any other style properties. The following Grid related style properties exist:
-
-- `GRID_COLUMN_DSC_ARRAY`
-- `GRID_ROW_DSC_ARRAY`
-- `GRID_COLUMN_ALIGN`
-- `GRID_ROW_ALIGN`
-- `GRID_CELL_X_ALIGN`
-- `GRID_CELL_COLUMN_POS`
-- `GRID_CELL_COLUMN_SPAN`
-- `GRID_CELL_Y_ALIGN`
-- `GRID_CELL_ROW_POS`
-- `GRID_CELL_ROW_SPAN`
-
-### Internal padding
-
-To modify the minimum space Grid inserts between objects, the following properties can be set on the Grid container style:
-
-- `pad_row` Sets the padding between the rows.
-- `pad_column` Sets the padding between the columns.
-
-## Other features
-
-### RTL
-If the base direction of the container is set to `LV_BASE_DIR_RTL`, the meaning of `LV_GRID_ALIGN_START` and `LV_GRID_ALIGN_END` is swapped. I.e. `START` will mean right-most.
-
-The columns will be placed from right to left.
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/layouts/grid/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_grid.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/layouts/index.md b/lib/lvgl/docs/layouts/index.md
deleted file mode 100644
index da1606d..0000000
--- a/lib/lvgl/docs/layouts/index.md
+++ /dev/null
@@ -1,15 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/layouts/index.md
-```
-
-# Layouts
-
-
-```eval_rst
-.. toctree::
- :maxdepth: 2
-
- flex
- grid
-```
diff --git a/lib/lvgl/docs/libs/bmp.md b/lib/lvgl/docs/libs/bmp.md
deleted file mode 100644
index 2fe6d20..0000000
--- a/lib/lvgl/docs/libs/bmp.md
+++ /dev/null
@@ -1,42 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/bmp.md
-```
-
-# BMP decoder
-
-This extension allows the use of BMP images in LVGL.
-This implementation uses [bmp-decoder](https://github.com/caj-johnson/bmp-decoder) library.
-The pixels are read on demand (not the whole image is loaded) so using BMP images requires very little RAM.
-
-If enabled in `lv_conf.h` by `LV_USE_BMP` LVGL will register a new image decoder automatically so BMP files can be directly used as image sources. For example:
-```
-lv_img_set_src(my_img, "S:path/to/picture.bmp");
-```
-
-Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
-
-## Limitations
-- Only BMP files are supported and BMP images as C array (`lv_img_dsc_t`) are not. It's because there is no practical differences between how the BMP files and LVGL's image format stores the image data.
-- BMP files can be loaded only from file. If you want to store them in flash it's better to convert them to C array with [LVGL's image converter](https://lvgl.io/tools/imageconverter).
-- The BMP files color format needs to match with `LV_COLOR_DEPTH`. Use GIMP to save the image in the required format.
- Both RGB888 and ARGB888 works with `LV_COLOR_DEPTH 32`
-- Palette is not supported.
-- Because not the whole image is read in can not be zoomed or rotated.
-
-
-## Example
-```eval_rst
-
-.. include:: ../../examples/libs/bmp/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_bmp.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/libs/ffmpeg.md b/lib/lvgl/docs/libs/ffmpeg.md
deleted file mode 100644
index f32ab75..0000000
--- a/lib/lvgl/docs/libs/ffmpeg.md
+++ /dev/null
@@ -1,41 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/ffmpeg.md
-```
-
-# FFmpeg support
-[FFmpeg](https://www.ffmpeg.org/) A complete, cross-platform solution to record, convert and stream audio and video.
-
-## Install FFmpeg
-- Download FFmpeg from [here](https://www.ffmpeg.org/download.html)
-- `./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib`
-- `make`
-- `sudo make install`
-
-## Add FFmpeg to your project
-- Add library: `FFmpeg` (for GCC: `-lavformat -lavcodec -lavutil -lswscale -lm -lz -lpthread`)
-
-## Usage
-
-Enable `LV_USE_FFMPEG` in `lv_conf.h`.
-
-See the examples below.
-
-Note that, the FFmpeg extension doesn't use LVGL's file system.
-You can simply pass the path to the image or video as usual on your operating system or platform.
-
-## Example
-```eval_rst
-
-.. include:: ../../examples/libs/ffmpeg/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_ffmpeg.h
- :project: lvgl
-
-```
\ No newline at end of file
diff --git a/lib/lvgl/docs/libs/freetype.md b/lib/lvgl/docs/libs/freetype.md
deleted file mode 100644
index fcdc37d..0000000
--- a/lib/lvgl/docs/libs/freetype.md
+++ /dev/null
@@ -1,55 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/freetype.md
-```
-
-# FreeType support
-Interface to [FreeType](https://www.freetype.org/) to generate font bitmaps run time.
-
-## Install FreeType
-- Download Freetype from [here](https://sourceforge.net/projects/freetype/files/)
-- `make`
-- `sudo make install`
-
-## Add FreeType to your project
-- Add include path: `/usr/include/freetype2` (for GCC: `-I/usr/include/freetype2 -L/usr/local/lib`)
-- Add library: `freetype` (for GCC: `-L/usr/local/lib -lfreetype`)
-
-## Usage
-Enable `LV_USE_FREETYPE` in `lv_conf.h`.
-
-To cache the glyphs from the opened fonts, set `LV_FREETYPE_CACHE_SIZE >= 0` and then use the following macros for detailed configuration:
-1. `LV_FREETYPE_CACHE_SIZE`:maximum memory(bytes) used to cache font bitmap, outline, character maps, etc. 0 means use the system default value, less than 0 means disable cache. Note: that this value does not account for managed FT_Face and FT_Size objects.
-1. `LV_FREETYPE_CACHE_FT_FACES`:maximum number of opened FT_Face objects managed by this cache instance.0 means use the system default value. Only useful when LV_FREETYPE_CACHE_SIZE >= 0.
-1. `LV_FREETYPE_CACHE_FT_SIZES`:maximum number of opened FT_Size objects managed by this cache instance. 0 means use the system default value. Only useful when LV_FREETYPE_CACHE_SIZE >= 0.
-
-When you are sure that all the used font sizes will not be greater than 256, you can enable `LV_FREETYPE_SBIT_CACHE`, which is much more memory efficient for small bitmaps.
-
-You can use `lv_ft_font_init()` to create FreeType fonts. It returns `true` to indicate success, at the same time, the `font` member of `lv_ft_info_t` will be filled with a pointer to an LVGL font, and you can use it like any LVGL font.
-
-Font style supports bold and italic, you can use the following macros to set:
-1. `FT_FONT_STYLE_NORMAL`:default style.
-1. `FT_FONT_STYLE_ITALIC`:Italic style
-1. `FT_FONT_STYLE_BOLD`:bold style
-
-They can be combined.eg:`FT_FONT_STYLE_BOLD | FT_FONT_STYLE_ITALIC`.
-
-Note that, the FreeType extension doesn't use LVGL's file system.
-You can simply pass the path to the font as usual on your operating system or platform.
-
-## Example
-```eval_rst
-.. include:: ../../examples/libs/freetype/index.rst
-```
-
-
-## Learn more
-- FreeType [tutorial](https://www.freetype.org/freetype2/docs/tutorial/step1.html)
-- LVGL's [font interface](https://docs.lvgl.io/v7/en/html/overview/font.html#add-a-new-font-engine)
-
-
-## API
-```eval_rst
-.. doxygenfile:: lv_freetype.h
- :project: lvgl
-```
\ No newline at end of file
diff --git a/lib/lvgl/docs/libs/fsdrv.md b/lib/lvgl/docs/libs/fsdrv.md
deleted file mode 100644
index 136b57b..0000000
--- a/lib/lvgl/docs/libs/fsdrv.md
+++ /dev/null
@@ -1,25 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/fsdrv.md
-```
-
-# File System Interfaces
-
-LVGL has a [File system](https://docs.lvgl.io/master/overview/file-system.html) module to provide an abstraction layer for various file system drivers.
-
-LVG has built in support for:
-- [FATFS](http://elm-chan.org/fsw/ff/00index_e.html)
-- STDIO (Linux and Windows using C standard function .e.g fopen, fread)
-- POSIX (Linux and Windows using POSIX function .e.g open, read)
-- WIN32 (Windows using Win32 API function .e.g CreateFileA, ReadFile)
-
-You still need to provide the drivers and libraries, this extension provides only the bridge between FATFS, STDIO, POSIX, WIN32 and LVGL.
-
-## Usage
-
-In `lv_conf.h` enable `LV_USE_FS_...` and assign an upper cased letter to `LV_FS_..._LETTER` (e.g. `'S'`).
-After that you can access files using that driver letter. E.g. `"S:path/to/file.txt"`.
-
-The work directory can be set with `LV_FS_..._PATH`. E.g. `"/home/joe/projects/"` The actual file/directory paths will be appended to it.
-
-Cached reading is also supported if `LV_FS_..._CACHE_SIZE` is set to not `0` value. `lv_fs_read` caches this size of data to lower the number of actual reads from the storage.
diff --git a/lib/lvgl/docs/libs/gif.md b/lib/lvgl/docs/libs/gif.md
deleted file mode 100644
index 43294e6..0000000
--- a/lib/lvgl/docs/libs/gif.md
+++ /dev/null
@@ -1,43 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/gif.md
-```
-
-# GIF decoder
-Allow using GIF images in LVGL. Based on https://github.com/lecram/gifdec
-
-When enabled in `lv_conf.h` with `LV_USE_GIF` `lv_gif_create(parent)` can be used to create a gif widget.
-
-`lv_gif_set_src(obj, src)` works very similarly to `lv_img_set_src`. As source, it also accepts images as variables (`lv_img_dsc_t`) or files.
-
-
-## Convert GIF files to C array
-To convert a GIF file to byte values array use [LVGL's online converter](https://lvgl.io/tools/imageconverter). Select "Raw" color format and "C array" Output format.
-
-
-## Use GIF images from file
-For example:
-```c
-lv_gif_set_src(obj, "S:path/to/example.gif");
-```
-
-Note that, a file system driver needs to be registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
-
-
-## Memory requirements
-To decode and display a GIF animation the following amount of RAM is required:
-- `LV_COLOR_DEPTH 8`: 3 x image width x image height
-- `LV_COLOR_DEPTH 16`: 4 x image width x image height
-- `LV_COLOR_DEPTH 32`: 5 x image width x image height
-
-## Example
-```eval_rst
-.. include:: ../../examples/libs/gif/index.rst
-```
-
-## API
-
-```eval_rst
-.. doxygenfile:: lv_gif.h
- :project: lvgl
-```
\ No newline at end of file
diff --git a/lib/lvgl/docs/libs/index.md b/lib/lvgl/docs/libs/index.md
deleted file mode 100644
index ae7dac5..0000000
--- a/lib/lvgl/docs/libs/index.md
+++ /dev/null
@@ -1,23 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/index.md
-```
-# 3rd party libraries
-
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 1
-
- fsdrv
- bmp
- sjpg
- png
- gif
- freetype
- qrcode
- rlottie
- ffmpeg
-```
-
diff --git a/lib/lvgl/docs/libs/png.md b/lib/lvgl/docs/libs/png.md
deleted file mode 100644
index 3066080..0000000
--- a/lib/lvgl/docs/libs/png.md
+++ /dev/null
@@ -1,31 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/png.md
-```
-
-# PNG decoder
-
-Allow the use of PNG images in LVGL. This implementation uses [lodepng](https://github.com/lvandeve/lodepng) library.
-
-If enabled in `lv_conf.h` by `LV_USE_PNG` LVGL will register a new image decoder automatically so PNG files can be directly used as any other image sources.
-
-Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
-
-The whole PNG image is decoded so during decoding RAM equals to `image width x image height x 4` bytes are required.
-
-As it might take significant time to decode PNG images LVGL's [images caching](https://docs.lvgl.io/master/overview/image.html#image-caching) feature can be useful.
-
-## Example
-```eval_rst
-
-.. include:: ../../examples/libs/png/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_png.h
- :project: lvgl
-
diff --git a/lib/lvgl/docs/libs/qrcode.md b/lib/lvgl/docs/libs/qrcode.md
deleted file mode 100644
index 774538c..0000000
--- a/lib/lvgl/docs/libs/qrcode.md
+++ /dev/null
@@ -1,42 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/qrcode.md
-```
-
-# QR code
-
-QR code generation with LVGL. Uses [QR-Code-generator](https://github.com/nayuki/QR-Code-generator) by [nayuki](https://github.com/nayuki).
-
-## Get started
-- Download or clone this repository
- - [Download](https://github.com/lvgl/lv_lib_qrcode.git) from GitHub
- - Clone: git clone https://github.com/lvgl/lv_lib_qrcode.git
-- Include the library: `#include "lv_lib_qrcode/lv_qrcode.h"`
-- Test with the following code:
-```c
-const char * data = "Hello world";
-
-/*Create a 100x100 QR code*/
-lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 100, lv_color_hex3(0x33f), lv_color_hex3(0xeef));
-
-/*Set data*/
-lv_qrcode_update(qr, data, strlen(data));
-```
-
-## Notes
-- QR codes with less data are smaller, but they scaled by an integer number to best fit to the given size.
-
-
-## Example
-```eval_rst
-
-.. include:: ../../examples/libs/qrcode/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_qrcode.h
- :project: lvgl
diff --git a/lib/lvgl/docs/libs/rlottie.md b/lib/lvgl/docs/libs/rlottie.md
deleted file mode 100644
index 4dc1a44..0000000
--- a/lib/lvgl/docs/libs/rlottie.md
+++ /dev/null
@@ -1,110 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/rlottie.md
-```
-
-
-# Lottie player
-Allows to use Lottie animations in LVGL. Taken from this [base repository](https://github.com/ValentiWorkLearning/lv_rlottie)
-
-LVGL provides the interface to [Samsung/rlottie](https://github.com/Samsung/rlottie) library's C API. That is the actual Lottie player is not part of LVGL, it needs to be built separately.
-
-## Build Rlottie
-To build Samsung's Rlottie C++14-compatible compiler and optionally CMake 3.14 or higher is required.
-
-To build on desktop you can follow the instructions from Rlottie's [README](https://github.com/Samsung/rlottie/blob/master/README.md). In the most basic case it looks like this:
-```
-mkdir rlottie_workdir
-cd rlottie_workdir
-git clone https://github.com/Samsung/rlottie.git
-mkdir build
-cd build
-cmake ../rlottie
-make -j
-sudo make install
-```
-
-And finally add the `-lrlottie` flag to your linker.
-
-On embedded systems you need to take care of integrating Rlottie to the given build system.
-
-
-## Usage
-
-You can use animation from files or raw data (text). In either case first you need to enable `LV_USE_RLOTTIE` in `lv_conf.h`.
-
-
-The `width` and `height` of the object be set in the *create* function and the animation will be scaled accordingly.
-
-### Use Rlottie from file
-
-To create a Lottie animation from file use:
-```c
- lv_obj_t * lottie = lv_rlottie_create_from_file(parent, width, height, "path/to/lottie.json");
-```
-
-Note that, Rlottie uses the standard STDIO C file API, so you can use the path "normally" and no LVGL specific driver letter is required.
-
-
-### Use Rlottie from raw string data
-
-`lv_example_rlottie_approve.c` contains an example animation in raw format. Instead storing the JSON string a hex array is stored for the following reasons:
-- avoid escaping `"` in the JSON file
-- some compilers don't support very long strings
-
-`lvgl/scripts/filetohex.py` can be used to convert a Lottie file a hex array. E.g.:
-```
-./filetohex.py path/to/lottie.json > out.txt
-```
-
-To create an animation from raw data:
-
-```c
-extern const uint8_t lottie_data[];
-lv_obj_t* lottie = lv_rlottie_create_from_raw(parent, width, height, (const char *)lottie_data);
-```
-
-## Getting animations
-
-Lottie is standard and popular format so you can find many animation files on the web.
-For example: https://lottiefiles.com/
-
-You can also create your own animations with Adobe After Effects or similar software.
-
-## Controlling animations
-
-LVGL provides two functions to control the animation mode: `lv_rlottie_set_play_mode` and `lv_rlottie_set_current_frame`.
-You'll combine your intentions when calling the first method, like in these examples:
-```c
-lv_obj_t * lottie = lv_rlottie_create_from_file(scr, 128, 128, "test.json");
-lv_obj_center(lottie);
-// Pause to a specific frame
-lv_rlottie_set_current_frame(lottie, 50);
-lv_rlottie_set_play_mode(lottie, LV_RLOTTIE_CTRL_PAUSE); // The specified frame will be displayed and then the animation will pause
-
-// Play backward and loop
-lv_rlottie_set_play_mode(lottie, LV_RLOTTIE_CTRL_PLAY | LV_RLOTTIE_CTRL_BACKWARD | LV_RLOTTIE_CTRL_LOOP);
-
-// Play forward once (no looping)
-lv_rlottie_set_play_mode(lottie, LV_RLOTTIE_CTRL_PLAY | LV_RLOTTIE_CTRL_FORWARD);
-```
-
-The default animation mode is **play forward with loop**.
-
-If you don't enable looping, a `LV_EVENT_READY` is sent when the animation can not make more progress without looping.
-
-To get the number of frames in an animation or the current frame index, you can cast the `lv_obj_t` instance to a `lv_rlottie_t` instance and inspect the `current_frame` and `total_frames` members.
-
-## Example
-```eval_rst
-
-.. include:: ../../examples/libs/rlottie/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_rlottie.h
- :project: lvgl
diff --git a/lib/lvgl/docs/libs/sjpg.md b/lib/lvgl/docs/libs/sjpg.md
deleted file mode 100644
index 055e632..0000000
--- a/lib/lvgl/docs/libs/sjpg.md
+++ /dev/null
@@ -1,77 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/libs/sjpg.md
-```
-
-# JPG decoder
-
-Allow the use of JPG images in LVGL. Besides that it also allows the use of a custom format, called Split JPG (SJPG), which can be decoded in more optimal way on embedded systems.
-
-## Overview
- - Supports both normal JPG and the custom SJPG formats.
- - Decoding normal JPG consumes RAM with the size fo the whole uncompressed image (recommended only for devices with more RAM)
- - SJPG is a custom format based on "normal" JPG and specially made for LVGL.
- - SJPG is 'split-jpeg' which is a bundle of small jpeg fragments with an sjpg header.
- - SJPG size will be almost comparable to the jpg file or might be a slightly larger.
- - File read from file and c-array are implemented.
- - SJPEG frame fragment cache enables fast fetching of lines if available in cache.
- - By default the sjpg image cache will be image width * 2 * 16 bytes (can be modified)
- - Currently only 16 bit image format is supported (TODO)
- - Only the required partion of the JPG and SJPG images are decoded, therefore they can't be zoomed or rotated.
-
-## Usage
-
-If enabled in `lv_conf.h` by `LV_USE_SJPG` LVGL will register a new image decoder automatically so JPG and SJPG files can be directly used as image sources. For example:
-```
-lv_img_set_src(my_img, "S:path/to/picture.jpg");
-```
-
-Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...`
-
-
-
-## Converter
-
-### Converting JPG to C array
- - Use lvgl online tool https://lvgl.io/tools/imageconverter
- - Color format = RAW, output format = C Array
-
-### Converting JPG to SJPG
-python3 and the PIL library required. (PIL can be installed with `pip3 install pillow`)
-
-To create SJPG from JPG:
-- Copy the image to convert into `lvgl/scripts`
-- `cd lvgl/scripts`
-- `python3 jpg_to_sjpg.py image_to_convert.jpg`. It creates both a C files and an SJPG image.
-
-The expected result is:
-```sh
-Conversion started...
-
-Input:
- image_to_convert.jpg
- RES = 640 x 480
-
-Output:
- Time taken = 1.66 sec
- bin size = 77.1 KB
- walpaper.sjpg (bin file)
- walpaper.c (c array)
-
-All good!
-```
-
-
-## Example
-```eval_rst
-
-.. include:: ../../examples/libs/sjpg/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_sjpg.h
- :project: lvgl
diff --git a/lib/lvgl/docs/logo_lvgl.png b/lib/lvgl/docs/logo_lvgl.png
deleted file mode 100644
index 26e5a48..0000000
Binary files a/lib/lvgl/docs/logo_lvgl.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/align.png b/lib/lvgl/docs/misc/align.png
deleted file mode 100644
index ebf0c4e..0000000
Binary files a/lib/lvgl/docs/misc/align.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/anim-timeline.png b/lib/lvgl/docs/misc/anim-timeline.png
deleted file mode 100644
index b8c030b..0000000
Binary files a/lib/lvgl/docs/misc/anim-timeline.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/bidi.png b/lib/lvgl/docs/misc/bidi.png
deleted file mode 100644
index 4315902..0000000
Binary files a/lib/lvgl/docs/misc/bidi.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/boxmodel.png b/lib/lvgl/docs/misc/boxmodel.png
deleted file mode 100644
index 0368fa9..0000000
Binary files a/lib/lvgl/docs/misc/boxmodel.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/btn_example.png b/lib/lvgl/docs/misc/btn_example.png
deleted file mode 100644
index 33a3fb0..0000000
Binary files a/lib/lvgl/docs/misc/btn_example.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/button_style_example.gif b/lib/lvgl/docs/misc/button_style_example.gif
deleted file mode 100644
index c2a4063..0000000
Binary files a/lib/lvgl/docs/misc/button_style_example.gif and /dev/null differ
diff --git a/lib/lvgl/docs/misc/button_style_example.png b/lib/lvgl/docs/misc/button_style_example.png
deleted file mode 100644
index 38f6b3e..0000000
Binary files a/lib/lvgl/docs/misc/button_style_example.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/codeblocks.jpg b/lib/lvgl/docs/misc/codeblocks.jpg
deleted file mode 100644
index fe4ed95..0000000
Binary files a/lib/lvgl/docs/misc/codeblocks.jpg and /dev/null differ
diff --git a/lib/lvgl/docs/misc/eclipse.jpg b/lib/lvgl/docs/misc/eclipse.jpg
deleted file mode 100644
index 920791d..0000000
Binary files a/lib/lvgl/docs/misc/eclipse.jpg and /dev/null differ
diff --git a/lib/lvgl/docs/misc/layers.png b/lib/lvgl/docs/misc/layers.png
deleted file mode 100644
index fe18d19..0000000
Binary files a/lib/lvgl/docs/misc/layers.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/par_child1.png b/lib/lvgl/docs/misc/par_child1.png
deleted file mode 100644
index e2cbb53..0000000
Binary files a/lib/lvgl/docs/misc/par_child1.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/par_child2.png b/lib/lvgl/docs/misc/par_child2.png
deleted file mode 100644
index fb7c064..0000000
Binary files a/lib/lvgl/docs/misc/par_child2.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/par_child3.png b/lib/lvgl/docs/misc/par_child3.png
deleted file mode 100644
index d682aeb..0000000
Binary files a/lib/lvgl/docs/misc/par_child3.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/platformio.jpg b/lib/lvgl/docs/misc/platformio.jpg
deleted file mode 100644
index eb88bfa..0000000
Binary files a/lib/lvgl/docs/misc/platformio.jpg and /dev/null differ
diff --git a/lib/lvgl/docs/misc/qtcreator.jpg b/lib/lvgl/docs/misc/qtcreator.jpg
deleted file mode 100644
index 890dc1e..0000000
Binary files a/lib/lvgl/docs/misc/qtcreator.jpg and /dev/null differ
diff --git a/lib/lvgl/docs/misc/simple_button_example.gif b/lib/lvgl/docs/misc/simple_button_example.gif
deleted file mode 100644
index 2884923..0000000
Binary files a/lib/lvgl/docs/misc/simple_button_example.gif and /dev/null differ
diff --git a/lib/lvgl/docs/misc/simple_button_example.png b/lib/lvgl/docs/misc/simple_button_example.png
deleted file mode 100644
index 28825e3..0000000
Binary files a/lib/lvgl/docs/misc/simple_button_example.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/symbols.png b/lib/lvgl/docs/misc/symbols.png
deleted file mode 100644
index 139e330..0000000
Binary files a/lib/lvgl/docs/misc/symbols.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/sys.png b/lib/lvgl/docs/misc/sys.png
deleted file mode 100644
index de5ebcd..0000000
Binary files a/lib/lvgl/docs/misc/sys.png and /dev/null differ
diff --git a/lib/lvgl/docs/misc/visualstudio.jpg b/lib/lvgl/docs/misc/visualstudio.jpg
deleted file mode 100644
index 0e852d0..0000000
Binary files a/lib/lvgl/docs/misc/visualstudio.jpg and /dev/null differ
diff --git a/lib/lvgl/docs/others/fragment.md b/lib/lvgl/docs/others/fragment.md
deleted file mode 100644
index 3a591dc..0000000
--- a/lib/lvgl/docs/others/fragment.md
+++ /dev/null
@@ -1,81 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/fragment.md
-```
-
-# Fragment
-
-Fragment is a concept copied from [Android](https://developer.android.com/guide/fragments).
-
-It represents a reusable portion of your app's UI. A fragment defines and manages its own layout, has its own lifecycle,
-and can handle its own events. Like Android's Fragment that must be hosted by an activity or another fragment, Fragment
-in LVGL needs to be hosted by an object, or another fragment. The fragment’s view hierarchy becomes part of, or attaches
-to, the host’s view hierarchy.
-
-Such concept also has some similarities
-to [UiViewController on iOS](https://developer.apple.com/documentation/uikit/uiviewcontroller).
-
-Fragment Manager is a manager holding references to fragments attached to it, and has an internal stack to achieve
-navigation. You can use fragment manager to build navigation stack, or multi pane application easily.
-
-## Usage
-
-Enable `LV_USE_FRAGMENT` in `lv_conf.h`.
-
-### Create Fragment Class
-
-```c
-struct sample_fragment_t {
- /* IMPORTANT: don't miss this part */
- lv_fragment_t base;
- /* States, object references and data fields for this fragment */
- const char *title;
-};
-
-const lv_fragment_class_t sample_cls = {
- /* Initialize something needed */
- .constructor_cb = sample_fragment_ctor,
- /* Create view objects */
- .create_obj_cb = sample_fragment_create_obj,
- /* IMPORTANT: size of your fragment struct */
- .instance_size = sizeof(struct sample_fragment_t)
-};
-```
-
-### Use `lv_fragment_manager`
-
-```c
-/* Create fragment instance, and objects will be added to container */
-lv_fragment_manager_t *manager = lv_fragment_manager_create(container, NULL);
-/* Replace current fragment with instance of sample_cls, and init_argument is user defined pointer */
-lv_fragment_manager_replace(manager, &sample_cls, init_argument);
-```
-
-### Fragment Based Navigation
-
-```c
-/* Add one instance into manager stack. View object of current fragment will be destroyed,
- * but instances created in class constructor will be kept.
- */
-lv_fragment_manager_push(manager, &sample_cls, NULL);
-
-/* Remove the top most fragment from the stack, and bring back previous one. */
-lv_fragment_manager_pop(manager);
-```
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/others/fragment/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_fragment.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/others/gridnav.md b/lib/lvgl/docs/others/gridnav.md
deleted file mode 100644
index 0bb3d74..0000000
--- a/lib/lvgl/docs/others/gridnav.md
+++ /dev/null
@@ -1,60 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/gridnav.md
-```
-# Grid navigation
-
-Grid navigation (gridnav for short) is a feature that changes the currently focused child object as arrow keys are pressed.
-
-If the children are arranged into a grid-like layout then the up, down, left and right arrows move focus to the nearest sibling
-in the respective direction.
-
-It doesn't matter how the children are positioned, as only the current x and y coordinates are considered.
-This means that gridnav works with manually positioned children, as well as [Flex](/layouts/flex) and [Grid](/layouts/grid) layouts.
-
-Gridnav also works if the children are arranged into a single row or column.
-That makes it useful, for example, to simplify navigation on a [List widget](/widgets/extra/list).
-
-Gridnav assumes that the object to which gridnav is added is part of a [group](/overview/indev.html#groups).
-This way, if the object with gridnav is focused, the arrow key presses are automatically forwarded to the object
-so that gridnav can process the arrow keys.
-
-To move the focus to the next widget of the group use `LV_KEY_NEXT/PREV` or `lv_group_focus_next/prev()` or the `TAB` key on keyboard as usual.
-
-If the container is scrollable and the focused child is out of the view, gridnav will automatically scroll the child into view.
-
-## Usage
-
-To add the gridnav feature to an object use `lv_gridnav_add(cont, flags)`.
-
-`flags` control the behavior of gridnav:
-- `LV_GRIDNAV_CTRL_NONE` Default settings
-- `LV_GRIDNAV_CTRL_ROLLOVER` If there is no next/previous object in a direction,
-the focus goes to the object in the next/previous row (on left/right keys) or first/last row (on up/down keys
-- `LV_GRIDNAV_CTRL_SCROLL_FIRST` If an arrow is pressed and the focused object can be scrolled in that direction
-then it will be scrolled instead of going to the next/previous object. If there is no more room for scrolling the next/previous object will be focused normally
-
-`lv_gridnav_remove(cont)` Removes gridnav from an object.
-
-## Focusable objects
-
-An object needs to be clickable or click focusable (`LV_OBJ_FLAG_CLICKABLE` or `LV_OBJ_FLAG_CLICK_FOCUSABLE`)
-and not hidden (`LV_OBJ_FLAG_HIDDEN`) to be focusable by gridnav.
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/others/gridnav/index.rst
-
-```
-## API
-
-
-```eval_rst
-
-.. doxygenfile:: lv_gridnav.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/others/imgfont.md b/lib/lvgl/docs/others/imgfont.md
deleted file mode 100644
index 6d6ba61..0000000
--- a/lib/lvgl/docs/others/imgfont.md
+++ /dev/null
@@ -1,29 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/imgfont.md
-```
-## Image font (imgfont)
-Draw image in label or span obj with imgfont.
-This is often used to display Unicode emoji icons in text.
-Supported image formats: determined by LVGL image decoder.
-
-## Usage
-Enable `LV_USE_IMGFONT` in `lv_conf.h`.
-
-To create a new imgfont use `lv_imgfont_create(height, path_cb)`.
-
-`height` used to indicate the size of a imgfont.
-`path_cb` Used to get the image path of the specified unicode.
-
-Use `lv_imgfont_destroy(imgfont)` to destroy a imgfont that is no longer used.
-
-## Example
-```eval_rst
-.. include:: ../../examples/others/imgfont/index.rst
-```
-
-## API
-```eval_rst
-.. doxygenfile:: lv_imgfont.h
- :project: lvgl
-```
\ No newline at end of file
diff --git a/lib/lvgl/docs/others/index.md b/lib/lvgl/docs/others/index.md
deleted file mode 100644
index a33305e..0000000
--- a/lib/lvgl/docs/others/index.md
+++ /dev/null
@@ -1,19 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/index.md
-```
-# Others
-
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 1
-
- snapshot
- monkey
- gridnav
- fragment
- msg
-```
-
diff --git a/lib/lvgl/docs/others/monkey.md b/lib/lvgl/docs/others/monkey.md
deleted file mode 100644
index 516f5f3..0000000
--- a/lib/lvgl/docs/others/monkey.md
+++ /dev/null
@@ -1,39 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/monkey.md
-```
-# Monkey
-
-A simple monkey test. Use random input to stress test the application.
-
-## Usage
-
-Enable `LV_USE_MONKEY` in `lv_conf.h`.
-
-First configure monkey, use `lv_monkey_config_t` to define the configuration structure, set the `type` (check [input devices](/overview/indev) for the supported types), and then set the range of `period_range` and `input_range`, the monkey will output random operations at random times within this range. Call `lv_monkey_create` to create monkey. Finally call `lv_monkey_set_enable(monkey, true)` to enable monkey.
-
-If you want to pause the monkey, call `lv_monkey_set_enable(monkey, false)`. To delete the monkey, call `lv_monkey_del(monkey)`.
-
-Note that `input_range` has different meanings in different `type`:
-
-- `LV_INDEV_TYPE_POINTER` No effect, click randomly within the pixels of the screen resolution.
-- `LV_INDEV_TYPE_ENCODER` The minimum and maximum values of `enc_diff`.
-- `LV_INDEV_TYPE_BUTTON` The minimum and maximum values of `btn_id`. Use `lv_monkey_get_indev()` to get the input device, and use `lv_indev_set_button_points()` to map the key ID to the coordinates.
-- `LV_INDEV_TYPE_KEYPAD` No effect, Send random [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/others/monkey/index.rst
-
-```
-## API
-
-
-```eval_rst
-
-.. doxygenfile:: lv_monkey.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/others/msg.md b/lib/lvgl/docs/others/msg.md
deleted file mode 100644
index 1aa0e13..0000000
--- a/lib/lvgl/docs/others/msg.md
+++ /dev/null
@@ -1,101 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/msg.md
-```
-# Messaging
-
-Messaging (`lv_msg`) is a classic []publisher subscriber](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) implementation for LVGL.
-
-## IDs
-Both the publishers and the subscribers needs to know the message identifiers.
-In `lv_msg` these are simple `uint32_t` integers. For example:
-```c
-#define MSG_DOOR_OPENED 1
-#define MSG_DOOR_CLOSED 2
-#define MSG_USER_NAME_CHANGED 100
-#define MSG_USER_AVATAR_CHANGED 101
-```
-
-You can orgnaize the message IDs as you wish.
-
-Both parties also need to know about the format of teh payload. E.g. in the above example
-`MSG_DOOR_OPENED` and `MSG_DOOR_CLOSED` has no payload but `MSG_USER_NAME_CHANGED` can have a `const char *` payload containing the user name, and `MSG_USER_AVATAR_CHANGED` a `const void *` image source with the new avatar image.
-
-
-## Send message
-
-Messages can be sent with `lv_msg_send(msg_id, payload)`. E.g.
-```c
-lv_msg_send(MSG_USER_DOOR_OPENED, NULL);
-lv_msg_send(MSG_USER_NAME_CHANGED, "John Smith");
-```
-
-## Subscribe to a message
-
-`lv_msg_subscribe(msg_id, callback, user_data)` can be used to subscribe to message.
-
-The callback should look like this:
-```c
-
-static void user_name_subscriber_cb(void * s, lv_msg_t * m)
-{
- /*s: a subscriber obeject, can be used to unscubscribe*/
- /*m: a message object with the msg_id, payload, and user_data (set durung subscription)*/
-
- ...do something...
-}
-```
-
-From `lv_msg_t` the followings can be used to get some data:
-- `lv_msg_get_id(m)`
-- `lv_msg_get_payload(m)`
-- `lv_msg_get_user_data(m)`
-
-## Subscribe with an lv_obj
-It's quite typical that an LVGL widget is interested in some messages.
-To make it simpler `lv_msg_subsribe_obj(msg_id, obj, user_data)` can be used.
-If a new message is published with `msg_id` an `LV_EVENT_MSG_RECEIVED` event will be sent to the object.
-
-For example:
-```c
-lv_obj_add_event_cb(user_name_label, user_name_label_event_cb, LV_EVENT_MSG_RECEIVED, NULL);
-lv_msg_subsribe_obj(MSG_USER_NAME_CHANGED, user_name_label, NULL);
-
-...
-
-void user_name_label_event_cb(lv_event_t * e)
-{
- lv_obj_t * label = lv_event_get_target(e);
- lv_msg_t * m = lv_event_get_msg(e);
- lv_label_set_text(label, lv_msg_get_payload(m));
-}
-
-```
-
-### Unsubscribe
-`lv_msg_subscribe` returns a pointer which can be used to unsubscribe:
-```c
-void * s1;
-s1 = lv_msg_subscribe(MSG_USER_DOOR_OPENED, some_callback, NULL);
-
-...
-
-lv_msg_unsubscribe(s1);
-```
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/others/msg/index.rst
-
-```
-## API
-
-
-```eval_rst
-
-.. doxygenfile:: lv_msg.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/others/snapshot.md b/lib/lvgl/docs/others/snapshot.md
deleted file mode 100644
index 19c1a1c..0000000
--- a/lib/lvgl/docs/others/snapshot.md
+++ /dev/null
@@ -1,67 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/others/snapshot.md
-```
-# Snapshot
-
-Snapshot provides APIs to take snapshot image for LVGL object together with its children. The image will look exactly like the object.
-
-## Usage
-
-Simply call API `lv_snapshot_take` to generate the image descriptor which can be set as image object src using `lv_img_set_src`.
-
-
-Note, only below color formats are supported for now:
- - LV_IMG_CF_TRUE_COLOR_ALPHA
- - LV_IMG_CF_ALPHA_1BIT
- - LV_IMG_CF_ALPHA_2BIT
- - LV_IMG_CF_ALPHA_4BIT
- - LV_IMG_CF_ALPHA_8BIT
-
-
-### Free the Image
-The memory `lv_snapshot_take` uses are dynamically allocated using `lv_mem_alloc`. Use API `lv_snapshot_free` to free the memory it takes. This will firstly free memory the image data takes, then the image descriptor.
-
-
-Take caution to free the snapshot but not delete the image object. Before free the memory, be sure to firstly unlink it from image object, using `lv_img_set_src(NULL)` and `lv_img_cache_invalidate_src(src)`.
-
-
-Below code snippet explains usage of this API.
-
-```c
-void update_snapshot(lv_obj_t * obj, lv_obj_t * img_snapshot)
-{
- lv_img_dsc_t* snapshot = (void*)lv_img_get_src(img_snapshot);
- if(snapshot) {
- lv_snapshot_free(snapshot);
- }
- snapshot = lv_snapshot_take(obj, LV_IMG_CF_TRUE_COLOR_ALPHA);
- lv_img_set_src(img_snapshot, snapshot);
-}
-```
-
-### Use Existing Buffer
-If the snapshot needs update now and then, or simply caller provides memory, use API `lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buff_size);` for this case. It's caller's responsibility to alloc/free the memory.
-
-
-If snapshot is generated successfully, the image descriptor is updated and image data will be stored to provided `buf`.
-
-
-Note that snapshot may fail if provided buffer is not enough, which may happen when object size changes. It's recommended to use API `lv_snapshot_buf_size_needed` to check the needed buffer size in byte firstly and resize the buffer accordingly.
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/others/snapshot/index.rst
-
-```
-## API
-
-
-```eval_rst
-
-.. doxygenfile:: lv_snapshot.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/animation.md b/lib/lvgl/docs/overview/animation.md
deleted file mode 100644
index 13d9aa5..0000000
--- a/lib/lvgl/docs/overview/animation.md
+++ /dev/null
@@ -1,145 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/animation.md
-```
-# Animations
-
-You can automatically change the value of a variable between a start and an end value using animations.
-Animation will happen by periodically calling an "animator" function with the corresponding value parameter.
-
-The *animator* functions have the following prototype:
-```c
-void func(void * var, lv_anim_var_t value);
-```
-This prototype is compatible with the majority of the property *set* functions in LVGL. For example `lv_obj_set_x(obj, value)` or `lv_obj_set_width(obj, value)`
-
-
-## Create an animation
-To create an animation an `lv_anim_t` variable has to be initialized and configured with `lv_anim_set_...()` functions.
-
-```c
-
-/* INITIALIZE AN ANIMATION
- *-----------------------*/
-
-lv_anim_t a;
-lv_anim_init(&a);
-
-/* MANDATORY SETTINGS
- *------------------*/
-
-/*Set the "animator" function*/
-lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t) lv_obj_set_x);
-
-/*Set target of the animation*/
-lv_anim_set_var(&a, obj);
-
-/*Length of the animation [ms]*/
-lv_anim_set_time(&a, duration);
-
-/*Set start and end values. E.g. 0, 150*/
-lv_anim_set_values(&a, start, end);
-
-/* OPTIONAL SETTINGS
- *------------------*/
-
-/*Time to wait before starting the animation [ms]*/
-lv_anim_set_delay(&a, delay);
-
-/*Set path (curve). Default is linear*/
-lv_anim_set_path(&a, lv_anim_path_ease_in);
-
-/*Set a callback to indicate when the animation is ready (idle).*/
-lv_anim_set_ready_cb(&a, ready_cb);
-
-/*Set a callback to indicate when the animation is started (after delay).*/
-lv_anim_set_start_cb(&a, start_cb);
-
-/*When ready, play the animation backward with this duration. Default is 0 (disabled) [ms]*/
-lv_anim_set_playback_time(&a, time);
-
-/*Delay before playback. Default is 0 (disabled) [ms]*/
-lv_anim_set_playback_delay(&a, delay);
-
-/*Number of repetitions. Default is 1. LV_ANIM_REPEAT_INFINITE for infinite repetition*/
-lv_anim_set_repeat_count(&a, cnt);
-
-/*Delay before repeat. Default is 0 (disabled) [ms]*/
-lv_anim_set_repeat_delay(&a, delay);
-
-/*true (default): apply the start value immediately, false: apply start value after delay when the anim. really starts. */
-lv_anim_set_early_apply(&a, true/false);
-
-/* START THE ANIMATION
- *------------------*/
-lv_anim_start(&a); /*Start the animation*/
-```
-
-
-You can apply multiple different animations on the same variable at the same time.
-For example, animate the x and y coordinates with `lv_obj_set_x` and `lv_obj_set_y`. However, only one animation can exist with a given variable and function pair and `lv_anim_start()` will remove any existing animations for such a pair.
-
-## Animation path
-
-You can control the path of an animation. The most simple case is linear, meaning the current value between *start* and *end* is changed with fixed steps.
-A *path* is a function which calculates the next value to set based on the current state of the animation. Currently, there are the following built-in path functions:
-
-- `lv_anim_path_linear` linear animation
-- `lv_anim_path_step` change in one step at the end
-- `lv_anim_path_ease_in` slow at the beginning
-- `lv_anim_path_ease_out` slow at the end
-- `lv_anim_path_ease_in_out` slow at the beginning and end
-- `lv_anim_path_overshoot` overshoot the end value
-- `lv_anim_path_bounce` bounce back a little from the end value (like hitting a wall)
-
-
-## Speed vs time
-By default, you set the animation time directly. But in some cases, setting the animation speed is more practical.
-
-The `lv_anim_speed_to_time(speed, start, end)` function calculates the required time in milliseconds to reach the end value from a start value with the given speed.
-The speed is interpreted in _unit/sec_ dimension. For example, `lv_anim_speed_to_time(20,0,100)` will yield 5000 milliseconds. For example, in the case of `lv_obj_set_x` *unit* is pixels so *20* means *20 px/sec* speed.
-
-## Delete animations
-
-You can delete an animation with `lv_anim_del(var, func)` if you provide the animated variable and its animator function.
-
-## Timeline
-A timeline is a collection of multiple animations which makes it easy to create complex composite animations.
-
-Firstly, create an animation element but don’t call `lv_anim_start()`.
-
-Secondly, create an animation timeline object by calling `lv_anim_timeline_create()`.
-
-Thirdly, add animation elements to the animation timeline by calling `lv_anim_timeline_add(at, start_time, &a)`. `start_time` is the start time of the animation on the timeline. Note that `start_time` will override the value of `delay`.
-
-Finally, call `lv_anim_timeline_start(at)` to start the animation timeline.
-
-It supports forward and backward playback of the entire animation group, using `lv_anim_timeline_set_reverse(at, reverse)`.
-
-Call `lv_anim_timeline_stop(at)` to stop the animation timeline.
-
-Call `lv_anim_timeline_set_progress(at, progress)` function to set the state of the object corresponding to the progress of the timeline.
-
-Call `lv_anim_timeline_get_playtime(at)` function to get the total duration of the entire animation timeline.
-
-Call `lv_anim_timeline_get_reverse(at)` function to get whether to reverse the animation timeline.
-
-Call `lv_anim_timeline_del(at)` function to delete the animation timeline.
-
-
-
-## Examples
-
-```eval_rst
-
-.. include:: ../../examples/anim/index.rst
-
-```
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_anim.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/color.md b/lib/lvgl/docs/overview/color.md
deleted file mode 100644
index 52e9dd8..0000000
--- a/lib/lvgl/docs/overview/color.md
+++ /dev/null
@@ -1,157 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/color.md
-```
-# Colors
-
-The color module handles all color-related functions like changing color depth, creating colors from hex code, converting between color depths, mixing colors, etc.
-
-The type `lv_color_t` is used to store a color. Its fields are set according to `LV_COLOR_DEPTH` in `lv_conf.h`. (See below)
-
-You may set `LV_COLOR_16_SWAP` in `lv_conf.h` to swap bytes of *RGB565* colors. You may need this when sending 16-bit colors via a byte-oriented interface like SPI. As 16-bit numbers are stored in little-endian format (lower byte at the lower address), the interface will send the lower byte first. However, displays usually need the higher byte first. A mismatch in the byte order will result in highly distorted colors.
-
-## Creating colors
-
-### RGB
-Create colors from Red, Green and Blue channel values:
-```c
-//All channels are 0-255
-lv_color_t c = lv_color_make(red, green, blue);
-
-//From hex code 0x000000..0xFFFFFF interpreted as RED + GREEN + BLUE
-lv_color_t c = lv_color_hex(0x123456);
-
-//From 3 digits. Same as lv_color_hex(0x112233)
-lv_color_t c = lv_color_hex3(0x123);
-```
-
-### HSV
-Create colors from Hue, Saturation and Value values:
-
-```c
-//h = 0..359, s = 0..100, v = 0..100
-lv_color_t c = lv_color_hsv_to_rgb(h, s, v);
-
-//All channels are 0-255
-lv_color_hsv_t c_hsv = lv_color_rgb_to_hsv(r, g, b);
-
-
-//From lv_color_t variable
-lv_color_hsv_t c_hsv = lv_color_to_hsv(color);
-```
-
-### Palette
-LVGL includes [Material Design's palette](https://vuetifyjs.com/en/styles/colors/#material-colors) of colors. In this system all named colors have a nominal main color as well as four darker and five lighter variants.
-
-The names of the colors are as follows:
-- `LV_PALETTE_RED`
-- `LV_PALETTE_PINK`
-- `LV_PALETTE_PURPLE`
-- `LV_PALETTE_DEEP_PURPLE`
-- `LV_PALETTE_INDIGO`
-- `LV_PALETTE_BLUE`
-- `LV_PALETTE_LIGHT_BLUE`
-- `LV_PALETTE_CYAN`
-- `LV_PALETTE_TEAL`
-- `LV_PALETTE_GREEN`
-- `LV_PALETTE_LIGHT_GREEN`
-- `LV_PALETTE_LIME`
-- `LV_PALETTE_YELLOW`
-- `LV_PALETTE_AMBER`
-- `LV_PALETTE_ORANGE`
-- `LV_PALETTE_DEEP_ORANGE`
-- `LV_PALETTE_BROWN`
-- `LV_PALETTE_BLUE_GREY`
-- `LV_PALETTE_GREY`
-
-
-To get the main color use `lv_color_t c = lv_palette_main(LV_PALETTE_...)`.
-
-For the lighter variants of a palette color use `lv_color_t c = lv_palette_lighten(LV_PALETTE_..., v)`. `v` can be 1..5.
-For the darker variants of a palette color use `lv_color_t c = lv_palette_darken(LV_PALETTE_..., v)`. `v` can be 1..4.
-
-### Modify and mix colors
-The following functions can modify a color:
-```c
-// Lighten a color. 0: no change, 255: white
-lv_color_t c = lv_color_lighten(c, lvl);
-
-// Darken a color. 0: no change, 255: black
-lv_color_t c = lv_color_darken(lv_color_t c, lv_opa_t lvl);
-
-// Lighten or darken a color. 0: black, 128: no change 255: white
-lv_color_t c = lv_color_change_lightness(lv_color_t c, lv_opa_t lvl);
-
-
-// Mix two colors with a given ratio 0: full c2, 255: full c1, 128: half c1 and half c2
-lv_color_t c = lv_color_mix(c1, c2, ratio);
-```
-
-### Built-in colors
-`lv_color_white()` and `lv_color_black()` return `0xFFFFFF` and `0x000000` respectively.
-
-## Opacity
-To describe opacity the `lv_opa_t` type is created from `uint8_t`. Some special purpose defines are also introduced:
-
-- `LV_OPA_TRANSP` Value: 0, means no opacity making the color completely transparent
-- `LV_OPA_10` Value: 25, means the color covers only a little
-- `LV_OPA_20 ... OPA_80` follow logically
-- `LV_OPA_90` Value: 229, means the color near completely covers
-- `LV_OPA_COVER` Value: 255, means the color completely covers (full opacity)
-
-You can also use the `LV_OPA_*` defines in `lv_color_mix()` as a mixing *ratio*.
-
-
-## Color types
-The following variable types are defined by the color module:
-
-- `lv_color1_t` Monochrome color. Also has R, G, B fields for compatibility but they are always the same value (1 byte)
-- `lv_color8_t` A structure to store R (3 bit),G (3 bit),B (2 bit) components for 8-bit colors (1 byte)
-- `lv_color16_t` A structure to store R (5 bit),G (6 bit),B (5 bit) components for 16-bit colors (2 byte)
-- `lv_color32_t` A structure to store R (8 bit),G (8 bit), B (8 bit) components for 24-bit colors (4 byte)
-- `lv_color_t` Equal to `lv_color1/8/16/24_t` depending on the configured color depth setting
-- `lv_color_int_t` `uint8_t`, `uint16_t` or `uint32_t` depending on the color depth setting. Used to build color arrays from plain numbers.
-- `lv_opa_t` A simple `uint8_t` type to describe opacity.
-
-The `lv_color_t`, `lv_color1_t`, `lv_color8_t`, `lv_color16_t` and `lv_color32_t` types have four fields:
-
-- `ch.red` red channel
-- `ch.green` green channel
-- `ch.blue` blue channel
-- `full*` red + green + blue as one number
-
-You can set the current color depth in *lv_conf.h*, by setting the `LV_COLOR_DEPTH` define to 1 (monochrome), 8, 16 or 32.
-
-
-### Convert color
-You can convert a color from the current color depth to another. The converter functions return with a number, so you have to use the `full` field to map a converted color back into a structure:
-
-```c
-lv_color_t c;
-c.red = 0x38;
-c.green = 0x70;
-c.blue = 0xCC;
-
-lv_color1_t c1;
-c1.full = lv_color_to1(c); /*Return 1 for light colors, 0 for dark colors*/
-
-lv_color8_t c8;
-c8.full = lv_color_to8(c); /*Give a 8 bit number with the converted color*/
-
-lv_color16_t c16;
-c16.full = lv_color_to16(c); /*Give a 16 bit number with the converted color*/
-
-lv_color32_t c24;
-c32.full = lv_color_to32(c); /*Give a 32 bit number with the converted color*/
-```
-
-
-## API
-
-
-```eval_rst
-
-.. doxygenfile:: lv_color.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/coords.md b/lib/lvgl/docs/overview/coords.md
deleted file mode 100644
index 9b72197..0000000
--- a/lib/lvgl/docs/overview/coords.md
+++ /dev/null
@@ -1,367 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/coords.md
-```
-# Positions, sizes, and layouts
-
-## Overview
-Similarly to many other parts of LVGL, the concept of setting the coordinates was inspired by CSS. LVGL has by no means a complete implementation of CSS but a comparable subset is implemented (sometimes with minor adjustments).
-
-In short this means:
-- Explicitly set coordinates are stored in styles (size, position, layouts, etc.)
-- support min-width, max-width, min-height, max-height
-- have pixel, percentage, and "content" units
-- x=0; y=0 coordinate means the top-left corner of the parent plus the left/top padding plus border width
-- width/height means the full size, the "content area" is smaller with padding and border width
-- a subset of flexbox and grid layouts are supported
-
-### Units
-- pixel: Simply a position in pixels. An integer always means pixels. E.g. `lv_obj_set_x(btn, 10)`
-- percentage: The percentage of the size of the object or its parent (depending on the property). `lv_pct(value)` converts a value to percentage. E.g. `lv_obj_set_width(btn, lv_pct(50))`
-- `LV_SIZE_CONTENT`: Special value to set the width/height of an object to involve all the children. It's similar to `auto` in CSS. E.g. `lv_obj_set_width(btn, LV_SIZE_CONTENT)`.
-
-### Boxing model
-LVGL follows CSS's [border-box](https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing) model.
-An object's "box" is built from the following parts:
-- bounding box: the width/height of the elements.
-- border width: the width of the border.
-- padding: space between the sides of the object and its children.
-- content: the content area which is the size of the bounding box reduced by the border width and padding.
-
-
-
-The border is drawn inside the bounding box. Inside the border LVGL keeps a "padding margin" when placing an object's children.
-
-The outline is drawn outside the bounding box.
-
-### Important notes
-This section describes special cases in which LVGL's behavior might be unexpected.
-
-#### Postponed coordinate calculation
-LVGL doesn't recalculate all the coordinate changes immediately. This is done to improve performance.
-Instead, the objects are marked as "dirty" and before redrawing the screen LVGL checks if there are any "dirty" objects. If so it refreshes their position, size and layout.
-
-In other words, if you need to get the coordinate of an object and the coordinates were just changed, LVGL needs to be forced to recalculate the coordinates.
-To do this call `lv_obj_update_layout(obj)`.
-
-The size and position might depend on the parent or layout. Therefore `lv_obj_update_layout` recalculates the coordinates of all objects on the screen of `obj`.
-
-#### Removing styles
-As it's described in the [Using styles](#using-styles) section, coordinates can also be set via style properties.
-To be more precise, under the hood every style coordinate related property is stored as a style property. If you use `lv_obj_set_x(obj, 20)` LVGL saves `x=20` in the local style of the object.
-
-This is an internal mechanism and doesn't matter much as you use LVGL. However, there is one case in which you need to be aware of the implementation. If the style(s) of an object are removed by
-```c
-lv_obj_remove_style_all(obj)
-```
-
-or
-```c
-lv_obj_remove_style(obj, NULL, LV_PART_MAIN);
-```
-the earlier set coordinates will be removed as well.
-
-For example:
-```c
-/*The size of obj1 will be set back to the default in the end*/
-lv_obj_set_size(obj1, 200, 100); /*Now obj1 has 200;100 size*/
-lv_obj_remove_style_all(obj1); /*It removes the set sizes*/
-
-
-/*obj2 will have 200;100 size in the end */
-lv_obj_remove_style_all(obj2);
-lv_obj_set_size(obj2, 200, 100);
-```
-
-## Position
-
-### Simple way
-To simply set the x and y coordinates of an object use:
-```c
-lv_obj_set_x(obj, 10); //Separate...
-lv_obj_set_y(obj, 20);
-lv_obj_set_pos(obj, 10, 20); //Or in one function
-```
-
-By default, the x and y coordinates are measured from the top left corner of the parent's content area.
-For example if the parent has five pixels of padding on every side the above code will place `obj` at (15, 25) because the content area starts after the padding.
-
-Percentage values are calculated from the parent's content area size.
-```c
-lv_obj_set_x(btn, lv_pct(10)); //x = 10 % of parent content area width
-```
-
-### Align
-In some cases it's convenient to change the origin of the positioning from the default top left. If the origin is changed e.g. to bottom-right, the (0,0) position means: align to the bottom-right corner.
-To change the origin use:
-```c
-lv_obj_set_align(obj, align);
-```
-
-To change the alignment and set new coordinates:
-```c
-lv_obj_align(obj, align, x, y);
-```
-
-The following alignment options can be used:
-- `LV_ALIGN_TOP_LEFT`
-- `LV_ALIGN_TOP_MID`
-- `LV_ALIGN_TOP_RIGHT`
-- `LV_ALIGN_BOTTOM_LEFT`
-- `LV_ALIGN_BOTTOM_MID`
-- `LV_ALIGN_BOTTOM_RIGHT`
-- `LV_ALIGN_LEFT_MID`
-- `LV_ALIGN_RIGHT_MID`
-- `LV_ALIGN_CENTER`
-
-It's quite common to align a child to the center of its parent, therefore a dedicated function exists:
-```c
-lv_obj_center(obj);
-
-//Has the same effect
-lv_obj_align(obj, LV_ALIGN_CENTER, 0, 0);
-```
-
-If the parent's size changes, the set alignment and position of the children is updated automatically.
-
-The functions introduced above align the object to its parent. However, it's also possible to align an object to an arbitrary reference object.
-```c
-lv_obj_align_to(obj_to_align, reference_obj, align, x, y);
-```
-
-Besides the alignments options above, the following can be used to align an object outside the reference object:
-
-- `LV_ALIGN_OUT_TOP_LEFT`
-- `LV_ALIGN_OUT_TOP_MID`
-- `LV_ALIGN_OUT_TOP_RIGHT`
-- `LV_ALIGN_OUT_BOTTOM_LEFT`
-- `LV_ALIGN_OUT_BOTTOM_MID`
-- `LV_ALIGN_OUT_BOTTOM_RIGHT`
-- `LV_ALIGN_OUT_LEFT_TOP`
-- `LV_ALIGN_OUT_LEFT_MID`
-- `LV_ALIGN_OUT_LEFT_BOTTOM`
-- `LV_ALIGN_OUT_RIGHT_TOP`
-- `LV_ALIGN_OUT_RIGHT_MID`
-- `LV_ALIGN_OUT_RIGHT_BOTTOM`
-
-For example to align a label above a button and center the label horizontally:
-```c
-lv_obj_align_to(label, btn, LV_ALIGN_OUT_TOP_MID, 0, -10);
-```
-
-Note that, unlike with `lv_obj_align()`, `lv_obj_align_to()` can not realign the object if its coordinates or the reference object's coordinates change.
-
-## Size
-
-### Simple way
-The width and the height of an object can be set easily as well:
-```c
-lv_obj_set_width(obj, 200); //Separate...
-lv_obj_set_height(obj, 100);
-lv_obj_set_size(obj, 200, 100); //Or in one function
-```
-
-Percentage values are calculated based on the parent's content area size. For example to set the object's height to the screen height:
-```c
-lv_obj_set_height(obj, lv_pct(100));
-```
-
-The size settings support a special value: `LV_SIZE_CONTENT`. It means the object's size in the respective direction will be set to the size of its children.
-Note that only children on the right and bottom sides will be considered and children on the top and left remain cropped. This limitation makes the behavior more predictable.
-
-Objects with `LV_OBJ_FLAG_HIDDEN` or `LV_OBJ_FLAG_FLOATING` will be ignored by the `LV_SIZE_CONTENT` calculation.
-
-The above functions set the size of an object's bounding box but the size of the content area can be set as well. This means an object's bounding box will be enlarged with the addition of padding.
-```c
-lv_obj_set_content_width(obj, 50); //The actual width: padding left + 50 + padding right
-lv_obj_set_content_height(obj, 30); //The actual width: padding top + 30 + padding bottom
-```
-
-The size of the bounding box and the content area can be retrieved with the following functions:
-```c
-lv_coord_t w = lv_obj_get_width(obj);
-lv_coord_t h = lv_obj_get_height(obj);
-lv_coord_t content_w = lv_obj_get_content_width(obj);
-lv_coord_t content_h = lv_obj_get_content_height(obj);
-```
-
-## Using styles
-Under the hood the position, size and alignment properties are style properties.
-The above described "simple functions" hide the style related code for the sake of simplicity and set the position, size, and alignment properties in the local styles of the object.
-
-However, using styles to set the coordinates has some great advantages:
-- It makes it easy to set the width/height/etc. for several objects together. E.g. make all the sliders 100x10 pixels sized.
-- It also makes possible to modify the values in one place.
-- The values can be partially overwritten by other styles. For example `style_btn` makes the object `100x50` by default but adding `style_full_width` overwrites only the width of the object.
-- The object can have different position or size depending on state. E.g. 100 px wide in `LV_STATE_DEFAULT` but 120 px in `LV_STATE_PRESSED`.
-- Style transitions can be used to make the coordinate changes smooth.
-
-
-Here are some examples to set an object's size using a style:
-```c
-static lv_style_t style;
-lv_style_init(&style);
-lv_style_set_width(&style, 100);
-
-lv_obj_t * btn = lv_btn_create(lv_scr_act());
-lv_obj_add_style(btn, &style, LV_PART_MAIN);
-```
-
-As you will see below there are some other great features of size and position setting.
-However, to keep the LVGL API lean, only the most common coordinate setting features have a "simple" version and the more complex features can be used via styles.
-
-## Translation
-
-Let's say the there are 3 buttons next to each other. Their position is set as described above.
-Now you want to move a button up a little when it's pressed.
-
-One way to achieve this is by setting a new Y coordinate for the pressed state:
-```c
-static lv_style_t style_normal;
-lv_style_init(&style_normal);
-lv_style_set_y(&style_normal, 100);
-
-static lv_style_t style_pressed;
-lv_style_init(&style_pressed);
-lv_style_set_y(&style_pressed, 80);
-
-lv_obj_add_style(btn1, &style_normal, LV_STATE_DEFAULT);
-lv_obj_add_style(btn1, &style_pressed, LV_STATE_PRESSED);
-
-lv_obj_add_style(btn2, &style_normal, LV_STATE_DEFAULT);
-lv_obj_add_style(btn2, &style_pressed, LV_STATE_PRESSED);
-
-lv_obj_add_style(btn3, &style_normal, LV_STATE_DEFAULT);
-lv_obj_add_style(btn3, &style_pressed, LV_STATE_PRESSED);
-```
-
-This works, but it's not really flexible because the pressed coordinate is hard-coded. If the buttons are not at y=100, `style_pressed` won't work as expected. Translations can be used to solve this:
-```c
-static lv_style_t style_normal;
-lv_style_init(&style_normal);
-lv_style_set_y(&style_normal, 100);
-
-static lv_style_t style_pressed;
-lv_style_init(&style_pressed);
-lv_style_set_translate_y(&style_pressed, -20);
-
-lv_obj_add_style(btn1, &style_normal, LV_STATE_DEFAULT);
-lv_obj_add_style(btn1, &style_pressed, LV_STATE_PRESSED);
-
-lv_obj_add_style(btn2, &style_normal, LV_STATE_DEFAULT);
-lv_obj_add_style(btn2, &style_pressed, LV_STATE_PRESSED);
-
-lv_obj_add_style(btn3, &style_normal, LV_STATE_DEFAULT);
-lv_obj_add_style(btn3, &style_pressed, LV_STATE_PRESSED);
-```
-
-Translation is applied from the current position of the object.
-
-Percentage values can be used in translations as well. The percentage is relative to the size of the object (and not to the size of the parent). For example `lv_pct(50)` will move the object with half of its width/height.
-
-The translation is applied after the layouts are calculated. Therefore, even laid out objects' position can be translated.
-
-The translation actually moves the object. That means it makes the scrollbars and `LV_SIZE_CONTENT` sized objects react to the position change.
-
-
-## Transformation
-Similarly to position, an object's size can be changed relative to the current size as well.
-The transformed width and height are added on both sides of the object. This means a 10 px transformed width makes the object 2x10 pixels wider.
-
-Unlike position translation, the size transformation doesn't make the object "really" larger. In other words scrollbars, layouts, and `LV_SIZE_CONTENT` will not react to the transformed size.
-Hence, size transformation is "only" a visual effect.
-
-This code enlarges a button when it's pressed:
-```c
-static lv_style_t style_pressed;
-lv_style_init(&style_pressed);
-lv_style_set_transform_width(&style_pressed, 10);
-lv_style_set_transform_height(&style_pressed, 10);
-
-lv_obj_add_style(btn, &style_pressed, LV_STATE_PRESSED);
-```
-
-### Min and Max size
-Similarly to CSS, LVGL also supports `min-width`, `max-width`, `min-height` and `max-height`. These are limits preventing an object's size from becoming smaller/larger than these values.
-They are especially useful if the size is set by percentage or `LV_SIZE_CONTENT`.
-```c
-static lv_style_t style_max_height;
-lv_style_init(&style_max_height);
-lv_style_set_y(&style_max_height, 200);
-
-lv_obj_set_height(obj, lv_pct(100));
-lv_obj_add_style(obj, &style_max_height, LV_STATE_DEFAULT); //Limit the height to 200 px
-```
-
-Percentage values can be used as well which are relative to the size of the parent's content area.
-```c
-static lv_style_t style_max_height;
-lv_style_init(&style_max_height);
-lv_style_set_y(&style_max_height, lv_pct(50));
-
-lv_obj_set_height(obj, lv_pct(100));
-lv_obj_add_style(obj, &style_max_height, LV_STATE_DEFAULT); //Limit the height to half parent height
-```
-
-## Layout
-
-### Overview
-Layouts can update the position and size of an object's children. They can be used to automatically arrange the children into a line or column, or in much more complicated forms.
-
-The position and size set by the layout overwrites the "normal" x, y, width, and height settings.
-
-There is only one function that is the same for every layout: `lv_obj_set_layout(obj, )` sets the layout on an object.
-For further settings of the parent and children see the documentation of the given layout.
-
-### Built-in layout
-LVGL comes with two very powerful layouts:
-- Flexbox
-- Grid
-
-Both are heavily inspired by the CSS layouts with the same name.
-
-### Flags
-There are some flags that can be used on objects to affect how they behave with layouts:
-- `LV_OBJ_FLAG_HIDDEN` Hidden objects are ignored in layout calculations.
-- `LV_OBJ_FLAG_IGNORE_LAYOUT` The object is simply ignored by the layouts. Its coordinates can be set as usual.
-- `LV_OBJ_FLAG_FLOATING` Same as `LV_OBJ_FLAG_IGNORE_LAYOUT` but the object with `LV_OBJ_FLAG_FLOATING` will be ignored in `LV_SIZE_CONTENT` calculations.
-
-These flags can be added/removed with `lv_obj_add/clear_flag(obj, FLAG);`
-
-### Adding new layouts
-
-LVGL can be freely extended by a custom layout like this:
-```c
-uint32_t MY_LAYOUT;
-
-...
-
-MY_LAYOUT = lv_layout_register(my_layout_update, &user_data);
-
-...
-
-void my_layout_update(lv_obj_t * obj, void * user_data)
-{
- /*Will be called automatically if it's required to reposition/resize the children of "obj" */
-}
-```
-
-Custom style properties can be added which can be retrieved and used in the update callback. For example:
-```c
-uint32_t MY_PROP;
-...
-
-LV_STYLE_MY_PROP = lv_style_register_prop();
-
-...
-static inline void lv_style_set_my_prop(lv_style_t * style, uint32_t value)
-{
- lv_style_value_t v = {
- .num = (int32_t)value
- };
- lv_style_set_prop(style, LV_STYLE_MY_PROP, v);
-}
-
-```
-
-## Examples
diff --git a/lib/lvgl/docs/overview/display.md b/lib/lvgl/docs/overview/display.md
deleted file mode 100644
index 2f90747..0000000
--- a/lib/lvgl/docs/overview/display.md
+++ /dev/null
@@ -1,108 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/display.md
-```
-# Displays
-
-``` important:: The basic concept of a *display* in LVGL is explained in the [Porting](/porting/display) section. So before reading further, please read the [Porting](/porting/display) section first.
-```
-
-## Multiple display support
-
-In LVGL you can have multiple displays, each with their own driver and objects. The only limitation is that every display needs to have the same color depth (as defined in `LV_COLOR_DEPTH`).
-If the displays are different in this regard the rendered image can be converted to the correct format in the drivers `flush_cb`.
-
-Creating more displays is easy: just initialize more display buffers and register another driver for every display.
-When you create the UI, use `lv_disp_set_default(disp)` to tell the library on which display to create objects.
-
-Why would you want multi-display support? Here are some examples:
-- Have a "normal" TFT display with local UI and create "virtual" screens on VNC on demand. (You need to add your VNC driver).
-- Have a large TFT display and a small monochrome display.
-- Have some smaller and simple displays in a large instrument or technology.
-- Have two large TFT displays: one for a customer and one for the shop assistant.
-
-### Using only one display
-Using more displays can be useful but in most cases it's not required. Therefore, the whole concept of multi-display handling is completely hidden if you register only one display.
-By default, the last created (and only) display is used.
-
-`lv_scr_act()`, `lv_scr_load(scr)`, `lv_layer_top()`, `lv_layer_sys()`, `LV_HOR_RES` and `LV_VER_RES` are always applied on the most recently created (default) display.
-If you pass `NULL` as `disp` parameter to display related functions the default display will usually be used.
-E.g. `lv_disp_trig_activity(NULL)` will trigger a user activity on the default display. (See below in [Inactivity](#Inactivity)).
-
-### Mirror display
-
-To mirror the image of a display to another display, you don't need to use multi-display support. Just transfer the buffer received in `drv.flush_cb` to the other display too.
-
-### Split image
-You can create a larger virtual display from an array of smaller ones. You can create it as below:
-1. Set the resolution of the displays to the large display's resolution.
-2. In `drv.flush_cb`, truncate and modify the `area` parameter for each display.
-3. Send the buffer's content to each real display with the truncated area.
-
-## Screens
-
-Every display has its own set of [screens](overview/object#screen-the-most-basic-parent) and the objects on each screen.
-
-Be sure not to confuse displays and screens:
-
-* **Displays** are the physical hardware drawing the pixels.
-* **Screens** are the high-level root objects associated with a particular display. One display can have multiple screens associated with it, but not vice versa.
-
-Screens can be considered the highest level containers which have no parent.
-A screen's size is always equal to its display and their origin is (0;0). Therefore, a screen's coordinates can't be changed, i.e. `lv_obj_set_pos()`, `lv_obj_set_size()` or similar functions can't be used on screens.
-
-A screen can be created from any object type but the two most typical types are [Base object](/widgets/obj) and [Image](/widgets/core/img) (to create a wallpaper).
-
-To create a screen, use `lv_obj_t * scr = lv__create(NULL, copy)`. `copy` can be an existing screen copied into the new screen.
-
-To load a screen, use `lv_scr_load(scr)`. To get the active screen, use `lv_scr_act()`. These functions work on the default display. If you want to specify which display to work on, use `lv_disp_get_scr_act(disp)` and `lv_disp_load_scr(disp, scr)`. A screen can be loaded with animations too. Read more [here](object.html#load-screens).
-
-Screens can be deleted with `lv_obj_del(scr)`, but ensure that you do not delete the currently loaded screen.
-
-### Transparent screens
-
-Usually, the opacity of the screen is `LV_OPA_COVER` to provide a solid background for its children. If this is not the case (opacity < 100%) the display's background color or image will be visible.
-See the [Display background](#display-background) section for more details. If the display's background opacity is also not `LV_OPA_COVER` LVGL has no solid background to draw.
-
-This configuration (transparent screen and display) could be used to create for example OSD menus where a video is played on a lower layer, and a menu is overlayed on an upper layer.
-
-To handle transparent displays, special (slower) color mixing algorithms need to be used by LVGL so this feature needs to enabled with `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`.
-As this mode operates on the Alpha channel of the pixels `LV_COLOR_DEPTH = 32` is also required. The Alpha channel of 32-bit colors will be 0 where there are no objects and 255 where there are solid objects.
-
-In summary, to enable transparent screens and displays for OSD menu-like UIs:
-- Enable `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`
-- Be sure to use `LV_COLOR_DEPTH 32`
-- Set the screen's opacity to `LV_OPA_TRANSP` e.g. with `lv_obj_set_style_local_bg_opa(lv_scr_act(), LV_OBJMASK_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP)`
-- Set the display opacity to `LV_OPA_TRANSP` with `lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);`
-
-## Features of displays
-
-### Inactivity
-
-A user's inactivity time is measured on each display. Every use of an [Input device](/overview/indev) (if [associated with the display](/porting/indev#other-features)) counts as an activity.
-To get time elapsed since the last activity, use `lv_disp_get_inactive_time(disp)`. If `NULL` is passed, the lowest inactivity time among all displays will be returned (**NULL isn't just the default display**).
-
-You can manually trigger an activity using `lv_disp_trig_activity(disp)`. If `disp` is `NULL`, the default screen will be used (**and not all displays**).
-
-### Background
-Every display has a background color, background image and background opacity properties. They become visible when the current screen is transparent or not positioned to cover the whole display.
-
-The background color is a simple color to fill the display. It can be adjusted with `lv_disp_set_bg_color(disp, color)`;
-
-The display background image is a path to a file or a pointer to an `lv_img_dsc_t` variable (converted image data) to be used as wallpaper. It can be set with `lv_disp_set_bg_image(disp, &my_img)`;
-If a background image is configured the background won't be filled with `bg_color`.
-
-The opacity of the background color or image can be adjusted with `lv_disp_set_bg_opa(disp, opa)`.
-
-The `disp` parameter of these functions can be `NULL` to select the default display.
-
-
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_disp.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/drawing.md b/lib/lvgl/docs/overview/drawing.md
deleted file mode 100644
index 3dd86ba..0000000
--- a/lib/lvgl/docs/overview/drawing.md
+++ /dev/null
@@ -1,225 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/drawing.md
-```
-# Drawing
-
-With LVGL, you don't need to draw anything manually. Just create objects (like buttons, labels, arc, etc.), move and change them, and LVGL will refresh and redraw what is required.
-
-However, it can be useful to have a basic understanding of how drawing happens in LVGL to add customization, make it easier to find bugs or just out of curiosity.
-
-The basic concept is to not draw directly onto the display but rather to first draw on an internal draw buffer. When a drawing (rendering) is ready that buffer is copied to the display.
-
-The draw buffer can be smaller than a display's size. LVGL will simply render in "tiles" that fit into the given draw buffer.
-
-This approach has two main advantages compared to directly drawing to the display:
-1. It avoids flickering while the layers of the UI are drawn. For example, if LVGL drew directly onto the display, when drawing a *background + button + text*, each "stage" would be visible for a short time.
-2. It's faster to modify a buffer in internal RAM and finally write one pixel only once than reading/writing the display directly on each pixel access.
-(e.g. via a display controller with SPI interface).
-
-Note that this concept is different from "traditional" double buffering where there are two display sized frame buffers:
-one holds the current image to show on the display, and rendering happens to the other (inactive) frame buffer, and they are swapped when the rendering is finished.
-The main difference is that with LVGL you don't have to store two frame buffers (which usually requires external RAM) but only smaller draw buffer(s) that can easily fit into internal RAM.
-
-
-## Mechanism of screen refreshing
-
-Be sure to get familiar with the [Buffering modes of LVGL](/porting/display) first.
-
-LVGL refreshes the screen in the following steps:
-1. Something happens in the UI which requires redrawing. For example, a button is pressed, a chart is changed, an animation happened, etc.
-2. LVGL saves the changed object's old and new area into a buffer, called an *Invalid area buffer*. For optimization, in some cases, objects are not added to the buffer:
- - Hidden objects are not added.
- - Objects completely out of their parent are not added.
- - Areas partially out of the parent are cropped to the parent's area.
- - Objects on other screens are not added.
-3. In every `LV_DISP_DEF_REFR_PERIOD` (set in `lv_conf.h`) the following happens:
- - LVGL checks the invalid areas and joins those that are adjacent or intersecting.
- - Takes the first joined area, if it's smaller than the *draw buffer*, then simply renders the area's content into the *draw buffer*.
- If the area doesn't fit into the buffer, draw as many lines as possible to the *draw buffer*.
- - When the area is rendered, call `flush_cb` from the display driver to refresh the display.
- - If the area was larger than the buffer, render the remaining parts too.
- - Repeat the same with remaining joined areas.
-
-When an area is redrawn the library searches the top-most object which covers that area and starts drawing from that object.
-For example, if a button's label has changed, the library will see that it's enough to draw the button under the text and it's not necessary to redraw the display under the rest of the button too.
-
-The difference between buffering modes regarding the drawing mechanism is the following:
-1. **One buffer** - LVGL needs to wait for `lv_disp_flush_ready()` (called from `flush_cb`) before starting to redraw the next part.
-2. **Two buffers** - LVGL can immediately draw to the second buffer when the first is sent to `flush_cb` because the flushing should be done by DMA (or similar hardware) in the background.
-3. **Double buffering** - `flush_cb` should only swap the addresses of the frame buffers.
-
-## Masking
-*Masking* is the basic concept of LVGL's draw engine.
-To use LVGL it's not required to know about the mechanisms described here but you might find interesting to know how drawing works under hood.
-Knowing about masking comes in handy if you want to customize drawing.
-
-To learn about masking let's see the steps of drawing first.
-LVGL performs the following steps to render any shape, image or text. It can be considered as a drawing pipeline.
-
-1. **Prepare the draw descriptors** Create a draw descriptor from an object's styles (e.g. `lv_draw_rect_dsc_t`). This gives us the parameters for drawing, for example colors, widths, opacity, fonts, radius, etc.
-2. **Call the draw function** Call the draw function with the draw descriptor and some other parameters (e.g. `lv_draw_rect()`). It will render the primitive shape to the current draw buffer.
-3. **Create masks** If the shape is very simple and doesn't require masks, go to #5. Otherwise, create the required masks in the draw function. (e.g. a rounded rectangle mask)
-4. **Calculate all the added mask** It composites opacity values into a *mask buffer* with the "shape" of the created masks.
-E.g. in case of a "line mask" according to the parameters of the mask, keep one side of the buffer as it is (255 by default) and set the rest to 0 to indicate that this side should be removed.
-5. **Blend a color or image** During blending, masking (make some pixels transparent or opaque), blending modes (additive, subtractive, etc.) and color/image opacity are handled.
-
-LVGL has the following built-in mask types which can be calculated and applied real-time:
-- `LV_DRAW_MASK_TYPE_LINE` Removes a side from a line (top, bottom, left or right). `lv_draw_line` uses four instances of it.
-Essentially, every (skew) line is bounded with four line masks forming a rectangle.
-- `LV_DRAW_MASK_TYPE_RADIUS` Removes the inner or outer corners of a rectangle with a radiused transition. It's also used to create circles by setting the radius to large value (`LV_RADIUS_CIRCLE`)
-- `LV_DRAW_MASK_TYPE_ANGLE` Removes a circular sector. It is used by `lv_draw_arc` to remove the "empty" sector.
-- `LV_DRAW_MASK_TYPE_FADE` Create a vertical fade (change opacity)
-- `LV_DRAW_MASK_TYPE_MAP` The mask is stored in a bitmap array and the necessary parts are applied
-
-Masks are used to create almost every basic primitive:
-- **letters** Create a mask from the letter and draw a rectangle with the letter's color using the mask.
-- **line** Created from four "line masks" to mask out the left, right, top and bottom part of the line to get a perfectly perpendicular perimeter.
-- **rounded rectangle** A mask is created real-time to add a radius to the corners.
-- **clip corner** To clip overflowing content (usually children) on rounded corners, a rounded rectangle mask is also applied.
-- **rectangle border** Same as a rounded rectangle but the inner part is masked out too.
-- **arc drawing** A circular border is drawn but an arc mask is applied too.
-- **ARGB images** The alpha channel is separated into a mask and the image is drawn as a normal RGB image.
-
-### Using masks
-
-Every mask type has a related parameter structure to describe the mask's data. The following parameter types exist:
-- `lv_draw_mask_line_param_t`
-- `lv_draw_mask_radius_param_t`
-- `lv_draw_mask_angle_param_t`
-- `lv_draw_mask_fade_param_t`
-- `lv_draw_mask_map_param_t`
-
-1. Initialize a mask parameter with `lv_draw_mask__init`. See `lv_draw_mask.h` for the whole API.
-2. Add the mask parameter to the draw engine with `int16_t mask_id = lv_draw_mask_add(¶m, ptr)`. `ptr` can be any pointer to identify the mask, (`NULL` if unused).
-3. Call the draw functions
-4. Remove the mask from the draw engine with `lv_draw_mask_remove_id(mask_id)` or `lv_draw_mask_remove_custom(ptr)`.
-5. Free the parameter with `lv_draw_mask_free_param(¶m)`.
-
-A parameter can be added and removed any number of times, but it needs to be freed when not required anymore.
-
-`lv_draw_mask_add` saves only the pointer of the mask so the parameter needs to be valid while in use.
-
-## Hook drawing
-Although widgets can be easily customized by styles there might be cases when something more custom is required.
-To ensure a great level of flexibility LVGL sends a lot of events during drawing with parameters that tell what LVGL is about to draw.
-Some fields of these parameters can be modified to draw something else or any custom drawing operations can be added manually.
-
-A good use case for this is the [Button matrix](/widgets/core/btnmatrix) widget. By default, its buttons can be styled in different states, but you can't style the buttons one by one.
-However, an event is sent for every button and you can, for example, tell LVGL to use different colors on a specific button or to manually draw an image on some buttons.
-
-Each of these events is described in detail below.
-
-### Main drawing
-
-These events are related to the actual drawing of an object. E.g. the drawing of buttons, texts, etc. happens here.
-
-`lv_event_get_clip_area(event)` can be used to get the current clip area. The clip area is required in draw functions to make them draw only on a limited area.
-
-#### LV_EVENT_DRAW_MAIN_BEGIN
-
-Sent before starting to draw an object. This is a good place to add masks manually. E.g. add a line mask that "removes" the right side of an object.
-
-#### LV_EVENT_DRAW_MAIN
-
-The actual drawing of an object happens in this event. E.g. a rectangle for a button is drawn here. First, the widgets' internal events are called to perform drawing and after that you can draw anything on top of them.
-For example you can add a custom text or an image.
-
-#### LV_EVENT_DRAW_MAIN_END
-
-Called when the main drawing is finished. You can draw anything here as well and it's also a good place to remove any masks created in `LV_EVENT_DRAW_MAIN_BEGIN`.
-
-### Post drawing
-
-Post drawing events are called when all the children of an object are drawn. For example LVGL use the post drawing phase to draw scrollbars because they should be above all of the children.
-
-`lv_event_get_clip_area(event)` can be used to get the current clip area.
-
-#### LV_EVENT_DRAW_POST_BEGIN
-
-Sent before starting the post draw phase. Masks can be added here too to mask out the post drawn content.
-
-#### LV_EVENT_DRAW_POST
-
-The actual drawing should happen here.
-
-#### LV_EVENT_DRAW_POST_END
-
-Called when post drawing has finished. If masks were not removed in `LV_EVENT_DRAW_MAIN_END` they should be removed here.
-
-### Part drawing
-
-When LVGL draws a part of an object (e.g. a slider's indicator, a table's cell or a button matrix's button) it sends events before and after drawing that part with some context of the drawing.
-This allows changing the parts on a very low level with masks, extra drawing, or changing the parameters that LVGL is planning to use for drawing.
-
-In these events an `lv_obj_draw_part_t` structure is used to describe the context of the drawing. Not all fields are set for every part and widget.
-To see which fields are set for a widget refer to the widget's documentation.
-
-`lv_obj_draw_part_t` has the following fields:
-
-```c
-// Always set
-const lv_area_t * clip_area; // The current clip area, required if you need to draw something in the event
-uint32_t part; // The current part for which the event is sent
-uint32_t id; // The index of the part. E.g. a button's index on button matrix or table cell index.
-
-// Draw desciptors, set only if related
-lv_draw_rect_dsc_t * rect_dsc; // A draw descriptor that can be modified to changed what LVGL will draw. Set only for rectangle-like parts
-lv_draw_label_dsc_t * label_dsc; // A draw descriptor that can be modified to changed what LVGL will draw. Set only for text-like parts
-lv_draw_line_dsc_t * line_dsc; // A draw descriptor that can be modified to changed what LVGL will draw. Set only for line-like parts
-lv_draw_img_dsc_t * img_dsc; // A draw descriptor that can be modified to changed what LVGL will draw. Set only for image-like parts
-lv_draw_arc_dsc_t * arc_dsc; // A draw descriptor that can be modified to changed what LVGL will draw. Set only for arc-like parts
-
-// Other parameters
-lv_area_t * draw_area; // The area of the part being drawn
-const lv_point_t * p1; // A point calculated during drawing. E.g. a point of a chart or the center of an arc.
-const lv_point_t * p2; // A point calculated during drawing. E.g. a point of a chart.
-char text[16]; // A text calculated during drawing. Can be modified. E.g. tick labels on a chart axis.
-lv_coord_t radius; // E.g. the radius of an arc (not the corner radius).
-int32_t value; // A value calculated during drawing. E.g. Chart's tick line value.
-const void * sub_part_ptr; // A pointer the identifies something in the part. E.g. chart series.
-```
-
-`lv_event_get_draw_part_dsc(event)` can be used to get a pointer to `lv_obj_draw_part_t`.
-
-#### LV_EVENT_DRAW_PART_BEGIN
-
-Start the drawing of a part. This is a good place to modify the draw descriptors (e.g. `rect_dsc`), or add masks.
-
-#### LV_EVENT_DRAW_PART_END
-
-Finish the drawing of a part. This is a good place to draw extra content on the part or remove masks added in `LV_EVENT_DRAW_PART_BEGIN`.
-
-### Others
-
-#### LV_EVENT_COVER_CHECK
-
-This event is used to check whether an object fully covers an area or not.
-
-`lv_event_get_cover_area(event)` returns a pointer to an area to check and `lv_event_set_cover_res(event, res)` can be used to set one of these results:
-- `LV_COVER_RES_COVER` the area is fully covered by the object
-- `LV_COVER_RES_NOT_COVER` the area is not covered by the object
-- `LV_COVER_RES_MASKED` there is a mask on the object, so it does not fully cover the area
-
-Here are some reasons why an object would be unable to fully cover an area:
-- It's simply not fully in area
-- It has a radius
-- It doesn't have 100% background opacity
-- It's an ARGB or chroma keyed image
-- It does not have normal blending mode. In this case LVGL needs to know the colors under the object to apply blending properly
-- It's a text, etc
-
-In short if for any reason the area below an object is visible than the object doesn't cover that area.
-
-Before sending this event LVGL checks if at least the widget's coordinates fully cover the area or not. If not the event is not called.
-
-You need to check only the drawing you have added. The existing properties known by a widget are handled in its internal events.
-E.g. if a widget has > 0 radius it might not cover an area, but you need to handle `radius` only if you will modify it and the widget won't know about it.
-
-#### LV_EVENT_REFR_EXT_DRAW_SIZE
-
-If you need to draw outside a widget, LVGL needs to know about it to provide extra space for drawing.
-Let's say you create an event which writes the current value of a slider above its knob. In this case LVGL needs to know that the slider's draw area should be larger with the size required for the text.
-
-You can simply set the required draw area with `lv_event_set_ext_draw_size(e, size)`.
-
diff --git a/lib/lvgl/docs/overview/event.md b/lib/lvgl/docs/overview/event.md
deleted file mode 100644
index 356f28b..0000000
--- a/lib/lvgl/docs/overview/event.md
+++ /dev/null
@@ -1,177 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/event.md
-```
-# Events
-
-Events are triggered in LVGL when something happens which might be interesting to the user, e.g. when an object
-- is clicked
-- is scrolled
-- has its value changed
-- is redrawn, etc.
-
-## Add events to the object
-
-The user can assign callback functions to an object to see its events. In practice, it looks like this:
-```c
-lv_obj_t * btn = lv_btn_create(lv_scr_act());
-lv_obj_add_event_cb(btn, my_event_cb, LV_EVENT_CLICKED, NULL); /*Assign an event callback*/
-
-...
-
-static void my_event_cb(lv_event_t * event)
-{
- printf("Clicked\n");
-}
-```
-In the example `LV_EVENT_CLICKED` means that only the click event will call `my_event_cb`. See the [list of event codes](#event-codes) for all the options.
-`LV_EVENT_ALL` can be used to receive all events.
-
-The last parameter of `lv_obj_add_event_cb` is a pointer to any custom data that will be available in the event. It will be described later in more detail.
-
-More events can be added to an object, like this:
-```c
-lv_obj_add_event_cb(obj, my_event_cb_1, LV_EVENT_CLICKED, NULL);
-lv_obj_add_event_cb(obj, my_event_cb_2, LV_EVENT_PRESSED, NULL);
-lv_obj_add_event_cb(obj, my_event_cb_3, LV_EVENT_ALL, NULL); /*No filtering, receive all events*/
-```
-
-Even the same event callback can be used on an object with different `user_data`. For example:
-```c
-lv_obj_add_event_cb(obj, increment_on_click, LV_EVENT_CLICKED, &num1);
-lv_obj_add_event_cb(obj, increment_on_click, LV_EVENT_CLICKED, &num2);
-```
-
-The events will be called in the order as they were added.
-
-
-Other objects can use the same *event callback*.
-
-
-## Remove event(s) from an object
-
-Events can be removed from an object with the `lv_obj_remove_event_cb(obj, event_cb)` function or `lv_obj_remove_event_dsc(obj, event_dsc)`. `event_dsc` is a pointer returned by `lv_obj_add_event_cb`.
-
-## Event codes
-
-The event codes can be grouped into these categories:
-- Input device events
-- Drawing events
-- Other events
-- Special events
-- Custom events
-
-All objects (such as Buttons/Labels/Sliders etc.) regardless their type receive the *Input device*, *Drawing* and *Other* events.
-
-However, the *Special events* are specific to a particular widget type. See the [widgets' documentation](/widgets/index) to learn when they are sent,
-
-*Custom events* are added by the user and are never sent by LVGL.
-
-The following event codes exist:
-
-### Input device events
-- `LV_EVENT_PRESSED` An object has been pressed
-- `LV_EVENT_PRESSING` An object is being pressed (called continuously while pressing)
-- `LV_EVENT_PRESS_LOST` An object is still being pressed but slid cursor/finger off of the object
-- `LV_EVENT_SHORT_CLICKED` An object was pressed for a short period of time, then released. Not called if scrolled.
-- `LV_EVENT_LONG_PRESSED` An object has been pressed for at least the `long_press_time` specified in the input device driver. Not called if scrolled.
-- `LV_EVENT_LONG_PRESSED_REPEAT` Called after `long_press_time` in every `long_press_repeat_time` ms. Not called if scrolled.
-- `LV_EVENT_CLICKED` Called on release if an object did not scroll (regardless of long press)
-- `LV_EVENT_RELEASED` Called in every case when an object has been released
-- `LV_EVENT_SCROLL_BEGIN` Scrolling begins. The event parameter is `NULL` or an `lv_anim_t *` with a scroll animation descriptor that can be modified if required.
-- `LV_EVENT_SCROLL_END` Scrolling ends.
-- `LV_EVENT_SCROLL` An object was scrolled
-- `LV_EVENT_GESTURE` A gesture is detected. Get the gesture with `lv_indev_get_gesture_dir(lv_indev_get_act());`
-- `LV_EVENT_KEY` A key is sent to an object. Get the key with `lv_indev_get_key(lv_indev_get_act());`
-- `LV_EVENT_FOCUSED` An object is focused
-- `LV_EVENT_DEFOCUSED` An object is unfocused
-- `LV_EVENT_LEAVE` An object is unfocused but still selected
-- `LV_EVENT_HIT_TEST` Perform advanced hit-testing. Use `lv_hit_test_info_t * a = lv_event_get_hit_test_info(e)` and check if `a->point` can click the object or not. If not set `a->res = false`
-
-
-### Drawing events
-- `LV_EVENT_COVER_CHECK` Check if an object fully covers an area. The event parameter is `lv_cover_check_info_t *`.
-- `LV_EVENT_REFR_EXT_DRAW_SIZE` Get the required extra draw area around an object (e.g. for a shadow). The event parameter is `lv_coord_t *` to store the size. Only overwrite it with a larger value.
-- `LV_EVENT_DRAW_MAIN_BEGIN` Starting the main drawing phase.
-- `LV_EVENT_DRAW_MAIN` Perform the main drawing
-- `LV_EVENT_DRAW_MAIN_END` Finishing the main drawing phase
-- `LV_EVENT_DRAW_POST_BEGIN` Starting the post draw phase (when all children are drawn)
-- `LV_EVENT_DRAW_POST` Perform the post draw phase (when all children are drawn)
-- `LV_EVENT_DRAW_POST_END` Finishing the post draw phase (when all children are drawn)
-- `LV_EVENT_DRAW_PART_BEGIN` Starting to draw a part. The event parameter is `lv_obj_draw_dsc_t *`. Learn more [here](/overview/drawing).
-- `LV_EVENT_DRAW_PART_END` Finishing to draw a part. The event parameter is `lv_obj_draw_dsc_t *`. Learn more [here](/overview/drawing).
-
-In `LV_EVENT_DRAW_...` events it's not allowed to adjust the widgets' properties. E.g. you can not call `lv_obj_set_width()`.
-In other words only `get` functions can be called.
-
-### Other events
-- `LV_EVENT_DELETE` Object is being deleted
-- `LV_EVENT_CHILD_CHANGED` Child was removed/added
-- `LV_EVENT_CHILD_CREATED` Child was created, always bubbles up to all parents
-- `LV_EVENT_CHILD_DELETED` Child was deleted, always bubbles up to all parents
-- `LV_EVENT_SIZE_CHANGED` Object coordinates/size have changed
-- `LV_EVENT_STYLE_CHANGED` Object's style has changed
-- `LV_EVENT_BASE_DIR_CHANGED` The base dir has changed
-- `LV_EVENT_GET_SELF_SIZE` Get the internal size of a widget
-- `LV_EVENT_SCREEN_UNLOAD_START` A screen unload started, fired immediately when lv_scr_load/lv_scr_load_anim is called
-- `LV_EVENT_SCREEN_LOAD_START` A screen load started, fired when the screen change delay is expired
-- `LV_EVENT_SCREEN_LOADED` A screen was loaded, called when all animations are finished
-- `LV_EVENT_SCREEN_UNLOADED` A screen was unloaded, called when all animations are finished
-
-### Special events
-- `LV_EVENT_VALUE_CHANGED` The object's value has changed (i.e. slider moved)
-- `LV_EVENT_INSERT` Text is being inserted into the object. The event data is `char *` being inserted.
-- `LV_EVENT_REFRESH` Notify the object to refresh something on it (for the user)
-- `LV_EVENT_READY` A process has finished
-- `LV_EVENT_CANCEL` A process has been canceled
-
-
-### Custom events
-Any custom event codes can be registered by `uint32_t MY_EVENT_1 = lv_event_register_id();`
-
-They can be sent to any object with `lv_event_send(obj, MY_EVENT_1, &some_data)`
-
-## Sending events
-
-To manually send events to an object, use `lv_event_send(obj, &some_data)`.
-
-For example, this can be used to manually close a message box by simulating a button press (although there are simpler ways to do this):
-```c
-/*Simulate the press of the first button (indexes start from zero)*/
-uint32_t btn_id = 0;
-lv_event_send(mbox, LV_EVENT_VALUE_CHANGED, &btn_id);
-```
-
-### Refresh event
-
-`LV_EVENT_REFRESH` is a special event because it's designed to let the user notify an object to refresh itself. Some examples:
-- notify a label to refresh its text according to one or more variables (e.g. current time)
-- refresh a label when the language changes
-- enable a button if some conditions are met (e.g. the correct PIN is entered)
-- add/remove styles to/from an object if a limit is exceeded, etc
-
-## Fields of lv_event_t
-
-`lv_event_t` is the only parameter passed to the event callback and it contains all data about the event. The following values can be gotten from it:
-- `lv_event_get_code(e)` get the event code
-- `lv_event_get_current_target(e)` get the object to which an event was sent. I.e. the object whose event handler is being called.
-- `lv_event_get_target(e)` get the object that originally triggered the event (different from `lv_event_get_target` if [event bubbling](#event-bubbling) is enabled)
-- `lv_event_get_user_data(e)` get the pointer passed as the last parameter of `lv_obj_add_event_cb`.
-- `lv_event_get_param(e)` get the parameter passed as the last parameter of `lv_event_send`
-
-
-## Event bubbling
-
-If `lv_obj_add_flag(obj, LV_OBJ_FLAG_EVENT_BUBBLE)` is enabled all events will be sent to an object's parent too. If the parent also has `LV_OBJ_FLAG_EVENT_BUBBLE` enabled the event will be sent to its parent and so on.
-
-The *target* parameter of the event is always the current target object, not the original object. To get the original target call `lv_event_get_original_target(e)` in the event handler.
-
-
-
-## Examples
-
-```eval_rst
-
-.. include:: ../../examples/event/index.rst
-
-```
diff --git a/lib/lvgl/docs/overview/file-system.md b/lib/lvgl/docs/overview/file-system.md
deleted file mode 100644
index 367f554..0000000
--- a/lib/lvgl/docs/overview/file-system.md
+++ /dev/null
@@ -1,135 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/file-system.md
-```
-# File system
-
-LVGL has a 'File system' abstraction module that enables you to attach any type of file system.
-A file system is identified by an assigned drive letter.
-For example, if an SD card is associated with the letter `'S'`, a file can be reached using `"S:path/to/file.txt"`.
-
-## Ready to use drivers
-The [lv_fs_if](https://github.com/lvgl/lv_fs_if) repository contains prepared drivers using POSIX, standard C and the [FATFS](http://elm-chan.org/fsw/ff/00index_e.html) API.
-See its [README](https://github.com/lvgl/lv_fs_if#readme) for the details.
-
-## Adding a driver
-
-### Registering a driver
-To add a driver, a `lv_fs_drv_t` needs to be initialized like below. The `lv_fs_drv_t` needs to be static, global or dynamically allocated and not a local variable.
-```c
-static lv_fs_drv_t drv; /*Needs to be static or global*/
-lv_fs_drv_init(&drv); /*Basic initialization*/
-
-drv.letter = 'S'; /*An uppercase letter to identify the drive */
-drv.cache_size = my_cache_size; /*Cache size for reading in bytes. 0 to not cache.*/
-
-drv.ready_cb = my_ready_cb; /*Callback to tell if the drive is ready to use */
-drv.open_cb = my_open_cb; /*Callback to open a file */
-drv.close_cb = my_close_cb; /*Callback to close a file */
-drv.read_cb = my_read_cb; /*Callback to read a file */
-drv.write_cb = my_write_cb; /*Callback to write a file */
-drv.seek_cb = my_seek_cb; /*Callback to seek in a file (Move cursor) */
-drv.tell_cb = my_tell_cb; /*Callback to tell the cursor position */
-
-drv.dir_open_cb = my_dir_open_cb; /*Callback to open directory to read its content */
-drv.dir_read_cb = my_dir_read_cb; /*Callback to read a directory's content */
-drv.dir_close_cb = my_dir_close_cb; /*Callback to close a directory */
-
-drv.user_data = my_user_data; /*Any custom data if required*/
-
-lv_fs_drv_register(&drv); /*Finally register the drive*/
-
-```
-
-Any of the callbacks can be `NULL` to indicate that operation is not supported.
-
-
-### Implementing the callbacks
-
-#### Open callback
-The prototype of `open_cb` looks like this:
-```c
-void * (*open_cb)(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
-```
-
-`path` is the path after the drive letter (e.g. "S:path/to/file.txt" -> "path/to/file.txt"). `mode` can be `LV_FS_MODE_WR` or `LV_FS_MODE_RD` to open for writes or reads.
-
-The return value is a pointer to a *file object* that describes the opened file or `NULL` if there were any issues (e.g. the file wasn't found).
-The returned file object will be passed to other file system related callbacks. (see below)
-
-### Other callbacks
-The other callbacks are quite similar. For example `write_cb` looks like this:
-```c
-lv_fs_res_t (*write_cb)(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
-```
-
-For `file_p`, LVGL passes the return value of `open_cb`, `buf` is the data to write, `btw` is the Bytes To Write, `bw` is the actually written bytes.
-
-For a template of these callbacks see [lv_fs_template.c](https://github.com/lvgl/lvgl/blob/master/examples/porting/lv_port_fs_template.c).
-
-
-## Usage example
-
-The example below shows how to read from a file:
-```c
-lv_fs_file_t f;
-lv_fs_res_t res;
-res = lv_fs_open(&f, "S:folder/file.txt", LV_FS_MODE_RD);
-if(res != LV_FS_RES_OK) my_error_handling();
-
-uint32_t read_num;
-uint8_t buf[8];
-res = lv_fs_read(&f, buf, 8, &read_num);
-if(res != LV_FS_RES_OK || read_num != 8) my_error_handling();
-
-lv_fs_close(&f);
-```
-*The mode in `lv_fs_open` can be `LV_FS_MODE_WR` to open for writes only or `LV_FS_MODE_RD | LV_FS_MODE_WR` for both*
-
-This example shows how to read a directory's content. It's up to the driver how to mark directories in the result but it can be a good practice to insert a `'/'` in front of each directory name.
-```c
-lv_fs_dir_t dir;
-lv_fs_res_t res;
-res = lv_fs_dir_open(&dir, "S:/folder");
-if(res != LV_FS_RES_OK) my_error_handling();
-
-char fn[256];
-while(1) {
- res = lv_fs_dir_read(&dir, fn);
- if(res != LV_FS_RES_OK) {
- my_error_handling();
- break;
- }
-
- /*fn is empty, if not more files to read*/
- if(strlen(fn) == 0) {
- break;
- }
-
- printf("%s\n", fn);
-}
-
-lv_fs_dir_close(&dir);
-```
-
-## Use drives for images
-
-[Image](/widgets/core/img) objects can be opened from files too (besides variables stored in the compiled program).
-
-To use files in image widgets the following callbacks are required:
-- open
-- close
-- read
-- seek
-- tell
-
-
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_fs.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/font.md b/lib/lvgl/docs/overview/font.md
deleted file mode 100644
index a9b26f9..0000000
--- a/lib/lvgl/docs/overview/font.md
+++ /dev/null
@@ -1,269 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/font.md
-```
-# Fonts
-
-In LVGL fonts are collections of bitmaps and other information required to render images of individual letters (glyph).
-A font is stored in a `lv_font_t` variable and can be set in a style's *text_font* field. For example:
-```c
-lv_style_set_text_font(&my_style, &lv_font_montserrat_28); /*Set a larger font*/
-```
-
-Fonts have a **bpp (bits per pixel)** property. It shows how many bits are used to describe a pixel in a font. The value stored for a pixel determines the pixel's opacity.
-This way, with higher *bpp*, the edges of the letter can be smoother. The possible *bpp* values are 1, 2, 4 and 8 (higher values mean better quality).
-
-The *bpp* property also affects the amount of memory needed to store a font. For example, *bpp = 4* makes a font nearly four times larger compared to *bpp = 1*.
-
-## Unicode support
-
-LVGL supports **UTF-8** encoded Unicode characters.
-Your editor needs to be configured to save your code/text as UTF-8 (usually this the default) and be sure that, `LV_TXT_ENC` is set to `LV_TXT_ENC_UTF8` in *lv_conf.h*. (This is the default value)
-
-To test it try
-```c
-lv_obj_t * label1 = lv_label_create(lv_scr_act(), NULL);
-lv_label_set_text(label1, LV_SYMBOL_OK);
-```
-
-If all works well, a ✓ character should be displayed.
-
-## Built-in fonts
-
-There are several built-in fonts in different sizes, which can be enabled in `lv_conf.h` with *LV_FONT_...* defines.
-### Normal fonts
-Containing all the ASCII characters, the degree symbol (U+00B0), the bullet symbol (U+2022) and the built-in symbols (see below).
-- `LV_FONT_MONTSERRAT_12` 12 px font
-- `LV_FONT_MONTSERRAT_14` 14 px font
-- `LV_FONT_MONTSERRAT_16` 16 px font
-- `LV_FONT_MONTSERRAT_18` 18 px font
-- `LV_FONT_MONTSERRAT_20` 20 px font
-- `LV_FONT_MONTSERRAT_22` 22 px font
-- `LV_FONT_MONTSERRAT_24` 24 px font
-- `LV_FONT_MONTSERRAT_26` 26 px font
-- `LV_FONT_MONTSERRAT_28` 28 px font
-- `LV_FONT_MONTSERRAT_30` 30 px font
-- `LV_FONT_MONTSERRAT_32` 32 px font
-- `LV_FONT_MONTSERRAT_34` 34 px font
-- `LV_FONT_MONTSERRAT_36` 36 px font
-- `LV_FONT_MONTSERRAT_38` 38 px font
-- `LV_FONT_MONTSERRAT_40` 40 px font
-- `LV_FONT_MONTSERRAT_42` 42 px font
-- `LV_FONT_MONTSERRAT_44` 44 px font
-- `LV_FONT_MONTSERRAT_46` 46 px font
-- `LV_FONT_MONTSERRAT_48` 48 px font
-
-### Special fonts
-- `LV_FONT_MONTSERRAT_12_SUBPX` Same as normal 12 px font but with [subpixel rendering](#subpixel-rendering)
-- `LV_FONT_MONTSERRAT_28_COMPRESSED` Same as normal 28 px font but stored as a [compressed font](#compress-fonts) with 3 bpp
-- `LV_FONT_DEJAVU_16_PERSIAN_HEBREW` 16 px font with normal range + Hebrew, Arabic, Persian letters and all their forms
-- `LV_FONT_SIMSUN_16_CJK`16 px font with normal range plus 1000 of the most common CJK radicals
-- `LV_FONT_UNSCII_8` 8 px pixel perfect font with only ASCII characters
-- `LV_FONT_UNSCII_16` 16 px pixel perfect font with only ASCII characters
-
-
-The built-in fonts are **global variables** with names like `lv_font_montserrat_16` for a 16 px height font. To use them in a style, just add a pointer to a font variable like shown above.
-
-The built-in fonts with *bpp = 4* contain the ASCII characters and use the [Montserrat](https://fonts.google.com/specimen/Montserrat) font.
-
-In addition to the ASCII range, the following symbols are also added to the built-in fonts from the [FontAwesome](https://fontawesome.com/) font.
-
-
-
-The symbols can be used singly as:
-```c
-lv_label_set_text(my_label, LV_SYMBOL_OK);
-```
-
-Or together with strings (compile time string concatenation):
-```c
-lv_label_set_text(my_label, LV_SYMBOL_OK "Apply");
-```
-
-Or more symbols together:
-```c
-lv_label_set_text(my_label, LV_SYMBOL_OK LV_SYMBOL_WIFI LV_SYMBOL_PLAY);
-```
-
-## Special features
-
-### Bidirectional support
-Most languages use a Left-to-Right (LTR for short) writing direction, however some languages (such as Hebrew, Persian or Arabic) use Right-to-Left (RTL for short) direction.
-
-LVGL not only supports RTL texts but supports mixed (a.k.a. bidirectional, BiDi) text rendering too. Some examples:
-
-
-
-BiDi support is enabled by `LV_USE_BIDI` in *lv_conf.h*
-
-All texts have a base direction (LTR or RTL) which determines some rendering rules and the default alignment of the text (Left or Right).
-However, in LVGL, the base direction is not only applied to labels. It's a general property which can be set for every object.
-If not set then it will be inherited from the parent.
-This means it's enough to set the base direction of a screen and every object will inherit it.
-
-The default base direction for screens can be set by `LV_BIDI_BASE_DIR_DEF` in *lv_conf.h* and other objects inherit the base direction from their parent.
-
-To set an object's base direction use `lv_obj_set_base_dir(obj, base_dir)`. The possible base directions are:
-- `LV_BIDI_DIR_LTR`: Left to Right base direction
-- `LV_BIDI_DIR_RTL`: Right to Left base direction
-- `LV_BIDI_DIR_AUTO`: Auto detect base direction
-- `LV_BIDI_DIR_INHERIT`: Inherit base direction from the parent (or a default value for non-screen objects)
-
-This list summarizes the effect of RTL base direction on objects:
-- Create objects by default on the right
-- `lv_tabview`: Displays tabs from right to left
-- `lv_checkbox`: Shows the box on the right
-- `lv_btnmatrix`: Shows buttons from right to left
-- `lv_list`: Shows icons on the right
-- `lv_dropdown`: Aligns options to the right
-- The texts in `lv_table`, `lv_btnmatrix`, `lv_keyboard`, `lv_tabview`, `lv_dropdown`, `lv_roller` are "BiDi processed" to be displayed correctly
-
-### Arabic and Persian support
-There are some special rules to display Arabic and Persian characters: the *form* of a character depends on its position in the text.
-A different form of the same letter needs to be used when it is isolated, at start, middle or end positions. Besides these, some conjunction rules should also be taken into account.
-
-LVGL supports these rules if `LV_USE_ARABIC_PERSIAN_CHARS` is enabled.
-
-However, there are some limitations:
-- Only displaying text is supported (e.g. on labels), text inputs (e.g. text area) don't support this feature.
-- Static text (i.e. const) is not processed. E.g. texts set by `lv_label_set_text()` will be "Arabic processed" but `lv_lable_set_text_static()` won't.
-- Text get functions (e.g. `lv_label_get_text()`) will return the processed text.
-
-### Subpixel rendering
-
-Subpixel rendering allows for tripling the horizontal resolution by rendering anti-aliased edges on Red, Green and Blue channels instead of at pixel level granularity. This takes advantage of the position of physical color channels of each pixel, resulting in higher quality letter anti-aliasing. Learn more [here](https://en.wikipedia.org/wiki/Subpixel_rendering).
-
-For subpixel rendering, the fonts need to be generated with special settings:
-- In the online converter tick the `Subpixel` box
-- In the command line tool use `--lcd` flag. Note that the generated font needs about three times more memory.
-
-Subpixel rendering works only if the color channels of the pixels have a horizontal layout. That is the R, G, B channels are next to each other and not above each other.
-The order of color channels also needs to match with the library settings. By default, LVGL assumes `RGB` order, however this can be swapped by setting `LV_SUBPX_BGR 1` in *lv_conf.h*.
-
-### Compressed fonts
-The bitmaps of fonts can be compressed by
-- ticking the `Compressed` check box in the online converter
-- not passing the `--no-compress` flag to the offline converter (compression is applied by default)
-
-Compression is more effective with larger fonts and higher bpp. However, it's about 30% slower to render compressed fonts.
-Therefore, it's recommended to compress only the largest fonts of a user interface, because
-- they need the most memory
-- they can be compressed better
-- and probably they are used less frequently then the medium-sized fonts, so the performance cost is smaller.
-
-## Add a new font
-
-There are several ways to add a new font to your project:
-1. The simplest method is to use the [Online font converter](https://lvgl.io/tools/fontconverter). Just set the parameters, click the *Convert* button, copy the font to your project and use it. **Be sure to carefully read the steps provided on that site or you will get an error while converting.**
-2. Use the [Offline font converter](https://github.com/lvgl/lv_font_conv). (Requires Node.js to be installed)
-3. If you want to create something like the built-in fonts (Montserrat font and symbols) but in a different size and/or ranges, you can use the `built_in_font_gen.py` script in `lvgl/scripts/built_in_font` folder.
-(This requires Python and `lv_font_conv` to be installed)
-
-To declare a font in a file, use `LV_FONT_DECLARE(my_font_name)`.
-
-To make fonts globally available (like the built-in fonts), add them to `LV_FONT_CUSTOM_DECLARE` in *lv_conf.h*.
-
-## Add new symbols
-The built-in symbols are created from the [FontAwesome](https://fontawesome.com/) font.
-
-1. Search for a symbol on [https://fontawesome.com](https://fontawesome.com). For example the [USB symbol](https://fontawesome.com/icons/usb?style=brands). Copy its Unicode ID which is `0xf287` in this case.
-2. Open the [Online font converter](https://lvgl.io/tools/fontconverter). Add [FontAwesome.woff](https://lvgl.io/assets/others/FontAwesome5-Solid+Brands+Regular.woff). .
-3. Set the parameters such as Name, Size, BPP. You'll use this name to declare and use the font in your code.
-4. Add the Unicode ID of the symbol to the range field. E.g.` 0xf287` for the USB symbol. More symbols can be enumerated with `,`.
-5. Convert the font and copy the generated source code to your project. Make sure to compile the .c file of your font.
-6. Declare the font using `extern lv_font_t my_font_name;` or simply use `LV_FONT_DECLARE(my_font_name);`.
-
-**Using the symbol**
-1. Convert the Unicode value to UTF8, for example on [this site](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=f287&mode=hex). For `0xf287` the *Hex UTF-8 bytes* are `EF 8A 87`.
-2. Create a `define` string from the UTF8 values: `#define MY_USB_SYMBOL "\xEF\x8A\x87"`
-3. Create a label and set the text. Eg. `lv_label_set_text(label, MY_USB_SYMBOL)`
-
-Note - `lv_label_set_text(label, MY_USB_SYMBOL)` searches for this symbol in the font defined in `style.text.font` properties. To use the symbol you may need to change it. Eg ` style.text.font = my_font_name`
-
-## Load a font at run-time
-`lv_font_load` can be used to load a font from a file. The font needs to have a special binary format. (Not TTF or WOFF).
-Use [lv_font_conv](https://github.com/lvgl/lv_font_conv/) with the `--format bin` option to generate an LVGL compatible font file.
-
-Note that to load a font [LVGL's filesystem](/overview/file-system) needs to be enabled and a driver must be added.
-
-Example
-```c
-lv_font_t * my_font;
-my_font = lv_font_load(X/path/to/my_font.bin);
-
-/*Use the font*/
-
-/*Free the font if not required anymore*/
-lv_font_free(my_font);
-```
-
-
-## Add a new font engine
-
-LVGL's font interface is designed to be very flexible but, even so, you can add your own font engine in place of LVGL's internal one.
-For example, you can use [FreeType](https://www.freetype.org/) to real-time render glyphs from TTF fonts or use an external flash to store the font's bitmap and read them when the library needs them.
-
-A ready to use FreeType can be found in [lv_freetype](https://github.com/lvgl/lv_lib_freetype) repository.
-
-To do this, a custom `lv_font_t` variable needs to be created:
-```c
-/*Describe the properties of a font*/
-lv_font_t my_font;
-my_font.get_glyph_dsc = my_get_glyph_dsc_cb; /*Set a callback to get info about glyphs*/
-my_font.get_glyph_bitmap = my_get_glyph_bitmap_cb; /*Set a callback to get bitmap of a glyph*/
-my_font.line_height = height; /*The real line height where any text fits*/
-my_font.base_line = base_line; /*Base line measured from the top of line_height*/
-my_font.dsc = something_required; /*Store any implementation specific data here*/
-my_font.user_data = user_data; /*Optionally some extra user data*/
-
-...
-
-/* Get info about glyph of `unicode_letter` in `font` font.
- * Store the result in `dsc_out`.
- * The next letter (`unicode_letter_next`) might be used to calculate the width required by this glyph (kerning)
- */
-bool my_get_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next)
-{
- /*Your code here*/
-
- /* Store the result.
- * For example ...
- */
- dsc_out->adv_w = 12; /*Horizontal space required by the glyph in [px]*/
- dsc_out->box_h = 8; /*Height of the bitmap in [px]*/
- dsc_out->box_w = 6; /*Width of the bitmap in [px]*/
- dsc_out->ofs_x = 0; /*X offset of the bitmap in [pf]*/
- dsc_out->ofs_y = 3; /*Y offset of the bitmap measured from the as line*/
- dsc_out->bpp = 2; /*Bits per pixel: 1/2/4/8*/
-
- return true; /*true: glyph found; false: glyph was not found*/
-}
-
-
-/* Get the bitmap of `unicode_letter` from `font`. */
-const uint8_t * my_get_glyph_bitmap_cb(const lv_font_t * font, uint32_t unicode_letter)
-{
- /* Your code here */
-
- /* The bitmap should be a continuous bitstream where
- * each pixel is represented by `bpp` bits */
-
- return bitmap; /*Or NULL if not found*/
-}
-```
-
-## Use font fallback
-
-You can specify `fallback` in `lv_font_t` to provide fallback to the font. When the font
-fails to find glyph to a letter, it will try to let font from `fallback` to handle.
-
-`fallback` can be chained, so it will try to solve until there is no `fallback` set.
-
-```c
-/* Roboto font doesn't have support for CJK glyphs */
-lv_font_t *roboto = my_font_load_function();
-/* Droid Sans Fallback has more glyphs but its typeface doesn't look good as Roboto */
-lv_font_t *droid_sans_fallback = my_font_load_function();
-/* So now we can display Roboto for supported characters while having wider characters set support */
-roboto->fallback = droid_sans_fallback;
-```
diff --git a/lib/lvgl/docs/overview/image.md b/lib/lvgl/docs/overview/image.md
deleted file mode 100644
index 5843615..0000000
--- a/lib/lvgl/docs/overview/image.md
+++ /dev/null
@@ -1,334 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/image.md
-```
-# Images
-
-An image can be a file or a variable which stores the bitmap itself and some metadata.
-
-## Store images
-You can store images in two places
-- as a variable in internal memory (RAM or ROM)
-- as a file
-
-### Variables
-Images stored internally in a variable are composed mainly of an `lv_img_dsc_t` structure with the following fields:
-- **header**
- - *cf* Color format. See [below](#color-format)
- - *w* width in pixels (<= 2048)
- - *h* height in pixels (<= 2048)
- - *always zero* 3 bits which need to be always zero
- - *reserved* reserved for future use
-- **data** pointer to an array where the image itself is stored
-- **data_size** length of `data` in bytes
-
-These are usually stored within a project as C files. They are linked into the resulting executable like any other constant data.
-
-### Files
-To deal with files you need to add a storage *Drive* to LVGL. In short, a *Drive* is a collection of functions (*open*, *read*, *close*, etc.) registered in LVGL to make file operations.
-You can add an interface to a standard file system (FAT32 on SD card) or you create your simple file system to read data from an SPI Flash memory.
-In every case, a *Drive* is just an abstraction to read and/or write data to memory.
-See the [File system](/overview/file-system) section to learn more.
-
-Images stored as files are not linked into the resulting executable, and must be read into RAM before being drawn. As a result, they are not as resource-friendly as images linked at compile time. However, they are easier to replace without needing to rebuild the main program.
-
-## Color formats
-Various built-in color formats are supported:
-- **LV_IMG_CF_TRUE_COLOR** Simply stores the RGB colors (in whatever color depth LVGL is configured for).
-- **LV_IMG_CF_TRUE_COLOR_ALPHA** Like `LV_IMG_CF_TRUE_COLOR` but it also adds an alpha (transparency) byte for every pixel.
-- **LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED** Like `LV_IMG_CF_TRUE_COLOR` but if a pixel has the `LV_COLOR_TRANSP` color (set in *lv_conf.h*) it will be transparent.
-- **LV_IMG_CF_INDEXED_1/2/4/8BIT** Uses a palette with 2, 4, 16 or 256 colors and stores each pixel in 1, 2, 4 or 8 bits.
-- **LV_IMG_CF_ALPHA_1/2/4/8BIT** **Only stores the Alpha value with 1, 2, 4 or 8 bits.** The pixels take the color of `style.img_recolor` and the set opacity. The source image has to be an alpha channel. This is ideal for bitmaps similar to fonts where the whole image is one color that can be altered.
-
-The bytes of `LV_IMG_CF_TRUE_COLOR` images are stored in the following order.
-
-For 32-bit color depth:
-- Byte 0: Blue
-- Byte 1: Green
-- Byte 2: Red
-- Byte 3: Alpha
-
-For 16-bit color depth:
-- Byte 0: Green 3 lower bit, Blue 5 bit
-- Byte 1: Red 5 bit, Green 3 higher bit
-- Byte 2: Alpha byte (only with LV_IMG_CF_TRUE_COLOR_ALPHA)
-
-For 8-bit color depth:
-- Byte 0: Red 3 bit, Green 3 bit, Blue 2 bit
-- Byte 2: Alpha byte (only with LV_IMG_CF_TRUE_COLOR_ALPHA)
-
-
-You can store images in a *Raw* format to indicate that it's not encoded with one of the built-in color formats and an external [Image decoder](#image-decoder) needs to be used to decode the image.
-- **LV_IMG_CF_RAW** Indicates a basic raw image (e.g. a PNG or JPG image).
-- **LV_IMG_CF_RAW_ALPHA** Indicates that an image has alpha and an alpha byte is added for every pixel.
-- **LV_IMG_CF_RAW_CHROMA_KEYED** Indicates that an image is chroma-keyed as described in `LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED` above.
-
-
-## Add and use images
-
-You can add images to LVGL in two ways:
-- using the online converter
-- manually create images
-
-### Online converter
-The online Image converter is available here: https://lvgl.io/tools/imageconverter
-
-Adding an image to LVGL via the online converter is easy.
-
-1. You need to select a *BMP*, *PNG* or *JPG* image first.
-2. Give the image a name that will be used within LVGL.
-3. Select the [Color format](#color-formats).
-4. Select the type of image you want. Choosing a binary will generate a `.bin` file that must be stored separately and read using the [file support](#files). Choosing a variable will generate a standard C file that can be linked into your project.
-5. Hit the *Convert* button. Once the conversion is finished, your browser will automatically download the resulting file.
-
-In the generated C arrays (variables), bitmaps for all the color depths (1, 8, 16 or 32) are included in the C file, but only the color depth that matches `LV_COLOR_DEPTH` in *lv_conf.h* will actually be linked into the resulting executable.
-
-In the case of binary files, you need to specify the color format you want:
-- RGB332 for 8-bit color depth
-- RGB565 for 16-bit color depth
-- RGB565 Swap for 16-bit color depth (two bytes are swapped)
-- RGB888 for 32-bit color depth
-
-### Manually create an image
-If you are generating an image at run-time, you can craft an image variable to display it using LVGL. For example:
-
-```c
-uint8_t my_img_data[] = {0x00, 0x01, 0x02, ...};
-
-static lv_img_dsc_t my_img_dsc = {
- .header.always_zero = 0,
- .header.w = 80,
- .header.h = 60,
- .data_size = 80 * 60 * LV_COLOR_DEPTH / 8,
- .header.cf = LV_IMG_CF_TRUE_COLOR, /*Set the color format*/
- .data = my_img_data,
-};
-
-```
-
-If the color format is `LV_IMG_CF_TRUE_COLOR_ALPHA` you can set `data_size` like `80 * 60 * LV_IMG_PX_SIZE_ALPHA_BYTE`.
-
-Another (possibly simpler) option to create and display an image at run-time is to use the [Canvas](/widgets/core/canvas) object.
-
-### Use images
-
-The simplest way to use an image in LVGL is to display it with an [lv_img](/widgets/core/img) object:
-
-```c
-lv_obj_t * icon = lv_img_create(lv_scr_act(), NULL);
-
-/*From variable*/
-lv_img_set_src(icon, &my_icon_dsc);
-
-/*From file*/
-lv_img_set_src(icon, "S:my_icon.bin");
-```
-
-If the image was converted with the online converter, you should use `LV_IMG_DECLARE(my_icon_dsc)` to declare the image in the file where you want to use it.
-
-
-## Image decoder
-As you can see in the [Color formats](#color-formats) section, LVGL supports several built-in image formats. In many cases, these will be all you need. LVGL doesn't directly support, however, generic image formats like PNG or JPG.
-
-To handle non-built-in image formats, you need to use external libraries and attach them to LVGL via the *Image decoder* interface.
-
-An image decoder consists of 4 callbacks:
-- **info** get some basic info about the image (width, height and color format).
-- **open** open an image: either store a decoded image or set it to `NULL` to indicate the image can be read line-by-line.
-- **read** if *open* didn't fully open an image this function should give some decoded data (max 1 line) from a given position.
-- **close** close an opened image, free the allocated resources.
-
-You can add any number of image decoders. When an image needs to be drawn, the library will try all the registered image decoders until it finds one which can open the image, i.e. one which knows that format.
-
-The `LV_IMG_CF_TRUE_COLOR_...`, `LV_IMG_INDEXED_...` and `LV_IMG_ALPHA_...` formats (essentially, all non-`RAW` formats) are understood by the built-in decoder.
-
-### Custom image formats
-
-The easiest way to create a custom image is to use the online image converter and select `Raw`, `Raw with alpha` or `Raw with chroma-keyed` format. It will just take every byte of the binary file you uploaded and write it as an image "bitmap". You then need to attach an image decoder that will parse that bitmap and generate the real, renderable bitmap.
-
-`header.cf` will be `LV_IMG_CF_RAW`, `LV_IMG_CF_RAW_ALPHA` or `LV_IMG_CF_RAW_CHROMA_KEYED` accordingly. You should choose the correct format according to your needs: a fully opaque image, using an alpha channel or using a chroma key.
-
-After decoding, the *raw* formats are considered *True color* by the library. In other words, the image decoder must decode the *Raw* images to *True color* according to the format described in the [Color formats](#color-formats) section.
-
-If you want to create a custom image, you should use `LV_IMG_CF_USER_ENCODED_0..7` color formats. However, the library can draw images only in *True color* format (or *Raw* but ultimately it will be in *True color* format).
-The `LV_IMG_CF_USER_ENCODED_...` formats are not known by the library and therefore they should be decoded to one of the known formats from the [Color formats](#color-formats) section.
-It's possible to decode an image to a non-true color format first (for example: `LV_IMG_INDEXED_4BITS`) and then call the built-in decoder functions to convert it to *True color*.
-
-With *User encoded* formats, the color format in the open function (`dsc->header.cf`) should be changed according to the new format.
-
-
-### Register an image decoder
-
-Here's an example of getting LVGL to work with PNG images.
-
-First, you need to create a new image decoder and set some functions to open/close the PNG files. It should look like this:
-
-```c
-/*Create a new decoder and register functions */
-lv_img_decoder_t * dec = lv_img_decoder_create();
-lv_img_decoder_set_info_cb(dec, decoder_info);
-lv_img_decoder_set_open_cb(dec, decoder_open);
-lv_img_decoder_set_close_cb(dec, decoder_close);
-
-
-/**
- * Get info about a PNG image
- * @param decoder pointer to the decoder where this function belongs
- * @param src can be file name or pointer to a C array
- * @param header store the info here
- * @return LV_RES_OK: no error; LV_RES_INV: can't get the info
- */
-static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header)
-{
- /*Check whether the type `src` is known by the decoder*/
- if(is_png(src) == false) return LV_RES_INV;
-
- /* Read the PNG header and find `width` and `height` */
- ...
-
- header->cf = LV_IMG_CF_RAW_ALPHA;
- header->w = width;
- header->h = height;
-}
-
-/**
- * Open a PNG image and return the decided image
- * @param decoder pointer to the decoder where this function belongs
- * @param dsc pointer to a descriptor which describes this decoding session
- * @return LV_RES_OK: no error; LV_RES_INV: can't get the info
- */
-static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc)
-{
-
- /*Check whether the type `src` is known by the decoder*/
- if(is_png(src) == false) return LV_RES_INV;
-
- /*Decode and store the image. If `dsc->img_data` is `NULL`, the `read_line` function will be called to get the image data line-by-line*/
- dsc->img_data = my_png_decoder(src);
-
- /*Change the color format if required. For PNG usually 'Raw' is fine*/
- dsc->header.cf = LV_IMG_CF_...
-
- /*Call a built in decoder function if required. It's not required if`my_png_decoder` opened the image in true color format.*/
- lv_res_t res = lv_img_decoder_built_in_open(decoder, dsc);
-
- return res;
-}
-
-/**
- * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.
- * Required only if the "open" function can't open the whole decoded pixel array. (dsc->img_data == NULL)
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- * @param x start x coordinate
- * @param y start y coordinate
- * @param len number of pixels to decode
- * @param buf a buffer to store the decoded pixels
- * @return LV_RES_OK: ok; LV_RES_INV: failed
- */
-lv_res_t decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x,
- lv_coord_t y, lv_coord_t len, uint8_t * buf)
-{
- /*With PNG it's usually not required*/
-
- /*Copy `len` pixels from `x` and `y` coordinates in True color format to `buf` */
-
-}
-
-/**
- * Free the allocated resources
- * @param decoder pointer to the decoder where this function belongs
- * @param dsc pointer to a descriptor which describes this decoding session
- */
-static void decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc)
-{
- /*Free all allocated data*/
-
- /*Call the built-in close function if the built-in open/read_line was used*/
- lv_img_decoder_built_in_close(decoder, dsc);
-
-}
-
-```
-
-So in summary:
-- In `decoder_info`, you should collect some basic information about the image and store it in `header`.
-- In `decoder_open`, you should try to open the image source pointed by `dsc->src`. Its type is already in `dsc->src_type == LV_IMG_SRC_FILE/VARIABLE`.
-If this format/type is not supported by the decoder, return `LV_RES_INV`.
-However, if you can open the image, a pointer to the decoded *True color* image should be set in `dsc->img_data`.
-If the format is known, but you don't want to decode the entire image (e.g. no memory for it), set `dsc->img_data = NULL` and use `read_line` to get the pixel data.
-- In `decoder_close` you should free all allocated resources.
-- `decoder_read` is optional. Decoding the whole image requires extra memory and some computational overhead.
-However, it can decode one line of the image without decoding the whole image, you can save memory and time.
-To indicate that the *line read* function should be used, set `dsc->img_data = NULL` in the open function.
-
-
-### Manually use an image decoder
-
-LVGL will use registered image decoders automatically if you try and draw a raw image (i.e. using the `lv_img` object) but you can use them manually too. Create an `lv_img_decoder_dsc_t` variable to describe the decoding session and call `lv_img_decoder_open()`.
-
-The `color` parameter is used only with `LV_IMG_CF_ALPHA_1/2/4/8BIT` images to tell color of the image.
-`frame_id` can be used if the image to open is an animation.
-
-
-```c
-
-lv_res_t res;
-lv_img_decoder_dsc_t dsc;
-res = lv_img_decoder_open(&dsc, &my_img_dsc, color, frame_id);
-
-if(res == LV_RES_OK) {
- /*Do something with `dsc->img_data`*/
- lv_img_decoder_close(&dsc);
-}
-
-```
-
-
-## Image caching
-Sometimes it takes a lot of time to open an image.
-Continuously decoding a PNG image or loading images from a slow external memory would be inefficient and detrimental to the user experience.
-
-Therefore, LVGL caches a given number of images. Caching means some images will be left open, hence LVGL can quickly access them from `dsc->img_data` instead of needing to decode them again.
-
-Of course, caching images is resource intensive as it uses more RAM to store the decoded image. LVGL tries to optimize the process as much as possible (see below), but you will still need to evaluate if this would be beneficial for your platform or not. Image caching may not be worth it if you have a deeply embedded target which decodes small images from a relatively fast storage medium.
-
-### Cache size
-The number of cache entries can be defined with `LV_IMG_CACHE_DEF_SIZE` in *lv_conf.h*. The default value is 1 so only the most recently used image will be left open.
-
-The size of the cache can be changed at run-time with `lv_img_cache_set_size(entry_num)`.
-
-### Value of images
-When you use more images than cache entries, LVGL can't cache all the images. Instead, the library will close one of the cached images to free space.
-
-To decide which image to close, LVGL uses a measurement it previously made of how long it took to open the image. Cache entries that hold slower-to-open images are considered more valuable and are kept in the cache as long as possible.
-
-If you want or need to override LVGL's measurement, you can manually set the *time to open* value in the decoder open function in `dsc->time_to_open = time_ms` to give a higher or lower value. (Leave it unchanged to let LVGL control it.)
-
-Every cache entry has a *"life"* value. Every time an image is opened through the cache, the *life* value of all entries is decreased to make them older.
-When a cached image is used, its *life* value is increased by the *time to open* value to make it more alive.
-
-If there is no more space in the cache, the entry with the lowest life value will be closed.
-
-### Memory usage
-Note that a cached image might continuously consume memory. For example, if three PNG images are cached, they will consume memory while they are open.
-
-Therefore, it's the user's responsibility to be sure there is enough RAM to cache even the largest images at the same time.
-
-### Clean the cache
-Let's say you have loaded a PNG image into a `lv_img_dsc_t my_png` variable and use it in an `lv_img` object. If the image is already cached and you then change the underlying PNG file, you need to notify LVGL to cache the image again. Otherwise, there is no easy way of detecting that the underlying file changed and LVGL will still draw the old image from cache.
-
-To do this, use `lv_img_cache_invalidate_src(&my_png)`. If `NULL` is passed as a parameter, the whole cache will be cleaned.
-
-
-## API
-
-
-### Image buffer
-
-```eval_rst
-
-.. doxygenfile:: lv_img_buf.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/indev.md b/lib/lvgl/docs/overview/indev.md
deleted file mode 100644
index bf07faf..0000000
--- a/lib/lvgl/docs/overview/indev.md
+++ /dev/null
@@ -1,154 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/indev.md
-```
-# Input devices
-
-An input device usually means:
-- Pointer-like input device like touchpad or mouse
-- Keypads like a normal keyboard or simple numeric keypad
-- Encoders with left/right turn and push options
-- External hardware buttons which are assigned to specific points on the screen
-
-
-``` important:: Before reading further, please read the [Porting](/porting/indev) section of Input devices
-```
-
-## Pointers
-
-### Cursor
-
-Pointer input devices (like a mouse) can have a cursor.
-
-```c
-...
-lv_indev_t * mouse_indev = lv_indev_drv_register(&indev_drv);
-
-LV_IMG_DECLARE(mouse_cursor_icon); /*Declare the image source.*/
-lv_obj_t * cursor_obj = lv_img_create(lv_scr_act()); /*Create an image object for the cursor */
-lv_img_set_src(cursor_obj, &mouse_cursor_icon); /*Set the image source*/
-lv_indev_set_cursor(mouse_indev, cursor_obj); /*Connect the image object to the driver*/
-```
-
-Note that the cursor object should have `lv_obj_clear_flag(cursor_obj, LV_OBJ_FLAG_CLICKABLE)`.
-For images, *clicking* is disabled by default.
-
-### Gestures
-Pointer input devices can detect basic gestures. By default, most of the widgets send the gestures to its parent, so finally the gestures can be detected on the screen object in a form of an `LV_EVENT_GESTURE` event. For example:
-
-```c
-void my_event(lv_event_t * e)
-{
- lv_obj_t * screen = lv_event_get_current_target(e);
- lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_act());
- switch(dir) {
- case LV_DIR_LEFT:
- ...
- break;
- case LV_DIR_RIGHT:
- ...
- break;
- case LV_DIR_TOP:
- ...
- break;
- case LV_DIR_BOTTOM:
- ...
- break;
- }
-}
-
-...
-
-lv_obj_add_event_cb(screen1, my_event, LV_EVENT_GESTURE, NULL);
-```
-
-To prevent passing the gesture event to the parent from an object use `lv_obj_clear_flag(obj, LV_OBJ_FLAG_GESTURE_BUBBLE)`.
-
-Note that, gestures are not triggered if an object is being scrolled.
-
-If you did some action on a gesture you can call `lv_indev_wait_release(lv_indev_act())` in the event handler to prevent LVGL sending further input device related events.
-
-## Keypad and encoder
-
-You can fully control the user interface without a touchpad or mouse by using a keypad or encoder(s). It works similar to the *TAB* key on the PC to select an element in an application or a web page.
-
-### Groups
-
-Objects you want to control with a keypad or encoder need to be added to a *Group*.
-In every group there is exactly one focused object which receives the pressed keys or the encoder actions.
-For example, if a [Text area](/widgets/core/textarea) is focused and you press some letter on a keyboard, the keys will be sent and inserted into the text area.
-Similarly, if a [Slider](/widgets/core/slider) is focused and you press the left or right arrows, the slider's value will be changed.
-
-You need to associate an input device with a group. An input device can send key events to only one group but a group can receive data from more than one input device.
-
-To create a group use `lv_group_t * g = lv_group_create()` and to add an object to the group use `lv_group_add_obj(g, obj)`.
-
-To associate a group with an input device use `lv_indev_set_group(indev, g)`, where `indev` is the return value of `lv_indev_drv_register()`
-
-#### Keys
-There are some predefined keys which have special meaning:
-- **LV_KEY_NEXT** Focus on the next object
-- **LV_KEY_PREV** Focus on the previous object
-- **LV_KEY_ENTER** Triggers `LV_EVENT_PRESSED/CLICKED/LONG_PRESSED` etc. events
-- **LV_KEY_UP** Increase value or move upwards
-- **LV_KEY_DOWN** Decrease value or move downwards
-- **LV_KEY_RIGHT** Increase value or move to the right
-- **LV_KEY_LEFT** Decrease value or move to the left
-- **LV_KEY_ESC** Close or exit (E.g. close a [Drop down list](/widgets/core/dropdown))
-- **LV_KEY_DEL** Delete (E.g. a character on the right in a [Text area](/widgets/core/textarea))
-- **LV_KEY_BACKSPACE** Delete a character on the left (E.g. in a [Text area](/widgets/core/textarea))
-- **LV_KEY_HOME** Go to the beginning/top (E.g. in a [Text area](/widgets/core/textarea))
-- **LV_KEY_END** Go to the end (E.g. in a [Text area](/widgets/core/textarea))
-
-The most important special keys are `LV_KEY_NEXT/PREV`, `LV_KEY_ENTER` and `LV_KEY_UP/DOWN/LEFT/RIGHT`.
-In your `read_cb` function, you should translate some of your keys to these special keys to support navigation in a group and interact with selected objects.
-
-Usually, it's enough to use only `LV_KEY_LEFT/RIGHT` because most objects can be fully controlled with them.
-
-With an encoder you should use only `LV_KEY_LEFT`, `LV_KEY_RIGHT`, and `LV_KEY_ENTER`.
-
-#### Edit and navigate mode
-
-Since a keypad has plenty of keys, it's easy to navigate between objects and edit them using the keypad. But encoders have a limited number of "keys" and hence it is difficult to navigate using the default options. *Navigate* and *Edit* modes are used to avoid this problem with encoders.
-
-In *Navigate* mode, an encoder's `LV_KEY_LEFT/RIGHT` is translated to `LV_KEY_NEXT/PREV`. Therefore, the next or previous object will be selected by turning the encoder.
-Pressing `LV_KEY_ENTER` will change to *Edit* mode.
-
-In *Edit* mode, `LV_KEY_NEXT/PREV` is usually used to modify an object.
-Depending on the object's type, a short or long press of `LV_KEY_ENTER` changes back to *Navigate* mode.
-Usually, an object which cannot be pressed (like a [Slider](/widgets/core/slider)) leaves *Edit* mode upon a short click. But with objects where a short click has meaning (e.g. [Button](/widgets/core/btn)), a long press is required.
-
-#### Default group
-Interactive widgets - such as buttons, checkboxes, sliders, etc. - can be automatically added to a default group.
-Just create a group with `lv_group_t * g = lv_group_create();` and set the default group with `lv_group_set_default(g);`
-
-Don't forget to assign one or more input devices to the default group with ` lv_indev_set_group(my_indev, g);`.
-
-### Styling
-
-If an object is focused either by clicking it via touchpad or focused via an encoder or keypad it goes to the `LV_STATE_FOCUSED` state. Hence, focused styles will be applied to it.
-
-If an object switches to edit mode it enters the `LV_STATE_FOCUSED | LV_STATE_EDITED` states so these style properties will be shown.
-
-For a more detailed description read the [Style](https://docs.lvgl.io/v7/en/html/overview/style.html) section.
-
-## API
-
-
-### Input device
-
-```eval_rst
-
-.. doxygenfile:: lv_indev.h
- :project: lvgl
-
-```
-
-### Groups
-
-```eval_rst
-
-.. doxygenfile:: lv_group.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/overview/index.md b/lib/lvgl/docs/overview/index.md
deleted file mode 100644
index 5fd52b0..0000000
--- a/lib/lvgl/docs/overview/index.md
+++ /dev/null
@@ -1,33 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/index.md
-```
-
-# Overview
-
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- object
- coords
- style
- style-props
- scroll
- layer
- event
- indev
- display
- color
- font
- image
- file-system
- animation
- timer
- drawing
- renderers/index
- new_widget
-```
-
diff --git a/lib/lvgl/docs/overview/layer.md b/lib/lvgl/docs/overview/layer.md
deleted file mode 100644
index 86d40f6..0000000
--- a/lib/lvgl/docs/overview/layer.md
+++ /dev/null
@@ -1,60 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/layer.md
-```
-
-# Layers
-
-## Order of creation
-
-By default, LVGL draws new objects on top of old objects.
-
-For example, assume we add a button to a parent object named button1 and then another button named button2. Then button1 (along with its child object(s)) will be in the background and can be covered by button2 and its children.
-
-
-
-
-```c
-/*Create a screen*/
-lv_obj_t * scr = lv_obj_create(NULL, NULL);
-lv_scr_load(scr); /*Load the screen*/
-
-/*Create 2 buttons*/
-lv_obj_t * btn1 = lv_btn_create(scr, NULL); /*Create a button on the screen*/
-lv_btn_set_fit(btn1, true, true); /*Enable automatically setting the size according to content*/
-lv_obj_set_pos(btn1, 60, 40); /*Set the position of the button*/
-
-lv_obj_t * btn2 = lv_btn_create(scr, btn1); /*Copy the first button*/
-lv_obj_set_pos(btn2, 180, 80); /*Set the position of the button*/
-
-/*Add labels to the buttons*/
-lv_obj_t * label1 = lv_label_create(btn1, NULL); /*Create a label on the first button*/
-lv_label_set_text(label1, "Button 1"); /*Set the text of the label*/
-
-lv_obj_t * label2 = lv_label_create(btn2, NULL); /*Create a label on the second button*/
-lv_label_set_text(label2, "Button 2"); /*Set the text of the label*/
-
-/*Delete the second label*/
-lv_obj_del(label2);
-```
-
-## Bring to the foreground
-
-There are four explicit ways to bring an object to the foreground:
-- Use `lv_obj_move_foreground(obj)` to bring an object to the foreground. Similarly, use `lv_obj_move_background(obj)` to move it to the background.
-- Use `lv_obj_move_up(obj)` to move an object one position up in the hierarchy, Similarly, use `lv_obj_move_down(obj)` to move an object one position down in the hierarchy.
-- Use `lv_obj_swap(obj1, obj2)` to swap the relative layer position of two objects.
-- When `lv_obj_set_parent(obj, new_parent)` is used, `obj` will be on the foreground of the `new_parent`.
-
-
-## Top and sys layers
-
-LVGL uses two special layers named `layer_top` and `layer_sys`.
-Both are visible and common on all screens of a display. **They are not, however, shared among multiple physical displays.** The `layer_top` is always on top of the default screen (`lv_scr_act()`), and `layer_sys` is on top of `layer_top`.
-
-The `layer_top` can be used by the user to create some content visible everywhere. For example, a menu bar, a pop-up, etc. If the `click` attribute is enabled, then `layer_top` will absorb all user clicks and acts as a modal.
-```c
-lv_obj_add_flag(lv_layer_top(), LV_OBJ_FLAG_CLICKABLE);
-```
-
-The `layer_sys` is also used for similar purposes in LVGL. For example, it places the mouse cursor above all layers to be sure it's always visible.
diff --git a/lib/lvgl/docs/overview/new_widget.md b/lib/lvgl/docs/overview/new_widget.md
deleted file mode 100644
index d799540..0000000
--- a/lib/lvgl/docs/overview/new_widget.md
+++ /dev/null
@@ -1,7 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/new_widget.md
-```
-
-# New widget
-
diff --git a/lib/lvgl/docs/overview/object.md b/lib/lvgl/docs/overview/object.md
deleted file mode 100644
index d5850c0..0000000
--- a/lib/lvgl/docs/overview/object.md
+++ /dev/null
@@ -1,227 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/object.md
-```
-# Objects
-
-In LVGL the **basic building blocks** of a user interface are the objects, also called *Widgets*.
-For example a [Button](/widgets/core/btn), [Label](/widgets/core/label), [Image](/widgets/core/img), [List](/widgets/extra/list), [Chart](/widgets/extra/chart) or [Text area](/widgets/core/textarea).
-
-You can see all the [Object types](/widgets/index) here.
-
-All objects are referenced using an `lv_obj_t` pointer as a handle. This pointer can later be used to set or get the attributes of the object.
-
-## Attributes
-
-### Basic attributes
-
-All object types share some basic attributes:
-- Position
-- Size
-- Parent
-- Styles
-- Event handlers
-- Etc
-
-You can set/get these attributes with `lv_obj_set_...` and `lv_obj_get_...` functions. For example:
-
-```c
-/*Set basic object attributes*/
-lv_obj_set_size(btn1, 100, 50); /*Set a button's size*/
-lv_obj_set_pos(btn1, 20,30); /*Set a button's position*/
-```
-
-To see all the available functions visit the [Base object's documentation](/widgets/obj).
-
-### Specific attributes
-
-The object types have special attributes too. For example, a slider has
-- Minimum and maximum values
-- Current value
-
-For these special attributes, every object type may have unique API functions. For example for a slider:
-
-```c
-/*Set slider specific attributes*/
-lv_slider_set_range(slider1, 0, 100); /*Set the min. and max. values*/
-lv_slider_set_value(slider1, 40, LV_ANIM_ON); /*Set the current value (position)*/
-```
-
-The API of the widgets is described in their [Documentation](/widgets/index) but you can also check the respective header files (e.g. *widgets/lv_slider.h*)
-
-## Working mechanisms
-
-### Parent-child structure
-
-A parent object can be considered as the container of its children. Every object has exactly one parent object (except screens), but a parent can have any number of children.
-There is no limitation for the type of the parent but there are objects which are typically a parent (e.g. button) or a child (e.g. label).
-
-### Moving together
-
-If the position of a parent changes, the children will move along with it.
-Therefore, all positions are relative to the parent.
-
-
-
-```c
-lv_obj_t * parent = lv_obj_create(lv_scr_act()); /*Create a parent object on the current screen*/
-lv_obj_set_size(parent, 100, 80); /*Set the size of the parent*/
-
-lv_obj_t * obj1 = lv_obj_create(parent); /*Create an object on the previously created parent object*/
-lv_obj_set_pos(obj1, 10, 10); /*Set the position of the new object*/
-```
-
-Modify the position of the parent:
-
-
-
-```c
-lv_obj_set_pos(parent, 50, 50); /*Move the parent. The child will move with it.*/
-```
-
-(For simplicity the adjusting of colors of the objects is not shown in the example.)
-
-### Visibility only on the parent
-
-If a child is partially or fully outside its parent then the parts outside will not be visible.
-
-
-
-```c
-lv_obj_set_x(obj1, -30); /*Move the child a little bit off the parent*/
-```
-
-This behavior can be overwritten with `lv_obj_add_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE);` which allow the children to be drawn out of the parent.
-
-
-### Create and delete objects
-
-In LVGL, objects can be created and deleted dynamically at run time. It means only the currently created (existing) objects consume RAM.
-
-This allows for the creation of a screen just when a button is clicked to open it, and for deletion of screens when a new screen is loaded.
-
-UIs can be created based on the current environment of the device. For example one can create meters, charts, bars and sliders based on the currently attached sensors.
-
-Every widget has its own **create** function with a prototype like this:
-```c
-lv_obj_t * lv__create(lv_obj_t * parent, );
-```
-
-Typically, the create functions only have a *parent* parameter telling them on which object to create the new widget.
-
-The return value is a pointer to the created object with `lv_obj_t *` type.
-
-
-There is a common **delete** function for all object types. It deletes the object and all of its children.
-
-```c
-void lv_obj_del(lv_obj_t * obj);
-```
-
-`lv_obj_del` will delete the object immediately.
-If for any reason you can't delete the object immediately you can use `lv_obj_del_async(obj)` which will perform the deletion on the next call of `lv_timer_handler()`.
-This is useful e.g. if you want to delete the parent of an object in the child's `LV_EVENT_DELETE` handler.
-
-You can remove all the children of an object (but not the object itself) using `lv_obj_clean(obj)`.
-
-You can use `lv_obj_del_delayed(obj, 1000)` to delete an object after some time. The delay is expressed in milliseconds.
-
-
-## Screens
-
-### Create screens
-The screens are special objects which have no parent object. So they can be created like:
-```c
-lv_obj_t * scr1 = lv_obj_create(NULL);
-```
-
-Screens can be created with any object type. For example, a [Base object](/widgets/obj) or an image to make a wallpaper.
-
-### Get the active screen
-There is always an active screen on each display. By default, the library creates and loads a "Base object" as a screen for each display.
-
-To get the currently active screen use the `lv_scr_act()` function.
-
-### Load screens
-
-To load a new screen, use `lv_scr_load(scr1)`.
-
-### Layers
-There are two automatically generated layers:
-- top layer
-- system layer
-
-They are independent of the screens and they will be shown on every screen. The *top layer* is above every object on the screen and the *system layer* is above the *top layer*.
-You can add any pop-up windows to the *top layer* freely. But, the *system layer* is restricted to system-level things (e.g. mouse cursor will be placed there with `lv_indev_set_cursor()`).
-
-The `lv_layer_top()` and `lv_layer_sys()` functions return pointers to the top and system layers respectively.
-
-Read the [Layer overview](/overview/layer) section to learn more about layers.
-
-
-#### Load screen with animation
-
-A new screen can be loaded with animation by using `lv_scr_load_anim(scr, transition_type, time, delay, auto_del)`. The following transition types exist:
-- `LV_SCR_LOAD_ANIM_NONE` Switch immediately after `delay` milliseconds
-- `LV_SCR_LOAD_ANIM_OVER_LEFT/RIGHT/TOP/BOTTOM` Move the new screen over the current towards the given direction
-- `LV_SCR_LOAD_ANIM_OUT_LEFT/RIGHT/TOP/BOTTOM` Move out the old screen over the current towards the given direction
-- `LV_SCR_LOAD_ANIM_MOVE_LEFT/RIGHT/TOP/BOTTOM` Move both the current and new screens towards the given direction
-- `LV_SCR_LOAD_ANIM_FADE_IN/OUT` Fade the new screen over the old screen, or vice versa
-
-Setting `auto_del` to `true` will automatically delete the old screen when the animation is finished.
-
-The new screen will become active (returned by `lv_scr_act()`) when the animation starts after `delay` time.
-All inputs are disabled during the screen animation.
-
-### Handling multiple displays
-Screens are created on the currently selected *default display*.
-The *default display* is the last registered display with `lv_disp_drv_register`. You can also explicitly select a new default display using `lv_disp_set_default(disp)`.
-
-`lv_scr_act()`, `lv_scr_load()` and `lv_scr_load_anim()` operate on the default screen.
-
-Visit [Multi-display support](/overview/display) to learn more.
-
-## Parts
-
-The widgets are built from multiple parts. For example a [Base object](/widgets/obj) uses the main and scrollbar parts but a [Slider](/widgets/core/slider) uses the main, indicator and knob parts.
-Parts are similar to *pseudo-elements* in CSS.
-
-The following predefined parts exist in LVGL:
-- `LV_PART_MAIN` A background like rectangle
-- `LV_PART_SCROLLBAR` The scrollbar(s)
-- `LV_PART_INDICATOR` Indicator, e.g. for slider, bar, switch, or the tick box of the checkbox
-- `LV_PART_KNOB` Like a handle to grab to adjust the value
-- `LV_PART_SELECTED` Indicate the currently selected option or section
-- `LV_PART_ITEMS` Used if the widget has multiple similar elements (e.g. table cells)
-- `LV_PART_TICKS` Ticks on scales e.g. for a chart or meter
-- `LV_PART_CURSOR` Mark a specific place e.g. text area's or chart's cursor
-- `LV_PART_CUSTOM_FIRST` Custom parts can be added from here.
-
-The main purpose of parts is to allow styling the "components" of the widgets.
-They are described in more detail in the [Style overview](/overview/style) section.
-
-## States
-The object can be in a combination of the following states:
-- `LV_STATE_DEFAULT` Normal, released state
-- `LV_STATE_CHECKED` Toggled or checked state
-- `LV_STATE_FOCUSED` Focused via keypad or encoder or clicked via touchpad/mouse
-- `LV_STATE_FOCUS_KEY` Focused via keypad or encoder but not via touchpad/mouse
-- `LV_STATE_EDITED` Edit by an encoder
-- `LV_STATE_HOVERED` Hovered by mouse (not supported now)
-- `LV_STATE_PRESSED` Being pressed
-- `LV_STATE_SCROLLED` Being scrolled
-- `LV_STATE_DISABLED` Disabled state
-- `LV_STATE_USER_1` Custom state
-- `LV_STATE_USER_2` Custom state
-- `LV_STATE_USER_3` Custom state
-- `LV_STATE_USER_4` Custom state
-
-The states are usually automatically changed by the library as the user interacts with an object (presses, releases, focuses, etc.).
-However, the states can be changed manually too.
-To set or clear given state (but leave the other states untouched) use `lv_obj_add/clear_state(obj, LV_STATE_...)`
-In both cases OR-ed state values can be used as well. E.g. `lv_obj_add_state(obj, part, LV_STATE_PRESSED | LV_PRESSED_CHECKED)`.
-
-To learn more about the states read the related section of the [Style overview](/overview/style).
-
-## Snapshot
-A snapshot image can be generated for an object together with its children. Check details in [Snapshot](/others/snapshot).
diff --git a/lib/lvgl/docs/overview/renderers/arm-2d.md b/lib/lvgl/docs/overview/renderers/arm-2d.md
deleted file mode 100644
index e05d127..0000000
--- a/lib/lvgl/docs/overview/renderers/arm-2d.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/renderers/arm-2d.md
-```
-# ARM-2D GPU
-
-TODO
-
diff --git a/lib/lvgl/docs/overview/renderers/dma2d.md b/lib/lvgl/docs/overview/renderers/dma2d.md
deleted file mode 100644
index 5567fca..0000000
--- a/lib/lvgl/docs/overview/renderers/dma2d.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/renderers/dma2d.md
-```
-# DMA2D GPU
-
-TODO
-
diff --git a/lib/lvgl/docs/overview/renderers/index.md b/lib/lvgl/docs/overview/renderers/index.md
deleted file mode 100644
index a4c2974..0000000
--- a/lib/lvgl/docs/overview/renderers/index.md
+++ /dev/null
@@ -1,20 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/renderers/index.md
-```
-
-# Renderers and GPUs
-
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- sw
- sdl
- arm-2d
- pxp-vglite
- dma2d
-```
-
diff --git a/lib/lvgl/docs/overview/renderers/pxp-vglite.md b/lib/lvgl/docs/overview/renderers/pxp-vglite.md
deleted file mode 100644
index a571ffb..0000000
--- a/lib/lvgl/docs/overview/renderers/pxp-vglite.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/renderers/pxp-vglite.md
-```
-# NXP PXP and VGLite GPU
-
-TODO
-
diff --git a/lib/lvgl/docs/overview/renderers/sdl.md b/lib/lvgl/docs/overview/renderers/sdl.md
deleted file mode 100644
index e6ba321..0000000
--- a/lib/lvgl/docs/overview/renderers/sdl.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/renderers/sdl.md
-```
-# SDL renderer
-
-TODO
-
diff --git a/lib/lvgl/docs/overview/renderers/sw.md b/lib/lvgl/docs/overview/renderers/sw.md
deleted file mode 100644
index 2af156a..0000000
--- a/lib/lvgl/docs/overview/renderers/sw.md
+++ /dev/null
@@ -1,8 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/renderers/sw.md
-```
-# Software renderer
-
-TODO
-
diff --git a/lib/lvgl/docs/overview/scroll.md b/lib/lvgl/docs/overview/scroll.md
deleted file mode 100644
index c820831..0000000
--- a/lib/lvgl/docs/overview/scroll.md
+++ /dev/null
@@ -1,199 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/scroll.md
-```
-# Scroll
-
-## Overview
-In LVGL scrolling works very intuitively: if an object is outside its parent content area (the size without padding), the parent becomes scrollable and scrollbar(s) will appear. That's it.
-
-Any object can be scrollable including `lv_obj_t`, `lv_img`, `lv_btn`, `lv_meter`, etc
-
-The object can either be scrolled horizontally or vertically in one stroke; diagonal scrolling is not possible.
-
-### Scrollbar
-
-#### Mode
-Scrollbars are displayed according to a configured `mode`. The following `mode`s exist:
-- `LV_SCROLLBAR_MODE_OFF` Never show the scrollbars
-- `LV_SCROLLBAR_MODE_ON` Always show the scrollbars
-- `LV_SCROLLBAR_MODE_ACTIVE` Show scroll bars while an object is being scrolled
-- `LV_SCROLLBAR_MODE_AUTO` Show scroll bars when the content is large enough to be scrolled
-
-`lv_obj_set_scrollbar_mode(obj, LV_SCROLLBAR_MODE_...)` sets the scrollbar mode on an object.
-
-
-#### Styling
-The scrollbars have their own dedicated part, called `LV_PART_SCROLLBAR`. For example a scrollbar can turn to red like this:
-```c
-static lv_style_t style_red;
-lv_style_init(&style_red);
-lv_style_set_bg_color(&style_red, lv_color_red());
-
-...
-
-lv_obj_add_style(obj, &style_red, LV_PART_SCROLLBAR);
-```
-
-An object goes to the `LV_STATE_SCROLLED` state while it's being scrolled. This allows adding different styles to the scrollbar or the object itself when scrolled.
-This code makes the scrollbar blue when the object is scrolled:
-```c
-static lv_style_t style_blue;
-lv_style_init(&style_blue);
-lv_style_set_bg_color(&style_blue, lv_color_blue());
-
-...
-
-lv_obj_add_style(obj, &style_blue, LV_STATE_SCROLLED | LV_PART_SCROLLBAR);
-```
-
-If the base direction of the `LV_PART_SCROLLBAR` is RTL (`LV_BASE_DIR_RTL`) the vertical scrollbar will be placed on the left.
-Note that, the `base_dir` style property is inherited. Therefore, it can be set directly on the `LV_PART_SCROLLBAR` part of an object
-or on the object's or any parent's main part to make a scrollbar inherit the base direction.
-
-`pad_left/right/top/bottom` sets the spacing around the scrollbars and `width` sets the scrollbar's width.
-
-### Events
-The following events are related to scrolling:
-- `LV_EVENT_SCROLL_BEGIN` Scrolling begins. The event parameter is `NULL` or an `lv_anim_t *` with a scroll animation descriptor that can be modified if required.
-- `LV_EVENT_SCROLL_END` Scrolling ends.
-- `LV_EVENT_SCROLL` Scroll happened. Triggered on every position change.
-Scroll events
-
-## Basic example
-TODO
-
-## Features of scrolling
-
-Besides, managing "normal" scrolling there are many interesting and useful additional features.
-
-
-### Scrollable
-
-It's possible to make an object non-scrollable with `lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLLABLE)`.
-
-Non-scrollable objects can still propagate the scrolling (chain) to their parents.
-
-The direction in which scrolling happens can be controlled by `lv_obj_set_scroll_dir(obj, LV_DIR_...)`.
-The following values are possible for the direction:
-- `LV_DIR_TOP` only scroll up
-- `LV_DIR_LEFT` only scroll left
-- `LV_DIR_BOTTOM` only scroll down
-- `LV_DIR_RIGHT` only scroll right
-- `LV_DIR_HOR` only scroll horizontally
-- `LV_DIR_VER` only scroll vertically
-- `LV_DIR_ALL` scroll any directions
-
-OR-ed values are also possible. E.g. `LV_DIR_TOP | LV_DIR_LEFT`.
-
-
-### Scroll chain
-If an object can't be scrolled further (e.g. its content has reached the bottom-most position) additional scrolling is propagated to its parent. If the parent can be scrolled in that direction than it will be scrolled instead.
-It continues propagating to the grandparent and grand-grandparents as well.
-
-The propagation on scrolling is called "scroll chaining" and it can be enabled/disabled with `LV_OBJ_FLAG_SCROLL_CHAIN_HOR/VER` flag.
-If chaining is disabled the propagation stops on the object and the parent(s) won't be scrolled.
-
-### Scroll momentum
-When the user scrolls an object and releases it, LVGL can emulate inertial momentum for the scrolling. It's like the object was thrown and scrolling slows down smoothly.
-
-The scroll momentum can be enabled/disabled with the `LV_OBJ_FLAG_SCROLL_MOMENTUM` flag.
-
-### Elastic scroll
-Normally an object can't be scrolled past the extremeties of its content. That is the top side of the content can't be below the top side of the object.
-
-However, with `LV_OBJ_FLAG_SCROLL_ELASTIC` a fancy effect is added when the user "over-scrolls" the content. The scrolling slows down, and the content can be scrolled inside the object.
-When the object is released the content scrolled in it will be animated back to the valid position.
-
-### Snapping
-The children of an object can be snapped according to specific rules when scrolling ends. Children can be made snappable individually with the `LV_OBJ_FLAG_SNAPPABLE` flag.
-
-An object can align snapped children in four ways:
-- `LV_SCROLL_SNAP_NONE` Snapping is disabled. (default)
-- `LV_SCROLL_SNAP_START` Align the children to the left/top side of a scrolled object
-- `LV_SCROLL_SNAP_END` Align the children to the right/bottom side of a scrolled object
-- `LV_SCROLL_SNAP_CENTER` Align the children to the center of a scrolled object
-
-Snap alignment is set with `lv_obj_set_scroll_snap_x/y(obj, LV_SCROLL_SNAP_...)`:
-
-Under the hood the following happens:
-1. User scrolls an object and releases the screen
-2. LVGL calculates where the scroll would end considering scroll momentum
-3. LVGL finds the nearest scroll point
-4. LVGL scrolls to the snap point with an animation
-
-### Scroll one
-The "scroll one" feature tells LVGL to allow scrolling only one snappable child at a time.
-This requires making the children snappable and setting a scroll snap alignment different from `LV_SCROLL_SNAP_NONE`.
-
-This feature can be enabled by the `LV_OBJ_FLAG_SCROLL_ONE` flag.
-
-### Scroll on focus
-Imagine that there a lot of objects in a group that are on a scrollable object. Pressing the "Tab" button focuses the next object but it might be outside the visible area of the scrollable object.
-If the "scroll on focus" feature is enabled LVGL will automatically scroll objects to bring their children into view.
-The scrolling happens recursively therefore even nested scrollable objects are handled properly.
-The object will be scrolled into view even if it's on a different page of a tabview.
-
-## Scroll manually
-The following API functions allow manual scrolling of objects:
-- `lv_obj_scroll_by(obj, x, y, LV_ANIM_ON/OFF)` scroll by `x` and `y` values
-- `lv_obj_scroll_to(obj, x, y, LV_ANIM_ON/OFF)` scroll to bring the given coordinate to the top left corner
-- `lv_obj_scroll_to_x(obj, x, LV_ANIM_ON/OFF)` scroll to bring the given coordinate to the left side
-- `lv_obj_scroll_to_y(obj, y, LV_ANIM_ON/OFF)` scroll to bring the given coordinate to the top side
-
-From time to time you may need to retrieve the scroll position of an element, either to restore it later, or to display dynamically some elements according to the current scroll.
-Here is an example to see how to combine scroll event and store the scroll top position.
-```c
-static int scroll_value = 0;
-
-static void store_scroll_value_event_cb(lv_event_t* e) {
- lv_obj_t* screen = lv_event_get_target(e);
- scroll_value = lv_obj_get_scroll_top(screen);
- printf("%d pixels are scrolled out on the top\n", scroll_value);
-}
-
-lv_obj_t* container = lv_obj_create(NULL);
-lv_obj_add_event_cb(container, store_scroll_value_event_cb, LV_EVENT_SCROLL, NULL);
-```
-
-Scrool coordinates can be retrieve from differents axes with these functions:
-- `lv_obj_get_scroll_x(obj)` Get the `x` coordinate of object
-- `lv_obj_get_scroll_y(obj)` Get the `y` coordinate of object
-- `lv_obj_get_scroll_top(obj)` Get the scroll coordinate from the top
-- `lv_obj_get_scroll_bottom(obj)` Get the scroll coordinate from the bottom
-- `lv_obj_get_scroll_left(obj)` Get the scroll coordinate from the left
-- `lv_obj_get_scroll_right(obj)` Get the scroll coordinate from the right
-
-## Self size
-
-Self size is a property of an object. Normally, the user shouldn't use this parameter but if a custom widget is created it might be useful.
-
-In short, self size establishes the size of an object's content. To understand it better take the example of a table.
-Let's say it has 10 rows each with 50 px height. So the total height of the content is 500 px. In other words the "self height" is 500 px.
-If the user sets only 200 px height for the table LVGL will see that the self size is larger and make the table scrollable.
-
-This means not only the children can make an object scrollable but a larger self size will too.
-
-LVGL uses the `LV_EVENT_GET_SELF_SIZE` event to get the self size of an object. Here is an example to see how to handle the event:
-```c
-if(event_code == LV_EVENT_GET_SELF_SIZE) {
- lv_point_t * p = lv_event_get_param(e);
-
- //If x or y < 0 then it doesn't neesd to be calculated now
- if(p->x >= 0) {
- p->x = 200; //Set or calculate the self width
- }
-
- if(p->y >= 0) {
- p->y = 50; //Set or calculate the self height
- }
-}
-```
-
-## Examples
-
-```eval_rst
-
-.. include:: ../../examples/scroll/index.rst
-
-```
diff --git a/lib/lvgl/docs/overview/style-props.md b/lib/lvgl/docs/overview/style-props.md
deleted file mode 100644
index bef42e5..0000000
--- a/lib/lvgl/docs/overview/style-props.md
+++ /dev/null
@@ -1,772 +0,0 @@
-# Style properties
-
-## Size and position
-Properties related to size, position, alignment and layout of the objects.
-
-### width
-Sets the width of object. Pixel, percentage and `LV_SIZE_CONTENT` values can be used. Percentage values are relative to the width of the parent's content area.
-
-Default Widget dependent
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### min_width
-Sets a minimal width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### max_width
-Sets a maximal width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.
-
-Default LV_COORD_MAX
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### height
-Sets the height of object. Pixel, percentage and `LV_SIZE_CONTENT` can be used. Percentage values are relative to the height of the parent's content area.
-
-Default Widget dependent
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### min_height
-Sets a minimal height. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### max_height
-Sets a maximal height. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area.
-
-Default LV_COORD_MAX
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### x
-Set the X coordinate of the object considering the set `align`. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### y
-Set the Y coordinate of the object considering the set `align`. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### align
-Set the alignment which tells from which point of the parent the X and Y coordinates should be interpreted. The possible values are: `LV_ALIGN_DEFAULT`, `LV_ALIGN_TOP_LEFT/MID/RIGHT`, `LV_ALIGN_BOTTOM_LEFT/MID/RIGHT`, `LV_ALIGN_LEFT/RIGHT_MID`, `LV_ALIGN_CENTER`. `LV_ALIGN_DEFAULT` means `LV_ALIGN_TOP_LEFT` with LTR base direction and `LV_ALIGN_TOP_RIGHT` with RTL base direction.
-
-Default `LV_ALIGN_DEFAULT`
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### transform_width
-Make the object wider on both sides with this value. Pixel and percentage (with `lv_pct(x)`) values can be used. Percentage values are relative to the object's width.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### transform_height
-Make the object higher on both sides with this value. Pixel and percentage (with `lv_pct(x)`) values can be used. Percentage values are relative to the object's height.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### translate_x
-Move the object with this value in X direction. Applied after layouts, aligns and other positioning. Pixel and percentage (with `lv_pct(x)`) values can be used. Percentage values are relative to the object's width.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### translate_y
-Move the object with this value in Y direction. Applied after layouts, aligns and other positioning. Pixel and percentage (with `lv_pct(x)`) values can be used. Percentage values are relative to the object's height.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### transform_zoom
-Zoom image-like objects. Multiplied with the zoom set on the object. The value 256 (or `LV_IMG_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw Yes
-
-
-### transform_angle
-Rotate image-like objects. Added to the rotation set on the object. The value is interpreted in 0.1 degree units. E.g. 45 deg. = 450
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw Yes
-
-
-## Padding
-Properties to describe spacing between the parent's sides and the children and among the children. Very similar to the padding properties in HTML.
-
-### pad_top
-Sets the padding on the top. It makes the content area smaller in this direction.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### pad_bottom
-Sets the padding on the bottom. It makes the content area smaller in this direction.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### pad_left
-Sets the padding on the left. It makes the content area smaller in this direction.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### pad_right
-Sets the padding on the right. It makes the content area smaller in this direction.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### pad_row
-Sets the padding between the rows. Used by the layouts.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### pad_column
-Sets the padding between the columns. Used by the layouts.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-## Background
-Properties to describe the background color and image of the objects.
-
-### bg_color
-Set the background color of the object.
-
-Default `0xffffff`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_opa
-Set the opacity of the background. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_TRANSP`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_grad_color
-Set the gradient color of the background. Used only if `grad_dir` is not `LV_GRAD_DIR_NONE`
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_grad_dir
-Set the direction of the gradient of the background. The possible values are `LV_GRAD_DIR_NONE/HOR/VER`.
-
-Default `LV_GRAD_DIR_NONE`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_main_stop
-Set the point from which the background color should start for gradients. 0 means to top/left side, 255 the bottom/right side, 128 the center, and so on
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_grad_stop
-Set the point from which the background's gradient color should start. 0 means to top/left side, 255 the bottom/right side, 128 the center, and so on
-
-Default 255
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_grad
-Set the gradient definition. The pointed instance must exist while the object is alive. NULL to disable. It wraps `BG_GRAD_COLOR`, `BG_GRAD_DIR`, `BG_MAIN_STOP` and `BG_GRAD_STOP` into one descriptor and allows creating gradients with more colors too.
-
-Default `NULL`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_dither_mode
-Set the dithering mode of the gradient of the background. The possible values are `LV_DITHER_NONE/ORDERED/ERR_DIFF`.
-
-Default `LV_DITHER_NONE`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_img_src
-Set a background image. Can be a pointer to `lv_img_dsc_t`, a path to a file or an `LV_SYMBOL_...`
-
-Default `NULL`
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### bg_img_opa
-Set the opacity of the background image. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_img_recolor
-Set a color to mix to the background image.
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_img_recolor_opa
-Set the intensity of background image recoloring. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means no mixing, 255, `LV_OPA_100` or `LV_OPA_COVER` means full recoloring, other values or LV_OPA_10, LV_OPA_20, etc are interpreted proportionally.
-
-Default `LV_OPA_TRANSP`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### bg_img_tiled
-If enabled the background image will be tiled. The possible values are `true` or `false`.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-## Border
-Properties to describe the borders
-
-### border_color
-Set the color of the border
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### border_opa
-Set the opacity of the border. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### border_width
-Set hte width of the border. Only pixel values can be used.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### border_side
-Set only which side(s) the border should be drawn. The possible values are `LV_BORDER_SIDE_NONE/TOP/BOTTOM/LEFT/RIGHT/INTERNAL`. OR-ed values can be used as well, e.g. `LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_LEFT`.
-
-Default `LV_BORDER_SIDE_NONE`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### border_post
-Sets whether the border should be drawn before or after the children are drawn. `true`: after children, `false`: before children
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-## Outline
-Properties to describe the outline. It's like a border but drawn outside of the rectangles.
-
-### outline_width
-Set the width of the outline in pixels.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### outline_color
-Set the color of the outline.
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### outline_opa
-Set the opacity of the outline. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### outline_pad
-Set the padding of the outline, i.e. the gap between object and the outline.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-## Shadow
-Properties to describe the shadow drawn under the rectangles.
-
-### shadow_width
-Set the width of the shadow in pixels. The value should be >= 0.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### shadow_ofs_x
-Set an offset on the shadow in pixels in X direction.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### shadow_ofs_y
-Set an offset on the shadow in pixels in Y direction.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### shadow_spread
-Make the shadow calculation to use a larger or smaller rectangle as base. The value can be in pixel to make the area larger/smaller
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### shadow_color
-Set the color of the shadow
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### shadow_opa
-Set the opacity of the shadow. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-## Image
-Properties to describe the images
-
-### img_opa
-Set the opacity of an image. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### img_recolor
-Set color to mixt to the image.
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### img_recolor_opa
-Set the intensity of the color mixing. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-## Line
-Properties to describe line-like objects
-
-### line_width
-Set the width of the lines in pixel.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### line_dash_width
-Set the width of dashes in pixel. Note that dash works only on horizontal and vertical lines
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### line_dash_gap
-Set the gap between dashes in pixel. Note that dash works only on horizontal and vertical lines
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### line_rounded
-Make the end points of the lines rounded. `true`: rounded, `false`: perpendicular line ending
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### line_color
-Set the color fo the lines.
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### line_opa
-Set the opacity of the lines.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw No
-
-
-## Arc
-TODO
-
-### arc_width
-Set the width (thickness) of the arcs in pixel.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw Yes
-
-
-### arc_rounded
-Make the end points of the arcs rounded. `true`: rounded, `false`: perpendicular line ending
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### arc_color
-Set the color of the arc.
-
-Default `0x000000`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### arc_opa
-Set the opacity of the arcs.
-
-Default `LV_OPA_COVER`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### arc_img_src
-Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs. Can be a pointer to `lv_img_dsc_t` or a path to a file
-
-Default `NULL`
-Inherited No
-Layout No
-Ext. draw No
-
-
-## Text
-Properties to describe the properties of text. All these properties are inherited.
-
-### text_color
-Sets the color of the text.
-
-Default `0x000000`
-Inherited Yes
-Layout No
-Ext. draw No
-
-
-### text_opa
-Set the opacity of the text. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited Yes
-Layout No
-Ext. draw No
-
-
-### text_font
-Set the font of the text (a pointer `lv_font_t *`).
-
-Default `LV_FONT_DEFAULT`
-Inherited Yes
-Layout Yes
-Ext. draw No
-
-
-### text_letter_space
-Set the letter space in pixels
-
-Default 0
-Inherited Yes
-Layout Yes
-Ext. draw No
-
-
-### text_line_space
-Set the line space in pixels.
-
-Default 0
-Inherited Yes
-Layout Yes
-Ext. draw No
-
-
-### text_decor
-Set decoration for the text. The possible values are `LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH`. OR-ed values can be used as well.
-
-Default `LV_TEXT_DECOR_NONE`
-Inherited Yes
-Layout No
-Ext. draw No
-
-
-### text_align
-Set how to align the lines of the text. Note that it doesn't align the object itself, only the lines inside the object. The possible values are `LV_TEXT_ALIGN_LEFT/CENTER/RIGHT/AUTO`. `LV_TEXT_ALIGN_AUTO` detect the text base direction and uses left or right alignment accordingly
-
-Default `LV_TEXT_ALIGN_AUTO`
-Inherited Yes
-Layout Yes
-Ext. draw No
-
-
-## Miscellaneous
-Mixed properties for various purposes.
-
-### radius
-Set the radius on every corner. The value is interpreted in pixel (>= 0) or `LV_RADIUS_CIRCLE` for max. radius
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### clip_corner
-Enable to clip the overflowed content on the rounded corner. Can be `true` or `false`.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### opa
-Scale down all opacity values of the object by this factor. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.
-
-Default `LV_OPA_COVER`
-Inherited Yes
-Layout No
-Ext. draw No
-
-
-### color_filter_dsc
-Mix a color to all colors of the object.
-
-Default `NULL`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### color_filter_opa
-The intensity of mixing of color filter.
-
-Default `LV_OPA_TRANSP`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### anim
-The animation template for the object's animation. Should be a pointer to `lv_anim_t`. The animation parameters are widget specific, e.g. animation time could be the E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more.
-
-Default `NULL`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### anim_time
-The animation time in milliseconds. Its meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### anim_speed
-The animation speed in pixel/sec. Its meaning is widget specific. E.g. scroll speed of label. See the widgets' documentation to learn more.
-
-Default 0
-Inherited No
-Layout No
-Ext. draw No
-
-
-### transition
-An initialized `lv_style_transition_dsc_t` to describe a transition.
-
-Default `NULL`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### blend_mode
-Describes how to blend the colors to the background. The possible values are `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE/MULTIPLY`
-
-Default `LV_BLEND_MODE_NORMAL`
-Inherited No
-Layout No
-Ext. draw No
-
-
-### layout
-Set the layout if the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts.
-
-Default 0
-Inherited No
-Layout Yes
-Ext. draw No
-
-
-### base_dir
-Set the base direction of the object. The possible values are `LV_BIDI_DIR_LTR/RTL/AUTO`.
-
-Default `LV_BASE_DIR_AUTO`
-Inherited Yes
-Layout Yes
-Ext. draw No
-
diff --git a/lib/lvgl/docs/overview/style.md b/lib/lvgl/docs/overview/style.md
deleted file mode 100644
index df5a9b5..0000000
--- a/lib/lvgl/docs/overview/style.md
+++ /dev/null
@@ -1,332 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/style.md
-```
-# Styles
-
-*Styles* are used to set the appearance of objects. Styles in lvgl are heavily inspired by CSS. The concept in a nutshell is as follows:
-- A style is an `lv_style_t` variable which can hold properties like border width, text color and so on. It's similar to a `class` in CSS.
-- Styles can be assigned to objects to change their appearance. Upon assignment, the target part (*pseudo-element* in CSS) and target state (*pseudo class*) can be specified.
-For example one can add `style_blue` to the knob of a slider when it's in pressed state.
-- The same style can be used by any number of objects.
-- Styles can be cascaded which means multiple styles may be assigned to an object and each style can have different properties.
-Therefore, not all properties have to be specified in a style. LVGL will search for a property until a style defines it or use a default if it's not specified by any of the styles.
-For example `style_btn` can result in a default gray button and `style_btn_red` can add only a `background-color=red` to overwrite the background color.
-- The most recently added style has higher precedence. This means if a property is specified in two styles the newest style in the object will be used.
-- Some properties (e.g. text color) can be inherited from a parent(s) if it's not specified in an object.
-- Objects can also have local styles with higher precedence than "normal" styles.
-- Unlike CSS (where pseudo-classes describe different states, e.g. `:focus`), in LVGL a property is assigned to a given state.
-- Transitions can be applied when the object changes state.
-
-
-## States
-The objects can be in the combination of the following states:
-- `LV_STATE_DEFAULT` (0x0000) Normal, released state
-- `LV_STATE_CHECKED` (0x0001) Toggled or checked state
-- `LV_STATE_FOCUSED` (0x0002) Focused via keypad or encoder or clicked via touchpad/mouse
-- `LV_STATE_FOCUS_KEY` (0x0004) Focused via keypad or encoder but not via touchpad/mouse
-- `LV_STATE_EDITED` (0x0008) Edit by an encoder
-- `LV_STATE_HOVERED` (0x0010) Hovered by mouse (not supported now)
-- `LV_STATE_PRESSED` (0x0020) Being pressed
-- `LV_STATE_SCROLLED` (0x0040) Being scrolled
-- `LV_STATE_DISABLED` (0x0080) Disabled state
-- `LV_STATE_USER_1` (0x1000) Custom state
-- `LV_STATE_USER_2` (0x2000) Custom state
-- `LV_STATE_USER_3` (0x4000) Custom state
-- `LV_STATE_USER_4` (0x8000) Custom state
-
-An object can be in a combination of states such as being focused and pressed at the same time. This is represented as `LV_STATE_FOCUSED | LV_STATE_PRESSED`.
-
-A style can be added to any state or state combination.
-For example, setting a different background color for the default and pressed states.
-If a property is not defined in a state the best matching state's property will be used. Typically this means the property with `LV_STATE_DEFAULT` is used.˛
-If the property is not set even for the default state the default value will be used. (See later)
-
-But what does the "best matching state's property" really mean?
-States have a precedence which is shown by their value (see in the above list). A higher value means higher precedence.
-To determine which state's property to use let's take an example. Imagine the background color is defined like this:
-- `LV_STATE_DEFAULT`: white
-- `LV_STATE_PRESSED`: gray
-- `LV_STATE_FOCUSED`: red
-
-1. Initially the object is in the default state, so it's a simple case: the property is perfectly defined in the object's current state as white.
-2. When the object is pressed there are 2 related properties: default with white (default is related to every state) and pressed with gray.
-The pressed state has 0x0020 precedence which is higher than the default state's 0x0000 precedence, so gray color will be used.
-3. When the object is focused the same thing happens as in pressed state and red color will be used. (Focused state has higher precedence than default state).
-4. When the object is focused and pressed both gray and red would work, but the pressed state has higher precedence than focused so gray color will be used.
-5. It's possible to set e.g. rose color for `LV_STATE_PRESSED | LV_STATE_FOCUSED`.
-In this case, this combined state has 0x0020 + 0x0002 = 0x0022 precedence, which is higher than the pressed state's precedence so rose color would be used.
-6. When the object is in the checked state there is no property to set the background color for this state. So for lack of a better option, the object remains white from the default state's property.
-
-Some practical notes:
-- The precedence (value) of states is quite intuitive, and it's something the user would expect naturally. E.g. if an object is focused the user will still want to see if it's pressed, therefore the pressed state has a higher precedence.
-If the focused state had a higher precedence it would overwrite the pressed color.
-- If you want to set a property for all states (e.g. red background color) just set it for the default state. If the object can't find a property for its current state it will fall back to the default state's property.
-- Use ORed states to describe the properties for complex cases. (E.g. pressed + checked + focused)
-- It might be a good idea to use different style elements for different states.
-For example, finding background colors for released, pressed, checked + pressed, focused, focused + pressed, focused + pressed + checked, etc. states is quite difficult.
-Instead, for example, use the background color for pressed and checked states and indicate the focused state with a different border color.
-
-## Cascading styles
-It's not required to set all the properties in one style. It's possible to add more styles to an object and have the latter added style modify or extend appearance.
-For example, create a general gray button style and create a new one for red buttons where only the new background color is set.
-
-This is much like in CSS when used classes are listed like ``.
-
-Styles added later have precedence over ones set earlier. So in the gray/red button example above, the normal button style should be added first and the red style second.
-However, the precedence of the states are still taken into account.
-So let's examine the following case:
-- the basic button style defines dark-gray color for the default state and light-gray color for the pressed state
-- the red button style defines the background color as red only in the default state
-
-In this case, when the button is released (it's in default state) it will be red because a perfect match is found in the most recently added style (red).
-When the button is pressed the light-gray color is a better match because it describes the current state perfectly, so the button will be light-gray.
-
-## Inheritance
-Some properties (typically those related to text) can be inherited from the parent object's styles.
-Inheritance is applied only if the given property is not set in the object's styles (even in default state).
-In this case, if the property is inheritable, the property's value will be searched in the parents until an object specifies a value for the property. The parents will use their own state to determine the value.
-So if a button is pressed, and the text color comes from here, the pressed text color will be used.
-
-
-## Parts
-Objects can be composed of *parts* which may each have their own styles.
-
-The following predefined parts exist in LVGL:
-- `LV_PART_MAIN` A background like rectangle
-- `LV_PART_SCROLLBAR` The scrollbar(s)
-- `LV_PART_INDICATOR` Indicator, e.g. for slider, bar, switch, or the tick box of the checkbox
-- `LV_PART_KNOB` Like a handle to grab to adjust a value
-- `LV_PART_SELECTED` Indicate the currently selected option or section
-- `LV_PART_ITEMS` Used if the widget has multiple similar elements (e.g. table cells)
-- `LV_PART_TICKS` Ticks on scales e.g. for a chart or meter
-- `LV_PART_CURSOR` Mark a specific place e.g. text area's or chart's cursor
-- `LV_PART_CUSTOM_FIRST` Custom part identifiers can be added starting from here.
-
-
-For example a [Slider](/widgets/core/slider) has three parts:
-- Background
-- Indicator
-- Knob
-
-This means all three parts of the slider can have their own styles. See later how to add styles to objects and parts.
-
-## Initialize styles and set/get properties
-
-Styles are stored in `lv_style_t` variables. Style variables should be `static`, global or dynamically allocated.
-In other words they cannot be local variables in functions which are destroyed when the function exits.
-Before using a style it should be initialized with `lv_style_init(&my_style)`.
-After initializing a style, properties can be added or changed.
-
-Property set functions looks like this: `lv_style_set_
(&style, );` For example:
-```c
-static lv_style_t style_btn;
-lv_style_init(&style_btn);
-lv_style_set_bg_color(&style_btn, lv_color_hex(0x115588));
-lv_style_set_bg_opa(&style_btn, LV_OPA_50);
-lv_style_set_border_width(&style_btn, 2);
-lv_style_set_border_color(&style_btn, lv_color_black());
-
-static lv_style_t style_btn_red;
-lv_style_init(&style_btn_red);
-lv_style_set_bg_color(&style_btn_red, lv_plaette_main(LV_PALETTE_RED));
-lv_style_set_bg_opa(&style_btn_red, LV_OPA_COVER);
-```
-
-To remove a property use:
-
-```c
-lv_style_remove_prop(&style, LV_STYLE_BG_COLOR);
-```
-
-To get a property's value from a style:
-```c
-lv_style_value_t v;
-lv_res_t res = lv_style_get_prop(&style, LV_STYLE_BG_COLOR, &v);
-if(res == LV_RES_OK) { /*Found*/
- do_something(v.color);
-}
-```
-
-`lv_style_value_t` has 3 fields:
-- `num` for integer, boolean and opacity properties
-- `color` for color properties
-- `ptr` for pointer properties
-
-To reset a style (free all its data) use:
-```c
-lv_style_reset(&style);
-```
-
-Styles can be built as `const` too to save RAM:
-```c
-const lv_style_const_prop_t style1_props[] = {
- LV_STYLE_CONST_WIDTH(50),
- LV_STYLE_CONST_HEIGHT(50),
- LV_STYLE_PROP_INV,
-};
-
-LV_STYLE_CONST_INIT(style1, style1_props);
-```
-
-Later `const` style can be used like any other style but (obviously) new properties can not be added.
-
-
-## Add and remove styles to a widget
-A style on its own is not that useful. It must be assigned to an object to take effect.
-
-### Add styles
-To add a style to an object use `lv_obj_add_style(obj, &style, )`. `` is an OR-ed value of parts and state to which the style should be added. Some examples:
-- `LV_PART_MAIN | LV_STATE_DEFAULT`
-- `LV_STATE_PRESSED`: The main part in pressed state. `LV_PART_MAIN` can be omitted
-- `LV_PART_SCROLLBAR`: The scrollbar part in the default state. `LV_STATE_DEFAULT` can be omitted.
-- `LV_PART_SCROLLBAR | LV_STATE_SCROLLED`: The scrollbar part when the object is being scrolled
-- `0` Same as `LV_PART_MAIN | LV_STATE_DEFAULT`.
-- `LV_PART_INDICATOR | LV_STATE_PRESSED | LV_STATE_CHECKED` The indicator part when the object is pressed and checked at the same time.
-
-Using `lv_obj_add_style`:
-```c
-lv_obj_add_style(btn, &style_btn, 0); /*Default button style*/
-lv_obj_add_style(btn, &btn_red, LV_STATE_PRESSED); /*Overwrite only some colors to red when pressed*/
-```
-
-### Remove styles
-To remove all styles from an object use `lv_obj_remove_style_all(obj)`.
-
-To remove specific styles use `lv_obj_remove_style(obj, style, selector)`. This function will remove `style` only if the `selector` matches with the `selector` used in `lv_obj_add_style`.
-`style` can be `NULL` to check only the `selector` and remove all matching styles. The `selector` can use the `LV_STATE_ANY` and `LV_PART_ANY` values to remove the style from any state or part.
-
-
-### Report style changes
-If a style which is already assigned to an object changes (i.e. a property is added or changed), the objects using that style should be notified. There are 3 options to do this:
-1. If you know that the changed properties can be applied by a simple redraw (e.g. color or opacity changes) just call `lv_obj_invalidate(obj)` or `lv_obj_invalidate(lv_scr_act())`.
-2. If more complex style properties were changed or added, and you know which object(s) are affected by that style call `lv_obj_refresh_style(obj, part, property)`.
-To refresh all parts and properties use `lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY)`.
-3. To make LVGL check all objects to see if they use a style and refresh them when needed, call `lv_obj_report_style_change(&style)`. If `style` is `NULL` all objects will be notified about a style change.
-
-### Get a property's value on an object
-To get a final value of property - considering cascading, inheritance, local styles and transitions (see below) - property get functions like this can be used:
-`lv_obj_get_style_(obj, )`.
-These functions use the object's current state and if no better candidate exists they return a default value.
-For example:
-```c
-lv_color_t color = lv_obj_get_style_bg_color(btn, LV_PART_MAIN);
-```
-
-## Local styles
-In addition to "normal" styles, objects can also store local styles. This concept is similar to inline styles in CSS (e.g. ``) with some modification.
-
-Local styles are like normal styles, but they can't be shared among other objects. If used, local styles are allocated automatically, and freed when the object is deleted.
-They are useful to add local customization to an object.
-
-Unlike in CSS, LVGL local styles can be assigned to states (*pseudo-classes*) and parts (*pseudo-elements*).
-
-To set a local property use functions like `lv_obj_set_style_
(obj, , );`
-For example:
-```c
-lv_obj_set_style_bg_color(slider, lv_color_red(), LV_PART_INDICATOR | LV_STATE_FOCUSED);
-```
-## Properties
-For the full list of style properties click [here](/overview/style-props).
-
-### Typical background properties
-In the documentation of the widgets you will see sentences like "The widget uses the typical background properties". These "typical background properties" are the ones related to:
-- Background
-- Border
-- Outline
-- Shadow
-- Padding
-- Width and height transformation
-- X and Y translation
-
-
-## Transitions
-By default, when an object changes state (e.g. it's pressed) the new properties from the new state are set immediately. However, with transitions it's possible to play an animation on state change.
-For example, on pressing a button its background color can be animated to the pressed color over 300 ms.
-
-The parameters of the transitions are stored in the styles. It's possible to set
-- the time of the transition
-- the delay before starting the transition
-- the animation path (also known as the timing or easing function)
-- the properties to animate
-
-The transition properties can be defined for each state. For example, setting a 500 ms transition time in the default state means that when the object goes to the default state a 500 ms transition time is applied.
-Setting a 100 ms transition time in the pressed state causes a 100 ms transition when going to the pressed state.
-This example configuration results in going to the pressed state quickly and then going back to default slowly.
-
-To describe a transition an `lv_transition_dsc_t` variable needs to be initialized and added to a style:
-```c
-/*Only its pointer is saved so must static, global or dynamically allocated */
-static const lv_style_prop_t trans_props[] = {
- LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR,
- 0, /*End marker*/
-};
-
-static lv_style_transition_dsc_t trans1;
-lv_style_transition_dsc_init(&trans1, trans_props, lv_anim_path_ease_out, duration_ms, delay_ms);
-
-lv_style_set_transition(&style1, &trans1);
-```
-
-## Color filter
-TODO
-
-
-## Themes
-Themes are a collection of styles. If there is an active theme LVGL applies it on every created widget.
-This will give a default appearance to the UI which can then be modified by adding further styles.
-
-Every display can have a different theme. For example, you could have a colorful theme on a TFT and monochrome theme on a secondary monochrome display.
-
-To set a theme for a display, two steps are required:
-1. Initialize a theme
-2. Assign the initialized theme to a display.
-
-Theme initialization functions can have different prototypes. This example shows how to set the "default" theme:
-```c
-lv_theme_t * th = lv_theme_default_init(display, /*Use the DPI, size, etc from this display*/
- LV_COLOR_PALETTE_BLUE, LV_COLOR_PALETTE_CYAN, /*Primary and secondary palette*/
- false, /*Light or dark mode*/
- &lv_font_montserrat_10, &lv_font_montserrat_14, &lv_font_montserrat_18); /*Small, normal, large fonts*/
-
-lv_disp_set_theme(display, th); /*Assign the theme to the display*/
-```
-
-
-The included themes are enabled in `lv_conf.h`. If the default theme is enabled by `LV_USE_THEME_DEFAULT 1` LVGL automatically initializes and sets it when a display is created.
-
-### Extending themes
-
-Built-in themes can be extended.
-If a custom theme is created, a parent theme can be selected. The parent theme's styles will be added before the custom theme's styles.
-Any number of themes can be chained this way. E.g. default theme -> custom theme -> dark theme.
-
-`lv_theme_set_parent(new_theme, base_theme)` extends the `base_theme` with the `new_theme`.
-
-There is an example for it below.
-
-## Examples
-
-```eval_rst
-
-.. include:: ../../examples/styles/index.rst
-
-```
-
-## API
-```eval_rst
-
-.. doxygenfile:: lv_style.h
- :project: lvgl
-
-.. doxygenfile:: lv_theme.h
- :project: lvgl
-
-.. doxygenfile:: lv_obj_style_gen.h
- :project: lvgl
-
-.. doxygenfile:: lv_style_gen.h
- :project: lvgl
-
-
-```
diff --git a/lib/lvgl/docs/overview/timer.md b/lib/lvgl/docs/overview/timer.md
deleted file mode 100644
index 9088940..0000000
--- a/lib/lvgl/docs/overview/timer.md
+++ /dev/null
@@ -1,102 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/overview/timer.md
-```
-# Timers
-
-LVGL has a built-in timer system. You can register a function to have it be called periodically. The timers are handled and called in `lv_timer_handler()`, which needs to be called every few milliseconds.
-See [Porting](/porting/timer-handler) for more information.
-
-Timers are non-preemptive, which means a timer cannot interrupt another timer. Therefore, you can call any LVGL related function in a timer.
-
-
-## Create a timer
-To create a new timer, use `lv_timer_create(timer_cb, period_ms, user_data)`. It will create an `lv_timer_t *` variable, which can be used later to modify the parameters of the timer.
-`lv_timer_create_basic()` can also be used. This allows you to create a new timer without specifying any parameters.
-
-A timer callback should have a `void (*lv_timer_cb_t)(lv_timer_t *);` prototype.
-
-For example:
-```c
-void my_timer(lv_timer_t * timer)
-{
- /*Use the user_data*/
- uint32_t * user_data = timer->user_data;
- printf("my_timer called with user data: %d\n", *user_data);
-
- /*Do something with LVGL*/
- if(something_happened) {
- something_happened = false;
- lv_btn_create(lv_scr_act(), NULL);
- }
-}
-
-...
-
-static uint32_t user_data = 10;
-lv_timer_t * timer = lv_timer_create(my_timer, 500, &user_data);
-
-```
-
-## Ready and Reset
-
-`lv_timer_ready(timer)` makes a timer run on the next call of `lv_timer_handler()`.
-
-`lv_timer_reset(timer)` resets the period of a timer. It will be called again after the defined period of milliseconds has elapsed.
-
-
-## Set parameters
-You can modify some timer parameters later:
-- `lv_timer_set_cb(timer, new_cb)`
-- `lv_timer_set_period(timer, new_period)`
-
-## Repeat count
-
-You can make a timer repeat only a given number of times with `lv_timer_set_repeat_count(timer, count)`. The timer will automatically be deleted after it's called the defined number of times. Set the count to `-1` to repeat indefinitely.
-
-
-## Measure idle time
-
-You can get the idle percentage time of `lv_timer_handler` with `lv_timer_get_idle()`. Note that, it doesn't measure the idle time of the overall system, only `lv_timer_handler`.
-It can be misleading if you use an operating system and call `lv_timer_handler` in a timer, as it won't actually measure the time the OS spends in an idle thread.
-
-## Asynchronous calls
-
-In some cases, you can't perform an action immediately. For example, you can't delete an object because something else is still using it, or you don't want to block the execution now.
-For these cases, `lv_async_call(my_function, data_p)` can be used to call `my_function` on the next invocation of `lv_timer_handler`. `data_p` will be passed to the function when it's called.
-Note that only the data pointer is saved, so you need to ensure that the variable will be "alive" while the function is called. It can be *static*, global or dynamically allocated data.
-
-For example:
-```c
-void my_screen_clean_up(void * scr)
-{
- /*Free some resources related to `scr`*/
-
- /*Finally delete the screen*/
- lv_obj_del(scr);
-}
-
-...
-
-/*Do something with the object on the current screen*/
-
-/*Delete screen on next call of `lv_timer_handler`, not right now.*/
-lv_async_call(my_screen_clean_up, lv_scr_act());
-
-/*The screen is still valid so you can do other things with it*/
-
-```
-
-If you just want to delete an object and don't need to clean anything up in `my_screen_cleanup` you could just use `lv_obj_del_async` which will delete the object on the next call to `lv_timer_handler`.
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_timer.h
- :project: lvgl
-
-.. doxygenfile:: lv_async.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/porting/display.md b/lib/lvgl/docs/porting/display.md
deleted file mode 100644
index 78438ba..0000000
--- a/lib/lvgl/docs/porting/display.md
+++ /dev/null
@@ -1,247 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/display.md
-```
-# Display interface
-
-To register a display for LVGL, a `lv_disp_draw_buf_t` and a `lv_disp_drv_t` variable have to be initialized.
-- `lv_disp_draw_buf_t` contains internal graphic buffer(s) called draw buffer(s).
-- `lv_disp_drv_t` contains callback functions to interact with the display and manipulate low level drawing behavior.
-
-## Draw buffer
-
-Draw buffer(s) are simple array(s) that LVGL uses to render the screen content.
-Once rendering is ready the content of the draw buffer is sent to the display using the `flush_cb` function set in the display driver (see below).
-
-A draw buffer can be initialized via a `lv_disp_draw_buf_t` variable like this:
-```c
-/*A static or global variable to store the buffers*/
-static lv_disp_draw_buf_t disp_buf;
-
-/*Static or global buffer(s). The second buffer is optional*/
-static lv_color_t buf_1[MY_DISP_HOR_RES * 10];
-static lv_color_t buf_2[MY_DISP_HOR_RES * 10];
-
-/*Initialize `disp_buf` with the buffer(s). With only one buffer use NULL instead buf_2 */
-lv_disp_draw_buf_init(&disp_buf, buf_1, buf_2, MY_DISP_HOR_RES*10);
-```
-
-Note that `lv_disp_draw_buf_t` must be a static, global or dynamically allocated variable. It cannot be a local variable as they are destroyed upon end of scope.
-
-As you can see above, the draw buffer may be smaller than the screen. In this case, larger areas are redrawn in smaller segments that fit into the draw buffer(s).
-If only a small area changes (e.g. a button is pressed) then only that area will be refreshed.
-
-A larger buffer results in better performance but above 1/10 screen sized buffer(s) there is no significant performance improvement.
-Therefore it's recommended to choose the size of the draw buffer(s) to be at least 1/10 screen sized.
-
-## Buffering modes
-
-There are several settings to adjust the number draw buffers and buffering/refreshing modes.
-
-You can measure the performance of different configurations using the [benchmark example](https://github.com/lvgl/lvgl/tree/master/demos/benchmark).
-
-### One buffer
-If only one buffer is used LVGL draws the content of the screen into that draw buffer and sends it to the display.
-LVGL then needs to wait until the content of the buffer is sent to the display before drawing something new in it.
-
-### Two buffers
-If two buffers are used LVGL can draw into one buffer while the content of the other buffer is sent to the display in the background.
-DMA or other hardware should be used to transfer data to the display so the MCU can continue drawing.
-This way, the rendering and refreshing of the display become parallel operations.
-
-### Full refresh
-In the display driver (`lv_disp_drv_t`) enabling the `full_refresh` bit will force LVGL to always redraw the whole screen. This works in both *one buffer* and *two buffers* modes.
-If `full_refresh` is enabled and two screen sized draw buffers are provided, LVGL's display handling works like "traditional" double buffering.
-This means the `flush_cb` callback only has to update the address of the framebuffer (`color_p` parameter).
-This configuration should be used if the MCU has an LCD controller peripheral and not with an external display controller (e.g. ILI9341 or SSD1963) accessed via serial link. The latter will generally be too slow to maintain high frame rates with full screen redraws.
-
-### Direct mode
-If the `direct_mode` flag is enabled in the display driver LVGL will draw directly into a **screen sized frame buffer**. That is the draw buffer(s) needs to be screen sized.
-It this case `flush_cb` will be called only once when all dirty areas are redrawn.
-With `direct_mode` the frame buffer always contains the current frame as it should be displayed on the screen.
-If 2 frame buffers are provided as draw buffers LVGL will alter the buffers but always draw only the dirty areas.
-Therefore the 2 buffers needs to synchronized in `flush_cb` like this:
-1. Display the frame buffer pointed by `color_p`
-2. Copy the redrawn areas from `color_p` to the other buffer.
-
-The get the redrawn areas to copy use the following functions
-`_lv_refr_get_disp_refreshing()` returns the display being refreshed
-`disp->inv_areas[LV_INV_BUF_SIZE]` contains the invalidated areas
-`disp->inv_area_joined[LV_INV_BUF_SIZE]` if 1 that area was joined into another one and should be ignored
-`disp->inv_p` number of valid elements in `inv_areas`
-
-## Display driver
-
-Once the buffer initialization is ready a `lv_disp_drv_t` display driver needs to be:
-1. initialized with `lv_disp_drv_init(&disp_drv)`
-2. its fields need to be set
-3. it needs to be registered in LVGL with `lv_disp_drv_register(&disp_drv)`
-
-Note that `lv_disp_drv_t` also needs to be a static, global or dynamically allocated variable.
-
-### Mandatory fields
-In the most simple case only the following fields of `lv_disp_drv_t` need to be set:
-- `draw_buf` pointer to an initialized `lv_disp_draw_buf_t` variable.
-- `hor_res` horizontal resolution of the display in pixels.
-- `ver_res` vertical resolution of the display in pixels.
-- `flush_cb` a callback function to copy a buffer's content to a specific area of the display.
-`lv_disp_flush_ready(&disp_drv)` needs to be called when flushing is ready.
-LVGL might render the screen in multiple chunks and therefore call `flush_cb` multiple times. To see if the current one is the last chunk of rendering use `lv_disp_flush_is_last(&disp_drv)`.
-
-### Optional fields
-There are some optional display driver data fields:
-- `physical_hor_res` horizontal resolution of the full / physical display in pixels. Only set this when _not_ using the full screen (defaults to -1 / same as `hor_res`).
-- `physical_ver_res` vertical resolution of the full / physical display in pixels. Only set this when _not_ using the full screen (defaults to -1 / same as `ver_res`).
-- `offset_x` horizontal offset from the full / physical display in pixels. Only set this when _not_ using the full screen (defaults to 0).
-- `offset_y` vertical offset from the full / physical display in pixels. Only set this when _not_ using the full screen (defaults to 0).
-- `color_chroma_key` A color which will be drawn as transparent on chrome keyed images. Set to `LV_COLOR_CHROMA_KEY` from `lv_conf.h` by default.
-- `anti_aliasing` use anti-aliasing (edge smoothing). Enabled by default if `LV_COLOR_DEPTH` is set to at least 16 in `lv_conf.h`.
-- `rotated` and `sw_rotate` See the [Rotation](#rotation) section below.
-- `screen_transp` if `1` the screen itself can have transparency as well. `LV_COLOR_SCREEN_TRANSP` must be enabled in `lv_conf.h` and `LV_COLOR_DEPTH` must be 32.
-- `user_data` A custom `void` user data for the driver.
-- `full_refresh` always redrawn the whole screen (see above)
-- `direct_mode` draw directly into the frame buffer (see above)
-
-Some other optional callbacks to make it easier and more optimal to work with monochrome, grayscale or other non-standard RGB displays:
-- `rounder_cb` Round the coordinates of areas to redraw. E.g. a 2x2 px can be converted to 2x8.
-It can be used if the display controller can refresh only areas with specific height or width (usually 8 px height with monochrome displays).
-- `set_px_cb` a custom function to write the draw buffer. It can be used to store the pixels more compactly in the draw buffer if the display has a special color format. (e.g. 1-bit monochrome, 2-bit grayscale etc.)
-This way the buffers used in `lv_disp_draw_buf_t` can be smaller to hold only the required number of bits for the given area size. Note that rendering with `set_px_cb` is slower than normal rendering.
-- `monitor_cb` A callback function that tells how many pixels were refreshed and in how much time. Called when the last chunk is rendered and sent to the display.
-- `clean_dcache_cb` A callback for cleaning any caches related to the display.
-- `render_start_cb` A callback function that notifies the display driver that rendering has started. It also could be used to wait for VSYNC to start rendering. It's useful if rendering is faster than a VSYNC period.
-
-LVGL has built-in support to several GPUs (see `lv_conf.h`) but if something else is required these functions can be used to make LVGL use a GPU:
-- `gpu_fill_cb` fill an area in the memory with a color.
-- `gpu_wait_cb` if any GPU function returns while the GPU is still working, LVGL will use this function when required to make sure GPU rendering is ready.
-
-### Examples
-All together it looks like this:
-```c
-static lv_disp_drv_t disp_drv; /*A variable to hold the drivers. Must be static or global.*/
-lv_disp_drv_init(&disp_drv); /*Basic initialization*/
-disp_drv.draw_buf = &disp_buf; /*Set an initialized buffer*/
-disp_drv.flush_cb = my_flush_cb; /*Set a flush callback to draw to the display*/
-disp_drv.hor_res = 320; /*Set the horizontal resolution in pixels*/
-disp_drv.ver_res = 240; /*Set the vertical resolution in pixels*/
-
-lv_disp_t * disp;
-disp = lv_disp_drv_register(&disp_drv); /*Register the driver and save the created display objects*/
-```
-
-Here are some simple examples of the callbacks:
-```c
-void my_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
-{
- /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one
- *`put_px` is just an example, it needs to implemented by you.*/
- int32_t x, y;
- for(y = area->y1; y <= area->y2; y++) {
- for(x = area->x1; x <= area->x2; x++) {
- put_px(x, y, *color_p);
- color_p++;
- }
- }
-
- /* IMPORTANT!!!
- * Inform the graphics library that you are ready with the flushing*/
- lv_disp_flush_ready(disp_drv);
-}
-
-void my_gpu_fill_cb(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, const lv_area_t * fill_area, lv_color_t color);
-{
- /*It's an example code which should be done by your GPU*/
- uint32_t x, y;
- dest_buf += dest_width * fill_area->y1; /*Go to the first line*/
-
- for(y = fill_area->y1; y < fill_area->y2; y++) {
- for(x = fill_area->x1; x < fill_area->x2; x++) {
- dest_buf[x] = color;
- }
- dest_buf+=dest_width; /*Go to the next line*/
- }
-}
-
-
-void my_rounder_cb(lv_disp_drv_t * disp_drv, lv_area_t * area)
-{
- /* Update the areas as needed.
- * For example it makes the area to start only on 8th rows and have Nx8 pixel height.*/
- area->y1 = area->y1 & 0x07;
- area->y2 = (area->y2 & 0x07) + 8;
-}
-
-void my_set_px_cb(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa)
-{
- /* Write to the buffer as required for the display.
- * For example it writes only 1-bit for monochrome displays mapped vertically.*/
- buf += buf_w * (y >> 3) + x;
- if(lv_color_brightness(color) > 128) (*buf) |= (1 << (y % 8));
- else (*buf) &= ~(1 << (y % 8));
-}
-
-void my_monitor_cb(lv_disp_drv_t * disp_drv, uint32_t time, uint32_t px)
-{
- printf("%d px refreshed in %d ms\n", time, ms);
-}
-
-void my_clean_dcache_cb(lv_disp_drv_t * disp_drv, uint32)
-{
- /* Example for Cortex-M (CMSIS) */
- SCB_CleanInvalidateDCache();
-}
-```
-
-## Other options
-
-### Rotation
-
-LVGL supports rotation of the display in 90 degree increments. You can select whether you'd like software rotation or hardware rotation.
-
-If you select software rotation (`sw_rotate` flag set to 1), LVGL will perform the rotation for you. Your driver can and should assume that the screen width and height have not changed. Simply flush pixels to the display as normal. Software rotation requires no additional logic in your `flush_cb` callback.
-
-There is a noticeable amount of overhead to performing rotation in software. Hardware rotation is available to avoid unwanted slowdowns. In this mode, LVGL draws into the buffer as if your screen width and height were swapped. You are responsible for rotating the provided pixels yourself.
-
-The default rotation of your display when it is initialized can be set using the `rotated` flag. The available options are `LV_DISP_ROT_NONE`, `LV_DISP_ROT_90`, `LV_DISP_ROT_180`, or `LV_DISP_ROT_270`. The rotation values are relative to how you would rotate the physical display in the clockwise direction. Thus, `LV_DISP_ROT_90` means you rotate the hardware 90 degrees clockwise, and the display rotates 90 degrees counterclockwise to compensate.
-
-(Note for users upgrading from 7.10.0 and older: these new rotation enum values match up with the old 0/1 system for rotating 90 degrees, so legacy code should continue to work as expected. Software rotation is also disabled by default for compatibility.)
-
-Display rotation can also be changed at runtime using the `lv_disp_set_rotation(disp, rot)` API.
-
-Support for software rotation is a new feature, so there may be some glitches/bugs depending on your configuration. If you encounter a problem please open an issue on [GitHub](https://github.com/lvgl/lvgl/issues).
-
-### Decoupling the display refresh timer
-Normally the dirty (a.k.a invalid) areas are checked and redrawn in every `LV_DISP_DEF_REFR_PERIOD` milliseconds (set in `lv_conf.h`).
-However, in some cases you might need more control on when the display refreshing happen, for example to synchronize rendering with VSYNC or the TE signal.
-
-You can do this in the following way:
-```c
-/*Delete the original display refresh timer*/
-lv_timer_del(disp->refr_timer);
-disp->refr_timer = NULL;
-
-
-/*Call this anywhere you want to refresh the dirty areas*/
-_lv_disp_refr_timer(NULL);
-```
-
-If you have multiple displays call `lv_disp_set_deafult(disp1);` to select the display to refresh before `_lv_disp_refr_timer(NULL);`.
-
-Note that `lv_timer_handler()` and `_lv_disp_refr_timer()` can not run at the same time.
-
-If the performance monitor is enabled, the value of `LV_DISP_DEF_REFR_PERIOD` needs to be set to be consistent with the refresh period of the display to ensure that the statistical results are correct.
-
-## Further reading
-
-- [lv_port_disp_template.c](https://github.com/lvgl/lvgl/blob/master/examples/porting/lv_port_disp_template.c) for a template for your own driver.
-- [Drawing](/overview/drawing) to learn more about how rendering works in LVGL.
-- [Display features](/overview/display) to learn more about higher level display features.
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_hal_disp.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/porting/gpu.md b/lib/lvgl/docs/porting/gpu.md
deleted file mode 100644
index d13b399..0000000
--- a/lib/lvgl/docs/porting/gpu.md
+++ /dev/null
@@ -1,202 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/gpu.md
-```
-# Add custom GPU
-LVGL has a flexible and extendable draw pipeline. You can hook it to do some rendering with a GPU or even completely replace the built-in software renderer.
-
-## Draw context
-The core structure of drawing is `lv_draw_ctx_t`.
-It contains a pointer to a buffer where drawing should happen and a couple of callbacks to draw rectangles, texts, and other primitives.
-
-### Fields
-`lv_draw_ctx_t` has the following fields:
-- `void * buf` Pointer to a buffer to draw into
-- `lv_area_t * buf_area` The position and size of `buf` (absolute coordinates)
-- `const lv_area_t * clip_area` The current clip area with absolute coordinates, always the same or smaller than `buf_area`. All drawings should be clipped to this area.
-- `void (*draw_rect)()` Draw a rectangle with shadow, gradient, border, etc.
-- `void (*draw_arc)()` Draw an arc
-- `void (*draw_img_decoded)()` Draw an (A)RGB image that is already decoded by LVGL.
-- `lv_res_t (*draw_img)()` Draw an image before decoding it (it bypasses LVGL's internal image decoders)
-- `void (*draw_letter)()` Draw a letter
-- `void (*draw_line)()` Draw a line
-- `void (*draw_polygon)()` Draw a polygon
-- `void (*draw_bg)()` Replace the buffer with a rect without decoration like radius or borders.
-- `void (*wait_for_finish)()` Wait until all background operation are finished. (E.g. GPU operations)
-- `void * user_data` Custom user data for arbitrary purpose
-
-(For the sake of simplicity the parameters of the callbacks are not shown here.)
-
-All `draw_*` callbacks receive a pointer to the current `draw_ctx` as their first parameter. Among the other parameters there is a descriptor that tells what to draw,
-e.g. for `draw_rect` it's called [lv_draw_rect_dsc_t](https://github.com/lvgl/lvgl/blob/master/src/draw/lv_draw_rect.h),
-for `lv_draw_line` it's called [lv_draw_line_dsc_t](https://github.com/lvgl/lvgl/blob/master/src/draw/lv_draw_line.h), etc.
-
-To correctly render according to a `draw_dsc` you need to be familiar with the [Boxing model](https://docs.lvgl.io/master/overview/coords.html#boxing-model) of LVGL and the meanings of the fields. The name and meaning of the fields are identical to name and meaning of the [Style properties](https://docs.lvgl.io/master/overview/style-props.html).
-
-### Initialization
-The `lv_disp_drv_t` has 4 fields related to the draw context:
-- `lv_draw_ctx_t * draw_ctx` Pointer to the `draw_ctx` of this display
-- `void (*draw_ctx_init)(struct _lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx)` Callback to initialize a `draw_ctx`
-- `void (*draw_ctx_deinit)(struct _lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx)` Callback to de-initialize a `draw_ctx`
-- `size_t draw_ctx_size` Size of the draw context structure. E.g. `sizeof(lv_draw_sw_ctx_t)`
-
-When you ignore these fields, LVGL will set default values for callbacks and size in `lv_disp_drv_init()` based on the configuration in `lv_conf.h`.
-`lv_disp_drv_register()` will allocate a `draw_ctx` based on `draw_ctx_size` and call `draw_ctx_init()` on it.
-
-However, you can overwrite the callbacks and the size values before calling `lv_disp_drv_register()`.
-It makes it possible to use your own `draw_ctx` with your own callbacks.
-
-
-## Software renderer
-LVGL's built in software renderer extends the basic `lv_draw_ctx_t` structure and sets the draw callbacks. It looks like this:
-```c
-typedef struct {
- /** Include the basic draw_ctx type*/
- lv_draw_ctx_t base_draw;
-
- /** Blend a color or image to an area*/
- void (*blend)(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
-} lv_draw_sw_ctx_t;
-```
-
-Set the draw callbacks in `draw_ctx_init()` like:
-```c
-draw_sw_ctx->base_draw.draw_rect = lv_draw_sw_rect;
-draw_sw_ctx->base_draw.draw_letter = lv_draw_sw_letter;
-...
-```
-
-### Blend callback
-As you saw above the software renderer adds the `blend` callback field. It's a special callback related to how the software renderer works.
-All draw operations end up in the `blend` callback which can either fill an area or copy an image to an area by considering an optional mask.
-
-The `lv_draw_sw_blend_dsc_t` parameter describes what and how to blend. It has the following fields:
-- `const lv_area_t * blend_area` The area with absolute coordinates to draw on `draw_ctx->buf`. If `src_buf` is set, it's the coordinates of the image to blend.
-- `const lv_color_t * src_buf` Pointer to an image to blend. If set, `color` is ignored. If not set fill `blend_area` with `color`
-- `lv_color_t color` Fill color. Used only if `src_buf == NULL`
-- `lv_opa_t * mask_buf` NULL if ignored, or an alpha mask to apply on `blend_area`
-- `lv_draw_mask_res_t mask_res` The result of the previous mask operation. (`LV_DRAW_MASK_RES_...`)
-- `const lv_area_t * mask_area` The area of `mask_buf` with absolute coordinates
-- `lv_opa_t opa` The overall opacity
-- `lv_blend_mode_t blend_mode` E.g. `LV_BLEND_MODE_ADDITIVE`
-
-
-## Extend the software renderer
-
-### New blend callback
-
-Let's take a practical example: you would like to use your MCUs GPU for color fill operations only.
-
-As all draw callbacks call `blend` callback to fill an area in the end only the `blend` callback needs to be overwritten.
-
-First extend `lv_draw_sw_ctx_t`:
-```c
-
-/*We don't add new fields, so just for clarity add new type*/
-typedef lv_draw_sw_ctx_t my_draw_ctx_t;
-
-void my_draw_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
-{
- /*Initialize the parent type first */
- lv_draw_sw_init_ctx(drv, draw_ctx);
-
- /*Change some callbacks*/
- my_draw_ctx_t * my_draw_ctx = (my_draw_ctx_t *)draw_ctx;
-
- my_draw_ctx->blend = my_draw_blend;
- my_draw_ctx->base_draw.wait_for_finish = my_gpu_wait;
-}
-```
-
-After calling `lv_disp_draw_init(&drv)` you can assign the new `draw_ctx_init` callback and set `draw_ctx_size` to overwrite the defaults:
-```c
-static lv_disp_drv_t drv;
-lv_disp_draw_init(&drv);
-drv->hor_res = my_hor_res;
-drv->ver_res = my_ver_res;
-drv->flush_cb = my_flush_cb;
-
-/*New draw ctx settings*/
-drv->draw_ctx_init = my_draw_ctx_init;
-drv->draw_ctx_size = sizeof(my_draw_ctx_t);
-
-lv_disp_drv_register(&drv);
-```
-
-This way when LVGL calls `blend` it will call `my_draw_blend` and we can do custom GPU operations. Here is a complete example:
-```c
-void my_draw_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
-{
- /*Let's get the blend area which is the intersection of the area to fill and the clip area.*/
- lv_area_t blend_area;
- if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area)) return; /*Fully clipped, nothing to do*/
-
- /*Fill only non masked, fully opaque, normal blended and not too small areas*/
- if(dsc->src_buf == NULL && dsc->mask == NULL && dsc->opa >= LV_OPA_MAX &&
- dsc->blend_mode == LV_BLEND_MODE_NORMAL && lv_area_get_size(&blend_area) > 100) {
-
- /*Got the first pixel on the buffer*/
- lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area); /*Width of the destination buffer*/
- lv_color_t * dest_buf = draw_ctx->buf;
- dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) + (blend_area.x1 - draw_ctx->buf_area->x1);
-
- /*Make the blend area relative to the buffer*/
- lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
-
- /*Call your custom gou fill function to fill blend_area, on dest_buf with dsc->color*/
- my_gpu_fill(dest_buf, dest_stride, &blend_area, dsc->color);
- }
- /*Fallback: the GPU doesn't support these settings. Call the SW renderer.*/
- else {
- lv_draw_sw_blend_basic(draw_ctx, dsc);
- }
-}
-```
-
-The implementation of wait callback is much simpler:
-```c
-void my_gpu_wait(lv_draw_ctx_t * draw_ctx)
-{
- while(my_gpu_is_working());
-
- /*Call SW renderer's wait callback too*/
- lv_draw_sw_wait_for_finish(draw_ctx);
-}
-```
-
-### New rectangle drawer
-If your MCU has a more powerful GPU that can draw e.g. rounded rectangles you can replace the original software drawer too.
-A custom `draw_rect` callback might look like this:
-```c
-void my_draw_rect(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords)
-{
- if(lv_draw_mask_is_any(coords) == false && dsc->grad == NULL && dsc->bg_img_src == NULL &&
- dsc->shadow_width == 0 && dsc->blend_mode = LV_BLEND_MODE_NORMAL)
- {
- /*Draw the background*/
- my_bg_drawer(draw_ctx, coords, dsc->bg_color, dsc->radius);
-
- /*Draw the border if any*/
- if(dsc->border_width) {
- my_border_drawer(draw_ctx, coords, dsc->border_width, dsc->border_color, dsc->border_opa)
- }
-
- /*Draw the outline if any*/
- if(dsc->outline_width) {
- my_outline_drawer(draw_ctx, coords, dsc->outline_width, dsc->outline_color, dsc->outline_opa, dsc->outline_pad)
- }
- }
- /*Fallback*/
- else {
- lv_draw_sw_rect(draw_ctx, dsc, coords);
- }
-}
-```
-
-`my_draw_rect` can fully bypass the use of `blend` callback if needed.
-
-## Fully custom draw engine
-
-For example if your MCU/MPU supports a powerful vector graphics engine you might use only that instead of LVGL's SW renderer.
-In this case, you need to base the renderer on the basic `lv_draw_ctx_t` (instead of `lv_draw_sw_ctx_t`) and extend/initialize it as you wish.
-
diff --git a/lib/lvgl/docs/porting/indev.md b/lib/lvgl/docs/porting/indev.md
deleted file mode 100644
index d519fff..0000000
--- a/lib/lvgl/docs/porting/indev.md
+++ /dev/null
@@ -1,209 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/indev.md
-```
-# Input device interface
-
-## Types of input devices
-
-To register an input device an `lv_indev_drv_t` variable has to be initialized. **Be sure to register at least one display before you register any input devices.**
-
-```c
-lv_disp_drv_register(&disp_drv);
-
-static lv_indev_drv_t indev_drv;
-lv_indev_drv_init(&indev_drv); /*Basic initialization*/
-indev_drv.type =... /*See below.*/
-indev_drv.read_cb =... /*See below.*/
-/*Register the driver in LVGL and save the created input device object*/
-lv_indev_t * my_indev = lv_indev_drv_register(&indev_drv);
-```
-
-The `type` member can be:
-- `LV_INDEV_TYPE_POINTER` touchpad or mouse
-- `LV_INDEV_TYPE_KEYPAD` keyboard or keypad
-- `LV_INDEV_TYPE_ENCODER` encoder with left/right turn and push options
-- `LV_INDEV_TYPE_BUTTON` external buttons virtually pressing the screen
-
-`read_cb` is a function pointer which will be called periodically to report the current state of an input device.
-
-Visit [Input devices](/overview/indev) to learn more about input devices in general.
-
-### Touchpad, mouse or any pointer
-Input devices that can click points on the screen belong to this category.
-
-```c
-indev_drv.type = LV_INDEV_TYPE_POINTER;
-indev_drv.read_cb = my_input_read;
-
-...
-
-void my_input_read(lv_indev_drv_t * drv, lv_indev_data_t*data)
-{
- if(touchpad_pressed) {
- data->point.x = touchpad_x;
- data->point.y = touchpad_y;
- data->state = LV_INDEV_STATE_PRESSED;
- } else {
- data->state = LV_INDEV_STATE_RELEASED;
- }
-}
-```
-
-To set a mouse cursor use `lv_indev_set_cursor(my_indev, &img_cursor)`. (`my_indev` is the return value of `lv_indev_drv_register`)
-
-### Keypad or keyboard
-
-Full keyboards with all the letters or simple keypads with a few navigation buttons belong here.
-
-To use a keyboard/keypad:
-- Register a `read_cb` function with `LV_INDEV_TYPE_KEYPAD` type.
-- An object group has to be created: `lv_group_t * g = lv_group_create()` and objects have to be added to it with `lv_group_add_obj(g, obj)`
-- The created group has to be assigned to an input device: `lv_indev_set_group(my_indev, g)` (`my_indev` is the return value of `lv_indev_drv_register`)
-- Use `LV_KEY_...` to navigate among the objects in the group. See `lv_core/lv_group.h` for the available keys.
-
-```c
-indev_drv.type = LV_INDEV_TYPE_KEYPAD;
-indev_drv.read_cb = keyboard_read;
-
-...
-
-void keyboard_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
- data->key = last_key(); /*Get the last pressed or released key*/
-
- if(key_pressed()) data->state = LV_INDEV_STATE_PRESSED;
- else data->state = LV_INDEV_STATE_RELEASED;
-}
-```
-
-### Encoder
-With an encoder you can do the following:
-1. Press its button
-2. Long-press its button
-3. Turn left
-4. Turn right
-
-In short, the Encoder input devices work like this:
-- By turning the encoder you can focus on the next/previous object.
-- When you press the encoder on a simple object (like a button), it will be clicked.
-- If you press the encoder on a complex object (like a list, message box, etc.) the object will go to edit mode whereby you can navigate inside the object by turning the encoder.
-- To leave edit mode, long press the button.
-
-
-To use an *Encoder* (similarly to the *Keypads*) the objects should be added to groups.
-
-
-```c
-indev_drv.type = LV_INDEV_TYPE_ENCODER;
-indev_drv.read_cb = encoder_read;
-
-...
-
-void encoder_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
- data->enc_diff = enc_get_new_moves();
-
- if(enc_pressed()) data->state = LV_INDEV_STATE_PRESSED;
- else data->state = LV_INDEV_STATE_RELEASED;
-}
-```
-
-#### Using buttons with Encoder logic
-In addition to standard encoder behavior, you can also utilize its logic to navigate(focus) and edit widgets using buttons.
-This is especially handy if you have only few buttons available, or you want to use other buttons in addition to encoder wheel.
-
-You need to have 3 buttons available:
-- `LV_KEY_ENTER` will simulate press or pushing of the encoder button
-- `LV_KEY_LEFT` will simulate turning encoder left
-- `LV_KEY_RIGHT` will simulate turning encoder right
-- other keys will be passed to the focused widget
-
-If you hold the keys it will simulate an encoder advance with period specified in `indev_drv.long_press_rep_time`.
-
-```c
-indev_drv.type = LV_INDEV_TYPE_ENCODER;
-indev_drv.read_cb = encoder_with_keys_read;
-
-...
-
-void encoder_with_keys_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
- data->key = last_key(); /*Get the last pressed or released key*/
- /* use LV_KEY_ENTER for encoder press */
- if(key_pressed()) data->state = LV_INDEV_STATE_PRESSED;
- else {
- data->state = LV_INDEV_STATE_RELEASED;
- /* Optionally you can also use enc_diff, if you have encoder*/
- data->enc_diff = enc_get_new_moves();
- }
-}
-```
-
-### Button
-*Buttons* mean external "hardware" buttons next to the screen which are assigned to specific coordinates of the screen.
-If a button is pressed it will simulate the pressing on the assigned coordinate. (Similarly to a touchpad)
-
-To assign buttons to coordinates use `lv_indev_set_button_points(my_indev, points_array)`.
-`points_array` should look like `const lv_point_t points_array[] = { {12,30},{60,90}, ...}`
-
-``` important:: The points_array can't go out of scope. Either declare it as a global variable or as a static variable inside a function.
-```
-
-```c
-indev_drv.type = LV_INDEV_TYPE_BUTTON;
-indev_drv.read_cb = button_read;
-
-...
-
-void button_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
- static uint32_t last_btn = 0; /*Store the last pressed button*/
- int btn_pr = my_btn_read(); /*Get the ID (0,1,2...) of the pressed button*/
- if(btn_pr >= 0) { /*Is there a button press? (E.g. -1 indicated no button was pressed)*/
- last_btn = btn_pr; /*Save the ID of the pressed button*/
- data->state = LV_INDEV_STATE_PRESSED; /*Set the pressed state*/
- } else {
- data->state = LV_INDEV_STATE_RELEASED; /*Set the released state*/
- }
-
- data->btn = last_btn; /*Save the last button*/
-}
-```
-
-## Other features
-
-### Parameters
-
-The default value of the following parameters can be changed in `lv_indev_drv_t`:
-- `scroll_limit` Number of pixels to slide before actually scrolling the object.
-- `scroll_throw` Scroll throw (momentum) slow-down in [%]. Greater value means faster slow-down.
-- `long_press_time` Press time to send `LV_EVENT_LONG_PRESSED` (in milliseconds)
-- `long_press_rep_time` Interval of sending `LV_EVENT_LONG_PRESSED_REPEAT` (in milliseconds)
-- `read_timer` pointer to the `lv_timer` which reads the input device. Its parameters can be changed by `lv_timer_...()` functions. `LV_INDEV_DEF_READ_PERIOD` in `lv_conf.h` sets the default read period.
-
-### Feedback
-
-Besides `read_cb` a `feedback_cb` callback can be also specified in `lv_indev_drv_t`.
-`feedback_cb` is called when any type of event is sent by the input devices (independently of its type). This allows generating feedback for the user, e.g. to play a sound on `LV_EVENT_CLICKED`.
-
-
-### Associating with a display
-Every input device is associated with a display. By default, a new input device is added to the last display created or explicitly selected (using `lv_disp_set_default()`).
-The associated display is stored and can be changed in `disp` field of the driver.
-
-### Buffered reading
-By default, LVGL calls `read_cb` periodically. Because of this intermittent polling there is a chance that some user gestures are missed.
-
-To solve this you can write an event driven driver for your input device that buffers measured data. In `read_cb` you can report the buffered data instead of directly reading the input device.
-Setting the `data->continue_reading` flag will tell LVGL there is more data to read and it should call `read_cb` again.
-
-## Further reading
-
-- [lv_port_indev_template.c](https://github.com/lvgl/lvgl/blob/master/examples/porting/lv_port_indev_template.c) for a template for your own driver.
-- [INdev features](/overview/display) to learn more about higher level input device features.
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_hal_indev.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/porting/index.md b/lib/lvgl/docs/porting/index.md
deleted file mode 100644
index f118532..0000000
--- a/lib/lvgl/docs/porting/index.md
+++ /dev/null
@@ -1,24 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/index.md
-```
-
-# Porting
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 2
-
- project
- display
- indev
- tick
- timer-handler
- sleep
- os
- log
- gpu
-
-```
-
diff --git a/lib/lvgl/docs/porting/log.md b/lib/lvgl/docs/porting/log.md
deleted file mode 100644
index 76dfcba..0000000
--- a/lib/lvgl/docs/porting/log.md
+++ /dev/null
@@ -1,53 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/log.md
-```
-# Logging
-
-LVGL has a built-in *Log* module to inform the user about what is happening in the library.
-
-## Log level
-To enable logging, set `LV_USE_LOG 1` in `lv_conf.h` and set `LV_LOG_LEVEL` to one of the following values:
-- `LV_LOG_LEVEL_TRACE` A lot of logs to give detailed information
-- `LV_LOG_LEVEL_INFO` Log important events
-- `LV_LOG_LEVEL_WARN` Log if something unwanted happened but didn't cause a problem
-- `LV_LOG_LEVEL_ERROR` Only critical issues, where the system may fail
-- `LV_LOG_LEVEL_USER` Only user messages
-- `LV_LOG_LEVEL_NONE` Do not log anything
-
-The events which have a higher level than the set log level will be logged too. E.g. if you `LV_LOG_LEVEL_WARN`, errors will be also logged.
-
-## Printing logs
-
-### Logging with printf
-If your system supports `printf`, you just need to enable `LV_LOG_PRINTF` in `lv_conf.h` to send the logs with `printf`.
-
-
-### Custom log function
-If you can't use `printf` or want to use a custom function to log, you can register a "logger" callback with `lv_log_register_print_cb()`.
-
-For example:
-
-```c
-void my_log_cb(const char * buf)
-{
- serial_send(buf, strlen(buf));
-}
-
-...
-
-
-lv_log_register_print_cb(my_log_cb);
-
-```
-
-## Add logs
-
-You can also use the log module via the `LV_LOG_TRACE/INFO/WARN/ERROR/USER(text)` or `LV_LOG(text)` functions. Here:
-
-- `LV_LOG_TRACE/INFO/WARN/ERROR/USER(text)` append following information to your `text`
- - Log Level
- - \_\_FILE\_\_
- - \_\_LINE\_\_
- - \_\_func\_\_
-- `LV_LOG(text)` is similar to `LV_LOG_USER` but has no extra information attached.
diff --git a/lib/lvgl/docs/porting/os.md b/lib/lvgl/docs/porting/os.md
deleted file mode 100644
index 30d5de3..0000000
--- a/lib/lvgl/docs/porting/os.md
+++ /dev/null
@@ -1,54 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/os.md
-```
-# Operating system and interrupts
-
-LVGL is **not thread-safe** by default.
-
-However, in the following conditions it's valid to call LVGL related functions:
-- In *events*. Learn more in [Events](/overview/event).
-- In *lv_timer*. Learn more in [Timers](/overview/timer).
-
-
-## Tasks and threads
-If you need to use real tasks or threads, you need a mutex which should be invoked before the call of `lv_timer_handler` and released after it.
-Also, you have to use the same mutex in other tasks and threads around every LVGL (`lv_...`) related function call and code.
-This way you can use LVGL in a real multitasking environment. Just make use of a mutex to avoid the concurrent calling of LVGL functions.
-
-Here is some pseudocode to illustrate the concept:
-
-```c
-static mutex_t lvgl_mutex;
-
-void lvgl_thread(void)
-{
- while(1) {
- mutex_lock(&lvgl_mutex);
- lv_task_handler();
- mutex_unlock(&lvgl_mutex);
- thread_sleep(10); /* sleep for 10 ms */
- }
-}
-
-void other_thread(void)
-{
- /* You must always hold the mutex while using LVGL APIs */
- mutex_lock(&lvgl_mutex);
- lv_obj_t *img = lv_img_create(lv_scr_act());
- mutex_unlock(&lvgl_mutex);
-
- while(1) {
- mutex_lock(&lvgl_mutex);
- /* change to the next image */
- lv_img_set_src(img, next_image);
- mutex_unlock(&lvgl_mutex);
- thread_sleep(2000);
- }
-}
-```
-
-## Interrupts
-Try to avoid calling LVGL functions from interrupt handlers (except `lv_tick_inc()` and `lv_disp_flush_ready()`). But if you need to do this you have to disable the interrupt which uses LVGL functions while `lv_timer_handler` is running.
-
-It's a better approach to simply set a flag or some value in the interrupt, and periodically check it in an LVGL timer (which is run by `lv_timer_handler`).
diff --git a/lib/lvgl/docs/porting/project.md b/lib/lvgl/docs/porting/project.md
deleted file mode 100644
index e62bcb4..0000000
--- a/lib/lvgl/docs/porting/project.md
+++ /dev/null
@@ -1,70 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/project.md
-```
-
-# Set up a project
-
-## Get the library
-
-LVGL is available on GitHub: [https://github.com/lvgl/lvgl](https://github.com/lvgl/lvgl).
-
-You can clone it or [Download](https://github.com/lvgl/lvgl/archive/refs/heads/master.zip) the latest version of the library from GitHub.
-
-## Add lvgl to your project
-
-The graphics library itself is the `lvgl` directory. It contains a couple of folders but to use `lvgl` you only need `.c` and `.h` files from the `src` folder.
-
-### Automatically add files
-If your IDE automatically adds the files from the folders copied to the project folder (as Eclipse or VSCode does), you can simply copy the `lvgl` folder as it is into your project.
-
-### Make and CMake
-LVGL also supports `make` and `CMake` build systems out of the box. To add LVGL to your Makefile based build system add these lines to your main Makefile:
-```make
-LVGL_DIR_NAME ?= lvgl #The name of the lvgl folder (change this if you have renamed it)
-LVGL_DIR ?= ${shell pwd} #The path where the lvgl folder is
-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/lvgl.mk
-```
-
-For integration with CMake take a look this section of the [Documentation](/get-started/platforms/cmake).
-
-### Other platforms and tools
-The [Get started](/get-started/index.html) section contains many platform specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX, etc.
-
-### Demos and Examples
-
-The `lvgl` folder also contains an `examples` and a `demos` folder. If you needed to add the source files manually to your project, you can do the same with the source files of these two folders too. `make` and `CMake` handles the examples and demos, so no extra action required in these cases.
-
-## Configuration file
-
-There is a configuration header file for LVGL called **lv_conf.h**. You modify this header to set the library's basic behavior, disable unused modules and features, adjust the size of memory buffers in compile-time, etc.
-
-To get `lv_conf.h` **copy lvgl/lv_conf_template.h** next to the `lvgl` directory and rename it to *lv_conf.h*. Open the file and change the `#if 0` at the beginning to `#if 1` to enable its content. So the layout of the files should look like this:
-```
-|-lvgl
-|-lv_conf.h
-|-other files and folders
-```
-
-Comments in the config file explain the meaning of the options. Be sure to set at least `LV_COLOR_DEPTH` according to your display's color depth. Note that, the examples and demos explicitly need to be enabled in `lv_conf.h`.
-
-Alternatively, `lv_conf.h` can be copied to another place but then you should add the `LV_CONF_INCLUDE_SIMPLE` define to your compiler options (e.g. `-DLV_CONF_INCLUDE_SIMPLE` for GCC compiler) and set the include path manually (e.g. `-I../include/gui`).
-In this case LVGL will attempt to include `lv_conf.h` simply with `#include "lv_conf.h"`.
-
-You can even use a different name for `lv_conf.h`. The custom path can be set via the `LV_CONF_PATH` define.
-For example `-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"`
-
-If `LV_CONF_SKIP` is defined, LVGL will not try to include `lv_conf.h`. Instead you can pass the config defines using build options. For example `"-DLV_COLOR_DEPTH=32 -DLV_USE_BTN=1"`. The unset options will get a default value which is the same as the ones in `lv_conf_template.h`.
-
-LVGL also can be used via `Kconfig` and `menuconfig`. You can use `lv_conf.h` together with Kconfig, but keep in mind that the value from `lv_conf.h` or build settings (`-D...`) overwrite the values set in Kconfig. To ignore the configs from `lv_conf.h` simply remove its content, or define `LV_CONF_SKIP`.
-
-
-## Initialization
-
-To use the graphics library you have to initialize it and setup required components. The order of the initialization is:
-
-1. Call `lv_init()`.
-2. Initialize your drivers.
-3. Register the display and input devices drivers in LVGL. Learn more about [Display](/porting/display) and [Input device](/porting/indev) registration.
-4. Call `lv_tick_inc(x)` every `x` milliseconds in an interrupt to report the elapsed time to LVGL. [Learn more](/porting/tick).
-5. Call `lv_timer_handler()` every few milliseconds to handle LVGL related tasks. [Learn more](/porting/timer-handler).
diff --git a/lib/lvgl/docs/porting/sleep.md b/lib/lvgl/docs/porting/sleep.md
deleted file mode 100644
index 42c6377..0000000
--- a/lib/lvgl/docs/porting/sleep.md
+++ /dev/null
@@ -1,31 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/sleep.md
-```
-# Sleep management
-
-The MCU can go to sleep when no user input happens. In this case, the main `while(1)` should look like this:
-
-```c
-while(1) {
- /*Normal operation (no sleep) in < 1 sec inactivity*/
- if(lv_disp_get_inactive_time(NULL) < 1000) {
- lv_task_handler();
- }
- /*Sleep after 1 sec inactivity*/
- else {
- timer_stop(); /*Stop the timer where lv_tick_inc() is called*/
- sleep(); /*Sleep the MCU*/
- }
- my_delay_ms(5);
-}
-```
-
-You should also add the following lines to your input device read function to signal a wake-up (press, touch or click etc.) has happened:
-```c
-lv_tick_inc(LV_DISP_DEF_REFR_PERIOD); /*Force task execution on wake-up*/
-timer_start(); /*Restart the timer where lv_tick_inc() is called*/
-lv_task_handler(); /*Call `lv_task_handler()` manually to process the wake-up event*/
-```
-
-In addition to `lv_disp_get_inactive_time()` you can check `lv_anim_count_running()` to see if all animations have finished.
diff --git a/lib/lvgl/docs/porting/tick.md b/lib/lvgl/docs/porting/tick.md
deleted file mode 100644
index 74ea252..0000000
--- a/lib/lvgl/docs/porting/tick.md
+++ /dev/null
@@ -1,35 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/tick.md
-```
-# Tick interface
-
-LVGL needs a system tick to know elapsed time for animations and other tasks.
-
-You need to call the `lv_tick_inc(tick_period)` function periodically and provide the call period in milliseconds. For example, `lv_tick_inc(1)` when calling every millisecond.
-
-`lv_tick_inc` should be called in a higher priority routine than `lv_task_handler()` (e.g. in an interrupt) to precisely know the elapsed milliseconds even if the execution of `lv_task_handler` takes more time.
-
-With FreeRTOS `lv_tick_inc` can be called in `vApplicationTickHook`.
-
-On Linux based operating systems (e.g. on Raspberry Pi) `lv_tick_inc` can be called in a thread like below:
-```c
-void * tick_thread (void *args)
-{
- while(1) {
- usleep(5*1000); /*Sleep for 5 millisecond*/
- lv_tick_inc(5); /*Tell LVGL that 5 milliseconds were elapsed*/
- }
-}
-```
-
-
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_hal_tick.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/porting/timer-handler.md b/lib/lvgl/docs/porting/timer-handler.md
deleted file mode 100644
index 7240dd4..0000000
--- a/lib/lvgl/docs/porting/timer-handler.md
+++ /dev/null
@@ -1,42 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/porting/timer-handler.md
-```
-# Timer Handler
-
-To handle the tasks of LVGL you need to call `lv_timer_handler()` periodically in one of the following:
-- *while(1)* of *main()* function
-- timer interrupt periodically (lower priority than `lv_tick_inc()`)
-- an OS task periodically
-
-The timing is not critical but it should be about 5 milliseconds to keep the system responsive.
-
-Example:
-```c
-while(1) {
- lv_timer_handler();
- my_delay_ms(5);
-}
-```
-
-If you want to use `lv_timer_handler()` in a super-loop, a helper function`lv_timer_handler_run_in_period()` is provided to simplify the porting:
-
-```c
-while(1) {
- ...
- lv_timer_handler_run_in_period(5); /* run lv_timer_handler() every 5ms */
- ...
-}
-```
-
- In an OS environment, you can use it together with the **delay** or **sleep** provided by OS to release CPU whenever possible:
-
-```c
-while (1) {
- lv_timer_handler_run_in_period(5); /* run lv_timer_handler() every 5ms */
- my_delay_ms(5); /* delay 5ms to avoid unnecessary polling */
-}
-```
-
-To learn more about timers visit the [Timer](/overview/timer) section.
-
diff --git a/lib/lvgl/docs/requirements.txt b/lib/lvgl/docs/requirements.txt
deleted file mode 100644
index 0640008..0000000
--- a/lib/lvgl/docs/requirements.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-alabaster==0.7.12
-Babel==2.9.1
-breathe==4.30.0
-certifi==2020.12.5
-chardet==4.0.0
-commonmark==0.9.1
-docutils==0.16
-idna==2.10
-imagesize==1.2.0
-importlib-metadata==4.0.1
-Jinja2==2.11.3
-Markdown==3.3.4
-MarkupSafe==1.1.1
-packaging==20.9
-Pygments==2.9.0
-pyparsing==2.4.7
-pytz==2021.1
-recommonmark==0.6.0
-requests==2.25.1
-six==1.16.0
-snowballstemmer==2.1.0
-Sphinx==4.0.1
-sphinx-markdown-tables==0.0.15
-sphinx-rtd-theme==0.5.2
-sphinx-sitemap==2.2.0
-sphinxcontrib-applehelp==1.0.2
-sphinxcontrib-devhelp==1.0.2
-sphinxcontrib-htmlhelp==1.0.3
-sphinxcontrib-jsmath==1.0.1
-sphinxcontrib-qthelp==1.0.3
-sphinxcontrib-serializinghtml==1.1.4
-typing-extensions==3.10.0.0
-urllib3==1.26.5
-zipp==3.4.1
diff --git a/lib/lvgl/docs/widgets/core/arc.md b/lib/lvgl/docs/widgets/core/arc.md
deleted file mode 100644
index 88e55f9..0000000
--- a/lib/lvgl/docs/widgets/core/arc.md
+++ /dev/null
@@ -1,113 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/arc.md
-```
-# Arc (lv_arc)
-
-## Overview
-
-The Arc consists of a background and a foreground arc. The foreground (indicator) can be touch-adjusted.
-
-## Parts and Styles
-- `LV_PART_MAIN` Draws a background using the typical background style properties and an arc using the arc style properties. The arc's size and position will respect the *padding* style properties.
-- `LV_PART_INDICATOR` Draws another arc using the *arc* style properties. Its padding values are interpreted relative to the background arc.
-- `LV_PART_KNOB` Draws a handle on the end of the indicator using all background properties and padding values. With zero padding the knob size is the same as the indicator's width.
-Larger padding makes it larger, smaller padding makes it smaller.
-
-## Usage
-
-### Value and range
-
-A new value can be set using `lv_arc_set_value(arc, new_value)`.
-The value is interpreted in a range (minimum and maximum values) which can be modified with `lv_arc_set_range(arc, min, max)`.
-The default range is 0..100.
-
-The indicator arc is drawn on the main part's arc. This if the value is set to maximum the indicator arc will cover the entire "background" arc.
-To set the start and end angle of the background arc use the `lv_arc_set_bg_angles(arc, start_angle, end_angle)` functions or `lv_arc_set_bg_start/end_angle(arc, angle)`.
-
-Zero degrees is at the middle right (3 o'clock) of the object and the degrees are increasing in clockwise direction.
-The angles should be in the [0;360] range.
-
-### Rotation
-
-An offset to the 0 degree position can be added with `lv_arc_set_rotation(arc, deg)`.
-
-### Mode
-
-The arc can be one of the following modes:
-- `LV_ARC_MODE_NORMAL` The indicator arc is drawn from the minimum value to the current.
-- `LV_ARC_MODE_REVERSE` The indicator arc is drawn counter-clockwise from the maximum value to the current.
-- `LV_ARC_MODE_SYMMETRICAL` The indicator arc is drawn from the middle point to the current value.
-
-The mode can be set by `lv_arc_set_mode(arc, LV_ARC_MODE_...)` and used only if the angle is set by `lv_arc_set_value()` or the arc is adjusted by finger.
-
-### Change rate
-If the arc is pressed the current value will set with a limited speed according to the set *change rate*.
-The change rate is defined in degree/second unit and can be set with `lv_arc_set_change_rage(arc, rate)`
-
-
-### Setting the indicator manually
-It's also possible to set the angles of the indicator arc directly with `lv_arc_set_angles(arc, start_angle, end_angle)` function or `lv_arc_set_start/end_angle(arc, start_angle)`.
-In this case the set "value" and "mode" are ignored.
-
-In other words, the angle and value settings are independent. You should exclusively use one or the other. Mixing the two might result in unintended behavior.
-
-To make the arc non-adjustable, remove the style of the knob and make the object non-clickable:
-```c
-lv_obj_remove_style(arc, NULL, LV_PART_KNOB);
-lv_obj_clear_flag(arc, LV_OBJ_FLAG_CLICKABLE);
-```
-
-### Advanced hit test
-
-If the `LV_OBJ_FLAG_ADV_HITTEST` flag is enabled the arc can be clicked through in the middle. Clicks are recognized only on the ring of the background arc. `lv_obj_set_ext_click_size()` makes the sensitive area larger inside and outside with the given number of pixels.
-
-
-
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` sent when the arc is pressed/dragged to set a new value.
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent with the following types:
- - `LV_ARC_DRAW_PART_BACKGROUND` The background arc.
- - `part`: `LV_PART_MAIN`
- - `p1`: center of the arc
- - `radius`: radius of the arc
- - `arc_dsc`
- - `LV_ARC_DRAW_PART_FOREGROUND` The foreground arc.
- - `part`: `LV_PART_INDICATOR`
- - `p1`: center of the arc
- - `radius`: radius of the arc
- - `arc_dsc`
- - LV_ARC_DRAW_PART_KNOB The knob
- - `part`: `LV_PART_KNOB`
- - `draw_area`: the area of the knob
- - `rect_dsc`:
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/UP` Increases the value by one.
-- `LV_KEY_LEFT/DOWN` Decreases the value by one.
-
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/arc/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_arc.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/bar.md b/lib/lvgl/docs/widgets/core/bar.md
deleted file mode 100644
index 674b871..0000000
--- a/lib/lvgl/docs/widgets/core/bar.md
+++ /dev/null
@@ -1,66 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/bar.md
-```
-# Bar (lv_bar)
-
-## Overview
-
-The bar object has a background and an indicator on it. The width of the indicator is set according to the current value of the bar.
-
-Vertical bars can be created if the width of the object is smaller than its height.
-
-Not only the end, but also the start value of the bar can be set, which changes the start position of the indicator.
-
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the bar and it uses the typical background style properties. Adding padding makes the indicator smaller or larger. The `anim_time` style property sets the animation time if the values set with `LV_ANIM_ON`.
-- `LV_PART_INDICATOR` The indicator itself; also uses all the typical background properties.
-
-## Usage
-
-### Value and range
-A new value can be set by `lv_bar_set_value(bar, new_value, LV_ANIM_ON/OFF)`.
-The value is interpreted in a range (minimum and maximum values) which can be modified with `lv_bar_set_range(bar, min, max)`.
-The default range is 0..100.
-
-The new value in `lv_bar_set_value` can be set with or without an animation depending on the last parameter (`LV_ANIM_ON/OFF`).
-
-### Modes
-The bar can be one of the following modes:
-- `LV_BAR_MODE_NORMAL` A normal bar as described above
-- `LV_BAR_MODE_SYMMETRICAL` Draw the indicator from the zero value to current value. Requires a negative minimum range and positive maximum range.
-- `LV_BAR_MODE_RANGE` Allows setting the start value too by `lv_bar_set_start_value(bar, new_value, LV_ANIM_ON/OFF)`. The start value always has to be smaller than the end value.
-
-## Events
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following parts:
- - `LV_BAR_DRAW_PART_INDICATOR` The indicator of the bar
- - `part`: `LV_PART_INDICATOR`
- - `draw_area`: area of the indicator
- - `rect_dsc`
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/bar/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_bar.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/btn.md b/lib/lvgl/docs/widgets/core/btn.md
deleted file mode 100644
index 6148f2f..0000000
--- a/lib/lvgl/docs/widgets/core/btn.md
+++ /dev/null
@@ -1,50 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/btn.md
-```
-# Button (lv_btn)
-
-## Overview
-
-Buttons have no new features compared to the [Base object](/widgets/obj). They are useful for semantic purposes and have slightly different default settings.
-
-Buttons, by default, differ from Base object in the following ways:
-- Not scrollable
-- Added to the default group
-- Default height and width set to `LV_SIZE_CONTENT`
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the button. Uses the typical background style properties.
-
-## Usage
-
-There are no new features compared to [Base object](/widgets/obj).
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` when the `LV_OBJ_FLAG_CHECKABLE` flag is enabled and the object is clicked. The event happens on transition to/from the checked state.
-
-
-Learn more about [Events](/overview/event).
-
-## Keys
-Note that the state of `LV_KEY_ENTER` is translated to `LV_EVENT_PRESSED/PRESSING/RELEASED` etc.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-```eval_rst
-
-.. include:: ../../../examples/widgets/btn/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_btn.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/btnmatrix.md b/lib/lvgl/docs/widgets/core/btnmatrix.md
deleted file mode 100644
index 236d9d4..0000000
--- a/lib/lvgl/docs/widgets/core/btnmatrix.md
+++ /dev/null
@@ -1,99 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/btnmatrix.md
-```
-# Button matrix (lv_btnmatrix)
-
-## Overview
-
-The Button Matrix object is a lightweight way to display multiple buttons in rows and columns. Lightweight because the buttons are not actually created but just virtually drawn on the fly. This way, one button use only eight extra bytes of memory instead of the ~100-150 bytes a normal [Button](/widgets/core/btn) object plus the 100 or so bytes for the [Label](/widgets/core/label) object.
-
-The Button matrix is added to the default group (if one is set). Besides the Button matrix is an editable object to allow selecting and clicking the buttons with encoder navigation too.
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the button matrix, uses the typical background style properties. `pad_row` and `pad_column` sets the space between the buttons.
-- `LV_PART_ITEMS` The buttons all use the text and typical background style properties except translations and transformations.
-
-## Usage
-
-### Button's text
-There is a text on each button. To specify them a descriptor string array, called *map*, needs to be used.
-The map can be set with `lv_btnmatrix_set_map(btnm, my_map)`.
-The declaration of a map should look like `const char * map[] = {"btn1", "btn2", "btn3", NULL}`.
-Note that the last element has to be either `NULL` or an empty string (`""`)!
-
-Use `"\n"` in the map to insert a **line break**. E.g. `{"btn1", "btn2", "\n", "btn3", ""}`. Each line's buttons have their width calculated automatically.
-So in the example the first row will have 2 buttons each with 50% width and a second row with 1 button having 100% width.
-
-### Control buttons
-The buttons' width can be set relative to the other button in the same row with `lv_btnmatrix_set_btn_width(btnm, btn_id, width)`
-E.g. in a line with two buttons: *btnA, width = 1* and *btnB, width = 2*, *btnA* will have 33 % width and *btnB* will have 66 % width.
-It's similar to how the [`flex-grow`](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow) property works in CSS.
-The width must be in the \[1..7\] range and the default width is 1.
-
-In addition to the width, each button can be customized with the following parameters:
-- `LV_BTNMATRIX_CTRL_HIDDEN` Makes a button hidden (hidden buttons still take up space in the layout, they are just not visible or clickable)
-- `LV_BTNMATRIX_CTRL_NO_REPEAT` Disable repeating when the button is long pressed
-- `LV_BTNMATRIX_CTRL_DISABLED` Makes a button disabled Like `LV_STATE_DISABLED` on normal objects
-- `LV_BTNMATRIX_CTRL_CHECKABLE` Enable toggling of a button. I.e. `LV_STATE_CHECHED` will be added/removed as the button is clicked
-- `LV_BTNMATRIX_CTRL_CHECKED` Make the button checked. It will use the `LV_STATE_CHECHKED` styles.
-- `LV_BTNMATRIX_CTRL_CLICK_TRIG` Enabled: send LV_EVENT_VALUE_CHANGE on CLICK, Disabled: send LV_EVENT_VALUE_CHANGE on PRESS
-- `LV_BTNMATRIX_CTRL_POPOVER` Show the button label in a popover when pressing this key
-- `LV_BTNMATRIX_CTRL_RECOLOR` Enable recoloring of button texts with `#`. E.g. `"It's #ff0000 red#"`
-- `LV_BTNMATRIX_CTRL_CUSTOM_1` Custom free to use flag
-- `LV_BTNMATRIX_CTRL_CUSTOM_2` Custom free to use flag
-
-By default, all flags are disabled.
-
-To set or clear a button's control attribute, use `lv_btnmatrix_set_btn_ctrl(btnm, btn_id, LV_BTNM_CTRL_...)` and
-`lv_btnmatrix_clear_btn_ctrl(btnm, btn_id, LV_BTNMATRIX_CTRL_...)` respectively. More `LV_BTNM_CTRL_...` values can be OR-ed
-
-To set/clear the same control attribute for all buttons of a button matrix, use `lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNM_CTRL_...)` and
-`lv_btnmatrix_clear_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_...)`.
-
-The set a control map for a button matrix (similarly to the map for the text), use `lv_btnmatrix_set_ctrl_map(btnm, ctrl_map)`.
-An element of `ctrl_map` should look like `ctrl_map[0] = width | LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_CHECHKABLE`.
-The number of elements should be equal to the number of buttons (excluding newlines characters).
-
-### One check
-The "One check" feature can be enabled with `lv_btnmatrix_set_one_checked(btnm, true)` to allow only one button to be checked at a time.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a button is pressed/released or repeated after long press. The event parameter is set to the ID of the pressed/released button.
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following types:
- - `LV_BTNMATRIX_DRAW_PART_BTN` The individual buttons.
- - `part`: `LV_PART_ITEMS`
- - `id`:index of the button being drawn
- - `draw_area`: the area of teh button
- - `rect_dsc`
-
-See the events of the [Base object](/widgets/obj) too.
-
-`lv_btnmatrix_get_selected_btn(btnm)` returns the index of the most recently released or focused button or `LV_BTNMATRIX_BTN_NONE` if no such button.
-
-`lv_btnmatrix_get_btn_text(btnm, btn_id)` returns a pointer to the text of `btn_id`th button.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/UP/LEFT/RIGHT` To navigate among the buttons to select one
-- `LV_KEY_ENTER` To press/release the selected button
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/btnmatrix/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_btnmatrix.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/canvas.md b/lib/lvgl/docs/widgets/core/canvas.md
deleted file mode 100644
index efb03e4..0000000
--- a/lib/lvgl/docs/widgets/core/canvas.md
+++ /dev/null
@@ -1,107 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/canvas.md
-```
-# Canvas (lv_canvas)
-
-
-## Overview
-
-A Canvas inherits from [Image](/widgets/core/img) where the user can draw anything.
-Rectangles, texts, images, lines, arcs can be drawn here using lvgl's drawing engine.
-Additionally "effects" can be applied, such as rotation, zoom and blur.
-
-
-## Parts and Styles
-`LV_PART_MAIN` Uses the typical rectangle style properties and image style properties.
-
-## Usage
-
-### Buffer
-The Canvas needs a buffer in which stores the drawn image.
-To assign a buffer to a Canvas, use `lv_canvas_set_buffer(canvas, buffer, width, height, LV_IMG_CF_...)`.
-Where `buffer` is a static buffer (not just a local variable) to hold the image of the canvas.
-For example,
-`static lv_color_t buffer[LV_CANVAS_BUF_SIZE_TRUE_COLOR(width, height)]`.
-`LV_CANVAS_BUF_SIZE_...` macros help to determine the size of the buffer with different color formats.
-
-The canvas supports all the built-in color formats like `LV_IMG_CF_TRUE_COLOR` or `LV_IMG_CF_INDEXED_2BIT`.
-See the full list in the [Color formats](/overview/image.html#color-formats) section.
-
-### Indexed colors
-For `LV_IMG_CF_INDEXED_1/2/4/8` color formats a palette needs to be
-initialized with `lv_canvas_set_palette(canvas, 3, LV_COLOR_RED)`. It sets pixels with *index=3* to red.
-
-### Drawing
-To set a pixel's color on the canvas, use `lv_canvas_set_px_color(canvas, x, y, LV_COLOR_RED)`.
-With `LV_IMG_CF_INDEXED_...` the index of the color needs to be passed as color.
-E.g. `lv_color_t c; c.full = 3;`
-
-To set a pixel's opacity with `LV_IMG_CF_TRUE_COLOR_ALPHA` or `LV_IMG_CF_ALPHA_...` format on the canvas, use `lv_canvas_set_px_opa(canvas, x, y, opa)`.
-
-
-`lv_canvas_fill_bg(canvas, LV_COLOR_BLUE, LV_OPA_50)` fills the whole canvas to blue with 50% opacity. Note that if the current color format doesn't support colors (e.g. `LV_IMG_CF_ALPHA_2BIT`) the color will be ignored.
-Similarly, if opacity is not supported (e.g. `LV_IMG_CF_TRUE_COLOR`) it will be ignored.
-
-An array of pixels can be copied to the canvas with `lv_canvas_copy_buf(canvas, buffer_to_copy, x, y, width, height)`.
-The color format of the buffer and the canvas need to match.
-
-To draw something to the canvas use
-- `lv_canvas_draw_rect(canvas, x, y, width, heigth, &draw_dsc)`
-- `lv_canvas_draw_text(canvas, x, y, max_width, &draw_dsc, txt)`
-- `lv_canvas_draw_img(canvas, x, y, &img_src, &draw_dsc)`
-- `lv_canvas_draw_line(canvas, point_array, point_cnt, &draw_dsc)`
-- `lv_canvas_draw_polygon(canvas, points_array, point_cnt, &draw_dsc)`
-- `lv_canvas_draw_arc(canvas, x, y, radius, start_angle, end_angle, &draw_dsc)`
-
-`draw_dsc` is a `lv_draw_rect/label/img/line/arc_dsc_t` variable which should be first initialized with one of `lv_draw_rect/label/img/line/arc_dsc_init()` and then modified with the desired colors and other values.
-
-The draw function can draw to any color format. For example, it's possible to draw a text to an `LV_IMG_VF_ALPHA_8BIT` canvas and use the result image as a [draw mask](/overview/drawing) later.
-
-### Transformations
-`lv_canvas_transform()` can be used to rotate and/or scale the image of an image and store the result on the canvas.
-The function needs the following parameters:
-- `canvas` pointer to a canvas object to store the result of the transformation.
-- `img pointer` to an image descriptor to transform. Can be the image descriptor of another canvas too (`lv_canvas_get_img()`).
-- `angle` the angle of rotation (0..3600), 0.1 deg resolution
-- `zoom` zoom factor (256: no zoom, 512: double size, 128: half size);
-- `offset_x` offset X to tell where to put the result data on destination canvas
-- `offset_y` offset X to tell where to put the result data on destination canvas
-- `pivot_x` pivot X of rotation. Relative to the source canvas. Set to `source width / 2` to rotate around the center
-- `pivot_y` pivot Y of rotation. Relative to the source canvas. Set to `source height / 2` to rotate around the center
-- `antialias` true: apply anti-aliasing during the transformation. Looks better but slower.
-
-Note that a canvas can't be rotated on itself. You need a source and destination canvas or image.
-
-### Blur
-A given area of the canvas can be blurred horizontally with `lv_canvas_blur_hor(canvas, &area, r)` or vertically with `lv_canvas_blur_ver(canvas, &area, r)`.
-`r` is the radius of the blur (greater value means more intensive burring). `area` is the area where the blur should be applied (interpreted relative to the canvas).
-
-## Events
-No special events are sent by canvas objects.
-The same events are sent as for the
-
-See the events of the [Images](/widgets/core/img) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-```eval_rst
-
-.. include:: ../../../examples/widgets/canvas/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_canvas.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/checkbox.md b/lib/lvgl/docs/widgets/core/checkbox.md
deleted file mode 100644
index 75f5ff9..0000000
--- a/lib/lvgl/docs/widgets/core/checkbox.md
+++ /dev/null
@@ -1,76 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/checkbox.md
-```
-# Checkbox (lv_checkbox)
-
-
-## Overview
-
-The Checkbox object is created from a "tick box" and a label. When the Checkbox is clicked the tick box is toggled.
-
-## Parts and Styles
-- `LV_PART_MAIN` The is the background of the Checkbox and it uses the text and all the typical background style properties.
-`pad_column` adjusts the spacing between the tickbox and the label
-- `LV_PART_INDICATOR` The "tick box" is a square that uses all the typical background style properties.
-By default, its size is equal to the height of the main part's font. Padding properties make the tick box larger in the respective directions.
-
-The Checkbox is added to the default group (if it is set).
-
-## Usage
-
-
-### Text
-The text can be modified with the `lv_checkbox_set_text(cb, "New text")` function and will be dynamically allocated.
-
-To set a static text,
-use `lv_checkbox_set_static_text(cb, txt)`. This way, only a pointer to `txt` will be stored. The text then shouldn't be deallocated while the checkbox exists.
-
-### Check, uncheck, disable
-You can manually check, un-check, and disable the Checkbox by using the common state add/clear function:
-```c
-lv_obj_add_state(cb, LV_STATE_CHECKED); /*Make the chekbox checked*/
-lv_obj_clear_state(cb, LV_STATE_CHECKED); /*MAke the checkbox unchecked*/
-lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED); /*Make the checkbox checked and disabled*/
-```
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when the checkbox is toggled.
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following types:
- - `LV_CHECKBOX_DRAW_PART_BOX` The tickbox of the checkbox
- - `part`: `LV_PART_INDICATOR`
- - `draw_area`: the area of the tickbox
- - `rect_dsc`
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-
-## Keys
-The following *Keys* are processed by the 'Buttons':
-- `LV_KEY_RIGHT/UP` Go to toggled state if toggling is enabled
-- `LV_KEY_LEFT/DOWN` Go to non-toggled state if toggling is enabled
-- `LV_KEY_ENTER` Clicks the checkbox and toggles it
-
-Note that, as usual, the state of `LV_KEY_ENTER` is translated to `LV_EVENT_PRESSED/PRESSING/RELEASED` etc.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/checkbox/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_checkbox.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/dropdown.md b/lib/lvgl/docs/widgets/core/dropdown.md
deleted file mode 100644
index 1d01645..0000000
--- a/lib/lvgl/docs/widgets/core/dropdown.md
+++ /dev/null
@@ -1,109 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/dropdown.md
-```
-# Drop-down list (lv_dropdown)
-
-
-## Overview
-
-The drop-down list allows the user to select one value from a list.
-
-The drop-down list is closed by default and displays a single value or a predefined text.
-When activated (by click on the drop-down list), a list is created from which the user may select one option.
-When the user selects a new value, the list is deleted again.
-
-The Drop-down list is added to the default group (if it is set). Besides the Drop-down list is an editable object to allow selecting an option with encoder navigation too.
-
-## Parts and Styles
-The Dropdown widget is built from the elements: "button" and "list" (both not related to the button and list widgets)
-
-### Button
-- `LV_PART_MAIN` The background of the button. Uses the typical background properties and text properties for the text on it.
-- `LV_PART_INDICATOR` Typically an arrow symbol that can be an image or a text (`LV_SYMBOL`).
-
-The button goes to `LV_STATE_CHECKED` when it's opened.
-
-### List
-- `LV_PART_MAIN` The list itself. Uses the typical background properties. `max_height` can be used to limit the height of the list.
-- `LV_PART_SCROLLBAR` The scrollbar background, border, shadow properties and width (for its own width) and right padding for the spacing on the right.
-- `LV_PART_SELECTED` Refers to the currently pressed, checked or pressed+checked option. Also uses the typical background properties.
-
-The list is hidden/shown on open/close. To add styles to it use `lv_dropdown_get_list(dropdown)` to get the list object. For example:
-
-```c
-lv_obj_t * list = lv_dropdown_get_list(dropdown) /*Get the list*/
-lv_obj_add_style(list, &my_style, ...) /*Add the styles to the list*/}`
-```
-
-Alternatively the theme can be extended with the new styles.
-
-## Usage
-
-## Overview
-
-### Set options
-Options are passed to the drop-down list as a string with `lv_dropdown_set_options(dropdown, options)`. Options should be separated by `\n`. For example: `"First\nSecond\nThird"`. This string will be saved in the drop-down list, so it can in a local variable.
-
-The `lv_dropdown_add_option(dropdown, "New option", pos)` function inserts a new option to `pos` index.
-
-To save memory the options can set from a static(constant) string too with `lv_dropdown_set_static_options(dropdown, options)`.
-In this case the options string should be alive while the drop-down list exists and `lv_dropdown_add_option` can't be used
-
-You can select an option manually with `lv_dropdown_set_selected(dropdown, id)`, where `id` is the index of an option.
-
-### Get selected option
-The get the *index* of the selected option, use `lv_dropdown_get_selected(dropdown)`.
-
-`lv_dropdown_get_selected_str(dropdown, buf, buf_size)` copies the *name* of the selected option to `buf`.
-
-### Direction
-The list can be created on any side. The default `LV_DIR_BOTTOM` can be modified by `lv_dropdown_set_dir(dropdown, LV_DIR_LEFT/RIGHT/UP/BOTTOM)` function.
-
-If the list would be vertically out of the screen, it will be aligned to the edge.
-
-### Symbol
-A symbol (typically an arrow) can be added to the dropdown list with `lv_dropdown_set_symbol(dropdown, LV_SYMBOL_...)`
-
-If the direction of the drop-down list is `LV_DIR_LEFT` the symbol will be shown on the left, otherwise on the right.
-
-### Show selected
-The main part can either show the selected option or a static text. If a static is set with `lv_dropdown_set_text(dropdown, "Some text")` it will be shown regardless to th selected option.
-If the text is `NULL` the selected option is displayed on the button.
-
-### Manually open/close
-To manually open or close the drop-down list the `lv_dropdown_open/close(dropdown)` function can be used.
-
-## Events
-Apart from the [Generic events](../overview/event.html#generic-events), the following [Special events](../overview/event.html#special-events) are sent by the drop-down list:
-- `LV_EVENT_VALUE_CHANGED` Sent when the new option is selected or the list is opened/closed.
-- `LV_EVENT_CANCEL` Sent when the list is closed
-- `LV_EVENT_READY` Sent when the list is opened
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/DOWN` Select the next option.
-- `LV_KEY_LEFT/UP` Select the previous option.
-- `LY_KEY_ENTER` Apply the selected option (Sends `LV_EVENT_VALUE_CHANGED` event and closes the drop-down list).
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/dropdown/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_dropdown.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/img.md b/lib/lvgl/docs/widgets/core/img.md
deleted file mode 100644
index 11060cb..0000000
--- a/lib/lvgl/docs/widgets/core/img.md
+++ /dev/null
@@ -1,138 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/img.md
-```
-# Image (lv_img)
-
-
-## Overview
-
-Images are the basic object to display images from flash (as arrays) or from files. Images can display symbols (`LV_SYMBOL_...`) too.
-
-Using the [Image decoder interface](/overview/image.html#image-decoder) custom image formats can be supported as well.
-
-## Parts and Styles
-- `LV_PART_MAIN` A background rectangle that uses the typical background style properties and the image itself using the image style properties.
-
-## Usage
-
-### Image source
-To provide maximum flexibility, the source of the image can be:
-
-- a variable in code (a C array with the pixels).
-- a file stored externally (e.g. on an SD card).
-- a text with [Symbols](/overview/font).
-
-To set the source of an image, use `lv_img_set_src(img, src)`.
-
-To generate a pixel array from a PNG, JPG or BMP image, use the [Online image converter tool](https://lvgl.io/tools/imageconverter) and set the converted image with its pointer: `lv_img_set_src(img1, &converted_img_var);`
-To make the variable visible in the C file, you need to declare it with `LV_IMG_DECLARE(converted_img_var)`.
-
-To use external files, you also need to convert the image files using the online converter tool but now you should select the binary output format.
-You also need to use LVGL's file system module and register a driver with some functions for the basic file operation. Go to the [File system](/overview/file-system) to learn more.
-To set an image sourced from a file, use `lv_img_set_src(img, "S:folder1/my_img.bin")`.
-
-You can also set a symbol similarly to [Labels](/widgets/core/label). In this case, the image will be rendered as text according to the *font* specified in the style. It enables to use of light-weight monochrome "letters" instead of real images. You can set symbol like `lv_img_set_src(img1, LV_SYMBOL_OK)`.
-
-### Label as an image
-Images and labels are sometimes used to convey the same thing. For example, to describe what a button does.
-Therefore, images and labels are somewhat interchangeable, that is the images can display texts by using `LV_SYMBOL_DUMMY` as the prefix of the text. For example, `lv_img_set_src(img, LV_SYMBOL_DUMMY "Some text")`.
-
-
-### Transparency
-The internal (variable) and external images support 2 transparency handling methods:
-
-- **Chroma-keying** - Pixels with `LV_COLOR_CHROMA_KEY` (*lv_conf.h*) color will be transparent.
-- **Alpha byte** - An alpha byte is added to every pixel that contains the pixel's opacity
-
-### Palette and Alpha index
-Besides the *True color* (RGB) color format, the following formats are supported:
-- **Indexed** - Image has a palette.
-- **Alpha indexed** - Only alpha values are stored.
-
-These options can be selected in the image converter. To learn more about the color formats, read the [Images](/overview/image) section.
-
-### Recolor
-A color can be mixed with every pixel of an image with a given intensity.
-This can be useful to show different states (checked, inactive, pressed, etc.) of an image without storing more versions of the same image.
-This feature can be enabled in the style by setting `img_recolor_opa` between `LV_OPA_TRANSP` (no recolor, value: 0) and `LV_OPA_COVER` (full recolor, value: 255).
-The default value is `LV_OPA_TRANSP` so this feature is disabled.
-
-The color to mix is set by `img_recolor`.
-
-### Auto-size
-If the width or height of the image object is set to `LV_SIZE_CONTENT` the object's size will be set according to the size of the image source in the respective direction.
-
-### Mosaic
-If the object's size is greater than the image size in any directions, then the image will be repeated like a mosaic.
-This allows creation a large image from only a very narrow source.
-For example, you can have a *300 x 5* image with a special gradient and set it as a wallpaper using the mosaic feature.
-
-### Offset
-With `lv_img_set_offset_x(img, x_ofs)` and `lv_img_set_offset_y(img, y_ofs)`, you can add some offset to the displayed image.
-Useful if the object size is smaller than the image source size.
-Using the offset parameter a [Texture atlas](https://en.wikipedia.org/wiki/Texture_atlas) or a "running image" effect can be created by [Animating](/overview/animation) the x or y offset.
-
-## Transformations
-
-Using the `lv_img_set_zoom(img, factor)` the images will be zoomed. Set `factor` to `256` or `LV_IMG_ZOOM_NONE` to disable zooming.
-A larger value enlarges the images (e.g. `512` double size), a smaller value shrinks it (e.g. `128` half size).
-Fractional scale works as well. E.g. `281` for 10% enlargement.
-
-To rotate the image use `lv_img_set_angle(img, angle)`. Angle has 0.1 degree precision, so for 45.8° set 458.
-
-The `transform_zoom` and `transform_angle` style properties are also used to determine the final zoom and angle.
-
-By default, the pivot point of the rotation is the center of the image. It can be changed with `lv_img_set_pivot(img, pivot_x, pivot_y)`. `0;0` is the top left corner.
-
-The quality of the transformation can be adjusted with `lv_img_set_antialias(img, true/false)`. With enabled anti-aliasing the transformations are higher quality but slower.
-
-The transformations require the whole image to be available. Therefore indexed images (`LV_IMG_CF_INDEXED_...`), alpha only images (`LV_IMG_CF_ALPHA_...`) or images from files can not be transformed.
-In other words transformations work only on true color images stored as C array, or if a custom [Image decoder](/overview/images#image-edecoder) returns the whole image.
-
-Note that the real coordinates of image objects won't change during transformation. That is `lv_obj_get_width/height/x/y()` will return the original, non-zoomed coordinates.
-
-### Size mode
-
-By default, when the image is zoomed or rotated the real coordinates of the image object are not changed.
-The larger content simply overflows the object's boundaries.
-It also means the layouts are not affected the by the transformations.
-
-If you need the object size to be updated to the transformed size set `lv_img_set_size_mode(img, LV_IMG_SIZE_MODE_REAL)`. (The previous mode is the default and called `LV_IMG_SIZE_MODE_VIRTUAL`).
-In this case if the width/height of the object is set to `LV_SIZE_CONTENT` the object's size will be set to the zoomed and rotated size.
-If an explicit size is set then the overflowing content will be cropped.
-
-### Rounded image
-
-You can use `lv_obj_set_style_radius` to set radius to an image, and enable `lv_obj_set_style_clip_corner` to clip the
-content to rounded rectangle or circular shape. Please note this will have some negative performance impact to CPU
-based renderers.
-
-## Events
-No special events are sent by image objects.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/img/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_img.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/index.md b/lib/lvgl/docs/widgets/core/index.md
deleted file mode 100644
index 38cec55..0000000
--- a/lib/lvgl/docs/widgets/core/index.md
+++ /dev/null
@@ -1,30 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/object-types/index.md
-```
-# Core widgets
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 1
-
- arc
- bar
- btn
- btnmatrix
- canvas
- checkbox
- dropdown
- img
- label
- line
- roller
- slider
- switch
- table
- textarea
-
-```
-
-
diff --git a/lib/lvgl/docs/widgets/core/label.md b/lib/lvgl/docs/widgets/core/label.md
deleted file mode 100644
index 7681a0a..0000000
--- a/lib/lvgl/docs/widgets/core/label.md
+++ /dev/null
@@ -1,96 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/core/label.md
-```
-# Label (lv_label)
-
-## Overview
-A label is the basic object type that is used to display text.
-
-## Parts and Styles
-- `LV_PART_MAIN` Uses all the typical background properties and the text properties. The padding values can be used to add space between the text and the background.
-- `LV_PART_SCROLLBAR` The scrollbar that is shown when the text is larger than the widget's size.
-- `LV_PART_SELECTED` Tells the style of the [selected text](#text-selection). Only `text_color` and `bg_color` style properties can be used.
-
-## Usage
-
-### Set text
-You can set the text on a label at runtime with `lv_label_set_text(label, "New text")`.
-This will allocate a buffer dynamically, and the provided string will be copied into that buffer.
-Therefore, you don't need to keep the text you pass to `lv_label_set_text` in scope after that function returns.
-
-With `lv_label_set_text_fmt(label, "Value: %d", 15)` printf formatting can be used to set the text.
-
-Labels are able to show text from a static character buffer. To do so, use `lv_label_set_text_static(label, "Text")`.
-In this case, the text is not stored in the dynamic memory and the given buffer is used directly instead.
-This means that the array can't be a local variable which goes out of scope when the function exits.
-Constant strings are safe to use with `lv_label_set_text_static` (except when used with `LV_LABEL_LONG_DOT`, as it modifies the buffer in-place), as they are stored in ROM memory, which is always accessible.
-
-### Newline
-
-Newline characters are handled automatically by the label object. You can use `\n` to make a line break. For example: `"line1\nline2\n\nline4"`
-
-### Long modes
-By default, the width and height of the label is set to `LV_SIZE_CONTENT`. Therefore, the size of the label is automatically expanded to the text size.
-Otherwise, if the width or height are explicitly set (using e.g.`lv_obj_set_width` or a layout), the lines wider than the label's width can be manipulated according to several long mode policies.
-Similarly, the policies can be applied if the height of the text is greater than the height of the label.
-- `LV_LABEL_LONG_WRAP` Wrap too long lines. If the height is `LV_SIZE_CONTENT` the label's height will be expanded, otherwise the text will be clipped. (Default)
-- `LV_LABEL_LONG_DOT` Replaces the last 3 characters from bottom right corner of the label with dots (`.`)
-- `LV_LABEL_LONG_SCROLL` If the text is wider than the label scroll it horizontally back and forth. If it's higher, scroll vertically. Only one direction is scrolled and horizontal scrolling has higher precedence.
-- `LV_LABEL_LONG_SCROLL_CIRCULAR` If the text is wider than the label scroll it horizontally continuously. If it's higher, scroll vertically. Only one direction is scrolled and horizontal scrolling has higher precedence.
-- `LV_LABEL_LONG_CLIP` Simply clip the parts of the text outside the label.
-
-You can specify the long mode with `lv_label_set_long_mode(label, LV_LABEL_LONG_...)`
-
-Note that `LV_LABEL_LONG_DOT` manipulates the text buffer in-place in order to add/remove the dots.
-When `lv_label_set_text` or `lv_label_set_array_text` are used, a separate buffer is allocated and this implementation detail is unnoticed.
-This is not the case with `lv_label_set_text_static`. The buffer you pass to `lv_label_set_text_static` must be writable if you plan to use `LV_LABEL_LONG_DOT`.
-
-### Text recolor
-In the text, you can use commands to recolor parts of the text. For example: `"Write a #ff0000 red# word"`.
-This feature can be enabled individually for each label by `lv_label_set_recolor()` function.
-
-### Text selection
-If enabled by `LV_LABEL_TEXT_SELECTION` part of the text can be selected. It's similar to when you use your mouse on a PC to select a text.
-The whole mechanism (click and select the text as you drag your finger/mouse) is implemented in [Text area](/widgets/core/textarea) and the Label widget only allows manual text selection with
-`lv_label_get_text_selection_start(label, start_char_index)` and `lv_label_get_text_selection_start(label, end_char_index)`.
-
-### Very long texts
-LVGL can efficiently handle very long (e.g. > 40k characters) labels by saving some extra data (~12 bytes) to speed up drawing. To enable this feature, set `LV_LABEL_LONG_TXT_HINT 1` in `lv_conf.h`.
-
-### Custom scrolling animations
-Some aspects of the scrolling animations in long modes `LV_LABEL_LONG_SCROLL` and `LV_LABEL_LONG_SCROLL_CIRCULAR` can be customized by setting the animation property of a style, using `lv_style_set_anim()`.
-Currently, only the start and repeat delay of the circular scrolling animation can be customized. If you need to customize another aspect of the scrolling animation, feel free to open an [issue on Github](https://github.com/lvgl/lvgl/issues) to request the feature.
-
-### Symbols
-The labels can display symbols alongside letters (or on their own). Read the [Font](/overview/font) section to learn more about the symbols.
-
-## Events
-No special events are sent by the Label.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/label/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_label.h
- :project: lvgl
-
-```
-
diff --git a/lib/lvgl/docs/widgets/core/line.md b/lib/lvgl/docs/widgets/core/line.md
deleted file mode 100644
index 185cb4d..0000000
--- a/lib/lvgl/docs/widgets/core/line.md
+++ /dev/null
@@ -1,52 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/line.md
-```
-# Line (lv_line)
-
-## Overview
-The Line object is capable of drawing straight lines between a set of points.
-
-## Parts and Styles
-- `LV_PART_MAIN` uses all the typical background properties and line style properties.
-
-## Usage
-
-### Set points
-The points have to be stored in an `lv_point_t` array and passed to the object by the `lv_line_set_points(lines, point_array, point_cnt)` function.
-
-### Auto-size
-By default, the Line's width and height are set to `LV_SIZE_CONTENT`. This means it will automatically set its size to fit all the points. If the size is set explicitly, parts on the line may not be visible.
-
-### Invert y
-By default, the *y == 0* point is in the top of the object. It might be counter-intuitive in some cases so the y coordinates can be inverted with `lv_line_set_y_invert(line, true)`. In this case, *y == 0* will be the bottom of the object.
-*y invert* is disabled by default.
-
-## Events
-Only the [Generic events](../overview/event.html#generic-events) are sent by the object type.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/line/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_line.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/roller.md b/lib/lvgl/docs/widgets/core/roller.md
deleted file mode 100644
index 08ada81..0000000
--- a/lib/lvgl/docs/widgets/core/roller.md
+++ /dev/null
@@ -1,62 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/roller.md
-```
-# Roller (lv_roller)
-
-## Overview
-
-Roller allows you to simply select one option from a list by scrolling.
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the roller uses all the typical background properties and text style properties. `style_text_line_space` adjusts the space between the options.
-When the Roller is scrolled and doesn't stop exactly on an option it will scroll to the nearest valid option automatically in `anim_time` milliseconds as specified in the style.
-- `LV_PART_SELECTED` The selected option in the middle. Besides the typical background properties it uses the text style properties to change the appearance of the text in the selected area.
-
-## Usage
-
-### Set options
-Options are passed to the Roller as a string with `lv_roller_set_options(roller, options, LV_ROLLER_MODE_NORMAL/INFINITE)`. The options should be separated by `\n`. For example: `"First\nSecond\nThird"`.
-
-`LV_ROLLER_MODE_INFINITE` makes the roller circular.
-
-You can select an option manually with `lv_roller_set_selected(roller, id, LV_ANIM_ON/OFF)`, where *id* is the index of an option.
-
-### Get selected option
-To get the *index* of the currently selected option use `lv_roller_get_selected(roller)`.
-
-`lv_roller_get_selected_str(roller, buf, buf_size)` will copy the name of the selected option to `buf`.
-
-### Visible rows
-The number of visible rows can be adjusted with `lv_roller_set_visible_row_count(roller, num)`.
-
-This function calculates the height with the current style. If the font, line space, border width, etc. of the roller changes this function needs to be called again.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a new option is selected.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/DOWN` Select the next option
-- `LV_KEY_LEFT/UP` Select the previous option
-- `LY_KEY_ENTER` Apply the selected option (Send `LV_EVENT_VALUE_CHANGED` event)
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/roller/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_roller.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/slider.md b/lib/lvgl/docs/widgets/core/slider.md
deleted file mode 100644
index c5bccc8..0000000
--- a/lib/lvgl/docs/widgets/core/slider.md
+++ /dev/null
@@ -1,78 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/slider.md
-```
-# Slider (lv_slider)
-
-## Overview
-
-The Slider object looks like a [Bar](/widgets/core/bar) supplemented with a knob. The knob can be dragged to set a value. Just like Bar, Slider can be vertical or horizontal.
-
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the slider. Uses all the typical background style properties. `padding` makes the indicator smaller in the respective direction.
-- `LV_PART_INDICATOR` The indicator that shows the current state of the slider. Also uses all the typical background style properties.
-- `LV_PART_KNOB` A rectangle (or circle) drawn at the current value. Also uses all the typical background properties to describe the knob(s). By default, the knob is square (with an optional corner radius) with side length equal to the smaller side of the slider. The knob can be made larger with the `padding` values. Padding values can be asymmetric too.
-
-## Usage
-
-### Value and range
-To set an initial value use `lv_slider_set_value(slider, new_value, LV_ANIM_ON/OFF)`. The animation time is set by the styles' `anim_time` property.
-
-To specify the range (min, max values), `lv_slider_set_range(slider, min , max)` can be used.
-
-### Modes
-The slider can be one of the following modes:
-- `LV_SLIDER_MODE_NORMAL` A normal slider as described above
-- `LV_SLIDER_SYMMETRICAL` Draw the indicator form the zero value to current value. Requires negative minimum range and positive maximum range.
-- `LV_SLIDER_RANGE` Allows setting the start value too by `lv_bar_set_start_value(bar, new_value, LV_ANIM_ON/OFF)`. The start value has to be always smaller than the end value.
-
-The mode can be changed with `lv_slider_set_mode(slider, LV_SLIDER_MODE_...)`
-
-### Knob-only mode
-Normally, the slider can be adjusted either by dragging the knob, or by clicking on the slider bar.
-In the latter case the knob moves to the point clicked and slider value changes accordingly. In some cases it is desirable to set the slider to react on dragging the knob only. This feature is enabled by adding the `LV_OBJ_FLAG_ADV_HITTEST`: `lv_obj_add_flag(slider, LV_OBJ_FLAG_ADV_HITTEST)`.
-
-The extended click area (set by `lv_obj_set_ext_click_area(slider, value)`) increases to knob's click area.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent while the slider is being dragged or changed with keys.
-The event is sent continuously while the slider is dragged and once when released. Use `lv_slider_is_dragged` to determine whether the Slider is still being dragged or has just been released.
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following parts.
- - `LV_SLIDER_DRAW_PART_KNOB` The main (right) knob of the slider
- - `part`: `LV_PART_KNOB`
- - `draw_area`: area of the indicator
- - `rect_dsc`
- - `id`: 0
- - `LV_SLIDER_DRAW_PART_KNOB` The left knob of the slider
- - `part`: `LV_PART_KNOB`
- - `draw_area`: area of the indicator
- - `rect_dsc`
- - `id`: 1
-
-See the events of the [Bar](/widgets/core/bar) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_UP/RIGHT` Increment the slider's value by 1
-- `LV_KEY_DOWN/LEFT` Decrement the slider's value by 1
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/slider/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_slider.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/switch.md b/lib/lvgl/docs/widgets/core/switch.md
deleted file mode 100644
index c42b8e8..0000000
--- a/lib/lvgl/docs/widgets/core/switch.md
+++ /dev/null
@@ -1,57 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/switch.md
-```
-
-# Switch (lv_switch)
-
-## Overview
-
-The Switch looks like a little slider and can be used to turn something on and off.
-
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the switch uses all the typical background style properties. `padding` makes the indicator smaller in the respective direction.
-- `LV_PART_INDICATOR` The indicator that shows the current state of the switch. Also uses all the typical background style properties.
-- `LV_PART_KNOB` A rectangle (or circle) drawn at left or right side of the indicator. Also uses all the typical background properties to describe the knob(s). By default, the knob is square (with an optional corner radius) with side length equal to the smaller side of the slider. The knob can be made larger with the `padding` values. Padding values can be asymmetric too.
-
-## Usage
-
-### Change state
-The switch uses the standard `LV_STATE_CHECKED` state.
-
-To get the current state of the switch (with `true` being on), use `lv_obj_has_state(switch, LV_STATE_CHECKED)`.
-
-Call `lv_obj_add_state(switch, LV_STATE_CHECKED)` to turn it on, or `lv_obj_clear_state(switch, LV_STATE_CHECKED)` to turn it off.
-
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when the switch changes state.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_UP/RIGHT` Turns on the slider
-- `LV_KEY_DOWN/LEFT` Turns off the slider
-- `LV_KEY_ENTER` Toggles the switch
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/switch/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_switch.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/table.md b/lib/lvgl/docs/widgets/core/table.md
deleted file mode 100644
index 9fc8968..0000000
--- a/lib/lvgl/docs/widgets/core/table.md
+++ /dev/null
@@ -1,95 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/table.md
-```
-# Table (lv_table)
-
-## Overview
-
-Tables, as usual, are built from rows, columns, and cells containing texts.
-
-The Table object is very lightweight because only the texts are stored. No real objects are created for cells but they are just drawn on the fly.
-
-The Table is added to the default group (if it is set). Besides the Table is an editable object to allow selecting a cell with encoder navigation too.
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the table uses all the typical background style properties.
-- `LV_PART_ITEMS` The cells of the table also use all the typical background style properties and the text properties.
-
-
-## Usage
-
-### Set cell value
-
-The cells can store only text so numbers need to be converted to text before displaying them in a table.
-
-`lv_table_set_cell_value(table, row, col, "Content")`. The text is saved by the table so it can be even a local variable.
-
-Line breaks can be used in the text like `"Value\n60.3"`.
-
-New rows and columns are automatically added is required
-
-### Rows and Columns
-
-To explicitly set number of rows and columns use `lv_table_set_row_cnt(table, row_cnt)` and `lv_table_set_col_cnt(table, col_cnt)`
-
-### Width and Height
-
-The width of the columns can be set with `lv_table_set_col_width(table, col_id, width)`. The overall width of the Table object will be set to the sum of columns widths.
-
-The height is calculated automatically from the cell styles (font, padding etc) and the number of rows.
-
-### Merge cells
-
-Cells can be merged horizontally with `lv_table_add_cell_ctrl(table, row, col, LV_TABLE_CELL_CTRL_MERGE_RIGHT)`. To merge more adjacent cells call this function for each cell.
-
-### Scroll
-If the label's width or height is set to `LV_SIZE_CONTENT` that size will be used to show the whole table in the respective direction.
-E.g. `lv_obj_set_size(table, LV_SIZE_CONTENT, LV_SIZE_CONTENT)` automatically sets the table size to show all the columns and rows.
-
-If the width or height is set to a smaller number than the "intrinsic" size then the table becomes scrollable.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a new cell is selected with keys.
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent for the following types:
- - `LV_TABLE_DRAW_PART_CELL` The individual cells of the table
- - `part`: `LV_PART_ITEMS`
- - `draw_area`: area of the indicator
- - `rect_dsc`
- - `label_dsc`
- - `id`: current row × col count + current column
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-
-The following *Keys* are processed by the Tables:
-- `LV_KEY_RIGHT/LEFT/UP/DOWN/` Select a cell.
-
-Note that, as usual, the state of `LV_KEY_ENTER` is translated to `LV_EVENT_PRESSED/PRESSING/RELEASED` etc.
-
-`lv_table_get_selected_cell(table, &row, &col)` can be used to get the currently selected cell. Row and column will be set to `LV_TABLE_CELL_NONE` no cell is selected.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/table/index.rst
-
-```
-
-### MicroPython
-No examples yet.
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_table.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/core/textarea.md b/lib/lvgl/docs/widgets/core/textarea.md
deleted file mode 100644
index 558a387..0000000
--- a/lib/lvgl/docs/widgets/core/textarea.md
+++ /dev/null
@@ -1,127 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/core/textarea.md
-```
-# Text area (lv_textarea)
-
-## Overview
-
-The Text Area is a [Base object](widgets/obj) with a [Label](/widgets/core/label) and a cursor on it.
-Texts or characters can be added to it.
-Long lines are wrapped and when the text becomes long enough the Text area can be scrolled.
-
-One line mode and password modes are supported.
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the text area. Uses all the typical background style properties and the text related style properties including `text_align` to align the text to the left, right or center.
-- `LV_PART_SCROLLBAR` The scrollbar that is shown when the text is too long.
-- `LV_PART_SELECTED` Determines the style of the [selected text](/widgets/core/label.html#text-selection). Only `text_color` and `bg_color` style properties can be used. `bg_color` should be set directly on the label of the text area.
-- `LV_PART_CURSOR` Marks the position where the characters are inserted. The cursor's area is always the bounding box of the current character.
-A block cursor can be created by adding a background color and background opacity to `LV_PART_CURSOR`'s style. The create line cursor leave the cursor transparent and set a left border.
-The `anim_time` style property sets the cursor's blink time.
-- `LV_PART_TEXTAREA_PLACEHOLDER` Unique to Text Area, allows styling the placeholder text.
-
-## Usage
-
-### Add text
-
-You can insert text or characters to the current cursor's position with:
-
-- `lv_textarea_add_char(textarea, 'c')`
-- `lv_textarea_add_text(textarea, "insert this text")`
-
-To add wide characters like `'á'`, `'ß'` or CJK characters use `lv_textarea_add_text(ta, "á")`.
-
-`lv_textarea_set_text(ta, "New text")` changes the whole text.
-
-### Placeholder
-
-A placeholder text can be specified - which is displayed when the Text area is empty - with `lv_textarea_set_placeholder_text(ta, "Placeholder text")`
-
-### Delete character
-
-To delete a character from the left of the current cursor position use `lv_textarea_del_char(textarea)`.
-To delete from the right use `lv_textarea_del_char_forward(textarea)`
-
-### Move the cursor
-
-The cursor position can be modified directly like `lv_textarea_set_cursor_pos(textarea, 10)`.
-The `0` position means "before the first characters",
-`LV_TA_CURSOR_LAST` means "after the last character"
-
-You can step the cursor with
-- `lv_textarea_cursor_right(textarea)`
-- `lv_textarea_cursor_left(textarea)`
-- `lv_textarea_cursor_up(textarea)`
-- `lv_textarea_cursor_down(textarea)`
-
-If `lv_textarea_set_cursor_click_pos(textarea, true)` is applied the cursor will jump to the position where the Text area was clicked.
-
-### Hide the cursor
-The cursor is always visible, however it can be a good idea to style it to be visible only in `LV_STATE_FOCUSED` state.
-
-### One line mode
-The Text area can be configured to be on a single line with `lv_textarea_set_one_line(textarea, true)`.
-In this mode the height is set automatically to show only one line, line break characters are ignored, and word wrap is disabled.
-
-### Password mode
-The text area supports password mode which can be enabled with `lv_textarea_set_password_mode(textarea, true)`.
-
-If the `•` ([Bullet, U+2022](http://www.fileformat.info/info/unicode/char/2022/index.htm)) character exists in the font, the entered characters are converted to it after some time or when a new character is entered.
-If `•` not exists, `*` will be used.
-
-In password mode `lv_textarea_get_text(textarea)` returns the actual text entered, not the bullet characters.
-
-The visibility time can be adjusted with `LV_TEXTAREA_DEF_PWD_SHOW_TIME)` in `lv_conf.h`.
-
-### Accepted characters
-You can set a list of accepted characters with `lv_textarea_set_accepted_chars(textarea, "0123456789.+-")`.
-Other characters will be ignored.
-
-### Max text length
-The maximum number of characters can be limited with `lv_textarea_set_max_length(textarea, max_char_num)`
-
-
-### Very long texts
-If there is a very long text in the Text area (e.g. > 20k characters), scrolling and drawing might be slow.
-However, by enabling `LV_LABEL_LONG_TXT_HINT 1` in `lv_conf.h` the performance can be hugely improved.
-This will save some additional information about the label to speed up its drawing.
-Using `LV_LABEL_LONG_TXT_HINT` the scrolling and drawing will as fast as with "normal" short texts.
-
-### Select text
-Any part of the text can be selected if enabled with `lv_textarea_set_text_selection(textarea, true)`.
-This works much like when you select text on your PC with your mouse.
-
-## Events
-- `LV_EVENT_INSERT` Sent right before a character or text is inserted.
-The event parameter is the text about to be inserted. `lv_textarea_set_insert_replace(textarea, "New text")` replaces the text to insert.
-The new text cannot be in a local variable which is destroyed when the event callback exists. `""` means do not insert anything.
-- `LV_EVENT_VALUE_CHANGED` Sent when the content of the text area has been changed.
-- `LV_EVENT_READY` Sent when `LV_KEY_ENTER` is pressed (or sent) to a one line text area.
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_UP/DOWN/LEFT/RIGHT` Move the cursor
-- `Any character` Add the character to the current cursor position
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/textarea/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_textarea.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/animimg.md b/lib/lvgl/docs/widgets/extra/animimg.md
deleted file mode 100644
index 2aee9fc..0000000
--- a/lib/lvgl/docs/widgets/extra/animimg.md
+++ /dev/null
@@ -1,53 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/animimg.md
-```
-# Animation Image (lv_animimg)
-
-## Overview
-
-The animation image is similar to the normal 'Image' object. The only difference is that instead of one source image, you set an array of multiple source images.
-
-You can specify a duration and repeat count.
-
-
-## Parts and Styles
-- `LV_PART_MAIN` A background rectangle that uses the typical background style properties and the image itself using the image style properties.
-
-
-## Usage
-
-### Image sources
-To set the image in a state, use the `lv_animimg_set_src(imgbtn, dsc[], num)`.
-
-
-## Events
-No special events are sent by image objects.
-
-See the events of the Base object too.
-
-Learn more about [Events](/overview/event).
-
-
-## Keys
-No Keys are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/animimg/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_animimg.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/calendar.md b/lib/lvgl/docs/widgets/extra/calendar.md
deleted file mode 100644
index e6155ef..0000000
--- a/lib/lvgl/docs/widgets/extra/calendar.md
+++ /dev/null
@@ -1,86 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/calendar.md
-```
-# Calendar (lv_calendar)
-
-## Overview
-
-The Calendar object is a classic calendar which can:
-- show the days of any month in a 7x7 matrix
-- Show the name of the days
-- highlight the current day (today)
-- highlight any user-defined dates
-
-The Calendar is added to the default group (if it is set). Calendar is an editable object which allow selecting and clicking the dates with encoder navigation too.
-
-To make the Calendar flexible, by default it doesn't show the current year or month. Instead, there are optional "headers" that can be attached to the calendar.
-
-## Parts and Styles
-The calendar object uses the [Button matrix](/widgets/core/btnmatrix) object under the hood to arrange the days into a matrix.
-- `LV_PART_MAIN` The background of the calendar. Uses all the background related style properties.
-- `LV_PART_ITEMS` Refers to the dates and day names. Button matrix control flags are set to differentiate the buttons and a custom drawer event is added modify the properties of the buttons as follows:
- - day names have no border, no background and drawn with a gray color
- - days of the previous and next month have `LV_BTNMATRIX_CTRL_DISABLED` flag
- - today has a thicker border with the theme's primary color
- - highlighted days have some opacity with the theme's primary color.
-
-## Usage
-
-Some functions use the `lv_calendar_date_t` type which is a structure with `year`, `month` and `day` fields.
-
-### Current date
-To set the current date (today), use the `lv_calendar_set_today_date(calendar, year, month, day)` function. `month` needs to be in 1..12 range and `day` in 1..31 range.
-
-### Shown date
-To set the shown date, use `lv_calendar_set_shown_date(calendar, year, month)`;
-
-### Highlighted days
-
-The list of highlighted dates should be stored in a `lv_calendar_date_t` array loaded by `lv_calendar_set_highlighted_dates(calendar, highlighted_dates, date_num)`.
-Only the array's pointer will be saved so the array should be a static or global variable.
-
-### Name of the days
-The name of the days can be adjusted with `lv_calendar_set_day_names(calendar, day_names)` where `day_names` looks like `const char * day_names[7] = {"Su", "Mo", ...};`
-Only the pointer of the day names is saved so the elements should be static, global or constant variables.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent if a date is clicked. `lv_calendar_get_pressed_date(calendar, &date)` set `date` to the date currently being pressed. Returns `LV_RES_OK` if there is a valid pressed date, else `LV_RES_INV`.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/UP/LEFT/RIGHT` To navigate among the buttons to dates
-- `LV_KEY_ENTER` To press/release the selected date
-
-Learn more about [Keys](/overview/indev).
-
-## Headers
-
-**From v8.1 the header is added directly into the Calendar widget and the API of the headers has been changed.**
-
-### Arrow buttons
-
-`lv_calendar_header_arrow_create(calendar)` creates a header that contains a left and right arrow on the sides and a text with the current year and month between them.
-
-
-### Drop-down
-`lv_calendar_header_dropdown_create(calendar)` creates a header that contains 2 drop-drown lists: one for the year and another for the month.
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/calendar/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_calendar.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/chart.md b/lib/lvgl/docs/widgets/extra/chart.md
deleted file mode 100644
index 573c950..0000000
--- a/lib/lvgl/docs/widgets/extra/chart.md
+++ /dev/null
@@ -1,197 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/chart.md
-```
-# Chart (lv_chart)
-
-## Overview
-
-Charts are a basic object to visualize data points. Currently *Line* charts (connect points with lines and/or draw points on them) and *Bar* charts are supported.
-
-Charts can have:
-- division lines
-- 2 y axis
-- axis ticks and texts on ticks
-- cursors
-- scrolling and zooming
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the chart. Uses all the typical background and *line* (for the division lines) related style properties. *Padding* makes the series area smaller.
-- `LV_PART_SCROLLBAR` The scrollbar used if the chart is zoomed. See the [Base object](/widgets/obj)'s documentation for details.
-- `LV_PART_ITEMS` Refers to the line or bar series.
- - Line chart: The *line* properties are used by the lines. `width`, `height`, `bg_color` and `radius` is used to set the appearance of points.
- - Bar chart: The typical background properties are used to style the bars.
-- `LV_PART_INDICATOR` Refers to the points on line and scatter chart (small circles or squares).
-- `LV_PART_CURSOR` *Line* properties are used to style the cursors. `width`, `height`, `bg_color` and `radius` are used to set the appearance of points.
-- `LV_PART_TICKS` *Line* and *Text* style properties are used to style the ticks
-
-## Usage
-
-
-### Chart type
-The following data display types exist:
-- `LV_CHART_TYPE_NONE` Do not display any data. Can be used to hide the series.
-- `LV_CHART_TYPE_LINE` Draw lines between the data points and/or points (rectangles or circles) on the data points.
-- `LV_CHART_TYPE_BAR` - Draw bars.
-- `LV_CHART_TYPE_SCATTER` - X/Y chart drawing point's and lines between the points. .
-
-You can specify the display type with `lv_chart_set_type(chart, LV_CHART_TYPE_...)`.
-
-
-### Data series
-You can add any number of series to the charts by `lv_chart_add_series(chart, color, axis)`. This allocates an `lv_chart_series_t` structure which contains the chosen `color` and an array for the data points.
-`axis` can have the following values:
-- `LV_CHART_AXIS_PRIMARY_Y` Left axis
-- `LV_CHART_AXIS_SECONDARY_Y` Right axis
-- `LV_CHART_AXIS_PRIMARY_X` Bottom axis
-- `LV_CHART_AXIS_SECONDARY_X` Top axis
-
-
-`axis` tells which axis's range should be used te scale the values.
-
-`lv_chart_set_ext_y_array(chart, ser, value_array)` makes the chart use an external array for the given series.
-`value_array` should look like this: `lv_coord_t * value_array[num_points]`. The array size needs to be large enough to hold all the points of that series.
-The array's pointer will be saved in the chart so it needs to be global, static or dynamically allocated.
-Note: you should call `lv_chart_refresh(chart)` after the external data source has been updated to update the chart.
-
-The value array of a series can be obtained with `lv_chart_get_y_array(chart, ser)`, which can be used with `ext_array` or *normal array*s.
-
-For `LV_CHART_TYPE_SCATTER` type `lv_chart_set_ext_x_array(chart, ser, value_array)` and `lv_chart_get_x_array(chart, ser)` can be used as well.
-
-### Modify the data
-You have several options to set the data of series:
-1. Set the values manually in the array like `ser1->points[3] = 7` and refresh the chart with `lv_chart_refresh(chart)`.
-2. Use `lv_chart_set_value_by_id(chart, ser, id, value)` where `id` is the index of the point you wish to update.
-3. Use the `lv_chart_set_next_value(chart, ser, value)`.
-4. Initialize all points to a given value with: `lv_chart_set_all_value(chart, ser, value)`.
-
-Use `LV_CHART_POINT_NONE` as value to make the library skip drawing that point, column, or line segment.
-
-For `LV_CHART_TYPE_SCATTER` type `lv_chart_set_value_by_id2(chart, ser, id, value)` and `lv_chart_set_next_value2(chart, ser, x_valuem y_value)` can be used as well.
-
-
-### Update modes
-`lv_chart_set_next_value` can behave in two ways depending on *update mode*:
-- `LV_CHART_UPDATE_MODE_SHIFT` Shift old data to the left and add the new one to the right.
-- `LV_CHART_UPDATE_MODE_CIRCULAR` - Add the new data in circular fashion, like an ECG diagram.
-
-The update mode can be changed with `lv_chart_set_update_mode(chart, LV_CHART_UPDATE_MODE_...)`.
-
-### Number of points
-The number of points in the series can be modified by `lv_chart_set_point_count(chart, point_num)`. The default value is 10.
-Note: this also affects the number of points processed when an external buffer is assigned to a series, so you need to be sure the external array is large enough.
-
-#### Handling large number of points
-On line charts, if the number of points is greater than the pixels horizontally, the Chart will draw only vertical lines to make the drawing of large amount of data effective.
-If there are, let's say, 10 points to a pixel, LVGL searches the smallest and the largest value and draws a vertical lines between them to ensure no peaks are missed.
-
-### Vertical range
-You can specify the minimum and maximum values in y-direction with `lv_chart_set_range(chart, axis, min, max)`.
-`axis` can be `LV_CHART_AXIS_PRIMARY` (left axis) or `LV_CHART_AXIS_SECONDARY` (right axis).
-
-The value of the points will be scaled proportionally. The default range is: 0..100.
-
-### Division lines
-The number of horizontal and vertical division lines can be modified by `lv_chart_set_div_line_count(chart, hdiv_num, vdiv_num)`.
-The default settings are 3 horizontal and 5 vertical division lines.
-If there is a visible border on a side and no padding on that side, the division line would be drawn on top of the border and therefore it won't be drawn.
-
-### Override default start point for series
-If you want a plot to start from a point other than the default which is `point[0]` of the series, you can set an alternative
-index with the function `lv_chart_set_x_start_point(chart, ser, id)` where `id` is the new index position to start plotting from.
-
-Note that `LV_CHART_UPDATE_MODE_SHIFT` also changes the `start_point`.
-
-### Tick marks and labels
-Ticks and labels can be added to the axis with `lv_chart_set_axis_tick(chart, axis, major_len, minor_len, major_cnt, minor_cnt, label_en, draw_size)`.
-- `axis` can be `LV_CHART_AXIS_X/PRIMARY_Y/SECONDARY_Y`
-- `major_len` is the length of major ticks
-- `minor_len` is the length of minor ticks
-- `major_cnt` is the number of major ticks on the axis
-- `minor_cnt` in the number of minor ticks between two major ticks
-- `label_en` `true`: enable label drawing on major ticks
-- `draw_size` extra size required to draw the tick and labels (start with 20 px and increase if the ticks/labels are clipped)
-
-### Zoom
-The chart can be zoomed independently in x and y directions with `lv_chart_set_zoom_x(chart, factor)` and `lv_chart_set_zoom_y(chart, factor)`.
-If `factor` is 256 there is no zoom. 512 means double zoom, etc. Fractional values are also possible but < 256 value is not allowed.
-
-
-### Cursor
-
-A cursor can be added with `lv_chart_cursor_t * c1 = lv_chart_add_cursor(chart, color, dir);`.
-The possible values of `dir` `LV_DIR_NONE/RIGHT/UP/LEFT/DOWN/HOR/VER/ALL` or their OR-ed values to tell in which direction(s) should the cursor be drawn.
-
-`lv_chart_set_cursor_pos(chart, cursor, &point)` sets the position of the cursor.
-`pos` is a pointer to an `lv_point_t` variable. E.g. `lv_point_t point = {10, 20};`. If the chart is scrolled the cursor will remain in the same place.
-
-`lv_chart_get_point_pos_by_id(chart, series, id, &point_out)` gets the coordinate of a given point. It's useful to place the cursor at a given point.
-
-`lv_chart_set_cursor_point(chart, cursor, series, point_id)` sticks the cursor at a point. If the point's position changes (new value or scrolling) the cursor will move with the point.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a new point is clicked pressed. `lv_chart_get_pressed_point(chart)` returns the zero-based index of the pressed point.
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` are sent with the following types:
- - `LV_CHART_DRAW_PART_DIV_LINE_INIT` Used before/after drawn the div lines to add masks to any extra drawings. The following fields are set:
- - `part`: `LV_PART_MAIN`
- - `line_dsc`
- - `LV_CHART_DRAW_PART_DIV_LINE_HOR`, `LV_CHART_DRAW_PART_DIV_LINE_VER` Used for each horizontal and vertical division lines.
- - `part`: `LV_PART_MAIN`
- - `id`: index of the line
- - `p1`, `p2`: points of the line
- - `line_dsc`
- - `LV_CHART_DRAW_PART_LINE_AND_POINT` Used on line and scatter charts for lines and points.
- - `part`: `LV_PART_ITEMS`
- - `id`: index of the point
- - `value`: value of `id`th point
- - `p1`, `p2`: points of the line
- - `draw_area`: area of the point
- - `line_dsc`
- - `rect_dsc`
- - `sub_part_ptr`: pointer to the series
- - `LV_CHART_DRAW_PART_BAR` Used on bar charts for the rectangles.
- - `part`: `LV_PART_ITEMS`
- - `id`: index of the point
- - `value`: value of `id`th point
- - `draw_area`: area of the point
- - `rect_dsc`:
- - `sub_part_ptr`: pointer to the series
- - `LV_CHART_DRAW_PART_CURSOR` Used on cursor lines and points.
- - `part`: `LV_PART_CURSOR`
- - `p1`, `p2`: points of the line
- - `line_dsc`
- - `rect_dsc`
- - `draw_area`: area of the points
- - `LV_CHART_DRAW_PART_TICK_LABEL` Used on tick lines and labels.
- - `part`: `LV_PART_TICKS`
- - `id`: axis
- - `value`: value of the tick
- - `text`: `value` converted to decimal or `NULL` for minor ticks
- - `line_dsc`,
- - `label_dsc`,
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/chart/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_chart.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/colorwheel.md b/lib/lvgl/docs/widgets/extra/colorwheel.md
deleted file mode 100644
index 887f344..0000000
--- a/lib/lvgl/docs/widgets/extra/colorwheel.md
+++ /dev/null
@@ -1,59 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/colorwheel.md
-```
-# Color wheel (lv_colorwheel)
-
-## Overview
-As its name implies *Color wheel* allows the user to select a color. The Hue, Saturation and Value of the color can be selected separately.
-
-Long pressing the object, the color wheel will change to the next parameter of the color (hue, saturation or value). A double click will reset the current parameter.
-
-## Parts and Styles
-- `LV_PART_MAIN` Only `arc_width` is used to set the width of the color wheel
-- `LV_PART_KNOB` A rectangle (or circle) drawn on the current value. It uses all the rectangle like style properties and padding to make it larger than the width of the arc.
-
-## Usage
-
-### Create a color wheel
-
-`lv_colorwheel_create(parent, knob_recolor)` creates a new color wheel. With `knob_recolor=true` the knob's background color will be set to the current color.
-
-### Set color
-
-The color can be set manually with `lv_colorwheel_set_hue/saturation/value(colorwheel, x)` or all at once with `lv_colorwheel_set_hsv(colorwheel, hsv)` or `lv_colorwheel_set_color(colorwheel, rgb)`
-
-### Color mode
-
-The current color mode can be manually selected with `lv_colorwheel_set_mode(colorwheel, LV_COLORWHEEL_MODE_HUE/SATURATION/VALUE)`.
-
-The color mode can be fixed (so as to not change with long press) using `lv_colorwheel_set_mode_fixed(colorwheel, true)`
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent if a new color is selected.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_UP`, `LV_KEY_RIGHT` Increment the current parameter's value by 1
-- `LV_KEY_DOWN`, `LV_KEY_LEFT` Decrement the current parameter's value by 1
-- `LV_KEY_ENTER` A long press will show the next mode. Double click to reset the current parameter.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/colorwheel/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_colorwheel.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/imgbtn.md b/lib/lvgl/docs/widgets/extra/imgbtn.md
deleted file mode 100644
index 886df9a..0000000
--- a/lib/lvgl/docs/widgets/extra/imgbtn.md
+++ /dev/null
@@ -1,70 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/imgbtn.md
-```
-# Image button (lv_imgbtn)
-
-## Overview
-
-The Image button is very similar to the simple 'Button' object. The only difference is that it displays user-defined images in each state instead of drawing a rectangle.
-
-You can set a left, right and center image, and the center image will be repeated to match the width of the object.
-
-
-
-## Parts and Styles
-- `LV_PART_MAIN` Refers to the image(s). If background style properties are used, a rectangle will be drawn behind the image button.
-
-## Usage
-
-### Image sources
-To set the image in a state, use the `lv_imgbtn_set_src(imgbtn, LV_IMGBTN_STATE_..., src_left, src_center, src_right)`.
-
-The image sources work the same as described in the [Image object](/widgets/core/img) except that "Symbols" are not supported by the Image button.
-Any of the sources can `NULL`.
-
-The possible states are:
-- `LV_IMGBTN_STATE_RELEASED`
-- `LV_IMGBTN_STATE_PRESSED`
-- `LV_IMGBTN_STATE_DISABLED`
-- `LV_IMGBTN_STATE_CHECKED_RELEASED`
-- `LV_IMGBTN_STATE_CHECKED_PRESSED`
-- `LV_IMGBTN_STATE_CHECKED_DISABLED`
-
-If you set sources only in `LV_IMGBTN_STATE_RELEASED`, these sources will be used in other states too.
-If you set e.g. `LV_IMGBTN_STATE_PRESSED` they will be used in pressed state instead of the released images.
-
-
-### States
-Instead of the regular `lv_obj_add/clear_state()` functions the `lv_imgbtn_set_state(imgbtn, LV_IMGBTN_STATE_...)` functions should be used to manually set a state.
-
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when the button is toggled.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/UP` Go to toggled state if `LV_OBJ_FLAG_CHECKABLE` is enabled.
-- `LV_KEY_LEFT/DOWN` Go to non-toggled state if `LV_OBJ_FLAG_CHECKABLE` is enabled.
-- `LV_KEY_ENTER` Clicks the button
-
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/imgbtn/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_imgbtn.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/index.md b/lib/lvgl/docs/widgets/extra/index.md
deleted file mode 100644
index 75bb9ed..0000000
--- a/lib/lvgl/docs/widgets/extra/index.md
+++ /dev/null
@@ -1,31 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/object-types/index.md
-```
-# Extra widgets
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 1
-
- animimg
- calendar
- chart
- colorwheel
- imgbtn
- keyboard
- led
- list
- menu
- meter
- msgbox
- span
- spinbox
- spinner
- tabview
- tileview
- win
-```
-
-
diff --git a/lib/lvgl/docs/widgets/extra/keyboard.md b/lib/lvgl/docs/widgets/extra/keyboard.md
deleted file mode 100644
index 53e7fc1..0000000
--- a/lib/lvgl/docs/widgets/extra/keyboard.md
+++ /dev/null
@@ -1,96 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/keyboard.md
-```
-
-
-# Keyboard (lv_keyboard)
-
-## Overview
-
-The Keyboard object is a special [Button matrix](/widgets/core/btnmatrix) with predefined keymaps and other features to realize a virtual keyboard to write texts into a [Text area](/widgets/core/textarea).
-
-## Parts and Styles
-Similarly to Button matrices Keyboards consist of 2 part:
-- `LV_PART_MAIN` The main part. Uses all the typical background properties
-- `LV_PART_ITEMS` The buttons. Also uses all typical background properties as well as the *text* properties.
-
-## Usage
-
-### Modes
-The Keyboards have the following modes:
-- `LV_KEYBOARD_MODE_TEXT_LOWER` Display lower case letters
-- `LV_KEYBOARD_MODE_TEXT_UPPER` Display upper case letters
-- `LV_KEYBOARD_MODE_TEXT_SPECIAL` Display special characters
-- `LV_KEYBOARD_MODE_NUMBER` Display numbers, +/- sign, and decimal dot
-- `LV_KEYBOARD_MODE_USER_1` through `LV_KEYBOARD_MODE_USER_4` User-defined modes.
-
-The `TEXT` modes' layout contains buttons to change mode.
-
-To set the mode manually, use `lv_keyboard_set_mode(kb, mode)`. The default mode is `LV_KEYBOARD_MODE_TEXT_UPPER`.
-
-### Assign Text area
-You can assign a [Text area](/widgets/core/textarea) to the Keyboard to automatically put the clicked characters there.
-To assign the text area, use `lv_keyboard_set_textarea(kb, ta)`.
-
-### Key Popovers
-To enable key popovers on press, like on common Android and iOS keyboards, use `lv_keyboard_set_popovers(kb, true)`. The default control maps are preconfigured to only show the popovers on keys that produce a symbol and not on e.g. space. If you use a custom keymap, set the `LV_BTNMATRIX_CTRL_POPOVER` flag for all keys that you want to show a popover.
-
-Note that popovers for keys in the top row will draw outside the widget boundaries. To account for this, reserve extra free space on top of the keyboard or ensure that the keyboard is added _after_ any widgets adjacent to its top boundary so that the popovers can draw over those.
-
-The popovers currently are merely a visual effect and don't allow selecting additional characters such as accents yet.
-
-### New Keymap
-You can specify a new map (layout) for the keyboard with `lv_keyboard_set_map(kb, map)` and `lv_keyboard_set_ctrl_map(kb, ctrl_map)`.
-Learn more about the [Button matrix](/widgets/core/btnmatrix) object.
-Keep in mind that using following keywords will have the same effect as with the original map:
-- `LV_SYMBOL_OK` Apply.
-- `LV_SYMBOL_CLOSE` or `LV_SYMBOL_KEYBOARD` Close.
-- `LV_SYMBOL_BACKSPACE` Delete on the left.
-- `LV_SYMBOL_LEFT` Move the cursor left.
-- `LV_SYMBOL_RIGHT` Move the cursor right.
-- `LV_SYMBOL_NEW_LINE` New line.
-- *"ABC"* Load the uppercase map.
-- *"abc"* Load the lower case map.
-- *"1#"* Load the lower case map.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when the button is pressed/released or repeated after long press. The event data is set to the ID of the pressed/released button.
-- `LV_EVENT_READY` - The *Ok* button is clicked.
-- `LV_EVENT_CANCEL` - The *Close* button is clicked.
-
-The keyboard has a **default event handler** callback called `lv_keyboard_def_event_cb`, which handles the button pressing, map changing, the assigned text area, etc. You can remove it and replace it with a custom event handler if you wish.
-
-```eval_rst
-.. note::
- In 8.0 and newer, adding an event handler to the keyboard does not remove the default event handler.
- This behavior differs from v7, where adding an event handler would always replace the previous one.
-```
-
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_RIGHT/UP/LEFT/RIGHT` To navigate among the buttons and select one.
-- `LV_KEY_ENTER` To press/release the selected button.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Examples
-
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/keyboard/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_keyboard.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/led.md b/lib/lvgl/docs/widgets/extra/led.md
deleted file mode 100644
index 7c7a6b1..0000000
--- a/lib/lvgl/docs/widgets/extra/led.md
+++ /dev/null
@@ -1,58 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/led.md
-```
-# LED (lv_led)
-
-## Overview
-
-The LEDs are rectangle-like (or circle) object whose brightness can be adjusted. With lower brightness the colors of the LED become darker.
-
-## Parts and Styles
-The LEDs have only one main part, called `LV_LED_PART_MAIN` and it uses all the typical background style properties.
-
-## Usage
-
-### Color
-You can set the color of the LED with `lv_led_set_color(led, lv_color_hex(0xff0080))`.
-This will be used as background color, border color, and shadow color.
-
-### Brightness
-You can set their brightness with `lv_led_set_bright(led, bright)`. The brightness should be between 0 (darkest) and 255 (lightest).
-
-### Toggle
-Use `lv_led_on(led)` and `lv_led_off(led)` to set the brightness to a predefined ON or OFF value. The `lv_led_toggle(led)` toggles between the ON and OFF state.
-
-## Events
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` is sent for the following types:
- - `LV_LED_DRAW_PART_RECTANGLE` The main rectangle. `LV_OBJ_DRAW_PART_RECTANGLE` is not sent by the base object.
- - `part`: `LV_PART_MAIN`
- - `rect_dsc`
- - `draw_area`: the area of the rectangle
-
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/led/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_led.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/list.md b/lib/lvgl/docs/widgets/extra/list.md
deleted file mode 100644
index beacad4..0000000
--- a/lib/lvgl/docs/widgets/extra/list.md
+++ /dev/null
@@ -1,55 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/list.md
-```
-# List (lv_list)
-
-## Overview
-The List is basically a rectangle with vertical layout to which Buttons and Texts can be added
-
-## Parts and Styles
-
-**Background**
-- `LV_PART_MAIN` The main part of the list that uses all the typical background properties
-- `LV_PART_SCROLLBAR` The scrollbar. See the [Base objects](/widgets/obj) documentation for details.
-
-**Buttons and Texts**
-See the [Button](/widgets/core/btn)'s and [Label](/widgets/core/label)'s documentation.
-
-## Usage
-
-### Buttons
-`lv_list_add_btn(list, icon, text)` adds a full-width button with an icon - that can be an image or symbol - and a text.
-
-The text starts to scroll horizontally if it's too long.
-
-### Texts
-`lv_list_add_text(list, text)` adds a text.
-
-
-## Events
-No special events are sent by the List, but sent by the Button as usual.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/list/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_list.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/menu.md b/lib/lvgl/docs/widgets/extra/menu.md
deleted file mode 100644
index d5ac0d3..0000000
--- a/lib/lvgl/docs/widgets/extra/menu.md
+++ /dev/null
@@ -1,94 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/menu.md
-```
-# Menu (lv_menu)
-
-## Overview
-The menu widget can be used to easily create multi-level menus. It handles the traversal between pages automatically.
-
-## Parts and Styles
-The menu widget is built from the following objects:
-- Main container: lv_menu_main_cont
- - Main header: lv_menu_main_header_cont
- - Back btn: [lv_btn](/widgets/core/btn)
- - Back btn icon: [lv_img](/widgets/core/img)
- - Main page: lv_menu_page
-- Sidebar container: lv_menu_sidebar_cont
- - Sidebar header: lv_menu_sidebar_header_cont
- - Back btn: [lv_btn](/widgets/core/btn)
- - Back btn icon: [lv_img](/widgets/core/img)
- - Sidebar page: lv_menu_page
-
-## Usage
-
-### Create a menu
-`lv_menu_create(parent)` creates a new empty menu.
-
-### Header mode
-The following header modes exist:
-- `LV_MENU_HEADER_TOP_FIXED` Header is positioned at the top.
-- `LV_MENU_HEADER_TOP_UNFIXED` Header is positioned at the top and can be scrolled out of view.
-- `LV_MENU_HEADER_BOTTOM_FIXED` Header is positioned at the bottom.
-
-You can set header modes with `lv_menu_set_mode_header(menu, LV_MENU_HEADER...)`.
-
-### Root back button mode
-The following root back button modes exist:
-- `LV_MENU_ROOT_BACK_BTN_DISABLED`
-- `LV_MENU_ROOT_BACK_BTN_ENABLED`
-
-You can set root back button modes with `lv_menu_set_mode_root_back_btn(menu, LV_MENU_ROOT_BACK_BTN...)`.
-
-### Create a menu page
-`lv_menu_page_create(menu, title)` creates a new empty menu page.
-You can add any widgets to the page.
-
-### Set a menu page in the main area
-Once a menu page has been created, you can set it to the main area with `lv_menu_set_page(menu, page)`. NULL to clear main and clear menu history.
-
-### Set a menu page in the sidebar
-Once a menu page has been created, you can set it to the sidebar with `lv_menu_set_sidebar_page(menu, page)`. NULL to clear sidebar.
-
-### Linking between menu pages
-For instance, you have created a btn obj in the main page. When you click the btn obj, you want it to open up a new page, use `lv_menu_set_load_page_event(menu, obj, new page)`.
-
-### Create a menu container, section, separator
-The following objects can be created so that it is easier to style the menu:
-
-`lv_menu_cont_create(parent page)` creates a new empty container.
-
-`lv_menu_section_create(parent page)` creates a new empty section.
-
-`lv_menu_separator_create(parent page)` creates a separator.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a page is shown.
- - `lv_menu_get_cur_main_page(menu)` returns a pointer to menu page that is currently displayed in main.
- - `lv_menu_get_cur_sidebar_page(menu)` returns a pointer to menu page that is currently displayed in sidebar.
-- `LV_EVENT_CLICKED` Sent when a back btn in a header from either main or sidebar is clicked. `LV_OBJ_FLAG_EVENT_BUBBLE` is enabled on the buttons so you can add events to the menu itself.
- - `lv_menu_back_btn_is_root(menu, btn)` to check if btn is root back btn
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No keys are handled by the menu widget.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-.. include:: ../../../examples/widgets/menu/index.rst
-```
-
-## API
-
-```eval_rst
-.. doxygenfile:: lv_menu.h
- :project: lvgl
-
-```
\ No newline at end of file
diff --git a/lib/lvgl/docs/widgets/extra/meter.md b/lib/lvgl/docs/widgets/extra/meter.md
deleted file mode 100644
index 164b295..0000000
--- a/lib/lvgl/docs/widgets/extra/meter.md
+++ /dev/null
@@ -1,117 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/meter.md
-```
-# Meter (lv_meter)
-
-## Overview
-The Meter widget can visualize data in very flexible ways. In can show arcs, needles, ticks lines and labels.
-
-## Parts and Styles
-- `LV_PART_MAIN` The background of the Meter. Uses the typical background properties.
-- `LV_PART_TICK` The tick lines a labels using the *line* and *text* style properties.
-- `LV_PART_INDICATOR` The needle line or image using the *line* and *img* style properties, as well as the background properties to draw a square (or circle) on the pivot of the needles. Padding makes the square larger.
-- `LV_PART_ITEMS` The arcs using the *arc* properties.
-
-## Usage
-
-### Add a scale
-
-First a *Scale* needs to be added to the Meter with `lv_meter_scale_t * scale = lv_meter_add_scale(meter)`.
-The Scale has minor and major ticks and labels on the major ticks. Later indicators (needles, arcs, tick modifiers) can be added to the meter
-
-Any number of scales can be added to Meter.
-
-The minor tick lines can be configured with: `lv_meter_set_scale_ticks(meter, scale, tick_count, line_width, tick_length, ctick_olor)`.
-
-To add major tick lines use `lv_meter_set_scale_major_ticks(meter, scale, nth_major, tick_width, tick_length, tick_color, label_gap)`. `nth_major` to specify how many minor ticks to skip to draw a major tick.
-
-Labels are added automatically on major ticks with `label_gap` distance from the ticks with text proportionally to the values of the tick line.
-
-`lv_meter_set_scale_range(meter, scale, min, max, angle_range, rotation)` sets the value and angle range of the scale.
-
-### Add indicators
-
-Indicators need to be added to a Scale and their value is interpreted in the range of the Scale.
-
-All the indicator add functions return `lv_meter_indicator_t *`.
-
-#### Needle line
-
-`indic = lv_meter_add_needle_line(meter, scale, line_width, line_color, r_mod)` adds a needle line to a Scale. By default, the length of the line is the same as the scale's radius but `r_mod` changes the length.
-
-`lv_meter_set_indicator_value(meter, indic, value)` sets the value of the indicator.
-
-#### Needle image
-
-`indic = lv_meter_add_needle_img(meter, scale, img_src, pivot_x, pivot_y)` sets an image that will be used as a needle. `img_src` should be a needle pointing to the right like this `-O--->`.
-`pivot_x` and `pivot_y` sets the pivot point of the rotation relative to the top left corner of the image.
-
-`lv_meter_set_indicator_value(meter, inidicator, value)` sets the value of the indicator.
-
-#### Arc
-`indic = lv_meter_add_arc(meter, scale, arc_width, arc_color, r_mod)` adds and arc indicator. . By default, the radius of the arc is the same as the scale's radius but `r_mod` changes the radius.
-
-`lv_meter_set_indicator_start_value(meter, indic, value)` and `lv_meter_set_indicator_end_value(meter, inidicator, value)` sets the value of the indicator.
-
-#### Scale lines (ticks)
-`indic = lv_meter_add_scale_lines(meter, scale, color_start, color_end, local, width_mod)` adds an indicator that modifies the ticks lines.
-If `local` is `true` the ticks' color will be faded from `color_start` to `color_end` in the indicator's start and end value range.
-If `local` is `false` `color_start` and `color_end` will be mapped to the start and end value of the scale and only a "slice" of that color gradient will be visible in the indicator's start and end value range.
-`width_mod` modifies the width of the tick lines.
-
-`lv_meter_set_indicator_start_value(meter, inidicator, value)` and `lv_meter_set_indicator_end_value(meter, inidicator, value)` sets the value of the indicator.
-
-## Events
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` is sent for the following types:
- - `LV_METER_DRAW_PART_ARC` The arc indicator
- - `part`: `LV_PART_ITEMS`
- - `sub_part_ptr`: pointer to the indicator
- - `arc_dsc`
- - `radius`: radius of the arc
- - `p1` center of the arc
- - `LV_METER_DRAW_PART_NEEDLE_LINE` The needle lines
- - `part`: `LV_PART_ITEMS`
- - `p1`, `p2` points of the line
- - `line_dsc`
- - `sub_part_ptr`: pointer to the indicator
- - `LV_METER_DRAW_PART_NEEDLE_IMG` The needle images
- - `part`: `LV_PART_ITEMS`
- - `p1`, `p2` points of the line
- - `img_dsc`
- - `sub_part_ptr`: pointer to the indicator
- - `LV_METER_DRAW_PART_TICK` The tick lines and labels
- - `part`: `LV_PART_TICKS`
- - `value`: the value of the line
- - `text`: `value` converted to decimal or `NULL` on minor lines
- - `label_dsc`: label draw descriptor or `NULL` on minor lines
- - `line_dsc`:
- - `id`: the index of the line
-
-
-See the events of the [Base object](/widgets/obj) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No keys are handled by the Meter widget.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/meter/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_meter.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/msgbox.md b/lib/lvgl/docs/widgets/extra/msgbox.md
deleted file mode 100644
index 2591003..0000000
--- a/lib/lvgl/docs/widgets/extra/msgbox.md
+++ /dev/null
@@ -1,71 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/msgbox.md
-```
-# Message box (lv_msgbox)
-
-## Overview
-The Message boxes act as pop-ups.
-They are built from a background container, a title, an optional close button, a text and optional buttons.
-
-The text will be broken into multiple lines automatically and the height will be set automatically to include the text and the buttons.
-
-The message box can be modal (blocking clicks on the rest of the screen) or not modal.
-
-## Parts and Styles
-The message box is built from other widgets, so you can check these widgets' documentation for details.
-- Background: [lv_obj](/widgets/obj)
-- Close button: [lv_btn](/widgets/core/btn)
-- Title and text: [lv_label](/widgets/core/label)
-- Buttons: [lv_btnmatrix](/widgets/core/btnmatrix)
-
-## Usage
-
-### Create a message box
-
-`lv_msgbox_create(parent, title, txt, btn_txts[], add_close_btn)` creates a message box.
-
-If `parent` is `NULL` the message box will be modal. `title` and `txt` are strings for the title and the text.
-`btn_txts[]` is an array with the buttons' text. E.g. `const char * btn_txts[] = {"Ok", "Cancel", NULL}`.
-`add_close_btn` can be `true` or `false` to add/don't add a close button.
-
-### Get the parts
-The building blocks of the message box can be obtained using the following functions:
-```c
-lv_obj_t * lv_msgbox_get_title(lv_obj_t * mbox);
-lv_obj_t * lv_msgbox_get_close_btn(lv_obj_t * mbox);
-lv_obj_t * lv_msgbox_get_text(lv_obj_t * mbox);
-lv_obj_t * lv_msgbox_get_btns(lv_obj_t * mbox);
-```
-
-### Close the message box
-`lv_msgbox_close(msgbox)` closes (deletes) the message box.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` is sent by the buttons if one of them is clicked. `LV_OBJ_FLAG_EVENT_BUBBLE` is enabled on the buttons so you can add events to the message box itself.
-In the event handler, `lv_event_get_target(e)` will return the button matrix and `lv_event_get_current_target(e)` will return the message box. `lv_msgbox_get_active_btn(msgbox)` and `lv_msgbox_get_active_btn_text(msgbox)` can be used to get the index and text of the clicked button.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-Keys have effect on the close button and button matrix. You can add them manually to a group if required.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/msgbox/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_msgbox.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/span.md b/lib/lvgl/docs/widgets/extra/span.md
deleted file mode 100644
index 58e3ff7..0000000
--- a/lib/lvgl/docs/widgets/extra/span.md
+++ /dev/null
@@ -1,89 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/span.md
-```
-# Span (lv_span)
-
-## Overview
-
-A spangroup is the object that is used to display rich text. Different from the label object, `spangroup` can render text styled with different fonts, colors, and sizes into the spangroup object.
-
-## Parts and Styles
-- `LV_PART_MAIN` The spangroup has only one part.
-
-## Usage
-
-### Set text and style
-
-The spangroup object uses span to describe text and text style. so, first we need to create `span` descriptor using `lv_span_t * span = lv_spangroup_new_span(spangroup)`. Then use `lv_span_set_text(span, "text")` to set text. The style of the span is configured as with a normal style object by using its `style` member, eg:`lv_style_set_text_color(&span->style, lv_palette_main(LV_PALETTE_RED))`.
-
-If spangroup object `mode != LV_SPAN_MODE_FIXED` you must call `lv_spangroup_refr_mode()` after you have modified `span` style(eg:set text, changed the font size, del span).
-
-### Retrieving a span child
-Spangroups store their children differently from normal objects, so normal functions for getting children won't work.
-
-`lv_spangroup_get_child(spangroup, id)` will return a pointer to the child span at index `id`. In addition, `id` can be negative to index from the end of the spangroup where `-1` is the youngest child, `-2` is second youngest, etc.
-
-e.g. `lv_span_t* span = lv_spangroup_get_child(spangroup, 0)` will return the first child of the spangroup. `lv_span_t* span = lv_spangroup_get_child(spangroup, -1)` will return the last (or most recent) child.
-
-### Child Count
-Use the function `lv_spangroup_get_child_cnt(spangroup)` to get back the number of spans the group is maintaining.
-
-e.g. `uint32_t size = lv_spangroup_get_child_cnt(spangroup)`
-
-### Text align
-like label object, the spangroup can be set to one the following modes:
-- `LV_TEXT_ALIGN_LEFT` Align text to left.
-- `LV_TEXT_ALIGN_CENTER` Align text to center.
-- `LV_TEXT_ALIGN_RIGHT` Align text to right.
-- `LV_TEXT_ALIGN_AUTO` Align text auto.
-
-use function `lv_spangroup_set_align(spangroup, LV_TEXT_ALIGN_CENTER)` to set text align.
-
-### Modes
-The spangroup can be set to one the following modes:
-- `LV_SPAN_MODE_FIXED` fixes the object size.
-- `LV_SPAN_MODE_EXPAND` Expand the object size to the text size but stay on a single line.
-- `LV_SPAN_MODE_BREAK` Keep width, break the too long lines and auto expand height.
-
-Use `lv_spangroup_set_mode(spangroup, LV_SPAN_MODE_BREAK)` to set object mode.
-
-### Overflow
-The spangroup can be set to one the following modes:
-- `LV_SPAN_OVERFLOW_CLIP` truncates the text at the limit of the area.
-- `LV_SPAN_OVERFLOW_ELLIPSIS` will display an ellipsis(`...`) when text overflows the area.
-
-Use `lv_spangroup_set_overflow(spangroup, LV_SPAN_OVERFLOW_CLIP)` to set object overflow mode.
-
-### first line indent
-Use `lv_spangroup_set_indent(spangroup, 20)` to set the indent of the first line. all modes support pixel units, in addition to LV_SPAN_MODE_FIXED and LV_SPAN_MODE_BREAK mode supports percentage units too.
-
-### lines
-Use `lv_spangroup_set_lines(spangroup, 10)` to set the maximum number of lines to be displayed in LV_SPAN_MODE_BREAK mode, negative values indicate no limit.
-
-## Events
-No special events are sent by this widget.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/span/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_span.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/spinbox.md b/lib/lvgl/docs/widgets/extra/spinbox.md
deleted file mode 100644
index 12d485c..0000000
--- a/lib/lvgl/docs/widgets/extra/spinbox.md
+++ /dev/null
@@ -1,63 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/spinbox.md
-```
-# Spinbox (lv_spinbox)
-
-## Overview
-The Spinbox contains a number as text which can be increased or decreased by *Keys* or API functions.
-Under the hood the Spinbox is a modified [Text area](/widgets/core/textarea).
-
-## Parts and Styles
-The parts of the Spinbox are identical to the [Text area](/widgets/core/textarea).
-
-### Value, range and step
-`lv_spinbox_set_value(spinbox, 1234)` sets a new value on the Spinbox.
-
-`lv_spinbox_increment(spinbox)` and `lv_spinbox_decrement(spinbox)` increments/decrements the value of the Spinbox according to the currently selected digit.
-
-`lv_spinbox_set_range(spinbox, -1000, 2500)` sets a range. If the value is changed by `lv_spinbox_set_value`, by *Keys*,`lv_spinbox_increment/decrement` this range will be respected.
-
-`lv_spinbox_set_step(spinbox, 100)` sets which digits to change on increment/decrement. Only multiples of ten can be set, and not for example 3.
-
-`lv_spinbox_set_pos(spinbox, 1)` sets the cursor to a specific digit to change on increment/decrement. For example position '0' sets the cursor to the least significant digit.
-
-If an encoder is used as input device, the selected digit is shifted to the right by default whenever the encoder button is clicked. To change this behaviour to shifting to the left, the `lv_spinbox_set_digit_step_direction(spinbox, LV_DIR_LEFT)` can be used
-
-### Format
-
-`lv_spinbox_set_digit_format(spinbox, digit_count, separator_position)` sets the number format. `digit_count` is the number of digits excluding the decimal separator and the sign.
-`separator_position` is the number of digits before the decimal point. If 0, no decimal point is displayed.
-
-### Rollover
-`lv_spinbox_set_rollover(spinbox, true/false)` enables/disabled rollover mode. If either the minimum or maximum value is reached with rollover enabled, the value will change to the other limit. If rollover is disabled the value will remain at the minimum or maximum value.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when the value has changed.
-
-See the events of the [Text area](/widgets/core/textarea) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-- `LV_KEY_LEFT/RIGHT` With *Keypad* move the cursor left/right. With *Encoder* decrement/increment the selected digit.
-- `LV_KEY_UP/DOWN` With *Keypad* and *Encoder* increment/decrement the value.
-- `LV_KEY_ENTER` With *Encoder* got the net digit. Jump to the first after the last.
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/spinbox/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_spinbox.h
- :project: lvgl
-
-```
-## Example
diff --git a/lib/lvgl/docs/widgets/extra/spinner.md b/lib/lvgl/docs/widgets/extra/spinner.md
deleted file mode 100644
index a2c577c..0000000
--- a/lib/lvgl/docs/widgets/extra/spinner.md
+++ /dev/null
@@ -1,48 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/spinner.md
-```
-# Spinner (lv_spinner)
-
-## Overview
-The Spinner object is a spinning arc over a ring.
-
-## Parts and Styles
-The parts are identical to the parts of [lv_arc](/widgets/core/arc).
-
-## Usage
-
-### Create a spinner
-
-To create a spinner use `lv_spinner_create(parent, spin_time, arc_length)`. `spin time` sets the spin time in milliseconds, `arc_length` sets the length of the spinning arc in degrees.
-
-## Events
-No special events are sent to the Spinner.
-
-See the events of the [Arc](/widgets/core/arc) too.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are processed by the object type.
-
-Learn more about [Keys](/overview/indev).
-
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/spinner/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_spinner.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/tabview.md b/lib/lvgl/docs/widgets/extra/tabview.md
deleted file mode 100644
index a2761a1..0000000
--- a/lib/lvgl/docs/widgets/extra/tabview.md
+++ /dev/null
@@ -1,72 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/tabview.md
-```
-
-# Tabview (lv_tabview)
-
-## Overview
-
-The Tab view object can be used to organize content in tabs.
-The Tab view is built from other widgets:
-- Main container: [lv_obj](/widgets/obj))
- - Tab buttons: [lv_btnmatrix](/widgets/core/btnmatrix)
- - Container for the tabs: [lv_obj](/widgets/obj)
- - Content of the tabs: [lv_obj](/widgets/obj)
-
-The tab buttons can be positioned on the top, bottom, left and right side of the Tab view.
-
-A new tab can be selected either by clicking on a tab button or by sliding horizontally on the content.
-
-## Parts and Styles
-There are no special parts on the Tab view but the `lv_obj` and `lv_btnnmatrix` widgets are used to create the Tab view.
-
-## Usage
-
-### Create a Tab view
-
-`lv_tabview_create(parent, tab_pos, tab_size);` creates a new empty Tab view. `tab_pos` can be `LV_DIR_TOP/BOTTOM/LEFT/RIGHT` to position the tab buttons to a side.
-`tab_size` is the height (in case of `LV_DIR_TOP/BOTTOM`) or width (in case of `LV_DIR_LEFT/RIGHT`) tab buttons.
-
-### Add tabs
-
-New tabs can be added with `lv_tabview_add_tab(tabview, "Tab name")`. This will return a pointer to an [lv_obj](/widgets/obj) object where the tab's content can be created.
-
-### Change tab
-
-To select a new tab you can:
-- Click on its tab button
-- Slide horizontally
-- Use `lv_tabview_set_act(tabview, id, LV_ANIM_ON/OFF)` function
-
-### Get the parts
-
-`lv_tabview_get_content(tabview)` returns the container for the tabs, `lv_tabview_get_tab_btns(tabview)` returns the Tab buttons object which is a [Button matrix](/widgets/core/btnmatrix).
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a new tab is selected by sliding or clicking the tab button. `lv_tabview_get_tab_act(tabview)` returns the zero based index of the current tab.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-
-Keys have effect only on the tab buttons (Button matrix). Add manually to a group if required.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/tabview/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_tabview.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/tileview.md b/lib/lvgl/docs/widgets/extra/tileview.md
deleted file mode 100644
index 3e3818d..0000000
--- a/lib/lvgl/docs/widgets/extra/tileview.md
+++ /dev/null
@@ -1,58 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/tileview.md
-```
-# Tile view (lv_tileview)
-
-## Overview
-
-The Tile view is a container object whose elements (called *tiles*) can be arranged in grid form.
-A user can navigate between the tiles by swiping.
-Any direction of swiping can be disabled on the tiles individually to not allow moving from one tile to another.
-
-If the Tile view is screen sized, the user interface resembles what you may have seen on smartwatches.
-
-## Parts and Styles
-The Tile view is built from an [lv_obj](/widgets/obj) container and [lv_obj](/widgets/obj) tiles.
-
-The parts and styles work the same as for [lv_obj](/widgets/obj).
-
-## Usage
-
-### Add a tile
-
-`lv_tileview_add_tile(tileview, row_id, col_id, dir)` creates a new tile on the `row_id`th row and `col_id`th column.
-`dir` can be `LV_DIR_LEFT/RIGHT/TOP/BOTTOM/HOR/VER/ALL` or OR-ed values to enable moving to the adjacent tiles into the given direction by swiping.
-
-The returned value is an `lv_obj_t *` on which the content of the tab can be created.
-
-### Change tile
-The Tile view can scroll to a tile with `lv_obj_set_tile(tileview, tile_obj, LV_ANIM_ON/OFF)` or `lv_obj_set_tile_id(tileviewv, col_id, row_id, LV_ANIM_ON/OFF);`
-
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` Sent when a new tile loaded by scrolling. `lv_tileview_get_tile_act(tabview)` can be used to get current tile.
-
-## Keys
-*Keys* are not handled by the Tile view.
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/tileview/index.rst
-
-```
-
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_tileview.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/extra/win.md b/lib/lvgl/docs/widgets/extra/win.md
deleted file mode 100644
index 7e4c86e..0000000
--- a/lib/lvgl/docs/widgets/extra/win.md
+++ /dev/null
@@ -1,65 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/extra/win.md
-```
-# Window (lv_win)
-
-## Overview
-
-The Window is container-like object built from a header with title and buttons and a content area.
-
-## Parts and Styles
-The Window is built from other widgets so you can check their documentation for details:
-- Background: [lv_obj](/widgets/obj)
-- Header on the background: [lv_obj](/widgets/obj)
-- Title on the header: [lv_label](/widgets/core/label)
-- Buttons on the header: [lv_btn](/widgets/core/btn)
-- Content area on the background: [lv_obj](/widgets/obj)
-
-
-## Usage
-
-### Create a Window
-
-`lv_win_create(parent, header_height)` creates a Window with an empty header.
-
-### Title and buttons
-
-Any number of texts (but typically only one) can be added to the header with `lv_win_add_title(win, "The title")`.
-
-Control buttons can be added to the window's header with `lv_win_add_btn(win, icon, btn_width)`. `icon` can be any image source, and `btn_width` is the width of the button.
-
-The title and the buttons will be added in the order the functions are called. So adding a button, a text and two other buttons will result in a button on the left, a title, and 2 buttons on the right.
-The width of the title is set to take all the remaining space on the header. In other words: it pushes to the right all the buttons that are added after the title.
-
-## Get the parts
-`lv_win_get_header(win)` returns a pointer to the header, `lv_win_get_content(win)` returns a pointer to the content container to which the content of the window can be added.
-
-## Events
-No special events are sent by the windows, however events can be added manually to the return value of `lv_win_add_btn`.
-
-Learn more about [Events](/overview/event).
-
-## Keys
-No *Keys* are handled by the window.
-
-Learn more about [Keys](/overview/indev).
-
-
-## Example
-
-```eval_rst
-
-.. include:: ../../../examples/widgets/win/index.rst
-
-```
-
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_win.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/docs/widgets/index.md b/lib/lvgl/docs/widgets/index.md
deleted file mode 100644
index ff8714b..0000000
--- a/lib/lvgl/docs/widgets/index.md
+++ /dev/null
@@ -1,17 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/object-types/index.md
-```
-# Widgets
-
-```eval_rst
-
-.. toctree::
- :maxdepth: 1
-
- obj
- core/index
- extra/index
-```
-
-
diff --git a/lib/lvgl/docs/widgets/obj.md b/lib/lvgl/docs/widgets/obj.md
deleted file mode 100644
index 4bb1090..0000000
--- a/lib/lvgl/docs/widgets/obj.md
+++ /dev/null
@@ -1,202 +0,0 @@
-```eval_rst
-.. include:: /header.rst
-:github_url: |github_link_base|/widgets/obj.md
-```
-# Base object (lv_obj)
-
-## Overview
-
-The 'Base Object' implements the basic properties of widgets on a screen, such as:
-- coordinates
-- parent object
-- children
-- contains the styles
-- attributes like *Clickable*, *Scrollable*, etc.
-
-In object-oriented thinking, it is the base class from which all other objects in LVGL are inherited.
-
-The functions and functionalities of the Base object can be used with other widgets too. For example `lv_obj_set_width(slider, 100)`
-
-The Base object can be directly used as a simple widget: it's nothing more than a rectangle. In HTML terms, think of it as a ``.
-
-### Coordinates
-
-Only a small subset of coordinate settings is described here. To see all the features of LVGL (padding, coordinates in styles, layouts, etc) visit the [Coordinates](/overview/coords) page.
-
-#### Size
-The object size can be modified on individual axes with `lv_obj_set_width(obj, new_width)` and `lv_obj_set_height(obj, new_height)`, or both axes can be modified at the same time with `lv_obj_set_size(obj, new_width, new_height)`.
-
-#### Position
-You can set the position relative to the parent with `lv_obj_set_x(obj, new_x)` and `lv_obj_set_y(obj, new_y)`, or both axes at the same time with `lv_obj_set_pos(obj, new_x, new_y)`.
-
-#### Alignment
-You can align the object on its parent with `lv_obj_set_align(obj, LV_ALIGN_...)`. After this every x and y setting will be relative to the set alignment mode.
-For example, this will shift the object by 10;20 px from the center of its parent:
-```c
-lv_obj_set_align(obj, LV_ALIGN_CENTER);
-lv_obj_set_pos(obj, 10, 20);
-
-//Or in one function
-lv_obj_align(obj, LV_ALIGN_CENTER, 10, 20);
-```
-
-To align one object to another use: `lv_obj_align_to(obj_to_align, obj_referece, LV_ALIGN_..., x, y)`
-
-For example, to align a text below an image: `lv_obj_align_to(text, image, LV_ALIGN_OUT_BOTTOM_MID, 0, 10)`.
-
-The following align types exist:
-
-
-
-### Parents and children
-You can set a new parent for an object with `lv_obj_set_parent(obj, new_parent)`. To get the current parent, use `lv_obj_get_parent(obj)`.
-
-To get a specific child of a parent use `lv_obj_get_child(parent, idx)`. Some examples for `idx`:
-- `0` get the child created first
-- `1` get the child created second
-- `-1` get the child created last
-
-The children can be iterated lke this:
-```c
-uint32_t i;
-for(i = 0; i < lv_obj_get_child_cnt(parent); i++) {
- lv_obj_t * child = lv_obj_get_child(parent, i);
- /*Do something with child*/
-}
-```
-
-`lv_obj_get_index(obj)` returns the index of the object in its parent. It is equivalent to the number of younger children in the parent.
-
-You can bring an object to the foreground or send it to the background with `lv_obj_move_foreground(obj)` and `lv_obj_move_background(obj)`.
-
-You can change the index of an object in its parent using `lv_obj_move_to_index(obj, index)`.
-
-You can swap the position of two objects with `lv_obj_swap(obj1, obj2)`.
-
-### Display and Screens
-
-At the highest level of the LVGL object hierarchy is the *display* which represents the driver for a display device (physical display or simulator). A display can have one or more screens associated with it. Each screen contains a hierarchy of objects for graphical widgets representing a layout that covers the entire display.
-
-When you have created a screen like `lv_obj_t * screen = lv_obj_create(NULL)`, you can make it active with `lv_scr_load(screen)`. The `lv_scr_act()` function gives you a pointer to the active screen.
-
-If you have multiple displays, it's important to know that the screen functions operate on the most recently created display or the one explicitly selected with `lv_disp_set_default`.
-
-To get an object's screen use the `lv_obj_get_screen(obj)` function.
-
-### Events
-
-To set an event callback for an object, use `lv_obj_add_event_cb(obj, event_cb, LV_EVENT_..., user_data)`,
-
-To manually send an event to an object, use `lv_event_send(obj, LV_EVENT_..., param)`
-
-Read the [Event overview](/overview/event) to learn more about events.
-
-
-### Styles
-Be sure to read the [Style overview](/overview/style). Here only the most essential functions are described.
-
-A new style can be added to an object with the `lv_obj_add_style(obj, &new_style, selector)` function.
-`selector` is an ORed combination of part and state(s). E.g. `LV_PART_SCROLLBAR | LV_STATE_PRESSED`.
-
-The base objects use `LV_PART_MAIN` style properties and `LV_PART_SCROLLBAR` with the typical background style properties.
-
-
-### Flags
-There are some attributes which can be enabled/disabled by `lv_obj_add/clear_flag(obj, LV_OBJ_FLAG_...)`:
-
-- `LV_OBJ_FLAG_HIDDEN` Make the object hidden. (Like it wasn't there at all)
-- `LV_OBJ_FLAG_CLICKABLE` Make the object clickable by input devices
-- `LV_OBJ_FLAG_CLICK_FOCUSABLE` Add focused state to the object when clicked
-- `LV_OBJ_FLAG_CHECKABLE` Toggle checked state when the object is clicked
-- `LV_OBJ_FLAG_SCROLLABLE` Make the object scrollable
-- `LV_OBJ_FLAG_SCROLL_ELASTIC` Allow scrolling inside but with slower speed
-- `LV_OBJ_FLAG_SCROLL_MOMENTUM` Make the object scroll further when "thrown"
-- `LV_OBJ_FLAG_SCROLL_ONE` Allow scrolling only one snappable children
-- `LV_OBJ_FLAG_SCROLL_CHAIN_HOR` Allow propagating the horizontal scroll to a parent
-- `LV_OBJ_FLAG_SCROLL_CHAIN_VER` Allow propagating the vertical scroll to a parent
-- `LV_OBJ_FLAG_SCROLL_CHAIN` Simple packaging for (`LV_OBJ_FLAG_SCROLL_CHAIN_HOR | LV_OBJ_FLAG_SCROLL_CHAIN_VER`)
-- `LV_OBJ_FLAG_SCROLL_ON_FOCUS` Automatically scroll object to make it visible when focused
-- `LV_OBJ_FLAG_SCROLL_WITH_ARROW` Allow scrolling the focused object with arrow keys
-- `LV_OBJ_FLAG_SNAPPABLE` If scroll snap is enabled on the parent it can snap to this object
-- `LV_OBJ_FLAG_PRESS_LOCK` Keep the object pressed even if the press slid from the object
-- `LV_OBJ_FLAG_EVENT_BUBBLE` Propagate the events to the parent too
-- `LV_OBJ_FLAG_GESTURE_BUBBLE` Propagate the gestures to the parent
-- `LV_OBJ_FLAG_ADV_HITTEST` Allow performing more accurate hit (click) test. E.g. accounting for rounded corners
-- `LV_OBJ_FLAG_IGNORE_LAYOUT` Make the object positionable by the layouts
-- `LV_OBJ_FLAG_FLOATING` Do not scroll the object when the parent scrolls and ignore layout
-- `LV_OBJ_FLAG_OVERFLOW_VISIBLE` Do not clip the children's content to the parent's boundary
-
-- `LV_OBJ_FLAG_LAYOUT_1` Custom flag, free to use by layouts
-- `LV_OBJ_FLAG_LAYOUT_2` Custom flag, free to use by layouts
-
-- `LV_OBJ_FLAG_WIDGET_1` Custom flag, free to use by widget
-- `LV_OBJ_FLAG_WIDGET_2` Custom flag, free to use by widget
-
-- `LV_OBJ_FLAG_USER_1` Custom flag, free to use by user
-- `LV_OBJ_FLAG_USER_2` Custom flag, free to use by user
-- `LV_OBJ_FLAG_USER_3` Custom flag, free to use by user
-- `LV_OBJ_FLAG_USER_4` Custom flag, free to use by user
-
-Some examples:
-```c
-/*Hide on object*/
-lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
-
-/*Make an object non-clickable*/
-lv_obj_clear_flag(obj, LV_OBJ_FLAG_CLICKABLE);
-```
-
-### Groups
-
-Read the [Input devices overview](/overview/indev) to learn more about *Groups*.
-
-Objects are added to a *group* with `lv_group_add_obj(group, obj)`, and you can use `lv_obj_get_group(obj)` to see which group an object belongs to.
-
-`lv_obj_is_focused(obj)` returns if the object is currently focused on its group or not. If the object is not added to a group, `false` will be returned.
-
-
-### Extended click area
-By default, the objects can be clicked only within their bounding area. However, this can be extended with `lv_obj_set_ext_click_area(obj, size)`.
-
-## Events
-- `LV_EVENT_VALUE_CHANGED` when the `LV_OBJ_FLAG_CHECKABLE` flag is enabled and the object clicked (on transition to/from the checked state)
-- `LV_EVENT_DRAW_PART_BEGIN` and `LV_EVENT_DRAW_PART_END` is sent for the following types:
- - `LV_OBJ_DRAW_PART_RECTANGLE` The main rectangle
- - `part`: `LV_PART_MAIN`
- - `rect_dsc`
- - `draw_area`: the area of the rectangle
- - `LV_OBJ_DRAW_PART_BORDER_POST` The border if the `border_post` style property is `true`
- - `part`: `LV_PART_MAIN`
- - `rect_dsc`
- - `draw_area`: the area of the rectangle
- - `LV_OBJ_DRAW_PART_SCROLLBAR` the scrollbars
- - `part`: `LV_PART_SCROLLBAR`
- - `rect_dsc`
- - `draw_area`: the area of the rectangle
-
-Learn more about [Events](/overview/event).
-
-## Keys
-If `LV_OBJ_FLAG_CHECKABLE` is enabled, `LV_KEY_RIGHT` and `LV_KEY_UP` make the object checked, and `LV_KEY_LEFT` and `LV_KEY_DOWN` make it unchecked.
-
-If `LV_OBJ_FLAG_SCROLLABLE` is enabled, but the object is not editable (as declared by the widget class), the arrow keys (`LV_KEY_UP`, `LV_KEY_DOWN`, `LV_KEY_LEFT`, `LV_KEY_RIGHT`) scroll the object. If the object can only scroll vertically, `LV_KEY_LEFT` and `LV_KEY_RIGHT` will scroll up/down instead, making it compatible with an encoder input device. See [Input devices overview](/overview/indev) for more on encoder behaviors and the edit mode.
-
-
-Learn more about [Keys](/overview/indev).
-
-## Example
-
-```eval_rst
-
-.. include:: ../../examples/widgets/obj/index.rst
-
-```
-
-## API
-
-```eval_rst
-
-.. doxygenfile:: lv_obj.h
- :project: lvgl
-
-```
diff --git a/lib/lvgl/env_support/cmake/custom.cmake b/lib/lvgl/env_support/cmake/custom.cmake
index 5616982..1536710 100644
--- a/lib/lvgl/env_support/cmake/custom.cmake
+++ b/lib/lvgl/env_support/cmake/custom.cmake
@@ -63,6 +63,18 @@ install(
FILES_MATCHING
PATTERN "*.h")
+install(
+ FILES "${LV_CONF_PATH}"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/../"
+ RENAME "lv_conf.h"
+ OPTIONAL)
+
+configure_file("${LVGL_ROOT_DIR}/lvgl.pc.in" lvgl.pc @ONLY)
+
+install(
+ FILES "${CMAKE_BINARY_DIR}/lvgl.pc"
+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/")
+
set_target_properties(
lvgl
PROPERTIES OUTPUT_NAME lvgl
diff --git a/lib/lvgl/env_support/cmake/esp.cmake b/lib/lvgl/env_support/cmake/esp.cmake
index a8671da..edc3709 100644
--- a/lib/lvgl/env_support/cmake/esp.cmake
+++ b/lib/lvgl/env_support/cmake/esp.cmake
@@ -12,22 +12,43 @@ if(LV_MICROPYTHON)
${LVGL_ROOT_DIR}/../
REQUIRES
main)
-
- target_compile_definitions(${COMPONENT_LIB}
- INTERFACE "-DLV_CONF_INCLUDE_SIMPLE")
-
- if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
- target_compile_definitions(${COMPONENT_LIB}
- INTERFACE "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR")
- endif()
else()
- idf_component_register(SRCS ${SOURCES} INCLUDE_DIRS ${LVGL_ROOT_DIR}
- ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../)
-
- target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
-
- if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
- target_compile_definitions(${COMPONENT_LIB}
- PUBLIC "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR")
+ if(CONFIG_LV_BUILD_EXAMPLES)
+ file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)
+ set_source_files_properties(${EXAMPLE_SOURCES} COMPILE_FLAGS "-Wno-unused-variable -Wno-format")
endif()
+
+ if(CONFIG_LV_USE_DEMO_WIDGETS)
+ file(GLOB_RECURSE DEMO_WIDGETS_SOURCES ${LVGL_ROOT_DIR}/demos/widgets/*.c)
+ list(APPEND DEMO_SOURCES ${DEMO_WIDGETS_SOURCES})
+ endif()
+ if(CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER)
+ file(GLOB_RECURSE DEMO_KEYPAD_AND_ENCODER_SOURCES ${LVGL_ROOT_DIR}/demos/keypad_encoder/*.c)
+ list(APPEND DEMO_SOURCES ${DEMO_KEYPAD_AND_ENCODER_SOURCES})
+ endif()
+ if(CONFIG_LV_USE_DEMO_BENCHMARK)
+ file(GLOB_RECURSE DEMO_BENCHMARK_SOURCES ${LVGL_ROOT_DIR}/demos/benchmark/*.c)
+ list(APPEND DEMO_SOURCES ${DEMO_BENCHMARK_SOURCES})
+ endif()
+ if(CONFIG_LV_USE_DEMO_STRESS)
+ file(GLOB_RECURSE DEMO_STRESS_SOURCES ${LVGL_ROOT_DIR}/demos/stress/*.c)
+ list(APPEND DEMO_SOURCES ${DEMO_STRESS_SOURCES})
+ endif()
+ if(CONFIG_LV_USE_DEMO_MUSIC)
+ file(GLOB_RECURSE DEMO_MUSIC_SOURCES ${LVGL_ROOT_DIR}/demos/music/*.c)
+ list(APPEND DEMO_SOURCES ${DEMO_MUSIC_SOURCES})
+ set_source_files_properties(${DEMO_MUSIC_SOURCES} COMPILE_FLAGS "-Wno-format")
+ endif()
+
+ idf_component_register(SRCS ${SOURCES} ${EXAMPLE_SOURCES} ${DEMO_SOURCES}
+ INCLUDE_DIRS ${LVGL_ROOT_DIR} ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../
+ ${LVGL_ROOT_DIR}/examples ${LVGL_ROOT_DIR}/demos
+ REQUIRES esp_timer)
+endif()
+
+target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
+
+if(CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM)
+ target_compile_definitions(${COMPONENT_LIB}
+ PUBLIC "-DLV_ATTRIBUTE_FAST_MEM=IRAM_ATTR")
endif()
diff --git a/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.1.0.3-alpha.pack b/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.8.4.0.pack
similarity index 77%
rename from lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.1.0.3-alpha.pack
rename to lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.8.4.0.pack
index 1acdb2e..62e06df 100644
Binary files a/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.1.0.3-alpha.pack and b/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.8.4.0.pack differ
diff --git a/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.pdsc b/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.pdsc
index 805619e..7099923 100644
--- a/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.pdsc
+++ b/lib/lvgl/env_support/cmsis-pack/LVGL.lvgl.pdsc
@@ -20,7 +20,7 @@
-->
-
+
LVGL
lvgl
LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create an embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.
@@ -36,9 +36,72 @@
https://github.com/lvgl/lvgl.git
-
+
+ - LVGL 8.4.0
+ - Some minor fixes
+
+
+ - LVGL 8.3.11
+ - Add LittleFS Library to LVGL8
+ - Backport Tiny TTF to LVGL8
+ - Some minor fixes
+
+
+ - LVGL 8.3.10
+ - Some minor fixes
+
+
+
+ - LVGL 8.3.10
+ - Add snapshot, fragment, imgfont, gridnav, msg and monkey
+ - Other minor fixes
+
+
+ - LVGL 8.3.8
+ - Add renesas-ra6m3 gpu adaptation
+ - Improve performance and add more features for PXP and VGLite
+ - Minor updates
+
+
+ - LVGL 8.3.7
+ - Minor updates
+
+
+ - LVGL 8.3.6 release
+ - Various fixes, See CHANGELOG.md
+
+
+ - LVGL 8.3.5 release
+ - Use LVGL version as the cmsis-pack version
+ - Fix GPU support for NXP PXP and NXP VGLite
+ - Rework stm32 DMA2D support
+ - Various fixes
+
+
+ - LVGL 8.3.4 release
+ - Update GPU Arm-2D support
+ - Various fixes
+
+
+ - LVGL 8.3.0-dev
+ - Monthly update for June
+ - Add Pinyin as input method
+ - Update benchmark to support RGB565-A8
+ - Update support for layers
+
+
+ - LVGL 8.3.0-dev
+ - Monthly update for May
+ - Update drawing service
+ - Update GPU support for Arm-2D library
+ - Update GPU support for NXP PXP/VGLite
+ - Improving the accuracy of benchmark.
+ - Add new colour support for RGB565A8
+
+
- LVGL 8.3.0-dev
- Monthly update for April
+ - Add GPU support for SWM341-DMA2D
- LVGL 8.3.0-dev
@@ -135,6 +198,90 @@
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
+
+ Enable LVGL Arm-2D GPU Support
+
+
+
+
+
+
+
+
+
+
-
+
LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create an embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.
@@ -195,9 +342,11 @@
+
+
@@ -210,10 +359,13 @@
+
+
+
@@ -295,10 +447,18 @@
-
+
+
+
+
+
+
+
+
+
@@ -306,6 +466,7 @@
/*! \brief use lv_config_cmsis.h which will be pre-included */
#define LV_CONF_SKIP
+#define LV_LVGL_H_INCLUDE_SIMPLE 1
@@ -319,8 +480,8 @@
Porting Templates
-
-
+
+
@@ -330,7 +491,7 @@
-
+
A 2D image processing library from Arm (i.e. Arm-2D) for All Cortex-M processors including Cortex-M0
@@ -345,7 +506,7 @@
-
+
An hardware acceleration from STM32-DMA2D
@@ -359,11 +520,27 @@
-
+
+ An hardware acceleration from SWM341-DMA2D
+
+
+
+
+
+
+/*! \brief enable SWM341 DMA2D */
+#define LV_USE_GPU_SWM341_DMA2D 1
+
+
+
+
+
An hardware acceleration from NXP-PXP
-
-
+
+
+
+
@@ -374,10 +551,16 @@
-
+
An hardware acceleration from NXP-VGLite
-
+
+
+
+
+
+
+
@@ -388,6 +571,22 @@
+
+
+ An hardware acceleration from Renesas RA6M3-G2D
+
+
+
+
+
+
+
+/*! \brief enable RA6M3-G2D */
+#define LV_USE_GPU_RA6M3_G2D 1
+
+
+
+
Extra Themes, Widgets and Layouts
@@ -533,9 +732,26 @@
+
+
+
+ Add Tiny TTF Library
+
+
+
+
+
+
+
+/*! \brief enable Tiny TTF Library */
+#define LV_USE_TINY_TTF 1
+
+
+
+
Add RLOTTIE support, an extra librbary is required.
@@ -547,7 +763,7 @@
/*! \brief enable RLOTTIE support */
-#define LV_USE_RLOTTIE 1
+#define LV_USE_RLOTTIE 1
@@ -562,7 +778,113 @@
/*! \brief enable ffmpeg support */
-#define LV_USE_FFMPEG 1
+#define LV_USE_FFMPEG 1
+
+
+
+
+
+ Add Pinyin input method
+
+
+
+
+
+
+
+/*! \brief enable ffmpeg support */
+#define LV_USE_IME_PINYIN 1
+
+
+
+
+
+ Add the Snapshot service
+
+
+
+
+
+
+
+/*! \brief enable snapshot support */
+#define LV_USE_SNAPSHOT 1
+
+
+
+
+
+ Add the Fragment service
+
+
+
+
+
+
+
+
+/*! \brief enable fragment support */
+#define LV_USE_FRAGMENT 1
+
+
+
+
+
+ Add the Grid Navigation service
+
+
+
+
+
+
+
+/*! \brief enable the Grid Navigation support*/
+#define LV_USE_GRIDNAV 1
+
+
+
+
+
+ Add the Image Font service
+
+
+
+
+
+
+
+/*! \brief enable the image font support*/
+#define LV_USE_IMGFONT 1
+
+
+
+
+
+ Add the Monkey service
+
+
+
+
+
+
+
+/*! \brief enable the monkey service support*/
+#define LV_USE_MONKEY 1
+
+
+
+
+
+ Add the Message service
+
+
+
+
+
+
+
+/*! \brief enable the message service support*/
+#define LV_USE_MSG 1
@@ -579,6 +901,8 @@
+
+
@@ -589,7 +913,7 @@
/*! \brief enable demo:bencharmk */
-#define LV_USE_DEMO_BENCHMARK 1
+#define LV_USE_DEMO_BENCHMARK 1
@@ -609,7 +933,7 @@
/*! \brief enable demo:widgets support */
-#define LV_USE_DEMO_WIDGETS 1
+#define LV_USE_DEMO_WIDGETS 1
diff --git a/lib/lvgl/env_support/cmsis-pack/LVGL.pidx b/lib/lvgl/env_support/cmsis-pack/LVGL.pidx
index f44c619..397510b 100644
--- a/lib/lvgl/env_support/cmsis-pack/LVGL.pidx
+++ b/lib/lvgl/env_support/cmsis-pack/LVGL.pidx
@@ -2,8 +2,8 @@
LVGL
https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/
- 2022-04-13T19:22:00
+ 2024-3-19
-
+
\ No newline at end of file
diff --git a/lib/lvgl/env_support/cmsis-pack/README.md b/lib/lvgl/env_support/cmsis-pack/README.md
index 7d181d4..6a6cf94 100644
--- a/lib/lvgl/env_support/cmsis-pack/README.md
+++ b/lib/lvgl/env_support/cmsis-pack/README.md
@@ -35,7 +35,9 @@ remove the misleading guide above this code segment.
#define LV_CONF_H
#include
-#include "RTE_Components.h"
+#if defined(_RTE_)
+ #include "RTE_Components.h"
+#endif
...
```
@@ -43,10 +45,36 @@ remove the misleading guide above this code segment.
- LV_USE_GPU_STM32_DMA2D
- LV_USE_GPU_NXP_PXP
- LV_USE_GPU_NXP_VG_LITE
-5. Update macro LV_ATTRIBUTE_MEM_ALIGN to force a WORD alignment.
+ - LV_USE_GPU_SWM341_DMA2D
+ - LV_USE_GPU_ARM2D
+ - LV_USE_IME_PINYIN
+ - LV_USE_PNG
+ - LV_USE_BMP
+ - LV_USE_SJPG
+ - LV_USE_GIF
+ - LV_USE_QRCODE
+ - LV_USE_FREETYPE
+ - LV_USE_TINY_TTF
+ - LV_USE_RLOTTIE
+ - LV_USE_FFMPEG
+ - LV_USE_SNAPSHOT
+ - LV_USE_MONKEY
+ - LV_USE_GRIDNAV
+ - LV_USE_FRAGMENT
+ - LV_USE_IMGFONT
+ - LV_USE_MSG
+ - LV_USE_IME_PINYIN
+5. Update macro `LV_ATTRIBUTE_MEM_ALIGN` and `LV_ATTRIBUTE_MEM_ALIGN_SIZE` to force a WORD alignment.
```c
-#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
+#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 4
+#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
```
+Update macro `LV_MEM_SIZE` to `(64*1024U)`.
+
+Update macro `LV_FONT_MONTSERRAT_12` to `1`.
+
+Update macro `LV_FONT_MONTSERRAT_12` to `1`.
+
6. Update Theme related macros:
```c
@@ -84,25 +112,41 @@ remove the misleading guide above this code segment.
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM
extern uint32_t SystemCoreClock;
- #define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
-
- #if __PER_COUNTER_VER__ < 10902ul
- #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((uint32_t)get_system_ticks() / (SystemCoreClock / 1000ul))
- #else
- #define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
- #endif
+ #define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
+ #define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
#endif /*LV_TICK_CUSTOM*/
#else
#define LV_TICK_CUSTOM 0
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
+ /*If using lvgl as ESP32 component*/
+ // #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
+ // #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
#endif /*LV_TICK_CUSTOM*/
#endif /*__PERF_COUNTER__*/
```
-9. Thoroughly remove the `DEMO USAGE` section.
-10. Thoroughly remove the '3rd party libraries' section.
-10. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
+
+
+9. Remove all content in `DEMO USAGE` section but keep the following:
+
+```c
+/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
+#if LV_USE_DEMO_WIDGETS
+ #define LV_DEMO_WIDGETS_SLIDESHOW 0
+#endif
+
+/*Benchmark your system*/
+#if LV_USE_DEMO_BENCHMARK
+/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
+ #define LV_DEMO_BENCHMARK_RGB565A8 1
+#endif
+```
+
+
+
+10. Thoroughly remove the `3rd party libraries` section.
+11. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'.
diff --git a/lib/lvgl/env_support/cmsis-pack/gen_pack.sh b/lib/lvgl/env_support/cmsis-pack/gen_pack.sh
index dedba34..ff17b5e 100644
--- a/lib/lvgl/env_support/cmsis-pack/gen_pack.sh
+++ b/lib/lvgl/env_support/cmsis-pack/gen_pack.sh
@@ -21,8 +21,8 @@ if [ `uname -s` = "Linux" ]
CMSIS_PACK_PATH="/home/$USER/.arm/Packs/ARM/CMSIS/5.7.0/"
PATH_TO_ADD="$CMSIS_PACK_PATH/CMSIS/Utilities/Linux64/"
else
- CMSIS_PACK_PATH="/C/Users/gabriel/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0"
- PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
+ CMSIS_PACK_PATH="/C/Users/$USER/AppData/Local/Arm/Packs/ARM/CMSIS/5.7.0"
+ PATH_TO_ADD="/C/Program Files (x86)/7-Zip/:/C/Program Files/7-Zip/:$CMSIS_PACK_PATH/CMSIS/Utilities/Win32/:/C/xmllint/"
fi
[[ ":$PATH:" != *":$PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
echo $PATH_TO_ADD appended to PATH
diff --git a/lib/lvgl/env_support/cmsis-pack/lv_conf_cmsis.h b/lib/lvgl/env_support/cmsis-pack/lv_conf_cmsis.h
index cd9626e..d078011 100644
--- a/lib/lvgl/env_support/cmsis-pack/lv_conf_cmsis.h
+++ b/lib/lvgl/env_support/cmsis-pack/lv_conf_cmsis.h
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
- * Configuration file for v8.3.0-dev
+ * Configuration file for v8.4.0
*/
/* clang-format off */
@@ -10,7 +10,10 @@
#define LV_CONF_H
#include
-#include "RTE_Components.h"
+
+#if defined(_RTE_)
+ #include "RTE_Components.h"
+#endif
/*====================
COLOR SETTINGS
@@ -22,14 +25,14 @@
/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
#define LV_COLOR_16_SWAP 0
-/*Enable more complex drawing routines to manage screens transparency.
- *Can be used if the UI is above another layer, e.g. an OSD menu or video player.
- *Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to non LV_OPA_COVER value*/
+/*Enable features to draw on transparent background.
+ *It's required if opa, and transform_* style properties are used.
+ *Can be also used if the UI is above another layer, e.g. an OSD menu or video player.*/
#define LV_COLOR_SCREEN_TRANSP 0
/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
* 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
-#define LV_COLOR_MIX_ROUND_OFS (LV_COLOR_DEPTH == 32 ? 0: 128)
+#define LV_COLOR_MIX_ROUND_OFS 0
/*Images pixels with this color will not be drawn if they are chroma keyed)*/
#define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*pure green*/
@@ -42,14 +45,14 @@
#define LV_MEM_CUSTOM 0
#if LV_MEM_CUSTOM == 0
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
- #define LV_MEM_SIZE (48U * 1024U) /*[bytes]*/
+ #define LV_MEM_SIZE (64U * 1024U) /*[bytes]*/
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
#define LV_MEM_ADR 0 /*0: unused*/
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
#if LV_MEM_ADR == 0
- //#define LV_MEM_POOL_INCLUDE your_alloc_library /* Uncomment if using an external allocator*/
- //#define LV_MEM_POOL_ALLOC your_alloc /* Uncomment if using an external allocator*/
+ #undef LV_MEM_POOL_INCLUDE
+ #undef LV_MEM_POOL_ALLOC
#endif
#else /*LV_MEM_CUSTOM*/
@@ -76,28 +79,28 @@
/*Input device read period in milliseconds*/
#define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/
+
/*Use a custom tick source that tells the elapsed time in milliseconds.
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
#ifdef __PERF_COUNTER__
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM
extern uint32_t SystemCoreClock;
- #define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
-
- #if __PER_COUNTER_VER__ < 10902ul
- #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((uint32_t)get_system_ticks() / (SystemCoreClock / 1000ul))
- #else
- #define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
- #endif
+ #define LV_TICK_CUSTOM_INCLUDE "perf_counter.h"
+ #define LV_TICK_CUSTOM_SYS_TIME_EXPR get_system_ms()
#endif /*LV_TICK_CUSTOM*/
#else
#define LV_TICK_CUSTOM 0
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
+ /*If using lvgl as ESP32 component*/
+ // #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
+ // #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
#endif /*LV_TICK_CUSTOM*/
#endif /*__PERF_COUNTER__*/
+
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
*(Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI_DEF 130 /*[px/inch]*/
@@ -127,33 +130,49 @@
#define LV_CIRCLE_CACHE_SIZE 4
#endif /*LV_DRAW_COMPLEX*/
+/**
+ * "Simple layers" are used when a widget has `style_opa < 255` to buffer the widget into a layer
+ * and blend it as an image with the given opacity.
+ * Note that `bg_opa`, `text_opa` etc don't require buffering into layer)
+ * The widget can be buffered in smaller chunks to avoid using large buffers.
+ *
+ * - LV_LAYER_SIMPLE_BUF_SIZE: [bytes] the optimal target buffer size. LVGL will try to allocate it
+ * - LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE: [bytes] used if `LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated.
+ *
+ * Both buffer sizes are in bytes.
+ * "Transformed layers" (where transform_angle/zoom properties are used) use larger buffers
+ * and can't be drawn in chunks. So these settings affects only widgets with opacity.
+ */
+#define LV_LAYER_SIMPLE_BUF_SIZE (24 * 1024)
+#define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024)
+
/*Default image cache size. Image caching keeps the images opened.
*If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)
*With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
*However the opened images might consume additional RAM.
*0: to disable caching*/
-#define LV_IMG_CACHE_DEF_SIZE 0
+#define LV_IMG_CACHE_DEF_SIZE 0
/*Number of stops allowed per gradient. Increase this to allow more stops.
*This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
-#define LV_GRADIENT_MAX_STOPS 2
+#define LV_GRADIENT_MAX_STOPS 2
/*Default gradient buffer size.
*When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
*LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
*If the cache is too small the map will be allocated only while it's required for the drawing.
*0 mean no caching.*/
-#define LV_GRAD_CACHE_DEF_SIZE 0
+#define LV_GRAD_CACHE_DEF_SIZE 0
/*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
*LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
*The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */
-#define LV_DITHER_GRADIENT 0
+#define LV_DITHER_GRADIENT 0
#if LV_DITHER_GRADIENT
/*Add support for error diffusion dithering.
*Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing.
*The increase in memory consumption is (24 bits * object's width)*/
- #define LV_DITHER_ERROR_DIFFUSION 0
+ #define LV_DITHER_ERROR_DIFFUSION 0
#endif
/*Maximum buffer size to allocate for rotation.
@@ -164,13 +183,26 @@
* GPU
*-----------*/
+
/*Use STM32's DMA2D (aka Chrom Art) GPU*/
#if LV_USE_GPU_STM32_DMA2D
/*Must be defined to include path of CMSIS header of target processor
- e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
+ e.g. "stm32f7xx.h" or "stm32f4xx.h"*/
#define LV_GPU_DMA2D_CMSIS_INCLUDE
#endif
+/*Enable RA6M3 G2D GPU*/
+#if LV_USE_GPU_RA6M3_G2D
+ /*include path of target processor
+ e.g. "hal_data.h"*/
+ #define LV_GPU_RA6M3_G2D_INCLUDE "hal_data.h"
+#endif
+
+/*Use SWM341's DMA2D GPU*/
+#if LV_USE_GPU_SWM341_DMA2D
+ #define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h"
+#endif
+
/*Use NXP's PXP GPU iMX RTxxx platforms*/
#if LV_USE_GPU_NXP_PXP
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
@@ -181,18 +213,6 @@
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
#endif
-/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
-
-/*Use SDL renderer API*/
-#define LV_USE_GPU_SDL 0
-#if LV_USE_GPU_SDL
- #define LV_GPU_SDL_INCLUDE_PATH
- /*Texture cache size, 8MB by default*/
- #define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8)
- /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/
- #define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6))
-#endif
-
/*-------------
* Logging
*-----------*/
@@ -298,11 +318,11 @@
#define LV_ATTRIBUTE_FLUSH_READY
/*Required alignment size for buffers*/
-#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
+#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 4
/*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
* E.g. __attribute__((aligned(4)))*/
-#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
+#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4)))
/*Attribute to mark large constant arrays for example font's bitmaps*/
#define LV_ATTRIBUTE_LARGE_CONST
@@ -331,9 +351,9 @@
*https://fonts.google.com/specimen/Montserrat*/
#define LV_FONT_MONTSERRAT_8 0
#define LV_FONT_MONTSERRAT_10 0
-#define LV_FONT_MONTSERRAT_12 0
+#define LV_FONT_MONTSERRAT_12 1
#define LV_FONT_MONTSERRAT_14 1
-#define LV_FONT_MONTSERRAT_16 0
+#define LV_FONT_MONTSERRAT_16 1
#define LV_FONT_MONTSERRAT_18 0
#define LV_FONT_MONTSERRAT_20 0
#define LV_FONT_MONTSERRAT_22 0
@@ -384,6 +404,9 @@
#define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/
#endif
+/*Enable drawing placeholders when glyph dsc is not found*/
+#define LV_USE_FONT_PLACEHOLDER 1
+
/*=================
* TEXT SETTINGS
*=================*/
@@ -438,8 +461,6 @@
#define LV_USE_ARC 1
-#define LV_USE_ANIMIMG 1
-
#define LV_USE_BAR 1
#define LV_USE_BTN 1
@@ -485,6 +506,8 @@
/*-----------
* Widgets
*----------*/
+#define LV_USE_ANIMIMG 1
+
#define LV_USE_CALENDAR 1
#if LV_USE_CALENDAR
#define LV_CALENDAR_WEEK_STARTS_MONDAY 0
@@ -517,6 +540,12 @@
#define LV_USE_MSGBOX 1
+#define LV_USE_SPAN 1
+#if LV_USE_SPAN
+ /*A line text can contain maximum num of span descriptor */
+ #define LV_SPAN_SNIPPET_STACK_SIZE 64
+#endif
+
#define LV_USE_SPINBOX 1
#define LV_USE_SPINNER 1
@@ -527,12 +556,6 @@
#define LV_USE_WIN 1
-#define LV_USE_SPAN 1
-#if LV_USE_SPAN
- /*A line text can contain maximum num of span descriptor */
- #define LV_SPAN_SNIPPET_STACK_SIZE 64
-#endif
-
/*-----------
* Themes
*----------*/
@@ -562,7 +585,6 @@
#define LV_USE_THEME_BASIC 0
#define LV_USE_THEME_MONO 0
#endif
-
/*-----------
* Layouts
*----------*/
@@ -573,27 +595,102 @@
/*A layout similar to Grid in CSS.*/
#define LV_USE_GRID 1
+/*---------------------
+ * 3rd party libraries
+ *--------------------*/
+
+/*File system interfaces for common APIs */
+
+/*API for fopen, fread, etc*/
+#define LV_USE_FS_STDIO 0
+#if LV_USE_FS_STDIO
+ #define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
+ #define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for open, read, etc*/
+#define LV_USE_FS_POSIX 0
+#if LV_USE_FS_POSIX
+ #define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
+ #define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for CreateFile, ReadFile, etc*/
+#define LV_USE_FS_WIN32 0
+#if LV_USE_FS_WIN32
+ #define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
+ #define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/
+#define LV_USE_FS_FATFS 0
+#if LV_USE_FS_FATFS
+ #define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for LittleFS (library needs to be added separately). Uses lfs_file_open, lfs_file_read, etc*/
+#define LV_USE_FS_LITTLEFS 0
+#if LV_USE_FS_LITTLEFS
+ #define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_LITTLEFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+
+
+/*FreeType library*/
+#if LV_USE_FREETYPE
+ /*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
+ #define LV_FREETYPE_CACHE_SIZE (16 * 1024)
+ #if LV_FREETYPE_CACHE_SIZE >= 0
+ /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
+ /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
+ /* if font size >= 256, must be configured as image cache */
+ #define LV_FREETYPE_SBIT_CACHE 0
+ /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
+ /* (0:use system defaults) */
+ #define LV_FREETYPE_CACHE_FT_FACES 0
+ #define LV_FREETYPE_CACHE_FT_SIZES 0
+ #endif
+#endif
+
+/*Tiny TTF library*/
+#if LV_USE_TINY_TTF
+ /*Load TTF data from files*/
+ #define LV_TINY_TTF_FILE_SUPPORT 0
+#endif
+
+
+/*FFmpeg library for image decoding and playing videos
+ *Supports all major image formats so do not enable other image decoder with it*/
+#if LV_USE_FFMPEG
+ /*Dump input information to stderr*/
+ #define LV_FFMPEG_DUMP_FORMAT 0
+#endif
+
/*-----------
* Others
*----------*/
-/*1: Enable API to take snapshot for object*/
-#define LV_USE_SNAPSHOT 0
+/*1: Enable Pinyin input method*/
+/*Requires: lv_keyboard*/
+#if LV_USE_IME_PINYIN
+ /*1: Use default thesaurus*/
+ /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
+ #define LV_IME_PINYIN_USE_DEFAULT_DICT 1
+ /*Set the maximum number of candidate panels that can be displayed*/
+ /*This needs to be adjusted according to the size of the screen*/
+ #define LV_IME_PINYIN_CAND_TEXT_NUM 6
-/*1: Enable Monkey test*/
-#define LV_USE_MONKEY 0
-
-/*1: Enable grid navigation*/
-#define LV_USE_GRIDNAV 0
-
-/*1: Enable lv_obj fragment*/
-#define LV_USE_FRAGMENT 0
-
-/*1: Support using images as font in label or span widgets */
-#define LV_USE_IMGFONT 0
-
-/*1: Enable a published subscriber based messaging system */
-#define LV_USE_MSG 0
+ /*Use 9 key input(k9)*/
+ #define LV_IME_PINYIN_USE_K9_MODE 1
+ #if LV_IME_PINYIN_USE_K9_MODE == 1
+ #define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
+ #endif // LV_IME_PINYIN_USE_K9_MODE
+#endif
/*==================
* EXAMPLES
@@ -602,6 +699,21 @@
/*Enable the examples to be built with the library*/
#define LV_BUILD_EXAMPLES 1
+/*===================
+ * DEMO USAGE
+ ====================*/
+
+/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
+#if LV_USE_DEMO_WIDGETS
+ #define LV_DEMO_WIDGETS_SLIDESHOW 0
+#endif
+
+/*Benchmark your system*/
+#if LV_USE_DEMO_BENCHMARK
+/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
+ #define LV_DEMO_BENCHMARK_RGB565A8 1
+#endif
+
/*--END OF LV_CONF_H--*/
#endif /*LV_CONF_H*/
diff --git a/lib/lvgl/env_support/rt-thread/SConscript b/lib/lvgl/env_support/rt-thread/SConscript
index defae78..378c36f 100644
--- a/lib/lvgl/env_support/rt-thread/SConscript
+++ b/lib/lvgl/env_support/rt-thread/SConscript
@@ -32,7 +32,7 @@ for root, dirs, files in os.walk(lvgl_src_cwd):
inc = inc + [current_path]
-if GetDepend('PKG_USING_LVGL_EXAMPLES'):
+if GetDepend('PKG_LVGL_USING_EXAMPLES'):
lvgl_src_cwd = lvgl_cwd + 'examples/'
inc = inc + [lvgl_src_cwd]
for root, dirs, files in os.walk(lvgl_src_cwd):
@@ -42,7 +42,7 @@ if GetDepend('PKG_USING_LVGL_EXAMPLES'):
if check_h_hpp_exsit(current_path):
inc = inc + [current_path]
-if GetDepend('PKG_USING_LVGL_DEMOS'):
+if GetDepend('PKG_LVGL_USING_DEMOS'):
lvgl_src_cwd = lvgl_cwd + 'demos/'
inc = inc + [lvgl_src_cwd]
for root, dirs, files in os.walk(lvgl_src_cwd):
diff --git a/lib/lvgl/env_support/rt-thread/lv_rt_thread_conf.h b/lib/lvgl/env_support/rt-thread/lv_rt_thread_conf.h
index d18bfb4..c1458be 100644
--- a/lib/lvgl/env_support/rt-thread/lv_rt_thread_conf.h
+++ b/lib/lvgl/env_support/rt-thread/lv_rt_thread_conf.h
@@ -36,20 +36,14 @@
#define LV_TICK_CUSTOM_INCLUDE LV_RTTHREAD_INCLUDE
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (rt_tick_get_millisecond()) /*Expression evaluating to current system time in ms*/
+#ifdef PKG_LVGL_DISP_REFR_PERIOD
+#define LV_DISP_DEF_REFR_PERIOD PKG_LVGL_DISP_REFR_PERIOD
+#endif
+
/*=======================
* FEATURE CONFIGURATION
*=======================*/
-/*-------------
- * Logging
- *-----------*/
-
-#ifdef PKG_LVGL_ENABLE_LOG
-# define LV_USE_LOG 1
-#else
-# define LV_USE_LOG 0
-#endif
-
/*-------------
* Asserts
*-----------*/
@@ -77,13 +71,17 @@
# define LV_BIG_ENDIAN_SYSTEM 0
#endif
-#define LV_ATTRIBUTE_MEM_ALIGN ALIGN(4)
+#ifdef rt_align /* >= RT-Thread v5.0.0 */
+# define LV_ATTRIBUTE_MEM_ALIGN rt_align(RT_ALIGN_SIZE)
+#else
+# define LV_ATTRIBUTE_MEM_ALIGN ALIGN(RT_ALIGN_SIZE)
+#endif
/*==================
* EXAMPLES
*==================*/
-#ifdef PKG_USING_LVGL_EXAMPLES
+#ifdef PKG_LVGL_USING_EXAMPLES
# define LV_BUILD_EXAMPLES 1
#endif
diff --git a/lib/lvgl/env_support/rt-thread/lv_rt_thread_port.c b/lib/lvgl/env_support/rt-thread/lv_rt_thread_port.c
index a438a41..b28ea30 100644
--- a/lib/lvgl/env_support/rt-thread/lv_rt_thread_port.c
+++ b/lib/lvgl/env_support/rt-thread/lv_rt_thread_port.c
@@ -5,40 +5,80 @@
*
* Change Logs:
* Date Author Notes
- * 2021-10-18 Meco Man The first version
+ * 2021-10-18 Meco Man the first version
+ * 2022-05-10 Meco Man improve rt-thread initialization process
*/
#ifdef __RTTHREAD__
+#include
#include
+
#define DBG_TAG "LVGL"
#define DBG_LVL DBG_INFO
#include
-#include
-#include
-#include
+#ifndef PKG_LVGL_THREAD_STACK_SIZE
+#define PKG_LVGL_THREAD_STACK_SIZE 4096
+#endif /* PKG_LVGL_THREAD_STACK_SIZE */
+
+#ifndef PKG_LVGL_THREAD_PRIO
+#define PKG_LVGL_THREAD_PRIO (RT_THREAD_PRIORITY_MAX*2/3)
+#endif /* PKG_LVGL_THREAD_PRIO */
+
+extern void lv_port_disp_init(void);
+extern void lv_port_indev_init(void);
+extern void lv_user_gui_init(void);
+
+static struct rt_thread lvgl_thread;
+
+#ifdef rt_align
+rt_align(RT_ALIGN_SIZE)
+#else
+ALIGN(RT_ALIGN_SIZE)
+#endif
+static rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
#if LV_USE_LOG
static void lv_rt_log(const char *buf)
{
LOG_I(buf);
}
-#endif
+#endif /* LV_USE_LOG */
-static int lv_port_init(void)
+static void lvgl_thread_entry(void *parameter)
{
#if LV_USE_LOG
lv_log_register_print_cb(lv_rt_log);
-#endif
-
+#endif /* LV_USE_LOG */
lv_init();
-
lv_port_disp_init();
lv_port_indev_init();
+ lv_user_gui_init();
+
+ /* handle the tasks of LVGL */
+ while(1)
+ {
+ lv_task_handler();
+ rt_thread_mdelay(LV_DISP_DEF_REFR_PERIOD);
+ }
+}
+
+static int lvgl_thread_init(void)
+{
+ rt_err_t err;
+
+ err = rt_thread_init(&lvgl_thread, "LVGL", lvgl_thread_entry, RT_NULL,
+ &lvgl_thread_stack[0], sizeof(lvgl_thread_stack), PKG_LVGL_THREAD_PRIO, 10);
+ if(err != RT_EOK)
+ {
+ LOG_E("Failed to create LVGL thread");
+ return -1;
+ }
+ rt_thread_startup(&lvgl_thread);
return 0;
}
-INIT_COMPONENT_EXPORT(lv_port_init);
+INIT_ENV_EXPORT(lvgl_thread_init);
#endif /*__RTTHREAD__*/
diff --git a/lib/lvgl/env_support/rt-thread/squareline/README.md b/lib/lvgl/env_support/rt-thread/squareline/README.md
new file mode 100644
index 0000000..e55796b
--- /dev/null
+++ b/lib/lvgl/env_support/rt-thread/squareline/README.md
@@ -0,0 +1,4 @@
+This folder is for LVGL SquareLine Studio
+
+SquareLine Studio can automatically put the generated C files into `ui` folder, so that rt-thread will automatically detect them; or, as a user, you can move the generated C files into `ui` folder manually.
+
diff --git a/lib/lvgl/env_support/rt-thread/squareline/SConscript b/lib/lvgl/env_support/rt-thread/squareline/SConscript
new file mode 100644
index 0000000..2818830
--- /dev/null
+++ b/lib/lvgl/env_support/rt-thread/squareline/SConscript
@@ -0,0 +1,25 @@
+from building import *
+
+cwd = GetCurrentDir()
+src = Glob('*.c')
+inc = [cwd]
+
+# check if .h or .hpp files exsit
+def check_h_hpp_exsit(path):
+ file_dirs = os.listdir(path)
+ for file_dir in file_dirs:
+ if os.path.splitext(file_dir)[1] in ['.h', '.hpp']:
+ return True
+ return False
+
+sls_src_cwd = cwd
+for root, dirs, files in os.walk(sls_src_cwd):
+ for dir in dirs:
+ current_path = os.path.join(root, dir)
+ src = src + Glob(os.path.join(current_path,'*.c')) # add all .c files
+ if check_h_hpp_exsit(current_path): # add .h and .hpp path
+ inc = inc + [current_path]
+
+group = DefineGroup('LVGL-SquareLine', src, depend = ['PKG_USING_LVGL_SQUARELINE'], CPPPATH = inc)
+
+Return('group')
diff --git a/lib/lvgl/env_support/rt-thread/squareline/lv_ui_entry.c b/lib/lvgl/env_support/rt-thread/squareline/lv_ui_entry.c
new file mode 100644
index 0000000..f08e1f5
--- /dev/null
+++ b/lib/lvgl/env_support/rt-thread/squareline/lv_ui_entry.c
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2006-2022, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2022-05-13 Meco Man First version
+ */
+
+#ifdef __RTTHREAD__
+
+void lv_user_gui_init(void)
+{
+ extern void ui_init(void);
+ ui_init();
+}
+
+#endif /* __RTTHREAD__ */
diff --git a/lib/lvgl/env_support/rt-thread/squareline/ui/lvgl/lvgl.h b/lib/lvgl/env_support/rt-thread/squareline/ui/lvgl/lvgl.h
new file mode 100644
index 0000000..f2d518f
--- /dev/null
+++ b/lib/lvgl/env_support/rt-thread/squareline/ui/lvgl/lvgl.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2006-2021, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2022-11-20 Meco Man The first version
+ */
+
+#ifdef __RTTHREAD__
+
+#include "../../../../../lvgl.h" /* back to the root folder's lvgl.h */
+
+#endif /* __RTTHREAD__ */
diff --git a/lib/lvgl/examples/anim/lv_example_anim_1.c b/lib/lvgl/examples/anim/lv_example_anim_1.c
index 6c16a91..d1a93f4 100644
--- a/lib/lvgl/examples/anim/lv_example_anim_1.c
+++ b/lib/lvgl/examples/anim/lv_example_anim_1.c
@@ -43,7 +43,6 @@ void lv_example_anim_1(void)
lv_label_set_text(label, "Hello animations!");
lv_obj_set_pos(label, 100, 10);
-
lv_obj_t * sw = lv_switch_create(lv_scr_act());
lv_obj_center(sw);
lv_obj_add_state(sw, LV_STATE_CHECKED);
diff --git a/lib/lvgl/examples/anim/lv_example_anim_2.c b/lib/lvgl/examples/anim/lv_example_anim_2.c
index d030ed6..989738e 100644
--- a/lib/lvgl/examples/anim/lv_example_anim_2.c
+++ b/lib/lvgl/examples/anim/lv_example_anim_2.c
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
-
static void anim_x_cb(void * var, int32_t v)
{
lv_obj_set_x(var, v);
diff --git a/lib/lvgl/examples/anim/lv_example_anim_3.c b/lib/lvgl/examples/anim/lv_example_anim_3.c
index 4692878..dedcad9 100644
--- a/lib/lvgl/examples/anim/lv_example_anim_3.c
+++ b/lib/lvgl/examples/anim/lv_example_anim_3.c
@@ -1,5 +1,5 @@
#include "../lv_examples.h"
-#if LV_BUILD_EXAMPLES && LV_USE_SLIDER && LV_USE_CHART && LV_USE_BTN
+#if LV_BUILD_EXAMPLES && LV_USE_SLIDER && LV_USE_CHART && LV_USE_BTN && LV_USE_GRID
/**
* the example show the use of cubic-bezier3 in animation.
diff --git a/lib/lvgl/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino b/lib/lvgl/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino
index 7c40ae8..7aeccbb 100644
--- a/lib/lvgl/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino
+++ b/lib/lvgl/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino
@@ -1,19 +1,20 @@
+/*Using LVGL with Arduino requires some extra steps:
+ *Be sure to read the docs here: https://docs.lvgl.io/master/get-started/platforms/arduino.html */
+
#include
#include
-/*If you want to use the LVGL examples,
- make sure to install the lv_examples Arduino library
- and uncomment the following line.
-#include
-*/
-#include
+/*To use the built-in examples and demos of LVGL uncomment the includes below respectively.
+ *You also need to copy `lvgl/examples` to `lvgl/src/examples`. Similarly for the demos `lvgl/demos` to `lvgl/src/demos`.
+ Note that the `lv_examples` library is for LVGL v7 and you shouldn't install it for this version (since LVGL v8)
+ as the examples and demos are now part of the main LVGL library. */
/*Change to your screen resolution*/
static const uint16_t screenWidth = 480;
static const uint16_t screenHeight = 320;
static lv_disp_draw_buf_t draw_buf;
-static lv_color_t buf[ screenWidth * 10 ];
+static lv_color_t buf[ screenWidth * screenHeight / 10 ];
TFT_eSPI tft = TFT_eSPI(screenWidth, screenHeight); /* TFT instance */
@@ -27,7 +28,7 @@ void my_print(const char * buf)
#endif
/* Display flushing */
-void my_disp_flush( lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p )
+void my_disp_flush( lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p )
{
uint32_t w = ( area->x2 - area->x1 + 1 );
uint32_t h = ( area->y2 - area->y1 + 1 );
@@ -37,11 +38,11 @@ void my_disp_flush( lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *colo
tft.pushColors( ( uint16_t * )&color_p->full, w * h, true );
tft.endWrite();
- lv_disp_flush_ready( disp );
+ lv_disp_flush_ready( disp_drv );
}
/*Read the touchpad*/
-void my_touchpad_read( lv_indev_drv_t * indev_driver, lv_indev_data_t * data )
+void my_touchpad_read( lv_indev_drv_t * indev_drv, lv_indev_data_t * data )
{
uint16_t touchX, touchY;
@@ -92,7 +93,7 @@ void setup()
uint16_t calData[5] = { 275, 3620, 264, 3532, 1 };
tft.setTouch( calData );
- lv_disp_draw_buf_init( &draw_buf, buf, NULL, screenWidth * 10 );
+ lv_disp_draw_buf_init( &draw_buf, buf, NULL, screenWidth * screenHeight / 10 );
/*Initialize the display*/
static lv_disp_drv_t disp_drv;
@@ -110,26 +111,25 @@ void setup()
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = my_touchpad_read;
lv_indev_drv_register( &indev_drv );
-
-#if 0
+
/* Create simple label */
lv_obj_t *label = lv_label_create( lv_scr_act() );
- lv_label_set_text( label, LVGL_Arduino.c_str() );
+ lv_label_set_text( label, "Hello Ardino and LVGL!");
lv_obj_align( label, LV_ALIGN_CENTER, 0, 0 );
-#else
- /* Try an example from the lv_examples Arduino library
- make sure to include it as written above.
- lv_example_btn_1();
- */
-
- // uncomment one of these demos
- lv_demo_widgets(); // OK
- // lv_demo_benchmark(); // OK
- // lv_demo_keypad_encoder(); // works, but I haven't an encoder
- // lv_demo_music(); // NOK
+
+ /* Try an example. See all the examples
+ * online: https://docs.lvgl.io/master/examples.html
+ * source codes: https://github.com/lvgl/lvgl/tree/e7f88efa5853128bf871dde335c0ca8da9eb7731/examples */
+ //lv_example_btn_1();
+
+ /*Or try out a demo. Don't forget to enable the demos in lv_conf.h. E.g. LV_USE_DEMOS_WIDGETS*/
+ //lv_demo_widgets();
+ // lv_demo_benchmark();
+ // lv_demo_keypad_encoder();
+ // lv_demo_music();
// lv_demo_printer();
- // lv_demo_stress(); // seems to be OK
-#endif
+ // lv_demo_stress();
+
Serial.println( "Setup done" );
}
diff --git a/lib/lvgl/examples/assets/animimg001.png b/lib/lvgl/examples/assets/animimg001.png
deleted file mode 100644
index 4fcc2c5..0000000
Binary files a/lib/lvgl/examples/assets/animimg001.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/animimg002.png b/lib/lvgl/examples/assets/animimg002.png
deleted file mode 100644
index f469d8a..0000000
Binary files a/lib/lvgl/examples/assets/animimg002.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/animimg003.png b/lib/lvgl/examples/assets/animimg003.png
deleted file mode 100644
index c464ba5..0000000
Binary files a/lib/lvgl/examples/assets/animimg003.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/caret_down.png b/lib/lvgl/examples/assets/caret_down.png
deleted file mode 100644
index 3702846..0000000
Binary files a/lib/lvgl/examples/assets/caret_down.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/emoji/F600.png b/lib/lvgl/examples/assets/emoji/F600.png
deleted file mode 100644
index c31a1f7..0000000
Binary files a/lib/lvgl/examples/assets/emoji/F600.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/emoji/img_emoji_F617.c b/lib/lvgl/examples/assets/emoji/img_emoji_F617.c
index 6977ad1..29fd2fa 100644
--- a/lib/lvgl/examples/assets/emoji/img_emoji_F617.c
+++ b/lib/lvgl/examples/assets/emoji/img_emoji_F617.c
@@ -1,7 +1,7 @@
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
-#include "lvgl/lvgl.h"
+#include "../../../lvgl.h"
#endif
#ifndef LV_ATTRIBUTE_MEM_ALIGN
diff --git a/lib/lvgl/examples/assets/img_caret_down.png b/lib/lvgl/examples/assets/img_caret_down.png
deleted file mode 100644
index 6b33203..0000000
Binary files a/lib/lvgl/examples/assets/img_caret_down.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_cogwheel_argb.png b/lib/lvgl/examples/assets/img_cogwheel_argb.png
deleted file mode 100644
index 9cd0f44..0000000
Binary files a/lib/lvgl/examples/assets/img_cogwheel_argb.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_cogwheel_chroma_keyed.png b/lib/lvgl/examples/assets/img_cogwheel_chroma_keyed.png
deleted file mode 100644
index d184a2f..0000000
Binary files a/lib/lvgl/examples/assets/img_cogwheel_chroma_keyed.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_cogwheel_indexed16.png b/lib/lvgl/examples/assets/img_cogwheel_indexed16.png
deleted file mode 100644
index 85f1f31..0000000
Binary files a/lib/lvgl/examples/assets/img_cogwheel_indexed16.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_cogwheel_rgb.png b/lib/lvgl/examples/assets/img_cogwheel_rgb.png
deleted file mode 100644
index 21337d9..0000000
Binary files a/lib/lvgl/examples/assets/img_cogwheel_rgb.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_hand_hour.png b/lib/lvgl/examples/assets/img_hand_hour.png
deleted file mode 100644
index 1e47ff7..0000000
Binary files a/lib/lvgl/examples/assets/img_hand_hour.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_hand_min.png b/lib/lvgl/examples/assets/img_hand_min.png
deleted file mode 100644
index 4a5118c..0000000
Binary files a/lib/lvgl/examples/assets/img_hand_min.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_skew_strip.png b/lib/lvgl/examples/assets/img_skew_strip.png
deleted file mode 100644
index 1ac4250..0000000
Binary files a/lib/lvgl/examples/assets/img_skew_strip.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_star.png b/lib/lvgl/examples/assets/img_star.png
deleted file mode 100644
index e070d8e..0000000
Binary files a/lib/lvgl/examples/assets/img_star.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/img_strip.png b/lib/lvgl/examples/assets/img_strip.png
deleted file mode 100644
index 1ac4250..0000000
Binary files a/lib/lvgl/examples/assets/img_strip.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/imgbtn_left.png b/lib/lvgl/examples/assets/imgbtn_left.png
deleted file mode 100644
index d42208e..0000000
Binary files a/lib/lvgl/examples/assets/imgbtn_left.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/imgbtn_mid.png b/lib/lvgl/examples/assets/imgbtn_mid.png
deleted file mode 100644
index c2eb495..0000000
Binary files a/lib/lvgl/examples/assets/imgbtn_mid.png and /dev/null differ
diff --git a/lib/lvgl/examples/assets/imgbtn_right.png b/lib/lvgl/examples/assets/imgbtn_right.png
deleted file mode 100644
index 51d6050..0000000
Binary files a/lib/lvgl/examples/assets/imgbtn_right.png and /dev/null differ
diff --git a/lib/lvgl/examples/get_started/lv_example_get_started_3.c b/lib/lvgl/examples/get_started/lv_example_get_started_3.c
index 09a870c..2f6d616 100644
--- a/lib/lvgl/examples/get_started/lv_example_get_started_3.c
+++ b/lib/lvgl/examples/get_started/lv_example_get_started_3.c
@@ -23,7 +23,7 @@ void lv_example_get_started_3(void)
lv_obj_center(slider); /*Align to the center of the parent (screen)*/
lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); /*Assign an event function*/
- /*Create a label below the slider*/
+ /*Create a label above the slider*/
label = lv_label_create(lv_scr_act());
lv_label_set_text(label, "0");
lv_obj_align_to(label, slider, LV_ALIGN_OUT_TOP_MID, 0, -15); /*Align top of the slider*/
diff --git a/lib/lvgl/examples/get_started/lv_example_get_started_3.py b/lib/lvgl/examples/get_started/lv_example_get_started_3.py
index e6d2c71..b41a1c0 100644
--- a/lib/lvgl/examples/get_started/lv_example_get_started_3.py
+++ b/lib/lvgl/examples/get_started/lv_example_get_started_3.py
@@ -14,7 +14,7 @@ slider.set_width(200) # Set the wid
slider.center() # Align to the center of the parent (screen)
slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) # Assign an event function
-# Create a label below the slider
+# Create a label above the slider
label = lv.label(lv.scr_act())
label.set_text("0")
label.align_to(slider, lv.ALIGN.OUT_TOP_MID, 0, -15) # Align below the slider
diff --git a/lib/lvgl/examples/layouts/flex/lv_example_flex_1.c b/lib/lvgl/examples/layouts/flex/lv_example_flex_1.c
index 6363d37..94cfe25 100644
--- a/lib/lvgl/examples/layouts/flex/lv_example_flex_1.c
+++ b/lib/lvgl/examples/layouts/flex/lv_example_flex_1.c
@@ -28,7 +28,7 @@ void lv_example_flex_1(void)
lv_obj_set_size(obj, 100, LV_PCT(100));
label = lv_label_create(obj);
- lv_label_set_text_fmt(label, "Item: %u", i);
+ lv_label_set_text_fmt(label, "Item: %"LV_PRIu32, i);
lv_obj_center(label);
/*Add items to the column*/
diff --git a/lib/lvgl/examples/layouts/grid/lv_example_grid_2.c b/lib/lvgl/examples/layouts/grid/lv_example_grid_2.c
index f992c57..2969383 100644
--- a/lib/lvgl/examples/layouts/grid/lv_example_grid_2.c
+++ b/lib/lvgl/examples/layouts/grid/lv_example_grid_2.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_GRID && LV_BUILD_EXAMPLES
-
/**
* Demonstrate cell placement and span
*/
diff --git a/lib/lvgl/examples/layouts/grid/lv_example_grid_4.c b/lib/lvgl/examples/layouts/grid/lv_example_grid_4.c
index 5141477..1354577 100644
--- a/lib/lvgl/examples/layouts/grid/lv_example_grid_4.c
+++ b/lib/lvgl/examples/layouts/grid/lv_example_grid_4.c
@@ -9,7 +9,6 @@ void lv_example_grid_4(void)
static lv_coord_t col_dsc[] = {60, 60, 60, LV_GRID_TEMPLATE_LAST};
static lv_coord_t row_dsc[] = {45, 45, 45, LV_GRID_TEMPLATE_LAST};
-
/*Add space between the columns and move the rows to the bottom (end)*/
/*Create a container with grid*/
diff --git a/lib/lvgl/examples/libs/ffmpeg/birds.mp4 b/lib/lvgl/examples/libs/ffmpeg/birds.mp4
deleted file mode 100644
index df1f19c..0000000
Binary files a/lib/lvgl/examples/libs/ffmpeg/birds.mp4 and /dev/null differ
diff --git a/lib/lvgl/examples/libs/ffmpeg/ffmpeg.png b/lib/lvgl/examples/libs/ffmpeg/ffmpeg.png
deleted file mode 100644
index 76360b9..0000000
Binary files a/lib/lvgl/examples/libs/ffmpeg/ffmpeg.png and /dev/null differ
diff --git a/lib/lvgl/examples/libs/ffmpeg/lv_example_ffmpeg_1.c b/lib/lvgl/examples/libs/ffmpeg/lv_example_ffmpeg_1.c
index 5815985..a48c68b 100644
--- a/lib/lvgl/examples/libs/ffmpeg/lv_example_ffmpeg_1.c
+++ b/lib/lvgl/examples/libs/ffmpeg/lv_example_ffmpeg_1.c
@@ -2,7 +2,6 @@
#if LV_BUILD_EXAMPLES
#if LV_USE_FFMPEG
-
/**
* Open an image from a file
*/
diff --git a/lib/lvgl/examples/libs/freetype/Lato-Regular.ttf b/lib/lvgl/examples/libs/freetype/Lato-Regular.ttf
new file mode 100644
index 0000000..04ea8ef
Binary files /dev/null and b/lib/lvgl/examples/libs/freetype/Lato-Regular.ttf differ
diff --git a/lib/lvgl/examples/libs/freetype/arial.ttf b/lib/lvgl/examples/libs/freetype/arial.ttf
deleted file mode 100644
index 886789b..0000000
Binary files a/lib/lvgl/examples/libs/freetype/arial.ttf and /dev/null differ
diff --git a/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.c b/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.c
index 6feb244..0b2b6cb 100644
--- a/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.c
+++ b/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.c
@@ -10,7 +10,7 @@ void lv_example_freetype_1(void)
/*Create a font*/
static lv_ft_info_t info;
/*FreeType uses C standard file system, so no driver letter is required.*/
- info.name = "./lvgl/examples/libs/freetype/arial.ttf";
+ info.name = "./lvgl/examples/libs/freetype/Lato-Regular.ttf";
info.weight = 24;
info.style = FT_FONT_STYLE_NORMAL;
info.mem = NULL;
diff --git a/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.py b/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.py
index 15d59a4..84085ca 100644
--- a/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.py
+++ b/lib/lvgl/examples/libs/freetype/lv_example_freetype_1.py
@@ -4,7 +4,7 @@ import display_driver
import fs_driver
info = lv.ft_info_t()
-info.name ="./arial.ttf"
+info.name ="./Lato-Regular.ttf"
info.weight = 24
info.style = lv.FT_FONT_STYLE.NORMAL
info.font_init()
diff --git a/lib/lvgl/examples/libs/gif/bulb.gif b/lib/lvgl/examples/libs/gif/bulb.gif
deleted file mode 100644
index 04f10d0..0000000
Binary files a/lib/lvgl/examples/libs/gif/bulb.gif and /dev/null differ
diff --git a/lib/lvgl/examples/libs/gif/img_bulb_gif.c b/lib/lvgl/examples/libs/gif/img_bulb_gif.c
index ec21413..9168275 100644
--- a/lib/lvgl/examples/libs/gif/img_bulb_gif.c
+++ b/lib/lvgl/examples/libs/gif/img_bulb_gif.c
@@ -1,6 +1,5 @@
#include "../../../lvgl.h"
-
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
diff --git a/lib/lvgl/examples/libs/png/img_wink_png.c b/lib/lvgl/examples/libs/png/img_wink_png.c
index bec3ed6..b911b2b 100644
--- a/lib/lvgl/examples/libs/png/img_wink_png.c
+++ b/lib/lvgl/examples/libs/png/img_wink_png.c
@@ -1,7 +1,6 @@
#include "../../../lvgl.h"
#if LV_USE_PNG && LV_BUILD_EXAMPLES
-
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
diff --git a/lib/lvgl/examples/libs/png/wink.png b/lib/lvgl/examples/libs/png/wink.png
deleted file mode 100644
index a161d5c..0000000
Binary files a/lib/lvgl/examples/libs/png/wink.png and /dev/null differ
diff --git a/lib/lvgl/examples/lv_examples.mk b/lib/lvgl/examples/lv_examples.mk
index b8fa7eb..2586e33 100644
--- a/lib/lvgl/examples/lv_examples.mk
+++ b/lib/lvgl/examples/lv_examples.mk
@@ -1 +1 @@
-CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name \*.c)
+CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name "*.c")
diff --git a/lib/lvgl/examples/others/fragment/lv_example_fragment_1.c b/lib/lvgl/examples/others/fragment/lv_example_fragment_1.c
index 8be8749..4f038af 100644
--- a/lib/lvgl/examples/others/fragment/lv_example_fragment_1.c
+++ b/lib/lvgl/examples/others/fragment/lv_example_fragment_1.c
@@ -10,6 +10,8 @@ static void sample_fragment_ctor(lv_fragment_t * self, void * args);
static lv_obj_t * sample_fragment_create_obj(lv_fragment_t * self, lv_obj_t * parent);
+static void sample_container_del(lv_event_t * e);
+
static lv_obj_t * root = NULL;
struct sample_fragment_t {
@@ -21,18 +23,20 @@ static const lv_fragment_class_t sample_cls = {
.constructor_cb = sample_fragment_ctor,
.create_obj_cb = sample_fragment_create_obj,
.instance_size = sizeof(struct sample_fragment_t)
-};
+ };
void lv_example_fragment_1(void)
{
root = lv_obj_create(lv_scr_act());
lv_obj_set_size(root, LV_PCT(100), LV_PCT(100));
lv_fragment_manager_t * manager = lv_fragment_manager_create(NULL);
+ /* Clean up the fragment manager before objects in containers got deleted */
+ lv_obj_add_event_cb(root, sample_container_del, LV_EVENT_DELETE, manager);
+
lv_fragment_t * fragment = lv_fragment_create(&sample_cls, "Fragment");
lv_fragment_manager_replace(manager, fragment, &root);
}
-
static void sample_fragment_ctor(lv_fragment_t * self, void * args)
{
((struct sample_fragment_t *) self)->name = args;
@@ -46,4 +50,10 @@ static lv_obj_t * sample_fragment_create_obj(lv_fragment_t * self, lv_obj_t * pa
return label;
}
+static void sample_container_del(lv_event_t * e)
+{
+ lv_fragment_manager_t * manager = (lv_fragment_manager_t *) lv_event_get_user_data(e);
+ lv_fragment_manager_del(manager);
+}
+
#endif
diff --git a/lib/lvgl/examples/others/fragment/lv_example_fragment_2.c b/lib/lvgl/examples/others/fragment/lv_example_fragment_2.c
index 648350a..02cc9be 100644
--- a/lib/lvgl/examples/others/fragment/lv_example_fragment_2.c
+++ b/lib/lvgl/examples/others/fragment/lv_example_fragment_2.c
@@ -14,6 +14,8 @@ static void sample_push_click(lv_event_t * e);
static void sample_pop_click(lv_event_t * e);
+static void sample_container_del(lv_event_t * e);
+
static void sample_fragment_inc_click(lv_event_t * e);
typedef struct sample_fragment_t {
@@ -54,6 +56,9 @@ void lv_example_fragment_2(void)
lv_obj_set_grid_cell(pop_btn, LV_GRID_ALIGN_END, 1, 1, LV_GRID_ALIGN_CENTER, 1, 1);
lv_fragment_manager_t * manager = lv_fragment_manager_create(NULL);
+ /* Clean up the fragment manager before objects in containers got deleted */
+ lv_obj_add_event_cb(root, sample_container_del, LV_EVENT_DELETE, manager);
+
int depth = 0;
lv_fragment_t * fragment = lv_fragment_create(&sample_cls, &depth);
lv_fragment_manager_push(manager, fragment, &container);
@@ -61,7 +66,6 @@ void lv_example_fragment_2(void)
lv_obj_add_event_cb(pop_btn, sample_pop_click, LV_EVENT_CLICKED, manager);
}
-
static void sample_fragment_ctor(lv_fragment_t * self, void * args)
{
LV_UNUSED(args);
@@ -106,6 +110,12 @@ static void sample_pop_click(lv_event_t * e)
lv_fragment_manager_pop(manager);
}
+static void sample_container_del(lv_event_t * e)
+{
+ lv_fragment_manager_t * manager = (lv_fragment_manager_t *) lv_event_get_user_data(e);
+ lv_fragment_manager_del(manager);
+}
+
static void sample_fragment_inc_click(lv_event_t * e)
{
sample_fragment_t * fragment = (sample_fragment_t *) lv_event_get_user_data(e);
diff --git a/lib/lvgl/examples/others/gridnav/lv_example_gridnav_2.c b/lib/lvgl/examples/others/gridnav/lv_example_gridnav_2.c
index b757187..ed53f9f 100644
--- a/lib/lvgl/examples/others/gridnav/lv_example_gridnav_2.c
+++ b/lib/lvgl/examples/others/gridnav/lv_example_gridnav_2.c
@@ -16,7 +16,6 @@ void lv_example_gridnav_2(void)
lv_obj_set_style_bg_color(list1, lv_palette_lighten(LV_PALETTE_BLUE, 5), LV_STATE_FOCUSED);
lv_group_add_obj(lv_group_get_default(), list1);
-
char buf[32];
uint32_t i;
for(i = 0; i < 15; i++) {
diff --git a/lib/lvgl/examples/others/gridnav/lv_example_gridnav_3.c b/lib/lvgl/examples/others/gridnav/lv_example_gridnav_3.c
index 071f28a..ade81cc 100644
--- a/lib/lvgl/examples/others/gridnav/lv_example_gridnav_3.c
+++ b/lib/lvgl/examples/others/gridnav/lv_example_gridnav_3.c
@@ -46,7 +46,6 @@ void lv_example_gridnav_3(void)
label = lv_label_create(btn);
lv_label_set_text(label, "Button 2");
-
/*Create an other container with long text to show how LV_GRIDNAV_CTRL_SCROLL_FIRST works*/
lv_obj_t * cont_sub1 = lv_obj_create(cont_main);
lv_obj_set_size(cont_sub1, lv_pct(100), 100);
@@ -93,9 +92,6 @@ void lv_example_gridnav_3(void)
label = lv_label_create(btn);
lv_label_set_text(label, "Button 4");
-
-
-
}
#endif
diff --git a/lib/lvgl/examples/others/gridnav/lv_example_gridnav_4.c b/lib/lvgl/examples/others/gridnav/lv_example_gridnav_4.c
index 42f1314..9cf261b 100644
--- a/lib/lvgl/examples/others/gridnav/lv_example_gridnav_4.c
+++ b/lib/lvgl/examples/others/gridnav/lv_example_gridnav_4.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_GRIDNAV && LV_USE_FLEX && LV_BUILD_EXAMPLES
-
static void event_handler(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
diff --git a/lib/lvgl/examples/others/ime/index.rst b/lib/lvgl/examples/others/ime/index.rst
new file mode 100644
index 0000000..e7cc1fb
--- /dev/null
+++ b/lib/lvgl/examples/others/ime/index.rst
@@ -0,0 +1,12 @@
+
+Pinyin IME 26 key input
+"""""""""""""""""""""""""
+
+.. lv_example:: others/ime/lv_example_ime_pinyin_1
+ :language: c
+
+Pinyin IME 9 key input
+"""""""""""""""""""""""""
+
+.. lv_example:: others/ime/lv_example_ime_pinyin_2
+ :language: c
diff --git a/lib/lvgl/tests/src/lv_test_conf.h b/lib/lvgl/examples/others/ime/lv_example_ime_pinyin.h
similarity index 62%
rename from lib/lvgl/tests/src/lv_test_conf.h
rename to lib/lvgl/examples/others/ime/lv_example_ime_pinyin.h
index 7d28ef6..96991e3 100644
--- a/lib/lvgl/tests/src/lv_test_conf.h
+++ b/lib/lvgl/examples/others/ime/lv_example_ime_pinyin.h
@@ -1,12 +1,10 @@
/**
- * @file lv_test_conf.h
+ * @file lv_example_ime_pinyin.h
*
*/
-#ifndef LV_TEST_CONF_H
-#define LV_TEST_CONF_H
-
-#define LV_CONF_SUPPRESS_DEFINE_CHECK 1
+#ifndef LV_EX_IME_PINYIN_H
+#define LV_EX_IME_PINYIN_H
#ifdef __cplusplus
extern "C" {
@@ -24,14 +22,11 @@ extern "C" {
* TYPEDEFS
**********************/
-uint32_t custom_tick_get(void);
-#define LV_TICK_CUSTOM_SYS_TIME_EXPR custom_tick_get()
-
-typedef void * lv_user_data_t;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
+void lv_example_ime_pinyin_1(void);
+void lv_example_ime_pinyin_2(void);
/**********************
* MACROS
@@ -41,4 +36,4 @@ typedef void * lv_user_data_t;
} /*extern "C"*/
#endif
-#endif /*LV_TEST_CONF_H*/
+#endif /*LV_EX_IME_PINYIN_H*/
diff --git a/lib/lvgl/examples/others/ime/lv_example_ime_pinyin_1.c b/lib/lvgl/examples/others/ime/lv_example_ime_pinyin_1.c
new file mode 100644
index 0000000..b609ee6
--- /dev/null
+++ b/lib/lvgl/examples/others/ime/lv_example_ime_pinyin_1.c
@@ -0,0 +1,56 @@
+#include "../../lv_examples.h"
+#if LV_USE_LABEL && LV_USE_TEXTAREA && LV_FONT_SIMSUN_16_CJK && LV_USE_IME_PINYIN && LV_BUILD_EXAMPLES
+
+static void ta_event_cb(lv_event_t * e)
+{
+ lv_event_code_t code = lv_event_get_code(e);
+ lv_obj_t * ta = lv_event_get_target(e);
+ lv_obj_t * kb = lv_event_get_user_data(e);
+
+ if(code == LV_EVENT_FOCUSED) {
+ if(lv_indev_get_type(lv_indev_get_act()) != LV_INDEV_TYPE_KEYPAD) {
+ lv_keyboard_set_textarea(kb, ta);
+ lv_obj_clear_flag(kb, LV_OBJ_FLAG_HIDDEN);
+ }
+ }
+ else if(code == LV_EVENT_CANCEL) {
+ lv_obj_add_flag(kb, LV_OBJ_FLAG_HIDDEN);
+ lv_obj_clear_state(ta, LV_STATE_FOCUSED);
+ lv_indev_reset(NULL, ta); /*To forget the last clicked object to make it focusable again*/
+ }
+}
+
+void lv_example_ime_pinyin_1(void)
+{
+ lv_obj_t * pinyin_ime = lv_ime_pinyin_create(lv_scr_act());
+ lv_obj_set_style_text_font(pinyin_ime, &lv_font_simsun_16_cjk, 0);
+ //lv_ime_pinyin_set_dict(pinyin_ime, your_dict); // Use a custom dictionary. If it is not set, the built-in dictionary will be used.
+
+ /* ta1 */
+ lv_obj_t * ta1 = lv_textarea_create(lv_scr_act());
+ lv_textarea_set_one_line(ta1, true);
+ lv_obj_set_style_text_font(ta1, &lv_font_simsun_16_cjk, 0);
+ lv_obj_align(ta1, LV_ALIGN_TOP_LEFT, 0, 0);
+
+ /*Create a keyboard and add it to ime_pinyin*/
+ lv_obj_t * kb = lv_keyboard_create(lv_scr_act());
+ lv_ime_pinyin_set_keyboard(pinyin_ime, kb);
+ lv_keyboard_set_textarea(kb, ta1);
+
+ lv_obj_add_event_cb(ta1, ta_event_cb, LV_EVENT_ALL, kb);
+
+ /*Get the cand_panel, and adjust its size and position*/
+ lv_obj_t * cand_panel = lv_ime_pinyin_get_cand_panel(pinyin_ime);
+ lv_obj_set_size(cand_panel, LV_PCT(100), LV_PCT(10));
+ lv_obj_align_to(cand_panel, kb, LV_ALIGN_OUT_TOP_MID, 0, 0);
+
+ /*Try using ime_pinyin to output the Chinese below in the ta1 above*/
+ lv_obj_t * cz_label = lv_label_create(lv_scr_act());
+ lv_label_set_text(cz_label,
+ "嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。");
+ lv_obj_set_style_text_font(cz_label, &lv_font_simsun_16_cjk, 0);
+ lv_obj_set_width(cz_label, 310);
+ lv_obj_align_to(cz_label, ta1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
+}
+
+#endif
diff --git a/lib/lvgl/examples/others/ime/lv_example_ime_pinyin_2.c b/lib/lvgl/examples/others/ime/lv_example_ime_pinyin_2.c
new file mode 100644
index 0000000..af5a058
--- /dev/null
+++ b/lib/lvgl/examples/others/ime/lv_example_ime_pinyin_2.c
@@ -0,0 +1,58 @@
+#include "../../lv_examples.h"
+#if LV_USE_LABEL && LV_USE_TEXTAREA && LV_FONT_SIMSUN_16_CJK && LV_USE_IME_PINYIN && LV_IME_PINYIN_USE_K9_MODE && LV_BUILD_EXAMPLES
+
+static void ta_event_cb(lv_event_t * e)
+{
+ lv_event_code_t code = lv_event_get_code(e);
+ lv_obj_t * ta = lv_event_get_target(e);
+ lv_obj_t * kb = lv_event_get_user_data(e);
+
+ if(code == LV_EVENT_FOCUSED) {
+ if(lv_indev_get_type(lv_indev_get_act()) != LV_INDEV_TYPE_KEYPAD) {
+ lv_keyboard_set_textarea(kb, ta);
+ lv_obj_clear_flag(kb, LV_OBJ_FLAG_HIDDEN);
+ }
+ }
+ else if(code == LV_EVENT_READY) {
+ lv_obj_add_flag(kb, LV_OBJ_FLAG_HIDDEN);
+ lv_obj_clear_state(ta, LV_STATE_FOCUSED);
+ lv_indev_reset(NULL, ta); /*To forget the last clicked object to make it focusable again*/
+ }
+}
+
+void lv_example_ime_pinyin_2(void)
+{
+ lv_obj_t * pinyin_ime = lv_ime_pinyin_create(lv_scr_act());
+ lv_obj_set_style_text_font(pinyin_ime, &lv_font_simsun_16_cjk, 0);
+ //lv_ime_pinyin_set_dict(pinyin_ime, your_dict); // Use a custom dictionary. If it is not set, the built-in dictionary will be used.
+
+ /* ta1 */
+ lv_obj_t * ta1 = lv_textarea_create(lv_scr_act());
+ lv_textarea_set_one_line(ta1, true);
+ lv_obj_set_style_text_font(ta1, &lv_font_simsun_16_cjk, 0);
+ lv_obj_align(ta1, LV_ALIGN_TOP_LEFT, 0, 0);
+
+ /*Create a keyboard and add it to ime_pinyin*/
+ lv_obj_t * kb = lv_keyboard_create(lv_scr_act());
+ lv_keyboard_set_textarea(kb, ta1);
+
+ lv_ime_pinyin_set_keyboard(pinyin_ime, kb);
+ lv_ime_pinyin_set_mode(pinyin_ime,
+ LV_IME_PINYIN_MODE_K9); // Set to 9-key input mode. Default: 26-key input(k26) mode.
+ lv_obj_add_event_cb(ta1, ta_event_cb, LV_EVENT_ALL, kb);
+
+ /*Get the cand_panel, and adjust its size and position*/
+ lv_obj_t * cand_panel = lv_ime_pinyin_get_cand_panel(pinyin_ime);
+ lv_obj_set_size(cand_panel, LV_PCT(100), LV_PCT(10));
+ lv_obj_align_to(cand_panel, kb, LV_ALIGN_OUT_TOP_MID, 0, 0);
+
+ /*Try using ime_pinyin to output the Chinese below in the ta1 above*/
+ lv_obj_t * cz_label = lv_label_create(lv_scr_act());
+ lv_label_set_text(cz_label,
+ "嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。");
+ lv_obj_set_style_text_font(cz_label, &lv_font_simsun_16_cjk, 0);
+ lv_obj_set_width(cz_label, 310);
+ lv_obj_align_to(cz_label, ta1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
+}
+
+#endif
diff --git a/lib/lvgl/examples/others/lv_example_others.h b/lib/lvgl/examples/others/lv_example_others.h
index eeb9739..4b27194 100644
--- a/lib/lvgl/examples/others/lv_example_others.h
+++ b/lib/lvgl/examples/others/lv_example_others.h
@@ -19,6 +19,7 @@ extern "C" {
#include "fragment/lv_example_fragment.h"
#include "imgfont/lv_example_imgfont.h"
#include "msg/lv_example_msg.h"
+#include "ime/lv_example_ime_pinyin.h"
/*********************
* DEFINES
diff --git a/lib/lvgl/examples/others/msg/lv_example_msg_3.c b/lib/lvgl/examples/others/msg/lv_example_msg_3.c
index dddb4a8..4fb32e1 100644
--- a/lib/lvgl/examples/others/msg/lv_example_msg_3.c
+++ b/lib/lvgl/examples/others/msg/lv_example_msg_3.c
@@ -69,13 +69,11 @@ void lv_example_msg_3(void)
lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_ALL, NULL);
lv_msg_subsribe_obj(MSG_UPDATE, slider, NULL);
-
/* As there are new UI elements that don't know the system's state
* send an UPDATE REQUEST message which will trigger an UPDATE message with the current value*/
lv_msg_send(MSG_UPDATE_REQUEST, NULL);
}
-
static void value_handler(void * s, lv_msg_t * m)
{
LV_UNUSED(s);
@@ -106,7 +104,6 @@ static void value_handler(void * s, lv_msg_t * m)
}
}
-
static void btn_event_cb(lv_event_t * e)
{
lv_obj_t * btn = lv_event_get_target(e);
diff --git a/lib/lvgl/examples/porting/lv_port_disp_template.c b/lib/lvgl/examples/porting/lv_port_disp_template.c
index ab148d6..2197c2c 100644
--- a/lib/lvgl/examples/porting/lv_port_disp_template.c
+++ b/lib/lvgl/examples/porting/lv_port_disp_template.c
@@ -10,11 +10,20 @@
* INCLUDES
*********************/
#include "lv_port_disp_template.h"
-#include "../../lvgl.h"
+#include
/*********************
* DEFINES
*********************/
+#ifndef MY_DISP_HOR_RES
+ #warning Please define or replace the macro MY_DISP_HOR_RES with the actual screen width, default value 320 is used for now.
+ #define MY_DISP_HOR_RES 320
+#endif
+
+#ifndef MY_DISP_VER_RES
+ #warning Please define or replace the macro MY_DISP_HOR_RES with the actual screen height, default value 240 is used for now.
+ #define MY_DISP_VER_RES 240
+#endif
/**********************
* TYPEDEFS
@@ -101,8 +110,8 @@ void lv_port_disp_init(void)
/*Set up the functions to access to your display*/
/*Set the resolution of the display*/
- disp_drv.hor_res = 480;
- disp_drv.ver_res = 320;
+ disp_drv.hor_res = MY_DISP_HOR_RES;
+ disp_drv.ver_res = MY_DISP_VER_RES;
/*Used to copy the buffer's content to the display*/
disp_drv.flush_cb = disp_flush;
@@ -111,7 +120,7 @@ void lv_port_disp_init(void)
disp_drv.draw_buf = &draw_buf_dsc_1;
/*Required for Example 3)*/
- //disp_drv.full_refresh = 1
+ //disp_drv.full_refresh = 1;
/* Fill a memory array with a color if you have GPU.
* Note that, in lv_conf.h you can enable GPUs that has built-in support in LVGL.
@@ -132,20 +141,38 @@ static void disp_init(void)
/*You code here*/
}
+volatile bool disp_flush_enabled = true;
+
+/* Enable updating the screen (the flushing process) when disp_flush() is called by LVGL
+ */
+void disp_enable_update(void)
+{
+ disp_flush_enabled = true;
+}
+
+/* Disable updating the screen (the flushing process) when disp_flush() is called by LVGL
+ */
+void disp_disable_update(void)
+{
+ disp_flush_enabled = false;
+}
+
/*Flush the content of the internal buffer the specific area on the display
*You can use DMA or any hardware acceleration to do this operation in the background but
*'lv_disp_flush_ready()' has to be called when finished.*/
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
{
- /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
+ if(disp_flush_enabled) {
+ /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
- int32_t x;
- int32_t y;
- for(y = area->y1; y <= area->y2; y++) {
- for(x = area->x1; x <= area->x2; x++) {
- /*Put a pixel to the display. For example:*/
- /*put_px(x, y, *color_p)*/
- color_p++;
+ int32_t x;
+ int32_t y;
+ for(y = area->y1; y <= area->y2; y++) {
+ for(x = area->x1; x <= area->x2; x++) {
+ /*Put a pixel to the display. For example:*/
+ /*put_px(x, y, *color_p)*/
+ color_p++;
+ }
}
}
@@ -172,7 +199,6 @@ static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_colo
// }
//}
-
#else /*Enable this file at the top*/
/*This dummy typedef exists purely to silence -Wpedantic.*/
diff --git a/lib/lvgl/examples/porting/lv_port_disp_template.h b/lib/lvgl/examples/porting/lv_port_disp_template.h
index 384bab4..b3328d5 100644
--- a/lib/lvgl/examples/porting/lv_port_disp_template.h
+++ b/lib/lvgl/examples/porting/lv_port_disp_template.h
@@ -16,7 +16,11 @@ extern "C" {
/*********************
* INCLUDES
*********************/
+#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
+#include "lvgl.h"
+#else
#include "lvgl/lvgl.h"
+#endif
/*********************
* DEFINES
@@ -29,8 +33,17 @@ extern "C" {
/**********************
* GLOBAL PROTOTYPES
**********************/
+/* Initialize low level display driver */
void lv_port_disp_init(void);
+/* Enable updating the screen (the flushing process) when disp_flush() is called by LVGL
+ */
+void disp_enable_update(void);
+
+/* Disable updating the screen (the flushing process) when disp_flush() is called by LVGL
+ */
+void disp_disable_update(void);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/examples/scroll/lv_example_scroll.h b/lib/lvgl/examples/scroll/lv_example_scroll.h
index dc38bef..f6443b4 100644
--- a/lib/lvgl/examples/scroll/lv_example_scroll.h
+++ b/lib/lvgl/examples/scroll/lv_example_scroll.h
@@ -32,7 +32,6 @@ void lv_example_scroll_4(void);
void lv_example_scroll_5(void);
void lv_example_scroll_6(void);
-
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/examples/scroll/lv_example_scroll_4.c b/lib/lvgl/examples/scroll/lv_example_scroll_4.c
index 5bbff5c..e147f15 100644
--- a/lib/lvgl/examples/scroll/lv_example_scroll_4.c
+++ b/lib/lvgl/examples/scroll/lv_example_scroll_4.c
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_LIST
-
/**
* Styling the scrollbars
*/
@@ -28,7 +27,6 @@ void lv_example_scroll_4(void)
"Fusce molestie rhoncus nisi sit amet tincidunt. \n"
"Suspendisse a nunc ut magna ornare volutpat.");
-
/*Remove the style of scrollbar to have clean start*/
lv_obj_remove_style(obj, NULL, LV_PART_SCROLLBAR | LV_STATE_ANY);
diff --git a/lib/lvgl/examples/scroll/lv_example_scroll_5.c b/lib/lvgl/examples/scroll/lv_example_scroll_5.c
index 60e65ff..d970c57 100644
--- a/lib/lvgl/examples/scroll/lv_example_scroll_5.c
+++ b/lib/lvgl/examples/scroll/lv_example_scroll_5.c
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_FONT_DEJAVU_16_PERSIAN_HEBREW
-
/**
* Scrolling with Right To Left base direction
*/
diff --git a/lib/lvgl/examples/styles/index.rst b/lib/lvgl/examples/styles/index.rst
index 52c2b8f..a76ff1e 100644
--- a/lib/lvgl/examples/styles/index.rst
+++ b/lib/lvgl/examples/styles/index.rst
@@ -89,3 +89,10 @@ Extending the current theme
:language: c
+Opacity and Transformations
+""""""""""""""""""""""""""""""""""
+
+.. lv_example:: styles/lv_example_style_15
+ :language: c
+
+
diff --git a/lib/lvgl/examples/styles/lv_example_style.h b/lib/lvgl/examples/styles/lv_example_style.h
index 40d106b..680443c 100644
--- a/lib/lvgl/examples/styles/lv_example_style.h
+++ b/lib/lvgl/examples/styles/lv_example_style.h
@@ -39,6 +39,7 @@ void lv_example_style_11(void);
void lv_example_style_12(void);
void lv_example_style_13(void);
void lv_example_style_14(void);
+void lv_example_style_15(void);
/**********************
* MACROS
diff --git a/lib/lvgl/examples/styles/lv_example_style_14.c b/lib/lvgl/examples/styles/lv_example_style_14.c
index cdb2086..5ef7ea9 100644
--- a/lib/lvgl/examples/styles/lv_example_style_14.c
+++ b/lib/lvgl/examples/styles/lv_example_style_14.c
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_IMG
-
static lv_style_t style_btn;
/*Will be called when the styles of the base theme are already added
@@ -36,8 +35,6 @@ static void new_theme_init_and_set(void)
lv_disp_set_theme(NULL, &th_new);
}
-
-
/**
* Extending the current theme
*/
diff --git a/lib/lvgl/examples/styles/lv_example_style_15.c b/lib/lvgl/examples/styles/lv_example_style_15.c
new file mode 100644
index 0000000..a895df3
--- /dev/null
+++ b/lib/lvgl/examples/styles/lv_example_style_15.c
@@ -0,0 +1,48 @@
+#include "../lv_examples.h"
+#if LV_BUILD_EXAMPLES && LV_USE_BTN && LV_USE_LABEL
+
+/**
+ * Opacity and Transformations
+ */
+void lv_example_style_15(void)
+{
+ lv_obj_t * btn;
+ lv_obj_t * label;
+
+ /*Normal button*/
+ btn = lv_btn_create(lv_scr_act());
+ lv_obj_set_size(btn, 100, 40);
+ lv_obj_align(btn, LV_ALIGN_CENTER, 0, -70);
+
+ label = lv_label_create(btn);
+ lv_label_set_text(label, "Normal");
+ lv_obj_center(label);
+
+ /*Set opacity
+ *The button and the label is rendered to a layer first and that layer is blended*/
+ btn = lv_btn_create(lv_scr_act());
+ lv_obj_set_size(btn, 100, 40);
+ lv_obj_set_style_opa(btn, LV_OPA_50, 0);
+ lv_obj_align(btn, LV_ALIGN_CENTER, 0, 0);
+
+ label = lv_label_create(btn);
+ lv_label_set_text(label, "Opa:50%");
+ lv_obj_center(label);
+
+ /*Set transformations
+ *The button and the label is rendered to a layer first and that layer is transformed*/
+ btn = lv_btn_create(lv_scr_act());
+ lv_obj_set_size(btn, 100, 40);
+ lv_obj_set_style_transform_angle(btn, 150, 0); /*15 deg*/
+ lv_obj_set_style_transform_zoom(btn, 256 + 64, 0); /*1.25x*/
+ lv_obj_set_style_transform_pivot_x(btn, 50, 0);
+ lv_obj_set_style_transform_pivot_y(btn, 20, 0);
+ lv_obj_set_style_opa(btn, LV_OPA_50, 0);
+ lv_obj_align(btn, LV_ALIGN_CENTER, 0, 70);
+
+ label = lv_label_create(btn);
+ lv_label_set_text(label, "Transf.");
+ lv_obj_center(label);
+}
+
+#endif
diff --git a/lib/lvgl/examples/widgets/animimg/lv_example_animimg_1.c b/lib/lvgl/examples/widgets/animimg/lv_example_animimg_1.c
index 84ea965..4341b6f 100644
--- a/lib/lvgl/examples/widgets/animimg/lv_example_animimg_1.c
+++ b/lib/lvgl/examples/widgets/animimg/lv_example_animimg_1.c
@@ -14,7 +14,7 @@ void lv_example_animimg_1(void)
{
lv_obj_t * animimg0 = lv_animimg_create(lv_scr_act());
lv_obj_center(animimg0);
- lv_animimg_set_src(animimg0, (lv_img_dsc_t **) anim_imgs, 3);
+ lv_animimg_set_src(animimg0, (const void **) anim_imgs, 3);
lv_animimg_set_duration(animimg0, 1000);
lv_animimg_set_repeat_count(animimg0, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animimg0);
diff --git a/lib/lvgl/examples/widgets/arc/lv_example_arc_1.c b/lib/lvgl/examples/widgets/arc/lv_example_arc_1.c
index c725d2c..e1ff4e8 100644
--- a/lib/lvgl/examples/widgets/arc/lv_example_arc_1.c
+++ b/lib/lvgl/examples/widgets/arc/lv_example_arc_1.c
@@ -2,15 +2,34 @@
#if LV_USE_ARC && LV_BUILD_EXAMPLES
+static void value_changed_event_cb(lv_event_t * e);
+
void lv_example_arc_1(void)
{
+ lv_obj_t * label = lv_label_create(lv_scr_act());
+
/*Create an Arc*/
lv_obj_t * arc = lv_arc_create(lv_scr_act());
lv_obj_set_size(arc, 150, 150);
lv_arc_set_rotation(arc, 135);
lv_arc_set_bg_angles(arc, 0, 270);
- lv_arc_set_value(arc, 40);
+ lv_arc_set_value(arc, 10);
lv_obj_center(arc);
+ lv_obj_add_event_cb(arc, value_changed_event_cb, LV_EVENT_VALUE_CHANGED, label);
+
+ /*Manually update the label for the first time*/
+ lv_event_send(arc, LV_EVENT_VALUE_CHANGED, NULL);
+}
+
+static void value_changed_event_cb(lv_event_t * e)
+{
+ lv_obj_t * arc = lv_event_get_target(e);
+ lv_obj_t * label = lv_event_get_user_data(e);
+
+ lv_label_set_text_fmt(label, "%d%%", lv_arc_get_value(arc));
+
+ /*Rotate the label to the current position of the arc*/
+ lv_arc_rotate_obj_to_angle(arc, label, 25);
}
#endif
diff --git a/lib/lvgl/examples/widgets/arc/lv_example_arc_2.c b/lib/lvgl/examples/widgets/arc/lv_example_arc_2.c
index 3b94a75..38311b8 100644
--- a/lib/lvgl/examples/widgets/arc/lv_example_arc_2.c
+++ b/lib/lvgl/examples/widgets/arc/lv_example_arc_2.c
@@ -30,8 +30,6 @@ void lv_example_arc_2(void)
lv_anim_set_values(&a, 0, 100);
lv_anim_start(&a);
-
-
}
#endif
diff --git a/lib/lvgl/examples/widgets/bar/lv_example_bar_3.c b/lib/lvgl/examples/widgets/bar/lv_example_bar_3.c
index eaa8487..5e0aeef 100644
--- a/lib/lvgl/examples/widgets/bar/lv_example_bar_3.c
+++ b/lib/lvgl/examples/widgets/bar/lv_example_bar_3.c
@@ -36,5 +36,4 @@ void lv_example_bar_3(void)
lv_anim_start(&a);
}
-
#endif
diff --git a/lib/lvgl/examples/widgets/bar/lv_example_bar_5.c b/lib/lvgl/examples/widgets/bar/lv_example_bar_5.c
index c416380..5c2c5fa 100644
--- a/lib/lvgl/examples/widgets/bar/lv_example_bar_5.c
+++ b/lib/lvgl/examples/widgets/bar/lv_example_bar_5.c
@@ -8,7 +8,6 @@ void lv_example_bar_5(void)
{
lv_obj_t * label;
-
lv_obj_t * bar_ltr = lv_bar_create(lv_scr_act());
lv_obj_set_size(bar_ltr, 200, 20);
lv_bar_set_value(bar_ltr, 70, LV_ANIM_OFF);
diff --git a/lib/lvgl/examples/widgets/bar/lv_example_bar_6.c b/lib/lvgl/examples/widgets/bar/lv_example_bar_6.c
index 25bd873..2a159cc 100644
--- a/lib/lvgl/examples/widgets/bar/lv_example_bar_6.c
+++ b/lib/lvgl/examples/widgets/bar/lv_example_bar_6.c
@@ -8,7 +8,7 @@ static void set_value(void * bar, int32_t v)
static void event_cb(lv_event_t * e)
{
- lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
+ lv_obj_draw_part_dsc_t * dsc = lv_event_get_draw_part_dsc(e);
if(dsc->part != LV_PART_INDICATOR) return;
lv_obj_t * obj = lv_event_get_target(e);
diff --git a/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c b/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c
index 262165f..7db9832 100644
--- a/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c
+++ b/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_1.c
@@ -13,7 +13,6 @@ static void event_handler(lv_event_t * e)
}
}
-
static const char * btnm_map[] = {"1", "2", "3", "4", "5", "\n",
"6", "7", "8", "9", "0", "\n",
"Action1", "Action2", ""
diff --git a/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c b/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c
index 5f42d5d..4432534 100644
--- a/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c
+++ b/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_2.c
@@ -1,60 +1,65 @@
#include "../../lv_examples.h"
#if LV_USE_BTNMATRIX && LV_BUILD_EXAMPLES
-
static void event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_target(e);
if(code == LV_EVENT_DRAW_PART_BEGIN) {
- lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
+ lv_obj_draw_part_dsc_t * dsc = lv_event_get_draw_part_dsc(e);
- /*Change the draw descriptor the 2nd button*/
- if(dsc->id == 1) {
- dsc->rect_dsc->radius = 0;
- if(lv_btnmatrix_get_selected_btn(obj) == dsc->id) dsc->rect_dsc->bg_color = lv_palette_darken(LV_PALETTE_BLUE, 3);
- else dsc->rect_dsc->bg_color = lv_palette_main(LV_PALETTE_BLUE);
+ /*When the button matrix draws the buttons...*/
+ if(dsc->class_p == &lv_btnmatrix_class && dsc->type == LV_BTNMATRIX_DRAW_PART_BTN) {
+ /*Change the draw descriptor of the 2nd button*/
+ if(dsc->id == 1) {
+ dsc->rect_dsc->radius = 0;
+ if(lv_btnmatrix_get_selected_btn(obj) == dsc->id) dsc->rect_dsc->bg_color = lv_palette_darken(LV_PALETTE_BLUE, 3);
+ else dsc->rect_dsc->bg_color = lv_palette_main(LV_PALETTE_BLUE);
- dsc->rect_dsc->shadow_width = 6;
- dsc->rect_dsc->shadow_ofs_x = 3;
- dsc->rect_dsc->shadow_ofs_y = 3;
- dsc->label_dsc->color = lv_color_white();
- }
- /*Change the draw descriptor the 3rd button*/
- else if(dsc->id == 2) {
- dsc->rect_dsc->radius = LV_RADIUS_CIRCLE;
- if(lv_btnmatrix_get_selected_btn(obj) == dsc->id) dsc->rect_dsc->bg_color = lv_palette_darken(LV_PALETTE_RED, 3);
- else dsc->rect_dsc->bg_color = lv_palette_main(LV_PALETTE_RED);
+ dsc->rect_dsc->shadow_width = 6;
+ dsc->rect_dsc->shadow_ofs_x = 3;
+ dsc->rect_dsc->shadow_ofs_y = 3;
+ dsc->label_dsc->color = lv_color_white();
+ }
+ /*Change the draw descriptor of the 3rd button*/
+ else if(dsc->id == 2) {
+ dsc->rect_dsc->radius = LV_RADIUS_CIRCLE;
+ if(lv_btnmatrix_get_selected_btn(obj) == dsc->id) dsc->rect_dsc->bg_color = lv_palette_darken(LV_PALETTE_RED, 3);
+ else dsc->rect_dsc->bg_color = lv_palette_main(LV_PALETTE_RED);
- dsc->label_dsc->color = lv_color_white();
- }
- else if(dsc->id == 3) {
- dsc->label_dsc->opa = LV_OPA_TRANSP; /*Hide the text if any*/
+ dsc->label_dsc->color = lv_color_white();
+ }
+ else if(dsc->id == 3) {
+ dsc->label_dsc->opa = LV_OPA_TRANSP; /*Hide the text if any*/
+ }
}
}
if(code == LV_EVENT_DRAW_PART_END) {
- lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
+ lv_obj_draw_part_dsc_t * dsc = lv_event_get_draw_part_dsc(e);
- /*Add custom content to the 4th button when the button itself was drawn*/
- if(dsc->id == 3) {
- LV_IMG_DECLARE(img_star);
- lv_img_header_t header;
- lv_res_t res = lv_img_decoder_get_info(&img_star, &header);
- if(res != LV_RES_OK) return;
+ /*When the button matrix draws the buttons...*/
+ if(dsc->class_p == &lv_btnmatrix_class && dsc->type == LV_BTNMATRIX_DRAW_PART_BTN) {
+ /*Add custom content to the 4th button when the button itself was drawn*/
+ if(dsc->id == 3) {
+ LV_IMG_DECLARE(img_star);
+ lv_img_header_t header;
+ lv_res_t res = lv_img_decoder_get_info(&img_star, &header);
+ if(res != LV_RES_OK) return;
- lv_area_t a;
- a.x1 = dsc->draw_area->x1 + (lv_area_get_width(dsc->draw_area) - header.w) / 2;
- a.x2 = a.x1 + header.w - 1;
- a.y1 = dsc->draw_area->y1 + (lv_area_get_height(dsc->draw_area) - header.h) / 2;
- a.y2 = a.y1 + header.h - 1;
+ lv_area_t a;
+ a.x1 = dsc->draw_area->x1 + (lv_area_get_width(dsc->draw_area) - header.w) / 2;
+ a.x2 = a.x1 + header.w - 1;
+ a.y1 = dsc->draw_area->y1 + (lv_area_get_height(dsc->draw_area) - header.h) / 2;
+ a.y2 = a.y1 + header.h - 1;
- lv_draw_img_dsc_t img_draw_dsc;
- lv_draw_img_dsc_init(&img_draw_dsc);
- img_draw_dsc.recolor = lv_color_black();
- if(lv_btnmatrix_get_selected_btn(obj) == dsc->id) img_draw_dsc.recolor_opa = LV_OPA_30;
+ lv_draw_img_dsc_t img_draw_dsc;
+ lv_draw_img_dsc_init(&img_draw_dsc);
+ img_draw_dsc.recolor = lv_color_black();
+ if(lv_btnmatrix_get_selected_btn(obj) == dsc->id) img_draw_dsc.recolor_opa = LV_OPA_30;
- lv_draw_img(dsc->draw_ctx, &img_draw_dsc, &a, &img_star);
+ lv_draw_img(dsc->draw_ctx, &img_draw_dsc, &a, &img_star);
+ }
}
}
}
diff --git a/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c b/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c
index cbfcfbd..4c95b0a 100644
--- a/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c
+++ b/lib/lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_3.c
@@ -34,7 +34,6 @@ void lv_example_btnmatrix_3(void)
lv_style_set_radius(&style_bg, LV_RADIUS_CIRCLE);
lv_style_set_border_width(&style_bg, 0);
-
static lv_style_t style_btn;
lv_style_init(&style_btn);
lv_style_set_radius(&style_btn, 0);
diff --git a/lib/lvgl/examples/widgets/canvas/lv_example_canvas_1.c b/lib/lvgl/examples/widgets/canvas/lv_example_canvas_1.c
index 6dd9ab0..a0265f4 100644
--- a/lib/lvgl/examples/widgets/canvas/lv_example_canvas_1.c
+++ b/lib/lvgl/examples/widgets/canvas/lv_example_canvas_1.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_CANVAS && LV_BUILD_EXAMPLES
-
#define CANVAS_WIDTH 200
#define CANVAS_HEIGHT 150
diff --git a/lib/lvgl/examples/widgets/chart/lv_example_chart_4.c b/lib/lvgl/examples/widgets/chart/lv_example_chart_4.c
index 8508ef1..db5eac4 100644
--- a/lib/lvgl/examples/widgets/chart/lv_example_chart_4.c
+++ b/lib/lvgl/examples/widgets/chart/lv_example_chart_4.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_BUILD_EXAMPLES
-
static void event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
diff --git a/lib/lvgl/examples/widgets/chart/lv_example_chart_5.c b/lib/lvgl/examples/widgets/chart/lv_example_chart_5.c
index c175e37..f960695 100644
--- a/lib/lvgl/examples/widgets/chart/lv_example_chart_5.c
+++ b/lib/lvgl/examples/widgets/chart/lv_example_chart_5.c
@@ -5,46 +5,46 @@ static lv_obj_t * chart;
/* Source: https://github.com/ankur219/ECG-Arrhythmia-classification/blob/642230149583adfae1e4bd26c6f0e1fd8af2be0e/sample.csv*/
static const lv_coord_t ecg_sample[] = {
-2, 2, 0, -15, -39, -63, -71, -68, -67, -69, -84, -95, -104, -107, -108, -107, -107, -107, -107, -114, -118, -117,
- -112, -100, -89, -83, -71, -64, -58, -58, -62, -62, -58, -51, -46, -39, -27, -10, 4, 7, 1, -3, 0, 14, 24, 30, 25, 19,
- 13, 7, 12, 15, 18, 21, 13, 6, 9, 8, 17, 19, 13, 11, 11, 11, 23, 30, 37, 34, 25, 14, 15, 19, 28, 31, 26, 23, 25, 31,
- 39, 37, 37, 34, 30, 32, 22, 29, 31, 33, 37, 23, 13, 7, 2, 4, -2, 2, 11, 22, 33, 19, -1, -27, -55, -67, -72, -71, -63,
- -49, -18, 35, 113, 230, 369, 525, 651, 722, 730, 667, 563, 454, 357, 305, 288, 274, 255, 212, 173, 143, 117, 82, 39,
- -13, -53, -78, -91, -101, -113, -124, -131, -131, -131, -129, -128, -129, -125, -123, -123, -129, -139, -148, -153,
- -159, -166, -183, -205, -227, -243, -248, -246, -254, -280, -327, -381, -429, -473, -517, -556, -592, -612, -620,
- -620, -614, -604, -591, -574, -540, -497, -441, -389, -358, -336, -313, -284, -222, -167, -114, -70, -47, -28, -4, 12,
- 38, 52, 58, 56, 56, 57, 68, 77, 86, 86, 80, 69, 67, 70, 82, 85, 89, 90, 89, 89, 88, 91, 96, 97, 91, 83, 78, 82, 88, 95,
- 96, 105, 106, 110, 102, 100, 96, 98, 97, 101, 98, 99, 100, 107, 113, 119, 115, 110, 96, 85, 73, 64, 69, 76, 79,
- 78, 75, 85, 100, 114, 113, 105, 96, 84, 74, 66, 60, 75, 85, 89, 83, 67, 61, 67, 73, 79, 74, 63, 57, 56, 58, 61, 55,
- 48, 45, 46, 55, 62, 55, 49, 43, 50, 59, 63, 57, 40, 31, 23, 25, 27, 31, 35, 34, 30, 36, 34, 42, 38, 36, 40, 46, 50,
- 47, 32, 30, 32, 52, 67, 73, 71, 63, 54, 53, 45, 41, 28, 13, 3, 1, 4, 4, -8, -23, -32, -31, -19, -5, 3, 9, 13, 19,
- 24, 27, 29, 25, 22, 26, 32, 42, 51, 56, 60, 57, 55, 53, 53, 54, 59, 54, 49, 26, -3, -11, -20, -47, -100, -194, -236,
- -212, -123, 8, 103, 142, 147, 120, 105, 98, 93, 81, 61, 40, 26, 28, 30, 30, 27, 19, 17, 21, 20, 19, 19, 22, 36, 40,
- 35, 20, 7, 1, 10, 18, 27, 22, 6, -4, -2, 3, 6, -2, -13, -14, -10, -2, 3, 2, -1, -5, -10, -19, -32, -42, -55, -60,
- -68, -77, -86, -101, -110, -117, -115, -104, -92, -84, -85, -84, -73, -65, -52, -50, -45, -35, -20, -3, 12, 20, 25,
- 26, 28, 28, 30, 28, 25, 28, 33, 42, 42, 36, 23, 9, 0, 1, -4, 1, -4, -4, 1, 5, 9, 9, -3, -1, -18, -50, -108, -190,
- -272, -340, -408, -446, -537, -643, -777, -894, -920, -853, -697, -461, -251, -60, 58, 103, 129, 139, 155, 170, 173,
- 178, 185, 190, 193, 200, 208, 215, 225, 224, 232, 234, 240, 240, 236, 229, 226, 224, 232, 233, 232, 224, 219, 219,
- 223, 231, 226, 223, 219, 218, 223, 223, 223, 233, 245, 268, 286, 296, 295, 283, 271, 263, 252, 243, 226, 210, 197,
- 186, 171, 152, 133, 117, 114, 110, 107, 96, 80, 63, 48, 40, 38, 34, 28, 15, 2, -7, -11, -14, -18, -29, -37, -44, -50,
- -58, -63, -61, -52, -50, -48, -61, -59, -58, -54, -47, -52, -62, -61, -64, -54, -52, -59, -69, -76, -76, -69, -67,
- -74, -78, -81, -80, -73, -65, -57, -53, -51, -47, -35, -27, -22, -22, -24, -21, -17, -13, -10, -11, -13, -20, -20,
- -12, -2, 7, -1, -12, -16, -13, -2, 2, -4, -5, -2, 9, 19, 19, 14, 11, 13, 19, 21, 20, 18, 19, 19, 19, 16, 15, 13, 14,
- 9, 3, -5, -9, -5, -3, -2, -3, -3, 2, 8, 9, 9, 5, 6, 8, 8, 7, 4, 3, 4, 5, 3, 5, 5, 13, 13, 12, 10, 10, 15, 22, 17,
- 14, 7, 10, 15, 16, 11, 12, 10, 13, 9, -2, -4, -2, 7, 16, 16, 17, 16, 7, -1, -16, -18, -16, -9, -4, -5, -10, -9, -8,
- -3, -4, -10, -19, -20, -16, -9, -9, -23, -40, -48, -43, -33, -19, -21, -26, -31, -33, -19, 0, 17, 24, 9, -17, -47,
- -63, -67, -59, -52, -51, -50, -49, -42, -26, -21, -15, -20, -23, -22, -19, -12, -8, 5, 18, 27, 32, 26, 25, 26, 22,
- 23, 17, 14, 17, 21, 25, 2, -45, -121, -196, -226, -200, -118, -9, 73, 126, 131, 114, 87, 60, 42, 29, 26, 34, 35, 34,
- 25, 12, 9, 7, 3, 2, -8, -11, 2, 23, 38, 41, 23, 9, 10, 13, 16, 8, -8, -17, -23, -26, -25, -21, -15, -10, -13, -13,
- -19, -22, -29, -40, -48, -48, -54, -55, -66, -82, -85, -90, -92, -98, -114, -119, -124, -129, -132, -146, -146, -138,
- -124, -99, -85, -72, -65, -65, -65, -66, -63, -64, -64, -58, -46, -26, -9, 2, 2, 4, 0, 1, 4, 3, 10, 11, 10, 2, -4,
- 0, 10, 18, 20, 6, 2, -9, -7, -3, -3, -2, -7, -12, -5, 5, 24, 36, 31, 25, 6, 3, 7, 12, 17, 11, 0, -6, -9, -8, -7, -5,
- -6, -2, -2, -6, -2, 2, 14, 24, 22, 15, 8, 4, 6, 7, 12, 16, 25, 20, 7, -16, -41, -60, -67, -65, -54, -35, -11, 30,
- 84, 175, 302, 455, 603, 707, 743, 714, 625, 519, 414, 337, 300, 281, 263, 239, 197, 163, 136, 109, 77, 34, -18, -50,
- -66, -74, -79, -92, -107, -117, -127, -129, -135, -139, -141, -155, -159, -167, -171, -169, -174, -175, -178, -191,
- -202, -223, -235, -243, -237, -240, -256, -298, -345, -393, -432, -475, -518, -565, -596, -619, -623, -623, -614,
- -599, -583, -559, -524, -477, -425, -383, -357, -331, -301, -252, -198, -143, -96, -57, -29, -8, 10, 31, 45, 60, 65,
- 70, 74, 76, 79, 82, 79, 75, 62,
- };
+ -112, -100, -89, -83, -71, -64, -58, -58, -62, -62, -58, -51, -46, -39, -27, -10, 4, 7, 1, -3, 0, 14, 24, 30, 25, 19,
+ 13, 7, 12, 15, 18, 21, 13, 6, 9, 8, 17, 19, 13, 11, 11, 11, 23, 30, 37, 34, 25, 14, 15, 19, 28, 31, 26, 23, 25, 31,
+ 39, 37, 37, 34, 30, 32, 22, 29, 31, 33, 37, 23, 13, 7, 2, 4, -2, 2, 11, 22, 33, 19, -1, -27, -55, -67, -72, -71, -63,
+ -49, -18, 35, 113, 230, 369, 525, 651, 722, 730, 667, 563, 454, 357, 305, 288, 274, 255, 212, 173, 143, 117, 82, 39,
+ -13, -53, -78, -91, -101, -113, -124, -131, -131, -131, -129, -128, -129, -125, -123, -123, -129, -139, -148, -153,
+ -159, -166, -183, -205, -227, -243, -248, -246, -254, -280, -327, -381, -429, -473, -517, -556, -592, -612, -620,
+ -620, -614, -604, -591, -574, -540, -497, -441, -389, -358, -336, -313, -284, -222, -167, -114, -70, -47, -28, -4, 12,
+ 38, 52, 58, 56, 56, 57, 68, 77, 86, 86, 80, 69, 67, 70, 82, 85, 89, 90, 89, 89, 88, 91, 96, 97, 91, 83, 78, 82, 88, 95,
+ 96, 105, 106, 110, 102, 100, 96, 98, 97, 101, 98, 99, 100, 107, 113, 119, 115, 110, 96, 85, 73, 64, 69, 76, 79,
+ 78, 75, 85, 100, 114, 113, 105, 96, 84, 74, 66, 60, 75, 85, 89, 83, 67, 61, 67, 73, 79, 74, 63, 57, 56, 58, 61, 55,
+ 48, 45, 46, 55, 62, 55, 49, 43, 50, 59, 63, 57, 40, 31, 23, 25, 27, 31, 35, 34, 30, 36, 34, 42, 38, 36, 40, 46, 50,
+ 47, 32, 30, 32, 52, 67, 73, 71, 63, 54, 53, 45, 41, 28, 13, 3, 1, 4, 4, -8, -23, -32, -31, -19, -5, 3, 9, 13, 19,
+ 24, 27, 29, 25, 22, 26, 32, 42, 51, 56, 60, 57, 55, 53, 53, 54, 59, 54, 49, 26, -3, -11, -20, -47, -100, -194, -236,
+ -212, -123, 8, 103, 142, 147, 120, 105, 98, 93, 81, 61, 40, 26, 28, 30, 30, 27, 19, 17, 21, 20, 19, 19, 22, 36, 40,
+ 35, 20, 7, 1, 10, 18, 27, 22, 6, -4, -2, 3, 6, -2, -13, -14, -10, -2, 3, 2, -1, -5, -10, -19, -32, -42, -55, -60,
+ -68, -77, -86, -101, -110, -117, -115, -104, -92, -84, -85, -84, -73, -65, -52, -50, -45, -35, -20, -3, 12, 20, 25,
+ 26, 28, 28, 30, 28, 25, 28, 33, 42, 42, 36, 23, 9, 0, 1, -4, 1, -4, -4, 1, 5, 9, 9, -3, -1, -18, -50, -108, -190,
+ -272, -340, -408, -446, -537, -643, -777, -894, -920, -853, -697, -461, -251, -60, 58, 103, 129, 139, 155, 170, 173,
+ 178, 185, 190, 193, 200, 208, 215, 225, 224, 232, 234, 240, 240, 236, 229, 226, 224, 232, 233, 232, 224, 219, 219,
+ 223, 231, 226, 223, 219, 218, 223, 223, 223, 233, 245, 268, 286, 296, 295, 283, 271, 263, 252, 243, 226, 210, 197,
+ 186, 171, 152, 133, 117, 114, 110, 107, 96, 80, 63, 48, 40, 38, 34, 28, 15, 2, -7, -11, -14, -18, -29, -37, -44, -50,
+ -58, -63, -61, -52, -50, -48, -61, -59, -58, -54, -47, -52, -62, -61, -64, -54, -52, -59, -69, -76, -76, -69, -67,
+ -74, -78, -81, -80, -73, -65, -57, -53, -51, -47, -35, -27, -22, -22, -24, -21, -17, -13, -10, -11, -13, -20, -20,
+ -12, -2, 7, -1, -12, -16, -13, -2, 2, -4, -5, -2, 9, 19, 19, 14, 11, 13, 19, 21, 20, 18, 19, 19, 19, 16, 15, 13, 14,
+ 9, 3, -5, -9, -5, -3, -2, -3, -3, 2, 8, 9, 9, 5, 6, 8, 8, 7, 4, 3, 4, 5, 3, 5, 5, 13, 13, 12, 10, 10, 15, 22, 17,
+ 14, 7, 10, 15, 16, 11, 12, 10, 13, 9, -2, -4, -2, 7, 16, 16, 17, 16, 7, -1, -16, -18, -16, -9, -4, -5, -10, -9, -8,
+ -3, -4, -10, -19, -20, -16, -9, -9, -23, -40, -48, -43, -33, -19, -21, -26, -31, -33, -19, 0, 17, 24, 9, -17, -47,
+ -63, -67, -59, -52, -51, -50, -49, -42, -26, -21, -15, -20, -23, -22, -19, -12, -8, 5, 18, 27, 32, 26, 25, 26, 22,
+ 23, 17, 14, 17, 21, 25, 2, -45, -121, -196, -226, -200, -118, -9, 73, 126, 131, 114, 87, 60, 42, 29, 26, 34, 35, 34,
+ 25, 12, 9, 7, 3, 2, -8, -11, 2, 23, 38, 41, 23, 9, 10, 13, 16, 8, -8, -17, -23, -26, -25, -21, -15, -10, -13, -13,
+ -19, -22, -29, -40, -48, -48, -54, -55, -66, -82, -85, -90, -92, -98, -114, -119, -124, -129, -132, -146, -146, -138,
+ -124, -99, -85, -72, -65, -65, -65, -66, -63, -64, -64, -58, -46, -26, -9, 2, 2, 4, 0, 1, 4, 3, 10, 11, 10, 2, -4,
+ 0, 10, 18, 20, 6, 2, -9, -7, -3, -3, -2, -7, -12, -5, 5, 24, 36, 31, 25, 6, 3, 7, 12, 17, 11, 0, -6, -9, -8, -7, -5,
+ -6, -2, -2, -6, -2, 2, 14, 24, 22, 15, 8, 4, 6, 7, 12, 16, 25, 20, 7, -16, -41, -60, -67, -65, -54, -35, -11, 30,
+ 84, 175, 302, 455, 603, 707, 743, 714, 625, 519, 414, 337, 300, 281, 263, 239, 197, 163, 136, 109, 77, 34, -18, -50,
+ -66, -74, -79, -92, -107, -117, -127, -129, -135, -139, -141, -155, -159, -167, -171, -169, -174, -175, -178, -191,
+ -202, -223, -235, -243, -237, -240, -256, -298, -345, -393, -432, -475, -518, -565, -596, -619, -623, -623, -614,
+ -599, -583, -559, -524, -477, -425, -383, -357, -331, -301, -252, -198, -143, -96, -57, -29, -8, 10, 31, 45, 60, 65,
+ 70, 74, 76, 79, 82, 79, 75, 62,
+};
static void slider_x_event_cb(lv_event_t * e)
{
diff --git a/lib/lvgl/examples/widgets/chart/lv_example_chart_9.c b/lib/lvgl/examples/widgets/chart/lv_example_chart_9.c
index c94b564..c492a2f 100644
--- a/lib/lvgl/examples/widgets/chart/lv_example_chart_9.c
+++ b/lib/lvgl/examples/widgets/chart/lv_example_chart_9.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_DRAW_COMPLEX && LV_BUILD_EXAMPLES
-
static void add_data(lv_timer_t * t)
{
lv_obj_t * chart = t->user_data;
diff --git a/lib/lvgl/examples/widgets/checkbox/lv_example_checkbox_2.c b/lib/lvgl/examples/widgets/checkbox/lv_example_checkbox_2.c
index 02a5728..6d12465 100644
--- a/lib/lvgl/examples/widgets/checkbox/lv_example_checkbox_2.c
+++ b/lib/lvgl/examples/widgets/checkbox/lv_example_checkbox_2.c
@@ -24,7 +24,6 @@ static void radio_event_handler(lv_event_t * e)
LV_LOG_USER("Selected radio buttons: %d, %d", (int)active_index_1, (int)active_index_2);
}
-
static void radiobutton_create(lv_obj_t * parent, const char * txt)
{
lv_obj_t * obj = lv_checkbox_create(parent);
@@ -44,7 +43,6 @@ void lv_example_checkbox_2(void)
* A variable is passed as event user data where the index of the active
* radiobutton is saved */
-
lv_style_init(&style_radio);
lv_style_set_radius(&style_radio, LV_RADIUS_CIRCLE);
@@ -82,5 +80,4 @@ void lv_example_checkbox_2(void)
lv_obj_add_state(lv_obj_get_child(cont2, 0), LV_STATE_CHECKED);
}
-
#endif
diff --git a/lib/lvgl/examples/widgets/dropdown/lv_example_dropdown_2.c b/lib/lvgl/examples/widgets/dropdown/lv_example_dropdown_2.c
index 77f1579..fea5b8d 100644
--- a/lib/lvgl/examples/widgets/dropdown/lv_example_dropdown_2.c
+++ b/lib/lvgl/examples/widgets/dropdown/lv_example_dropdown_2.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_DROPDOWN && LV_BUILD_EXAMPLES
-
/**
* Create a drop down, up, left and right menus
*/
diff --git a/lib/lvgl/examples/widgets/img/lv_example_img_1.c b/lib/lvgl/examples/widgets/img/lv_example_img_1.c
index 76ef1f4..76fe1c3 100644
--- a/lib/lvgl/examples/widgets/img/lv_example_img_1.c
+++ b/lib/lvgl/examples/widgets/img/lv_example_img_1.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
-
void lv_example_img_1(void)
{
LV_IMG_DECLARE(img_cogwheel_argb);
diff --git a/lib/lvgl/examples/widgets/img/lv_example_img_2.c b/lib/lvgl/examples/widgets/img/lv_example_img_2.c
index 698ab90..2548552 100644
--- a/lib/lvgl/examples/widgets/img/lv_example_img_2.c
+++ b/lib/lvgl/examples/widgets/img/lv_example_img_2.c
@@ -7,7 +7,6 @@ static void slider_event_cb(lv_event_t * e);
static lv_obj_t * red_slider, * green_slider, * blue_slider, * intense_slider;
static lv_obj_t * img1;
-
/**
* Demonstrate runtime image re-coloring
*/
diff --git a/lib/lvgl/examples/widgets/img/lv_example_img_3.c b/lib/lvgl/examples/widgets/img/lv_example_img_3.c
index aa5b5f3..d1ece70 100644
--- a/lib/lvgl/examples/widgets/img/lv_example_img_3.c
+++ b/lib/lvgl/examples/widgets/img/lv_example_img_3.c
@@ -11,7 +11,6 @@ static void set_zoom(void * img, int32_t v)
lv_img_set_zoom(img, v);
}
-
/**
* Show transformations (zoom and rotation) using a pivot point.
*/
diff --git a/lib/lvgl/examples/widgets/list/lv_example_list_2.c b/lib/lvgl/examples/widgets/list/lv_example_list_2.c
index 0def918..8ffa359 100644
--- a/lib/lvgl/examples/widgets/list/lv_example_list_2.c
+++ b/lib/lvgl/examples/widgets/list/lv_example_list_2.c
@@ -1,6 +1,5 @@
#include
-
#include "../../lv_examples.h"
#if LV_USE_LIST && LV_BUILD_EXAMPLES
diff --git a/lib/lvgl/examples/widgets/menu/lv_example_menu_4.c b/lib/lvgl/examples/widgets/menu/lv_example_menu_4.c
index 5807e5d..7c96db5 100644
--- a/lib/lvgl/examples/widgets/menu/lv_example_menu_4.c
+++ b/lib/lvgl/examples/widgets/menu/lv_example_menu_4.c
@@ -18,11 +18,11 @@ static void float_btn_event_cb(lv_event_t * e)
cont = lv_menu_cont_create(sub_page);
label = lv_label_create(cont);
- lv_label_set_text_fmt(label, "Hello, I am hiding inside %i", btn_cnt);
+ lv_label_set_text_fmt(label, "Hello, I am hiding inside %"LV_PRIu32, btn_cnt);
cont = lv_menu_cont_create(main_page);
label = lv_label_create(cont);
- lv_label_set_text_fmt(label, "Item %i", btn_cnt);
+ lv_label_set_text_fmt(label, "Item %"LV_PRIu32, btn_cnt);
lv_menu_set_load_page_event(menu, cont, sub_page);
lv_obj_scroll_to_view_recursive(cont, LV_ANIM_ON);
diff --git a/lib/lvgl/examples/widgets/meter/lv_example_meter_2.c b/lib/lvgl/examples/widgets/meter/lv_example_meter_2.c
index 811e056..05fe4bf 100644
--- a/lib/lvgl/examples/widgets/meter/lv_example_meter_2.c
+++ b/lib/lvgl/examples/widgets/meter/lv_example_meter_2.c
@@ -8,7 +8,6 @@ static void set_value(void * indic, int32_t v)
lv_meter_set_indicator_end_value(meter, indic, v);
}
-
/**
* A meter with multiple arcs
*/
diff --git a/lib/lvgl/examples/widgets/obj/lv_example_obj_2.c b/lib/lvgl/examples/widgets/obj/lv_example_obj_2.c
index 627d509..6c30899 100644
--- a/lib/lvgl/examples/widgets/obj/lv_example_obj_2.c
+++ b/lib/lvgl/examples/widgets/obj/lv_example_obj_2.c
@@ -16,7 +16,6 @@ static void drag_event_handler(lv_event_t * e)
lv_obj_set_pos(obj, x, y);
}
-
/**
* Make an object dragable.
*/
diff --git a/lib/lvgl/examples/widgets/slider/lv_example_slider_2.c b/lib/lvgl/examples/widgets/slider/lv_example_slider_2.c
index 883d61f..15de39d 100644
--- a/lib/lvgl/examples/widgets/slider/lv_example_slider_2.c
+++ b/lib/lvgl/examples/widgets/slider/lv_example_slider_2.c
@@ -1,8 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_SLIDER && LV_BUILD_EXAMPLES
-
-
/**
* Show how to style a slider.
*/
diff --git a/lib/lvgl/examples/widgets/span/lv_example_span_1.c b/lib/lvgl/examples/widgets/span/lv_example_span_1.c
index 0709883..e09caed 100644
--- a/lib/lvgl/examples/widgets/span/lv_example_span_1.c
+++ b/lib/lvgl/examples/widgets/span/lv_example_span_1.c
@@ -26,7 +26,7 @@ void lv_example_span_1(void)
lv_span_t * span = lv_spangroup_new_span(spans);
lv_span_set_text(span, "China is a beautiful country.");
lv_style_set_text_color(&span->style, lv_palette_main(LV_PALETTE_RED));
- lv_style_set_text_decor(&span->style, LV_TEXT_DECOR_STRIKETHROUGH | LV_TEXT_DECOR_UNDERLINE);
+ lv_style_set_text_decor(&span->style, LV_TEXT_DECOR_UNDERLINE);
lv_style_set_text_opa(&span->style, LV_OPA_50);
span = lv_spangroup_new_span(spans);
@@ -50,6 +50,7 @@ void lv_example_span_1(void)
span = lv_spangroup_new_span(spans);
lv_span_set_text(span, "I have a dream that hope to come true.");
+ lv_style_set_text_decor(&span->style, LV_TEXT_DECOR_STRIKETHROUGH);
lv_spangroup_refr_mode(spans);
}
diff --git a/lib/lvgl/examples/widgets/spinbox/lv_example_spinbox_1.c b/lib/lvgl/examples/widgets/spinbox/lv_example_spinbox_1.c
index 2395aa4..b19e29b 100644
--- a/lib/lvgl/examples/widgets/spinbox/lv_example_spinbox_1.c
+++ b/lib/lvgl/examples/widgets/spinbox/lv_example_spinbox_1.c
@@ -3,7 +3,6 @@
static lv_obj_t * spinbox;
-
static void lv_spinbox_increment_event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -20,7 +19,6 @@ static void lv_spinbox_decrement_event_cb(lv_event_t * e)
}
}
-
void lv_example_spinbox_1(void)
{
spinbox = lv_spinbox_create(lv_scr_act());
diff --git a/lib/lvgl/examples/widgets/table/lv_example_table_1.c b/lib/lvgl/examples/widgets/table/lv_example_table_1.c
index cf528c8..c766568 100644
--- a/lib/lvgl/examples/widgets/table/lv_example_table_1.c
+++ b/lib/lvgl/examples/widgets/table/lv_example_table_1.c
@@ -4,7 +4,7 @@
static void draw_part_event_cb(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
- lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
+ lv_obj_draw_part_dsc_t * dsc = lv_event_get_draw_part_dsc(e);
/*If the cells are drawn...*/
if(dsc->part == LV_PART_ITEMS) {
uint32_t row = dsc->id / lv_table_get_col_cnt(obj);
@@ -29,7 +29,6 @@ static void draw_part_event_cb(lv_event_t * e)
}
}
-
void lv_example_table_1(void)
{
lv_obj_t * table = lv_table_create(lv_scr_act());
diff --git a/lib/lvgl/examples/widgets/table/lv_example_table_2.c b/lib/lvgl/examples/widgets/table/lv_example_table_2.c
index bd1e933..8eb5ec1 100644
--- a/lib/lvgl/examples/widgets/table/lv_example_table_2.c
+++ b/lib/lvgl/examples/widgets/table/lv_example_table_2.c
@@ -49,7 +49,6 @@ static void change_event_cb(lv_event_t * e)
else lv_table_add_cell_ctrl(obj, row, 0, LV_TABLE_CELL_CTRL_CUSTOM_1);
}
-
/**
* A very light-weighted list created from table
*/
diff --git a/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.c b/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.c
index 0266042..5cb4736 100644
--- a/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.c
+++ b/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.c
@@ -1,21 +1,11 @@
#include "../../lv_examples.h"
#if LV_USE_TABVIEW && LV_BUILD_EXAMPLES
-static void scroll_begin_event(lv_event_t * e)
-{
- /*Disable the scroll animations. Triggered when a tab button is clicked */
- if(lv_event_get_code(e) == LV_EVENT_SCROLL_BEGIN) {
- lv_anim_t * a = lv_event_get_param(e);
- if(a) a->time = 0;
- }
-}
-
void lv_example_tabview_2(void)
{
/*Create a Tab view object*/
lv_obj_t * tabview;
tabview = lv_tabview_create(lv_scr_act(), LV_DIR_LEFT, 80);
- lv_obj_add_event_cb(lv_tabview_get_content(tabview), scroll_begin_event, LV_EVENT_SCROLL_BEGIN, NULL);
lv_obj_set_style_bg_color(tabview, lv_palette_lighten(LV_PALETTE_RED, 2), 0);
@@ -24,7 +14,6 @@ void lv_example_tabview_2(void)
lv_obj_set_style_text_color(tab_btns, lv_palette_lighten(LV_PALETTE_GREY, 5), 0);
lv_obj_set_style_border_side(tab_btns, LV_BORDER_SIDE_RIGHT, LV_PART_ITEMS | LV_STATE_CHECKED);
-
/*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
lv_obj_t * tab1 = lv_tabview_add_tab(tabview, "Tab 1");
lv_obj_t * tab2 = lv_tabview_add_tab(tabview, "Tab 2");
diff --git a/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.py b/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.py
index f1604be..ee0360e 100644
--- a/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.py
+++ b/lib/lvgl/examples/widgets/tabview/lv_example_tabview_2.py
@@ -1,15 +1,6 @@
-def scroll_begin_event(e):
-
- #Disable the scroll animations. Triggered when a tab button is clicked */
- if e.get_code() == lv.EVENT.SCROLL_BEGIN:
- a = lv.anim_t.__cast__(e.get_param())
- if a:
- a.time = 0
# Create a Tab view object
tabview = lv.tabview(lv.scr_act(), lv.DIR.LEFT, 80)
-tabview.get_content().add_event_cb(scroll_begin_event, lv.EVENT.SCROLL_BEGIN, None)
-
tabview.set_style_bg_color(lv.palette_lighten(lv.PALETTE.RED, 2), 0)
tab_btns = tabview.get_tab_btns()
diff --git a/lib/lvgl/examples/widgets/textarea/lv_example_textarea_2.c b/lib/lvgl/examples/widgets/textarea/lv_example_textarea_2.c
index 0a915ca..551b921 100644
--- a/lib/lvgl/examples/widgets/textarea/lv_example_textarea_2.c
+++ b/lib/lvgl/examples/widgets/textarea/lv_example_textarea_2.c
@@ -29,7 +29,6 @@ void lv_example_textarea_2(void)
lv_obj_add_event_cb(text_ta, ta_event_cb, LV_EVENT_ALL, NULL);
lv_obj_align(text_ta, LV_ALIGN_TOP_RIGHT, -5, 20);
-
/*Create a label and position it above the text box*/
lv_obj_t * oneline_label = lv_label_create(lv_scr_act());
lv_label_set_text(oneline_label, "Text:");
diff --git a/lib/lvgl/examples/widgets/tileview/lv_example_tileview_1.c b/lib/lvgl/examples/widgets/tileview/lv_example_tileview_1.c
index 8f91d27..79ce6ae 100644
--- a/lib/lvgl/examples/widgets/tileview/lv_example_tileview_1.c
+++ b/lib/lvgl/examples/widgets/tileview/lv_example_tileview_1.c
@@ -16,7 +16,6 @@ void lv_example_tileview_1(void)
lv_label_set_text(label, "Scroll down");
lv_obj_center(label);
-
/*Tile2: a button*/
lv_obj_t * tile2 = lv_tileview_add_tile(tv, 0, 1, LV_DIR_TOP | LV_DIR_RIGHT);
diff --git a/lib/lvgl/examples/widgets/win/lv_example_win_1.c b/lib/lvgl/examples/widgets/win/lv_example_win_1.c
index 4df0bff..0a8a373 100644
--- a/lib/lvgl/examples/widgets/win/lv_example_win_1.c
+++ b/lib/lvgl/examples/widgets/win/lv_example_win_1.c
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_WIN && LV_BUILD_EXAMPLES
-
static void event_handler(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -39,7 +38,6 @@ void lv_example_win_1(void)
"sure it\n"
"overflows. :)");
-
}
#endif
diff --git a/lib/lvgl/idf_component.yml b/lib/lvgl/idf_component.yml
index ba3fff1..9b1a2e2 100644
--- a/lib/lvgl/idf_component.yml
+++ b/lib/lvgl/idf_component.yml
@@ -1,2 +1,5 @@
description: LVGL - Light and Versatile Graphics Library
-url: https://github.com/lvgl/lvgl
\ No newline at end of file
+url: https://lvgl.io/
+repository: https://github.com/lvgl/lvgl.git
+documentation: https://docs.lvgl.io/
+issues: https://github.com/lvgl/lvgl/issues
diff --git a/lib/lvgl/library.json b/lib/lvgl/library.json
index 771c39f..db41d53 100644
--- a/lib/lvgl/library.json
+++ b/lib/lvgl/library.json
@@ -1,6 +1,6 @@
{
"name": "lvgl",
- "version": "8.3.0-dev",
+ "version": "8.4.0",
"keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": {
diff --git a/lib/lvgl/library.properties b/lib/lvgl/library.properties
index fb94832..61f3eea 100644
--- a/lib/lvgl/library.properties
+++ b/lib/lvgl/library.properties
@@ -1,5 +1,5 @@
name=lvgl
-version=8.3.0-dev
+version=8.4.0
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems
diff --git a/lib/lvgl/lv_conf_template.h b/lib/lvgl/lv_conf_template.h
new file mode 100644
index 0000000..1ed255d
--- /dev/null
+++ b/lib/lvgl/lv_conf_template.h
@@ -0,0 +1,784 @@
+/**
+ * @file lv_conf.h
+ * Configuration file for v8.4.0
+ */
+
+/*
+ * Copy this file as `lv_conf.h`
+ * 1. simply next to the `lvgl` folder
+ * 2. or any other places and
+ * - define `LV_CONF_INCLUDE_SIMPLE`
+ * - add the path as include path
+ */
+
+/* clang-format off */
+#if 0 /*Set it to "1" to enable content*/
+
+#ifndef LV_CONF_H
+#define LV_CONF_H
+
+#include
+
+/*====================
+ COLOR SETTINGS
+ *====================*/
+
+/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
+#define LV_COLOR_DEPTH 16
+
+/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
+#define LV_COLOR_16_SWAP 0
+
+/*Enable features to draw on transparent background.
+ *It's required if opa, and transform_* style properties are used.
+ *Can be also used if the UI is above another layer, e.g. an OSD menu or video player.*/
+#define LV_COLOR_SCREEN_TRANSP 0
+
+/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
+ * 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
+#define LV_COLOR_MIX_ROUND_OFS 0
+
+/*Images pixels with this color will not be drawn if they are chroma keyed)*/
+#define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*pure green*/
+
+/*=========================
+ MEMORY SETTINGS
+ *=========================*/
+
+/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
+#define LV_MEM_CUSTOM 0
+#if LV_MEM_CUSTOM == 0
+ /*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
+ #define LV_MEM_SIZE (48U * 1024U) /*[bytes]*/
+
+ /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
+ #define LV_MEM_ADR 0 /*0: unused*/
+ /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
+ #if LV_MEM_ADR == 0
+ #undef LV_MEM_POOL_INCLUDE
+ #undef LV_MEM_POOL_ALLOC
+ #endif
+
+#else /*LV_MEM_CUSTOM*/
+ #define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/
+ #define LV_MEM_CUSTOM_ALLOC malloc
+ #define LV_MEM_CUSTOM_FREE free
+ #define LV_MEM_CUSTOM_REALLOC realloc
+#endif /*LV_MEM_CUSTOM*/
+
+/*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms.
+ *You will see an error log message if there wasn't enough buffers. */
+#define LV_MEM_BUF_MAX_NUM 16
+
+/*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/
+#define LV_MEMCPY_MEMSET_STD 0
+
+/*====================
+ HAL SETTINGS
+ *====================*/
+
+/*Default display refresh period. LVG will redraw changed areas with this period time*/
+#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
+
+/*Input device read period in milliseconds*/
+#define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/
+
+/*Use a custom tick source that tells the elapsed time in milliseconds.
+ *It removes the need to manually update the tick with `lv_tick_inc()`)*/
+#define LV_TICK_CUSTOM 0
+#if LV_TICK_CUSTOM
+ #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
+ #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
+ /*If using lvgl as ESP32 component*/
+ // #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
+ // #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
+#endif /*LV_TICK_CUSTOM*/
+
+/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
+ *(Not so important, you can adjust it to modify default sizes and spaces)*/
+#define LV_DPI_DEF 130 /*[px/inch]*/
+
+/*=======================
+ * FEATURE CONFIGURATION
+ *=======================*/
+
+/*-------------
+ * Drawing
+ *-----------*/
+
+/*Enable complex draw engine.
+ *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/
+#define LV_DRAW_COMPLEX 1
+#if LV_DRAW_COMPLEX != 0
+
+ /*Allow buffering some shadow calculation.
+ *LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
+ *Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
+ #define LV_SHADOW_CACHE_SIZE 0
+
+ /* Set number of maximally cached circle data.
+ * The circumference of 1/4 circle are saved for anti-aliasing
+ * radius * 4 bytes are used per circle (the most often used radiuses are saved)
+ * 0: to disable caching */
+ #define LV_CIRCLE_CACHE_SIZE 4
+#endif /*LV_DRAW_COMPLEX*/
+
+/**
+ * "Simple layers" are used when a widget has `style_opa < 255` to buffer the widget into a layer
+ * and blend it as an image with the given opacity.
+ * Note that `bg_opa`, `text_opa` etc don't require buffering into layer)
+ * The widget can be buffered in smaller chunks to avoid using large buffers.
+ *
+ * - LV_LAYER_SIMPLE_BUF_SIZE: [bytes] the optimal target buffer size. LVGL will try to allocate it
+ * - LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE: [bytes] used if `LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated.
+ *
+ * Both buffer sizes are in bytes.
+ * "Transformed layers" (where transform_angle/zoom properties are used) use larger buffers
+ * and can't be drawn in chunks. So these settings affects only widgets with opacity.
+ */
+#define LV_LAYER_SIMPLE_BUF_SIZE (24 * 1024)
+#define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024)
+
+/*Default image cache size. Image caching keeps the images opened.
+ *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)
+ *With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
+ *However the opened images might consume additional RAM.
+ *0: to disable caching*/
+#define LV_IMG_CACHE_DEF_SIZE 0
+
+/*Number of stops allowed per gradient. Increase this to allow more stops.
+ *This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
+#define LV_GRADIENT_MAX_STOPS 2
+
+/*Default gradient buffer size.
+ *When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
+ *LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
+ *If the cache is too small the map will be allocated only while it's required for the drawing.
+ *0 mean no caching.*/
+#define LV_GRAD_CACHE_DEF_SIZE 0
+
+/*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
+ *LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
+ *The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */
+#define LV_DITHER_GRADIENT 0
+#if LV_DITHER_GRADIENT
+ /*Add support for error diffusion dithering.
+ *Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing.
+ *The increase in memory consumption is (24 bits * object's width)*/
+ #define LV_DITHER_ERROR_DIFFUSION 0
+#endif
+
+/*Maximum buffer size to allocate for rotation.
+ *Only used if software rotation is enabled in the display driver.*/
+#define LV_DISP_ROT_MAX_BUF (10*1024)
+
+/*-------------
+ * GPU
+ *-----------*/
+
+/*Use Arm's 2D acceleration library Arm-2D */
+#define LV_USE_GPU_ARM2D 0
+
+/*Use STM32's DMA2D (aka Chrom Art) GPU*/
+#define LV_USE_GPU_STM32_DMA2D 0
+#if LV_USE_GPU_STM32_DMA2D
+ /*Must be defined to include path of CMSIS header of target processor
+ e.g. "stm32f7xx.h" or "stm32f4xx.h"*/
+ #define LV_GPU_DMA2D_CMSIS_INCLUDE
+#endif
+
+/*Enable RA6M3 G2D GPU*/
+#define LV_USE_GPU_RA6M3_G2D 0
+#if LV_USE_GPU_RA6M3_G2D
+ /*include path of target processor
+ e.g. "hal_data.h"*/
+ #define LV_GPU_RA6M3_G2D_INCLUDE "hal_data.h"
+#endif
+
+/*Use SWM341's DMA2D GPU*/
+#define LV_USE_GPU_SWM341_DMA2D 0
+#if LV_USE_GPU_SWM341_DMA2D
+ #define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h"
+#endif
+
+/*Use NXP's PXP GPU iMX RTxxx platforms*/
+#define LV_USE_GPU_NXP_PXP 0
+#if LV_USE_GPU_NXP_PXP
+ /*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
+ * and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
+ * has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
+ *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
+ */
+ #define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
+#endif
+
+/*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
+#define LV_USE_GPU_NXP_VG_LITE 0
+
+/*Use SDL renderer API*/
+#define LV_USE_GPU_SDL 0
+#if LV_USE_GPU_SDL
+ #define LV_GPU_SDL_INCLUDE_PATH
+ /*Texture cache size, 8MB by default*/
+ #define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8)
+ /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/
+ #define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6))
+#endif
+
+/*-------------
+ * Logging
+ *-----------*/
+
+/*Enable the log module*/
+#define LV_USE_LOG 0
+#if LV_USE_LOG
+
+ /*How important log should be added:
+ *LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
+ *LV_LOG_LEVEL_INFO Log important events
+ *LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
+ *LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
+ *LV_LOG_LEVEL_USER Only logs added by the user
+ *LV_LOG_LEVEL_NONE Do not log anything*/
+ #define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
+
+ /*1: Print the log with 'printf';
+ *0: User need to register a callback with `lv_log_register_print_cb()`*/
+ #define LV_LOG_PRINTF 0
+
+ /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
+ #define LV_LOG_TRACE_MEM 1
+ #define LV_LOG_TRACE_TIMER 1
+ #define LV_LOG_TRACE_INDEV 1
+ #define LV_LOG_TRACE_DISP_REFR 1
+ #define LV_LOG_TRACE_EVENT 1
+ #define LV_LOG_TRACE_OBJ_CREATE 1
+ #define LV_LOG_TRACE_LAYOUT 1
+ #define LV_LOG_TRACE_ANIM 1
+
+#endif /*LV_USE_LOG*/
+
+/*-------------
+ * Asserts
+ *-----------*/
+
+/*Enable asserts if an operation is failed or an invalid data is found.
+ *If LV_USE_LOG is enabled an error message will be printed on failure*/
+#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
+#define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
+#define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/
+#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
+#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
+
+/*Add a custom handler when assert happens e.g. to restart the MCU*/
+#define LV_ASSERT_HANDLER_INCLUDE
+#define LV_ASSERT_HANDLER while(1); /*Halt by default*/
+
+/*-------------
+ * Others
+ *-----------*/
+
+/*1: Show CPU usage and FPS count*/
+#define LV_USE_PERF_MONITOR 0
+#if LV_USE_PERF_MONITOR
+ #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
+#endif
+
+/*1: Show the used memory and the memory fragmentation
+ * Requires LV_MEM_CUSTOM = 0*/
+#define LV_USE_MEM_MONITOR 0
+#if LV_USE_MEM_MONITOR
+ #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
+#endif
+
+/*1: Draw random colored rectangles over the redrawn areas*/
+#define LV_USE_REFR_DEBUG 0
+
+/*Change the built in (v)snprintf functions*/
+#define LV_SPRINTF_CUSTOM 0
+#if LV_SPRINTF_CUSTOM
+ #define LV_SPRINTF_INCLUDE
+ #define lv_snprintf snprintf
+ #define lv_vsnprintf vsnprintf
+#else /*LV_SPRINTF_CUSTOM*/
+ #define LV_SPRINTF_USE_FLOAT 0
+#endif /*LV_SPRINTF_CUSTOM*/
+
+#define LV_USE_USER_DATA 1
+
+/*Garbage Collector settings
+ *Used if lvgl is bound to higher level language and the memory is managed by that language*/
+#define LV_ENABLE_GC 0
+#if LV_ENABLE_GC != 0
+ #define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
+#endif /*LV_ENABLE_GC*/
+
+/*=====================
+ * COMPILER SETTINGS
+ *====================*/
+
+/*For big endian systems set to 1*/
+#define LV_BIG_ENDIAN_SYSTEM 0
+
+/*Define a custom attribute to `lv_tick_inc` function*/
+#define LV_ATTRIBUTE_TICK_INC
+
+/*Define a custom attribute to `lv_timer_handler` function*/
+#define LV_ATTRIBUTE_TIMER_HANDLER
+
+/*Define a custom attribute to `lv_disp_flush_ready` function*/
+#define LV_ATTRIBUTE_FLUSH_READY
+
+/*Required alignment size for buffers*/
+#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
+
+/*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
+ * E.g. __attribute__((aligned(4)))*/
+#define LV_ATTRIBUTE_MEM_ALIGN
+
+/*Attribute to mark large constant arrays for example font's bitmaps*/
+#define LV_ATTRIBUTE_LARGE_CONST
+
+/*Compiler prefix for a big array declaration in RAM*/
+#define LV_ATTRIBUTE_LARGE_RAM_ARRAY
+
+/*Place performance critical functions into a faster memory (e.g RAM)*/
+#define LV_ATTRIBUTE_FAST_MEM
+
+/*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
+
+/*Export integer constant to binding. This macro is used with constants in the form of LV_ that
+ *should also appear on LVGL binding API such as Micropython.*/
+#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
+
+/*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/
+#define LV_USE_LARGE_COORD 0
+
+/*==================
+ * FONT USAGE
+ *===================*/
+
+/*Montserrat fonts with ASCII range and some symbols using bpp = 4
+ *https://fonts.google.com/specimen/Montserrat*/
+#define LV_FONT_MONTSERRAT_8 0
+#define LV_FONT_MONTSERRAT_10 0
+#define LV_FONT_MONTSERRAT_12 0
+#define LV_FONT_MONTSERRAT_14 1
+#define LV_FONT_MONTSERRAT_16 0
+#define LV_FONT_MONTSERRAT_18 0
+#define LV_FONT_MONTSERRAT_20 0
+#define LV_FONT_MONTSERRAT_22 0
+#define LV_FONT_MONTSERRAT_24 0
+#define LV_FONT_MONTSERRAT_26 0
+#define LV_FONT_MONTSERRAT_28 0
+#define LV_FONT_MONTSERRAT_30 0
+#define LV_FONT_MONTSERRAT_32 0
+#define LV_FONT_MONTSERRAT_34 0
+#define LV_FONT_MONTSERRAT_36 0
+#define LV_FONT_MONTSERRAT_38 0
+#define LV_FONT_MONTSERRAT_40 0
+#define LV_FONT_MONTSERRAT_42 0
+#define LV_FONT_MONTSERRAT_44 0
+#define LV_FONT_MONTSERRAT_46 0
+#define LV_FONT_MONTSERRAT_48 0
+
+/*Demonstrate special features*/
+#define LV_FONT_MONTSERRAT_12_SUBPX 0
+#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
+#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
+#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
+
+/*Pixel perfect monospace fonts*/
+#define LV_FONT_UNSCII_8 0
+#define LV_FONT_UNSCII_16 0
+
+/*Optionally declare custom fonts here.
+ *You can use these fonts as default font too and they will be available globally.
+ *E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
+#define LV_FONT_CUSTOM_DECLARE
+
+/*Always set a default font*/
+#define LV_FONT_DEFAULT &lv_font_montserrat_14
+
+/*Enable handling large font and/or fonts with a lot of characters.
+ *The limit depends on the font size, font face and bpp.
+ *Compiler error will be triggered if a font needs it.*/
+#define LV_FONT_FMT_TXT_LARGE 0
+
+/*Enables/disables support for compressed fonts.*/
+#define LV_USE_FONT_COMPRESSED 0
+
+/*Enable subpixel rendering*/
+#define LV_USE_FONT_SUBPX 0
+#if LV_USE_FONT_SUBPX
+ /*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
+ #define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/
+#endif
+
+/*Enable drawing placeholders when glyph dsc is not found*/
+#define LV_USE_FONT_PLACEHOLDER 1
+
+/*=================
+ * TEXT SETTINGS
+ *=================*/
+
+/**
+ * Select a character encoding for strings.
+ * Your IDE or editor should have the same character encoding
+ * - LV_TXT_ENC_UTF8
+ * - LV_TXT_ENC_ASCII
+ */
+#define LV_TXT_ENC LV_TXT_ENC_UTF8
+
+/*Can break (wrap) texts on these chars*/
+#define LV_TXT_BREAK_CHARS " ,.;:-_"
+
+/*If a word is at least this long, will break wherever "prettiest"
+ *To disable, set to a value <= 0*/
+#define LV_TXT_LINE_BREAK_LONG_LEN 0
+
+/*Minimum number of characters in a long word to put on a line before a break.
+ *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
+#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
+
+/*Minimum number of characters in a long word to put on a line after a break.
+ *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
+#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
+
+/*The control character to use for signalling text recoloring.*/
+#define LV_TXT_COLOR_CMD "#"
+
+/*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
+ *The direction will be processed according to the Unicode Bidirectional Algorithm:
+ *https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
+#define LV_USE_BIDI 0
+#if LV_USE_BIDI
+ /*Set the default direction. Supported values:
+ *`LV_BASE_DIR_LTR` Left-to-Right
+ *`LV_BASE_DIR_RTL` Right-to-Left
+ *`LV_BASE_DIR_AUTO` detect texts base direction*/
+ #define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
+#endif
+
+/*Enable Arabic/Persian processing
+ *In these languages characters should be replaced with an other form based on their position in the text*/
+#define LV_USE_ARABIC_PERSIAN_CHARS 0
+
+/*==================
+ * WIDGET USAGE
+ *================*/
+
+/*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
+
+#define LV_USE_ARC 1
+
+#define LV_USE_BAR 1
+
+#define LV_USE_BTN 1
+
+#define LV_USE_BTNMATRIX 1
+
+#define LV_USE_CANVAS 1
+
+#define LV_USE_CHECKBOX 1
+
+#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/
+
+#define LV_USE_IMG 1 /*Requires: lv_label*/
+
+#define LV_USE_LABEL 1
+#if LV_USE_LABEL
+ #define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
+ #define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/
+#endif
+
+#define LV_USE_LINE 1
+
+#define LV_USE_ROLLER 1 /*Requires: lv_label*/
+#if LV_USE_ROLLER
+ #define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/
+#endif
+
+#define LV_USE_SLIDER 1 /*Requires: lv_bar*/
+
+#define LV_USE_SWITCH 1
+
+#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/
+#if LV_USE_TEXTAREA != 0
+ #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
+#endif
+
+#define LV_USE_TABLE 1
+
+/*==================
+ * EXTRA COMPONENTS
+ *==================*/
+
+/*-----------
+ * Widgets
+ *----------*/
+#define LV_USE_ANIMIMG 1
+
+#define LV_USE_CALENDAR 1
+#if LV_USE_CALENDAR
+ #define LV_CALENDAR_WEEK_STARTS_MONDAY 0
+ #if LV_CALENDAR_WEEK_STARTS_MONDAY
+ #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
+ #else
+ #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
+ #endif
+
+ #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
+ #define LV_USE_CALENDAR_HEADER_ARROW 1
+ #define LV_USE_CALENDAR_HEADER_DROPDOWN 1
+#endif /*LV_USE_CALENDAR*/
+
+#define LV_USE_CHART 1
+
+#define LV_USE_COLORWHEEL 1
+
+#define LV_USE_IMGBTN 1
+
+#define LV_USE_KEYBOARD 1
+
+#define LV_USE_LED 1
+
+#define LV_USE_LIST 1
+
+#define LV_USE_MENU 1
+
+#define LV_USE_METER 1
+
+#define LV_USE_MSGBOX 1
+
+#define LV_USE_SPAN 1
+#if LV_USE_SPAN
+ /*A line text can contain maximum num of span descriptor */
+ #define LV_SPAN_SNIPPET_STACK_SIZE 64
+#endif
+
+#define LV_USE_SPINBOX 1
+
+#define LV_USE_SPINNER 1
+
+#define LV_USE_TABVIEW 1
+
+#define LV_USE_TILEVIEW 1
+
+#define LV_USE_WIN 1
+
+/*-----------
+ * Themes
+ *----------*/
+
+/*A simple, impressive and very complete theme*/
+#define LV_USE_THEME_DEFAULT 1
+#if LV_USE_THEME_DEFAULT
+
+ /*0: Light mode; 1: Dark mode*/
+ #define LV_THEME_DEFAULT_DARK 0
+
+ /*1: Enable grow on press*/
+ #define LV_THEME_DEFAULT_GROW 1
+
+ /*Default transition time in [ms]*/
+ #define LV_THEME_DEFAULT_TRANSITION_TIME 80
+#endif /*LV_USE_THEME_DEFAULT*/
+
+/*A very simple theme that is a good starting point for a custom theme*/
+#define LV_USE_THEME_BASIC 1
+
+/*A theme designed for monochrome displays*/
+#define LV_USE_THEME_MONO 1
+
+/*-----------
+ * Layouts
+ *----------*/
+
+/*A layout similar to Flexbox in CSS.*/
+#define LV_USE_FLEX 1
+
+/*A layout similar to Grid in CSS.*/
+#define LV_USE_GRID 1
+
+/*---------------------
+ * 3rd party libraries
+ *--------------------*/
+
+/*File system interfaces for common APIs */
+
+/*API for fopen, fread, etc*/
+#define LV_USE_FS_STDIO 0
+#if LV_USE_FS_STDIO
+ #define LV_FS_STDIO_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
+ #define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for open, read, etc*/
+#define LV_USE_FS_POSIX 0
+#if LV_USE_FS_POSIX
+ #define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
+ #define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for CreateFile, ReadFile, etc*/
+#define LV_USE_FS_WIN32 0
+#if LV_USE_FS_WIN32
+ #define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
+ #define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/
+#define LV_USE_FS_FATFS 0
+#if LV_USE_FS_FATFS
+ #define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*API for LittleFS (library needs to be added separately). Uses lfs_file_open, lfs_file_read, etc*/
+#define LV_USE_FS_LITTLEFS 0
+#if LV_USE_FS_LITTLEFS
+ #define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_LITTLEFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+#endif
+
+/*PNG decoder library*/
+#define LV_USE_PNG 0
+
+/*BMP decoder library*/
+#define LV_USE_BMP 0
+
+/* JPG + split JPG decoder library.
+ * Split JPG is a custom format optimized for embedded systems. */
+#define LV_USE_SJPG 0
+
+/*GIF decoder library*/
+#define LV_USE_GIF 0
+
+/*QR code library*/
+#define LV_USE_QRCODE 0
+
+/*FreeType library*/
+#define LV_USE_FREETYPE 0
+#if LV_USE_FREETYPE
+ /*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
+ #define LV_FREETYPE_CACHE_SIZE (16 * 1024)
+ #if LV_FREETYPE_CACHE_SIZE >= 0
+ /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
+ /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
+ /* if font size >= 256, must be configured as image cache */
+ #define LV_FREETYPE_SBIT_CACHE 0
+ /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
+ /* (0:use system defaults) */
+ #define LV_FREETYPE_CACHE_FT_FACES 0
+ #define LV_FREETYPE_CACHE_FT_SIZES 0
+ #endif
+#endif
+
+/*Tiny TTF library*/
+#define LV_USE_TINY_TTF 0
+#if LV_USE_TINY_TTF
+ /*Load TTF data from files*/
+ #define LV_TINY_TTF_FILE_SUPPORT 0
+#endif
+
+/*Rlottie library*/
+#define LV_USE_RLOTTIE 0
+
+/*FFmpeg library for image decoding and playing videos
+ *Supports all major image formats so do not enable other image decoder with it*/
+#define LV_USE_FFMPEG 0
+#if LV_USE_FFMPEG
+ /*Dump input information to stderr*/
+ #define LV_FFMPEG_DUMP_FORMAT 0
+#endif
+
+/*-----------
+ * Others
+ *----------*/
+
+/*1: Enable API to take snapshot for object*/
+#define LV_USE_SNAPSHOT 0
+
+/*1: Enable Monkey test*/
+#define LV_USE_MONKEY 0
+
+/*1: Enable grid navigation*/
+#define LV_USE_GRIDNAV 0
+
+/*1: Enable lv_obj fragment*/
+#define LV_USE_FRAGMENT 0
+
+/*1: Support using images as font in label or span widgets */
+#define LV_USE_IMGFONT 0
+
+/*1: Enable a published subscriber based messaging system */
+#define LV_USE_MSG 0
+
+/*1: Enable Pinyin input method*/
+/*Requires: lv_keyboard*/
+#define LV_USE_IME_PINYIN 0
+#if LV_USE_IME_PINYIN
+ /*1: Use default thesaurus*/
+ /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
+ #define LV_IME_PINYIN_USE_DEFAULT_DICT 1
+ /*Set the maximum number of candidate panels that can be displayed*/
+ /*This needs to be adjusted according to the size of the screen*/
+ #define LV_IME_PINYIN_CAND_TEXT_NUM 6
+
+ /*Use 9 key input(k9)*/
+ #define LV_IME_PINYIN_USE_K9_MODE 1
+ #if LV_IME_PINYIN_USE_K9_MODE == 1
+ #define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
+ #endif // LV_IME_PINYIN_USE_K9_MODE
+#endif
+
+/*==================
+* EXAMPLES
+*==================*/
+
+/*Enable the examples to be built with the library*/
+#define LV_BUILD_EXAMPLES 1
+
+/*===================
+ * DEMO USAGE
+ ====================*/
+
+/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
+#define LV_USE_DEMO_WIDGETS 0
+#if LV_USE_DEMO_WIDGETS
+#define LV_DEMO_WIDGETS_SLIDESHOW 0
+#endif
+
+/*Demonstrate the usage of encoder and keyboard*/
+#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
+
+/*Benchmark your system*/
+#define LV_USE_DEMO_BENCHMARK 0
+#if LV_USE_DEMO_BENCHMARK
+/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
+#define LV_DEMO_BENCHMARK_RGB565A8 0
+#endif
+
+/*Stress test for LVGL*/
+#define LV_USE_DEMO_STRESS 0
+
+/*Music player demo*/
+#define LV_USE_DEMO_MUSIC 0
+#if LV_USE_DEMO_MUSIC
+ #define LV_DEMO_MUSIC_SQUARE 0
+ #define LV_DEMO_MUSIC_LANDSCAPE 0
+ #define LV_DEMO_MUSIC_ROUND 0
+ #define LV_DEMO_MUSIC_LARGE 0
+ #define LV_DEMO_MUSIC_AUTO_PLAY 0
+#endif
+
+/*--END OF LV_CONF_H--*/
+
+#endif /*LV_CONF_H*/
+
+#endif /*End of "Content enable"*/
diff --git a/lib/lvgl/lvgl.h b/lib/lvgl/lvgl.h
index cafe51c..72be09d 100644
--- a/lib/lvgl/lvgl.h
+++ b/lib/lvgl/lvgl.h
@@ -14,9 +14,9 @@ extern "C" {
* CURRENT VERSION OF LVGL
***************************/
#define LVGL_VERSION_MAJOR 8
-#define LVGL_VERSION_MINOR 3
+#define LVGL_VERSION_MINOR 4
#define LVGL_VERSION_PATCH 0
-#define LVGL_VERSION_INFO "dev"
+#define LVGL_VERSION_INFO ""
/*********************
* INCLUDES
diff --git a/lib/lvgl/lvgl.pc.in b/lib/lvgl/lvgl.pc.in
new file mode 100644
index 0000000..eeec2b6
--- /dev/null
+++ b/lib/lvgl/lvgl.pc.in
@@ -0,0 +1,10 @@
+prefix="@CMAKE_INSTALL_PREFIX@"
+includedir="${prefix}/@INC_INSTALL_DIR@"
+libdir=${prefix}/lib
+
+Name: lvgl
+Description: Light and Versatile Graphics Library
+URL: https://lvgl.io/
+Version: 8.4.0
+Cflags: -I${includedir}
+Libs: -L${libdir} -llvgl
diff --git a/lib/lvgl/scripts/build_html_examples.sh b/lib/lvgl/scripts/build_html_examples.sh
index 4c66ed7..ae8b631 100644
--- a/lib/lvgl/scripts/build_html_examples.sh
+++ b/lib/lvgl/scripts/build_html_examples.sh
@@ -6,6 +6,7 @@ rm -rf emscripten_builder
git clone https://github.com/lvgl/lv_sim_emscripten.git emscripten_builder
scripts/genexamplelist.sh > emscripten_builder/examplelist.c
cd emscripten_builder
+git checkout 45e0bc5c8d3e55cfbcaf8214361d2335b8b9a7b4
git submodule update --init -- lvgl
cd lvgl
git checkout $CURRENT_REF
diff --git a/lib/lvgl/scripts/code-format.cfg b/lib/lvgl/scripts/code-format.cfg
index fbe687e..159ef46 100644
--- a/lib/lvgl/scripts/code-format.cfg
+++ b/lib/lvgl/scripts/code-format.cfg
@@ -23,6 +23,7 @@
--preserve-date
--formatted
--ignore-exclude-errors
+--ignore-exclude-errors-x
--exclude=assets
--exclude=../src/core/lv_obj_style_gen.c
--exclude=../src/core/lv_obj_style_gen.h
diff --git a/lib/lvgl/scripts/code-format.py b/lib/lvgl/scripts/code-format.py
index 42faee6..fc126c8 100644
--- a/lib/lvgl/scripts/code-format.py
+++ b/lib/lvgl/scripts/code-format.py
@@ -2,7 +2,14 @@
import os
+print("Formatting src")
os.system('astyle --options=code-format.cfg --recursive "../src/*.c,*.h"')
+
+print("\nFormatting demos")
os.system('astyle --options=code-format.cfg --recursive "../demos/*.c,*.h"')
+
+print("\nFormatting examples")
os.system('astyle --options=code-format.cfg --recursive "../examples/*.c,*.h"')
+
+print("\nFormatting tests")
os.system('astyle --options=code-format.cfg --recursive "../tests/src/test_cases/*.c"')
diff --git a/lib/lvgl/scripts/lv_conf_internal_gen.py b/lib/lvgl/scripts/lv_conf_internal_gen.py
index 34e937e..0347827 100644
--- a/lib/lvgl/scripts/lv_conf_internal_gen.py
+++ b/lib/lvgl/scripts/lv_conf_internal_gen.py
@@ -92,19 +92,19 @@ for line in fin.read().splitlines():
if '/*--END OF LV_CONF_H--*/' in line: break
#Is there a #define in this line?
- r = re.search(r'^([\s]*)#[\s]*define[\s]+([^\s]+).*$', line) # \s means any white space character
+ r = re.search(r'^([\s]*)#[\s]*(undef|define)[\s]+([^\s]+).*$', line) # \s means any white space character
if r:
indent = r[1]
- name = r[2]
+ name = r[3]
name = re.sub('\(.*?\)', '', name, 1) #remove parentheses from macros. E.g. MY_FUNC(5) -> MY_FUNC
- name_and_value = re.sub('[\s]*#[\s]*define', '', line, 1)
+ line = re.sub('[\s]*', '', line, 1)
#If the value should be 1 (enabled) by default use a more complex structure for Kconfig checks because
#if a not defined CONFIG_... value should be interpreted as 0 and not the LVGL default
- is_one = re.search(r'[\s]*#[\s]*define[\s]*[A-Z0-9_]+[\s]+1([\s]*$|[\s]+)', line)
+ is_one = re.search(r'#[\s]*define[\s]*[A-Z0-9_]+[\s]+1([\s]*$|[\s]+)', line)
if is_one:
#1. Use the value if already set from lv_conf.h or anything else (i.e. do nothing)
#2. In Kconfig environment use the CONFIG_... value if set, else use 0
@@ -119,7 +119,7 @@ for line in fin.read().splitlines():
f'{indent} #define {name} 0\n'
f'{indent} #endif\n'
f'{indent} #else\n'
- f'{indent} #define{name_and_value}\n'
+ f'{indent} {line}\n'
f'{indent} #endif\n'
f'{indent}#endif\n'
)
@@ -133,7 +133,7 @@ for line in fin.read().splitlines():
f'{indent} #ifdef CONFIG_{name.upper()}\n'
f'{indent} #define {name} CONFIG_{name.upper()}\n'
f'{indent} #else\n'
- f'{indent} #define{name_and_value}\n'
+ f'{indent} {line}\n'
f'{indent} #endif\n'
f'{indent}#endif\n'
)
diff --git a/lib/lvgl/scripts/style_api_gen.py b/lib/lvgl/scripts/style_api_gen.py
index 8e1f008..2765cce 100644
--- a/lib/lvgl/scripts/style_api_gen.py
+++ b/lib/lvgl/scripts/style_api_gen.py
@@ -60,11 +60,19 @@ props = [
{'name': 'TRANSFORM_ZOOM',
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 1,
- 'dsc': "Zoom image-like objects. Multiplied with the zoom set on the object. The value 256 (or `LV_IMG_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on" },
+ 'dsc': "Zoom an objects. The value 256 (or `LV_IMG_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on" },
{'name': 'TRANSFORM_ANGLE',
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 1,
- 'dsc': "Rotate image-like objects. Added to the rotation set on the object. The value is interpreted in 0.1 degree units. E.g. 45 deg. = 450"},
+ 'dsc': "Rotate an objects. The value is interpreted in 0.1 degree units. E.g. 450 means 45 deg."},
+
+{'name': 'TRANSFORM_PIVOT_X',
+ 'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
+ 'dsc': "Set the pivot point's X coordinate for transformations. Relative to the object's top left corner'"},
+
+{'name': 'TRANSFORM_PIVOT_Y',
+ 'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
+ 'dsc': "Set the pivot point's Y coordinate for transformations. Relative to the object's top left corner'"},
{'section': 'Padding', 'dsc' : "Properties to describe spacing between the parent's sides and the children and among the children. Very similar to the padding properties in HTML."},
{'name': 'PAD_TOP',
@@ -155,7 +163,7 @@ props = [
{'name': 'BORDER_WIDTH',
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
- 'dsc': "Set hte width of the border. Only pixel values can be used."},
+ 'dsc': "Set the width of the border. Only pixel values can be used."},
{'name': 'BORDER_SIDE',
'style_type': 'num', 'var_type': 'lv_border_side_t', 'default':'`LV_BORDER_SIDE_NONE`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
@@ -308,6 +316,10 @@ props = [
'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
'dsc': "Scale down all opacity values of the object by this factor. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency." },
+{'name': 'OPA_LAYERED',
+ 'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
+ 'dsc': "First draw the object on the layer, then scale down layer opacity factor. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 255, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency." },
+
{'name': 'COLOR_FILTER_DSC',
'style_type': 'ptr', 'var_type': 'const lv_color_filter_dsc_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
'dsc': "Mix a color to all colors of the object." },
@@ -338,7 +350,7 @@ props = [
{'name': 'LAYOUT',
'style_type': 'num', 'var_type': 'uint16_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
- 'dsc': "Set the layout if the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts."},
+ 'dsc': "Set the layout of the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts."},
{'name': 'BASE_DIR',
'style_type': 'num', 'var_type': 'lv_base_dir_t', 'default':'`LV_BASE_DIR_AUTO`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
diff --git a/lib/lvgl/src/core/lv_disp.c b/lib/lvgl/src/core/lv_disp.c
index 3bde170..8f64002 100644
--- a/lib/lvgl/src/core/lv_disp.c
+++ b/lib/lvgl/src/core/lv_disp.c
@@ -21,7 +21,7 @@
/**********************
* STATIC PROTOTYPES
**********************/
-
+static void scr_load_internal(lv_obj_t * scr);
static void scr_load_anim_start(lv_anim_t * a);
static void opa_scale_anim(void * obj, int32_t v);
static void set_x_anim(void * obj, int32_t v);
@@ -81,20 +81,7 @@ lv_obj_t * lv_disp_get_scr_prev(lv_disp_t * disp)
*/
void lv_disp_load_scr(lv_obj_t * scr)
{
- lv_disp_t * d = lv_obj_get_disp(scr);
- if(!d) return; /*Shouldn't happen, just to be sure*/
-
- lv_obj_t * old_scr = d->act_scr;
-
- if(d->act_scr) lv_event_send(old_scr, LV_EVENT_SCREEN_UNLOAD_START, NULL);
- if(d->act_scr) lv_event_send(scr, LV_EVENT_SCREEN_LOAD_START, NULL);
-
- d->act_scr = scr;
-
- if(d->act_scr) lv_event_send(scr, LV_EVENT_SCREEN_LOADED, NULL);
- if(d->act_scr) lv_event_send(old_scr, LV_EVENT_SCREEN_UNLOADED, NULL);
-
- lv_obj_invalidate(scr);
+ lv_scr_load_anim(scr, LV_SCR_LOAD_ANIM_NONE, 0, 0, false);
}
/**
@@ -237,10 +224,13 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
lv_disp_t * d = lv_obj_get_disp(new_scr);
lv_obj_t * act_scr = lv_scr_act();
+ if(act_scr == new_scr || d->scr_to_load == new_scr) {
+ return;
+ }
+
/*If an other screen load animation is in progress
*make target screen loaded immediately. */
- if(d->scr_to_load && act_scr != d->scr_to_load) {
- lv_disp_load_scr(d->scr_to_load);
+ if(d->scr_to_load) {
lv_anim_del(d->scr_to_load, NULL);
lv_obj_set_pos(d->scr_to_load, 0, 0);
lv_obj_remove_local_style_prop(d->scr_to_load, LV_STYLE_OPA, 0);
@@ -249,6 +239,8 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
lv_obj_del(act_scr);
}
act_scr = d->scr_to_load;
+
+ scr_load_internal(d->scr_to_load);
}
d->scr_to_load = new_scr;
@@ -271,6 +263,13 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
lv_obj_remove_local_style_prop(new_scr, LV_STYLE_OPA, 0);
lv_obj_remove_local_style_prop(lv_scr_act(), LV_STYLE_OPA, 0);
+ /*Shortcut for immediate load*/
+ if(time == 0 && delay == 0) {
+ scr_load_internal(new_scr);
+ if(auto_del) lv_obj_del(act_scr);
+ return;
+ }
+
lv_anim_t a_new;
lv_anim_init(&a_new);
lv_anim_set_var(&a_new, new_scr);
@@ -365,7 +364,6 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
lv_anim_start(&a_new);
lv_anim_start(&a_old);
-
}
/**
@@ -420,6 +418,38 @@ void lv_disp_clean_dcache(lv_disp_t * disp)
disp->driver->clean_dcache_cb(disp->driver);
}
+/**
+ * Temporarily enable and disable the invalidation of the display.
+ * @param disp pointer to a display (NULL to use the default display)
+ * @param en true: enable invalidation; false: invalidation
+ */
+void lv_disp_enable_invalidation(lv_disp_t * disp, bool en)
+{
+ if(!disp) disp = lv_disp_get_default();
+ if(!disp) {
+ LV_LOG_WARN("no display registered");
+ return;
+ }
+
+ disp->inv_en_cnt += en ? 1 : -1;
+}
+
+/**
+ * Get display invalidation is enabled.
+ * @param disp pointer to a display (NULL to use the default display)
+ * @return return true if invalidation is enabled
+ */
+bool lv_disp_is_invalidation_enabled(lv_disp_t * disp)
+{
+ if(!disp) disp = lv_disp_get_default();
+ if(!disp) {
+ LV_LOG_WARN("no display registered");
+ return false;
+ }
+
+ return (disp->inv_en_cnt > 0);
+}
+
/**
* Get a pointer to the screen refresher timer to
* modify its parameters with `lv_timer_...` functions.
@@ -441,6 +471,25 @@ lv_timer_t * _lv_disp_get_refr_timer(lv_disp_t * disp)
* STATIC FUNCTIONS
**********************/
+static void scr_load_internal(lv_obj_t * scr)
+{
+ lv_disp_t * d = lv_obj_get_disp(scr);
+ if(!d) return; /*Shouldn't happen, just to be sure*/
+
+ lv_obj_t * old_scr = d->act_scr;
+
+ if(d->act_scr) lv_event_send(old_scr, LV_EVENT_SCREEN_UNLOAD_START, NULL);
+ if(d->act_scr) lv_event_send(scr, LV_EVENT_SCREEN_LOAD_START, NULL);
+
+ d->act_scr = scr;
+ d->scr_to_load = NULL;
+
+ if(d->act_scr) lv_event_send(scr, LV_EVENT_SCREEN_LOADED, NULL);
+ if(d->act_scr) lv_event_send(old_scr, LV_EVENT_SCREEN_UNLOADED, NULL);
+
+ lv_obj_invalidate(scr);
+}
+
static void scr_load_anim_start(lv_anim_t * a)
{
lv_disp_t * d = lv_obj_get_disp(a->var);
@@ -478,6 +527,7 @@ static void scr_anim_ready(lv_anim_t * a)
d->draw_prev_over_act = false;
d->scr_to_load = NULL;
lv_obj_remove_local_style_prop(a->var, LV_STYLE_OPA, 0);
+ lv_obj_invalidate(d->act_scr);
}
static bool is_out_anim(lv_scr_load_anim_t anim_type)
@@ -487,4 +537,4 @@ static bool is_out_anim(lv_scr_load_anim_t anim_type)
anim_type == LV_SCR_LOAD_ANIM_OUT_RIGHT ||
anim_type == LV_SCR_LOAD_ANIM_OUT_TOP ||
anim_type == LV_SCR_LOAD_ANIM_OUT_BOTTOM;
-}
\ No newline at end of file
+}
diff --git a/lib/lvgl/src/core/lv_disp.h b/lib/lvgl/src/core/lv_disp.h
index 3b58e62..7854cb7 100644
--- a/lib/lvgl/src/core/lv_disp.h
+++ b/lib/lvgl/src/core/lv_disp.h
@@ -148,6 +148,20 @@ void lv_disp_trig_activity(lv_disp_t * disp);
*/
void lv_disp_clean_dcache(lv_disp_t * disp);
+/**
+ * Temporarily enable and disable the invalidation of the display.
+ * @param disp pointer to a display (NULL to use the default display)
+ * @param en true: enable invalidation; false: invalidation
+ */
+void lv_disp_enable_invalidation(lv_disp_t * disp, bool en);
+
+/**
+ * Get display invalidation is enabled.
+ * @param disp pointer to a display (NULL to use the default display)
+ * @return return true if invalidation is enabled
+ */
+bool lv_disp_is_invalidation_enabled(lv_disp_t * disp);
+
/**
* Get a pointer to the screen refresher timer to
* modify its parameters with `lv_timer_...` functions.
diff --git a/lib/lvgl/src/core/lv_event.c b/lib/lvgl/src/core/lv_event.c
index f53ceac..1ca9672 100644
--- a/lib/lvgl/src/core/lv_event.c
+++ b/lib/lvgl/src/core/lv_event.c
@@ -30,7 +30,6 @@ static lv_event_dsc_t * lv_obj_get_event_dsc(const lv_obj_t * obj, uint32_t id);
static lv_res_t event_send_core(lv_event_t * e);
static bool event_is_bubbled(lv_event_t * e);
-
/**********************
* STATIC VARIABLES
**********************/
@@ -80,7 +79,6 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_code_t event_code, void * param)
return res;
}
-
lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e)
{
const lv_obj_class_t * base;
@@ -104,7 +102,6 @@ lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e)
return res;
}
-
lv_obj_t * lv_event_get_target(lv_event_t * e)
{
return e->target;
@@ -140,7 +137,6 @@ void lv_event_stop_processing(lv_event_t * e)
e->stop_processing = 1;
}
-
uint32_t lv_event_register_id(void)
{
static uint32_t last_id = _LV_EVENT_LAST;
@@ -158,7 +154,6 @@ void _lv_event_mark_deleted(lv_obj_t * obj)
}
}
-
struct _lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter,
void * user_data)
{
@@ -226,7 +221,6 @@ bool lv_obj_remove_event_cb_with_user_data(lv_obj_t * obj, lv_event_cb_t event_c
return false;
}
-
bool lv_obj_remove_event_dsc(lv_obj_t * obj, struct _lv_event_dsc_t * event_dsc)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
diff --git a/lib/lvgl/src/core/lv_event.h b/lib/lvgl/src/core/lv_event.h
index d5a9eb6..d89d438 100644
--- a/lib/lvgl/src/core/lv_event.h
+++ b/lib/lvgl/src/core/lv_event.h
@@ -86,7 +86,6 @@ typedef enum {
_LV_EVENT_LAST, /** Number of default events*/
-
LV_EVENT_PREPROCESS = 0x80, /** This is a flag that can be set with an event so it's processed
before the class default event processing */
} lv_event_code_t;
@@ -223,7 +222,6 @@ uint32_t lv_event_register_id(void);
*/
void _lv_event_mark_deleted(struct _lv_obj_t * obj);
-
/**
* Add an event handler function for an object.
* Used by the user to react on event which happens with the object.
diff --git a/lib/lvgl/src/core/lv_group.c b/lib/lvgl/src/core/lv_group.c
index 72898a1..530e38f 100644
--- a/lib/lvgl/src/core/lv_group.c
+++ b/lib/lvgl/src/core/lv_group.c
@@ -24,7 +24,7 @@
/**********************
* STATIC PROTOTYPES
**********************/
-static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
+static bool focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
void * (*move)(const lv_ll_t *, const void *));
static void lv_group_refocus(lv_group_t * g);
static lv_indev_t * get_indev(const lv_group_t * g);
@@ -57,6 +57,7 @@ lv_group_t * lv_group_create(void)
group->obj_focus = NULL;
group->frozen = 0;
group->focus_cb = NULL;
+ group->edge_cb = NULL;
group->editing = 0;
group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV;
group->wrap = 1;
@@ -91,6 +92,7 @@ void lv_group_del(lv_group_t * group)
indev = lv_indev_get_next(indev);
}
+ if(default_group == group) default_group = NULL;
_lv_ll_clear(&(group->obj_ll));
_lv_ll_remove(&LV_GC_ROOT(_lv_group_ll), group);
lv_mem_free(group);
@@ -112,6 +114,9 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj)
LV_LOG_TRACE("begin");
+ /*Be sure the object is removed from its current group*/
+ lv_group_remove_obj(obj);
+
/*Do not add the object twice*/
lv_obj_t ** obj_i;
_LV_LL_READ(&group->obj_ll, obj_i) {
@@ -162,8 +167,9 @@ void lv_group_swap_obj(lv_obj_t * obj1, lv_obj_t * obj2)
else if((*obj_i) == obj2)(*obj_i) = obj1;
}
- if(*g1->obj_focus == obj1) lv_group_focus_obj(obj2);
- else if(*g1->obj_focus == obj2) lv_group_focus_obj(obj1);
+ lv_obj_t * focused = lv_group_get_focused(g1);
+ if(focused == obj1) lv_group_focus_obj(obj2);
+ else if(focused == obj2) lv_group_focus_obj(obj1);
}
@@ -261,12 +267,20 @@ void lv_group_focus_obj(lv_obj_t * obj)
void lv_group_focus_next(lv_group_t * group)
{
- focus_next_core(group, _lv_ll_get_head, _lv_ll_get_next);
+ bool focus_changed = focus_next_core(group, _lv_ll_get_head, _lv_ll_get_next);
+ if(group->edge_cb) {
+ if(!focus_changed)
+ group->edge_cb(group, true);
+ }
}
void lv_group_focus_prev(lv_group_t * group)
{
- focus_next_core(group, _lv_ll_get_tail, _lv_ll_get_prev);
+ bool focus_changed = focus_next_core(group, _lv_ll_get_tail, _lv_ll_get_prev);
+ if(group->edge_cb) {
+ if(!focus_changed)
+ group->edge_cb(group, false);
+ }
}
void lv_group_focus_freeze(lv_group_t * group, bool en)
@@ -290,6 +304,11 @@ void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb)
group->focus_cb = focus_cb;
}
+void lv_group_set_edge_cb(lv_group_t * group, lv_group_edge_cb_t edge_cb)
+{
+ group->edge_cb = edge_cb;
+}
+
void lv_group_set_editing(lv_group_t * group, bool edit)
{
if(group == NULL) return;
@@ -332,6 +351,12 @@ lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group)
return group->focus_cb;
}
+lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t * group)
+{
+ if(!group) return NULL;
+ return group->edge_cb;
+}
+
bool lv_group_get_editing(const lv_group_t * group)
{
if(!group) return false;
@@ -366,10 +391,11 @@ static void lv_group_refocus(lv_group_t * g)
g->wrap = temp_wrap;
}
-static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
+static bool focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
void * (*move)(const lv_ll_t *, const void *))
{
- if(group->frozen) return;
+ bool focus_changed = false;
+ if(group->frozen) return focus_changed;
lv_obj_t ** obj_next = group->obj_focus;
lv_obj_t ** obj_sentinel = NULL;
@@ -379,27 +405,27 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *)
for(;;) {
if(obj_next == NULL) {
if(group->wrap || obj_sentinel == NULL) {
- if(!can_begin) return;
+ if(!can_begin) return focus_changed;
obj_next = begin(&group->obj_ll);
can_move = false;
can_begin = false;
}
else {
/*Currently focused object is the last/first in the group, keep it that way*/
- return;
+ return focus_changed;
}
}
if(obj_sentinel == NULL) {
obj_sentinel = obj_next;
- if(obj_sentinel == NULL) return; /*Group is empty*/
+ if(obj_sentinel == NULL) return focus_changed; /*Group is empty*/
}
if(can_move) {
obj_next = move(&group->obj_ll, obj_next);
/*Give up if we walked the entire list and haven't found another visible object*/
- if(obj_next == obj_sentinel) return;
+ if(obj_next == obj_sentinel) return focus_changed;
}
can_move = true;
@@ -421,22 +447,24 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *)
break;
}
- if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/
+ if(obj_next == group->obj_focus) return focus_changed; /*There's only one visible object and it's already focused*/
if(group->obj_focus) {
lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group));
- if(res != LV_RES_OK) return;
+ if(res != LV_RES_OK) return focus_changed;
lv_obj_invalidate(*group->obj_focus);
}
group->obj_focus = obj_next;
lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, get_indev(group));
- if(res != LV_RES_OK) return;
+ if(res != LV_RES_OK) return focus_changed;
lv_obj_invalidate(*group->obj_focus);
if(group->focus_cb) group->focus_cb(group);
+ focus_changed = true;
+ return focus_changed;
}
/**
diff --git a/lib/lvgl/src/core/lv_group.h b/lib/lvgl/src/core/lv_group.h
index ecf88df..3b8231a 100644
--- a/lib/lvgl/src/core/lv_group.h
+++ b/lib/lvgl/src/core/lv_group.h
@@ -50,6 +50,7 @@ struct _lv_obj_t;
struct _lv_group_t;
typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *);
+typedef void (*lv_group_edge_cb_t)(struct _lv_group_t *, bool);
/**
* Groups can be used to logically hold objects so that they can be individually focused.
@@ -60,6 +61,10 @@ typedef struct _lv_group_t {
struct _lv_obj_t ** obj_focus; /**< The object in focus*/
lv_group_focus_cb_t focus_cb; /**< A function to call when a new object is focused (optional)*/
+ lv_group_edge_cb_t edge_cb; /**< A function to call when an edge is reached, no more focus
+ targets are available in this direction (to allow edge feedback
+ like a sound or a scroll bounce) */
+
#if LV_USE_USER_DATA
void * user_data;
#endif
@@ -72,7 +77,6 @@ typedef struct _lv_group_t {
of list.*/
} lv_group_t;
-
typedef enum {
LV_GROUP_REFOCUS_POLICY_NEXT = 0,
LV_GROUP_REFOCUS_POLICY_PREV = 1
@@ -178,6 +182,13 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c);
*/
void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb);
+/**
+ * Set a function for a group which will be called when a focus edge is reached
+ * @param group pointer to a group
+ * @param edge_cb the call back function or NULL if unused
+ */
+void lv_group_set_edge_cb(lv_group_t * group, lv_group_edge_cb_t edge_cb);
+
/**
* Set whether the next or previous item in a group is focused if the currently focused obj is
* deleted.
@@ -214,6 +225,13 @@ struct _lv_obj_t * lv_group_get_focused(const lv_group_t * group);
*/
lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group);
+/**
+ * Get the edge callback function of a group
+ * @param group pointer to a group
+ * @return the call back function or NULL if not set
+ */
+lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t * group);
+
/**
* Get the current mode (edit or navigate).
* @param group pointer to group
diff --git a/lib/lvgl/src/core/lv_indev.c b/lib/lvgl/src/core/lv_indev.c
index 538c6bd..d753e44 100644
--- a/lib/lvgl/src/core/lv_indev.c
+++ b/lib/lvgl/src/core/lv_indev.c
@@ -303,16 +303,20 @@ lv_obj_t * lv_indev_search_obj(lv_obj_t * obj, lv_point_t * point)
/*If this obj is hidden the children are hidden too so return immediately*/
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return NULL;
- bool hit_test_ok = lv_obj_hit_test(obj, point);
+ lv_point_t p_trans = *point;
+ lv_obj_transform_point(obj, &p_trans, false, true);
+
+ bool hit_test_ok = lv_obj_hit_test(obj, &p_trans);
/*If the point is on this object or has overflow visible check its children too*/
- if(_lv_area_is_point_on(&obj->coords, point, 0) || lv_obj_has_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
+ if(_lv_area_is_point_on(&obj->coords, &p_trans, 0) || lv_obj_has_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
int32_t i;
uint32_t child_cnt = lv_obj_get_child_cnt(obj);
+
/*If a child matches use it*/
for(i = child_cnt - 1; i >= 0; i--) {
lv_obj_t * child = obj->spec_attr->children[i];
- found_p = lv_indev_search_obj(child, point);
+ found_p = lv_indev_search_obj(child, &p_trans);
if(found_p) return found_p;
}
}
@@ -351,16 +355,16 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
/*Simple sanity check*/
if(data->point.x < 0) {
- LV_LOG_WARN("X is %d which is smaller than zero", data->point.x);
+ LV_LOG_WARN("X is %d which is smaller than zero", (int)data->point.x);
}
if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) {
- LV_LOG_WARN("X is %d which is greater than hor. res", data->point.x);
+ LV_LOG_WARN("X is %d which is greater than hor. res", (int)data->point.x);
}
if(data->point.y < 0) {
- LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y);
+ LV_LOG_WARN("Y is %d which is smaller than zero", (int)data->point.y);
}
if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) {
- LV_LOG_WARN("Y is %d which is greater than ver. res", data->point.y);
+ LV_LOG_WARN("Y is %d which is greater than ver. res", (int)data->point.y);
}
/*Move the cursor if set and moved*/
@@ -847,7 +851,7 @@ static void indev_proc_press(_lv_indev_proc_t * proc)
if(indev_reset_check(proc)) return;
}
- /*If a new object was found reset some variables and send a pressed Call the ancestor's event handler*/
+ /*If a new object was found reset some variables and send a pressed event handler*/
if(indev_obj_act != proc->types.pointer.act_obj) {
proc->types.pointer.last_point.x = proc->types.pointer.act_point.x;
proc->types.pointer.last_point.y = proc->types.pointer.act_point.y;
@@ -895,11 +899,8 @@ static void indev_proc_press(_lv_indev_proc_t * proc)
proc->types.pointer.vect.x = proc->types.pointer.act_point.x - proc->types.pointer.last_point.x;
proc->types.pointer.vect.y = proc->types.pointer.act_point.y - proc->types.pointer.last_point.y;
- proc->types.pointer.scroll_throw_vect.x = (proc->types.pointer.scroll_throw_vect.x * 4) >> 3;
- proc->types.pointer.scroll_throw_vect.y = (proc->types.pointer.scroll_throw_vect.y * 4) >> 3;
-
- proc->types.pointer.scroll_throw_vect.x += (proc->types.pointer.vect.x * 4) >> 3;
- proc->types.pointer.scroll_throw_vect.y += (proc->types.pointer.vect.y * 4) >> 3;
+ proc->types.pointer.scroll_throw_vect.x = (proc->types.pointer.scroll_throw_vect.x + proc->types.pointer.vect.x) / 2;
+ proc->types.pointer.scroll_throw_vect.y = (proc->types.pointer.scroll_throw_vect.y + proc->types.pointer.vect.y) / 2;
proc->types.pointer.scroll_throw_vect_ori = proc->types.pointer.scroll_throw_vect;
@@ -948,6 +949,9 @@ static void indev_proc_press(_lv_indev_proc_t * proc)
static void indev_proc_release(_lv_indev_proc_t * proc)
{
if(proc->wait_until_release != 0) {
+ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, indev_act);
+ if(indev_reset_check(proc)) return;
+
proc->types.pointer.act_obj = NULL;
proc->types.pointer.last_obj = NULL;
proc->pr_timestamp = 0;
@@ -980,6 +984,26 @@ static void indev_proc_release(_lv_indev_proc_t * proc)
proc->pr_timestamp = 0;
proc->longpr_rep_timestamp = 0;
+ /*Get the transformed vector with this object*/
+ if(scroll_obj) {
+ int16_t angle = 0;
+ int16_t zoom = 256;
+ lv_point_t pivot = { 0, 0 };
+ lv_obj_t * parent = scroll_obj;
+ while(parent) {
+ angle += lv_obj_get_style_transform_angle(parent, 0);
+ zoom *= (lv_obj_get_style_transform_zoom(parent, 0) / 256);
+ parent = lv_obj_get_parent(parent);
+ }
+
+ if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) {
+ angle = -angle;
+ zoom = (256 * 256) / zoom;
+ lv_point_transform(&proc->types.pointer.scroll_throw_vect, angle, zoom, &pivot);
+ lv_point_transform(&proc->types.pointer.scroll_throw_vect_ori, angle, zoom, &pivot);
+ }
+ }
+
}
/*The reset can be set in the Call the ancestor's event handler function.
diff --git a/lib/lvgl/src/core/lv_indev_scroll.c b/lib/lvgl/src/core/lv_indev_scroll.c
index 96fa2f6..9216075 100644
--- a/lib/lvgl/src/core/lv_indev_scroll.c
+++ b/lib/lvgl/src/core/lv_indev_scroll.c
@@ -45,12 +45,13 @@ static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_
void _lv_indev_scroll_handler(_lv_indev_proc_t * proc)
{
+ if(proc->types.pointer.vect.x == 0 && proc->types.pointer.vect.y == 0) {
+ return;
+ }
+
lv_obj_t * scroll_obj = proc->types.pointer.scroll_obj;
/*If there is no scroll object yet try to find one*/
if(scroll_obj == NULL) {
- proc->types.pointer.scroll_sum.x += proc->types.pointer.vect.x;
- proc->types.pointer.scroll_sum.y += proc->types.pointer.vect.y;
-
scroll_obj = find_scroll_obj(proc);
if(scroll_obj == NULL) return;
@@ -61,36 +62,49 @@ void _lv_indev_scroll_handler(_lv_indev_proc_t * proc)
}
/*Set new position or scroll if the vector is not zero*/
- if(proc->types.pointer.vect.x != 0 || proc->types.pointer.vect.y != 0) {
- lv_coord_t diff_x = 0;
- lv_coord_t diff_y = 0;
-
- if(proc->types.pointer.scroll_dir == LV_DIR_HOR) {
- lv_coord_t sr = lv_obj_get_scroll_right(scroll_obj);
- lv_coord_t sl = lv_obj_get_scroll_left(scroll_obj);
- diff_x = elastic_diff(scroll_obj, proc->types.pointer.vect.x, sl, sr, LV_DIR_HOR);
- }
- else {
- lv_coord_t st = lv_obj_get_scroll_top(scroll_obj);
- lv_coord_t sb = lv_obj_get_scroll_bottom(scroll_obj);
- diff_y = elastic_diff(scroll_obj, proc->types.pointer.vect.y, st, sb, LV_DIR_VER);
- }
-
- lv_dir_t scroll_dir = lv_obj_get_scroll_dir(scroll_obj);
- if((scroll_dir & LV_DIR_LEFT) == 0 && diff_x > 0) diff_x = 0;
- if((scroll_dir & LV_DIR_RIGHT) == 0 && diff_x < 0) diff_x = 0;
- if((scroll_dir & LV_DIR_TOP) == 0 && diff_y > 0) diff_y = 0;
- if((scroll_dir & LV_DIR_BOTTOM) == 0 && diff_y < 0) diff_y = 0;
-
- /*Respect the scroll limit area*/
- scroll_limit_diff(proc, &diff_x, &diff_y);
-
- lv_obj_scroll_by(scroll_obj, diff_x, diff_y, LV_ANIM_OFF);
- proc->types.pointer.scroll_sum.x += diff_x;
- proc->types.pointer.scroll_sum.y += diff_y;
+ int16_t angle = 0;
+ int16_t zoom = 256;
+ lv_obj_t * parent = scroll_obj;
+ while(parent) {
+ angle += lv_obj_get_style_transform_angle(parent, 0);
+ zoom *= (lv_obj_get_style_transform_zoom(parent, 0) / 256);
+ parent = lv_obj_get_parent(parent);
}
-}
+ if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) {
+ angle = -angle;
+ zoom = (256 * 256) / zoom;
+ lv_point_t pivot = { 0, 0 };
+ lv_point_transform(&proc->types.pointer.vect, angle, zoom, &pivot);
+ }
+
+ lv_coord_t diff_x = 0;
+ lv_coord_t diff_y = 0;
+ if(proc->types.pointer.scroll_dir == LV_DIR_HOR) {
+ lv_coord_t sr = lv_obj_get_scroll_right(scroll_obj);
+ lv_coord_t sl = lv_obj_get_scroll_left(scroll_obj);
+ diff_x = elastic_diff(scroll_obj, proc->types.pointer.vect.x, sl, sr, LV_DIR_HOR);
+ }
+ else {
+ lv_coord_t st = lv_obj_get_scroll_top(scroll_obj);
+ lv_coord_t sb = lv_obj_get_scroll_bottom(scroll_obj);
+ diff_y = elastic_diff(scroll_obj, proc->types.pointer.vect.y, st, sb, LV_DIR_VER);
+ }
+
+ lv_dir_t scroll_dir = lv_obj_get_scroll_dir(scroll_obj);
+ if((scroll_dir & LV_DIR_LEFT) == 0 && diff_x > 0) diff_x = 0;
+ if((scroll_dir & LV_DIR_RIGHT) == 0 && diff_x < 0) diff_x = 0;
+ if((scroll_dir & LV_DIR_TOP) == 0 && diff_y > 0) diff_y = 0;
+ if((scroll_dir & LV_DIR_BOTTOM) == 0 && diff_y < 0) diff_y = 0;
+
+ /*Respect the scroll limit area*/
+ scroll_limit_diff(proc, &diff_x, &diff_y);
+
+ _lv_obj_scroll_by_raw(scroll_obj, diff_x, diff_y);
+ if(proc->reset_query) return;
+ proc->types.pointer.scroll_sum.x += diff_x;
+ proc->types.pointer.scroll_sum.y += diff_y;
+}
void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc)
{
@@ -98,7 +112,6 @@ void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc)
if(scroll_obj == NULL) return;
if(proc->types.pointer.scroll_dir == LV_DIR_NONE) return;
-
lv_indev_t * indev_act = lv_indev_get_act();
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
@@ -258,14 +271,37 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
/*Decide if it's a horizontal or vertical scroll*/
bool hor_en = false;
bool ver_en = false;
- if(LV_ABS(proc->types.pointer.scroll_sum.x) > LV_ABS(proc->types.pointer.scroll_sum.y)) {
- hor_en = true;
- }
- else {
- ver_en = true;
- }
+
+ proc->types.pointer.scroll_sum.x += proc->types.pointer.vect.x;
+ proc->types.pointer.scroll_sum.y += proc->types.pointer.vect.y;
while(obj_act) {
+ /*Get the transformed scroll_sum with this object*/
+ int16_t angle = 0;
+ int32_t zoom = 256;
+ lv_point_t pivot = { 0, 0 };
+ lv_obj_t * parent = obj_act;
+ while(parent) {
+ angle += lv_obj_get_style_transform_angle(parent, 0);
+ int32_t zoom_act = lv_obj_get_style_transform_zoom(parent, 0);
+ zoom = (zoom * zoom_act) >> 8;
+ parent = lv_obj_get_parent(parent);
+ }
+
+ lv_point_t obj_scroll_sum = proc->types.pointer.scroll_sum;
+ if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) {
+ angle = -angle;
+ zoom = (256 * 256) / zoom;
+ lv_point_transform(&obj_scroll_sum, angle, zoom, &pivot);
+ }
+
+ if(LV_ABS(obj_scroll_sum.x) > LV_ABS(obj_scroll_sum.y)) {
+ hor_en = true;
+ }
+ else {
+ ver_en = true;
+ }
+
if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLLABLE) == false) {
/*If this object don't want to chain the scroll to the parent stop searching*/
if(lv_obj_has_flag(obj_act, LV_OBJ_FLAG_SCROLL_CHAIN_HOR) == false && hor_en) break;
@@ -299,15 +335,15 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
*is propagated to this object it can show at least elastic scroll effect.
*But if not hor/ver scrollable do not scroll it at all (so it's not a good candidate)*/
if((st > 0 || sb > 0) &&
- ((up_en && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
- (down_en && proc->types.pointer.scroll_sum.y <= - scroll_limit))) {
+ ((up_en && obj_scroll_sum.y >= scroll_limit) ||
+ (down_en && obj_scroll_sum.y <= - scroll_limit))) {
obj_candidate = obj_act;
dir_candidate = LV_DIR_VER;
}
if((sl > 0 || sr > 0) &&
- ((left_en && proc->types.pointer.scroll_sum.x >= scroll_limit) ||
- (right_en && proc->types.pointer.scroll_sum.x <= - scroll_limit))) {
+ ((left_en && obj_scroll_sum.x >= scroll_limit) ||
+ (right_en && obj_scroll_sum.x <= - scroll_limit))) {
obj_candidate = obj_act;
dir_candidate = LV_DIR_HOR;
}
@@ -317,11 +353,11 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
if(sl <= 0) left_en = false;
if(sr <= 0) right_en = false;
- /*If the object really can be scrolled into the current direction the use it.*/
- if((left_en && proc->types.pointer.scroll_sum.x >= scroll_limit) ||
- (right_en && proc->types.pointer.scroll_sum.x <= - scroll_limit) ||
- (up_en && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
- (down_en && proc->types.pointer.scroll_sum.y <= - scroll_limit)) {
+ /*If the object really can be scrolled into the current direction then use it.*/
+ if((left_en && obj_scroll_sum.x >= scroll_limit) ||
+ (right_en && obj_scroll_sum.x <= - scroll_limit) ||
+ (up_en && obj_scroll_sum.y >= scroll_limit) ||
+ (down_en && obj_scroll_sum.y <= - scroll_limit)) {
proc->types.pointer.scroll_dir = hor_en ? LV_DIR_HOR : LV_DIR_VER;
break;
}
@@ -537,8 +573,6 @@ static void scroll_limit_diff(_lv_indev_proc_t * proc, lv_coord_t * diff_x, lv_c
}
}
-
-
static lv_coord_t scroll_throw_predict_y(_lv_indev_proc_t * proc)
{
lv_coord_t y = proc->types.pointer.scroll_throw_vect.y;
@@ -554,7 +588,6 @@ static lv_coord_t scroll_throw_predict_y(_lv_indev_proc_t * proc)
return move;
}
-
static lv_coord_t scroll_throw_predict_x(_lv_indev_proc_t * proc)
{
lv_coord_t x = proc->types.pointer.scroll_throw_vect.x;
@@ -647,5 +680,3 @@ static lv_coord_t elastic_diff(lv_obj_t * scroll_obj, lv_coord_t diff, lv_coord_
return diff;
}
-
-
diff --git a/lib/lvgl/src/core/lv_obj.c b/lib/lvgl/src/core/lv_obj.c
index a8daaa8..23eef36 100644
--- a/lib/lvgl/src/core/lv_obj.c
+++ b/lib/lvgl/src/core/lv_obj.c
@@ -30,9 +30,16 @@
#include "../draw/stm32_dma2d/lv_gpu_stm32_dma2d.h"
#endif
+#if LV_USE_GPU_RA6M3_G2D
+ #include "../draw/renesas/lv_gpu_d2_ra6m3.h"
+#endif
+
+#if LV_USE_GPU_SWM341_DMA2D
+ #include "../draw/swm341_dma2d/lv_gpu_swm341_dma2d.h"
+#endif
+
#if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT
- #include "../gpu/lv_gpu_nxp_pxp.h"
- #include "../gpu/lv_gpu_nxp_pxp_osa.h"
+ #include "../draw/nxp/pxp/lv_gpu_nxp_pxp.h"
#endif
/*********************
@@ -116,11 +123,18 @@ void lv_init(void)
lv_draw_stm32_dma2d_init();
#endif
+#if LV_USE_GPU_RA6M3_G2D
+ /*Initialize G2D GPU*/
+ lv_draw_ra6m3_g2d_init();
+#endif
+
+#if LV_USE_GPU_SWM341_DMA2D
+ /*Initialize DMA2D GPU*/
+ lv_draw_swm341_dma2d_init();
+#endif
+
#if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT
- if(lv_gpu_nxp_pxp_init(&pxp_default_cfg) != LV_RES_OK) {
- LV_LOG_ERROR("PXP init error. STOP.\n");
- for(; ;) ;
- }
+ PXP_COND_STOP(!lv_gpu_nxp_pxp_init(), "PXP init failed.");
#endif
_lv_obj_style_init();
@@ -135,9 +149,9 @@ void lv_init(void)
lv_img_cache_set_size(LV_IMG_CACHE_DEF_SIZE);
#endif
/*Test if the IDE has UTF-8 encoding*/
- char * txt = "Á";
+ const char * txt = "Á";
- uint8_t * txt_u8 = (uint8_t *)txt;
+ const uint8_t * txt_u8 = (uint8_t *)txt;
if(txt_u8[0] != 0xc3 || txt_u8[1] != 0x81 || txt_u8[2] != 0x00) {
LV_LOG_WARN("The strings have no UTF-8 encoding. Non-ASCII characters won't be displayed.");
}
@@ -218,12 +232,22 @@ void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f)
bool was_on_layout = lv_obj_is_layout_positioned(obj);
+ /* We must invalidate the area occupied by the object before we hide it as calls to invalidate hidden objects are ignored */
if(f & LV_OBJ_FLAG_HIDDEN) lv_obj_invalidate(obj);
obj->flags |= f;
if(f & LV_OBJ_FLAG_HIDDEN) {
- lv_obj_invalidate(obj);
+ if(lv_obj_has_state(obj, LV_STATE_FOCUSED)) {
+ lv_group_t * group = lv_obj_get_group(obj);
+ if(group != NULL) {
+ lv_group_focus_next(group);
+ lv_obj_t * next_obj = lv_group_get_focused(group);
+ if(next_obj != NULL) {
+ lv_obj_invalidate(next_obj);
+ }
+ }
+ }
}
if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 | LV_OBJ_FLAG_LAYOUT_2))) {
@@ -264,6 +288,7 @@ void lv_obj_clear_flag(lv_obj_t * obj, lv_obj_flag_t f)
if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 | LV_OBJ_FLAG_LAYOUT_2))) {
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
}
+
}
void lv_obj_add_state(lv_obj_t * obj, lv_state_t state)
@@ -488,12 +513,6 @@ static void lv_obj_draw(lv_event_t * e)
return;
}
-#if LV_DRAW_COMPLEX
- if(lv_obj_get_style_blend_mode(obj, LV_PART_MAIN) != LV_BLEND_MODE_NORMAL) {
- info->res = LV_COVER_RES_NOT_COVER;
- return;
- }
-#endif
if(lv_obj_get_style_opa(obj, LV_PART_MAIN) < LV_OPA_MAX) {
info->res = LV_COVER_RES_NOT_COVER;
return;
@@ -530,7 +549,6 @@ static void lv_obj_draw(lv_event_t * e)
part_dsc.part = LV_PART_MAIN;
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_dsc);
-
#if LV_DRAW_COMPLEX
/*With clip corner enabled draw the bg img separately to make it clipped*/
bool clip_corner = (lv_obj_get_style_clip_corner(obj, LV_PART_MAIN) && draw_dsc.radius != 0) ? true : false;
@@ -542,7 +560,6 @@ static void lv_obj_draw(lv_event_t * e)
lv_draw_rect(draw_ctx, &draw_dsc, &coords);
-
#if LV_DRAW_COMPLEX
if(clip_corner) {
lv_draw_mask_radius_param_t * mp = lv_mem_buf_get(sizeof(lv_draw_mask_radius_param_t));
@@ -684,7 +701,7 @@ static lv_res_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc
}
}
- lv_opa_t opa = lv_obj_get_style_opa(obj, LV_PART_SCROLLBAR);
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, LV_PART_SCROLLBAR);
if(opa < LV_OPA_MAX) {
dsc->bg_opa = (dsc->bg_opa * opa) >> 8;
dsc->border_opa = (dsc->bg_opa * opa) >> 8;
@@ -715,9 +732,9 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
else if(code == LV_EVENT_RELEASED) {
lv_obj_clear_state(obj, LV_STATE_PRESSED);
- void * param = lv_event_get_param(e);
+ lv_indev_t * indev = lv_event_get_indev(e);
/*Go the checked state if enabled*/
- if(lv_indev_get_scroll_obj(param) == NULL && lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
+ if(lv_indev_get_scroll_obj(indev) == NULL && lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
if(!(lv_obj_get_state(obj) & LV_STATE_CHECKED)) lv_obj_add_state(obj, LV_STATE_CHECKED);
else lv_obj_clear_state(obj, LV_STATE_CHECKED);
@@ -844,10 +861,13 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_obj_mark_layout_as_dirty(obj);
}
}
+ else if(code == LV_EVENT_CHILD_DELETED) {
+ obj->readjust_scroll_after_layout = 1;
+ lv_obj_mark_layout_as_dirty(obj);
+ }
else if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
- lv_coord_t * s = lv_event_get_param(e);
lv_coord_t d = lv_obj_calculate_ext_draw_size(obj, LV_PART_MAIN);
- *s = LV_MAX(*s, d);
+ lv_event_set_ext_draw_size(e, d);
}
else if(code == LV_EVENT_DRAW_MAIN || code == LV_EVENT_DRAW_POST || code == LV_EVENT_COVER_CHECK) {
lv_obj_draw(e);
@@ -885,7 +905,7 @@ static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
if(obj_style->is_trans) continue;
lv_style_value_t v;
- if(lv_style_get_prop_inlined(obj_style->style, LV_STYLE_TRANSITION, &v) == false) continue;
+ if(lv_style_get_prop_inlined(obj_style->style, LV_STYLE_TRANSITION, &v) != LV_STYLE_RES_FOUND) continue;
const lv_style_transition_dsc_t * tr = v.ptr;
/*Add the props to the set if not added yet or added but with smaller weight*/
diff --git a/lib/lvgl/src/core/lv_obj.h b/lib/lvgl/src/core/lv_obj.h
index e9c6d7f..1f4ed71 100644
--- a/lib/lvgl/src/core/lv_obj.h
+++ b/lib/lvgl/src/core/lv_obj.h
@@ -121,7 +121,6 @@ enum {
};
-
typedef uint32_t lv_obj_flag_t;
/**
@@ -167,7 +166,8 @@ typedef struct {
lv_scroll_snap_t scroll_snap_x : 2; /**< Where to align the snappable children horizontally*/
lv_scroll_snap_t scroll_snap_y : 2; /**< Where to align the snappable children vertically*/
lv_dir_t scroll_dir : 4; /**< The allowed scroll direction(s)*/
- uint8_t event_dsc_cnt; /**< Number of event callbacks stored in `event_dsc` array*/
+ uint8_t event_dsc_cnt : 6; /**< Number of event callbacks stored in `event_dsc` array*/
+ uint8_t layer_type : 2; /**< Cache the layer type here. Element of @lv_intermediate_layer_type_t */
} _lv_obj_spec_attr_t;
typedef struct _lv_obj_t {
@@ -182,14 +182,15 @@ typedef struct _lv_obj_t {
lv_obj_flag_t flags;
lv_state_t state;
uint16_t layout_inv : 1;
+ uint16_t readjust_scroll_after_layout : 1;
uint16_t scr_layout_inv : 1;
uint16_t skip_trans : 1;
uint16_t style_cnt : 6;
uint16_t h_layout : 1;
uint16_t w_layout : 1;
+ uint16_t being_deleted : 1;
} lv_obj_t;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -222,7 +223,6 @@ bool lv_is_initialized(void);
*/
lv_obj_t * lv_obj_create(lv_obj_t * parent);
-
/*=====================
* Setter functions
*====================*/
@@ -241,7 +241,6 @@ void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f);
*/
void lv_obj_clear_flag(lv_obj_t * obj, lv_obj_flag_t f);
-
/**
* Add one or more states to the object. The other state bits will remain unchanged.
* If specified in the styles, transition animation will be started from the previous state to the current.
@@ -400,7 +399,6 @@ static inline lv_coord_t lv_obj_dpx(const lv_obj_t * obj, lv_coord_t n)
# define LV_TRACE_OBJ_CREATE(...)
#endif
-
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/lvgl/src/core/lv_obj_class.h b/lib/lvgl/src/core/lv_obj_class.h
index 01a7248..94f6529 100644
--- a/lib/lvgl/src/core/lv_obj_class.h
+++ b/lib/lvgl/src/core/lv_obj_class.h
@@ -20,7 +20,6 @@ extern "C" {
* DEFINES
*********************/
-
/**********************
* TYPEDEFS
**********************/
@@ -86,7 +85,6 @@ bool lv_obj_is_group_def(struct _lv_obj_t * obj);
* MACROS
**********************/
-
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/lvgl/src/core/lv_obj_draw.c b/lib/lvgl/src/core/lv_obj_draw.c
index db7c6ea..d906126 100644
--- a/lib/lvgl/src/core/lv_obj_draw.c
+++ b/lib/lvgl/src/core/lv_obj_draw.c
@@ -38,21 +38,22 @@
void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t * draw_dsc)
{
-
-#if LV_DRAW_COMPLEX
- draw_dsc->radius = lv_obj_get_style_radius(obj, part);
-
- lv_opa_t main_opa = part != LV_PART_MAIN ? lv_obj_get_style_opa(obj, part) : LV_OPA_COVER;
- lv_opa_t opa = lv_obj_get_style_opa(obj, part);
- if(opa <= LV_OPA_MIN || main_opa <= LV_OPA_MIN) {
- draw_dsc->bg_opa = LV_OPA_TRANSP;
- draw_dsc->border_opa = LV_OPA_TRANSP;
- draw_dsc->shadow_opa = LV_OPA_TRANSP;
- draw_dsc->outline_opa = LV_OPA_TRANSP;
- return;
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, part);
+ if(part != LV_PART_MAIN) {
+ if(opa <= LV_OPA_MIN) {
+ draw_dsc->bg_opa = LV_OPA_TRANSP;
+ draw_dsc->bg_img_opa = LV_OPA_TRANSP;
+ draw_dsc->border_opa = LV_OPA_TRANSP;
+ draw_dsc->outline_opa = LV_OPA_TRANSP;
+ draw_dsc->shadow_opa = LV_OPA_TRANSP;
+ return;
+ }
}
- draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+#if LV_DRAW_COMPLEX
+ if(part != LV_PART_MAIN) draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+
+ draw_dsc->radius = lv_obj_get_style_radius(obj, part);
if(draw_dsc->bg_opa != LV_OPA_TRANSP) {
draw_dsc->bg_opa = lv_obj_get_style_bg_opa(obj, part);
@@ -130,17 +131,6 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t
}
}
- if(main_opa < LV_OPA_MAX) {
- opa = (uint16_t)((uint16_t) main_opa * opa) >> 8;
- }
-
- if(opa < LV_OPA_MAX) {
- draw_dsc->bg_opa = (uint16_t)((uint16_t)draw_dsc->bg_opa * opa) >> 8;
- draw_dsc->bg_img_opa = (uint16_t)((uint16_t)draw_dsc->bg_img_opa * opa) >> 8;
- draw_dsc->border_opa = (uint16_t)((uint16_t)draw_dsc->border_opa * opa) >> 8;
- draw_dsc->shadow_opa = (uint16_t)((uint16_t)draw_dsc->shadow_opa * opa) >> 8;
- draw_dsc->outline_opa = (uint16_t)((uint16_t)draw_dsc->outline_opa * opa) >> 8;
- }
#else /*LV_DRAW_COMPLEX*/
if(draw_dsc->bg_opa != LV_OPA_TRANSP) {
draw_dsc->bg_opa = lv_obj_get_style_bg_opa(obj, part);
@@ -189,6 +179,13 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t
}
}
#endif
+ if(opa < LV_OPA_MAX) {
+ draw_dsc->bg_opa = (opa * draw_dsc->bg_opa) >> 8;
+ draw_dsc->bg_img_opa = (opa * draw_dsc->bg_img_opa) >> 8;
+ draw_dsc->border_opa = (opa * draw_dsc->border_opa) >> 8;
+ draw_dsc->outline_opa = (opa * draw_dsc->outline_opa) >> 8;
+ draw_dsc->shadow_opa = (opa * draw_dsc->shadow_opa) >> 8;
+ }
}
void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc_t * draw_dsc)
@@ -196,9 +193,13 @@ void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc
draw_dsc->opa = lv_obj_get_style_text_opa(obj, part);
if(draw_dsc->opa <= LV_OPA_MIN) return;
- lv_opa_t opa = lv_obj_get_style_opa(obj, part);
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, part);
+ if(opa <= LV_OPA_MIN) {
+ draw_dsc->opa = LV_OPA_TRANSP;
+ return;
+ }
if(opa < LV_OPA_MAX) {
- draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa) >> 8;
+ draw_dsc->opa = (opa * draw_dsc->opa) >> 8;
}
if(draw_dsc->opa <= LV_OPA_MIN) return;
@@ -207,7 +208,7 @@ void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc
draw_dsc->line_space = lv_obj_get_style_text_line_space(obj, part);
draw_dsc->decor = lv_obj_get_style_text_decor(obj, part);
#if LV_DRAW_COMPLEX
- draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+ if(part != LV_PART_MAIN) draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
#endif
draw_dsc->font = lv_obj_get_style_text_font(obj, part);
@@ -222,13 +223,17 @@ void lv_obj_init_draw_label_dsc(lv_obj_t * obj, uint32_t part, lv_draw_label_dsc
void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc)
{
draw_dsc->opa = lv_obj_get_style_img_opa(obj, part);
- if(draw_dsc->opa <= LV_OPA_MIN) return;
+ if(draw_dsc->opa <= LV_OPA_MIN) return;
- lv_opa_t opa_scale = lv_obj_get_style_opa(obj, part);
- if(opa_scale < LV_OPA_MAX) {
- draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa_scale) >> 8;
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, part);
+ if(opa <= LV_OPA_MIN) {
+ draw_dsc->opa = LV_OPA_TRANSP;
+ return;
}
- if(draw_dsc->opa <= LV_OPA_MIN) return;
+ if(opa < LV_OPA_MAX) {
+ draw_dsc->opa = (opa * draw_dsc->opa) >> 8;
+ }
+ if(draw_dsc->opa <= LV_OPA_MIN) return;
draw_dsc->angle = 0;
draw_dsc->zoom = LV_IMG_ZOOM_NONE;
@@ -240,23 +245,27 @@ void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t *
draw_dsc->recolor = lv_obj_get_style_img_recolor_filtered(obj, part);
}
#if LV_DRAW_COMPLEX
- draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+ if(part != LV_PART_MAIN) draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
#endif
}
void lv_obj_init_draw_line_dsc(lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t * draw_dsc)
{
- draw_dsc->width = lv_obj_get_style_line_width(obj, part);
- if(draw_dsc->width == 0) return;
-
draw_dsc->opa = lv_obj_get_style_line_opa(obj, part);
if(draw_dsc->opa <= LV_OPA_MIN) return;
- lv_opa_t opa = lv_obj_get_style_opa(obj, part);
- if(opa < LV_OPA_MAX) {
- draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa) >> 8;
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, part);
+ if(opa <= LV_OPA_MIN) {
+ draw_dsc->opa = LV_OPA_TRANSP;
+ return;
}
- if(draw_dsc->opa <= LV_OPA_MIN) return;
+ if(opa < LV_OPA_MAX) {
+ draw_dsc->opa = (opa * draw_dsc->opa) >> 8;
+ }
+ if(draw_dsc->opa <= LV_OPA_MIN) return;
+
+ draw_dsc->width = lv_obj_get_style_line_width(obj, part);
+ if(draw_dsc->width == 0) return;
draw_dsc->color = lv_obj_get_style_line_color_filtered(obj, part);
@@ -269,7 +278,7 @@ void lv_obj_init_draw_line_dsc(lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t
draw_dsc->round_end = draw_dsc->round_start;
#if LV_DRAW_COMPLEX
- draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+ if(part != LV_PART_MAIN) draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
#endif
}
@@ -281,11 +290,15 @@ void lv_obj_init_draw_arc_dsc(lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t *
draw_dsc->opa = lv_obj_get_style_arc_opa(obj, part);
if(draw_dsc->opa <= LV_OPA_MIN) return;
- lv_opa_t opa = lv_obj_get_style_opa(obj, part);
- if(opa < LV_OPA_MAX) {
- draw_dsc->opa = (uint16_t)((uint16_t)draw_dsc->opa * opa) >> 8;
+ lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, part);
+ if(opa <= LV_OPA_MIN) {
+ draw_dsc->opa = LV_OPA_TRANSP;
+ return;
}
- if(draw_dsc->opa <= LV_OPA_MIN) return;
+ if(opa < LV_OPA_MAX) {
+ draw_dsc->opa = (opa * draw_dsc->opa) >> 8;
+ }
+ if(draw_dsc->opa <= LV_OPA_MIN) return;
draw_dsc->color = lv_obj_get_style_arc_color_filtered(obj, part);
draw_dsc->img_src = lv_obj_get_style_arc_img_src(obj, part);
@@ -293,7 +306,7 @@ void lv_obj_init_draw_arc_dsc(lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t *
draw_dsc->rounded = lv_obj_get_style_arc_rounded(obj, part);
#if LV_DRAW_COMPLEX
- draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
+ if(part != LV_PART_MAIN) draw_dsc->blend_mode = lv_obj_get_style_blend_mode(obj, part);
#endif
}
@@ -373,6 +386,13 @@ lv_coord_t _lv_obj_get_ext_draw_size(const lv_obj_t * obj)
else return 0;
}
+lv_layer_type_t _lv_obj_get_layer_type(const lv_obj_t * obj)
+{
+
+ if(obj->spec_attr) return obj->spec_attr->layer_type;
+ else return LV_LAYER_TYPE_NONE;
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/core/lv_obj_draw.h b/lib/lvgl/src/core/lv_obj_draw.h
index 311ba6b..94fc057 100644
--- a/lib/lvgl/src/core/lv_obj_draw.h
+++ b/lib/lvgl/src/core/lv_obj_draw.h
@@ -33,6 +33,12 @@ typedef enum {
LV_COVER_RES_MASKED = 2,
} lv_cover_res_t;
+typedef enum {
+ LV_LAYER_TYPE_NONE,
+ LV_LAYER_TYPE_SIMPLE,
+ LV_LAYER_TYPE_TRANSFORM,
+} lv_layer_type_t;
+
typedef struct {
lv_draw_ctx_t * draw_ctx; /**< Draw context*/
const struct _lv_obj_class_t * class_p; /**< The class that sent the event */
@@ -50,14 +56,14 @@ typedef struct {
arc_dsc; /**< A draw descriptor that can be modified to changed what LVGL will draw. Set only for arc-like parts*/
const lv_point_t *
p1; /**< A point calculated during drawing. E.g. a point of chart or the center of an arc.*/
- const lv_point_t * p2; /**< A point calculated during drawing. E.g. a point of chart.*/
+ const lv_point_t * p2; /**< A point calculated during drawing. E.g. a point of chart.*/
char * text; /**< A text calculated during drawing. Can be modified. E.g. tick labels on a chart axis.*/
- uint32_t text_length; /**< Size of the text buffer containing null-terminated text string calculated during drawing.*/
- uint32_t part; /**< The current part for which the event is sent*/
- uint32_t id; /**< The index of the part. E.g. a button's index on button matrix or table cell index.*/
- lv_coord_t radius; /**< E.g. the radius of an arc (not the corner radius).*/
- int32_t value; /**< A value calculated during drawing. E.g. Chart's tick line value.*/
- const void * sub_part_ptr; /**< A pointer the identifies something in the part. E.g. chart series. */
+ uint32_t text_length; /**< Size of the text buffer containing null-terminated text string calculated during drawing.*/
+ uint32_t part; /**< The current part for which the event is sent*/
+ uint32_t id; /**< The index of the part. E.g. a button's index on button matrix or table cell index.*/
+ lv_coord_t radius; /**< E.g. the radius of an arc (not the corner radius).*/
+ int32_t value; /**< A value calculated during drawing. E.g. Chart's tick line value.*/
+ const void * sub_part_ptr; /**< A pointer the identifies something in the part. E.g. chart series. */
} lv_obj_draw_part_dsc_t;
/**********************
@@ -66,11 +72,11 @@ typedef struct {
/**
* Initialize a rectangle draw descriptor from an object's styles in its current state
- * @param obj pointer to an object
- * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
- * @param draw_dsc the descriptor to initialize.
- * If an `..._opa` field is set to `LV_OPA_TRANSP` the related properties won't be initialized.
- * Should be initialized with `lv_draw_rect_dsc_init(draw_dsc)`.
+ * @param obj pointer to an object
+ * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor to initialize.
+ * If an `..._opa` field is set to `LV_OPA_TRANSP` the related properties won't be initialized.
+ * Should be initialized with `lv_draw_rect_dsc_init(draw_dsc)`.
* @note Only the relevant fields will be set.
* E.g. if `border width == 0` the other border properties won't be evaluated.
*/
@@ -78,54 +84,53 @@ void lv_obj_init_draw_rect_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_re
/**
* Initialize a label draw descriptor from an object's styles in its current state
- * @param obj pointer to an object
- * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
- * @param draw_dsc the descriptor to initialize.
- * If the `opa` field is set to or the property is equal to `LV_OPA_TRANSP` the rest won't be initialized.
- * Should be initialized with `lv_draw_label_dsc_init(draw_dsc)`.
+ * @param obj pointer to an object
+ * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor to initialize.
+ * If the `opa` field is set to or the property is equal to `LV_OPA_TRANSP` the rest won't be initialized.
+ * Should be initialized with `lv_draw_label_dsc_init(draw_dsc)`.
*/
void lv_obj_init_draw_label_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_label_dsc_t * draw_dsc);
/**
* Initialize an image draw descriptor from an object's styles in its current state
- * @param obj pointer to an object
- * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
- * @param draw_dsc the descriptor to initialize.
- * Should be initialized with `lv_draw_image_dsc_init(draw_dsc)`.
+ * @param obj pointer to an object
+ * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor to initialize.
+ * Should be initialized with `lv_draw_image_dsc_init(draw_dsc)`.
*/
void lv_obj_init_draw_img_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t * draw_dsc);
-
/**
* Initialize a line draw descriptor from an object's styles in its current state
* @param obj pointer to an object
- * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
- * @param draw_dsc the descriptor to initialize.
- * Should be initialized with `lv_draw_line_dsc_init(draw_dsc)`.
+ * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor to initialize.
+ * Should be initialized with `lv_draw_line_dsc_init(draw_dsc)`.
*/
void lv_obj_init_draw_line_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_line_dsc_t * draw_dsc);
/**
* Initialize an arc draw descriptor from an object's styles in its current state
- * @param obj pointer to an object
- * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
- * @param draw_dsc the descriptor to initialize.
- * Should be initialized with `lv_draw_arc_dsc_init(draw_dsc)`.
+ * @param obj pointer to an object
+ * @param part part of the object, e.g. `LV_PART_MAIN`, `LV_PART_SCROLLBAR`, `LV_PART_KNOB`, etc
+ * @param draw_dsc the descriptor to initialize.
+ * Should be initialized with `lv_draw_arc_dsc_init(draw_dsc)`.
*/
void lv_obj_init_draw_arc_dsc(struct _lv_obj_t * obj, uint32_t part, lv_draw_arc_dsc_t * draw_dsc);
/**
* Get the required extra size (around the object's part) to draw shadow, outline, value etc.
- * @param obj pointer to an object
- * @param part part of the object
- * @return the extra size required around the object
+ * @param obj pointer to an object
+ * @param part part of the object
+ * @return the extra size required around the object
*/
lv_coord_t lv_obj_calculate_ext_draw_size(struct _lv_obj_t * obj, uint32_t part);
/**
* Initialize a draw descriptor used in events.
- * @param dsc pointer to a descriptor. Later it should be passed as parameter to an `LV_EVENT_DRAW_PART_BEGIN/END` event.
- * @param draw the current draw context. (usually returned by `lv_event_get_draw_ctx(e)`)
+ * @param dsc pointer to a descriptor. Later it should be passed as parameter to an `LV_EVENT_DRAW_PART_BEGIN/END` event.
+ * @param draw the current draw context. (usually returned by `lv_event_get_draw_ctx(e)`)
*/
void lv_obj_draw_dsc_init(lv_obj_draw_part_dsc_t * dsc, lv_draw_ctx_t * draw_ctx);
@@ -141,17 +146,19 @@ bool lv_obj_draw_part_check_type(lv_obj_draw_part_dsc_t * dsc, const struct _lv_
/**
* Send a 'LV_EVENT_REFR_EXT_DRAW_SIZE' Call the ancestor's event handler to the object to refresh the value of the extended draw size.
* The result will be saved in `obj`.
- * @param obj pointer to an object
+ * @param obj pointer to an object
*/
void lv_obj_refresh_ext_draw_size(struct _lv_obj_t * obj);
/**
* Get the extended draw area of an object.
- * @param obj pointer to an object
- * @return the size extended draw area around the real coordinates
+ * @param obj pointer to an object
+ * @return the size extended draw area around the real coordinates
*/
lv_coord_t _lv_obj_get_ext_draw_size(const struct _lv_obj_t * obj);
+lv_layer_type_t _lv_obj_get_layer_type(const struct _lv_obj_t * obj);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/core/lv_obj_pos.c b/lib/lvgl/src/core/lv_obj_pos.c
index 92d4bc4..595c50d 100644
--- a/lib/lvgl/src/core/lv_obj_pos.c
+++ b/lib/lvgl/src/core/lv_obj_pos.c
@@ -26,6 +26,7 @@
static lv_coord_t calc_content_width(lv_obj_t * obj);
static lv_coord_t calc_content_height(lv_obj_t * obj);
static void layout_update_core(lv_obj_t * obj);
+static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv);
/**********************
* STATIC VARIABLES
@@ -199,13 +200,15 @@ bool lv_obj_refr_size(lv_obj_t * obj)
/*Invalidate the new area*/
lv_obj_invalidate(obj);
- lv_obj_readjust_scroll(obj, LV_ANIM_OFF);
+ obj->readjust_scroll_after_layout = 1;
/*If the object was out of the parent invalidate the new scrollbar area too.
*If it wasn't out of the parent but out now, also invalidate the scrollbars*/
bool on2 = _lv_area_is_in(&obj->coords, &parent_fit_area, 0);
if(on1 || (!on1 && on2)) lv_obj_scrollbar_invalidate(parent);
+ lv_obj_refresh_ext_draw_size(obj);
+
return true;
}
@@ -548,7 +551,6 @@ lv_coord_t lv_obj_get_y_aligned(const lv_obj_t * obj)
return lv_obj_get_style_y(obj, LV_PART_MAIN);
}
-
lv_coord_t lv_obj_get_width(const lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -791,28 +793,62 @@ void lv_obj_move_children_by(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_dif
}
}
+void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, bool recursive, bool inv)
+{
+ if(obj) {
+ lv_layer_type_t layer_type = _lv_obj_get_layer_type(obj);
+ bool do_tranf = layer_type == LV_LAYER_TYPE_TRANSFORM;
+ if(inv) {
+ if(recursive) lv_obj_transform_point(lv_obj_get_parent(obj), p, recursive, inv);
+ if(do_tranf) transform_point(obj, p, inv);
+ }
+ else {
+ if(do_tranf) transform_point(obj, p, inv);
+ if(recursive) lv_obj_transform_point(lv_obj_get_parent(obj), p, recursive, inv);
+ }
+ }
+}
+
+void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, bool recursive,
+ bool inv)
+{
+ lv_point_t p[4] = {
+ {area->x1, area->y1},
+ {area->x1, area->y2},
+ {area->x2, area->y1},
+ {area->x2, area->y2},
+ };
+
+ lv_obj_transform_point(obj, &p[0], recursive, inv);
+ lv_obj_transform_point(obj, &p[1], recursive, inv);
+ lv_obj_transform_point(obj, &p[2], recursive, inv);
+ lv_obj_transform_point(obj, &p[3], recursive, inv);
+
+ area->x1 = LV_MIN4(p[0].x, p[1].x, p[2].x, p[3].x);
+ area->x2 = LV_MAX4(p[0].x, p[1].x, p[2].x, p[3].x);
+ area->y1 = LV_MIN4(p[0].y, p[1].y, p[2].y, p[3].y);
+ area->y2 = LV_MAX4(p[0].y, p[1].y, p[2].y, p[3].y);
+ lv_area_increase(area, 5, 5);
+}
void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
+ lv_disp_t * disp = lv_obj_get_disp(obj);
+ if(!lv_disp_is_invalidation_enabled(disp)) return;
+
lv_area_t area_tmp;
lv_area_copy(&area_tmp, area);
- bool visible = lv_obj_area_is_visible(obj, &area_tmp);
+ if(!lv_obj_area_is_visible(obj, &area_tmp)) return;
- if(visible) _lv_inv_area(lv_obj_get_disp(obj), &area_tmp);
+ _lv_inv_area(lv_obj_get_disp(obj), &area_tmp);
}
void lv_obj_invalidate(const lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
- /*If the object has overflow visible it can be drawn anywhere on its parent
- *It needs to be checked recursively*/
- while(lv_obj_get_parent(obj) && lv_obj_has_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
- obj = lv_obj_get_parent(obj);
- }
-
/*Truncate the area to the object*/
lv_area_t obj_coords;
lv_coord_t ext_size = _lv_obj_get_ext_draw_size(obj);
@@ -841,7 +877,7 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
}
/*Truncate the area to the object*/
- if(!lv_obj_has_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
+ if(!lv_obj_has_flag_any(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
lv_area_t obj_coords;
lv_coord_t ext_size = _lv_obj_get_ext_draw_size(obj);
lv_area_copy(&obj_coords, &obj->coords);
@@ -854,6 +890,8 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
if(!_lv_area_intersect(area, area, &obj_coords)) return false;
}
+ lv_obj_get_transformed_area(obj, area, true, false);
+
/*Truncate recursively to the parents*/
lv_obj_t * par = lv_obj_get_parent(obj);
while(par != NULL) {
@@ -861,8 +899,10 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
if(lv_obj_has_flag(par, LV_OBJ_FLAG_HIDDEN)) return false;
/*Truncate to the parent and if no common parts break*/
- if(!lv_obj_has_flag(par, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
- if(!_lv_area_intersect(area, area, &par->coords)) return false;
+ if(!lv_obj_has_flag_any(par, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
+ lv_area_t par_area = par->coords;
+ lv_obj_get_transformed_area(par, &par_area, true, false);
+ if(!_lv_area_intersect(area, area, &par_area)) return false;
}
par = lv_obj_get_parent(par);
@@ -941,8 +981,6 @@ lv_coord_t lv_clamp_height(lv_coord_t height, lv_coord_t min_height, lv_coord_t
return LV_CLAMP(min_height, height, max_height);
}
-
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -1049,7 +1087,6 @@ static lv_coord_t calc_content_height(lv_obj_t * obj)
lv_obj_t * child = obj->spec_attr->children[i];
if(lv_obj_has_flag_any(child, LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING)) continue;
-
if(!lv_obj_is_layout_positioned(child)) {
lv_align_t align = lv_obj_get_style_align(child, 0);
switch(align) {
@@ -1093,18 +1130,52 @@ static void layout_update_core(lv_obj_t * obj)
layout_update_core(child);
}
- if(obj->layout_inv == 0) return;
+ if(obj->layout_inv) {
+ obj->layout_inv = 0;
+ lv_obj_refr_size(obj);
+ lv_obj_refr_pos(obj);
- obj->layout_inv = 0;
-
- lv_obj_refr_size(obj);
- lv_obj_refr_pos(obj);
-
- if(child_cnt > 0) {
- uint32_t layout_id = lv_obj_get_style_layout(obj, LV_PART_MAIN);
- if(layout_id > 0 && layout_id <= layout_cnt) {
- void * user_data = LV_GC_ROOT(_lv_layout_list)[layout_id - 1].user_data;
- LV_GC_ROOT(_lv_layout_list)[layout_id - 1].cb(obj, user_data);
+ if(child_cnt > 0) {
+ uint32_t layout_id = lv_obj_get_style_layout(obj, LV_PART_MAIN);
+ if(layout_id > 0 && layout_id <= layout_cnt) {
+ void * user_data = LV_GC_ROOT(_lv_layout_list)[layout_id - 1].user_data;
+ LV_GC_ROOT(_lv_layout_list)[layout_id - 1].cb(obj, user_data);
+ }
}
}
+
+ if(obj->readjust_scroll_after_layout) {
+ obj->readjust_scroll_after_layout = 0;
+ lv_obj_readjust_scroll(obj, LV_ANIM_OFF);
+ }
+}
+
+static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv)
+{
+ int16_t angle = lv_obj_get_style_transform_angle(obj, 0);
+ int16_t zoom = lv_obj_get_style_transform_zoom(obj, 0);
+
+ if(angle == 0 && zoom == LV_IMG_ZOOM_NONE) return;
+
+ lv_point_t pivot = {
+ .x = lv_obj_get_style_transform_pivot_x(obj, 0),
+ .y = lv_obj_get_style_transform_pivot_y(obj, 0)
+ };
+
+ if(LV_COORD_IS_PCT(pivot.x)) {
+ pivot.x = (LV_COORD_GET_PCT(pivot.x) * lv_area_get_width(&obj->coords)) / 100;
+ }
+ if(LV_COORD_IS_PCT(pivot.y)) {
+ pivot.y = (LV_COORD_GET_PCT(pivot.y) * lv_area_get_height(&obj->coords)) / 100;
+ }
+
+ pivot.x = obj->coords.x1 + pivot.x;
+ pivot.y = obj->coords.y1 + pivot.y;
+
+ if(inv) {
+ angle = -angle;
+ zoom = (256 * 256) / zoom;
+ }
+
+ lv_point_transform(p, angle, zoom, &pivot);
}
diff --git a/lib/lvgl/src/core/lv_obj_pos.h b/lib/lvgl/src/core/lv_obj_pos.h
index 6013039..cf2ba98 100644
--- a/lib/lvgl/src/core/lv_obj_pos.h
+++ b/lib/lvgl/src/core/lv_obj_pos.h
@@ -201,7 +201,6 @@ static inline void lv_obj_center(struct _lv_obj_t * obj)
lv_obj_align(obj, LV_ALIGN_CENTER, 0, 0);
}
-
/**
* Copy the coordinates of an object to an area
* @param obj pointer to an object
@@ -345,9 +344,26 @@ void lv_obj_refr_pos(struct _lv_obj_t * obj);
void lv_obj_move_to(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
-
void lv_obj_move_children_by(struct _lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff, bool ignore_floating);
+/**
+ * Transform a point using the angle and zoom style properties of an object
+ * @param obj pointer to an object whose style properties should be used
+ * @param p a point to transform, the result will be written back here too
+ * @param recursive consider the transformation properties of the parents too
+ * @param inv do the inverse of the transformation (-angle and 1/zoom)
+ */
+void lv_obj_transform_point(const struct _lv_obj_t * obj, lv_point_t * p, bool recursive, bool inv);
+
+/**
+ * Transform an area using the angle and zoom style properties of an object
+ * @param obj pointer to an object whose style properties should be used
+ * @param area an area to transform, the result will be written back here too
+ * @param recursive consider the transformation properties of the parents too
+ * @param inv do the inverse of the transformation (-angle and 1/zoom)
+ */
+void lv_obj_get_transformed_area(const struct _lv_obj_t * obj, lv_area_t * area, bool recursive, bool inv);
+
/**
* Mark an area of an object as invalid.
* The area will be truncated to the object's area and marked for redraw.
diff --git a/lib/lvgl/src/core/lv_obj_scroll.c b/lib/lvgl/src/core/lv_obj_scroll.c
index 1aac616..1239dc7 100644
--- a/lib/lvgl/src/core/lv_obj_scroll.c
+++ b/lib/lvgl/src/core/lv_obj_scroll.c
@@ -31,7 +31,6 @@
/**********************
* STATIC PROTOTYPES
**********************/
-static lv_res_t scroll_by_raw(lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
static void scroll_x_anim(void * obj, int32_t v);
static void scroll_y_anim(void * obj, int32_t v);
static void scroll_anim_ready_cb(lv_anim_t * a);
@@ -300,7 +299,6 @@ void lv_obj_scroll_by_bounded(lv_obj_t * obj, lv_coord_t dx, lv_coord_t dy, lv_a
}
}
-
void lv_obj_scroll_by(lv_obj_t * obj, lv_coord_t dx, lv_coord_t dy, lv_anim_enable_t anim_en)
{
if(dx == 0 && dy == 0) return;
@@ -352,7 +350,7 @@ void lv_obj_scroll_by(lv_obj_t * obj, lv_coord_t dx, lv_coord_t dy, lv_anim_enab
res = lv_event_send(obj, LV_EVENT_SCROLL_BEGIN, NULL);
if(res != LV_RES_OK) return;
- res = scroll_by_raw(obj, dx, dy);
+ res = _lv_obj_scroll_by_raw(obj, dx, dy);
if(res != LV_RES_OK) return;
res = lv_event_send(obj, LV_EVENT_SCROLL_END, NULL);
@@ -410,6 +408,22 @@ void lv_obj_scroll_to_view_recursive(lv_obj_t * obj, lv_anim_enable_t anim_en)
}
}
+lv_res_t _lv_obj_scroll_by_raw(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
+{
+ if(x == 0 && y == 0) return LV_RES_OK;
+
+ lv_obj_allocate_spec_attr(obj);
+
+ obj->spec_attr->scroll.x += x;
+ obj->spec_attr->scroll.y += y;
+
+ lv_obj_move_children_by(obj, x, y, true);
+ lv_res_t res = lv_event_send(obj, LV_EVENT_SCROLL, NULL);
+ if(res != LV_RES_OK) return res;
+ lv_obj_invalidate(obj);
+ return LV_RES_OK;
+}
+
bool lv_obj_is_scrolling(const lv_obj_t * obj)
{
lv_indev_t * indev = lv_indev_get_next(NULL);
@@ -464,7 +478,6 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t *
ver_draw = true;
}
-
bool hor_draw = false;
if((dir & LV_DIR_HOR) &&
((sm == LV_SCROLLBAR_MODE_ON) ||
@@ -652,30 +665,14 @@ void lv_obj_readjust_scroll(lv_obj_t * obj, lv_anim_enable_t anim_en)
* STATIC FUNCTIONS
**********************/
-static lv_res_t scroll_by_raw(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
-{
- if(x == 0 && y == 0) return LV_RES_OK;
-
- lv_obj_allocate_spec_attr(obj);
-
- obj->spec_attr->scroll.x += x;
- obj->spec_attr->scroll.y += y;
-
- lv_obj_move_children_by(obj, x, y, true);
- lv_res_t res = lv_event_send(obj, LV_EVENT_SCROLL, NULL);
- if(res != LV_RES_OK) return res;
- lv_obj_invalidate(obj);
- return LV_RES_OK;
-}
-
static void scroll_x_anim(void * obj, int32_t v)
{
- scroll_by_raw(obj, v + lv_obj_get_scroll_x(obj), 0);
+ _lv_obj_scroll_by_raw(obj, v + lv_obj_get_scroll_x(obj), 0);
}
static void scroll_y_anim(void * obj, int32_t v)
{
- scroll_by_raw(obj, 0, v + lv_obj_get_scroll_y(obj));
+ _lv_obj_scroll_by_raw(obj, 0, v + lv_obj_get_scroll_y(obj));
}
static void scroll_anim_ready_cb(lv_anim_t * a)
diff --git a/lib/lvgl/src/core/lv_obj_scroll.h b/lib/lvgl/src/core/lv_obj_scroll.h
index c9fdd72..aaa5634 100644
--- a/lib/lvgl/src/core/lv_obj_scroll.h
+++ b/lib/lvgl/src/core/lv_obj_scroll.h
@@ -15,6 +15,7 @@ extern "C" {
*********************/
#include "../misc/lv_area.h"
#include "../misc/lv_anim.h"
+#include "../misc/lv_types.h"
/*********************
* DEFINES
@@ -36,7 +37,6 @@ enum {
};
typedef uint8_t lv_scrollbar_mode_t;
-
/** Scroll span align options. Tells where to align the snappable children when scroll stops.*/
enum {
LV_SCROLL_SNAP_NONE, /**< Do not align, leave where it is*/
@@ -248,6 +248,17 @@ void lv_obj_scroll_to_view(struct _lv_obj_t * obj, lv_anim_enable_t anim_en);
*/
void lv_obj_scroll_to_view_recursive(struct _lv_obj_t * obj, lv_anim_enable_t anim_en);
+/**
+ * Low level function to scroll by given x and y coordinates.
+ * `LV_EVENT_SCROLL` is sent.
+ * @param obj pointer to an object to scroll
+ * @param x pixels to scroll horizontally
+ * @param y pixels to scroll vertically
+ * @return `LV_RES_INV`: to object was deleted in `LV_EVENT_SCROLL`;
+ * `LV_RES_OK`: if the object is still valid
+ */
+lv_res_t _lv_obj_scroll_by_raw(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
+
/**
* Tell whether an object is being scrolled or not at this moment
* @param obj pointer to an object
@@ -277,7 +288,7 @@ void lv_obj_get_scrollbar_area(struct _lv_obj_t * obj, lv_area_t * hor, lv_area_
void lv_obj_scrollbar_invalidate(struct _lv_obj_t * obj);
/**
- * Checked if the content is scrolled "in" and adjusts it to a normal position.
+ * Checks if the content is scrolled "in" and adjusts it to a normal position.
* @param obj pointer to an object
* @param anim_en LV_ANIM_ON/OFF
*/
diff --git a/lib/lvgl/src/core/lv_obj_style.c b/lib/lvgl/src/core/lv_obj_style.c
index b77f5b8..f1495a6 100644
--- a/lib/lvgl/src/core/lv_obj_style.c
+++ b/lib/lvgl/src/core/lv_obj_style.c
@@ -44,13 +44,14 @@ typedef enum {
**********************/
static lv_style_t * get_local_style(lv_obj_t * obj, lv_style_selector_t selector);
static _lv_obj_style_t * get_trans_style(lv_obj_t * obj, uint32_t part);
-static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v);
+static lv_style_res_t get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v);
static void report_style_change_core(void * style, lv_obj_t * obj);
static void refresh_children_style(lv_obj_t * obj);
static bool trans_del(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, trans_t * tr_limit);
static void trans_anim_cb(void * _tr, int32_t v);
static void trans_anim_start_cb(lv_anim_t * a);
static void trans_anim_ready_cb(lv_anim_t * a);
+static lv_layer_type_t calculate_layer_type(lv_obj_t * obj);
static void fade_anim_cb(void * obj, int32_t v);
static void fade_in_anim_ready(lv_anim_t * a);
@@ -175,7 +176,8 @@ void lv_obj_refresh_style(lv_obj_t * obj, lv_style_selector_t selector, lv_style
bool is_layout_refr = lv_style_prop_has_flag(prop, LV_STYLE_PROP_LAYOUT_REFR);
bool is_ext_draw = lv_style_prop_has_flag(prop, LV_STYLE_PROP_EXT_DRAW);
- bool is_inherit = lv_style_prop_has_flag(prop, LV_STYLE_PROP_INHERIT);
+ bool is_inheritable = lv_style_prop_has_flag(prop, LV_STYLE_PROP_INHERIT);
+ bool is_layer_refr = lv_style_prop_has_flag(prop, LV_STYLE_PROP_LAYER_REFR);
if(is_layout_refr) {
if(part == LV_PART_ANY ||
@@ -191,12 +193,22 @@ void lv_obj_refresh_style(lv_obj_t * obj, lv_style_selector_t selector, lv_style
if(parent) lv_obj_mark_layout_as_dirty(parent);
}
+ /*Cache the layer type*/
+ if((part == LV_PART_ANY || part == LV_PART_MAIN) && is_layer_refr) {
+ lv_layer_type_t layer_type = calculate_layer_type(obj);
+ if(obj->spec_attr) obj->spec_attr->layer_type = layer_type;
+ else if(layer_type != LV_LAYER_TYPE_NONE) {
+ lv_obj_allocate_spec_attr(obj);
+ obj->spec_attr->layer_type = layer_type;
+ }
+ }
+
if(prop == LV_STYLE_PROP_ANY || is_ext_draw) {
lv_obj_refresh_ext_draw_size(obj);
}
lv_obj_invalidate(obj);
- if(prop == LV_STYLE_PROP_ANY || (is_inherit && (is_ext_draw || is_layout_refr))) {
+ if(prop == LV_STYLE_PROP_ANY || (is_inheritable && (is_ext_draw || is_layout_refr))) {
if(part != LV_PART_SCROLLBAR) {
refresh_children_style(obj);
}
@@ -211,15 +223,15 @@ void lv_obj_enable_style_refresh(bool en)
lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop)
{
lv_style_value_t value_act;
- bool inherit = lv_style_prop_has_flag(prop, LV_STYLE_PROP_INHERIT);
- bool found = false;
+ bool inheritable = lv_style_prop_has_flag(prop, LV_STYLE_PROP_INHERIT);
+ lv_style_res_t found = LV_STYLE_RES_NOT_FOUND;
while(obj) {
found = get_prop_core(obj, part, prop, &value_act);
- if(found) break;
- if(!inherit) break;
+ if(found == LV_STYLE_RES_FOUND) break;
+ if(!inheritable) break;
/*If not found, check the `MAIN` style first*/
- if(part != LV_PART_MAIN) {
+ if(found != LV_STYLE_RES_INHERIT && part != LV_PART_MAIN) {
part = LV_PART_MAIN;
continue;
}
@@ -228,7 +240,7 @@ lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_
obj = lv_obj_get_parent(obj);
}
- if(!found) {
+ if(found != LV_STYLE_RES_FOUND) {
if(part == LV_PART_MAIN && (prop == LV_STYLE_WIDTH || prop == LV_STYLE_HEIGHT)) {
const lv_obj_class_t * cls = obj->class_p;
while(cls) {
@@ -263,9 +275,16 @@ void lv_obj_set_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_
lv_obj_refresh_style(obj, selector, prop);
}
+void lv_obj_set_local_style_prop_meta(lv_obj_t * obj, lv_style_prop_t prop, uint16_t meta,
+ lv_style_selector_t selector)
+{
+ lv_style_t * style = get_local_style(obj, selector);
+ lv_style_set_prop_meta(style, prop, meta);
+ lv_obj_refresh_style(obj, selector, prop);
+}
-lv_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value,
- lv_style_selector_t selector)
+lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value,
+ lv_style_selector_t selector)
{
uint32_t i;
for(i = 0; i < obj->style_cnt; i++) {
@@ -275,7 +294,7 @@ lv_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_st
}
}
- return LV_RES_INV;
+ return LV_STYLE_RES_NOT_FOUND;
}
bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector)
@@ -294,7 +313,12 @@ bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_sty
/*The style is not found*/
if(i == obj->style_cnt) return false;
- return lv_style_remove_prop(obj->styles[i].style, prop);
+ lv_res_t res = lv_style_remove_prop(obj->styles[i].style, prop);
+ if(res == LV_RES_OK) {
+ lv_obj_refresh_style(obj, selector, prop);
+ }
+
+ return res;
}
void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state,
@@ -321,7 +345,7 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t
if(tr_dsc->prop == LV_STYLE_RADIUS) {
if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) {
lv_coord_t whalf = lv_obj_get_width(obj) / 2;
- lv_coord_t hhalf = lv_obj_get_width(obj) / 2;
+ lv_coord_t hhalf = lv_obj_get_height(obj) / 2;
if(v1.num == LV_RADIUS_CIRCLE) v1.num = LV_MIN(whalf + 1, hhalf + 1);
if(v2.num == LV_RADIUS_CIRCLE) v2.num = LV_MIN(whalf + 1, hhalf + 1);
}
@@ -353,7 +377,6 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t
lv_anim_start(&a);
}
-
lv_style_value_t _lv_obj_style_apply_color_filter(const lv_obj_t * obj, uint32_t part, lv_style_value_t v)
{
if(obj == NULL) return v;
@@ -462,7 +485,6 @@ lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector)
return selector & 0xFF0000;
}
-
lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj, lv_part_t part, const char * txt)
{
lv_text_align_t align = lv_obj_get_style_text_align(obj, part);
@@ -471,6 +493,39 @@ lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj,
return align;
}
+lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t * obj, lv_part_t part)
+{
+
+ lv_opa_t opa_obj = lv_obj_get_style_opa(obj, part);
+ if(opa_obj <= LV_OPA_MIN) return LV_OPA_TRANSP;
+
+ lv_opa_t opa_final = LV_OPA_COVER;
+ if(opa_obj < LV_OPA_MAX) {
+ opa_final = ((uint32_t)opa_final * opa_obj) >> 8;
+ }
+
+ if(part != LV_PART_MAIN) {
+ part = LV_PART_MAIN;
+ }
+ else {
+ obj = lv_obj_get_parent(obj);
+ }
+
+ while(obj) {
+ opa_obj = lv_obj_get_style_opa(obj, part);
+ if(opa_obj <= LV_OPA_MIN) return LV_OPA_TRANSP;
+ if(opa_obj < LV_OPA_MAX) {
+ opa_final = ((uint32_t)opa_final * opa_obj) >> 8;
+ }
+
+ obj = lv_obj_get_parent(obj);
+ }
+
+ if(opa_final <= LV_OPA_MIN) return LV_OPA_TRANSP;
+ if(opa_final >= LV_OPA_MAX) return LV_OPA_COVER;
+ return opa_final;
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -543,8 +598,7 @@ static _lv_obj_style_t * get_trans_style(lv_obj_t * obj, lv_style_selector_t se
return &obj->styles[0];
}
-
-static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v)
+static lv_style_res_t get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, lv_style_value_t * v)
{
uint8_t group = 1 << _lv_style_get_prop_group(prop);
int32_t weight = -1;
@@ -553,7 +607,7 @@ static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t
lv_style_value_t value_tmp;
bool skip_trans = obj->skip_trans;
uint32_t i;
- bool found;
+ lv_style_res_t found;
for(i = 0; i < obj->style_cnt; i++) {
_lv_obj_style_t * obj_style = &obj->styles[i];
if(obj_style->is_trans == false) break;
@@ -564,20 +618,22 @@ static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t
if(part_act != part) continue;
if((obj_style->style->has_group & group) == 0) continue;
found = lv_style_get_prop(obj_style->style, prop, &value_tmp);
- if(found) {
+ if(found == LV_STYLE_RES_FOUND) {
*v = value_tmp;
- return true;
+ return LV_STYLE_RES_FOUND;
+ }
+ else if(found == LV_STYLE_RES_INHERIT) {
+ return LV_STYLE_RES_INHERIT;
}
}
for(; i < obj->style_cnt; i++) {
+ if((obj->styles[i].style->has_group & group) == 0) continue;
_lv_obj_style_t * obj_style = &obj->styles[i];
lv_part_t part_act = lv_obj_style_get_selector_part(obj->styles[i].selector);
lv_state_t state_act = lv_obj_style_get_selector_state(obj->styles[i].selector);
if(part_act != part) continue;
- if((obj_style->style->has_group & group) == 0) continue;
-
/*Be sure the style not specifies other state than the requested.
*E.g. For HOVER+PRESS object state, HOVER style only is OK, but HOVER+FOCUS style is not*/
if((state_act & state_inv)) continue;
@@ -587,23 +643,26 @@ static bool get_prop_core(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t
found = lv_style_get_prop(obj_style->style, prop, &value_tmp);
- if(found) {
+ if(found == LV_STYLE_RES_FOUND) {
if(state_act == state) {
*v = value_tmp;
- return true;
+ return LV_STYLE_RES_FOUND;
}
if(weight < state_act) {
weight = state_act;
*v = value_tmp;
}
}
+ else if(found == LV_STYLE_RES_INHERIT) {
+ return LV_STYLE_RES_INHERIT;
+ }
}
if(weight >= 0) {
*v = value_tmp;
- return true;
+ return LV_STYLE_RES_FOUND;
}
- else return false;
+ else return LV_STYLE_RES_NOT_FOUND;
}
/**
@@ -719,6 +778,7 @@ static void trans_anim_cb(void * _tr, int32_t v)
else value_final.ptr = tr->end_value.ptr;
break;
case LV_STYLE_BG_COLOR:
+ case LV_STYLE_BG_GRAD_COLOR:
case LV_STYLE_BORDER_COLOR:
case LV_STYLE_TEXT_COLOR:
case LV_STYLE_SHADOW_COLOR:
@@ -811,6 +871,17 @@ static void trans_anim_ready_cb(lv_anim_t * a)
}
}
+static lv_layer_type_t calculate_layer_type(lv_obj_t * obj)
+{
+ if(lv_obj_get_style_transform_angle(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM;
+ if(lv_obj_get_style_transform_zoom(obj, 0) != 256) return LV_LAYER_TYPE_TRANSFORM;
+ if(lv_obj_get_style_opa_layered(obj, 0) != LV_OPA_COVER) return LV_LAYER_TYPE_SIMPLE;
+#if LV_DRAW_COMPLEX
+ if(lv_obj_get_style_blend_mode(obj, 0) != LV_BLEND_MODE_NORMAL) return LV_LAYER_TYPE_SIMPLE;
+#endif
+ return LV_LAYER_TYPE_NONE;
+}
+
static void fade_anim_cb(void * obj, int32_t v)
{
lv_obj_set_style_opa(obj, v, 0);
@@ -820,5 +891,3 @@ static void fade_in_anim_ready(lv_anim_t * a)
{
lv_obj_remove_local_style_prop(a->var, LV_STYLE_OPA, 0);
}
-
-
diff --git a/lib/lvgl/src/core/lv_obj_style.h b/lib/lvgl/src/core/lv_obj_style.h
index 329ca91..a0eb8ce 100644
--- a/lib/lvgl/src/core/lv_obj_style.h
+++ b/lib/lvgl/src/core/lv_obj_style.h
@@ -91,7 +91,7 @@ void lv_obj_remove_style(struct _lv_obj_t * obj, lv_style_t * style, lv_style_se
*/
static inline void lv_obj_remove_style_all(struct _lv_obj_t * obj)
{
- lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY);
+ lv_obj_remove_style(obj, NULL, (lv_style_selector_t)LV_PART_ANY | (lv_style_selector_t)LV_STATE_ANY);
}
/**
@@ -140,8 +140,11 @@ lv_style_value_t lv_obj_get_style_prop(const struct _lv_obj_t * obj, lv_part_t p
void lv_obj_set_local_style_prop(struct _lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value,
lv_style_selector_t selector);
-lv_res_t lv_obj_get_local_style_prop(struct _lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value,
- lv_style_selector_t selector);
+void lv_obj_set_local_style_prop_meta(struct _lv_obj_t * obj, lv_style_prop_t prop, uint16_t meta,
+ lv_style_selector_t selector);
+
+lv_style_res_t lv_obj_get_local_style_prop(struct _lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value,
+ lv_style_selector_t selector);
/**
* Remove a local style property from a part of an object with a given state.
@@ -233,6 +236,19 @@ static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, lv_coord_t valu
lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj, lv_part_t part, const char * txt);
+static inline lv_coord_t lv_obj_get_style_transform_zoom_safe(const struct _lv_obj_t * obj, uint32_t part)
+{
+ int16_t zoom = lv_obj_get_style_transform_zoom(obj, part);
+ return zoom != 0 ? zoom : 1;
+}
+
+/**
+ * Get the `opa` style property from all parents and multiply and `>> 8` them.
+ * @param obj the object whose opacity should be get
+ * @param part the part whose opacity should be get. Non-MAIN parts will consider the `opa` of teh MAIN part too
+ * @return the final opacity considering the parents' opacity too
+ */
+lv_opa_t lv_obj_get_style_opa_recursive(const struct _lv_obj_t * obj, lv_part_t part);
/**********************
* MACROS
diff --git a/lib/lvgl/src/core/lv_obj_style_gen.c b/lib/lvgl/src/core/lv_obj_style_gen.c
index cc51506..81358ab 100644
--- a/lib/lvgl/src/core/lv_obj_style_gen.c
+++ b/lib/lvgl/src/core/lv_obj_style_gen.c
@@ -120,6 +120,22 @@ void lv_obj_set_style_transform_angle(struct _lv_obj_t * obj, lv_coord_t value,
lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_ANGLE, v, selector);
}
+void lv_obj_set_style_transform_pivot_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+ lv_style_value_t v = {
+ .num = (int32_t)value
+ };
+ lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_PIVOT_X, v, selector);
+}
+
+void lv_obj_set_style_transform_pivot_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
+{
+ lv_style_value_t v = {
+ .num = (int32_t)value
+ };
+ lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_PIVOT_Y, v, selector);
+}
+
void lv_obj_set_style_pad_top(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
{
lv_style_value_t v = {
@@ -584,6 +600,14 @@ void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selec
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
}
+void lv_obj_set_style_opa_layered(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
+{
+ lv_style_value_t v = {
+ .num = (int32_t)value
+ };
+ lv_obj_set_local_style_prop(obj, LV_STYLE_OPA_LAYERED, v, selector);
+}
+
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
{
lv_style_value_t v = {
diff --git a/lib/lvgl/src/core/lv_obj_style_gen.h b/lib/lvgl/src/core/lv_obj_style_gen.h
index 4a72a5a..4a135be 100644
--- a/lib/lvgl/src/core/lv_obj_style_gen.h
+++ b/lib/lvgl/src/core/lv_obj_style_gen.h
@@ -88,6 +88,18 @@ static inline lv_coord_t lv_obj_get_style_transform_angle(const struct _lv_obj_t
return (lv_coord_t)v.num;
}
+static inline lv_coord_t lv_obj_get_style_transform_pivot_x(const struct _lv_obj_t * obj, uint32_t part)
+{
+ lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_PIVOT_X);
+ return (lv_coord_t)v.num;
+}
+
+static inline lv_coord_t lv_obj_get_style_transform_pivot_y(const struct _lv_obj_t * obj, uint32_t part)
+{
+ lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_PIVOT_Y);
+ return (lv_coord_t)v.num;
+}
+
static inline lv_coord_t lv_obj_get_style_pad_top(const struct _lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_TOP);
@@ -496,6 +508,12 @@ static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32
return (lv_opa_t)v.num;
}
+static inline lv_opa_t lv_obj_get_style_opa_layered(const struct _lv_obj_t * obj, uint32_t part)
+{
+ lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA_LAYERED);
+ return (lv_opa_t)v.num;
+}
+
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
@@ -565,6 +583,8 @@ void lv_obj_set_style_translate_x(struct _lv_obj_t * obj, lv_coord_t value, lv_s
void lv_obj_set_style_translate_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
void lv_obj_set_style_transform_zoom(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
void lv_obj_set_style_transform_angle(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transform_pivot_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
+void lv_obj_set_style_transform_pivot_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
void lv_obj_set_style_pad_top(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
void lv_obj_set_style_pad_bottom(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
@@ -623,6 +643,7 @@ void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value,
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
+void lv_obj_set_style_opa_layered(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_anim(struct _lv_obj_t * obj, const lv_anim_t * value, lv_style_selector_t selector);
diff --git a/lib/lvgl/src/core/lv_obj_tree.c b/lib/lvgl/src/core/lv_obj_tree.c
index d3ad16a..569d674 100644
--- a/lib/lvgl/src/core/lv_obj_tree.c
+++ b/lib/lvgl/src/core/lv_obj_tree.c
@@ -49,9 +49,6 @@ void lv_obj_del(lv_obj_t * obj)
lv_obj_invalidate(obj);
lv_obj_t * par = lv_obj_get_parent(obj);
- if(par) {
- lv_obj_scrollbar_invalidate(par);
- }
lv_disp_t * disp = NULL;
bool act_scr_del = false;
@@ -65,8 +62,6 @@ void lv_obj_del(lv_obj_t * obj)
/*Call the ancestor's event handler to the parent to notify it about the child delete*/
if(par) {
- lv_obj_update_layout(par);
- lv_obj_readjust_scroll(par, LV_ANIM_OFF);
lv_obj_scrollbar_invalidate(par);
lv_event_send(par, LV_EVENT_CHILD_CHANGED, NULL);
lv_event_send(par, LV_EVENT_CHILD_DELETED, NULL);
@@ -173,7 +168,6 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
obj->parent = parent;
/*Notify the original parent because one of its children is lost*/
- lv_obj_readjust_scroll(old_parent, LV_ANIM_OFF);
lv_obj_scrollbar_invalidate(old_parent);
lv_event_send(old_parent, LV_EVENT_CHILD_CHANGED, obj);
lv_event_send(old_parent, LV_EVENT_CHILD_DELETED, NULL);
@@ -360,6 +354,8 @@ static void obj_del_core(lv_obj_t * obj)
lv_res_t res = lv_event_send(obj, LV_EVENT_DELETE, NULL);
if(res == LV_RES_INV) return;
+ obj->being_deleted = 1;
+
/*Recursively delete the children*/
lv_obj_t * child = lv_obj_get_child(obj, 0);
while(child) {
@@ -420,7 +416,6 @@ static void obj_del_core(lv_obj_t * obj)
lv_mem_free(obj);
}
-
static lv_obj_tree_walk_res_t walk_core(lv_obj_t * obj, lv_obj_tree_walk_cb_t cb, void * user_data)
{
lv_obj_tree_walk_res_t res = LV_OBJ_TREE_WALK_NEXT;
diff --git a/lib/lvgl/src/core/lv_obj_tree.h b/lib/lvgl/src/core/lv_obj_tree.h
index bee9e16..629efeb 100644
--- a/lib/lvgl/src/core/lv_obj_tree.h
+++ b/lib/lvgl/src/core/lv_obj_tree.h
@@ -20,7 +20,6 @@ extern "C" {
* DEFINES
*********************/
-
/**********************
* TYPEDEFS
**********************/
@@ -164,7 +163,6 @@ void lv_obj_tree_walk(struct _lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, vo
* MACROS
**********************/
-
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/lvgl/src/core/lv_refr.c b/lib/lvgl/src/core/lv_refr.c
index 2cef6ef..55dd326 100644
--- a/lib/lvgl/src/core/lv_refr.c
+++ b/lib/lvgl/src/core/lv_refr.c
@@ -17,6 +17,7 @@
#include "../misc/lv_gc.h"
#include "../draw/lv_draw.h"
#include "../font/lv_font_fmt_txt.h"
+#include "../extra/others/snapshot/lv_snapshot.h"
#if LV_USE_PERF_MONITOR || LV_USE_MEM_MONITOR
#include "../widgets/lv_label.h"
@@ -51,11 +52,13 @@ typedef struct {
* STATIC PROTOTYPES
**********************/
static void lv_refr_join_area(void);
-static void lv_refr_areas(void);
-static void lv_refr_area(const lv_area_t * area_p);
-static void lv_refr_area_part(lv_draw_ctx_t * draw_ctx);
+static void refr_invalid_areas(void);
+static void refr_sync_areas(void);
+static void refr_area(const lv_area_t * area_p);
+static void refr_area_part(lv_draw_ctx_t * draw_ctx);
static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj);
-static void lv_refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_obj);
+static void refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_obj);
+static void refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj);
static uint32_t get_max_row(lv_disp_t * disp, lv_coord_t area_w, lv_coord_t area_h);
static void draw_buf_flush(lv_disp_t * disp);
static void call_flush_cb(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p);
@@ -124,11 +127,8 @@ void lv_refr_now(lv_disp_t * disp)
}
}
-void lv_refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj)
+void lv_obj_redraw(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj)
{
- /*Do not refresh hidden objects*/
- if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return;
-
const lv_area_t * clip_area_ori = draw_ctx->clip_area;
lv_area_t clip_coords_for_obj;
@@ -138,18 +138,15 @@ void lv_refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj)
lv_coord_t ext_draw_size = _lv_obj_get_ext_draw_size(obj);
lv_area_increase(&obj_coords_ext, ext_draw_size, ext_draw_size);
bool com_clip_res = _lv_area_intersect(&clip_coords_for_obj, clip_area_ori, &obj_coords_ext);
-
/*If the object is visible on the current clip area OR has overflow visible draw it.
*With overflow visible drawing should happen to apply the masks which might affect children */
bool should_draw = com_clip_res || lv_obj_has_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE);
if(should_draw) {
draw_ctx->clip_area = &clip_coords_for_obj;
- /*Draw the object*/
lv_event_send(obj, LV_EVENT_DRAW_MAIN_BEGIN, draw_ctx);
lv_event_send(obj, LV_EVENT_DRAW_MAIN, draw_ctx);
lv_event_send(obj, LV_EVENT_DRAW_MAIN_END, draw_ctx);
-
#if LV_USE_REFR_DEBUG
lv_color_t debug_color = lv_color_make(lv_rand(0, 0xFF), lv_rand(0, 0xFF), lv_rand(0, 0xFF));
lv_draw_rect_dsc_t draw_dsc;
@@ -165,8 +162,8 @@ void lv_refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj)
/*With overflow visible keep the previous clip area to let the children visible out of this object too
*With not overflow visible limit the clip are to the object's coordinates to clip the children*/
- bool refr_children = true;
lv_area_t clip_coords_for_children;
+ bool refr_children = true;
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_OVERFLOW_VISIBLE)) {
clip_coords_for_children = *clip_area_ori;
}
@@ -182,7 +179,7 @@ void lv_refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj)
uint32_t child_cnt = lv_obj_get_child_cnt(obj);
for(i = 0; i < child_cnt; i++) {
lv_obj_t * child = obj->spec_attr->children[i];
- lv_refr_obj(draw_ctx, child);
+ refr_obj(draw_ctx, child);
}
}
@@ -209,6 +206,7 @@ void _lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p)
{
if(!disp) disp = lv_disp_get_default();
if(!disp) return;
+ if(!lv_disp_is_invalidation_enabled(disp)) return;
if(disp->rendering_in_progress) {
LV_LOG_ERROR("detected modifying dirty areas in render");
@@ -322,16 +320,23 @@ void _lv_disp_refr_timer(lv_timer_t * tmr)
}
lv_refr_join_area();
-
- lv_refr_areas();
+ refr_sync_areas();
+ refr_invalid_areas();
/*If refresh happened ...*/
if(disp_refr->inv_p != 0) {
- if(disp_refr->driver->full_refresh) {
- lv_area_t disp_area;
- lv_area_set(&disp_area, 0, 0, lv_disp_get_hor_res(disp_refr) - 1, lv_disp_get_ver_res(disp_refr) - 1);
- disp_refr->driver->draw_ctx->buf_area = &disp_area;
- draw_buf_flush(disp_refr);
+
+ /*Copy invalid areas for sync next refresh in double buffered direct mode*/
+ if(disp_refr->driver->direct_mode && disp_refr->driver->draw_buf->buf2) {
+
+ uint16_t i;
+ for(i = 0; i < disp_refr->inv_p; i++) {
+ if(disp_refr->inv_area_joined[i])
+ continue;
+
+ lv_area_t * sync_area = _lv_ll_ins_tail(&disp_refr->sync_areas);
+ *sync_area = disp_refr->inv_areas[i];
+ }
}
/*Clean up*/
@@ -340,6 +345,7 @@ void _lv_disp_refr_timer(lv_timer_t * tmr)
disp_refr->inv_p = 0;
elaps = lv_tick_elaps(start);
+
/*Call monitor cb if present*/
if(disp_refr->driver->monitor_cb) {
disp_refr->driver->monitor_cb(disp_refr->driver, elaps, px_num);
@@ -433,8 +439,10 @@ void _lv_disp_refr_timer(lv_timer_t * tmr)
uint32_t used_size = mon.total_size - mon.free_size;;
uint32_t used_kb = used_size / 1024;
uint32_t used_kb_tenth = (used_size - (used_kb * 1024)) / 102;
- lv_label_set_text_fmt(mem_label, "%" LV_PRIu32 ".%" LV_PRIu32 " kB used (%d %%)\n" \
- "%d%% frag.", used_kb, used_kb_tenth, mon.used_pct,
+ lv_label_set_text_fmt(mem_label,
+ "%"LV_PRIu32 ".%"LV_PRIu32 " kB used (%d %%)\n"
+ "%d%% frag.",
+ used_kb, used_kb_tenth, mon.used_pct,
mon.frag_pct);
}
#endif
@@ -458,7 +466,6 @@ uint32_t lv_refr_get_fps_avg(void)
}
#endif
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -500,10 +507,82 @@ static void lv_refr_join_area(void)
}
}
+/**
+ * Refresh the sync areas
+ */
+static void refr_sync_areas(void)
+{
+ /*Do not sync if not direct mode*/
+ if(!disp_refr->driver->direct_mode) return;
+
+ /*Do not sync if not double buffered*/
+ if(disp_refr->driver->draw_buf->buf2 == NULL) return;
+
+ /*Do not sync if no sync areas*/
+ if(_lv_ll_is_empty(&disp_refr->sync_areas)) return;
+
+ /*The buffers are already swapped.
+ *So the active buffer is the off screen buffer where LVGL will render*/
+ void * buf_off_screen = disp_refr->driver->draw_buf->buf_act;
+ void * buf_on_screen = disp_refr->driver->draw_buf->buf_act == disp_refr->driver->draw_buf->buf1
+ ? disp_refr->driver->draw_buf->buf2
+ : disp_refr->driver->draw_buf->buf1;
+
+ /*Get stride for buffer copy*/
+ lv_coord_t stride = lv_disp_get_hor_res(disp_refr);
+
+ /*Iterate through invalidated areas to see if sync area should be copied*/
+ lv_area_t res[4] = {0};
+ int8_t res_c, j;
+ uint32_t i;
+ lv_area_t * sync_area, * new_area, * next_area;
+ for(i = 0; i < disp_refr->inv_p; i++) {
+ /*Skip joined areas*/
+ if(disp_refr->inv_area_joined[i]) continue;
+
+ /*Iterate over sync areas*/
+ sync_area = _lv_ll_get_head(&disp_refr->sync_areas);
+ while(sync_area != NULL) {
+ /*Get next sync area*/
+ next_area = _lv_ll_get_next(&disp_refr->sync_areas, sync_area);
+
+ /*Remove intersect of redraw area from sync area and get remaining areas*/
+ res_c = _lv_area_diff(res, sync_area, &disp_refr->inv_areas[i]);
+
+ /*New sub areas created after removing intersect*/
+ if(res_c != -1) {
+ /*Replace old sync area with new areas*/
+ for(j = 0; j < res_c; j++) {
+ new_area = _lv_ll_ins_prev(&disp_refr->sync_areas, sync_area);
+ *new_area = res[j];
+ }
+ _lv_ll_remove(&disp_refr->sync_areas, sync_area);
+ lv_mem_free(sync_area);
+ }
+
+ /*Move on to next sync area*/
+ sync_area = next_area;
+ }
+ }
+
+ /*Copy sync areas (if any remaining)*/
+ for(sync_area = _lv_ll_get_head(&disp_refr->sync_areas); sync_area != NULL;
+ sync_area = _lv_ll_get_next(&disp_refr->sync_areas, sync_area)) {
+ disp_refr->driver->draw_ctx->buffer_copy(
+ disp_refr->driver->draw_ctx,
+ buf_off_screen, stride, sync_area,
+ buf_on_screen, stride, sync_area
+ );
+ }
+
+ /*Clear sync areas*/
+ _lv_ll_clear(&disp_refr->sync_areas);
+}
+
/**
* Refresh the joined areas
*/
-static void lv_refr_areas(void)
+static void refr_invalid_areas(void)
{
px_num = 0;
@@ -534,7 +613,7 @@ static void lv_refr_areas(void)
if(i == last_i) disp_refr->driver->draw_buf->last_area = 1;
disp_refr->driver->draw_buf->last_part = 0;
- lv_refr_area(&disp_refr->inv_areas[i]);
+ refr_area(&disp_refr->inv_areas[i]);
px_num += lv_area_get_size(&disp_refr->inv_areas[i]);
}
@@ -547,7 +626,7 @@ static void lv_refr_areas(void)
* Refresh an area if there is Virtual Display Buffer
* @param area_p pointer to an area to refresh
*/
-static void lv_refr_area(const lv_area_t * area_p)
+static void refr_area(const lv_area_t * area_p)
{
lv_draw_ctx_t * draw_ctx = disp_refr->driver->draw_ctx;
draw_ctx->buf = disp_refr->driver->draw_buf->buf_act;
@@ -562,12 +641,12 @@ static void lv_refr_area(const lv_area_t * area_p)
if(disp_refr->driver->full_refresh) {
disp_refr->driver->draw_buf->last_part = 1;
draw_ctx->clip_area = &disp_area;
- lv_refr_area_part(draw_ctx);
+ refr_area_part(draw_ctx);
}
else {
disp_refr->driver->draw_buf->last_part = disp_refr->driver->draw_buf->last_area;
draw_ctx->clip_area = area_p;
- lv_refr_area_part(draw_ctx);
+ refr_area_part(draw_ctx);
}
return;
}
@@ -596,7 +675,7 @@ static void lv_refr_area(const lv_area_t * area_p)
if(sub_area.y2 > y2) sub_area.y2 = y2;
row_last = sub_area.y2;
if(y2 == row_last) disp_refr->driver->draw_buf->last_part = 1;
- lv_refr_area_part(draw_ctx);
+ refr_area_part(draw_ctx);
}
/*If the last y coordinates are not handled yet ...*/
@@ -610,20 +689,38 @@ static void lv_refr_area(const lv_area_t * area_p)
draw_ctx->clip_area = &sub_area;
draw_ctx->buf = disp_refr->driver->draw_buf->buf_act;
disp_refr->driver->draw_buf->last_part = 1;
- lv_refr_area_part(draw_ctx);
+ refr_area_part(draw_ctx);
}
}
-static void lv_refr_area_part(lv_draw_ctx_t * draw_ctx)
+static void refr_area_part(lv_draw_ctx_t * draw_ctx)
{
lv_disp_draw_buf_t * draw_buf = lv_disp_get_draw_buf(disp_refr);
+ if(draw_ctx->init_buf)
+ draw_ctx->init_buf(draw_ctx);
+
/* Below the `area_p` area will be redrawn into the draw buffer.
- * In single buffered mode wait here until the buffer is freed.*/
- if(draw_buf->buf1 && !draw_buf->buf2) {
+ * In single buffered mode wait here until the buffer is freed.
+ * In full double buffered mode wait here while the buffers are swapped and a buffer becomes available*/
+ bool full_sized = draw_buf->size == (uint32_t)disp_refr->driver->hor_res * disp_refr->driver->ver_res;
+ if((draw_buf->buf1 && !draw_buf->buf2) ||
+ (draw_buf->buf1 && draw_buf->buf2 && full_sized)) {
while(draw_buf->flushing) {
if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
}
+
+ /*If the screen is transparent initialize it when the flushing is ready*/
+#if LV_COLOR_SCREEN_TRANSP
+ if(disp_refr->driver->screen_transp) {
+ if(disp_refr->driver->clear_cb) {
+ disp_refr->driver->clear_cb(disp_refr->driver, disp_refr->driver->draw_buf->buf_act, disp_refr->driver->draw_buf->size);
+ }
+ else {
+ lv_memset_00(disp_refr->driver->draw_buf->buf_act, disp_refr->driver->draw_buf->size * LV_IMG_PX_SIZE_ALPHA_BYTE);
+ }
+ }
+#endif
}
lv_obj_t * top_act_scr = NULL;
@@ -673,34 +770,30 @@ static void lv_refr_area_part(lv_draw_ctx_t * draw_ctx)
if(disp_refr->draw_prev_over_act) {
if(top_act_scr == NULL) top_act_scr = disp_refr->act_scr;
- lv_refr_obj_and_children(draw_ctx, top_act_scr);
+ refr_obj_and_children(draw_ctx, top_act_scr);
/*Refresh the previous screen if any*/
if(disp_refr->prev_scr) {
if(top_prev_scr == NULL) top_prev_scr = disp_refr->prev_scr;
- lv_refr_obj_and_children(draw_ctx, top_prev_scr);
+ refr_obj_and_children(draw_ctx, top_prev_scr);
}
}
else {
/*Refresh the previous screen if any*/
if(disp_refr->prev_scr) {
if(top_prev_scr == NULL) top_prev_scr = disp_refr->prev_scr;
- lv_refr_obj_and_children(draw_ctx, top_prev_scr);
+ refr_obj_and_children(draw_ctx, top_prev_scr);
}
if(top_act_scr == NULL) top_act_scr = disp_refr->act_scr;
- lv_refr_obj_and_children(draw_ctx, top_act_scr);
+ refr_obj_and_children(draw_ctx, top_act_scr);
}
/*Also refresh top and sys layer unconditionally*/
- lv_refr_obj_and_children(draw_ctx, lv_disp_get_layer_top(disp_refr));
- lv_refr_obj_and_children(draw_ctx, lv_disp_get_layer_sys(disp_refr));
+ refr_obj_and_children(draw_ctx, lv_disp_get_layer_top(disp_refr));
+ refr_obj_and_children(draw_ctx, lv_disp_get_layer_sys(disp_refr));
- /*In true double buffered mode flush only once when all areas were rendered.
- *In normal mode flush after every area*/
- if(disp_refr->driver->full_refresh == false) {
- draw_buf_flush(disp_refr);
- }
+ draw_buf_flush(disp_refr);
}
/**
@@ -713,32 +806,32 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
{
lv_obj_t * found_p = NULL;
+ if(_lv_area_is_in(area_p, &obj->coords, 0) == false) return NULL;
+ if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return NULL;
+ if(_lv_obj_get_layer_type(obj) != LV_LAYER_TYPE_NONE) return NULL;
+
/*If this object is fully cover the draw area then check the children too*/
- if(_lv_area_is_in(area_p, &obj->coords, 0) && lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN) == false) {
- lv_cover_check_info_t info;
- info.res = LV_COVER_RES_COVER;
- info.area = area_p;
- lv_event_send(obj, LV_EVENT_COVER_CHECK, &info);
- if(info.res == LV_COVER_RES_MASKED) return NULL;
+ lv_cover_check_info_t info;
+ info.res = LV_COVER_RES_COVER;
+ info.area = area_p;
+ lv_event_send(obj, LV_EVENT_COVER_CHECK, &info);
+ if(info.res == LV_COVER_RES_MASKED) return NULL;
- uint32_t i;
- uint32_t child_cnt = lv_obj_get_child_cnt(obj);
- for(i = 0; i < child_cnt; i++) {
- lv_obj_t * child = obj->spec_attr->children[i];
- found_p = lv_refr_get_top_obj(area_p, child);
+ int32_t i;
+ int32_t child_cnt = lv_obj_get_child_cnt(obj);
+ for(i = child_cnt - 1; i >= 0; i--) {
+ lv_obj_t * child = obj->spec_attr->children[i];
+ found_p = lv_refr_get_top_obj(area_p, child);
- /*If a children is ok then break*/
- if(found_p != NULL) {
- break;
- }
+ /*If a children is ok then break*/
+ if(found_p != NULL) {
+ break;
}
+ }
- /*If no better children use this object*/
- if(found_p == NULL) {
- if(info.res == LV_COVER_RES_COVER) {
- found_p = obj;
- }
- }
+ /*If no better children use this object*/
+ if(found_p == NULL && info.res == LV_COVER_RES_COVER) {
+ found_p = obj;
}
return found_p;
@@ -749,7 +842,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
* @param top_p pointer to an objects. Start the drawing from it.
* @param mask_p pointer to an area, the objects will be drawn only here
*/
-static void lv_refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_obj)
+static void refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_obj)
{
/*Normally always will be a top_obj (at least the screen)
*but in special cases (e.g. if the screen has alpha) it won't.
@@ -758,7 +851,7 @@ static void lv_refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_ob
if(top_obj == NULL) return; /*Shouldn't happen*/
/*Refresh the top object and its children*/
- lv_refr_obj(draw_ctx, top_obj);
+ refr_obj(draw_ctx, top_obj);
/*Draw the 'younger' sibling objects because they can be on top_obj*/
lv_obj_t * parent;
@@ -778,7 +871,7 @@ static void lv_refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_ob
}
else {
/*Refresh the objects*/
- lv_refr_obj(draw_ctx, child);
+ refr_obj(draw_ctx, child);
}
}
@@ -795,6 +888,164 @@ static void lv_refr_obj_and_children(lv_draw_ctx_t * draw_ctx, lv_obj_t * top_ob
}
}
+static lv_res_t layer_get_area(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj, lv_layer_type_t layer_type,
+ lv_area_t * layer_area_out)
+{
+ lv_coord_t ext_draw_size = _lv_obj_get_ext_draw_size(obj);
+ lv_area_t obj_coords_ext;
+ lv_obj_get_coords(obj, &obj_coords_ext);
+ lv_area_increase(&obj_coords_ext, ext_draw_size, ext_draw_size);
+
+ if(layer_type == LV_LAYER_TYPE_TRANSFORM) {
+ /*Get the transformed area and clip it to the current clip area.
+ *This area needs to be updated on the screen.*/
+ lv_area_t clip_coords_for_obj;
+ lv_area_t tranf_coords = obj_coords_ext;
+ lv_obj_get_transformed_area(obj, &tranf_coords, false, false);
+ if(!_lv_area_intersect(&clip_coords_for_obj, draw_ctx->clip_area, &tranf_coords)) {
+ return LV_RES_INV;
+ }
+
+ /*Transform back (inverse) the transformed area.
+ *It will tell which area of the non-transformed widget needs to be redrawn
+ *in order to cover transformed area after transformation.*/
+ lv_area_t inverse_clip_coords_for_obj = clip_coords_for_obj;
+ lv_obj_get_transformed_area(obj, &inverse_clip_coords_for_obj, false, true);
+ if(!_lv_area_intersect(&inverse_clip_coords_for_obj, &inverse_clip_coords_for_obj, &obj_coords_ext)) {
+ return LV_RES_INV;
+ }
+
+ *layer_area_out = inverse_clip_coords_for_obj;
+ }
+ else if(layer_type == LV_LAYER_TYPE_SIMPLE) {
+ lv_area_t clip_coords_for_obj;
+ if(!_lv_area_intersect(&clip_coords_for_obj, draw_ctx->clip_area, &obj_coords_ext)) {
+ return LV_RES_INV;
+ }
+ *layer_area_out = clip_coords_for_obj;
+ }
+ else {
+ LV_LOG_WARN("Unhandled intermediate layer type");
+ return LV_RES_INV;
+ }
+
+ return LV_RES_OK;
+}
+
+static void layer_alpha_test(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags)
+{
+ bool has_alpha;
+ /*If globally the layer has alpha maybe this smaller section has not (e.g. not on a rounded corner)
+ *If turns out that this section has no alpha renderer can choose faster algorithms*/
+ if(flags & LV_DRAW_LAYER_FLAG_HAS_ALPHA) {
+ /*Test for alpha by assuming there is no alpha. If it fails, fall back to rendering with alpha*/
+ has_alpha = true;
+ if(_lv_area_is_in(&layer_ctx->area_act, &obj->coords, 0)) {
+ lv_cover_check_info_t info;
+ info.res = LV_COVER_RES_COVER;
+ info.area = &layer_ctx->area_act;
+ lv_event_send(obj, LV_EVENT_COVER_CHECK, &info);
+ if(info.res == LV_COVER_RES_COVER) has_alpha = false;
+ }
+
+ if(has_alpha) {
+ layer_ctx->area_act.y2 = layer_ctx->area_act.y1 + layer_ctx->max_row_with_alpha - 1;
+ }
+ }
+ else {
+ has_alpha = false;
+ }
+
+ if(layer_ctx->area_act.y2 > layer_ctx->area_full.y2) layer_ctx->area_act.y2 = layer_ctx->area_full.y2;
+ lv_draw_layer_adjust(draw_ctx, layer_ctx, has_alpha ? LV_DRAW_LAYER_FLAG_HAS_ALPHA : LV_DRAW_LAYER_FLAG_NONE);
+}
+
+void refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj)
+{
+ /*Do not refresh hidden objects*/
+ if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) return;
+ lv_layer_type_t layer_type = _lv_obj_get_layer_type(obj);
+ if(layer_type == LV_LAYER_TYPE_NONE) {
+ lv_obj_redraw(draw_ctx, obj);
+ }
+ else {
+ lv_opa_t opa = lv_obj_get_style_opa_layered(obj, 0);
+ if(opa < LV_OPA_MIN) return;
+
+ lv_area_t layer_area_full;
+ lv_res_t res = layer_get_area(draw_ctx, obj, layer_type, &layer_area_full);
+ if(res != LV_RES_OK) return;
+
+ lv_draw_layer_flags_t flags = LV_DRAW_LAYER_FLAG_HAS_ALPHA;
+
+ if(_lv_area_is_in(&layer_area_full, &obj->coords, 0)) {
+ lv_cover_check_info_t info;
+ info.res = LV_COVER_RES_COVER;
+ info.area = &layer_area_full;
+ lv_event_send(obj, LV_EVENT_COVER_CHECK, &info);
+ if(info.res == LV_COVER_RES_COVER) flags &= ~LV_DRAW_LAYER_FLAG_HAS_ALPHA;
+ }
+
+ if(layer_type == LV_LAYER_TYPE_SIMPLE) flags |= LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE;
+
+ lv_draw_layer_ctx_t * layer_ctx = lv_draw_layer_create(draw_ctx, &layer_area_full, flags);
+ if(layer_ctx == NULL) {
+ LV_LOG_WARN("Couldn't create a new layer context");
+ return;
+ }
+ lv_point_t pivot = {
+ .x = lv_obj_get_style_transform_pivot_x(obj, 0),
+ .y = lv_obj_get_style_transform_pivot_y(obj, 0)
+ };
+
+ if(LV_COORD_IS_PCT(pivot.x)) {
+ pivot.x = (LV_COORD_GET_PCT(pivot.x) * lv_area_get_width(&obj->coords)) / 100;
+ }
+ if(LV_COORD_IS_PCT(pivot.y)) {
+ pivot.y = (LV_COORD_GET_PCT(pivot.y) * lv_area_get_height(&obj->coords)) / 100;
+ }
+
+ lv_draw_img_dsc_t draw_dsc;
+ lv_draw_img_dsc_init(&draw_dsc);
+ draw_dsc.opa = opa;
+ draw_dsc.angle = lv_obj_get_style_transform_angle(obj, 0);
+ if(draw_dsc.angle > 3600) draw_dsc.angle -= 3600;
+ else if(draw_dsc.angle < 0) draw_dsc.angle += 3600;
+
+ draw_dsc.zoom = lv_obj_get_style_transform_zoom(obj, 0);
+ draw_dsc.blend_mode = lv_obj_get_style_blend_mode(obj, 0);
+ draw_dsc.antialias = disp_refr->driver->antialiasing;
+
+ if(flags & LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE) {
+ layer_ctx->area_act = layer_ctx->area_full;
+ layer_ctx->area_act.y2 = layer_ctx->area_act.y1 + layer_ctx->max_row_with_no_alpha - 1;
+ if(layer_ctx->area_act.y2 > layer_ctx->area_full.y2) layer_ctx->area_act.y2 = layer_ctx->area_full.y2;
+ }
+
+ while(layer_ctx->area_act.y1 <= layer_area_full.y2) {
+ if(flags & LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE) {
+ layer_alpha_test(obj, draw_ctx, layer_ctx, flags);
+ }
+
+ lv_obj_redraw(draw_ctx, obj);
+
+ draw_dsc.pivot.x = obj->coords.x1 + pivot.x - draw_ctx->buf_area->x1;
+ draw_dsc.pivot.y = obj->coords.y1 + pivot.y - draw_ctx->buf_area->y1;
+
+ /*With LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE it should also go the next chunk*/
+ lv_draw_layer_blend(draw_ctx, layer_ctx, &draw_dsc);
+
+ if((flags & LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE) == 0) break;
+
+ layer_ctx->area_act.y1 = layer_ctx->area_act.y2 + 1;
+ layer_ctx->area_act.y2 = layer_ctx->area_act.y1 + layer_ctx->max_row_with_no_alpha - 1;
+ }
+
+ lv_draw_layer_destroy(draw_ctx, layer_ctx);
+ }
+}
+
static uint32_t get_max_row(lv_disp_t * disp, lv_coord_t area_w, lv_coord_t area_h)
{
int32_t max_row = (uint32_t)disp->driver->draw_buf->size / area_w;
@@ -857,7 +1108,7 @@ static void draw_buf_rotate_180(lv_disp_drv_t * drv, lv_area_t * area, lv_color_
area->x1 = drv->hor_res - tmp_coord - 1;
}
-static LV_ATTRIBUTE_FAST_MEM void draw_buf_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h,
+static void LV_ATTRIBUTE_FAST_MEM draw_buf_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h,
lv_color_t * orig_color_p, lv_color_t * rot_buf)
{
@@ -1021,9 +1272,10 @@ static void draw_buf_flush(lv_disp_t * disp)
lv_draw_ctx_t * draw_ctx = disp->driver->draw_ctx;
if(draw_ctx->wait_for_finish) draw_ctx->wait_for_finish(draw_ctx);
- /* In double buffered mode wait until the other buffer is freed
+ /* In partial double buffered mode wait until the other buffer is freed
* and driver is ready to receive the new buffer */
- if(draw_buf->buf1 && draw_buf->buf2) {
+ bool full_sized = draw_buf->size == (uint32_t)disp_refr->driver->hor_res * disp_refr->driver->ver_res;
+ if(draw_buf->buf1 && draw_buf->buf2 && !full_sized) {
while(draw_buf->flushing) {
if(disp_refr->driver->wait_cb) disp_refr->driver->wait_cb(disp_refr->driver);
}
@@ -1045,6 +1297,7 @@ static void draw_buf_flush(lv_disp_t * disp)
call_flush_cb(disp->driver, draw_ctx->buf_area, draw_ctx->buf);
}
}
+
/*If there are 2 buffers swap them. With direct mode swap only on the last area*/
if(draw_buf->buf1 && draw_buf->buf2 && (!disp->driver->direct_mode || flushing_last)) {
if(draw_buf->buf_act == draw_buf->buf1)
@@ -1090,4 +1343,3 @@ static void mem_monitor_init(mem_monitor_t * _mem_monitor)
_mem_monitor->mem_label = NULL;
}
#endif
-
diff --git a/lib/lvgl/src/core/lv_refr.h b/lib/lvgl/src/core/lv_refr.h
index 984168a..72e8d6c 100644
--- a/lib/lvgl/src/core/lv_refr.h
+++ b/lib/lvgl/src/core/lv_refr.h
@@ -61,7 +61,7 @@ void lv_refr_now(lv_disp_t * disp);
* @param draw pointer to an initialized draw context
* @param obj the start object from the redraw should start
*/
-void lv_refr_obj(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj);
+void lv_obj_redraw(lv_draw_ctx_t * draw_ctx, lv_obj_t * obj);
/**
* Invalidate an area on display to redraw it
diff --git a/lib/lvgl/src/draw/arm2d/lv_gpu_arm2d.c b/lib/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
index d2bf8a5..c0dea45 100644
--- a/lib/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
+++ b/lib/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
@@ -3,18 +3,82 @@
*
*/
+/*
+ * Copyright (C) 2010-2023 Arm Limited or its affiliates. All rights reserved.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
/*********************
* INCLUDES
*********************/
+#if defined(__clang__)
+ #pragma clang diagnostic ignored "-Wunknown-warning-option"
+ #pragma clang diagnostic ignored "-Wreserved-identifier"
+ #pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+ #pragma clang diagnostic ignored "-Wmissing-variable-declarations"
+ #pragma clang diagnostic ignored "-Wcast-qual"
+ #pragma clang diagnostic ignored "-Wcast-align"
+ #pragma clang diagnostic ignored "-Wextra-semi-stmt"
+ #pragma clang diagnostic ignored "-Wsign-conversion"
+ #pragma clang diagnostic ignored "-Wunused-function"
+ #pragma clang diagnostic ignored "-Wimplicit-int-float-conversion"
+ #pragma clang diagnostic ignored "-Wdouble-promotion"
+ #pragma clang diagnostic ignored "-Wunused-parameter"
+ #pragma clang diagnostic ignored "-Wimplicit-float-conversion"
+ #pragma clang diagnostic ignored "-Wimplicit-int-conversion"
+ #pragma clang diagnostic ignored "-Wtautological-pointer-compare"
+ #pragma clang diagnostic ignored "-Wsign-compare"
+ #pragma clang diagnostic ignored "-Wfloat-conversion"
+ #pragma clang diagnostic ignored "-Wmissing-prototypes"
+ #pragma clang diagnostic ignored "-Wpadded"
+ #pragma clang diagnostic ignored "-Wundef"
+ #pragma clang diagnostic ignored "-Wdeclaration-after-statement"
+ #pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
+ #pragma clang diagnostic ignored "-Wunused-variable"
+ #pragma clang diagnostic ignored "-Wunused-but-set-variable"
+ #pragma clang diagnostic ignored "-Wint-conversion"
+#endif
+
#include "lv_gpu_arm2d.h"
#include "../../core/lv_refr.h"
#if LV_USE_GPU_ARM2D
+#define __ARM_2D_IMPL__
#include "arm_2d.h"
+#include "__arm_2d_impl.h"
+
+#if defined(__IS_COMPILER_ARM_COMPILER_5__)
+ #pragma diag_suppress 174,177,188,68,513,144,1296
+#elif defined(__IS_COMPILER_IAR__)
+ #pragma diag_suppress=Pa093
+#elif defined(__IS_COMPILER_GCC__)
+ #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
+#endif
/*********************
* DEFINES
*********************/
+#if ( !defined(__ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__) \
+ || !__ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__) \
+&& LV_COLOR_DEPTH == 32 \
+&& !defined(__ARM_2D_LVGL_CFG_NO_WARNING__)
+#warning Please set macro __ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__ to 1 to get more acceleration opportunities. Or you can define macro __ARM_2D_LVGL_CFG_NO_WARNING__ to suppress this warning.
+#endif
+
+#define MAX_BUF_SIZE (uint32_t) lv_disp_get_hor_res(_lv_refr_get_disp_refreshing())
#if LV_COLOR_DEPTH == 16
#define arm_2d_fill_colour arm_2d_rgb16_fill_colour
@@ -39,6 +103,20 @@
#define __arm_2d_impl_alpha_blending __arm_2d_impl_rgb565_alpha_blending
#define __arm_2d_impl_src_msk_copy __arm_2d_impl_rgb565_src_msk_copy
#define __arm_2d_impl_src_chn_msk_copy __arm_2d_impl_rgb565_src_chn_msk_copy
+#define __arm_2d_impl_cl_key_copy __arm_2d_impl_rgb16_cl_key_copy
+#define __arm_2d_impl_alpha_blending_colour_keying \
+ __arm_2d_impl_rgb565_alpha_blending_colour_keying
+#define arm_2d_tile_transform_with_src_mask_and_opacity_prepare \
+ arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare
+#define arm_2d_tile_transform_with_opacity_prepare \
+ arm_2dp_rgb565_tile_transform_with_opacity_prepare
+#define arm_2d_tile_transform_only_with_opacity_prepare \
+ arm_2dp_rgb565_tile_transform_only_with_opacity_prepare
+#define arm_2d_tile_transform_prepare \
+ arm_2dp_rgb565_tile_transform_prepare
+
+#define __ARM_2D_PIXEL_BLENDING_OPA __ARM_2D_PIXEL_BLENDING_OPA_RGB565
+
#define color_int uint16_t
#elif LV_COLOR_DEPTH == 32
@@ -64,12 +142,271 @@
#define __arm_2d_impl_alpha_blending __arm_2d_impl_cccn888_alpha_blending
#define __arm_2d_impl_src_msk_copy __arm_2d_impl_cccn888_src_msk_copy
#define __arm_2d_impl_src_chn_msk_copy __arm_2d_impl_cccn888_src_chn_msk_copy
+#define __arm_2d_impl_cl_key_copy __arm_2d_impl_rgb32_cl_key_copy
+#define __arm_2d_impl_alpha_blending_colour_keying \
+ __arm_2d_impl_cccn888_alpha_blending_colour_keying
+#define arm_2d_tile_transform_with_src_mask_and_opacity_prepare \
+ arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare
+#define arm_2d_tile_transform_with_opacity_prepare \
+ arm_2dp_cccn888_tile_transform_with_opacity_prepare
+#define arm_2d_tile_transform_only_with_opacity_prepare \
+ arm_2dp_cccn888_tile_transform_only_with_opacity_prepare
+#define arm_2d_tile_transform_prepare \
+ arm_2dp_cccn888_tile_transform_prepare
+
+#define __ARM_2D_PIXEL_BLENDING_OPA __ARM_2D_PIXEL_BLENDING_OPA_CCCN888
+
#define color_int uint32_t
#else
#error The specified LV_COLOR_DEPTH is not supported by this version of lv_gpu_arm2d.c.
#endif
+/* *INDENT-OFF* */
+#define __PREPARE_LL_ACCELERATION__() \
+ int32_t src_stride = lv_area_get_width(coords); \
+ \
+ uint8_t px_size_byte = cf == LV_IMG_CF_TRUE_COLOR_ALPHA \
+ ? LV_IMG_PX_SIZE_ALPHA_BYTE \
+ : sizeof(lv_color_t); \
+ \
+ const uint8_t * src_buf_tmp = src_buf; \
+ src_buf_tmp += src_stride \
+ * (draw_area.y1 - coords->y1) \
+ * px_size_byte; \
+ src_buf_tmp += (draw_area.x1 - coords->x1) * px_size_byte; \
+ \
+ lv_area_t blend_area2; \
+ if(!_lv_area_intersect(&blend_area2, \
+ &draw_area, \
+ draw_ctx->clip_area)) return; \
+ \
+ int32_t w = lv_area_get_width(&blend_area2); \
+ int32_t h = lv_area_get_height(&blend_area2); \
+ \
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area); \
+ \
+ lv_color_t * dest_buf = draw_ctx->buf; \
+ dest_buf += dest_stride * (blend_area2.y1 - draw_ctx->buf_area->y1) \
+ + (blend_area2.x1 - draw_ctx->buf_area->x1); \
+ \
+ arm_2d_size_t copy_size = { \
+ .iWidth = lv_area_get_width(&blend_area2), \
+ .iHeight = lv_area_get_height(&blend_area2), \
+ }
+
+#define __PREPARE_TARGET_TILE__(__blend_area) \
+ static arm_2d_tile_t target_tile; \
+ static arm_2d_region_t target_region; \
+ \
+ lv_color_t * dest_buf = draw_ctx->buf; \
+ \
+ target_tile = (arm_2d_tile_t) { \
+ .tRegion = { \
+ .tSize = { \
+ .iWidth = lv_area_get_width(draw_ctx->buf_area), \
+ .iHeight = lv_area_get_height(draw_ctx->buf_area), \
+ }, \
+ }, \
+ .tInfo.bIsRoot = true, \
+ .phwBuffer = (uint16_t *)draw_ctx->buf, \
+ }; \
+ \
+ target_region = (arm_2d_region_t) { \
+ .tLocation = { \
+ .iX = (__blend_area).x1 - draw_ctx->buf_area->x1, \
+ .iY = (__blend_area).y1 - draw_ctx->buf_area->y1, \
+ }, \
+ .tSize = { \
+ .iWidth = lv_area_get_width(&(__blend_area)), \
+ .iHeight = lv_area_get_height(&(__blend_area)), \
+ }, \
+ }
+
+#define __PREPARE_SOURCE_TILE__(__dsc, __blend_area) \
+ static arm_2d_tile_t source_tile_orig; \
+ static arm_2d_tile_t source_tile; \
+ const lv_color_t * src_buf = (__dsc)->src_buf; \
+ if (src_buf) { \
+ source_tile_orig = (arm_2d_tile_t) { \
+ .tRegion = { \
+ .tSize = { \
+ .iWidth = lv_area_get_width((__dsc)->blend_area), \
+ .iHeight = lv_area_get_height((__dsc)->blend_area), \
+ }, \
+ }, \
+ .tInfo.bIsRoot = true, \
+ .phwBuffer = (uint16_t *)src_buf, \
+ }; \
+ \
+ arm_2d_tile_generate_child( \
+ &source_tile_orig, \
+ (arm_2d_region_t []) { \
+ { \
+ .tLocation = { \
+ .iX = (__blend_area).x1 - (__dsc)->blend_area->x1, \
+ .iY = (__blend_area).y1 - (__dsc)->blend_area->y1, \
+ }, \
+ .tSize = source_tile_orig.tRegion.tSize, \
+ } \
+ }, \
+ &source_tile, \
+ false); \
+ source_tile.tInfo.bDerivedResource = true; \
+ }
+
+#define __PREPARE_MASK_TILE__(__dsc, __blend_area, __mask, __is_chn) \
+ static arm_2d_tile_t mask_tile_orig; \
+ static arm_2d_tile_t mask_tile; \
+ if(NULL != (__mask)) { \
+ mask_tile_orig = (arm_2d_tile_t) { \
+ .tRegion = { \
+ .tSize = { \
+ .iWidth = lv_area_get_width((__dsc)->mask_area), \
+ .iHeight = lv_area_get_height((__dsc)->mask_area), \
+ }, \
+ }, \
+ .tInfo = { \
+ .bIsRoot = true, \
+ .bHasEnforcedColour = true, \
+ .tColourInfo = { \
+ .chScheme = (__is_chn) ? ARM_2D_CHANNEL_8in32 \
+ : ARM_2D_COLOUR_8BIT, \
+ }, \
+ }, \
+ .pchBuffer = ((uint8_t *)(__mask)) + (__is_chn) ? 3 : 0, \
+ }; \
+ \
+ arm_2d_tile_generate_child( \
+ &mask_tile_orig, \
+ (arm_2d_region_t []) { \
+ { \
+ .tLocation = { \
+ .iX = (__dsc)->mask_area->x1 - (__blend_area).x1, \
+ .iY = (__dsc)->mask_area->y1 - (__blend_area).y1, \
+ }, \
+ .tSize = mask_tile_orig.tRegion.tSize, \
+ } \
+ }, \
+ &mask_tile, \
+ false); \
+ mask_tile.tInfo.bDerivedResource = true; \
+ }
+/* *INDENT-ON* */
+
+/* *INDENT-OFF* */
+#define __RECOLOUR_WRAPPER(...) \
+ do { \
+ lv_color_t *rgb_tmp_buf = NULL; \
+ if(draw_dsc->recolor_opa > LV_OPA_MIN) { \
+ rgb_tmp_buf \
+ = lv_mem_buf_get(src_w * src_h * sizeof(lv_color_t)); \
+ if (NULL == rgb_tmp_buf) { \
+ LV_LOG_WARN( \
+ "Failed to allocate memory for accelerating recolour, " \
+ "use normal route instead."); \
+ break; \
+ } \
+ lv_memcpy(rgb_tmp_buf, src_buf, src_w * src_h * sizeof(lv_color_t));\
+ arm_2d_size_t copy_size = { \
+ .iWidth = src_w, \
+ .iHeight = src_h, \
+ }; \
+ /* apply re-colour */ \
+ __arm_2d_impl_colour_filling_with_opacity( \
+ (color_int *)rgb_tmp_buf, \
+ src_w, \
+ ©_size, \
+ (color_int)draw_dsc->recolor.full, \
+ draw_dsc->recolor_opa); \
+ \
+ /* replace src_buf for the following operation */ \
+ src_buf = (const uint8_t *)rgb_tmp_buf; \
+ } \
+ do { \
+ __VA_ARGS__ \
+ } while(0); \
+ if (NULL != rgb_tmp_buf) { \
+ lv_mem_buf_release(rgb_tmp_buf); \
+ } \
+ } while(0); \
+ src_buf = src_buf_org;
+
+#define __RECOLOUR_BEGIN() \
+ do { \
+ lv_color_t *rgb_tmp_buf = NULL; \
+ if(draw_dsc->recolor_opa > LV_OPA_MIN) { \
+ rgb_tmp_buf \
+ = lv_mem_buf_get(src_w * src_h * sizeof(lv_color_t)); \
+ if (NULL == rgb_tmp_buf) { \
+ LV_LOG_WARN( \
+ "Failed to allocate memory for accelerating recolour, " \
+ "use normal route instead."); \
+ break; \
+ } \
+ lv_memcpy(rgb_tmp_buf, src_buf, src_w * src_h * sizeof(lv_color_t));\
+ arm_2d_size_t copy_size = { \
+ .iWidth = src_w, \
+ .iHeight = src_h, \
+ }; \
+ /* apply re-colour */ \
+ __arm_2d_impl_colour_filling_with_opacity( \
+ (color_int *)rgb_tmp_buf, \
+ src_w, \
+ ©_size, \
+ (color_int)draw_dsc->recolor.full, \
+ draw_dsc->recolor_opa); \
+ \
+ /* replace src_buf for the following operation */ \
+ src_buf = (const uint8_t *)rgb_tmp_buf; \
+ } \
+ do {
+
+#define __RECOLOUR_END() \
+ } while(0); \
+ if (NULL != rgb_tmp_buf) { \
+ lv_mem_buf_release(rgb_tmp_buf); \
+ } \
+ } while(0); \
+ src_buf = src_buf_org;
+
+#define __ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(__TRANS_PREPARE, ...) \
+ do { \
+ __TRANS_PREPARE( \
+ NULL, \
+ __VA_ARGS__); \
+ \
+ target_region = (arm_2d_region_t) { \
+ .tLocation = { \
+ .iX = coords->x1 - draw_ctx->clip_area->x1, \
+ .iY = coords->y1 - draw_ctx->clip_area->y1, \
+ }, \
+ .tSize = { \
+ .iWidth = lv_area_get_width(coords), \
+ .iHeight = lv_area_get_height(coords), \
+ }, \
+ }; \
+ \
+ arm_2d_size_t tTransSize \
+ = ARM_2D_CTRL.DefaultOP \
+ .tTransform.Source.ptTile->tRegion.tSize; \
+ \
+ if (target_region.tSize.iWidth < tTransSize.iWidth) { \
+ int16_t iDelta = tTransSize.iWidth - target_region.tSize.iWidth;\
+ target_region.tLocation.iX -= iDelta / 2; \
+ target_region.tSize.iWidth = tTransSize.iWidth; \
+ } \
+ \
+ if (target_region.tSize.iHeight < tTransSize.iHeight) { \
+ int16_t iDelta \
+ = tTransSize.iHeight - target_region.tSize.iHeight; \
+ target_region.tLocation.iY -= iDelta / 2; \
+ target_region.tSize.iHeight = tTransSize.iHeight; \
+ } \
+ } while(0)
+
+/* *INDENT-ON* */
+
/**********************
* TYPEDEFS
**********************/
@@ -79,130 +416,55 @@
**********************/
#if __ARM_2D_HAS_HW_ACC__
-LV_ATTRIBUTE_FAST_MEM
-static bool lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
- const arm_2d_region_t * region,
- lv_color_t color,
- lv_opa_t opa,
- const arm_2d_tile_t * mask_tile);
+static bool /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
+ const arm_2d_region_t * region,
+ lv_color_t color,
+ lv_opa_t opa,
+ const arm_2d_tile_t * mask_tile);
-LV_ATTRIBUTE_FAST_MEM
-static bool lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
- const arm_2d_region_t * region,
- arm_2d_tile_t * source_tile,
- lv_opa_t opa,
- arm_2d_tile_t * mask_tile);
+static bool /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
+ const arm_2d_region_t * region,
+ arm_2d_tile_t * source_tile,
+ lv_opa_t opa,
+ arm_2d_tile_t * mask_tile);
#else
-/* arm-2d direct mode APIs */
-extern
-void __arm_2d_impl_colour_filling(color_int * __RESTRICT pTarget,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize,
- color_int Colour);
+static void convert_cb(const lv_area_t * dest_area,
+ const void * src_buf,
+ lv_coord_t src_w,
+ lv_coord_t src_h,
+ lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * draw_dsc,
+ lv_img_cf_t cf,
+ lv_color_t * cbuf,
+ lv_opa_t * abuf);
-extern
-void __arm_2d_impl_colour_filling_with_opacity(
- color_int * __RESTRICT pTargetBase,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize,
- color_int Colour,
- uint_fast8_t chRatio);
+static bool /* LV_ATTRIBUTE_FAST_MEM */ arm_2d_fill_normal(lv_color_t * dest_buf,
+ const lv_area_t * dest_area,
+ lv_coord_t dest_stride,
+ lv_color_t color,
+ lv_opa_t opa,
+ const lv_opa_t * mask,
+ lv_coord_t mask_stride);
-extern
-void __arm_2d_impl_colour_filling_mask(
- color_int * __RESTRICT pTarget,
- int16_t iTargetStride,
- uint8_t * __RESTRICT pchAlpha,
- int16_t iAlphaStride,
- arm_2d_size_t * __RESTRICT ptCopySize,
- color_int Colour);
-
-extern
-void __arm_2d_impl_colour_filling_mask_opacity(
- color_int * __RESTRICT pTarget,
- int16_t iTargetStride,
- uint8_t * __RESTRICT pchAlpha,
- int16_t iAlphaStride,
- arm_2d_size_t * __RESTRICT ptCopySize,
- color_int Colour,
- uint8_t chOpacity);
-
-extern
-void __arm_2d_impl_copy(color_int * __RESTRICT pSource,
- int16_t iSourceStride,
- color_int * __RESTRICT pTarget,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize);
-
-extern
-void __arm_2d_impl_alpha_blending(color_int * __RESTRICT pSource,
- int16_t iSourceStride,
- color_int * __RESTRICT pTarget,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize,
- uint_fast8_t chRatio);
-
-extern
-void __arm_2d_impl_gray8_alpha_blending(uint8_t * __RESTRICT pSource,
- int16_t iSourceStride,
- uint8_t * __RESTRICT pTarget,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize,
- uint_fast8_t chRatio);
-
-extern
-void __arm_2d_impl_src_msk_copy(color_int * __RESTRICT pSourceBase,
- int16_t iSourceStride,
- uint8_t * __RESTRICT ptSourceMaskBase,
- int16_t iSourceMaskStride,
- arm_2d_size_t * __RESTRICT ptSourceMaskSize,
- color_int * __RESTRICT pTargetBase,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize);
-
-extern
-void __arm_2d_impl_src_chn_msk_copy(color_int * __RESTRICT pSourceBase,
- int16_t iSourceStride,
- uint32_t * __RESTRICT ptSourceMaskBase,
- int16_t iSourceMaskStride,
- arm_2d_size_t * __RESTRICT ptSourceMaskSize,
- color_int * __RESTRICT pTargetBase,
- int16_t iTargetStride,
- arm_2d_size_t * __RESTRICT ptCopySize);
-
-LV_ATTRIBUTE_FAST_MEM
-static bool arm_2d_fill_normal(lv_color_t * dest_buf,
- const lv_area_t * dest_area,
- lv_coord_t dest_stride,
- lv_color_t color,
- lv_opa_t opa,
- const lv_opa_t * mask,
- lv_coord_t mask_stride);
-
-LV_ATTRIBUTE_FAST_MEM
-static bool arm_2d_copy_normal(lv_color_t * dest_buf,
- const lv_area_t * dest_area,
- lv_coord_t dest_stride,
- const lv_color_t * src_buf,
- lv_coord_t src_stride,
- lv_opa_t opa,
- const lv_opa_t * mask,
- lv_coord_t mask_stride);
+static bool /* LV_ATTRIBUTE_FAST_MEM */ arm_2d_copy_normal(lv_color_t * dest_buf,
+ const lv_area_t * dest_area,
+ lv_coord_t dest_stride,
+ const lv_color_t * src_buf,
+ lv_coord_t src_stride,
+ lv_opa_t opa,
+ const lv_opa_t * mask,
+ lv_coord_t mask_stride);
#endif
-LV_ATTRIBUTE_FAST_MEM
-static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
-LV_ATTRIBUTE_FAST_MEM
-static void lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx);
-LV_ATTRIBUTE_FAST_MEM
-static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
- const lv_draw_img_dsc_t * draw_dsc,
- const lv_area_t * coords,
- const uint8_t * src_buf,
- lv_img_cf_t cf);
-
-
+static void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx,
+ const lv_draw_sw_blend_dsc_t * dsc);
+static void /* LV_ATTRIBUTE_FAST_MEM */ lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx);
+static void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
+ const lv_draw_img_dsc_t * draw_dsc,
+ const lv_area_t * coords,
+ const uint8_t * src_buf,
+ lv_img_cf_t cf);
/**********************
* STATIC VARIABLES
@@ -242,8 +504,8 @@ void lv_draw_arm2d_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
extern void test_flush(lv_color_t * color_p);
#if __ARM_2D_HAS_HW_ACC__
-LV_ATTRIBUTE_FAST_MEM
-static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+static void LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx,
+ const lv_draw_sw_blend_dsc_t * dsc)
{
const lv_opa_t * mask;
if(dsc->mask_buf == NULL) mask = NULL;
@@ -251,112 +513,21 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
else if(dsc->mask_res == LV_DRAW_MASK_RES_FULL_COVER) mask = NULL;
else mask = dsc->mask_buf;
-
lv_area_t blend_area;
if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area)) {
return;
}
- static arm_2d_tile_t target_tile;
- static arm_2d_tile_t source_tile_orig;
- static arm_2d_tile_t source_tile;
- static arm_2d_tile_t mask_tile_orig;
- static arm_2d_tile_t mask_tile;
- static arm_2d_region_t target_region;
-
bool is_accelerated = false;
if(dsc->blend_mode == LV_BLEND_MODE_NORMAL
&& lv_area_get_size(&blend_area) > 100) {
- lv_color_t * dest_buf = draw_ctx->buf;
+ __PREPARE_TARGET_TILE__(blend_area);
+ __PREPARE_SOURCE_TILE__(dsc, blend_area);
+ __PREPARE_MASK_TILE__(dsc, blend_area, mask, false);
-
- target_tile = (arm_2d_tile_t) {
- .tRegion = {
- .tSize = {
- .iWidth = lv_area_get_width(draw_ctx->buf_area),
- .iHeight = lv_area_get_height(draw_ctx->buf_area),
- },
- },
- .tInfo.bIsRoot = true,
- .phwBuffer = (uint16_t *)draw_ctx->buf,
- };
-
- target_region = (arm_2d_region_t) {
- .tLocation = {
- .iX = blend_area.x1 - draw_ctx->buf_area->x1,
- .iY = blend_area.y1 - draw_ctx->buf_area->y1,
- },
- .tSize = {
- .iWidth = lv_area_get_width(&blend_area),
- .iHeight = lv_area_get_height(&blend_area),
- },
- };
-
- if(NULL != mask) {
- mask_tile_orig = (arm_2d_tile_t) {
- .tRegion = {
- .tSize = {
- .iWidth = lv_area_get_width(dsc->mask_area),
- .iHeight = lv_area_get_height(dsc->mask_area),
- },
- },
- .tInfo = {
- .bIsRoot = true,
- .bHasEnforcedColour = true,
- .tColourInfo = {
- .chScheme = ARM_2D_COLOUR_8BIT,
- },
- },
- .pchBuffer = (uint8_t *)mask,
- };
-
- arm_2d_tile_generate_child(
- &mask_tile_orig,
- (arm_2d_region_t []) {
- {
- .tLocation = {
- .iX = dsc->mask_area->x1 - blend_area.x1,
- .iY = dsc->mask_area->y1 - blend_area.y1,
- },
- .tSize = mask_tile_orig.tRegion.tSize,
- }
- },
- &mask_tile,
- false);
- mask_tile.tInfo.bDerivedResource = true;
- }
-
-
- const lv_color_t * src_buf = dsc->src_buf;
if(src_buf) {
- source_tile_orig = (arm_2d_tile_t) {
- .tRegion = {
- .tSize = {
- .iWidth = lv_area_get_width(dsc->blend_area),
- .iHeight = lv_area_get_height(dsc->blend_area),
- },
- },
- .tInfo.bIsRoot = true,
- .phwBuffer = (uint16_t *)src_buf,
- };
-
- arm_2d_tile_generate_child(
- &source_tile_orig,
- (arm_2d_region_t []) {
- {
- .tLocation = {
- .iX = blend_area.x1 - dsc->blend_area->x1,
- .iY = blend_area.y1 - dsc->blend_area->y1,
- },
- .tSize = source_tile_orig.tRegion.tSize,
- }
- },
- &source_tile,
- false);
- source_tile.tInfo.bDerivedResource = true;
-
is_accelerated = lv_draw_arm2d_tile_copy(
&target_tile,
&target_region,
@@ -379,13 +550,11 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
}
}
-
-LV_ATTRIBUTE_FAST_MEM
-static bool lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
- const arm_2d_region_t * region,
- lv_color_t color,
- lv_opa_t opa,
- const arm_2d_tile_t * mask_tile)
+static bool LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
+ const arm_2d_region_t * region,
+ lv_color_t color,
+ lv_opa_t opa,
+ const arm_2d_tile_t * mask_tile)
{
arm_fsm_rt_t result = (arm_fsm_rt_t)ARM_2D_ERR_NONE;
@@ -443,12 +612,11 @@ static bool lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
}
-LV_ATTRIBUTE_FAST_MEM
-static bool lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
- const arm_2d_region_t * region,
- arm_2d_tile_t * source_tile,
- lv_opa_t opa,
- arm_2d_tile_t * mask_tile)
+static bool LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
+ const arm_2d_region_t * region,
+ arm_2d_tile_t * source_tile,
+ lv_opa_t opa,
+ arm_2d_tile_t * mask_tile)
{
arm_fsm_rt_t result = (arm_fsm_rt_t)ARM_2D_ERR_NONE;
@@ -510,9 +678,8 @@ static void lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx)
}
#else
-
-LV_ATTRIBUTE_FAST_MEM
-static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+static void LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx,
+ const lv_draw_sw_blend_dsc_t * dsc)
{
const lv_opa_t * mask;
if(dsc->mask_buf == NULL) mask = NULL;
@@ -525,18 +692,26 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
lv_area_t blend_area;
if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area)) return;
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ //lv_disp_t * disp = _lv_refr_get_disp_refreshing();
bool is_accelerated = false;
do {
- if(NULL != disp->driver->set_px_cb) {
- break;
+
+ /* target buffer */
+ lv_color_t * dest_buf = draw_ctx->buf;
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ if(disp->driver->screen_transp == 0) {
+ dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) + (blend_area.x1 - draw_ctx->buf_area->x1);
+ }
+ else {
+ /*With LV_COLOR_DEPTH 16 it means ARGB8565 (3 bytes format)*/
+ uint8_t * dest_buf8 = (uint8_t *) dest_buf;
+ dest_buf8 += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 += (blend_area.x1 - draw_ctx->buf_area->x1) * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf = (lv_color_t *)dest_buf8;
}
- lv_color_t * dest_buf = draw_ctx->buf;
- dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1)
- + (blend_area.x1 - draw_ctx->buf_area->x1);
-
+ /* source buffer */
const lv_color_t * src_buf = dsc->src_buf;
lv_coord_t src_stride;
if(src_buf) {
@@ -550,7 +725,7 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
lv_coord_t mask_stride;
if(mask) {
mask_stride = lv_area_get_width(dsc->mask_area);
- mask += mask_stride * (dsc->mask_area->y1 - blend_area.y1) + (dsc->mask_area->x1 - blend_area.x1);
+ mask += mask_stride * (blend_area.y1 - dsc->mask_area->y1) + (blend_area.x1 - dsc->mask_area->x1);
}
else {
mask_stride = 0;
@@ -558,7 +733,9 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
-
+ if(disp->driver->screen_transp) {
+ break;
+ }
if(dsc->src_buf == NULL) {
if(dsc->blend_mode == LV_BLEND_MODE_NORMAL) {
is_accelerated = arm_2d_fill_normal(dest_buf,
@@ -569,14 +746,8 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
mask,
mask_stride);
}
-#if LV_DRAW_COMPLEX
- else {
- break;
- }
-#endif
}
else {
-
if(dsc->blend_mode == LV_BLEND_MODE_NORMAL) {
is_accelerated = arm_2d_copy_normal(dest_buf,
&blend_area,
@@ -587,25 +758,19 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
mask,
mask_stride);
}
-#if LV_DRAW_COMPLEX
- else {
- break;
- }
-#endif
}
} while(0);
if(!is_accelerated) lv_draw_sw_blend_basic(draw_ctx, dsc);
}
-LV_ATTRIBUTE_FAST_MEM
-static bool arm_2d_fill_normal(lv_color_t * dest_buf,
- const lv_area_t * dest_area,
- lv_coord_t dest_stride,
- lv_color_t color,
- lv_opa_t opa,
- const lv_opa_t * mask,
- lv_coord_t mask_stride)
+static bool LV_ATTRIBUTE_FAST_MEM arm_2d_fill_normal(lv_color_t * dest_buf,
+ const lv_area_t * dest_area,
+ lv_coord_t dest_stride,
+ lv_color_t color,
+ lv_opa_t opa,
+ const lv_opa_t * mask,
+ lv_coord_t mask_stride)
{
arm_2d_size_t target_size = {
.iWidth = lv_area_get_width(dest_area),
@@ -622,15 +787,11 @@ static bool arm_2d_fill_normal(lv_color_t * dest_buf,
}
/*Has opacity*/
else {
-#if LV_COLOR_SCREEN_TRANSP
- return false;
-#else
__arm_2d_impl_colour_filling_with_opacity((color_int *)dest_buf,
dest_stride,
&target_size,
color.full,
opa);
-#endif
}
}
/*Masked*/
@@ -646,9 +807,6 @@ static bool arm_2d_fill_normal(lv_color_t * dest_buf,
}
/*With opacity*/
else {
-#if LV_COLOR_SCREEN_TRANSP
- return false;
-#else
__arm_2d_impl_colour_filling_mask_opacity((color_int *)dest_buf,
dest_stride,
(uint8_t *)mask,
@@ -656,23 +814,20 @@ static bool arm_2d_fill_normal(lv_color_t * dest_buf,
&target_size,
color.full,
opa);
-#endif
}
}
return true;
}
-
-LV_ATTRIBUTE_FAST_MEM
-static bool arm_2d_copy_normal(lv_color_t * dest_buf,
- const lv_area_t * dest_area,
- lv_coord_t dest_stride,
- const lv_color_t * src_buf,
- lv_coord_t src_stride,
- lv_opa_t opa,
- const lv_opa_t * mask,
- lv_coord_t mask_stride)
+static bool LV_ATTRIBUTE_FAST_MEM arm_2d_copy_normal(lv_color_t * dest_buf,
+ const lv_area_t * dest_area,
+ lv_coord_t dest_stride,
+ const lv_color_t * src_buf,
+ lv_coord_t src_stride,
+ lv_opa_t opa,
+ const lv_opa_t * mask,
+ lv_coord_t mask_stride)
{
int32_t w = lv_area_get_width(dest_area);
@@ -683,10 +838,6 @@ static bool arm_2d_copy_normal(lv_color_t * dest_buf,
.iHeight = lv_area_get_height(dest_area),
};
-#if LV_COLOR_SCREEN_TRANSP
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
-#endif
-
/*Simple fill (maybe with opacity), no masking*/
if(mask == NULL) {
if(opa >= LV_OPA_MAX) {
@@ -697,25 +848,18 @@ static bool arm_2d_copy_normal(lv_color_t * dest_buf,
©_size);
}
else {
-#if LV_COLOR_SCREEN_TRANSP
- return false;
-#else
__arm_2d_impl_alpha_blending((color_int *)src_buf,
src_stride,
(color_int *)dest_buf,
dest_stride,
©_size,
opa);
-#endif
}
}
/*Masked*/
else {
/*Only the mask matters*/
if(opa > LV_OPA_MAX) {
-#if LV_COLOR_SCREEN_TRANSP
- return false;
-#else
__arm_2d_impl_src_msk_copy((color_int *)src_buf,
src_stride,
(uint8_t *)mask,
@@ -724,19 +868,14 @@ static bool arm_2d_copy_normal(lv_color_t * dest_buf,
(color_int *)dest_buf,
dest_stride,
©_size);
-#endif
}
/*Handle opa and mask values too*/
else {
-#if LV_COLOR_SCREEN_TRANSP
- return false;
-#else
- __arm_2d_impl_gray8_alpha_blending((uint8_t *)mask,
- mask_stride,
- (uint8_t *)mask,
- mask_stride,
- ©_size,
- opa);
+ __arm_2d_impl_gray8_colour_filling_with_opacity((uint8_t *)mask,
+ mask_stride,
+ ©_size,
+ 0x00,
+ 255 - opa);
__arm_2d_impl_src_msk_copy((color_int *)src_buf,
src_stride,
@@ -746,307 +885,667 @@ static bool arm_2d_copy_normal(lv_color_t * dest_buf,
(color_int *)dest_buf,
dest_stride,
©_size);
-#endif
}
}
return true;
}
-
-
-LV_ATTRIBUTE_FAST_MEM
-static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
- const lv_draw_img_dsc_t * draw_dsc,
- const lv_area_t * coords,
- const uint8_t * src_buf,
- lv_img_cf_t cf)
+static void LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
+ const lv_draw_img_dsc_t * draw_dsc,
+ const lv_area_t * coords,
+ const uint8_t * src_buf,
+ lv_img_cf_t cf)
{
- bool mask_any = lv_draw_mask_is_any(draw_ctx->clip_area);
+ /*Use the clip area as draw area*/
+ lv_area_t draw_area;
+ lv_area_copy(&draw_area, draw_ctx->clip_area);
+ const uint8_t * src_buf_org = src_buf;
+
+ bool mask_any = lv_draw_mask_is_any(&draw_area);
+ bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false;
+
+ lv_area_t blend_area;
+ lv_draw_sw_blend_dsc_t blend_dsc;
+
+ lv_memset_00(&blend_dsc, sizeof(lv_draw_sw_blend_dsc_t));
+ blend_dsc.opa = draw_dsc->opa;
+ blend_dsc.blend_mode = draw_dsc->blend_mode;
+ blend_dsc.blend_area = &blend_area;
+
+ if(lv_img_cf_is_chroma_keyed(cf)) cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED;
+ else if(cf == LV_IMG_CF_ALPHA_8BIT) {}
+ else if(cf == LV_IMG_CF_RGB565A8) {}
+ else if(lv_img_cf_has_alpha(cf)) cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
+ else cf = LV_IMG_CF_TRUE_COLOR;
/*The simplest case just copy the pixels into the draw_buf*/
- if(!mask_any && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE &&
- cf == LV_IMG_CF_TRUE_COLOR && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
+ if(!mask_any && !transform && cf == LV_IMG_CF_TRUE_COLOR && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
+ blend_dsc.src_buf = (const lv_color_t *)src_buf;
- lv_draw_sw_img_decoded(draw_ctx, draw_dsc, coords, src_buf, cf);
- return ;
+ blend_dsc.blend_area = coords;
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
}
+ else if(!mask_any && !transform && cf == LV_IMG_CF_ALPHA_8BIT) {
+ lv_area_t clipped_coords;
+ if(!_lv_area_intersect(&clipped_coords, coords, draw_ctx->clip_area)) return;
+
+ blend_dsc.mask_buf = (lv_opa_t *)src_buf;
+ blend_dsc.mask_area = coords;
+ blend_dsc.src_buf = NULL;
+ blend_dsc.color = draw_dsc->recolor;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+
+ blend_dsc.blend_area = coords;
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
+ }
+#if LV_COLOR_DEPTH == 16
+ else if(!mask_any && !transform && cf == LV_IMG_CF_RGB565A8 && draw_dsc->recolor_opa == LV_OPA_TRANSP &&
+ blend_dsc.opa >= LV_OPA_MAX) {
+ lv_coord_t src_w = lv_area_get_width(coords);
+ lv_coord_t src_h = lv_area_get_height(coords);
+ blend_dsc.src_buf = (const lv_color_t *)src_buf;
+ blend_dsc.mask_buf = (lv_opa_t *)src_buf;
+ blend_dsc.mask_buf += sizeof(lv_color_t) * src_w * src_h;
+ blend_dsc.blend_area = coords;
+ blend_dsc.mask_area = coords;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
+ }
+#endif
/*In the other cases every pixel need to be checked one-by-one*/
else {
- /*Use the clip area as draw area*/
- lv_area_t draw_area;
- lv_area_copy(&draw_area, draw_ctx->clip_area);
+ blend_area.x1 = draw_ctx->clip_area->x1;
+ blend_area.x2 = draw_ctx->clip_area->x2;
+ blend_area.y1 = draw_ctx->clip_area->y1;
+ blend_area.y2 = draw_ctx->clip_area->y2;
- lv_draw_sw_blend_dsc_t blend_dsc;
- lv_memset_00(&blend_dsc, sizeof(blend_dsc));
- blend_dsc.opa = draw_dsc->opa;
- blend_dsc.blend_mode = draw_dsc->blend_mode;
+ lv_coord_t src_w = lv_area_get_width(coords);
+ lv_coord_t src_h = lv_area_get_height(coords);
+ lv_coord_t blend_h = lv_area_get_height(&blend_area);
+ lv_coord_t blend_w = lv_area_get_width(&blend_area);
+ uint32_t max_buf_size = MAX_BUF_SIZE;
+ uint32_t blend_size = lv_area_get_size(&blend_area);
+ uint32_t buf_h;
+ uint32_t buf_w = blend_w;
+ if(blend_size <= max_buf_size) {
+ buf_h = blend_h;
+ }
+ else {
+ /*Round to full lines*/
+ buf_h = max_buf_size / blend_w;
+ }
- //#if LV_DRAW_COMPLEX
- /*The pixel size in byte is different if an alpha byte is added too*/
- uint8_t px_size_byte = cf == LV_IMG_CF_TRUE_COLOR_ALPHA ? LV_IMG_PX_SIZE_ALPHA_BYTE : sizeof(lv_color_t);
+ /*Create buffers and masks*/
+ uint32_t buf_size = buf_w * buf_h;
- /*Go to the first displayed pixel of the map*/
- int32_t src_stride = lv_area_get_width(coords);
+ lv_color_t * rgb_buf = lv_mem_buf_get(buf_size * sizeof(lv_color_t));
+ lv_opa_t * mask_buf = lv_mem_buf_get(buf_size);
+ blend_dsc.mask_buf = mask_buf;
+ blend_dsc.mask_area = &blend_area;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ blend_dsc.src_buf = rgb_buf;
+ lv_coord_t y_last = blend_area.y2;
+ blend_area.y2 = blend_area.y1 + buf_h - 1;
- lv_color_t c;
- lv_color_t chroma_keyed_color = LV_COLOR_CHROMA_KEY;
- uint32_t px_i = 0;
+ lv_draw_mask_res_t mask_res_def = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
+ draw_dsc->zoom != LV_IMG_ZOOM_NONE) ?
+ LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
+ blend_dsc.mask_res = mask_res_def;
- const uint8_t * map_px;
+ if(cf == LV_IMG_CF_ALPHA_8BIT) {
+ /* original code:
+ lv_color_fill(rgb_buf, draw_dsc->recolor, buf_size);
+ */
+ arm_2d_size_t copy_size = {
+ .iWidth = buf_w,
+ .iHeight = buf_h,
+ };
- lv_coord_t draw_area_h = lv_area_get_height(&draw_area);
- lv_coord_t draw_area_w = lv_area_get_width(&draw_area);
+ /* apply re-colour */
+ __arm_2d_impl_colour_filling(
+ (color_int *)rgb_buf,
+ buf_w,
+ ©_size,
+ (color_int)draw_dsc->recolor.full);
+ }
- lv_area_t blend_area;
- blend_area.x1 = draw_area.x1;
- blend_area.x2 = draw_area.x2;
- blend_area.y1 = draw_area.y1;
- blend_area.y2 = blend_area.y1;
- blend_dsc.blend_area = &blend_area;
+ bool is_accelerated = false;
- bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false;
- /*Simple ARGB image. Handle it as special case because it's very common*/
- if(!mask_any && !transform && cf == LV_IMG_CF_TRUE_COLOR_ALPHA && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
+ if(!transform) {
+ if(LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED == cf) {
+ /* copy with colour keying */
- const uint8_t * src_buf_tmp = src_buf;
- src_buf_tmp += src_stride * (draw_area.y1 - coords->y1) * px_size_byte;
- src_buf_tmp += (draw_area.x1 - coords->x1) * px_size_byte;
+ /* *INDENT-OFF* */
+ __RECOLOUR_WRAPPER(
-#if LV_COLOR_DEPTH == 32
- if(blend_dsc.opa >= LV_OPA_MAX) {
- lv_area_t blend_area2;
- if(!_lv_area_intersect(&blend_area2, &draw_area, draw_ctx->clip_area)) return;
+ lv_color_t chrome_key = LV_COLOR_CHROMA_KEY;
+ /* calculate new chrome-key colour */
+ if(draw_dsc->recolor_opa > LV_OPA_MIN) {
+ __ARM_2D_PIXEL_BLENDING_OPA(
+ (color_int *) & (draw_dsc->recolor.full),
+ (color_int *) & (chrome_key.full),
+ draw_dsc->recolor_opa
+ );
+ }
- int32_t w = lv_area_get_width(&blend_area2);
- int32_t h = lv_area_get_height(&blend_area2);
+ __PREPARE_LL_ACCELERATION__();
- lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+ if(blend_dsc.opa >= LV_OPA_MAX) {
+ __arm_2d_impl_cl_key_copy(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size,
+ (color_int)chrome_key.full);
+ }
+ else {
+ __arm_2d_impl_alpha_blending_colour_keying(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size,
+ blend_dsc.opa,
+ (color_int)chrome_key.full);
+ }
+ is_accelerated = true;
+ )
+ /* *INDENT-ON* */
+ }
+ else if((LV_COLOR_DEPTH == 32)
+ && !mask_any
+ && (LV_IMG_CF_TRUE_COLOR_ALPHA == cf)) {
+ /* accelerate copy-with-source-masks-and-opacity */
+
+ /* *INDENT-OFF* */
+ __RECOLOUR_WRAPPER(
+ __PREPARE_LL_ACCELERATION__();
+
+ uint8_t * mask_temp_buf = NULL;
+ if(blend_dsc.opa < LV_OPA_MAX) {
+ mask_temp_buf = lv_mem_buf_get(copy_size.iHeight * copy_size.iWidth);
+ if(NULL == mask_temp_buf) {
+ LV_LOG_WARN(
+ "Failed to allocate memory for alpha mask,"
+ " use normal route instead.");
+ break;
+ }
+ lv_memset_00(mask_temp_buf, copy_size.iHeight * copy_size.iWidth);
+
+ __arm_2d_impl_gray8_colour_filling_channel_mask_opacity(
+ mask_temp_buf,
+ src_stride,
+ (uint32_t *)
+ ((uintptr_t)src_buf_tmp + LV_IMG_PX_SIZE_ALPHA_BYTE - 1),
+ src_stride,
+ ©_size,
+ 0xFF,
+ blend_dsc.opa);
+
+ __arm_2d_impl_src_msk_copy(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ mask_temp_buf,
+ src_stride,
+ ©_size,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size);
+
+ lv_mem_buf_release(mask_temp_buf);
+ }
+ else {
+ __arm_2d_impl_src_chn_msk_copy(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ (uint32_t *)
+ ((uintptr_t)src_buf_tmp + LV_IMG_PX_SIZE_ALPHA_BYTE - 1),
+ src_stride,
+ ©_size,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size);
+ }
+
+ is_accelerated = true;
+ )
+ /* *INDENT-ON* */
+ }
+ else if(!mask_any
+ && (LV_IMG_CF_RGB565A8 == cf)) {
+ /* accelerate copy-with-source-masks-and-opacity */
+
+ uint8_t * mask_after_rgb = src_buf + sizeof(lv_color_t) * src_w * src_h;
+ /* *INDENT-OFF* */
+ __RECOLOUR_WRAPPER(
+ __PREPARE_LL_ACCELERATION__();
+
+ uint8_t * mask_temp_buf = NULL;
+ if(blend_dsc.opa < LV_OPA_MAX) {
+ mask_temp_buf = lv_mem_buf_get(copy_size.iHeight * copy_size.iWidth);
+ if(NULL == mask_temp_buf) {
+ LV_LOG_WARN(
+ "Failed to allocate memory for alpha mask,"
+ " use normal route instead.");
+ break;
+ }
+ lv_memset_00(mask_temp_buf, copy_size.iHeight * copy_size.iWidth);
+
+ __arm_2d_impl_gray8_colour_filling_mask_opacity(
+ mask_temp_buf,
+ src_stride,
+ mask_after_rgb,
+ src_stride,
+ ©_size,
+ 0xFF,
+ blend_dsc.opa);
+
+ __arm_2d_impl_src_msk_copy(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ mask_temp_buf,
+ src_stride,
+ ©_size,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size);
+
+ lv_mem_buf_release(mask_temp_buf);
+ }
+ else {
+ __arm_2d_impl_src_msk_copy(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ mask_after_rgb,
+ src_stride,
+ ©_size,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size);
+ }
+
+ is_accelerated = true;
+ )
+ /* *INDENT-ON* */
+ }
+ else if(!mask_any && (cf == LV_IMG_CF_TRUE_COLOR)) {
+ /* accelerate copy-with-source-masks-and-opacity */
+
+ /* *INDENT-OFF* */
+ __RECOLOUR_WRAPPER(
+ __PREPARE_LL_ACCELERATION__();
+
+ if(blend_dsc.opa >= LV_OPA_MAX) {
+ __arm_2d_impl_copy(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size);
+ }
+ else {
+ __arm_2d_impl_alpha_blending(
+ (color_int *)src_buf_tmp,
+ src_stride,
+ (color_int *)dest_buf,
+ dest_stride,
+ ©_size,
+ blend_dsc.opa);
+ }
+ is_accelerated = true;
+ )
+ /* *INDENT-ON* */
+ }
+ }
+ else if(!mask_any
+#if defined(__ARM_2D_HAS_ANTI_ALIAS_TRANSFORM__) && __ARM_2D_HAS_ANTI_ALIAS_TRANSFORM__
+ && (draw_dsc->antialias == 1)
+#else
+ && (draw_dsc->antialias == 0)
+#endif
+ && (draw_dsc->recolor_opa == LV_OPA_TRANSP)
+ && (((LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED == cf)
+ || (LV_IMG_CF_TRUE_COLOR == cf))
+ || (LV_IMG_CF_RGB565A8 == cf)
+#if defined(__ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__) && __ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__
+ || ((LV_IMG_CF_TRUE_COLOR_ALPHA == cf)
+ && (LV_COLOR_DEPTH == 32))
+#endif
+ )
+ ) {
+
+ uint8_t * mask_after_rgb = src_buf + sizeof(lv_color_t) * src_w * src_h;
+ /* *INDENT-OFF* */
+ __RECOLOUR_WRAPPER(
+ /* accelerate transform without re-color */
+
+ static arm_2d_tile_t target_tile_origin;
+ static arm_2d_tile_t target_tile;
+ arm_2d_region_t clip_region;
+ static arm_2d_region_t target_region;
lv_color_t * dest_buf = draw_ctx->buf;
- dest_buf += dest_stride * (blend_area2.y1 - draw_ctx->buf_area->y1)
- + (blend_area2.x1 - draw_ctx->buf_area->x1);
- arm_2d_size_t copy_size = {
- .iWidth = lv_area_get_width(&blend_area2),
- .iHeight = lv_area_get_height(&blend_area2),
+ target_tile_origin = (arm_2d_tile_t) {
+ .tRegion = {
+ .tSize = {
+ .iWidth = lv_area_get_width(draw_ctx->buf_area),
+ .iHeight = lv_area_get_height(draw_ctx->buf_area),
+ },
+ },
+ .tInfo.bIsRoot = true,
+ .phwBuffer = (uint16_t *)draw_ctx->buf,
};
- //lv_area_move(&blend_area2, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ clip_region = (arm_2d_region_t) {
+ .tLocation = {
+ .iX = draw_ctx->clip_area->x1 - draw_ctx->buf_area->x1,
+ .iY = draw_ctx->clip_area->y1 - draw_ctx->buf_area->y1,
+ },
+ .tSize = {
+ .iWidth = lv_area_get_width(draw_ctx->clip_area),
+ .iHeight = lv_area_get_height(draw_ctx->clip_area),
+ },
+ };
- __arm_2d_impl_src_chn_msk_copy(
- (color_int *)src_buf_tmp,
- src_stride,
- (uint32_t *)((uintptr_t)src_buf_tmp + LV_IMG_PX_SIZE_ALPHA_BYTE - 1),
- src_stride,
- ©_size,
- (color_int *)dest_buf,
- dest_stride,
- ©_size);
- }
- else
-#endif
- {
- lv_draw_sw_img_decoded(draw_ctx, draw_dsc, coords, src_buf, cf);
- return ;
- }
+ arm_2d_tile_generate_child(&target_tile_origin,
+ &clip_region,
+ &target_tile,
+ false);
+ static arm_2d_tile_t source_tile;
+
+ source_tile = (arm_2d_tile_t) {
+ .tRegion = {
+ .tSize = {
+ .iWidth = src_w,
+ .iHeight = src_h,
+ },
+ },
+ .tInfo.bIsRoot = true,
+ .pchBuffer = (uint8_t *)src_buf,
+ };
+
+ static arm_2d_location_t source_center, target_center;
+ source_center.iX = draw_dsc->pivot.x;
+ source_center.iY = draw_dsc->pivot.y;
+
+ if(LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED == cf) {
+
+ __ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(
+ arm_2d_tile_transform_with_opacity_prepare,
+ &source_tile,
+ source_center,
+ ARM_2D_ANGLE((draw_dsc->angle / 10.0f)),
+ draw_dsc->zoom / 256.0f,
+ (color_int)LV_COLOR_CHROMA_KEY.full,
+ blend_dsc.opa);
+
+ arm_2d_tile_transform(
+ &target_tile,
+ &target_region,
+ NULL
+ );
+ is_accelerated = true;
+ }
+ #if ARM_2D_VERISON >= 10103
+ else if (LV_IMG_CF_TRUE_COLOR == cf) {
+ __ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(
+ arm_2d_tile_transform_only_with_opacity_prepare,
+ &source_tile,
+ source_center,
+ ARM_2D_ANGLE((draw_dsc->angle / 10.0f)),
+ draw_dsc->zoom / 256.0f,
+ blend_dsc.opa);
+
+ arm_2d_tile_transform(
+ &target_tile,
+ &target_region,
+ NULL
+ );
+ is_accelerated = true;
+ }
+ #endif
+ else if (LV_IMG_CF_RGB565A8 == cf) {
+ static arm_2d_tile_t mask_tile;
+ mask_tile = source_tile;
+
+ mask_tile.tInfo.bHasEnforcedColour = true;
+ mask_tile.tInfo.tColourInfo.chScheme = ARM_2D_COLOUR_GRAY8;
+ mask_tile.pchBuffer = mask_after_rgb;
+
+ __ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(
+ arm_2d_tile_transform_with_src_mask_and_opacity_prepare,
+ &source_tile,
+ &mask_tile,
+ source_center,
+ ARM_2D_ANGLE((draw_dsc->angle / 10.0f)),
+ draw_dsc->zoom / 256.0f,
+ blend_dsc.opa
+ );
+
+ arm_2d_tile_transform(
+ &target_tile,
+ &target_region,
+ NULL
+ );
+
+ is_accelerated = true;
+ }
+ #if defined(__ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__) \
+ && __ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__
+ else if((LV_IMG_CF_TRUE_COLOR_ALPHA == cf) &&
+ (LV_COLOR_DEPTH == 32)) {
+ static arm_2d_tile_t mask_tile;
+ mask_tile = source_tile;
+
+ mask_tile.tInfo.bHasEnforcedColour = true;
+ mask_tile.tInfo.tColourInfo.chScheme = ARM_2D_CHANNEL_8in32;
+ mask_tile.pchBuffer += 3;
+
+ __ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(
+ arm_2d_tile_transform_with_src_mask_and_opacity_prepare,
+ &source_tile,
+ &mask_tile,
+ source_center,
+ ARM_2D_ANGLE((draw_dsc->angle / 10.0f)),
+ draw_dsc->zoom / 256.0f,
+ blend_dsc.opa
+ );
+
+ arm_2d_tile_transform(
+ &target_tile,
+ &target_region,
+ NULL
+ );
+
+ is_accelerated = true;
+ }
+ #endif
+ )
+ /* *INDENT-ON* */
}
- /*Most complicated case: transform or other mask or chroma keyed*/
- else {
- /*Build the image and a mask line-by-line*/
- uint32_t hor_res = (uint32_t) lv_disp_get_hor_res(_lv_refr_get_disp_refreshing());
- uint32_t mask_buf_size = lv_area_get_size(&draw_area) > hor_res ? hor_res : lv_area_get_size(&draw_area);
- lv_color_t * src_buf_rgb = lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
- lv_opa_t * mask_buf = lv_mem_buf_get(mask_buf_size);
- blend_dsc.mask_buf = mask_buf;
- blend_dsc.mask_area = &blend_area;
- blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
- blend_dsc.src_buf = src_buf_rgb;
- const uint8_t * src_buf_tmp = NULL;
-#if LV_DRAW_COMPLEX
- lv_img_transform_dsc_t trans_dsc;
- lv_memset_00(&trans_dsc, sizeof(lv_img_transform_dsc_t));
+ /* *INDENT-OFF* */
+ if(!is_accelerated) while(blend_area.y1 <= y_last) {
+ /*Apply transformations if any or separate the channels*/
+ lv_area_t transform_area;
+ lv_area_copy(&transform_area, &blend_area);
+ lv_area_move(&transform_area, -coords->x1, -coords->y1);
if(transform) {
- trans_dsc.cfg.angle = draw_dsc->angle;
- trans_dsc.cfg.zoom = draw_dsc->zoom;
- trans_dsc.cfg.src = src_buf;
- trans_dsc.cfg.src_w = src_stride;
- trans_dsc.cfg.src_h = lv_area_get_height(coords);
- trans_dsc.cfg.cf = cf;
- trans_dsc.cfg.pivot_x = draw_dsc->pivot.x;
- trans_dsc.cfg.pivot_y = draw_dsc->pivot.y;
- trans_dsc.cfg.color = draw_dsc->recolor;
- trans_dsc.cfg.antialias = draw_dsc->antialias;
-
- _lv_img_buf_transform_init(&trans_dsc);
+ lv_draw_transform(draw_ctx, &transform_area, src_buf, src_w, src_h, src_w,
+ draw_dsc, cf, rgb_buf, mask_buf);
}
- else
-#endif
- {
- src_buf_tmp = src_buf;
- src_buf_tmp += src_stride * (draw_area.y1 - coords->y1) * px_size_byte;
- src_buf_tmp += (draw_area.x1 - coords->x1) * px_size_byte;
+ else {
+ convert_cb(&transform_area, src_buf, src_w, src_h, src_w, draw_dsc, cf, rgb_buf, mask_buf);
}
- uint16_t recolor_premult[3] = {0};
- lv_opa_t recolor_opa_inv = 255 - draw_dsc->recolor_opa;
- if(draw_dsc->recolor_opa != 0) {
- lv_color_premult(draw_dsc->recolor, draw_dsc->recolor_opa, recolor_premult);
+ /*Apply recolor*/
+ if(draw_dsc->recolor_opa > LV_OPA_MIN) {
+ arm_2d_size_t copy_size = {
+ .iWidth = buf_w,
+ .iHeight = buf_h,
+ };
+
+ /* apply re-colour */
+ __arm_2d_impl_colour_filling_with_opacity(
+ (color_int *)rgb_buf,
+ buf_w,
+ ©_size,
+ (color_int)draw_dsc->recolor.full,
+ draw_dsc->recolor_opa);
}
-
- blend_dsc.mask_res = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
- draw_dsc->zoom != LV_IMG_ZOOM_NONE) ? LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
-
- /*Prepare the `mask_buf`if there are other masks*/
+#if LV_USE_DRAW_MASKS
+ /*Apply the masks if any*/
if(mask_any) {
- lv_memset_ff(mask_buf, mask_buf_size);
- }
+ lv_coord_t y;
+ lv_opa_t * mask_buf_tmp = mask_buf;
+ for(y = blend_area.y1; y <= blend_area.y2; y++) {
+ lv_draw_mask_res_t mask_res_line;
+ mask_res_line = lv_draw_mask_apply(mask_buf_tmp, blend_area.x1, y, blend_w);
- int32_t x;
- int32_t y;
-#if LV_DRAW_COMPLEX
- int32_t rot_y = blend_area.y1 - coords->y1;
-#endif
- for(y = 0; y < draw_area_h; y++) {
- map_px = src_buf_tmp;
-#if LV_DRAW_COMPLEX
- uint32_t px_i_start = px_i;
- int32_t rot_x = blend_area.x1 - coords->x1;
-#endif
-
- for(x = 0; x < draw_area_w; x++, px_i++, map_px += px_size_byte) {
-
-#if LV_DRAW_COMPLEX
- if(transform) {
-
- /*Transform*/
- bool ret;
- ret = _lv_img_buf_transform(&trans_dsc, rot_x + x, rot_y + y);
- if(ret == false) {
- mask_buf[px_i] = LV_OPA_TRANSP;
- continue;
- }
- else {
- mask_buf[px_i] = trans_dsc.res.opa;
- c.full = trans_dsc.res.color.full;
- }
- }
- /*No transform*/
- else
-#endif
- {
- if(cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
- lv_opa_t px_opa = map_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
- mask_buf[px_i] = px_opa;
- if(px_opa == 0) {
-#if LV_COLOR_DEPTH == 32
- src_buf_rgb[px_i].full = 0;
-#endif
- continue;
- }
- }
- else {
- mask_buf[px_i] = 0xFF;
- }
-
-#if LV_COLOR_DEPTH == 1
- c.full = map_px[0];
-#elif LV_COLOR_DEPTH == 8
- c.full = map_px[0];
-#elif LV_COLOR_DEPTH == 16
- c.full = map_px[0] + (map_px[1] << 8);
-#elif LV_COLOR_DEPTH == 32
- c.full = *((uint32_t *)map_px);
- c.ch.alpha = 0xFF;
-#endif
- if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
- if(c.full == chroma_keyed_color.full) {
- mask_buf[px_i] = LV_OPA_TRANSP;
-#if LV_COLOR_DEPTH == 32
- src_buf_rgb[px_i].full = 0;
-#endif
- continue;
- }
- }
-
- }
- if(draw_dsc->recolor_opa != 0) {
- c = lv_color_mix_premult(recolor_premult, c, recolor_opa_inv);
- }
-
- src_buf_rgb[px_i].full = c.full;
- }
-#if LV_DRAW_COMPLEX
- /*Apply the masks if any*/
- if(mask_any) {
- lv_draw_mask_res_t mask_res_sub;
- mask_res_sub = lv_draw_mask_apply(mask_buf + px_i_start, blend_area.x1,
- y + draw_area.y1, draw_area_w);
- if(mask_res_sub == LV_DRAW_MASK_RES_TRANSP) {
- lv_memset_00(mask_buf + px_i_start, draw_area_w);
+ if(mask_res_line == LV_DRAW_MASK_RES_TRANSP) {
+ lv_memset_00(mask_buf_tmp, blend_w);
blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
}
- else if(mask_res_sub == LV_DRAW_MASK_RES_CHANGED) {
+ else if(mask_res_line == LV_DRAW_MASK_RES_CHANGED) {
blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
}
+ mask_buf_tmp += blend_w;
}
+ }
#endif
- src_buf_tmp += src_stride * px_size_byte;
- if(px_i + draw_area_w < mask_buf_size) {
- blend_area.y2 ++;
- }
- else {
- lv_draw_sw_blend(draw_ctx, &blend_dsc);
+ /*Blend*/
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
- blend_area.y1 = blend_area.y2 + 1;
- blend_area.y2 = blend_area.y1;
-
- px_i = 0;
- blend_dsc.mask_res = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
- draw_dsc->zoom != LV_IMG_ZOOM_NONE) ? LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
-
- /*Prepare the `mask_buf`if there are other masks*/
- if(mask_any) {
- lv_memset_ff(mask_buf, mask_buf_size);
- }
- }
- }
-
- /*Flush the last part*/
- if(blend_area.y1 != blend_area.y2) {
- blend_area.y2--;
- lv_draw_sw_blend(draw_ctx, &blend_dsc);
- }
-
- lv_mem_buf_release(mask_buf);
- lv_mem_buf_release(src_buf_rgb);
+ /*Go the the next lines*/
+ blend_area.y1 = blend_area.y2 + 1;
+ blend_area.y2 = blend_area.y1 + buf_h - 1;
+ if(blend_area.y2 > y_last) blend_area.y2 = y_last;
}
+
+ lv_mem_buf_release(mask_buf);
+ lv_mem_buf_release(rgb_buf);
}
}
-
-
static void lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx)
{
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ arm_2d_op_wait_async(NULL);
if(disp->driver && disp->driver->wait_cb) {
disp->driver->wait_cb(disp->driver);
}
lv_draw_sw_wait_for_finish(draw_ctx);
}
-
#endif
-
/**********************
* STATIC FUNCTIONS
**********************/
+/* Separate the image channels to RGB and Alpha to match LV_COLOR_DEPTH settings*/
+static void convert_cb(const lv_area_t * dest_area, const void * src_buf, lv_coord_t src_w, lv_coord_t src_h,
+ lv_coord_t src_stride, const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf)
+{
+ LV_UNUSED(draw_dsc);
+ LV_UNUSED(src_h);
+ LV_UNUSED(src_w);
+
+ const uint8_t * src_tmp8 = (const uint8_t *)src_buf;
+ lv_coord_t y;
+ lv_coord_t x;
+
+ if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
+ uint32_t px_cnt = lv_area_get_size(dest_area);
+ lv_memset(abuf, 0xff, px_cnt);
+
+ src_tmp8 += (src_stride * dest_area->y1 * sizeof(lv_color_t)) + dest_area->x1 * sizeof(lv_color_t);
+ uint32_t dest_w = lv_area_get_width(dest_area);
+ uint32_t dest_w_byte = dest_w * sizeof(lv_color_t);
+
+ lv_coord_t src_stride_byte = src_stride * sizeof(lv_color_t);
+ lv_color_t * cbuf_tmp = cbuf;
+ for(y = dest_area->y1; y <= dest_area->y2; y++) {
+ lv_memcpy(cbuf_tmp, src_tmp8, dest_w_byte);
+ src_tmp8 += src_stride_byte;
+ cbuf_tmp += dest_w;
+ }
+
+ /*Make "holes" for with Chroma keying*/
+ if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
+ uint32_t i;
+ lv_color_t chk = LV_COLOR_CHROMA_KEY;
+#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
+ uint8_t * cbuf_uint = (uint8_t *)cbuf;
+ uint8_t chk_v = chk.full;
+#elif LV_COLOR_DEPTH == 16
+ uint16_t * cbuf_uint = (uint16_t *)cbuf;
+ uint16_t chk_v = chk.full;
+#elif LV_COLOR_DEPTH == 32
+ uint32_t * cbuf_uint = (uint32_t *)cbuf;
+ uint32_t chk_v = chk.full;
+#endif
+ for(i = 0; i < px_cnt; i++) {
+ if(chk_v == cbuf_uint[i]) abuf[i] = 0x00;
+ }
+ }
+ }
+ else if(cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
+ src_tmp8 += (src_stride * dest_area->y1 * LV_IMG_PX_SIZE_ALPHA_BYTE) + dest_area->x1 * LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ lv_coord_t src_new_line_step_px = (src_stride - lv_area_get_width(dest_area));
+ lv_coord_t src_new_line_step_byte = src_new_line_step_px * LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ for(y = 0; y < dest_h; y++) {
+ for(x = 0; x < dest_w; x++) {
+ abuf[x] = src_tmp8[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
+ cbuf[x].full = *src_tmp8;
+#elif LV_COLOR_DEPTH == 16
+ cbuf[x].full = *src_tmp8 + ((*(src_tmp8 + 1)) << 8);
+#elif LV_COLOR_DEPTH == 32
+ cbuf[x] = *((lv_color_t *) src_tmp8);
+ cbuf[x].ch.alpha = 0xff;
+#endif
+ src_tmp8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ }
+ cbuf += dest_w;
+ abuf += dest_w;
+ src_tmp8 += src_new_line_step_byte;
+ }
+ }
+ else if(cf == LV_IMG_CF_RGB565A8) {
+ src_tmp8 += (src_stride * dest_area->y1 * sizeof(lv_color_t)) + dest_area->x1 * sizeof(lv_color_t);
+
+ lv_coord_t src_stride_byte = src_stride * sizeof(lv_color_t);
+
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ for(y = 0; y < dest_h; y++) {
+ lv_memcpy(cbuf, src_tmp8, dest_w * sizeof(lv_color_t));
+ cbuf += dest_w;
+ src_tmp8 += src_stride_byte;
+ }
+
+ src_tmp8 = (const uint8_t *)src_buf;
+ src_tmp8 += sizeof(lv_color_t) * src_w * src_h;
+ src_tmp8 += src_stride * dest_area->y1 + dest_area->x1;
+ for(y = 0; y < dest_h; y++) {
+ lv_memcpy(abuf, src_tmp8, dest_w);
+ abuf += dest_w;
+ src_tmp8 += src_stride;
+ }
+ }
+}
#if 0
static void invalidate_cache(void)
diff --git a/lib/lvgl/src/draw/lv_draw.c b/lib/lvgl/src/draw/lv_draw.c
index f538756..823f707 100644
--- a/lib/lvgl/src/draw/lv_draw.c
+++ b/lib/lvgl/src/draw/lv_draw.c
@@ -42,6 +42,11 @@ void lv_draw_init(void)
/*Nothing to init now*/
}
+void lv_draw_wait_for_finish(lv_draw_ctx_t * draw_ctx)
+{
+ if(draw_ctx->wait_for_finish) draw_ctx->wait_for_finish(draw_ctx);
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/draw/lv_draw.h b/lib/lvgl/src/draw/lv_draw.h
index 9995330..a3f0687 100644
--- a/lib/lvgl/src/draw/lv_draw.h
+++ b/lib/lvgl/src/draw/lv_draw.h
@@ -27,6 +27,8 @@ extern "C" {
#include "lv_draw_triangle.h"
#include "lv_draw_arc.h"
#include "lv_draw_mask.h"
+#include "lv_draw_transform.h"
+#include "lv_draw_layer.h"
/*********************
* DEFINES
@@ -40,6 +42,19 @@ typedef struct {
void * user_data;
} lv_draw_mask_t;
+typedef struct _lv_draw_layer_ctx_t {
+ lv_area_t area_full;
+ lv_area_t area_act;
+ lv_coord_t max_row_with_alpha;
+ lv_coord_t max_row_with_no_alpha;
+ void * buf;
+ struct {
+ const lv_area_t * clip_area;
+ lv_area_t * buf_area;
+ void * buf;
+ bool screen_transp;
+ } original;
+} lv_draw_layer_ctx_t;
typedef struct _lv_draw_ctx_t {
/**
@@ -57,6 +72,7 @@ typedef struct _lv_draw_ctx_t {
*/
const lv_area_t * clip_area;
+ void (*init_buf)(struct _lv_draw_ctx_t * draw_ctx);
void (*draw_rect)(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords);
@@ -72,14 +88,29 @@ typedef struct _lv_draw_ctx_t {
void (*draw_letter)(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
uint32_t letter);
-
void (*draw_line)(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, const lv_point_t * point1,
const lv_point_t * point2);
-
void (*draw_polygon)(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * draw_dsc,
const lv_point_t * points, uint16_t point_cnt);
+ /**
+ * Get an area of a transformed image (zoomed and/or rotated)
+ * @param draw_ctx pointer to a draw context
+ * @param dest_area get this area of the result image. It assumes that the original image is placed to the 0;0 position.
+ * @param src_buf the source image
+ * @param src_w width of the source image in [px]
+ * @param src_h height of the source image in [px]
+ * @param src_stride the stride in [px].
+ * @param draw_dsc an `lv_draw_img_dsc_t` descriptor containing the transformation parameters
+ * @param cf the color format of `src_buf`
+ * @param cbuf place the colors of the pixels on `dest_area` here in RGB format
+ * @param abuf place the opacity of the pixels on `dest_area` here
+ */
+ void (*draw_transform)(struct _lv_draw_ctx_t * draw_ctx, const lv_area_t * dest_area, const void * src_buf,
+ lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf);
+
/**
* Replace the buffer with a rect without decoration like radius or borders
*/
@@ -107,6 +138,50 @@ typedef struct _lv_draw_ctx_t {
void (*buffer_copy)(struct _lv_draw_ctx_t * draw_ctx, void * dest_buf, lv_coord_t dest_stride,
const lv_area_t * dest_area,
void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area);
+
+ /**
+ * Initialize a new layer context.
+ * The original buffer and area data are already saved from `draw_ctx` to `layer_ctx`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_area the coordinates of the layer
+ * @param flags OR-ed flags from @lv_draw_layer_flags_t
+ * @return pointer to the layer context, or NULL on error
+ */
+ struct _lv_draw_layer_ctx_t * (*layer_init)(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+ /**
+ * Adjust the layer_ctx and/or draw_ctx based on the `layer_ctx->area_act`.
+ * It's called only if flags has `LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ * @param flags OR-ed flags from @lv_draw_layer_flags_t
+ */
+ void (*layer_adjust)(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+ /**
+ * Blend a rendered layer to `layer_ctx->area_act`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ * @param draw_dsc pointer to an image draw descriptor
+ */
+ void (*layer_blend)(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ const lv_draw_img_dsc_t * draw_dsc);
+
+ /**
+ * Destroy a layer context. The original buffer and area data of the `draw_ctx` will be restored
+ * and the `layer_ctx` itself will be freed automatically.
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ */
+ void (*layer_destroy)(struct _lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx);
+
+ /**
+ * Size of a layer context in bytes.
+ */
+ size_t layer_instance_size;
+
#if LV_USE_USER_DATA
void * user_data;
#endif
@@ -119,6 +194,8 @@ typedef struct _lv_draw_ctx_t {
void lv_draw_init(void);
+void lv_draw_wait_for_finish(lv_draw_ctx_t * draw_ctx);
+
/**********************
* GLOBAL VARIABLES
**********************/
diff --git a/lib/lvgl/src/draw/lv_draw.mk b/lib/lvgl/src/draw/lv_draw.mk
index 3409a5e..f48f48f 100644
--- a/lib/lvgl/src/draw/lv_draw.mk
+++ b/lib/lvgl/src/draw/lv_draw.mk
@@ -5,6 +5,8 @@ CSRCS += lv_draw_label.c
CSRCS += lv_draw_line.c
CSRCS += lv_draw_mask.c
CSRCS += lv_draw_rect.c
+CSRCS += lv_draw_transform.c
+CSRCS += lv_draw_layer.c
CSRCS += lv_draw_triangle.c
CSRCS += lv_img_buf.c
CSRCS += lv_img_cache.c
@@ -16,8 +18,8 @@ VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw
CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw"
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/arm2d/lv_draw_arm2d.mk
-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_pxp/lv_draw_nxp_pxp.mk
-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_vglite/lv_draw_nxp_vglite.mk
+include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/lv_draw_nxp.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl/lv_draw_sdl.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/stm32_dma2d/lv_draw_stm32_dma2d.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw/lv_draw_sw.mk
+include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d/lv_draw_swm341_dma2d.mk
diff --git a/lib/lvgl/src/draw/lv_draw_img.c b/lib/lvgl/src/draw/lv_draw_img.c
index 3209132..931c1f8 100644
--- a/lib/lvgl/src/draw/lv_draw_img.c
+++ b/lib/lvgl/src/draw/lv_draw_img.c
@@ -25,8 +25,9 @@
/**********************
* STATIC PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,
- const lv_area_t * coords, const void * src);
+static lv_res_t /* LV_ATTRIBUTE_FAST_MEM */ decode_and_draw(lv_draw_ctx_t * draw_ctx,
+ const lv_draw_img_dsc_t * draw_dsc,
+ const lv_area_t * coords, const void * src);
static void show_error(lv_draw_ctx_t * draw_ctx, const lv_area_t * coords, const char * msg);
static void draw_cleanup(_lv_img_cache_entry_t * cache);
@@ -69,18 +70,19 @@ void lv_draw_img(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc, const
if(dsc->opa <= LV_OPA_MIN) return;
- lv_res_t res;
+ lv_res_t res = LV_RES_INV;
+
if(draw_ctx->draw_img) {
res = draw_ctx->draw_img(draw_ctx, dsc, coords, src);
}
- else {
+
+ if(res != LV_RES_OK) {
res = decode_and_draw(draw_ctx, dsc, coords, src);
}
- if(res == LV_RES_INV) {
+ if(res != LV_RES_OK) {
LV_LOG_WARN("Image draw error");
show_error(draw_ctx, coords, "No\ndata");
- return;
}
}
@@ -197,11 +199,19 @@ lv_img_src_t lv_img_src_get_type(const void * src)
if(src == NULL) return img_src_type;
const uint8_t * u8_p = src;
- /*The first byte shows the type of the image source*/
+ /*The first or fourth byte depending on platform endianess shows the type of the image source*/
+#if LV_BIG_ENDIAN_SYSTEM
+ if(u8_p[3] >= 0x20 && u8_p[3] <= 0x7F) {
+#else
if(u8_p[0] >= 0x20 && u8_p[0] <= 0x7F) {
+#endif
img_src_type = LV_IMG_SRC_FILE; /*If it's an ASCII character then it's file name*/
}
+#if LV_BIG_ENDIAN_SYSTEM
+ else if(u8_p[3] >= 0x80) {
+#else
else if(u8_p[0] >= 0x80) {
+#endif
img_src_type = LV_IMG_SRC_SYMBOL; /*Symbols begins after 0x7F*/
}
else {
@@ -227,7 +237,8 @@ void lv_draw_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc
* STATIC FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,
+static lv_res_t LV_ATTRIBUTE_FAST_MEM decode_and_draw(lv_draw_ctx_t * draw_ctx,
+ const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords, const void * src)
{
if(draw_dsc->opa <= LV_OPA_MIN) return LV_RES_OK;
@@ -236,12 +247,21 @@ LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx,
if(cdsc == NULL) return LV_RES_INV;
-
lv_img_cf_t cf;
if(lv_img_cf_is_chroma_keyed(cdsc->dec_dsc.header.cf)) cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED;
+ else if(LV_IMG_CF_ALPHA_8BIT == cdsc->dec_dsc.header.cf) cf = LV_IMG_CF_ALPHA_8BIT;
+ else if(LV_IMG_CF_RGB565A8 == cdsc->dec_dsc.header.cf) cf = LV_IMG_CF_RGB565A8;
else if(lv_img_cf_has_alpha(cdsc->dec_dsc.header.cf)) cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
else cf = LV_IMG_CF_TRUE_COLOR;
+ if(cf == LV_IMG_CF_ALPHA_8BIT) {
+ if(draw_dsc->angle || draw_dsc->zoom != LV_IMG_ZOOM_NONE) {
+ /* resume normal method */
+ cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
+ cdsc->dec_dsc.img_data = NULL;
+ }
+ }
+
if(cdsc->dec_dsc.error_msg != NULL) {
LV_LOG_WARN("Image draw error");
@@ -331,7 +351,6 @@ LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx,
return LV_RES_OK;
}
-
static void show_error(lv_draw_ctx_t * draw_ctx, const lv_area_t * coords, const char * msg)
{
lv_draw_rect_dsc_t rect_dsc;
diff --git a/lib/lvgl/src/draw/lv_draw_img.h b/lib/lvgl/src/draw/lv_draw_img.h
index 504beda..da696ac 100644
--- a/lib/lvgl/src/draw/lv_draw_img.h
+++ b/lib/lvgl/src/draw/lv_draw_img.h
@@ -31,7 +31,7 @@ extern "C" {
typedef struct {
- uint16_t angle;
+ int16_t angle;
uint16_t zoom;
lv_point_t pivot;
@@ -62,7 +62,6 @@ void lv_draw_img_dsc_init(lv_draw_img_dsc_t * dsc);
void lv_draw_img(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc, const lv_area_t * coords,
const void * src);
-
void lv_draw_img_decoded(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t color_format);
diff --git a/lib/lvgl/src/draw/lv_draw_label.c b/lib/lvgl/src/draw/lv_draw_label.c
index 8569c7d..db3c09f 100644
--- a/lib/lvgl/src/draw/lv_draw_label.c
+++ b/lib/lvgl/src/draw/lv_draw_label.c
@@ -52,7 +52,7 @@ static uint8_t hex_char_to_num(char hex);
* GLOBAL FUNCTIONS
**********************/
-void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
+void LV_ATTRIBUTE_FAST_MEM lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
{
lv_memset_00(dsc, sizeof(lv_draw_label_dsc_t));
dsc->opa = LV_OPA_COVER;
@@ -74,7 +74,7 @@ void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
* @param hint pointer to a `lv_draw_label_hint_t` variable.
* It is managed by the draw to speed up the drawing of very long texts (thousands of lines).
*/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
+void LV_ATTRIBUTE_FAST_MEM lv_draw_label(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint)
{
if(dsc->opa <= LV_OPA_MIN) return;
@@ -202,7 +202,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_draw_ctx_t * draw_ctx, const lv_draw
cmd_state_t cmd_state = CMD_STATE_WAIT;
uint32_t i;
uint32_t par_start = 0;
- lv_color_t recolor;
+ lv_color_t recolor = lv_color_black();
lv_color_t color = lv_color_black();
int32_t letter_w;
@@ -367,7 +367,6 @@ void lv_draw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
draw_ctx->draw_letter(draw_ctx, dsc, pos_p, letter);
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -414,4 +413,3 @@ static uint8_t hex_char_to_num(char hex)
return result;
}
-
diff --git a/lib/lvgl/src/draw/lv_draw_label.h b/lib/lvgl/src/draw/lv_draw_label.h
index de72edd..b28436a 100644
--- a/lib/lvgl/src/draw/lv_draw_label.h
+++ b/lib/lvgl/src/draw/lv_draw_label.h
@@ -68,7 +68,7 @@ struct _lv_draw_ctx_t;
* GLOBAL PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);
/**
* Write a text
@@ -79,8 +79,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);
* @param hint pointer to a `lv_draw_label_hint_t` variable.
* It is managed by the draw to speed up the drawing of very long texts (thousands of lines).
*/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_label(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
- const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_label(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
+ const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint);
void lv_draw_letter(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
uint32_t letter);
diff --git a/lib/lvgl/src/draw/lv_draw_layer.c b/lib/lvgl/src/draw/lv_draw_layer.c
new file mode 100644
index 0000000..da35682
--- /dev/null
+++ b/lib/lvgl/src/draw/lv_draw_layer.c
@@ -0,0 +1,93 @@
+/**
+ * @file lv_draw_layer.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_draw.h"
+#include "lv_draw_arc.h"
+#include "../core/lv_refr.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_draw_layer_ctx_t * lv_draw_layer_create(lv_draw_ctx_t * draw_ctx, const lv_area_t * layer_area,
+ lv_draw_layer_flags_t flags)
+{
+ if(draw_ctx->layer_init == NULL) return NULL;
+
+ lv_draw_layer_ctx_t * layer_ctx = lv_mem_alloc(draw_ctx->layer_instance_size);
+ LV_ASSERT_MALLOC(layer_ctx);
+ if(layer_ctx == NULL) {
+ LV_LOG_WARN("Couldn't allocate a new layer context");
+ return NULL;
+ }
+
+ lv_memset_00(layer_ctx, draw_ctx->layer_instance_size);
+
+ lv_disp_t * disp_refr = _lv_refr_get_disp_refreshing();
+ layer_ctx->original.buf = draw_ctx->buf;
+ layer_ctx->original.buf_area = draw_ctx->buf_area;
+ layer_ctx->original.clip_area = draw_ctx->clip_area;
+ layer_ctx->original.screen_transp = disp_refr->driver->screen_transp;
+ layer_ctx->area_full = *layer_area;
+
+ lv_draw_layer_ctx_t * init_layer_ctx = draw_ctx->layer_init(draw_ctx, layer_ctx, flags);
+ if(NULL == init_layer_ctx) {
+ lv_mem_free(layer_ctx);
+ }
+ return init_layer_ctx;
+}
+
+void lv_draw_layer_adjust(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags)
+{
+ if(draw_ctx->layer_adjust) draw_ctx->layer_adjust(draw_ctx, layer_ctx, flags);
+}
+
+void lv_draw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_img_dsc_t * draw_dsc)
+{
+ if(draw_ctx->layer_blend) draw_ctx->layer_blend(draw_ctx, layer_ctx, draw_dsc);
+}
+
+void lv_draw_layer_destroy(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx)
+{
+
+ lv_draw_wait_for_finish(draw_ctx);
+ draw_ctx->buf = layer_ctx->original.buf;
+ draw_ctx->buf_area = layer_ctx->original.buf_area;
+ draw_ctx->clip_area = layer_ctx->original.clip_area;
+ lv_disp_t * disp_refr = _lv_refr_get_disp_refreshing();
+ disp_refr->driver->screen_transp = layer_ctx->original.screen_transp;
+
+ if(draw_ctx->layer_destroy) draw_ctx->layer_destroy(draw_ctx, layer_ctx);
+ lv_mem_free(layer_ctx);
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
diff --git a/lib/lvgl/src/draw/lv_draw_layer.h b/lib/lvgl/src/draw/lv_draw_layer.h
new file mode 100644
index 0000000..cd64149
--- /dev/null
+++ b/lib/lvgl/src/draw/lv_draw_layer.h
@@ -0,0 +1,83 @@
+/**
+ * @file lv_draw_layer.h
+ *
+ */
+
+#ifndef LV_DRAW_LAYER_H
+#define LV_DRAW_LAYER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../lv_conf_internal.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+struct _lv_draw_ctx_t;
+struct _lv_draw_layer_ctx_t;
+
+typedef enum {
+ LV_DRAW_LAYER_FLAG_NONE,
+ LV_DRAW_LAYER_FLAG_HAS_ALPHA,
+ LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE,
+} lv_draw_layer_flags_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Create a new layer context. It is used to start and independent rendering session
+ * with the current draw_ctx
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_area the coordinates of the layer
+ * @param flags OR-ed flags from @lv_draw_layer_flags_t
+ * @return pointer to the layer context, or NULL on error
+ */
+struct _lv_draw_layer_ctx_t * lv_draw_layer_create(struct _lv_draw_ctx_t * draw_ctx, const lv_area_t * layer_area,
+ lv_draw_layer_flags_t flags);
+
+/**
+ * Adjust the layer_ctx and/or draw_ctx based on the `layer_ctx->area_act`.
+ * It's called only if flags has `LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ * @param flags OR-ed flags from @lv_draw_layer_flags_t
+ */
+void lv_draw_layer_adjust(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+/**
+ * Blend a rendered layer to `layer_ctx->area_act`
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ * @param draw_dsc pointer to an image draw descriptor
+ */
+void lv_draw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_img_dsc_t * draw_dsc);
+
+/**
+ * Destroy a layer context.
+ * @param draw_ctx pointer to the current draw context
+ * @param layer_ctx pointer to a layer context
+ */
+void lv_draw_layer_destroy(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx);
+
+/**********************
+ * MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_LAYER_H*/
diff --git a/lib/lvgl/src/draw/lv_draw_line.c b/lib/lvgl/src/draw/lv_draw_line.c
index b4844db..d0c4327 100644
--- a/lib/lvgl/src/draw/lv_draw_line.c
+++ b/lib/lvgl/src/draw/lv_draw_line.c
@@ -34,7 +34,7 @@
* GLOBAL FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
+void LV_ATTRIBUTE_FAST_MEM lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
{
lv_memset_00(dsc, sizeof(lv_draw_line_dsc_t));
dsc->width = 1;
@@ -42,7 +42,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
dsc->color = lv_color_black();
}
-LV_ATTRIBUTE_FAST_MEM void lv_draw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+void LV_ATTRIBUTE_FAST_MEM lv_draw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
const lv_point_t * point1, const lv_point_t * point2)
{
if(dsc->width == 0) return;
diff --git a/lib/lvgl/src/draw/lv_draw_line.h b/lib/lvgl/src/draw/lv_draw_line.h
index d82ea51..edd96ba 100644
--- a/lib/lvgl/src/draw/lv_draw_line.h
+++ b/lib/lvgl/src/draw/lv_draw_line.h
@@ -43,7 +43,7 @@ struct _lv_draw_ctx_t;
* GLOBAL PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);
/**
* Draw a line
@@ -52,9 +52,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);
* @param clip the line will be drawn only in this area
* @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable
*/
-void lv_draw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, const lv_point_t * point1,
- const lv_point_t * point2);
-
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+ const lv_point_t * point1, const lv_point_t * point2);
/**********************
* MACROS
diff --git a/lib/lvgl/src/draw/lv_draw_mask.c b/lib/lvgl/src/draw/lv_draw_mask.c
index 2170da9..675fede 100644
--- a/lib/lvgl/src/draw/lv_draw_mask.c
+++ b/lib/lvgl/src/draw/lv_draw_mask.c
@@ -26,31 +26,31 @@
/**********************
* STATIC PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_line(lv_opa_t * mask_buf, lv_coord_t abs_x,
- lv_coord_t abs_y, lv_coord_t len,
- lv_draw_mask_line_param_t * param);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * mask_buf, lv_coord_t abs_x,
- lv_coord_t abs_y, lv_coord_t len,
- lv_draw_mask_radius_param_t * param);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_angle(lv_opa_t * mask_buf, lv_coord_t abs_x,
- lv_coord_t abs_y, lv_coord_t len,
- lv_draw_mask_angle_param_t * param);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_fade(lv_opa_t * mask_buf, lv_coord_t abs_x,
- lv_coord_t abs_y, lv_coord_t len,
- lv_draw_mask_fade_param_t * param);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_map(lv_opa_t * mask_buf, lv_coord_t abs_x,
- lv_coord_t abs_y, lv_coord_t len,
- lv_draw_mask_map_param_t * param);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_polygon(lv_opa_t * mask_buf, lv_coord_t abs_x,
- lv_coord_t abs_y, lv_coord_t len,
- lv_draw_mask_polygon_param_t * param);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_line(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_line_param_t * param);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_radius(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_radius_param_t * param);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_angle(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_angle_param_t * param);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_fade(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_fade_param_t * param);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_map(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_map_param_t * param);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_polygon(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_polygon_param_t * param);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_flat(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
- lv_coord_t len,
- lv_draw_mask_line_param_t * p);
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_steep(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
- lv_coord_t len,
- lv_draw_mask_line_param_t * p);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ line_mask_flat(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_line_param_t * p);
+static lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ line_mask_steep(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ lv_draw_mask_line_param_t * p);
static void circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius);
static bool circ_cont(lv_point_t * c);
@@ -58,7 +58,7 @@ static void circ_next(lv_point_t * c, lv_coord_t * tmp);
static void circ_calc_aa4(_lv_draw_mask_radius_circle_dsc_t * c, lv_coord_t radius);
static lv_opa_t * get_next_line(_lv_draw_mask_radius_circle_dsc_t * c, lv_coord_t y, lv_coord_t * len,
lv_coord_t * x_start);
-LV_ATTRIBUTE_FAST_MEM static inline lv_opa_t mask_mix(lv_opa_t mask_act, lv_opa_t mask_new);
+static inline lv_opa_t /* LV_ATTRIBUTE_FAST_MEM */ mask_mix(lv_opa_t mask_act, lv_opa_t mask_new);
/**********************
* STATIC VARIABLES
@@ -108,8 +108,8 @@ int16_t lv_draw_mask_add(void * param, void * custom_id)
* - `LV_DRAW_MASK_RES_FULL_COVER`: the whole line is fully visible. `mask_buf` is unchanged
* - `LV_DRAW_MASK_RES_CHANGED`: `mask_buf` has changed, it shows the desired opacity of each pixel in the given line
*/
-LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
- lv_coord_t len)
+lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_apply(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len)
{
bool changed = false;
_lv_draw_mask_common_dsc_t * dsc;
@@ -142,8 +142,9 @@ LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply(lv_opa_t * mask_buf,
* - `LV_DRAW_MASK_RES_FULL_COVER`: the whole line is fully visible. `mask_buf` is unchanged
* - `LV_DRAW_MASK_RES_CHANGED`: `mask_buf` has changed, it shows the desired opacity of each pixel in the given line
*/
-LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply_ids(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
- lv_coord_t len, const int16_t * ids, int16_t ids_count)
+lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_apply_ids(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ const int16_t * ids, int16_t ids_count)
{
bool changed = false;
_lv_draw_mask_common_dsc_t * dsc;
@@ -243,7 +244,7 @@ void _lv_draw_mask_cleanup(void)
* Count the currently added masks
* @return number of active masks
*/
-LV_ATTRIBUTE_FAST_MEM uint8_t lv_draw_mask_get_cnt(void)
+uint8_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_get_cnt(void)
{
uint8_t cnt = 0;
uint8_t i;
@@ -593,7 +594,7 @@ void lv_draw_mask_polygon_init(lv_draw_mask_polygon_param_t * param, const lv_po
* STATIC FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_line(lv_opa_t * mask_buf, lv_coord_t abs_x,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_line(lv_opa_t * mask_buf, lv_coord_t abs_x,
lv_coord_t abs_y, lv_coord_t len,
lv_draw_mask_line_param_t * p)
{
@@ -653,7 +654,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_line(lv_opa_t * mas
return res;
}
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_flat(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM line_mask_flat(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
lv_coord_t len,
lv_draw_mask_line_param_t * p)
{
@@ -769,7 +770,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_flat(lv_opa_t * mask_b
return LV_DRAW_MASK_RES_CHANGED;
}
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_steep(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM line_mask_steep(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
lv_coord_t len,
lv_draw_mask_line_param_t * p)
{
@@ -911,7 +912,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t line_mask_steep(lv_opa_t * mask_
return LV_DRAW_MASK_RES_CHANGED;
}
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_angle(lv_opa_t * mask_buf, lv_coord_t abs_x,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_angle(lv_opa_t * mask_buf, lv_coord_t abs_x,
lv_coord_t abs_y, lv_coord_t len,
lv_draw_mask_angle_param_t * p)
{
@@ -1048,9 +1049,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_angle(lv_opa_t * ma
}
}
-
-
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * mask_buf, lv_coord_t abs_x,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_radius(lv_opa_t * mask_buf, lv_coord_t abs_x,
lv_coord_t abs_y, lv_coord_t len,
lv_draw_mask_radius_param_t * p)
{
@@ -1103,7 +1102,6 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
}
// printf("exec: x:%d.. %d, y:%d: r:%d, %s\n", abs_x, abs_x + len - 1, abs_y, p->cfg.radius, p->cfg.outer ? "inv" : "norm");
-
// if( abs_x == 276 && abs_x + len - 1 == 479 && abs_y == 63 && p->cfg.radius == 5 && p->cfg.outer == 1) {
// char x = 0;
// }
@@ -1167,7 +1165,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
return LV_DRAW_MASK_RES_CHANGED;
}
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_fade(lv_opa_t * mask_buf, lv_coord_t abs_x,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_fade(lv_opa_t * mask_buf, lv_coord_t abs_x,
lv_coord_t abs_y, lv_coord_t len,
lv_draw_mask_fade_param_t * p)
{
@@ -1213,7 +1211,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_fade(lv_opa_t * mas
}
}
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_map(lv_opa_t * mask_buf, lv_coord_t abs_x,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_map(lv_opa_t * mask_buf, lv_coord_t abs_x,
lv_coord_t abs_y, lv_coord_t len,
lv_draw_mask_map_param_t * p)
{
@@ -1247,7 +1245,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_map(lv_opa_t * mask
return LV_DRAW_MASK_RES_CHANGED;
}
-LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_polygon(lv_opa_t * mask_buf, lv_coord_t abs_x,
+static lv_draw_mask_res_t LV_ATTRIBUTE_FAST_MEM lv_draw_mask_polygon(lv_opa_t * mask_buf, lv_coord_t abs_x,
lv_coord_t abs_y, lv_coord_t len,
lv_draw_mask_polygon_param_t * param)
{
@@ -1517,8 +1515,7 @@ static lv_opa_t * get_next_line(_lv_draw_mask_radius_circle_dsc_t * c, lv_coord_
return &c->cir_opa[c->opa_start_on_y[y]];
}
-
-LV_ATTRIBUTE_FAST_MEM static inline lv_opa_t mask_mix(lv_opa_t mask_act, lv_opa_t mask_new)
+static inline lv_opa_t LV_ATTRIBUTE_FAST_MEM mask_mix(lv_opa_t mask_act, lv_opa_t mask_new)
{
if(mask_new >= LV_OPA_MAX) return mask_act;
if(mask_new <= LV_OPA_MIN) return 0;
@@ -1526,5 +1523,4 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_opa_t mask_mix(lv_opa_t mask_act, lv_opa_
return LV_UDIV255(mask_act * mask_new);// >> 8);
}
-
#endif /*LV_DRAW_COMPLEX*/
diff --git a/lib/lvgl/src/draw/lv_draw_mask.h b/lib/lvgl/src/draw/lv_draw_mask.h
index b7e4e1c..df6c2e6 100644
--- a/lib/lvgl/src/draw/lv_draw_mask.h
+++ b/lib/lvgl/src/draw/lv_draw_mask.h
@@ -10,7 +10,6 @@
extern "C" {
#endif
-
/*********************
* INCLUDES
*********************/
@@ -49,8 +48,6 @@ typedef struct {
typedef _lv_draw_mask_saved_t _lv_draw_mask_saved_arr_t[_LV_MASK_MAX_NUM];
-
-
#if LV_DRAW_COMPLEX == 0
static inline uint8_t lv_draw_mask_get_cnt(void)
{
@@ -179,7 +176,6 @@ typedef struct {
_lv_draw_mask_radius_circle_dsc_t * circle;
} lv_draw_mask_radius_param_t;
-
typedef struct {
/*The first element must be the common descriptor*/
_lv_draw_mask_common_dsc_t dsc;
@@ -194,7 +190,6 @@ typedef struct {
} lv_draw_mask_fade_param_t;
-
typedef struct _lv_draw_mask_map_param_t {
/*The first element must be the common descriptor*/
_lv_draw_mask_common_dsc_t dsc;
@@ -215,7 +210,6 @@ typedef struct {
} cfg;
} lv_draw_mask_polygon_param_t;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -241,8 +235,8 @@ int16_t lv_draw_mask_add(void * param, void * custom_id);
* - `LV_DRAW_MASK_RES_FULL_COVER`: the whole line is fully visible. `mask_buf` is unchanged
* - `LV_DRAW_MASK_RES_CHANGED`: `mask_buf` has changed, it shows the desired opacity of each pixel in the given line
*/
-LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
- lv_coord_t len);
+lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_apply(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len);
/**
* Apply the specified buffers on a line. Used internally by the library's drawing routines.
@@ -257,8 +251,9 @@ LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply(lv_opa_t * mask_buf,
* - `LV_DRAW_MASK_RES_FULL_COVER`: the whole line is fully visible. `mask_buf` is unchanged
* - `LV_DRAW_MASK_RES_CHANGED`: `mask_buf` has changed, it shows the desired opacity of each pixel in the given line
*/
-LV_ATTRIBUTE_FAST_MEM lv_draw_mask_res_t lv_draw_mask_apply_ids(lv_opa_t * mask_buf, lv_coord_t abs_x, lv_coord_t abs_y,
- lv_coord_t len, const int16_t * ids, int16_t ids_count);
+lv_draw_mask_res_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_apply_ids(lv_opa_t * mask_buf, lv_coord_t abs_x,
+ lv_coord_t abs_y, lv_coord_t len,
+ const int16_t * ids, int16_t ids_count);
//! @endcond
@@ -299,8 +294,7 @@ void _lv_draw_mask_cleanup(void);
* Count the currently added masks
* @return number of active masks
*/
-LV_ATTRIBUTE_FAST_MEM uint8_t lv_draw_mask_get_cnt(void);
-
+uint8_t /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_get_cnt(void);
/**
* Check if there is any added draw mask
diff --git a/lib/lvgl/src/draw/lv_draw_rect.c b/lib/lvgl/src/draw/lv_draw_rect.c
index f34854d..ae81f38 100644
--- a/lib/lvgl/src/draw/lv_draw_rect.c
+++ b/lib/lvgl/src/draw/lv_draw_rect.c
@@ -34,7 +34,7 @@
* GLOBAL FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc)
+void LV_ATTRIBUTE_FAST_MEM lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc)
{
lv_memset_00(dsc, sizeof(lv_draw_rect_dsc_t));
dsc->bg_color = lv_color_white();
diff --git a/lib/lvgl/src/draw/lv_draw_rect.h b/lib/lvgl/src/draw/lv_draw_rect.h
index 1583e3e..dbe6610 100644
--- a/lib/lvgl/src/draw/lv_draw_rect.h
+++ b/lib/lvgl/src/draw/lv_draw_rect.h
@@ -74,8 +74,7 @@ struct _lv_draw_ctx_t;
* GLOBAL PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc);
-
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc);
/**
* Draw a rectangle
diff --git a/lib/lvgl/src/draw/lv_draw_transform.c b/lib/lvgl/src/draw/lv_draw_transform.c
new file mode 100644
index 0000000..aa39687
--- /dev/null
+++ b/lib/lvgl/src/draw/lv_draw_transform.c
@@ -0,0 +1,53 @@
+/**
+ * @file lv_draw_transform.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_draw.h"
+#include "lv_draw_transform.h"
+#include "../misc/lv_assert.h"
+#include "../misc/lv_area.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+void lv_draw_transform(lv_draw_ctx_t * draw_ctx, const lv_area_t * dest_area, const void * src_buf, lv_coord_t src_w,
+ lv_coord_t src_h,
+ lv_coord_t src_stride, const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf)
+{
+ LV_ASSERT_NULL(draw_ctx);
+ if(draw_ctx->draw_transform == NULL) {
+ LV_LOG_WARN("draw_ctx->draw_transform == NULL");
+ return;
+ }
+
+ draw_ctx->draw_transform(draw_ctx, dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, cf, cbuf, abuf);
+
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
diff --git a/lib/lvgl/src/draw/lv_draw_transform.h b/lib/lvgl/src/draw/lv_draw_transform.h
new file mode 100644
index 0000000..1926c2f
--- /dev/null
+++ b/lib/lvgl/src/draw/lv_draw_transform.h
@@ -0,0 +1,44 @@
+/**
+ * @file lv_draw_transform.h
+ *
+ */
+
+#ifndef LV_DRAW_TRANSFORM_H
+#define LV_DRAW_TRANSFORM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../lv_conf_internal.h"
+#include "../misc/lv_area.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+struct _lv_draw_ctx_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+void lv_draw_transform(struct _lv_draw_ctx_t * draw_ctx, const lv_area_t * dest_area, const void * src_buf,
+ lv_coord_t src_w, lv_coord_t src_h,
+ lv_coord_t src_stride, const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf);
+
+/**********************
+ * MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_TRANSFORM_H*/
diff --git a/lib/lvgl/src/draw/lv_img_buf.c b/lib/lvgl/src/draw/lv_img_buf.c
index a6d0efc..5ac1ead 100644
--- a/lib/lvgl/src/draw/lv_img_buf.c
+++ b/lib/lvgl/src/draw/lv_img_buf.c
@@ -38,23 +38,13 @@
* GLOBAL FUNCTIONS
**********************/
-/**
- * Get the color of an image's pixel
- * @param dsc an image descriptor
- * @param x x coordinate of the point to get
- * @param y x coordinate of the point to get
- * @param color the color of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` this color is used.
- * Not used in other cases.
- * @param safe true: check out of bounds
- * @return color of the point
- */
-lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t color)
+lv_color_t lv_img_buf_get_px_color(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t color)
{
lv_color_t p_color = lv_color_black();
uint8_t * buf_u8 = (uint8_t *)dsc->data;
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED ||
- dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
+ dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || dsc->header.cf == LV_IMG_CF_RGB565A8) {
uint8_t px_size = lv_img_cf_get_px_size(dsc->header.cf) >> 3;
uint32_t px = dsc->header.w * y * px_size + x * px_size;
lv_memcpy_small(&p_color, &buf_u8[px], sizeof(lv_color_t));
@@ -107,15 +97,7 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
return p_color;
}
-/**
- * Get the alpha value of an image's pixel
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param safe true: check out of bounds
- * @return alpha value of the point
- */
-lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
+lv_opa_t lv_img_buf_get_px_alpha(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
{
uint8_t * buf_u8 = (uint8_t *)dsc->data;
@@ -170,15 +152,7 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
return LV_OPA_COVER;
}
-/**
- * Set the alpha value of a pixel of an image. The color won't be affected
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param opa the desired opacity
- * @param safe true: check out of bounds
- */
-void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa)
+void lv_img_buf_set_px_alpha(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa)
{
uint8_t * buf_u8 = (uint8_t *)dsc->data;
@@ -229,15 +203,7 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
}
}
-/**
- * Set the color of a pixel of an image. The alpha channel won't be affected.
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param c color of the point
- * @param safe true: check out of bounds
- */
-void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c)
+void lv_img_buf_set_px_color(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c)
{
uint8_t * buf_u8 = (uint8_t *)dsc->data;
@@ -296,17 +262,7 @@ void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
}
}
-/**
- * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
- * @param dsc pointer to an image descriptor
- * @param id the palette color to set:
- * - for `LV_IMG_CF_INDEXED1`: 0..1
- * - for `LV_IMG_CF_INDEXED2`: 0..3
- * - for `LV_IMG_CF_INDEXED4`: 0..15
- * - for `LV_IMG_CF_INDEXED8`: 0..255
- * @param c the color to set
- */
-void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c)
+void lv_img_buf_set_palette(const lv_img_dsc_t * dsc, uint8_t id, lv_color_t c)
{
if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && id > 1) || (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && id > 3) ||
(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && id > 15) || (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT)) {
@@ -320,13 +276,6 @@ void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c)
lv_memcpy_small(&buf[id * sizeof(c32)], &c32, sizeof(c32));
}
-/**
- * Allocate an image buffer in RAM
- * @param w width of image
- * @param h height of image
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return an allocated image, or NULL on failure
- */
lv_img_dsc_t * lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
{
/*Allocate image descriptor*/
@@ -359,10 +308,6 @@ lv_img_dsc_t * lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
return dsc;
}
-/**
- * Free an allocated image buffer
- * @param dsc image buffer to free
- */
void lv_img_buf_free(lv_img_dsc_t * dsc)
{
if(dsc != NULL) {
@@ -373,19 +318,13 @@ void lv_img_buf_free(lv_img_dsc_t * dsc)
}
}
-/**
- * Get the memory consumption of a raw bitmap, given color format and dimensions.
- * @param w width
- * @param h height
- * @param cf color format
- * @return size in bytes
- */
uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
{
switch(cf) {
case LV_IMG_CF_TRUE_COLOR:
return LV_IMG_BUF_SIZE_TRUE_COLOR(w, h);
case LV_IMG_CF_TRUE_COLOR_ALPHA:
+ case LV_IMG_CF_RGB565A8:
return LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h);
case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
return LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h);
@@ -410,67 +349,6 @@ uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
}
}
-#if LV_DRAW_COMPLEX
-/**
- * Initialize a descriptor to transform an image
- * @param dsc pointer to an `lv_img_transform_dsc_t` variable whose `cfg` field is initialized
- */
-void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc)
-{
- dsc->tmp.pivot_x_256 = dsc->cfg.pivot_x * 256;
- dsc->tmp.pivot_y_256 = dsc->cfg.pivot_y * 256;
-
- int32_t angle_low = dsc->cfg.angle / 10;
- int32_t angle_high = angle_low + 1;
- int32_t angle_rem = dsc->cfg.angle - (angle_low * 10);
-
- int32_t s1 = lv_trigo_sin(-angle_low);
- int32_t s2 = lv_trigo_sin(-angle_high);
-
- int32_t c1 = lv_trigo_sin(-angle_low + 90);
- int32_t c2 = lv_trigo_sin(-angle_high + 90);
-
- dsc->tmp.sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10;
- dsc->tmp.cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10;
-
- /*Use smaller value to avoid overflow*/
- dsc->tmp.sinma = dsc->tmp.sinma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
- dsc->tmp.cosma = dsc->tmp.cosma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
-
- dsc->tmp.chroma_keyed = lv_img_cf_is_chroma_keyed(dsc->cfg.cf) ? 1 : 0;
- dsc->tmp.has_alpha = lv_img_cf_has_alpha(dsc->cfg.cf) ? 1 : 0;
- if(dsc->cfg.cf == LV_IMG_CF_TRUE_COLOR || dsc->cfg.cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
- dsc->cfg.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
- dsc->tmp.native_color = 1;
- }
- else {
- dsc->tmp.native_color = 0;
- }
-
- dsc->tmp.img_dsc.data = dsc->cfg.src;
- dsc->tmp.img_dsc.header.always_zero = 0;
- dsc->tmp.img_dsc.header.cf = dsc->cfg.cf;
- dsc->tmp.img_dsc.header.w = dsc->cfg.src_w;
- dsc->tmp.img_dsc.header.h = dsc->cfg.src_h;
-
- /*The inverse of the zoom will be sued during the transformation
- * + dsc->cfg.zoom / 2 for rounding*/
- dsc->tmp.zoom_inv = (((256 * 256) << _LV_ZOOM_INV_UPSCALE) + dsc->cfg.zoom / 2) / dsc->cfg.zoom;
-
- dsc->res.opa = LV_OPA_COVER;
- dsc->res.color = dsc->cfg.color;
-}
-#endif
-
-/**
- * Get the area of a rectangle if its rotated and scaled
- * @param res store the coordinates here
- * @param w width of the rectangle to transform
- * @param h height of the rectangle to transform
- * @param angle angle of rotation
- * @param zoom zoom, (256 no zoom)
- * @param pivot x,y pivot coordinates of rotation
- */
void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, int16_t angle, uint16_t zoom,
const lv_point_t * pivot)
{
@@ -483,68 +361,21 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t
return;
}
- res->x1 = (((int32_t)(-pivot->x) * zoom) >> 8) - 1;
- res->y1 = (((int32_t)(-pivot->y) * zoom) >> 8) - 1;
- res->x2 = (((int32_t)(w - pivot->x) * zoom) >> 8) + 2;
- res->y2 = (((int32_t)(h - pivot->y) * zoom) >> 8) + 2;
+ lv_point_t p[4] = {
+ {0, 0},
+ {w, 0},
+ {0, h},
+ {w, h},
+ };
+ lv_point_transform(&p[0], angle, zoom, pivot);
+ lv_point_transform(&p[1], angle, zoom, pivot);
+ lv_point_transform(&p[2], angle, zoom, pivot);
+ lv_point_transform(&p[3], angle, zoom, pivot);
+ res->x1 = LV_MIN4(p[0].x, p[1].x, p[2].x, p[3].x) - 2;
+ res->x2 = LV_MAX4(p[0].x, p[1].x, p[2].x, p[3].x) + 2;
+ res->y1 = LV_MIN4(p[0].y, p[1].y, p[2].y, p[3].y) - 2;
+ res->y2 = LV_MAX4(p[0].y, p[1].y, p[2].y, p[3].y) + 2;
- if(angle == 0) {
- res->x1 += pivot->x;
- res->y1 += pivot->y;
- res->x2 += pivot->x;
- res->y2 += pivot->y;
- return;
- }
-
- int32_t angle_low = angle / 10;
- int32_t angle_high = angle_low + 1;
- int32_t angle_rem = angle - (angle_low * 10);
-
- int32_t s1 = lv_trigo_sin(angle_low);
- int32_t s2 = lv_trigo_sin(angle_high);
-
- int32_t c1 = lv_trigo_sin(angle_low + 90);
- int32_t c2 = lv_trigo_sin(angle_high + 90);
-
- int32_t sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10;
- int32_t cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10;
-
- /*Use smaller value to avoid overflow*/
- sinma = sinma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
- cosma = cosma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
-
- lv_point_t lt;
- lv_point_t rt;
- lv_point_t lb;
- lv_point_t rb;
-
- lv_coord_t xt;
- lv_coord_t yt;
-
- xt = res->x1;
- yt = res->y1;
- lt.x = ((cosma * xt - sinma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
- lt.y = ((sinma * xt + cosma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
-
- xt = res->x2;
- yt = res->y1;
- rt.x = ((cosma * xt - sinma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
- rt.y = ((sinma * xt + cosma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
-
- xt = res->x1;
- yt = res->y2;
- lb.x = ((cosma * xt - sinma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
- lb.y = ((sinma * xt + cosma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
-
- xt = res->x2;
- yt = res->y2;
- rb.x = ((cosma * xt - sinma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
- rb.y = ((sinma * xt + cosma * yt) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
-
- res->x1 = LV_MIN4(lb.x, lt.x, rb.x, rt.x);
- res->x2 = LV_MAX4(lb.x, lt.x, rb.x, rt.x);
- res->y1 = LV_MIN4(lb.y, lt.y, rb.y, rt.y);
- res->y2 = LV_MAX4(lb.y, lt.y, rb.y, rt.y);
#else
LV_UNUSED(angle);
LV_UNUSED(zoom);
@@ -556,217 +387,6 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t
#endif
}
-
-#if LV_DRAW_COMPLEX
-/**
- * Get which color and opa would come to a pixel if it were rotated
- * @param dsc a descriptor initialized by `lv_img_buf_rotate_init`
- * @param x the coordinate which color and opa should be get
- * @param y the coordinate which color and opa should be get
- * @return true: there is valid pixel on these x/y coordinates; false: the rotated pixel was out of the image
- * @note the result is written back to `dsc->res_color` and `dsc->res_opa`
- */
-bool _lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
-{
- const uint8_t * src_u8 = (const uint8_t *)dsc->cfg.src;
-
- /*Get the target point relative coordinates to the pivot*/
- int32_t xt = x - dsc->cfg.pivot_x;
- int32_t yt = y - dsc->cfg.pivot_y;
-
- int32_t xs;
- int32_t ys;
- if(dsc->cfg.zoom == LV_IMG_ZOOM_NONE) {
- /*Get the source pixel from the upscaled image*/
- xs = ((dsc->tmp.cosma * xt - dsc->tmp.sinma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT - 8)) + dsc->tmp.pivot_x_256;
- ys = ((dsc->tmp.sinma * xt + dsc->tmp.cosma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT - 8)) + dsc->tmp.pivot_y_256;
- }
- else if(dsc->cfg.angle == 0) {
- xt = (int32_t)((int32_t)xt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE;
- yt = (int32_t)((int32_t)yt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE;
- xs = xt + dsc->tmp.pivot_x_256;
- ys = yt + dsc->tmp.pivot_y_256;
- }
- else {
- xt = (int32_t)((int32_t)xt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE;
- yt = (int32_t)((int32_t)yt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE;
- xs = ((dsc->tmp.cosma * xt - dsc->tmp.sinma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT)) + dsc->tmp.pivot_x_256;
- ys = ((dsc->tmp.sinma * xt + dsc->tmp.cosma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT)) + dsc->tmp.pivot_y_256;
- }
-
- /*Get the integer part of the source pixel*/
- int32_t xs_int = xs >> 8;
- int32_t ys_int = ys >> 8;
-
- if(xs_int >= dsc->cfg.src_w) return false;
- else if(xs_int < 0) return false;
-
- if(ys_int >= dsc->cfg.src_h) return false;
- else if(ys_int < 0) return false;
-
- uint8_t px_size;
- uint32_t pxi;
- if(dsc->tmp.native_color) {
- if(dsc->tmp.has_alpha == 0) {
- px_size = LV_COLOR_SIZE >> 3;
-
- pxi = dsc->cfg.src_w * ys_int * px_size + xs_int * px_size;
- lv_memcpy_small(&dsc->res.color, &src_u8[pxi], px_size);
- }
- else {
- px_size = LV_IMG_PX_SIZE_ALPHA_BYTE;
- pxi = dsc->cfg.src_w * ys_int * px_size + xs_int * px_size;
- lv_memcpy_small(&dsc->res.color, &src_u8[pxi], px_size - 1);
- dsc->res.opa = src_u8[pxi + px_size - 1];
- }
- }
- else {
- pxi = 0; /*unused*/
- px_size = 0; /*unused*/
- dsc->res.color = lv_img_buf_get_px_color(&dsc->tmp.img_dsc, xs_int, ys_int, dsc->cfg.color);
- dsc->res.opa = lv_img_buf_get_px_alpha(&dsc->tmp.img_dsc, xs_int, ys_int);
- }
-
- if(dsc->tmp.chroma_keyed) {
- lv_color_t ct = LV_COLOR_CHROMA_KEY;
- if(dsc->res.color.full == ct.full) return false;
- }
-
- if(dsc->cfg.antialias == false) return true;
-
- dsc->tmp.xs = xs;
- dsc->tmp.ys = ys;
- dsc->tmp.xs_int = xs_int;
- dsc->tmp.ys_int = ys_int;
- dsc->tmp.pxi = pxi;
- dsc->tmp.px_size = px_size;
-
- bool ret;
- ret = _lv_img_buf_transform_anti_alias(dsc);
-
- return ret;
-}
-
-/**
- * Continue transformation by taking the neighbors into account
- * @param dsc pointer to the transformation descriptor
- */
-bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc)
-{
- const uint8_t * src_u8 = dsc->cfg.src;
-
- /*Get the fractional part of the source pixel*/
- int xs_fract = dsc->tmp.xs & 0xff;
- int ys_fract = dsc->tmp.ys & 0xff;
- int32_t xn; /*x neighbor*/
- lv_opa_t xr; /*x mix ratio*/
-
- if(xs_fract < 0x70) {
- xn = - 1;
- if(dsc->tmp.xs_int + xn < 0) xn = 0;
- xr = xs_fract + 0x80;
- }
- else if(xs_fract > 0x90) {
- xn = 1;
- if(dsc->tmp.xs_int + xn >= dsc->cfg.src_w) xn = 0;
- xr = (0xFF - xs_fract) + 0x80;
- }
- else {
- xn = 0;
- xr = 0xFF;
- }
-
- int32_t yn; /*x neighbor*/
- lv_opa_t yr; /*x mix ratio*/
-
- if(ys_fract < 0x70) {
- yn = - 1;
- if(dsc->tmp.ys_int + yn < 0) yn = 0;
-
- yr = ys_fract + 0x80;
- }
- else if(ys_fract > 0x90) {
- yn = 1;
- if(dsc->tmp.ys_int + yn >= dsc->cfg.src_h) yn = 0;
-
- yr = (0xFF - ys_fract) + 0x80;
- }
- else {
- yn = 0;
- yr = 0xFF;
- }
-
- lv_color_t c00 = dsc->res.color;
- lv_color_t c01;
- lv_color_t c10;
- lv_color_t c11;
-
- lv_opa_t a00 = dsc->res.opa;
- lv_opa_t a10 = 0;
- lv_opa_t a01 = 0;
- lv_opa_t a11 = 0;
-
- if(dsc->tmp.native_color) {
- lv_memcpy_small(&c01, &src_u8[dsc->tmp.pxi + dsc->tmp.px_size * xn], sizeof(lv_color_t));
- lv_memcpy_small(&c10, &src_u8[dsc->tmp.pxi + dsc->cfg.src_w * dsc->tmp.px_size * yn], sizeof(lv_color_t));
- lv_memcpy_small(&c11, &src_u8[dsc->tmp.pxi + dsc->cfg.src_w * dsc->tmp.px_size * yn + dsc->tmp.px_size * xn],
- sizeof(lv_color_t));
- if(dsc->tmp.has_alpha) {
- a10 = src_u8[dsc->tmp.pxi + dsc->tmp.px_size * xn + dsc->tmp.px_size - 1];
- a01 = src_u8[dsc->tmp.pxi + dsc->cfg.src_w * dsc->tmp.px_size * yn + dsc->tmp.px_size - 1];
- a11 = src_u8[dsc->tmp.pxi + dsc->cfg.src_w * dsc->tmp.px_size * yn + dsc->tmp.px_size * xn + dsc->tmp.px_size - 1];
- }
- }
- else {
- c01 = lv_img_buf_get_px_color(&dsc->tmp.img_dsc, dsc->tmp.xs_int + xn, dsc->tmp.ys_int, dsc->cfg.color);
- c10 = lv_img_buf_get_px_color(&dsc->tmp.img_dsc, dsc->tmp.xs_int, dsc->tmp.ys_int + yn, dsc->cfg.color);
- c11 = lv_img_buf_get_px_color(&dsc->tmp.img_dsc, dsc->tmp.xs_int + xn, dsc->tmp.ys_int + yn, dsc->cfg.color);
-
- if(dsc->tmp.has_alpha) {
- a10 = lv_img_buf_get_px_alpha(&dsc->tmp.img_dsc, dsc->tmp.xs_int + xn, dsc->tmp.ys_int);
- a01 = lv_img_buf_get_px_alpha(&dsc->tmp.img_dsc, dsc->tmp.xs_int, dsc->tmp.ys_int + yn);
- a11 = lv_img_buf_get_px_alpha(&dsc->tmp.img_dsc, dsc->tmp.xs_int + xn, dsc->tmp.ys_int + yn);
- }
- }
-
- lv_opa_t xr0 = xr;
- lv_opa_t xr1 = xr;
- if(dsc->tmp.has_alpha) {
- lv_opa_t a0 = (a00 * xr + (a10 * (255 - xr))) >> 8;
- lv_opa_t a1 = (a01 * xr + (a11 * (255 - xr))) >> 8;
- dsc->res.opa = (a0 * yr + (a1 * (255 - yr))) >> 8;
-
- if(a0 <= LV_OPA_MIN && a1 <= LV_OPA_MIN) return false;
- if(a0 <= LV_OPA_MIN) yr = LV_OPA_TRANSP;
- if(a1 <= LV_OPA_MIN) yr = LV_OPA_COVER;
- if(a00 <= LV_OPA_MIN) xr0 = LV_OPA_TRANSP;
- if(a10 <= LV_OPA_MIN) xr0 = LV_OPA_COVER;
- if(a01 <= LV_OPA_MIN) xr1 = LV_OPA_TRANSP;
- if(a11 <= LV_OPA_MIN) xr1 = LV_OPA_COVER;
- }
- else {
- xr0 = xr;
- xr1 = xr;
- dsc->res.opa = LV_OPA_COVER;
- }
-
- lv_color_t c0;
- if(xr0 == LV_OPA_TRANSP) c0 = c01;
- else if(xr0 == LV_OPA_COVER) c0 = c00;
- else c0 = lv_color_mix(c00, c01, xr0);
-
- lv_color_t c1;
- if(xr1 == LV_OPA_TRANSP) c1 = c11;
- else if(xr1 == LV_OPA_COVER) c1 = c10;
- else c1 = lv_color_mix(c10, c11, xr1);
-
- if(yr == LV_OPA_TRANSP) dsc->res.color = c1;
- else if(yr == LV_OPA_COVER) dsc->res.color = c0;
- else dsc->res.color = lv_color_mix(c0, c1, yr);
-
- return true;
-}
-#endif
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/draw/lv_img_buf.h b/lib/lvgl/src/draw/lv_img_buf.h
index de8819c..a315a85 100644
--- a/lib/lvgl/src/draw/lv_img_buf.h
+++ b/lib/lvgl/src/draw/lv_img_buf.h
@@ -45,7 +45,6 @@ extern "C" {
#define LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16)
#define LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256)
-#define _LV_TRANSFORM_TRIGO_SHIFT 10
#define _LV_ZOOM_INV_UPSCALE 5
/**********************
@@ -77,6 +76,13 @@ enum {
LV_IMG_CF_ALPHA_4BIT, /**< Can have one color but 16 different alpha value*/
LV_IMG_CF_ALPHA_8BIT, /**< Can have one color but 256 different alpha value*/
+ LV_IMG_CF_RGB888,
+ LV_IMG_CF_RGBA8888,
+ LV_IMG_CF_RGBX8888,
+ LV_IMG_CF_RGB565,
+ LV_IMG_CF_RGBA5658,
+ LV_IMG_CF_RGB565A8,
+
LV_IMG_CF_RESERVED_15, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_16, /**< Reserved for further use.*/
LV_IMG_CF_RESERVED_17, /**< Reserved for further use.*/
@@ -98,7 +104,6 @@ enum {
};
typedef uint8_t lv_img_cf_t;
-
/**
* The first 8 bit is very important to distinguish the different source types.
* For more info see `lv_img_get_src_type()` in lv_img.c
@@ -138,49 +143,6 @@ typedef struct {
const uint8_t * data; /**< Pointer to the data of the image*/
} lv_img_dsc_t;
-typedef struct {
- struct {
- const void * src; /*image source (array of pixels)*/
- lv_coord_t src_w; /*width of the image source*/
- lv_coord_t src_h; /*height of the image source*/
- lv_coord_t pivot_x; /*pivot x*/
- lv_coord_t pivot_y; /*pivot y*/
- int16_t angle; /*angle to rotate*/
- uint16_t zoom; /*256 no zoom, 128 half size, 512 double size*/
- lv_color_t color; /*a color used for `LV_IMG_CF_INDEXED_1/2/4/8BIT` color formats*/
- lv_img_cf_t cf; /*color format of the image to rotate*/
- bool antialias;
- } cfg;
-
- struct {
- lv_color_t color;
- lv_opa_t opa;
- } res;
-
- struct {
- lv_img_dsc_t img_dsc;
- int32_t pivot_x_256;
- int32_t pivot_y_256;
- int32_t sinma;
- int32_t cosma;
-
- uint8_t chroma_keyed : 1;
- uint8_t has_alpha : 1;
- uint8_t native_color : 1;
-
- uint32_t zoom_inv;
-
- /*Runtime data*/
- lv_coord_t xs;
- lv_coord_t ys;
- lv_coord_t xs_int;
- lv_coord_t ys_int;
- uint32_t pxi;
- uint8_t px_size;
- } tmp;
-} lv_img_transform_dsc_t;
-
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -204,7 +166,7 @@ lv_img_dsc_t * lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf);
* @param safe true: check out of bounds
* @return color of the point
*/
-lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t color);
+lv_color_t lv_img_buf_get_px_color(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t color);
/**
* Get the alpha value of an image's pixel
@@ -214,7 +176,7 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t
* @param safe true: check out of bounds
* @return alpha value of the point
*/
-lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y);
+lv_opa_t lv_img_buf_get_px_alpha(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y);
/**
* Set the color of a pixel of an image. The alpha channel won't be affected.
@@ -224,7 +186,7 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
* @param c color of the point
* @param safe true: check out of bounds
*/
-void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c);
+void lv_img_buf_set_px_color(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c);
/**
* Set the alpha value of a pixel of an image. The color won't be affected
@@ -234,7 +196,7 @@ void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
* @param opa the desired opacity
* @param safe true: check out of bounds
*/
-void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa);
+void lv_img_buf_set_px_alpha(const lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa);
/**
* Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
@@ -246,7 +208,7 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_
* - for `LV_IMG_CF_INDEXED8`: 0..255
* @param c the color to set
*/
-void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c);
+void lv_img_buf_set_palette(const lv_img_dsc_t * dsc, uint8_t id, lv_color_t c);
/**
* Free an allocated image buffer
@@ -263,30 +225,6 @@ void lv_img_buf_free(lv_img_dsc_t * dsc);
*/
uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf);
-#if LV_DRAW_COMPLEX
-/**
- * Initialize a descriptor to rotate an image
- * @param dsc pointer to an `lv_img_transform_dsc_t` variable whose `cfg` field is initialized
- */
-void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc);
-
-/**
- * Continue transformation by taking the neighbors into account
- * @param dsc pointer to the transformation descriptor
- */
-bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc);
-
-/**
- * Get which color and opa would come to a pixel if it were rotated
- * @param dsc a descriptor initialized by `lv_img_buf_rotate_init`
- * @param x the coordinate which color and opa should be get
- * @param y the coordinate which color and opa should be get
- * @return true: there is valid pixel on these x/y coordinates; false: the rotated pixel was out of the image
- * @note the result is written back to `dsc->res_color` and `dsc->res_opa`
- */
-bool _lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_t x, lv_coord_t y);
-
-#endif
/**
* Get the area of a rectangle if its rotated and scaled
* @param res store the coordinates here
diff --git a/lib/lvgl/src/draw/lv_img_decoder.c b/lib/lvgl/src/draw/lv_img_decoder.c
index a8fe94b..76aff5e 100644
--- a/lib/lvgl/src/draw/lv_img_decoder.c
+++ b/lib/lvgl/src/draw/lv_img_decoder.c
@@ -15,8 +15,8 @@
/*********************
* DEFINES
*********************/
-#define CF_BUILT_IN_FIRST LV_IMG_CF_TRUE_COLOR
-#define CF_BUILT_IN_LAST LV_IMG_CF_ALPHA_8BIT
+#define CF_BUILT_IN_FIRST LV_IMG_CF_TRUE_COLOR
+#define CF_BUILT_IN_LAST LV_IMG_CF_RGB565A8
/**********************
* TYPEDEFS
@@ -360,8 +360,35 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder
}
lv_img_cf_t cf = dsc->header.cf;
+ /*Process A8, RGB565A8, need load file to ram after https://github.com/lvgl/lvgl/pull/3337*/
+ if(cf == LV_IMG_CF_ALPHA_8BIT || cf == LV_IMG_CF_RGB565A8) {
+ if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
+ /*In case of uncompressed formats the image stored in the ROM/RAM.
+ *So simply give its pointer*/
+ dsc->img_data = ((lv_img_dsc_t *)dsc->src)->data;
+ return LV_RES_OK;
+ }
+ else {
+ /*If it's a file, read all to memory*/
+ uint32_t len = dsc->header.w * dsc->header.h;
+ len *= cf == LV_IMG_CF_RGB565A8 ? 3 : 1;
+ uint8_t * fs_buf = lv_mem_alloc(len);
+ if(fs_buf == NULL) return LV_RES_INV;
+
+ lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
+ lv_fs_seek(&user_data->f, 4, LV_FS_SEEK_SET); /*+4 to skip the header*/
+ lv_fs_res_t res = lv_fs_read(&user_data->f, fs_buf, len, NULL);
+ if(res != LV_FS_RES_OK) {
+ lv_mem_free(fs_buf);
+ return LV_RES_INV;
+ }
+ dsc->img_data = fs_buf;
+ return LV_RES_OK;
+ }
+ }
/*Process true color formats*/
- if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
+ else if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
+ cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
/*In case of uncompressed formats the image stored in the ROM/RAM.
*So simply give its pointer*/
@@ -426,8 +453,7 @@ lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder
return LV_RES_OK;
}
/*Alpha indexed images.*/
- else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || cf == LV_IMG_CF_ALPHA_4BIT ||
- cf == LV_IMG_CF_ALPHA_8BIT) {
+ else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || cf == LV_IMG_CF_ALPHA_4BIT) {
return LV_RES_OK; /*Nothing to process*/
}
/*Unknown format. Can't decode it.*/
diff --git a/lib/lvgl/src/draw/lv_img_decoder.h b/lib/lvgl/src/draw/lv_img_decoder.h
index f00f95d..29ed9f0 100644
--- a/lib/lvgl/src/draw/lv_img_decoder.h
+++ b/lib/lvgl/src/draw/lv_img_decoder.h
@@ -82,7 +82,6 @@ typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder_t * deco
*/
typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder_t * decoder, struct _lv_img_decoder_dsc_t * dsc);
-
typedef struct _lv_img_decoder_t {
lv_img_decoder_info_f_t info_cb;
lv_img_decoder_open_f_t open_cb;
@@ -94,7 +93,6 @@ typedef struct _lv_img_decoder_t {
#endif
} lv_img_decoder_t;
-
/**Describe an image decoding session. Stores data about the decoding*/
typedef struct _lv_img_decoder_dsc_t {
/**The decoder which was able to open the image source*/
@@ -144,7 +142,7 @@ void _lv_img_decoder_init(void);
* Get information about an image.
* Try the created image decoder one by one. Once one is able to get info that info will be used.
* @param src the image source. Can be
- * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
+ * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register()`)
* 2) Variable: Pointer to an `lv_img_dsc_t` variable
* 3) Symbol: E.g. `LV_SYMBOL_OK`
* @param header the image info will be stored here
@@ -157,7 +155,7 @@ lv_res_t lv_img_decoder_get_info(const void * src, lv_img_header_t * header);
* Try the created image decoders one by one. Once one is able to open the image that decoder is saved in `dsc`
* @param dsc describes a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable.
* @param src the image source. Can be
- * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
+ * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register())`)
* 2) Variable: Pointer to an `lv_img_dsc_t` variable
* 3) Symbol: E.g. `LV_SYMBOL_OK`
* @param color The color of the image with `LV_IMG_CF_ALPHA_...`
diff --git a/lib/lvgl/src/draw/nxp/lv_draw_nxp.mk b/lib/lvgl/src/draw/nxp/lv_draw_nxp.mk
new file mode 100644
index 0000000..18a751e
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/lv_draw_nxp.mk
@@ -0,0 +1,7 @@
+DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp
+VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp
+
+CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp"
+
+include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp/lv_draw_nxp_pxp.mk
+include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite/lv_draw_nxp_vglite.mk
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_draw_nxp_pxp.mk b/lib/lvgl/src/draw/nxp/pxp/lv_draw_nxp_pxp.mk
new file mode 100644
index 0000000..5c684bc
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_draw_nxp_pxp.mk
@@ -0,0 +1,9 @@
+CSRCS += lv_draw_pxp.c
+CSRCS += lv_draw_pxp_blend.c
+CSRCS += lv_gpu_nxp_pxp_osa.c
+CSRCS += lv_gpu_nxp_pxp.c
+
+DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp
+VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp
+
+CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp"
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c
new file mode 100644
index 0000000..cd70f48
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c
@@ -0,0 +1,275 @@
+/**
+ * @file lv_draw_pxp.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_pxp.h"
+
+#if LV_USE_GPU_NXP_PXP
+#include "lv_draw_pxp_blend.h"
+
+#if LV_COLOR_DEPTH != 32
+ #include "../../../core/lv_refr.h"
+#endif
+
+/*********************
+ * DEFINES
+ *********************/
+
+/* Minimum area (in pixels) for PXP blit/fill processing. */
+#ifndef LV_GPU_NXP_PXP_SIZE_LIMIT
+ #define LV_GPU_NXP_PXP_SIZE_LIMIT 5000
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static void lv_draw_pxp_wait_for_finish(lv_draw_ctx_t * draw_ctx);
+
+static void lv_draw_pxp_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+
+static void lv_draw_pxp_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t cf);
+
+static void lv_draw_pxp_buffer_copy(lv_draw_ctx_t * draw_ctx,
+ void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
+ void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_draw_pxp_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+ lv_draw_sw_init_ctx(drv, draw_ctx);
+
+ lv_draw_pxp_ctx_t * pxp_draw_ctx = (lv_draw_sw_ctx_t *)draw_ctx;
+ pxp_draw_ctx->base_draw.draw_img_decoded = lv_draw_pxp_img_decoded;
+ pxp_draw_ctx->blend = lv_draw_pxp_blend;
+ pxp_draw_ctx->base_draw.wait_for_finish = lv_draw_pxp_wait_for_finish;
+ pxp_draw_ctx->base_draw.buffer_copy = lv_draw_pxp_buffer_copy;
+}
+
+void lv_draw_pxp_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+ lv_draw_sw_deinit_ctx(drv, draw_ctx);
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+/**
+ * During rendering, LVGL might initializes new draw_ctxs and start drawing into
+ * a separate buffer (called layer). If the content to be rendered has "holes",
+ * e.g. rounded corner, LVGL temporarily sets the disp_drv.screen_transp flag.
+ * It means the renderers should draw into an ARGB buffer.
+ * With 32 bit color depth it's not a big problem but with 16 bit color depth
+ * the target pixel format is ARGB8565 which is not supported by the GPU.
+ * In this case, the PXP callbacks should fallback to SW rendering.
+ */
+static inline bool need_argb8565_support()
+{
+#if LV_COLOR_DEPTH != 32
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+
+ if(disp->driver->screen_transp == 1)
+ return true;
+#endif
+
+ return false;
+}
+
+static void lv_draw_pxp_wait_for_finish(lv_draw_ctx_t * draw_ctx)
+{
+ lv_gpu_nxp_pxp_wait();
+
+ lv_draw_sw_wait_for_finish(draw_ctx);
+}
+
+static void lv_draw_pxp_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+{
+ if(dsc->opa <= (lv_opa_t)LV_OPA_MIN)
+ return;
+
+ if(need_argb8565_support()) {
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+ return;
+ }
+
+ lv_area_t blend_area;
+ /*Let's get the blend area which is the intersection of the area to draw and the clip area*/
+ if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area))
+ return; /*Fully clipped, nothing to do*/
+
+ /*Make the blend area relative to the buffer*/
+ lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ if(dsc->mask_buf != NULL || dsc->blend_mode != LV_BLEND_MODE_NORMAL ||
+ lv_area_get_size(&blend_area) < LV_GPU_NXP_PXP_SIZE_LIMIT) {
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+ return;
+ }
+
+ /*Fill/Blend only non masked, normal blended*/
+ lv_color_t * dest_buf = draw_ctx->buf;
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+ const lv_color_t * src_buf = dsc->src_buf;
+
+ if(src_buf == NULL) {
+ lv_gpu_nxp_pxp_fill(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa);
+ }
+ else {
+ lv_area_t src_area;
+ src_area.x1 = blend_area.x1 - (dsc->blend_area->x1 - draw_ctx->buf_area->x1);
+ src_area.y1 = blend_area.y1 - (dsc->blend_area->y1 - draw_ctx->buf_area->y1);
+ src_area.x2 = src_area.x1 + lv_area_get_width(dsc->blend_area) - 1;
+ src_area.y2 = src_area.y1 + lv_area_get_height(dsc->blend_area) - 1;
+ lv_coord_t src_stride = lv_area_get_width(dsc->blend_area);
+
+ lv_gpu_nxp_pxp_blit(dest_buf, &blend_area, dest_stride, src_buf, &src_area, src_stride,
+ dsc->opa, LV_DISP_ROT_NONE);
+ }
+}
+
+static void lv_draw_pxp_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t cf)
+{
+ if(dsc->opa <= (lv_opa_t)LV_OPA_MIN)
+ return;
+
+ if(need_argb8565_support()) {
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, cf);
+ return;
+ }
+
+ const lv_color_t * src_buf = (const lv_color_t *)map_p;
+ if(!src_buf) {
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, cf);
+ return;
+ }
+
+ lv_area_t rel_coords;
+ lv_area_copy(&rel_coords, coords);
+ lv_area_move(&rel_coords, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t rel_clip_area;
+ lv_area_copy(&rel_clip_area, draw_ctx->clip_area);
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ bool has_scale = (dsc->zoom != LV_IMG_ZOOM_NONE);
+ bool has_rotation = (dsc->angle != 0);
+ bool unsup_rotation = false;
+
+ lv_area_t blend_area;
+ if(has_rotation)
+ lv_area_copy(&blend_area, &rel_coords);
+ else if(!_lv_area_intersect(&blend_area, &rel_coords, &rel_clip_area))
+ return; /*Fully clipped, nothing to do*/
+
+ bool has_mask = lv_draw_mask_is_any(&blend_area);
+ lv_coord_t src_width = lv_area_get_width(coords);
+ lv_coord_t src_height = lv_area_get_height(coords);
+
+ if(has_rotation) {
+ /*
+ * PXP can only rotate at 90x angles.
+ */
+ if(dsc->angle % 900) {
+ PXP_LOG_TRACE("Rotation angle %d is not supported. PXP can rotate only 90x angle.", dsc->angle);
+ unsup_rotation = true;
+ }
+
+ /*
+ * PXP is set to process 16x16 blocks to optimize the system for memory
+ * bandwidth and image processing time.
+ * The output engine essentially truncates any output pixels after the
+ * desired number of pixels has been written.
+ * When rotating a source image and the output is not divisible by the block
+ * size, the incorrect pixels could be truncated and the final output image
+ * can look shifted.
+ */
+ if(src_width % 16 || src_height % 16) {
+ PXP_LOG_TRACE("Rotation is not supported for image w/o alignment to block size 16x16.");
+ unsup_rotation = true;
+ }
+ }
+
+ if(has_mask || has_scale || unsup_rotation || lv_area_get_size(&blend_area) < LV_GPU_NXP_PXP_SIZE_LIMIT
+#if LV_COLOR_DEPTH != 32
+ || lv_img_cf_has_alpha(cf)
+#endif
+ ) {
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, cf);
+ return;
+ }
+
+ lv_color_t * dest_buf = draw_ctx->buf;
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+
+ lv_area_t src_area;
+ src_area.x1 = blend_area.x1 - (coords->x1 - draw_ctx->buf_area->x1);
+ src_area.y1 = blend_area.y1 - (coords->y1 - draw_ctx->buf_area->y1);
+ src_area.x2 = src_area.x1 + src_width - 1;
+ src_area.y2 = src_area.y1 + src_height - 1;
+ lv_coord_t src_stride = lv_area_get_width(coords);
+
+ lv_gpu_nxp_pxp_blit_transform(dest_buf, &blend_area, dest_stride, src_buf, &src_area, src_stride,
+ dsc, cf);
+}
+
+static void lv_draw_pxp_buffer_copy(lv_draw_ctx_t * draw_ctx,
+ void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
+ void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area)
+{
+ LV_UNUSED(draw_ctx);
+
+ if(lv_area_get_size(dest_area) < LV_GPU_NXP_PXP_SIZE_LIMIT) {
+ lv_draw_sw_buffer_copy(draw_ctx, dest_buf, dest_stride, dest_area, src_buf, src_stride, src_area);
+ return;
+ }
+
+ lv_gpu_nxp_pxp_buffer_copy(dest_buf, dest_area, dest_stride, src_buf, src_area, src_stride);
+}
+
+#endif /*LV_USE_GPU_NXP_PXP*/
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h
new file mode 100644
index 0000000..1ace3bc
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h
@@ -0,0 +1,72 @@
+/**
+ * @file lv_draw_pxp.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_PXP_H
+#define LV_DRAW_PXP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_PXP
+#include "../../sw/lv_draw_sw.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef lv_draw_sw_ctx_t lv_draw_pxp_ctx_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+void lv_draw_pxp_ctx_init(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+void lv_draw_pxp_ctx_deinit(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+/**********************
+ * MACROS
+ **********************/
+#endif /*LV_USE_GPU_NXP_PXP*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_PXP_H*/
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.c b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.c
new file mode 100644
index 0000000..8292576
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.c
@@ -0,0 +1,573 @@
+/**
+ * @file lv_draw_pxp_blend.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2020-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_pxp_blend.h"
+
+#if LV_USE_GPU_NXP_PXP
+#include "lvgl_support.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+#if LV_COLOR_16_SWAP
+ #error Color swap not implemented. Disable LV_COLOR_16_SWAP feature.
+#endif
+
+#if LV_COLOR_DEPTH == 16
+ #define PXP_OUT_PIXEL_FORMAT kPXP_OutputPixelFormatRGB565
+ #define PXP_AS_PIXEL_FORMAT kPXP_AsPixelFormatRGB565
+ #define PXP_PS_PIXEL_FORMAT kPXP_PsPixelFormatRGB565
+ #define PXP_TEMP_BUF_SIZE LCD_WIDTH * LCD_HEIGHT * 2U
+#elif LV_COLOR_DEPTH == 32
+ #define PXP_OUT_PIXEL_FORMAT kPXP_OutputPixelFormatARGB8888
+ #define PXP_AS_PIXEL_FORMAT kPXP_AsPixelFormatARGB8888
+ #if (!(defined(FSL_FEATURE_PXP_HAS_NO_EXTEND_PIXEL_FORMAT) && FSL_FEATURE_PXP_HAS_NO_EXTEND_PIXEL_FORMAT)) && \
+ (!(defined(FSL_FEATURE_PXP_V3) && FSL_FEATURE_PXP_V3))
+ #define PXP_PS_PIXEL_FORMAT kPXP_PsPixelFormatARGB8888
+ #else
+ #define PXP_PS_PIXEL_FORMAT kPXP_PsPixelFormatRGB888
+ #endif
+ #define PXP_TEMP_BUF_SIZE LCD_WIDTH * LCD_HEIGHT * 4U
+#elif
+ #error Only 16bit and 32bit color depth are supported. Set LV_COLOR_DEPTH to 16 or 32.
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static LV_ATTRIBUTE_MEM_ALIGN uint8_t temp_buf[PXP_TEMP_BUF_SIZE];
+
+/**
+ * BLock Image Transfer - copy rectangular image from src buffer to dst buffer
+ * with combination of transformation (rotation, scale, recolor) and opacity, alpha channel
+ * or color keying. This requires two steps. First step is used for transformation into
+ * a temporary buffer and the second one will handle the color format or opacity.
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] dsc Image descriptor
+ * @param[in] cf Color format
+ */
+static void lv_pxp_blit_opa(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf);
+
+/**
+ * BLock Image Transfer - copy rectangular image from src buffer to dst buffer
+ * with transformation and full opacity.
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] dsc Image descriptor
+ * @param[in] cf Color format
+ */
+static void lv_pxp_blit_cover(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf);
+
+/**
+ * BLock Image Transfer - copy rectangular image from src buffer to dst buffer
+ * without transformation but handling color format or opacity.
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] dsc Image descriptor
+ * @param[in] cf Color format
+ */
+static void lv_pxp_blit_cf(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ lv_color_t color, lv_opa_t opa)
+{
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+
+ lv_gpu_nxp_pxp_reset();
+
+ /*OUT buffer configure*/
+ pxp_output_buffer_config_t outputConfig = {
+ .pixelFormat = PXP_OUT_PIXEL_FORMAT,
+ .interlacedMode = kPXP_OutputProgressive,
+ .buffer0Addr = (uint32_t)(dest_buf + dest_stride * dest_area->y1 + dest_area->x1),
+ .buffer1Addr = (uint32_t)NULL,
+ .pitchBytes = dest_stride * sizeof(lv_color_t),
+ .width = dest_w,
+ .height = dest_h
+ };
+
+ PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputConfig);
+
+ if(opa >= (lv_opa_t)LV_OPA_MAX) {
+ /*Simple color fill without opacity - AS disabled*/
+ PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
+
+ }
+ else {
+ /*Fill with opacity - AS used as source (same as OUT)*/
+ pxp_as_buffer_config_t asBufferConfig = {
+ .pixelFormat = PXP_AS_PIXEL_FORMAT,
+ .bufferAddr = (uint32_t)outputConfig.buffer0Addr,
+ .pitchBytes = outputConfig.pitchBytes
+ };
+
+ PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
+ PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, dest_w - 1U, dest_h - 1U);
+ }
+
+ /*Disable PS, use as color generator*/
+ PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
+ PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color));
+
+ /**
+ * Configure Porter-Duff blending - src settings are unused for fill without opacity (opa = 0xff).
+ *
+ * Note: srcFactorMode and dstFactorMode are inverted in fsl_pxp.h:
+ * srcFactorMode is actually applied on PS alpha value
+ * dstFactorMode is actually applied on AS alpha value
+ */
+ pxp_porter_duff_config_t pdConfig = {
+ .enable = 1,
+ .dstColorMode = kPXP_PorterDuffColorNoAlpha,
+ .srcColorMode = kPXP_PorterDuffColorNoAlpha,
+ .dstGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha,
+ .srcGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha,
+ .dstFactorMode = kPXP_PorterDuffFactorStraight,
+ .srcFactorMode = (opa >= (lv_opa_t)LV_OPA_MAX) ? kPXP_PorterDuffFactorStraight : kPXP_PorterDuffFactorInversed,
+ .dstGlobalAlpha = opa,
+ .srcGlobalAlpha = opa,
+ .dstAlphaMode = kPXP_PorterDuffAlphaStraight, /*don't care*/
+ .srcAlphaMode = kPXP_PorterDuffAlphaStraight /*don't care*/
+ };
+
+ PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig);
+
+ lv_gpu_nxp_pxp_run();
+}
+
+void lv_gpu_nxp_pxp_blit(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa, lv_disp_rot_t angle)
+{
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t src_w = lv_area_get_width(src_area);
+ lv_coord_t src_h = lv_area_get_height(src_area);
+
+ lv_gpu_nxp_pxp_reset();
+
+ /* convert rotation angle */
+ pxp_rotate_degree_t pxp_rot;
+ switch(angle) {
+ case LV_DISP_ROT_NONE:
+ pxp_rot = kPXP_Rotate0;
+ break;
+ case LV_DISP_ROT_90:
+ pxp_rot = kPXP_Rotate90;
+ break;
+ case LV_DISP_ROT_180:
+ pxp_rot = kPXP_Rotate180;
+ break;
+ case LV_DISP_ROT_270:
+ pxp_rot = kPXP_Rotate270;
+ break;
+ default:
+ pxp_rot = kPXP_Rotate0;
+ break;
+ }
+ PXP_SetRotateConfig(LV_GPU_NXP_PXP_ID, kPXP_RotateOutputBuffer, pxp_rot, kPXP_FlipDisable);
+
+ pxp_as_blend_config_t asBlendConfig = {
+ .alpha = opa,
+ .invertAlpha = false,
+ .alphaMode = kPXP_AlphaRop,
+ .ropMode = kPXP_RopMergeAs
+ };
+
+ if(opa >= (lv_opa_t)LV_OPA_MAX) {
+ /*Simple blit, no effect - Disable PS buffer*/
+ PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
+ }
+ else {
+ pxp_ps_buffer_config_t psBufferConfig = {
+ .pixelFormat = PXP_PS_PIXEL_FORMAT,
+ .swapByte = false,
+ .bufferAddr = (uint32_t)(dest_buf + dest_stride * dest_area->y1 + dest_area->x1),
+ .bufferAddrU = 0U,
+ .bufferAddrV = 0U,
+ .pitchBytes = dest_stride * sizeof(lv_color_t)
+ };
+
+ asBlendConfig.alphaMode = kPXP_AlphaOverride;
+
+ PXP_SetProcessSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &psBufferConfig);
+ PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, dest_w - 1U, dest_h - 1U);
+ }
+
+ /*AS buffer - source image*/
+ pxp_as_buffer_config_t asBufferConfig = {
+ .pixelFormat = PXP_AS_PIXEL_FORMAT,
+ .bufferAddr = (uint32_t)(src_buf + src_stride * src_area->y1 + src_area->x1),
+ .pitchBytes = src_stride * sizeof(lv_color_t)
+ };
+ PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
+ PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, src_w - 1U, src_h - 1U);
+ PXP_SetAlphaSurfaceBlendConfig(LV_GPU_NXP_PXP_ID, &asBlendConfig);
+ PXP_EnableAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, false);
+
+ /*Output buffer.*/
+ pxp_output_buffer_config_t outputBufferConfig = {
+ .pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT,
+ .interlacedMode = kPXP_OutputProgressive,
+ .buffer0Addr = (uint32_t)(dest_buf + dest_stride * dest_area->y1 + dest_area->x1),
+ .buffer1Addr = (uint32_t)0U,
+ .pitchBytes = dest_stride * sizeof(lv_color_t),
+ .width = dest_w,
+ .height = dest_h
+ };
+ PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig);
+
+ lv_gpu_nxp_pxp_run();
+}
+
+void lv_gpu_nxp_pxp_blit_transform(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf)
+{
+ bool has_recolor = (dsc->recolor_opa != LV_OPA_TRANSP);
+ bool has_rotation = (dsc->angle != 0);
+
+ if(has_recolor || has_rotation) {
+ if(dsc->opa >= (lv_opa_t)LV_OPA_MAX && !lv_img_cf_has_alpha(cf) && !lv_img_cf_is_chroma_keyed(cf)) {
+ lv_pxp_blit_cover(dest_buf, dest_area, dest_stride, src_buf, src_area, src_stride, dsc, cf);
+ return;
+ }
+ else {
+ /*Recolor and/or rotation with alpha or opacity is done in two steps.*/
+ lv_pxp_blit_opa(dest_buf, dest_area, dest_stride, src_buf, src_area, src_stride, dsc, cf);
+ return;
+ }
+ }
+
+ lv_pxp_blit_cf(dest_buf, dest_area, dest_stride, src_buf, src_area, src_stride, dsc, cf);
+}
+
+void lv_gpu_nxp_pxp_buffer_copy(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride)
+{
+ lv_coord_t src_width = lv_area_get_width(src_area);
+ lv_coord_t src_height = lv_area_get_height(src_area);
+
+ lv_gpu_nxp_pxp_reset();
+
+ const pxp_pic_copy_config_t picCopyConfig = {
+ .srcPicBaseAddr = (uint32_t)src_buf,
+ .srcPitchBytes = src_stride * sizeof(lv_color_t),
+ .srcOffsetX = src_area->x1,
+ .srcOffsetY = src_area->y1,
+ .destPicBaseAddr = (uint32_t)dest_buf,
+ .destPitchBytes = dest_stride * sizeof(lv_color_t),
+ .destOffsetX = dest_area->x1,
+ .destOffsetY = dest_area->y1,
+ .width = src_width,
+ .height = src_height,
+ .pixelFormat = PXP_AS_PIXEL_FORMAT
+ };
+
+ PXP_StartPictureCopy(LV_GPU_NXP_PXP_ID, &picCopyConfig);
+
+ lv_gpu_nxp_pxp_wait();
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void lv_pxp_blit_opa(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf)
+{
+ lv_area_t temp_area;
+ lv_area_copy(&temp_area, dest_area);
+ lv_coord_t temp_stride = dest_stride;
+ lv_coord_t temp_w = lv_area_get_width(&temp_area);
+ lv_coord_t temp_h = lv_area_get_height(&temp_area);
+
+ /*Step 1: Transform with full opacity to temporary buffer*/
+ lv_pxp_blit_cover((lv_color_t *)temp_buf, &temp_area, temp_stride, src_buf, src_area, src_stride, dsc, cf);
+
+ /*Switch width and height if angle requires it*/
+ if(dsc->angle == 900 || dsc->angle == 2700) {
+ temp_area.x2 = temp_area.x1 + temp_h - 1;
+ temp_area.y2 = temp_area.y1 + temp_w - 1;
+ }
+
+ /*Step 2: Blit temporary result with required opacity to output*/
+ lv_pxp_blit_cf(dest_buf, &temp_area, dest_stride, (lv_color_t *)temp_buf, &temp_area, temp_stride, dsc, cf);
+}
+static void lv_pxp_blit_cover(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf)
+{
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t src_w = lv_area_get_width(src_area);
+ lv_coord_t src_h = lv_area_get_height(src_area);
+
+ bool has_recolor = (dsc->recolor_opa != LV_OPA_TRANSP);
+ bool has_rotation = (dsc->angle != 0);
+
+ lv_point_t pivot = dsc->pivot;
+ lv_coord_t piv_offset_x;
+ lv_coord_t piv_offset_y;
+
+ lv_gpu_nxp_pxp_reset();
+
+ if(has_rotation) {
+ /*Convert rotation angle and calculate offsets caused by pivot*/
+ pxp_rotate_degree_t pxp_angle;
+ switch(dsc->angle) {
+ case 0:
+ pxp_angle = kPXP_Rotate0;
+ piv_offset_x = 0;
+ piv_offset_y = 0;
+ break;
+ case 900:
+ piv_offset_x = pivot.x + pivot.y - dest_h;
+ piv_offset_y = pivot.y - pivot.x;
+ pxp_angle = kPXP_Rotate90;
+ break;
+ case 1800:
+ piv_offset_x = 2 * pivot.x - dest_w;
+ piv_offset_y = 2 * pivot.y - dest_h;
+ pxp_angle = kPXP_Rotate180;
+ break;
+ case 2700:
+ piv_offset_x = pivot.x - pivot.y;
+ piv_offset_y = pivot.x + pivot.y - dest_w;
+ pxp_angle = kPXP_Rotate270;
+ break;
+ default:
+ piv_offset_x = 0;
+ piv_offset_y = 0;
+ pxp_angle = kPXP_Rotate0;
+ }
+ PXP_SetRotateConfig(LV_GPU_NXP_PXP_ID, kPXP_RotateOutputBuffer, pxp_angle, kPXP_FlipDisable);
+ lv_area_move(dest_area, piv_offset_x, piv_offset_y);
+ }
+
+ /*AS buffer - source image*/
+ pxp_as_buffer_config_t asBufferConfig = {
+ .pixelFormat = PXP_AS_PIXEL_FORMAT,
+ .bufferAddr = (uint32_t)(src_buf + src_stride * src_area->y1 + src_area->x1),
+ .pitchBytes = src_stride * sizeof(lv_color_t)
+ };
+ PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
+ PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, src_w - 1U, src_h - 1U);
+
+ /*Disable PS buffer*/
+ PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
+ if(has_recolor)
+ /*Use as color generator*/
+ PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(dsc->recolor));
+
+ /*Output buffer*/
+ pxp_output_buffer_config_t outputBufferConfig = {
+ .pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT,
+ .interlacedMode = kPXP_OutputProgressive,
+ .buffer0Addr = (uint32_t)(dest_buf + dest_stride * dest_area->y1 + dest_area->x1),
+ .buffer1Addr = (uint32_t)0U,
+ .pitchBytes = dest_stride * sizeof(lv_color_t),
+ .width = dest_w,
+ .height = dest_h
+ };
+ PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig);
+
+ if(has_recolor || lv_img_cf_has_alpha(cf)) {
+ /**
+ * Configure Porter-Duff blending.
+ *
+ * Note: srcFactorMode and dstFactorMode are inverted in fsl_pxp.h:
+ * srcFactorMode is actually applied on PS alpha value
+ * dstFactorMode is actually applied on AS alpha value
+ */
+ pxp_porter_duff_config_t pdConfig = {
+ .enable = 1,
+ .dstColorMode = kPXP_PorterDuffColorWithAlpha,
+ .srcColorMode = kPXP_PorterDuffColorNoAlpha,
+ .dstGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha,
+ .srcGlobalAlphaMode = lv_img_cf_has_alpha(cf) ? kPXP_PorterDuffLocalAlpha : kPXP_PorterDuffGlobalAlpha,
+ .dstFactorMode = kPXP_PorterDuffFactorStraight,
+ .srcFactorMode = kPXP_PorterDuffFactorInversed,
+ .dstGlobalAlpha = has_recolor ? dsc->recolor_opa : 0x00,
+ .srcGlobalAlpha = 0xff,
+ .dstAlphaMode = kPXP_PorterDuffAlphaStraight, /*don't care*/
+ .srcAlphaMode = kPXP_PorterDuffAlphaStraight
+ };
+ PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig);
+ }
+
+ lv_gpu_nxp_pxp_run();
+}
+
+static void lv_pxp_blit_cf(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf)
+{
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t src_w = lv_area_get_width(src_area);
+ lv_coord_t src_h = lv_area_get_height(src_area);
+
+ lv_gpu_nxp_pxp_reset();
+
+ pxp_as_blend_config_t asBlendConfig = {
+ .alpha = dsc->opa,
+ .invertAlpha = false,
+ .alphaMode = kPXP_AlphaRop,
+ .ropMode = kPXP_RopMergeAs
+ };
+
+ if(dsc->opa >= (lv_opa_t)LV_OPA_MAX && !lv_img_cf_is_chroma_keyed(cf) && !lv_img_cf_has_alpha(cf)) {
+ /*Simple blit, no effect - Disable PS buffer*/
+ PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
+ }
+ else {
+ /*PS must be enabled to fetch background pixels.
+ PS and OUT buffers are the same, blend will be done in-place*/
+ pxp_ps_buffer_config_t psBufferConfig = {
+ .pixelFormat = PXP_PS_PIXEL_FORMAT,
+ .swapByte = false,
+ .bufferAddr = (uint32_t)(dest_buf + dest_stride * dest_area->y1 + dest_area->x1),
+ .bufferAddrU = 0U,
+ .bufferAddrV = 0U,
+ .pitchBytes = dest_stride * sizeof(lv_color_t)
+ };
+ if(dsc->opa >= (lv_opa_t)LV_OPA_MAX) {
+ asBlendConfig.alphaMode = lv_img_cf_has_alpha(cf) ? kPXP_AlphaEmbedded : kPXP_AlphaOverride;
+ }
+ else {
+ asBlendConfig.alphaMode = lv_img_cf_has_alpha(cf) ? kPXP_AlphaMultiply : kPXP_AlphaOverride;
+ }
+ PXP_SetProcessSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &psBufferConfig);
+ PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, dest_w - 1U, dest_h - 1U);
+ }
+
+ /*AS buffer - source image*/
+ pxp_as_buffer_config_t asBufferConfig = {
+ .pixelFormat = PXP_AS_PIXEL_FORMAT,
+ .bufferAddr = (uint32_t)(src_buf + src_stride * src_area->y1 + src_area->x1),
+ .pitchBytes = src_stride * sizeof(lv_color_t)
+ };
+ PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
+ PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, src_w - 1U, src_h - 1U);
+ PXP_SetAlphaSurfaceBlendConfig(LV_GPU_NXP_PXP_ID, &asBlendConfig);
+
+ if(lv_img_cf_is_chroma_keyed(cf)) {
+ lv_color_t colorKeyLow = LV_COLOR_CHROMA_KEY;
+ lv_color_t colorKeyHigh = LV_COLOR_CHROMA_KEY;
+
+ bool has_recolor = (dsc->recolor_opa != LV_OPA_TRANSP);
+
+ if(has_recolor) {
+ /* New color key after recoloring */
+ lv_color_t colorKey = lv_color_mix(dsc->recolor, LV_COLOR_CHROMA_KEY, dsc->recolor_opa);
+
+ LV_COLOR_SET_R(colorKeyLow, colorKey.ch.red != 0 ? colorKey.ch.red - 1 : 0);
+ LV_COLOR_SET_G(colorKeyLow, colorKey.ch.green != 0 ? colorKey.ch.green - 1 : 0);
+ LV_COLOR_SET_B(colorKeyLow, colorKey.ch.blue != 0 ? colorKey.ch.blue - 1 : 0);
+
+#if LV_COLOR_DEPTH == 16
+ LV_COLOR_SET_R(colorKeyHigh, colorKey.ch.red != 0x1f ? colorKey.ch.red + 1 : 0x1f);
+ LV_COLOR_SET_G(colorKeyHigh, colorKey.ch.green != 0x3f ? colorKey.ch.green + 1 : 0x3f);
+ LV_COLOR_SET_B(colorKeyHigh, colorKey.ch.blue != 0x1f ? colorKey.ch.blue + 1 : 0x1f);
+#else /*LV_COLOR_DEPTH == 32*/
+ LV_COLOR_SET_R(colorKeyHigh, colorKey.ch.red != 0xff ? colorKey.ch.red + 1 : 0xff);
+ LV_COLOR_SET_G(colorKeyHigh, colorKey.ch.green != 0xff ? colorKey.ch.green + 1 : 0xff);
+ LV_COLOR_SET_B(colorKeyHigh, colorKey.ch.blue != 0xff ? colorKey.ch.blue + 1 : 0xff);
+#endif
+ }
+
+ PXP_SetAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, lv_color_to32(colorKeyLow),
+ lv_color_to32(colorKeyHigh));
+ }
+
+ PXP_EnableAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, lv_img_cf_is_chroma_keyed(cf));
+
+ /*Output buffer.*/
+ pxp_output_buffer_config_t outputBufferConfig = {
+ .pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT,
+ .interlacedMode = kPXP_OutputProgressive,
+ .buffer0Addr = (uint32_t)(dest_buf + dest_stride * dest_area->y1 + dest_area->x1),
+ .buffer1Addr = (uint32_t)0U,
+ .pitchBytes = dest_stride * sizeof(lv_color_t),
+ .width = dest_w,
+ .height = dest_h
+ };
+ PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig);
+
+ lv_gpu_nxp_pxp_run();
+}
+
+#endif /*LV_USE_GPU_NXP_PXP*/
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.h b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.h
new file mode 100644
index 0000000..9615667
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.h
@@ -0,0 +1,130 @@
+/**
+ * @file lv_draw_pxp_blend.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2020-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_PXP_BLEND_H
+#define LV_DRAW_PXP_BLEND_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_PXP
+#include "lv_gpu_nxp_pxp.h"
+#include "../../sw/lv_draw_sw.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Fill area, with optional opacity.
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] color Color
+ * @param[in] opa Opacity
+ */
+void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ lv_color_t color, lv_opa_t opa);
+
+/**
+ * BLock Image Transfer - copy rectangular image from src_buf to dst_buf with effects.
+ * By default, image is copied directly, with optional opacity. This function can also
+ * rotate the display output buffer to a specified angle (90x step).
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] opa Opacity
+ * @param[in] angle Display rotation angle (90x)
+ */
+void lv_gpu_nxp_pxp_blit(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa, lv_disp_rot_t angle);
+
+/**
+ * BLock Image Transfer - copy rectangular image from src_buf to dst_buf with transformation.
+ *
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] dsc Image descriptor
+ * @param[in] cf Color format
+ */
+void lv_gpu_nxp_pxp_blit_transform(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc, lv_img_cf_t cf);
+
+/**
+ * BLock Image Transfer - copy rectangular image from src_buf to dst_buf, no transformation or blending.
+ *
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ */
+void lv_gpu_nxp_pxp_buffer_copy(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_PXP*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_PXP_BLEND_H*/
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp.c b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp.c
new file mode 100644
index 0000000..164216f
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp.c
@@ -0,0 +1,138 @@
+/**
+ * @file lv_gpu_nxp_pxp.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2020-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_gpu_nxp_pxp.h"
+
+#if LV_USE_GPU_NXP_PXP
+#include "lv_gpu_nxp_pxp_osa.h"
+#include "../../../core/lv_refr.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**
+ * Clean and invalidate cache.
+ */
+static inline void invalidate_cache(void);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+static lv_nxp_pxp_cfg_t * pxp_cfg;
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_gpu_nxp_pxp_init(void)
+{
+#if LV_USE_GPU_NXP_PXP_AUTO_INIT
+ pxp_cfg = lv_gpu_nxp_pxp_get_cfg();
+#endif
+
+ if(!pxp_cfg || !pxp_cfg->pxp_interrupt_deinit || !pxp_cfg->pxp_interrupt_init ||
+ !pxp_cfg->pxp_run || !pxp_cfg->pxp_wait)
+ PXP_RETURN_INV("PXP configuration error.");
+
+ PXP_Init(LV_GPU_NXP_PXP_ID);
+
+ PXP_EnableCsc1(LV_GPU_NXP_PXP_ID, false); /*Disable CSC1, it is enabled by default.*/
+ PXP_SetProcessBlockSize(LV_GPU_NXP_PXP_ID, kPXP_BlockSize16); /*Block size 16x16 for higher performance*/
+
+ PXP_EnableInterrupts(LV_GPU_NXP_PXP_ID, kPXP_CompleteInterruptEnable);
+
+ if(pxp_cfg->pxp_interrupt_init() != LV_RES_OK) {
+ PXP_DisableInterrupts(LV_GPU_NXP_PXP_ID, kPXP_CompleteInterruptEnable);
+ PXP_Deinit(LV_GPU_NXP_PXP_ID);
+ PXP_RETURN_INV("PXP interrupt init failed.");
+ }
+
+ return LV_RES_OK;
+}
+
+void lv_gpu_nxp_pxp_deinit(void)
+{
+ pxp_cfg->pxp_interrupt_deinit();
+ PXP_DisableInterrupts(LV_GPU_NXP_PXP_ID, kPXP_CompleteInterruptEnable);
+ PXP_Deinit(LV_GPU_NXP_PXP_ID);
+}
+
+void lv_gpu_nxp_pxp_reset(void)
+{
+ /* Wait for previous command to complete before resetting the registers. */
+ lv_gpu_nxp_pxp_wait();
+
+ PXP_ResetControl(LV_GPU_NXP_PXP_ID);
+
+ PXP_EnableCsc1(LV_GPU_NXP_PXP_ID, false); /*Disable CSC1, it is enabled by default.*/
+ PXP_SetProcessBlockSize(LV_GPU_NXP_PXP_ID, kPXP_BlockSize16); /*Block size 16x16 for higher performance*/
+}
+
+void lv_gpu_nxp_pxp_run(void)
+{
+ invalidate_cache();
+
+ pxp_cfg->pxp_run();
+}
+
+void lv_gpu_nxp_pxp_wait(void)
+{
+ pxp_cfg->pxp_wait();
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static inline void invalidate_cache(void)
+{
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ if(disp->driver->clean_dcache_cb)
+ disp->driver->clean_dcache_cb(disp->driver);
+}
+
+#endif /*LV_USE_GPU_NXP_PXP*/
diff --git a/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp.h b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp.h
new file mode 100644
index 0000000..46f4a0b
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp.h
@@ -0,0 +1,166 @@
+/**
+ * @file lv_gpu_nxp_pxp.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2020-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_GPU_NXP_PXP_H
+#define LV_GPU_NXP_PXP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_PXP
+#include "fsl_cache.h"
+#include "fsl_pxp.h"
+
+#include "../../../misc/lv_log.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/** PXP module instance to use*/
+#define LV_GPU_NXP_PXP_ID PXP
+
+/** PXP interrupt line ID*/
+#define LV_GPU_NXP_PXP_IRQ_ID PXP_IRQn
+
+#ifndef LV_GPU_NXP_PXP_LOG_ERRORS
+/** Enable logging of PXP errors (\see LV_LOG_ERROR)*/
+#define LV_GPU_NXP_PXP_LOG_ERRORS 1
+#endif
+
+#ifndef LV_GPU_NXP_PXP_LOG_TRACES
+/** Enable logging of PXP errors (\see LV_LOG_ERROR)*/
+#define LV_GPU_NXP_PXP_LOG_TRACES 0
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**
+ * NXP PXP device configuration - call-backs used for
+ * interrupt init/wait/deinit.
+ */
+typedef struct {
+ /** Callback for PXP interrupt initialization*/
+ lv_res_t (*pxp_interrupt_init)(void);
+
+ /** Callback for PXP interrupt de-initialization*/
+ void (*pxp_interrupt_deinit)(void);
+
+ /** Callback for PXP start*/
+ void (*pxp_run)(void);
+
+ /** Callback for waiting of PXP completion*/
+ void (*pxp_wait)(void);
+} lv_nxp_pxp_cfg_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Reset and initialize PXP device. This function should be called as a part
+ * of display init sequence.
+ *
+ * @retval LV_RES_OK PXP init completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_PXP_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_pxp_init(void);
+
+/**
+ * Disable PXP device. Should be called during display deinit sequence.
+ */
+void lv_gpu_nxp_pxp_deinit(void);
+
+/**
+ * Reset PXP device.
+ */
+void lv_gpu_nxp_pxp_reset(void);
+
+/**
+ * Clear cache and start PXP.
+ */
+void lv_gpu_nxp_pxp_run(void);
+
+/**
+ * Wait for PXP completion.
+ */
+void lv_gpu_nxp_pxp_wait(void);
+
+/**********************
+ * MACROS
+ **********************/
+
+#define PXP_COND_STOP(cond, txt) \
+ do { \
+ if (cond) { \
+ LV_LOG_ERROR("%s. STOP!", txt); \
+ for ( ; ; ); \
+ } \
+ } while(0)
+
+#if LV_GPU_NXP_PXP_LOG_ERRORS
+#define PXP_RETURN_INV(fmt, ...) \
+ do { \
+ LV_LOG_ERROR(fmt, ##__VA_ARGS__); \
+ return LV_RES_INV; \
+ } while (0)
+#else
+#define PXP_RETURN_INV(fmt, ...) \
+ do { \
+ return LV_RES_INV; \
+ }while(0)
+#endif /*LV_GPU_NXP_PXP_LOG_ERRORS*/
+
+#if LV_GPU_NXP_PXP_LOG_TRACES
+#define PXP_LOG_TRACE(fmt, ...) \
+ do { \
+ LV_LOG(fmt, ##__VA_ARGS__); \
+ } while (0)
+#else
+#define PXP_LOG_TRACE(fmt, ...) \
+ do { \
+ } while (0)
+#endif /*LV_GPU_NXP_PXP_LOG_TRACES*/
+
+#endif /*LV_USE_GPU_NXP_PXP*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_GPU_NXP_PXP_H*/
diff --git a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp_osa.c b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp_osa.c
similarity index 71%
rename from lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp_osa.c
rename to lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp_osa.c
index 1203434..b094928 100644
--- a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp_osa.c
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp_osa.c
@@ -6,7 +6,7 @@
/**
* MIT License
*
- * Copyright (c) 2020 NXP
+ * Copyright 2020, 2022, 2023 NXP
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -32,11 +32,9 @@
*********************/
#include "lv_gpu_nxp_pxp_osa.h"
+
#if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT
-#include "../misc/lv_log.h"
-
-
-#include "lv_gpu_nxp_pxp.h"
+#include "../../../misc/lv_log.h"
#include "fsl_pxp.h"
#if defined(SDK_OS_FREE_RTOS)
@@ -44,6 +42,10 @@
#include "semphr.h"
#endif
+#if defined(__ZEPHYR__)
+ #include
+#endif
+
/*********************
* DEFINES
*********************/
@@ -55,19 +57,45 @@
/**********************
* STATIC PROTOTYPES
**********************/
+
+/**
+ * PXP interrupt initialization.
+ */
static lv_res_t _lv_gpu_nxp_pxp_interrupt_init(void);
+
+/**
+ * PXP interrupt de-initialization.
+ */
static void _lv_gpu_nxp_pxp_interrupt_deinit(void);
+
+/**
+ * Start the PXP job.
+ */
static void _lv_gpu_nxp_pxp_run(void);
+/**
+ * Wait for PXP completion.
+ */
+static void _lv_gpu_nxp_pxp_wait(void);
+
/**********************
* STATIC VARIABLES
**********************/
#if defined(SDK_OS_FREE_RTOS)
- static SemaphoreHandle_t s_pxpIdle;
-#else
- static volatile bool s_pxpIdle;
+ static SemaphoreHandle_t s_pxpIdleSem;
#endif
+#if defined(__ZEPHYR__)
+ static K_SEM_DEFINE(s_pxpIdleSem, 0, 1);
+#endif
+static volatile bool s_pxpIdle;
+
+static lv_nxp_pxp_cfg_t pxp_default_cfg = {
+ .pxp_interrupt_init = _lv_gpu_nxp_pxp_interrupt_init,
+ .pxp_interrupt_deinit = _lv_gpu_nxp_pxp_interrupt_deinit,
+ .pxp_run = _lv_gpu_nxp_pxp_run,
+ .pxp_wait = _lv_gpu_nxp_pxp_wait,
+};
/**********************
* MACROS
@@ -77,9 +105,6 @@ static void _lv_gpu_nxp_pxp_run(void);
* GLOBAL FUNCTIONS
**********************/
-/**
- * PXP device interrupt handler. Used to check PXP task completion status.
- */
void PXP_IRQHandler(void)
{
#if defined(SDK_OS_FREE_RTOS)
@@ -89,78 +114,82 @@ void PXP_IRQHandler(void)
if(kPXP_CompleteFlag & PXP_GetStatusFlags(LV_GPU_NXP_PXP_ID)) {
PXP_ClearStatusFlags(LV_GPU_NXP_PXP_ID, kPXP_CompleteFlag);
#if defined(SDK_OS_FREE_RTOS)
- xSemaphoreGiveFromISR(s_pxpIdle, &taskAwake);
+ xSemaphoreGiveFromISR(s_pxpIdleSem, &taskAwake);
portYIELD_FROM_ISR(taskAwake);
+#elif defined(__ZEPHYR__)
+ k_sem_give(&s_pxpIdleSem);
#else
s_pxpIdle = true;
#endif
-
}
}
+lv_nxp_pxp_cfg_t * lv_gpu_nxp_pxp_get_cfg(void)
+{
+ return &pxp_default_cfg;
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
-/**
- * PXP interrupt initialization.
- */
static lv_res_t _lv_gpu_nxp_pxp_interrupt_init(void)
{
#if defined(SDK_OS_FREE_RTOS)
- s_pxpIdle = xSemaphoreCreateBinary();
- if(s_pxpIdle == NULL) {
+ s_pxpIdleSem = xSemaphoreCreateBinary();
+ if(s_pxpIdleSem == NULL)
return LV_RES_INV;
- }
NVIC_SetPriority(LV_GPU_NXP_PXP_IRQ_ID, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1);
-#else
- s_pxpIdle = true;
#endif
+ s_pxpIdle = true;
NVIC_EnableIRQ(LV_GPU_NXP_PXP_IRQ_ID);
return LV_RES_OK;
}
-/**
- * PXP interrupt de-initialization.
- */
static void _lv_gpu_nxp_pxp_interrupt_deinit(void)
{
NVIC_DisableIRQ(LV_GPU_NXP_PXP_IRQ_ID);
#if defined(SDK_OS_FREE_RTOS)
- vSemaphoreDelete(s_pxpIdle);
+ vSemaphoreDelete(s_pxpIdleSem);
+#elif defined(__ZEPHYR__)
+ k_sem_reset(&s_pxpIdleSem);
#endif
}
/**
- * Function to start PXP job. This function must wait for task complete.
+ * Function to start PXP job.
*/
static void _lv_gpu_nxp_pxp_run(void)
{
-#if !defined(SDK_OS_FREE_RTOS)
s_pxpIdle = false;
-#endif
PXP_EnableInterrupts(LV_GPU_NXP_PXP_ID, kPXP_CompleteInterruptEnable);
PXP_Start(LV_GPU_NXP_PXP_ID);
+}
-#if defined(SDK_OS_FREE_RTOS)
- if(xSemaphoreTake(s_pxpIdle, portMAX_DELAY) != pdTRUE) {
- LV_LOG_ERROR("xSemaphoreTake error. Task halted.");
- for(; ;) ;
- }
+/**
+ * Function to wait for PXP completion.
+ */
+static void _lv_gpu_nxp_pxp_wait(void)
+{
+#if defined(SDK_OS_FREE_RTOS) || defined(__ZEPHYR__)
+ /* Return if PXP was never started, otherwise the semaphore will lock forever. */
+ if(s_pxpIdle == true)
+ return;
+#endif
+#if defined (SDK_OS_FREE_RTOS)
+ if(xSemaphoreTake(s_pxpIdleSem, portMAX_DELAY) == pdTRUE)
+ s_pxpIdle = true;
+#elif defined(__ZEPHYR__)
+ if(k_sem_take(&s_pxpIdleSem, K_FOREVER) == 0)
+ s_pxpIdle = true;
#else
while(s_pxpIdle == false) {
}
#endif
}
-lv_nxp_pxp_cfg_t pxp_default_cfg = {
- .pxp_interrupt_init = _lv_gpu_nxp_pxp_interrupt_init,
- .pxp_interrupt_deinit = _lv_gpu_nxp_pxp_interrupt_deinit,
- .pxp_run = _lv_gpu_nxp_pxp_run
-};
-
#endif /*LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT*/
diff --git a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp_osa.h b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp_osa.h
similarity index 62%
rename from lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp_osa.h
rename to lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp_osa.h
index 89524da..5c87824 100644
--- a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp_osa.h
+++ b/lib/lvgl/src/draw/nxp/pxp/lv_gpu_nxp_pxp_osa.h
@@ -6,7 +6,7 @@
/**
* MIT License
*
- * Copyright (c) 2020 NXP
+ * Copyright 2020, 2022 NXP
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -27,21 +27,52 @@
*
*/
-#ifndef LV_SRC_LV_GPU_LV_GPU_NXP_PXP_OSA_H_
-#define LV_SRC_LV_GPU_LV_GPU_NXP_PXP_OSA_H_
+#ifndef LV_GPU_NXP_PXP_OSA_H
+#define LV_GPU_NXP_PXP_OSA_H
#ifdef __cplusplus
extern "C" {
#endif
-#include "../../lv_conf_internal.h"
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "../../../lv_conf_internal.h"
#if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT
-extern lv_nxp_pxp_cfg_t pxp_default_cfg;
-#endif
+#include "lv_gpu_nxp_pxp.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * PXP device interrupt handler. Used to check PXP task completion status.
+ */
+void PXP_IRQHandler(void);
+
+/**
+ * Helper function to get the PXP default configuration.
+ */
+lv_nxp_pxp_cfg_t * lv_gpu_nxp_pxp_get_cfg(void);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT*/
#ifdef __cplusplus
} /*extern "C"*/
#endif
-#endif /*LV_SRC_LV_GPU_LV_GPU_NXP_PXP_OSA_H_*/
+#endif /*LV_GPU_NXP_PXP_OSA_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_nxp_vglite.mk b/lib/lvgl/src/draw/nxp/vglite/lv_draw_nxp_vglite.mk
new file mode 100644
index 0000000..c9473cc
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_nxp_vglite.mk
@@ -0,0 +1,12 @@
+CSRCS += lv_draw_vglite.c
+CSRCS += lv_draw_vglite_arc.c
+CSRCS += lv_draw_vglite_blend.c
+CSRCS += lv_draw_vglite_line.c
+CSRCS += lv_draw_vglite_rect.c
+CSRCS += lv_vglite_buf.c
+CSRCS += lv_vglite_utils.c
+
+DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite
+VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite
+
+CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite"
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c
new file mode 100644
index 0000000..031f57e
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c
@@ -0,0 +1,557 @@
+/**
+ * @file lv_draw_vglite.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_vglite.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include
+#include "lv_draw_vglite_blend.h"
+#include "lv_draw_vglite_line.h"
+#include "lv_draw_vglite_rect.h"
+#include "lv_draw_vglite_arc.h"
+#include "lv_vglite_buf.h"
+
+#if LV_COLOR_DEPTH != 32
+ #include "../../../core/lv_refr.h"
+#endif
+
+/*********************
+ * DEFINES
+ *********************/
+
+/* Minimum area (in pixels) for VG-Lite blit/fill processing. */
+#ifndef LV_GPU_NXP_VG_LITE_SIZE_LIMIT
+ #define LV_GPU_NXP_VG_LITE_SIZE_LIMIT 5000
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static void lv_draw_vglite_init_buf(lv_draw_ctx_t * draw_ctx);
+
+static void lv_draw_vglite_wait_for_finish(lv_draw_ctx_t * draw_ctx);
+
+static void lv_draw_vglite_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t cf);
+
+static void lv_draw_vglite_buffer_copy(lv_draw_ctx_t * draw_ctx,
+ void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
+ void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area);
+
+static void lv_draw_vglite_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+
+static void lv_draw_vglite_line(lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, const lv_point_t * point1,
+ const lv_point_t * point2);
+
+static void lv_draw_vglite_rect(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords);
+
+static lv_res_t lv_draw_vglite_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords);
+
+static lv_res_t lv_draw_vglite_border(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
+ const lv_area_t * coords);
+
+static lv_res_t lv_draw_vglite_outline(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
+ const lv_area_t * coords);
+
+static void lv_draw_vglite_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, const lv_point_t * center,
+ uint16_t radius, uint16_t start_angle, uint16_t end_angle);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_draw_vglite_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+ lv_draw_sw_init_ctx(drv, draw_ctx);
+
+ lv_draw_vglite_ctx_t * vglite_draw_ctx = (lv_draw_sw_ctx_t *)draw_ctx;
+ vglite_draw_ctx->base_draw.init_buf = lv_draw_vglite_init_buf;
+ vglite_draw_ctx->base_draw.draw_line = lv_draw_vglite_line;
+ vglite_draw_ctx->base_draw.draw_arc = lv_draw_vglite_arc;
+ vglite_draw_ctx->base_draw.draw_rect = lv_draw_vglite_rect;
+ vglite_draw_ctx->base_draw.draw_img_decoded = lv_draw_vglite_img_decoded;
+ vglite_draw_ctx->blend = lv_draw_vglite_blend;
+ vglite_draw_ctx->base_draw.wait_for_finish = lv_draw_vglite_wait_for_finish;
+ vglite_draw_ctx->base_draw.buffer_copy = lv_draw_vglite_buffer_copy;
+}
+
+void lv_draw_vglite_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+ lv_draw_sw_deinit_ctx(drv, draw_ctx);
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+/**
+ * During rendering, LVGL might initializes new draw_ctxs and start drawing into
+ * a separate buffer (called layer). If the content to be rendered has "holes",
+ * e.g. rounded corner, LVGL temporarily sets the disp_drv.screen_transp flag.
+ * It means the renderers should draw into an ARGB buffer.
+ * With 32 bit color depth it's not a big problem but with 16 bit color depth
+ * the target pixel format is ARGB8565 which is not supported by the GPU.
+ * In this case, the VG-Lite callbacks should fallback to SW rendering.
+ */
+static inline bool need_argb8565_support()
+{
+#if LV_COLOR_DEPTH != 32
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+
+ if(disp->driver->screen_transp == 1)
+ return true;
+#endif
+
+ return false;
+}
+
+static void lv_draw_vglite_init_buf(lv_draw_ctx_t * draw_ctx)
+{
+ lv_gpu_nxp_vglite_init_buf(draw_ctx->buf, draw_ctx->buf_area, lv_area_get_width(draw_ctx->buf_area));
+}
+
+static void lv_draw_vglite_wait_for_finish(lv_draw_ctx_t * draw_ctx)
+{
+ vg_lite_finish();
+
+ lv_draw_sw_wait_for_finish(draw_ctx);
+}
+
+static void lv_draw_vglite_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+{
+ if(dsc->opa <= (lv_opa_t)LV_OPA_MIN)
+ return;
+
+ if(need_argb8565_support()) {
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+ return;
+ }
+
+ lv_area_t blend_area;
+ if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area))
+ return; /*Fully clipped, nothing to do*/
+
+ lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ bool done = false;
+ /*Fill/Blend only non masked, normal blended*/
+ if(dsc->mask_buf == NULL && dsc->blend_mode == LV_BLEND_MODE_NORMAL &&
+ lv_area_get_size(&blend_area) >= LV_GPU_NXP_VG_LITE_SIZE_LIMIT) {
+ const lv_color_t * src_buf = dsc->src_buf;
+
+ if(src_buf == NULL) {
+ done = (lv_gpu_nxp_vglite_fill(&blend_area, dsc->color, dsc->opa) == LV_RES_OK);
+ if(!done)
+ VG_LITE_LOG_TRACE("VG-Lite fill failed. Fallback.");
+ }
+ else {
+ lv_area_t src_area;
+ src_area.x1 = blend_area.x1 - (dsc->blend_area->x1 - draw_ctx->buf_area->x1);
+ src_area.y1 = blend_area.y1 - (dsc->blend_area->y1 - draw_ctx->buf_area->y1);
+ src_area.x2 = src_area.x1 + lv_area_get_width(dsc->blend_area) - 1;
+ src_area.y2 = src_area.y1 + lv_area_get_height(dsc->blend_area) - 1;
+ lv_coord_t src_stride = lv_area_get_width(dsc->blend_area);
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+ lv_color_t * dest_buf = draw_ctx->buf;
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+
+ done = (lv_gpu_nxp_vglite_blit_split(dest_buf, &blend_area, dest_stride,
+ src_buf, &src_area, src_stride, dsc->opa) == LV_RES_OK);
+#else
+ done = (lv_gpu_nxp_vglite_blit(&blend_area, src_buf, &src_area, src_stride, dsc->opa) == LV_RES_OK);
+#endif
+
+ if(!done)
+ VG_LITE_LOG_TRACE("VG-Lite blit failed. Fallback.");
+ }
+ }
+
+ if(!done)
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+}
+
+static void lv_draw_vglite_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t cf)
+{
+ if(dsc->opa <= (lv_opa_t)LV_OPA_MIN)
+ return;
+
+ if(need_argb8565_support()) {
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, cf);
+ return;
+ }
+
+ const lv_color_t * src_buf = (const lv_color_t *)map_p;
+ if(!src_buf) {
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, cf);
+ return;
+ }
+
+ lv_area_t rel_coords;
+ lv_area_copy(&rel_coords, coords);
+ lv_area_move(&rel_coords, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t rel_clip_area;
+ lv_area_copy(&rel_clip_area, draw_ctx->clip_area);
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t blend_area;
+ bool has_transform = dsc->angle != 0 || dsc->zoom != LV_IMG_ZOOM_NONE;
+
+ if(has_transform)
+ lv_area_copy(&blend_area, &rel_coords);
+ else if(!_lv_area_intersect(&blend_area, &rel_coords, &rel_clip_area))
+ return; /*Fully clipped, nothing to do*/
+
+ bool has_mask = lv_draw_mask_is_any(&blend_area);
+ bool has_recolor = (dsc->recolor_opa != LV_OPA_TRANSP);
+
+ bool done = false;
+ if(!has_mask && !has_recolor && !lv_img_cf_is_chroma_keyed(cf) &&
+ lv_area_get_size(&blend_area) >= LV_GPU_NXP_VG_LITE_SIZE_LIMIT
+#if LV_COLOR_DEPTH != 32
+ && !lv_img_cf_has_alpha(cf)
+#endif
+ ) {
+ lv_area_t src_area;
+ src_area.x1 = blend_area.x1 - (coords->x1 - draw_ctx->buf_area->x1);
+ src_area.y1 = blend_area.y1 - (coords->y1 - draw_ctx->buf_area->y1);
+ src_area.x2 = src_area.x1 + lv_area_get_width(coords) - 1;
+ src_area.y2 = src_area.y1 + lv_area_get_height(coords) - 1;
+ lv_coord_t src_stride = lv_area_get_width(coords);
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+ lv_color_t * dest_buf = draw_ctx->buf;
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+
+ if(has_transform)
+ /* VG-Lite blit split with transformation is not supported! */
+ done = false;
+ else
+ done = (lv_gpu_nxp_vglite_blit_split(dest_buf, &blend_area, dest_stride,
+ src_buf, &src_area, src_stride, dsc->opa) == LV_RES_OK);
+#else
+ if(has_transform)
+ done = (lv_gpu_nxp_vglite_blit_transform(&blend_area, &rel_clip_area,
+ src_buf, &src_area, src_stride, dsc) == LV_RES_OK);
+ else
+ done = (lv_gpu_nxp_vglite_blit(&blend_area, src_buf, &src_area, src_stride, dsc->opa) == LV_RES_OK);
+#endif
+
+ if(!done)
+ VG_LITE_LOG_TRACE("VG-Lite blit %sfailed. Fallback.", has_transform ? "transform " : "");
+ }
+
+ if(!done)
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, cf);
+}
+
+static void lv_draw_vglite_buffer_copy(lv_draw_ctx_t * draw_ctx,
+ void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
+ void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area)
+{
+ bool done = false;
+
+ if(lv_area_get_size(dest_area) >= LV_GPU_NXP_VG_LITE_SIZE_LIMIT) {
+ done = lv_gpu_nxp_vglite_buffer_copy(dest_buf, dest_area, dest_stride, src_buf, src_area, src_stride);
+ if(!done)
+ VG_LITE_LOG_TRACE("VG-Lite buffer copy failed. Fallback.");
+ }
+
+ if(!done)
+ lv_draw_sw_buffer_copy(draw_ctx, dest_buf, dest_stride, dest_area, src_buf, src_stride, src_area);
+}
+
+static void lv_draw_vglite_line(lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, const lv_point_t * point1,
+ const lv_point_t * point2)
+{
+ if(dsc->width == 0)
+ return;
+ if(dsc->opa <= (lv_opa_t)LV_OPA_MIN)
+ return;
+ if(point1->x == point2->x && point1->y == point2->y)
+ return;
+
+ if(need_argb8565_support()) {
+ lv_draw_sw_line(draw_ctx, dsc, point1, point2);
+ return;
+ }
+
+ lv_area_t rel_clip_area;
+ rel_clip_area.x1 = LV_MIN(point1->x, point2->x) - dsc->width / 2;
+ rel_clip_area.x2 = LV_MAX(point1->x, point2->x) + dsc->width / 2;
+ rel_clip_area.y1 = LV_MIN(point1->y, point2->y) - dsc->width / 2;
+ rel_clip_area.y2 = LV_MAX(point1->y, point2->y) + dsc->width / 2;
+
+ lv_area_t clipped_coords;
+ if(!_lv_area_intersect(&clipped_coords, &rel_clip_area, draw_ctx->clip_area))
+ return; /*Fully clipped, nothing to do*/
+
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_point_t rel_point1 = { point1->x - draw_ctx->buf_area->x1, point1->y - draw_ctx->buf_area->y1 };
+ lv_point_t rel_point2 = { point2->x - draw_ctx->buf_area->x1, point2->y - draw_ctx->buf_area->y1 };
+
+ bool done = false;
+ bool has_mask = lv_draw_mask_is_any(&rel_clip_area);
+
+ if(!has_mask) {
+ done = (lv_gpu_nxp_vglite_draw_line(&rel_point1, &rel_point2, &rel_clip_area, dsc) == LV_RES_OK);
+ if(!done)
+ VG_LITE_LOG_TRACE("VG-Lite draw line failed. Fallback.");
+ }
+
+ if(!done)
+ lv_draw_sw_line(draw_ctx, dsc, point1, point2);
+}
+
+static void lv_draw_vglite_rect(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords)
+{
+ if(need_argb8565_support()) {
+ lv_draw_sw_rect(draw_ctx, dsc, coords);
+ return;
+ }
+
+ lv_draw_rect_dsc_t vglite_dsc;
+
+ lv_memcpy(&vglite_dsc, dsc, sizeof(vglite_dsc));
+ vglite_dsc.bg_opa = 0;
+ vglite_dsc.bg_img_opa = 0;
+ vglite_dsc.border_opa = 0;
+ vglite_dsc.outline_opa = 0;
+#if LV_DRAW_COMPLEX
+ /* Draw the shadow with CPU */
+ lv_draw_sw_rect(draw_ctx, &vglite_dsc, coords);
+ vglite_dsc.shadow_opa = 0;
+#endif /*LV_DRAW_COMPLEX*/
+
+ /* Draw the background */
+ vglite_dsc.bg_opa = dsc->bg_opa;
+ if(lv_draw_vglite_bg(draw_ctx, &vglite_dsc, coords) != LV_RES_OK)
+ lv_draw_sw_rect(draw_ctx, &vglite_dsc, coords);
+ vglite_dsc.bg_opa = 0;
+
+ /* Draw the background image
+ * It will be done once draw_ctx->draw_img_decoded()
+ * callback gets called from lv_draw_sw_rect().
+ */
+ vglite_dsc.bg_img_opa = dsc->bg_img_opa;
+ lv_draw_sw_rect(draw_ctx, &vglite_dsc, coords);
+ vglite_dsc.bg_img_opa = 0;
+
+ /* Draw the border */
+ vglite_dsc.border_opa = dsc->border_opa;
+ if(lv_draw_vglite_border(draw_ctx, &vglite_dsc, coords) != LV_RES_OK)
+ lv_draw_sw_rect(draw_ctx, &vglite_dsc, coords);
+ vglite_dsc.border_opa = 0;
+
+ /* Draw the outline */
+ vglite_dsc.outline_opa = dsc->outline_opa;
+ if(lv_draw_vglite_outline(draw_ctx, &vglite_dsc, coords) != LV_RES_OK)
+ lv_draw_sw_rect(draw_ctx, &vglite_dsc, coords);
+}
+
+static lv_res_t lv_draw_vglite_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords)
+{
+ if(dsc->bg_opa <= (lv_opa_t)LV_OPA_MIN)
+ return LV_RES_INV;
+
+ lv_area_t rel_coords;
+ lv_area_copy(&rel_coords, coords);
+
+ /*If the border fully covers make the bg area 1px smaller to avoid artifacts on the corners*/
+ if(dsc->border_width > 1 && dsc->border_opa >= (lv_opa_t)LV_OPA_MAX && dsc->radius != 0) {
+ rel_coords.x1 += (dsc->border_side & LV_BORDER_SIDE_LEFT) ? 1 : 0;
+ rel_coords.y1 += (dsc->border_side & LV_BORDER_SIDE_TOP) ? 1 : 0;
+ rel_coords.x2 -= (dsc->border_side & LV_BORDER_SIDE_RIGHT) ? 1 : 0;
+ rel_coords.y2 -= (dsc->border_side & LV_BORDER_SIDE_BOTTOM) ? 1 : 0;
+ }
+ lv_area_move(&rel_coords, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t rel_clip_area;
+ lv_area_copy(&rel_clip_area, draw_ctx->clip_area);
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t clipped_coords;
+ if(!_lv_area_intersect(&clipped_coords, &rel_coords, &rel_clip_area))
+ return LV_RES_OK; /*Fully clipped, nothing to do*/
+
+ bool has_mask = lv_draw_mask_is_any(&rel_coords);
+ lv_grad_dir_t grad_dir = dsc->bg_grad.dir;
+ lv_color_t bg_color = (grad_dir == (lv_grad_dir_t)LV_GRAD_DIR_NONE) ?
+ dsc->bg_color : dsc->bg_grad.stops[0].color;
+ if(bg_color.full == dsc->bg_grad.stops[1].color.full)
+ grad_dir = LV_GRAD_DIR_NONE;
+
+ /*
+ * Most simple case: just a plain rectangle (no mask, no radius, no gradient)
+ * shall be handled by draw_ctx->blend().
+ *
+ * Complex case: gradient or radius but no mask.
+ */
+ if(!has_mask && ((dsc->radius != 0) || (grad_dir != (lv_grad_dir_t)LV_GRAD_DIR_NONE))) {
+ lv_res_t res = lv_gpu_nxp_vglite_draw_bg(&rel_coords, &rel_clip_area, dsc);
+ if(res != LV_RES_OK)
+ VG_LITE_LOG_TRACE("VG-Lite draw bg failed. Fallback.");
+
+ return res;
+ }
+
+ return LV_RES_INV;
+}
+
+static lv_res_t lv_draw_vglite_border(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
+ const lv_area_t * coords)
+{
+ if(dsc->border_opa <= (lv_opa_t)LV_OPA_MIN)
+ return LV_RES_INV;
+ if(dsc->border_width == 0)
+ return LV_RES_INV;
+ if(dsc->border_post)
+ return LV_RES_INV;
+ if(dsc->border_side != (lv_border_side_t)LV_BORDER_SIDE_FULL)
+ return LV_RES_INV;
+
+ lv_area_t rel_coords;
+ lv_coord_t border_width = dsc->border_width;
+
+ /* Move border inwards to align with software rendered border */
+ rel_coords.x1 = coords->x1 + ceil(border_width / 2.0f);
+ rel_coords.x2 = coords->x2 - floor(border_width / 2.0f);
+ rel_coords.y1 = coords->y1 + ceil(border_width / 2.0f);
+ rel_coords.y2 = coords->y2 - floor(border_width / 2.0f);
+
+ lv_area_move(&rel_coords, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t rel_clip_area;
+ lv_area_copy(&rel_clip_area, draw_ctx->clip_area);
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t clipped_coords;
+ if(!_lv_area_intersect(&clipped_coords, &rel_coords, &rel_clip_area))
+ return LV_RES_OK; /*Fully clipped, nothing to do*/
+
+ lv_res_t res = lv_gpu_nxp_vglite_draw_border_generic(&rel_coords, &rel_clip_area, dsc, true);
+ if(res != LV_RES_OK)
+ VG_LITE_LOG_TRACE("VG-Lite draw border failed. Fallback.");
+
+ return res;
+}
+
+static lv_res_t lv_draw_vglite_outline(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
+ const lv_area_t * coords)
+{
+ if(dsc->outline_opa <= (lv_opa_t)LV_OPA_MIN)
+ return LV_RES_INV;
+ if(dsc->outline_width == 0)
+ return LV_RES_INV;
+
+ /* Move outline outwards to align with software rendered outline */
+ lv_coord_t outline_pad = dsc->outline_pad - 1;
+ lv_area_t rel_coords;
+ rel_coords.x1 = coords->x1 - outline_pad - floor(dsc->outline_width / 2.0f);
+ rel_coords.x2 = coords->x2 + outline_pad + ceil(dsc->outline_width / 2.0f);
+ rel_coords.y1 = coords->y1 - outline_pad - floor(dsc->outline_width / 2.0f);
+ rel_coords.y2 = coords->y2 + outline_pad + ceil(dsc->outline_width / 2.0f);
+
+ lv_area_move(&rel_coords, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t rel_clip_area;
+ lv_area_copy(&rel_clip_area, draw_ctx->clip_area);
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ lv_area_t clipped_coords;
+ if(!_lv_area_intersect(&clipped_coords, &rel_coords, &rel_clip_area))
+ return LV_RES_OK; /*Fully clipped, nothing to do*/
+
+ lv_res_t res = lv_gpu_nxp_vglite_draw_border_generic(&rel_coords, &rel_clip_area, dsc, false);
+ if(res != LV_RES_OK)
+ VG_LITE_LOG_TRACE("VG-Lite draw outline failed. Fallback.");
+
+ return res;
+}
+
+static void lv_draw_vglite_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, const lv_point_t * center,
+ uint16_t radius, uint16_t start_angle, uint16_t end_angle)
+{
+ bool done = false;
+
+#if LV_DRAW_COMPLEX
+ if(dsc->opa <= (lv_opa_t)LV_OPA_MIN)
+ return;
+ if(dsc->width == 0)
+ return;
+ if(start_angle == end_angle)
+ return;
+
+ if(need_argb8565_support()) {
+ lv_draw_sw_arc(draw_ctx, dsc, center, radius, start_angle, end_angle);
+ return;
+ }
+
+ lv_point_t rel_center = {center->x - draw_ctx->buf_area->x1, center->y - draw_ctx->buf_area->y1};
+
+ lv_area_t rel_clip_area;
+ lv_area_copy(&rel_clip_area, draw_ctx->clip_area);
+ lv_area_move(&rel_clip_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+
+ bool has_mask = lv_draw_mask_is_any(&rel_clip_area);
+
+ if(!has_mask) {
+ done = (lv_gpu_nxp_vglite_draw_arc(&rel_center, (int32_t)radius, (int32_t)start_angle, (int32_t)end_angle,
+ &rel_clip_area, dsc) == LV_RES_OK);
+ if(!done)
+ VG_LITE_LOG_TRACE("VG-Lite draw arc failed. Fallback.");
+ }
+
+#endif/*LV_DRAW_COMPLEX*/
+
+ if(!done)
+ lv_draw_sw_arc(draw_ctx, dsc, center, radius, start_angle, end_angle);
+}
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite.h b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite.h
new file mode 100644
index 0000000..c44cb8f
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite.h
@@ -0,0 +1,72 @@
+/**
+ * @file lv_draw_vglite.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_VGLITE_H
+#define LV_DRAW_VGLITE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "../../sw/lv_draw_sw.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef lv_draw_sw_ctx_t lv_draw_vglite_ctx_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+void lv_draw_vglite_ctx_init(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+void lv_draw_vglite_ctx_deinit(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+/**********************
+ * MACROS
+ **********************/
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_VGLITE_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c
new file mode 100644
index 0000000..ef6d25a
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c
@@ -0,0 +1,679 @@
+/**
+ * @file lv_draw_vglite_arc.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2021-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_vglite_arc.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_buf.h"
+#include
+
+/*********************
+ * DEFINES
+ *********************/
+
+#define T_FRACTION 16384.0f
+
+#define DICHOTO_ITER 5
+
+static const uint16_t TperDegree[90] = {
+ 0, 174, 348, 522, 697, 873, 1049, 1226, 1403, 1581,
+ 1759, 1938, 2117, 2297, 2477, 2658, 2839, 3020, 3202, 3384,
+ 3567, 3749, 3933, 4116, 4300, 4484, 4668, 4852, 5037, 5222,
+ 5407, 5592, 5777, 5962, 6148, 6334, 6519, 6705, 6891, 7077,
+ 7264, 7450, 7636, 7822, 8008, 8193, 8378, 8564, 8750, 8936,
+ 9122, 9309, 9495, 9681, 9867, 10052, 10238, 10424, 10609, 10794,
+ 10979, 11164, 11349, 11534, 11718, 11902, 12086, 12270, 12453, 12637,
+ 12819, 13002, 13184, 13366, 13547, 13728, 13909, 14089, 14269, 14448,
+ 14627, 14805, 14983, 15160, 15337, 15513, 15689, 15864, 16038, 16212
+};
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/* intermediate arc params */
+typedef struct _vg_arc {
+ int32_t angle; /* angle <90deg */
+ int32_t quarter; /* 0-3 counter-clockwise */
+ int32_t rad; /* radius */
+ int32_t p0x; /* point P0 */
+ int32_t p0y;
+ int32_t p1x; /* point P1 */
+ int32_t p1y;
+ int32_t p2x; /* point P2 */
+ int32_t p2y;
+ int32_t p3x; /* point P3 */
+ int32_t p3y;
+} vg_arc;
+
+typedef struct _cubic_cont_pt {
+ float p0;
+ float p1;
+ float p2;
+ float p3;
+} cubic_cont_pt;
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static void rotate_point(int32_t angle, int32_t * x, int32_t * y);
+static void add_arc_path(int32_t * arc_path, int * pidx, int32_t radius,
+ int32_t start_angle, int32_t end_angle, const lv_point_t * center, bool cw);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_gpu_nxp_vglite_draw_arc(const lv_point_t * center, int32_t radius, int32_t start_angle, int32_t end_angle,
+ const lv_area_t * clip_area, const lv_draw_arc_dsc_t * dsc)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+ lv_color32_t col32 = {.full = lv_color_to32(dsc->color)}; /*Convert color to RGBA8888*/
+ vg_lite_path_t path;
+ vg_lite_color_t vgcol; /* vglite takes ABGR */
+ bool donut = ((end_angle - start_angle) % 360 == 0) ? true : false;
+ vg_lite_buffer_t * vgbuf = lv_vglite_get_dest_buf();
+
+ /* path: max size = 16 cubic bezier (7 words each) */
+ int32_t arc_path[16 * 7];
+ lv_memset_00(arc_path, sizeof(arc_path));
+
+ /*** Init path ***/
+ lv_coord_t width = dsc->width; /* inner arc radius = outer arc radius - width */
+ if(width > (lv_coord_t)radius)
+ width = radius;
+
+ int pidx = 0;
+ int32_t cp_x, cp_y; /* control point coords */
+
+ /* first control point of curve */
+ cp_x = radius;
+ cp_y = 0;
+ rotate_point(start_angle, &cp_x, &cp_y);
+ arc_path[pidx++] = VLC_OP_MOVE;
+ arc_path[pidx++] = center->x + cp_x;
+ arc_path[pidx++] = center->y + cp_y;
+
+ /* draw 1-5 outer quarters */
+ add_arc_path(arc_path, &pidx, radius, start_angle, end_angle, center, true);
+
+ if(donut) {
+ /* close outer circle */
+ cp_x = radius;
+ cp_y = 0;
+ rotate_point(start_angle, &cp_x, &cp_y);
+ arc_path[pidx++] = VLC_OP_LINE;
+ arc_path[pidx++] = center->x + cp_x;
+ arc_path[pidx++] = center->y + cp_y;
+ /* start inner circle */
+ cp_x = radius - width;
+ cp_y = 0;
+ rotate_point(start_angle, &cp_x, &cp_y);
+ arc_path[pidx++] = VLC_OP_MOVE;
+ arc_path[pidx++] = center->x + cp_x;
+ arc_path[pidx++] = center->y + cp_y;
+
+ }
+ else if(dsc->rounded != 0U) { /* 1st rounded arc ending */
+ cp_x = radius - width / 2;
+ cp_y = 0;
+ rotate_point(end_angle, &cp_x, &cp_y);
+ lv_point_t round_center = {center->x + cp_x, center->y + cp_y};
+ add_arc_path(arc_path, &pidx, width / 2, end_angle, (end_angle + 180),
+ &round_center, true);
+
+ }
+ else { /* 1st flat ending */
+ cp_x = radius - width;
+ cp_y = 0;
+ rotate_point(end_angle, &cp_x, &cp_y);
+ arc_path[pidx++] = VLC_OP_LINE;
+ arc_path[pidx++] = center->x + cp_x;
+ arc_path[pidx++] = center->y + cp_y;
+ }
+
+ /* draw 1-5 inner quarters */
+ add_arc_path(arc_path, &pidx, radius - width, start_angle, end_angle, center, false);
+
+ /* last control point of curve */
+ if(donut) { /* close the loop */
+ cp_x = radius - width;
+ cp_y = 0;
+ rotate_point(start_angle, &cp_x, &cp_y);
+ arc_path[pidx++] = VLC_OP_LINE;
+ arc_path[pidx++] = center->x + cp_x;
+ arc_path[pidx++] = center->y + cp_y;
+
+ }
+ else if(dsc->rounded != 0U) { /* 2nd rounded arc ending */
+ cp_x = radius - width / 2;
+ cp_y = 0;
+ rotate_point(start_angle, &cp_x, &cp_y);
+ lv_point_t round_center = {center->x + cp_x, center->y + cp_y};
+ add_arc_path(arc_path, &pidx, width / 2, (start_angle + 180), (start_angle + 360),
+ &round_center, true);
+
+ }
+ else { /* 2nd flat ending */
+ cp_x = radius;
+ cp_y = 0;
+ rotate_point(start_angle, &cp_x, &cp_y);
+ arc_path[pidx++] = VLC_OP_LINE;
+ arc_path[pidx++] = center->x + cp_x;
+ arc_path[pidx++] = center->y + cp_y;
+ }
+
+ arc_path[pidx++] = VLC_OP_END;
+
+ err = vg_lite_init_path(&path, VG_LITE_S32, VG_LITE_HIGH, (uint32_t)pidx * sizeof(int32_t), arc_path,
+ (vg_lite_float_t)clip_area->x1, (vg_lite_float_t)clip_area->y1,
+ ((vg_lite_float_t)clip_area->x2) + 1.0f, ((vg_lite_float_t)clip_area->y2) + 1.0f);
+ VG_LITE_ERR_RETURN_INV(err, "Init path failed.");
+
+ vg_lite_buffer_format_t color_format = LV_COLOR_DEPTH == 16 ? VG_LITE_BGRA8888 : VG_LITE_ABGR8888;
+ if(lv_vglite_premult_and_swizzle(&vgcol, col32, dsc->opa, color_format) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Premultiplication and swizzle failed.");
+
+ vg_lite_matrix_t matrix;
+ vg_lite_identity(&matrix);
+
+ lv_vglite_set_scissor(clip_area);
+
+ /*** Draw arc ***/
+ err = vg_lite_draw(vgbuf, &path, VG_LITE_FILL_NON_ZERO, &matrix, VG_LITE_BLEND_SRC_OVER, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Draw arc failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+
+ lv_vglite_disable_scissor();
+
+ err = vg_lite_clear_path(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Clear path failed.");
+
+ return LV_RES_OK;
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void copy_arc(vg_arc * dst, vg_arc * src)
+{
+ dst->quarter = src->quarter;
+ dst->rad = src->rad;
+ dst->angle = src->angle;
+ dst->p0x = src->p0x;
+ dst->p1x = src->p1x;
+ dst->p2x = src->p2x;
+ dst->p3x = src->p3x;
+ dst->p0y = src->p0y;
+ dst->p1y = src->p1y;
+ dst->p2y = src->p2y;
+ dst->p3y = src->p3y;
+}
+
+/**
+ * Rotate the point according given rotation angle rotation center is 0,0
+ */
+static void rotate_point(int32_t angle, int32_t * x, int32_t * y)
+{
+ int32_t ori_x = *x;
+ int32_t ori_y = *y;
+ int16_t alpha = (int16_t)angle;
+ *x = ((lv_trigo_cos(alpha) * ori_x) / LV_TRIGO_SIN_MAX) - ((lv_trigo_sin(alpha) * ori_y) / LV_TRIGO_SIN_MAX);
+ *y = ((lv_trigo_sin(alpha) * ori_x) / LV_TRIGO_SIN_MAX) + ((lv_trigo_cos(alpha) * ori_y) / LV_TRIGO_SIN_MAX);
+}
+
+/**
+ * Set full arc control points depending on quarter.
+ * Control points match the best approximation of a circle.
+ * Arc Quarter position is:
+ * Q2 | Q3
+ * ---+---
+ * Q1 | Q0
+ */
+static void set_full_arc(vg_arc * fullarc)
+{
+ /* the tangent lenght for the bezier circle approx */
+ float tang = ((float)fullarc->rad) * BEZIER_OPTIM_CIRCLE;
+ switch(fullarc->quarter) {
+ case 0:
+ /* first quarter */
+ fullarc->p0x = fullarc->rad;
+ fullarc->p0y = 0;
+ fullarc->p1x = fullarc->rad;
+ fullarc->p1y = (int32_t)tang;
+ fullarc->p2x = (int32_t)tang;
+ fullarc->p2y = fullarc->rad;
+ fullarc->p3x = 0;
+ fullarc->p3y = fullarc->rad;
+ break;
+ case 1:
+ /* second quarter */
+ fullarc->p0x = 0;
+ fullarc->p0y = fullarc->rad;
+ fullarc->p1x = 0 - (int32_t)tang;
+ fullarc->p1y = fullarc->rad;
+ fullarc->p2x = 0 - fullarc->rad;
+ fullarc->p2y = (int32_t)tang;
+ fullarc->p3x = 0 - fullarc->rad;
+ fullarc->p3y = 0;
+ break;
+ case 2:
+ /* third quarter */
+ fullarc->p0x = 0 - fullarc->rad;
+ fullarc->p0y = 0;
+ fullarc->p1x = 0 - fullarc->rad;
+ fullarc->p1y = 0 - (int32_t)tang;
+ fullarc->p2x = 0 - (int32_t)tang;
+ fullarc->p2y = 0 - fullarc->rad;
+ fullarc->p3x = 0;
+ fullarc->p3y = 0 - fullarc->rad;
+ break;
+ case 3:
+ /* fourth quarter */
+ fullarc->p0x = 0;
+ fullarc->p0y = 0 - fullarc->rad;
+ fullarc->p1x = (int32_t)tang;
+ fullarc->p1y = 0 - fullarc->rad;
+ fullarc->p2x = fullarc->rad;
+ fullarc->p2y = 0 - (int32_t)tang;
+ fullarc->p3x = fullarc->rad;
+ fullarc->p3y = 0;
+ break;
+ default:
+ LV_LOG_ERROR("Invalid arc quarter value.");
+ break;
+ }
+}
+
+/**
+ * Linear interpolation between two points 'a' and 'b'
+ * 't' parameter is the proportion ratio expressed in range [0 ; T_FRACTION ]
+ */
+static inline float lerp(float coord_a, float coord_b, uint16_t t)
+{
+ float tf = (float)t;
+ return ((T_FRACTION - tf) * coord_a + tf * coord_b) / T_FRACTION;
+}
+
+/**
+ * Computes a point of bezier curve given 't' param
+ */
+static inline float comp_bezier_point(float t, cubic_cont_pt cp)
+{
+ float t_sq = t * t;
+ float inv_t_sq = (1.0f - t) * (1.0f - t);
+ float apt = (1.0f - t) * inv_t_sq * cp.p0 + 3.0f * inv_t_sq * t * cp.p1 + 3.0f * (1.0f - t) * t_sq * cp.p2 + t * t_sq *
+ cp.p3;
+ return apt;
+}
+
+/**
+ * Find parameter 't' in curve at point 'pt'
+ * proceed by dichotomy on only 1 dimension,
+ * works only if the curve is monotonic
+ * bezier curve is defined by control points [p0 p1 p2 p3]
+ * 'dec' tells if curve is decreasing (true) or increasing (false)
+ */
+static uint16_t get_bez_t_from_pos(float pt, cubic_cont_pt cp, bool dec)
+{
+ /* initialize dichotomy with boundary 't' values */
+ float t_low = 0.0f;
+ float t_mid = 0.5f;
+ float t_hig = 1.0f;
+ float a_pt;
+ /* dichotomy loop */
+ for(int i = 0; i < DICHOTO_ITER; i++) {
+ a_pt = comp_bezier_point(t_mid, cp);
+ /* check mid-point position on bezier curve versus targeted point */
+ if((a_pt > pt) != dec) {
+ t_hig = t_mid;
+ }
+ else {
+ t_low = t_mid;
+ }
+ /* define new 't' param for mid-point */
+ t_mid = (t_low + t_hig) / 2.0f;
+ }
+ /* return parameter 't' in integer range [0 ; T_FRACTION] */
+ return (uint16_t)floorf(t_mid * T_FRACTION + 0.5f);
+}
+
+/**
+ * Gives relative coords of the control points
+ * for the sub-arc starting at angle with given angle span
+ */
+static void get_subarc_control_points(vg_arc * arc, int32_t span)
+{
+ vg_arc fullarc;
+ fullarc.angle = arc->angle;
+ fullarc.quarter = arc->quarter;
+ fullarc.rad = arc->rad;
+ set_full_arc(&fullarc);
+
+ /* special case of full arc */
+ if(arc->angle == 90) {
+ copy_arc(arc, &fullarc);
+ return;
+ }
+
+ /* compute 1st arc using the geometric construction of curve */
+ uint16_t t2 = TperDegree[arc->angle + span];
+
+ /* lerp for A */
+ float a2x = lerp((float)fullarc.p0x, (float)fullarc.p1x, t2);
+ float a2y = lerp((float)fullarc.p0y, (float)fullarc.p1y, t2);
+ /* lerp for B */
+ float b2x = lerp((float)fullarc.p1x, (float)fullarc.p2x, t2);
+ float b2y = lerp((float)fullarc.p1y, (float)fullarc.p2y, t2);
+ /* lerp for C */
+ float c2x = lerp((float)fullarc.p2x, (float)fullarc.p3x, t2);
+ float c2y = lerp((float)fullarc.p2y, (float)fullarc.p3y, t2);
+
+ /* lerp for D */
+ float d2x = lerp(a2x, b2x, t2);
+ float d2y = lerp(a2y, b2y, t2);
+ /* lerp for E */
+ float e2x = lerp(b2x, c2x, t2);
+ float e2y = lerp(b2y, c2y, t2);
+
+ float pt2x = lerp(d2x, e2x, t2);
+ float pt2y = lerp(d2y, e2y, t2);
+
+ /* compute sub-arc using the geometric construction of curve */
+ uint16_t t1 = TperDegree[arc->angle];
+
+ /* lerp for A */
+ float a1x = lerp((float)fullarc.p0x, (float)fullarc.p1x, t1);
+ float a1y = lerp((float)fullarc.p0y, (float)fullarc.p1y, t1);
+ /* lerp for B */
+ float b1x = lerp((float)fullarc.p1x, (float)fullarc.p2x, t1);
+ float b1y = lerp((float)fullarc.p1y, (float)fullarc.p2y, t1);
+ /* lerp for C */
+ float c1x = lerp((float)fullarc.p2x, (float)fullarc.p3x, t1);
+ float c1y = lerp((float)fullarc.p2y, (float)fullarc.p3y, t1);
+
+ /* lerp for D */
+ float d1x = lerp(a1x, b1x, t1);
+ float d1y = lerp(a1y, b1y, t1);
+ /* lerp for E */
+ float e1x = lerp(b1x, c1x, t1);
+ float e1y = lerp(b1y, c1y, t1);
+
+ float pt1x = lerp(d1x, e1x, t1);
+ float pt1y = lerp(d1y, e1y, t1);
+
+ /* find the 't3' parameter for point P(t1) on the sub-arc [P0 A2 D2 P(t2)] using dichotomy
+ * use position of x axis only */
+ uint16_t t3;
+ t3 = get_bez_t_from_pos(pt1x,
+ (cubic_cont_pt) {
+ .p0 = ((float)fullarc.p0x), .p1 = a2x, .p2 = d2x, .p3 = pt2x
+ },
+ (bool)(pt2x < (float)fullarc.p0x));
+
+ /* lerp for B */
+ float b3x = lerp(a2x, d2x, t3);
+ float b3y = lerp(a2y, d2y, t3);
+ /* lerp for C */
+ float c3x = lerp(d2x, pt2x, t3);
+ float c3y = lerp(d2y, pt2y, t3);
+
+ /* lerp for E */
+ float e3x = lerp(b3x, c3x, t3);
+ float e3y = lerp(b3y, c3y, t3);
+
+ arc->p0x = (int32_t)floorf(0.5f + pt1x);
+ arc->p0y = (int32_t)floorf(0.5f + pt1y);
+ arc->p1x = (int32_t)floorf(0.5f + e3x);
+ arc->p1y = (int32_t)floorf(0.5f + e3y);
+ arc->p2x = (int32_t)floorf(0.5f + c3x);
+ arc->p2y = (int32_t)floorf(0.5f + c3y);
+ arc->p3x = (int32_t)floorf(0.5f + pt2x);
+ arc->p3y = (int32_t)floorf(0.5f + pt2y);
+}
+
+/**
+ * Gives relative coords of the control points
+ */
+static void get_arc_control_points(vg_arc * arc, bool start)
+{
+ vg_arc fullarc;
+ fullarc.angle = arc->angle;
+ fullarc.quarter = arc->quarter;
+ fullarc.rad = arc->rad;
+ set_full_arc(&fullarc);
+
+ /* special case of full arc */
+ if(arc->angle == 90) {
+ copy_arc(arc, &fullarc);
+ return;
+ }
+
+ /* compute sub-arc using the geometric construction of curve */
+ uint16_t t = TperDegree[arc->angle];
+ /* lerp for A */
+ float ax = lerp((float)fullarc.p0x, (float)fullarc.p1x, t);
+ float ay = lerp((float)fullarc.p0y, (float)fullarc.p1y, t);
+ /* lerp for B */
+ float bx = lerp((float)fullarc.p1x, (float)fullarc.p2x, t);
+ float by = lerp((float)fullarc.p1y, (float)fullarc.p2y, t);
+ /* lerp for C */
+ float cx = lerp((float)fullarc.p2x, (float)fullarc.p3x, t);
+ float cy = lerp((float)fullarc.p2y, (float)fullarc.p3y, t);
+
+ /* lerp for D */
+ float dx = lerp(ax, bx, t);
+ float dy = lerp(ay, by, t);
+ /* lerp for E */
+ float ex = lerp(bx, cx, t);
+ float ey = lerp(by, cy, t);
+
+ /* sub-arc's control points are tangents of DeCasteljau's algorithm */
+ if(start) {
+ arc->p0x = (int32_t)floorf(0.5f + lerp(dx, ex, t));
+ arc->p0y = (int32_t)floorf(0.5f + lerp(dy, ey, t));
+ arc->p1x = (int32_t)floorf(0.5f + ex);
+ arc->p1y = (int32_t)floorf(0.5f + ey);
+ arc->p2x = (int32_t)floorf(0.5f + cx);
+ arc->p2y = (int32_t)floorf(0.5f + cy);
+ arc->p3x = fullarc.p3x;
+ arc->p3y = fullarc.p3y;
+ }
+ else {
+ arc->p0x = fullarc.p0x;
+ arc->p0y = fullarc.p0y;
+ arc->p1x = (int32_t)floorf(0.5f + ax);
+ arc->p1y = (int32_t)floorf(0.5f + ay);
+ arc->p2x = (int32_t)floorf(0.5f + dx);
+ arc->p2y = (int32_t)floorf(0.5f + dy);
+ arc->p3x = (int32_t)floorf(0.5f + lerp(dx, ex, t));
+ arc->p3y = (int32_t)floorf(0.5f + lerp(dy, ey, t));
+ }
+}
+
+/**
+ * Add the arc control points into the path data for vglite,
+ * taking into account the real center of the arc (translation).
+ * arc_path: (in/out) the path data array for vglite
+ * pidx: (in/out) index of last element added in arc_path
+ * q_arc: (in) the arc data containing control points
+ * center: (in) the center of the circle in draw coordinates
+ * cw: (in) true if arc is clockwise
+ */
+static void add_split_arc_path(int32_t * arc_path, int * pidx, vg_arc * q_arc, const lv_point_t * center, bool cw)
+{
+ /* assumes first control point already in array arc_path[] */
+ int idx = *pidx;
+ if(cw) {
+#if BEZIER_DBG_CONTROL_POINTS
+ arc_path[idx++] = VLC_OP_LINE;
+ arc_path[idx++] = q_arc->p1x + center->x;
+ arc_path[idx++] = q_arc->p1y + center->y;
+ arc_path[idx++] = VLC_OP_LINE;
+ arc_path[idx++] = q_arc->p2x + center->x;
+ arc_path[idx++] = q_arc->p2y + center->y;
+ arc_path[idx++] = VLC_OP_LINE;
+ arc_path[idx++] = q_arc->p3x + center->x;
+ arc_path[idx++] = q_arc->p3y + center->y;
+#else
+ arc_path[idx++] = VLC_OP_CUBIC;
+ arc_path[idx++] = q_arc->p1x + center->x;
+ arc_path[idx++] = q_arc->p1y + center->y;
+ arc_path[idx++] = q_arc->p2x + center->x;
+ arc_path[idx++] = q_arc->p2y + center->y;
+ arc_path[idx++] = q_arc->p3x + center->x;
+ arc_path[idx++] = q_arc->p3y + center->y;
+#endif
+ }
+ else { /* reverse points order when counter-clockwise */
+#if BEZIER_DBG_CONTROL_POINTS
+ arc_path[idx++] = VLC_OP_LINE;
+ arc_path[idx++] = q_arc->p2x + center->x;
+ arc_path[idx++] = q_arc->p2y + center->y;
+ arc_path[idx++] = VLC_OP_LINE;
+ arc_path[idx++] = q_arc->p1x + center->x;
+ arc_path[idx++] = q_arc->p1y + center->y;
+ arc_path[idx++] = VLC_OP_LINE;
+ arc_path[idx++] = q_arc->p0x + center->x;
+ arc_path[idx++] = q_arc->p0y + center->y;
+#else
+ arc_path[idx++] = VLC_OP_CUBIC;
+ arc_path[idx++] = q_arc->p2x + center->x;
+ arc_path[idx++] = q_arc->p2y + center->y;
+ arc_path[idx++] = q_arc->p1x + center->x;
+ arc_path[idx++] = q_arc->p1y + center->y;
+ arc_path[idx++] = q_arc->p0x + center->x;
+ arc_path[idx++] = q_arc->p0y + center->y;
+#endif
+ }
+ /* update index i n path array*/
+ *pidx = idx;
+}
+
+static void add_arc_path(int32_t * arc_path, int * pidx, int32_t radius,
+ int32_t start_angle, int32_t end_angle, const lv_point_t * center, bool cw)
+{
+ if(end_angle < start_angle) end_angle += 360;
+
+ /* set number of arcs to draw */
+ vg_arc q_arc;
+ int32_t start_arc_angle = start_angle % 90;
+ int32_t end_arc_angle = end_angle % 90;
+ int32_t inv_start_arc_angle = (start_arc_angle > 0) ? (90 - start_arc_angle) : 0;
+ int32_t nbarc = (end_angle - start_angle - inv_start_arc_angle - end_arc_angle) / 90;
+ q_arc.rad = radius;
+
+ /* handle special case of start & end point in the same quarter */
+ if(((start_angle / 90) == (end_angle / 90)) && (nbarc <= 0)) {
+ q_arc.quarter = (start_angle / 90) % 4;
+ q_arc.angle = start_arc_angle;
+ get_subarc_control_points(&q_arc, end_arc_angle - start_arc_angle);
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ return;
+ }
+
+ if(cw) {
+ /* partial starting arc */
+ if(start_arc_angle > 0) {
+ q_arc.quarter = (start_angle / 90) % 4;
+ q_arc.angle = start_arc_angle;
+ /* get cubic points relative to center */
+ get_arc_control_points(&q_arc, true);
+ /* put cubic points in arc_path */
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ }
+ /* full arcs */
+ for(int32_t q = 0; q < nbarc ; q++) {
+ q_arc.quarter = (q + ((start_angle + 89) / 90)) % 4;
+ q_arc.angle = 90;
+ /* get cubic points relative to center */
+ get_arc_control_points(&q_arc, true); /* 2nd parameter 'start' ignored */
+ /* put cubic points in arc_path */
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ }
+ /* partial ending arc */
+ if(end_arc_angle > 0) {
+ q_arc.quarter = (end_angle / 90) % 4;
+ q_arc.angle = end_arc_angle;
+ /* get cubic points relative to center */
+ get_arc_control_points(&q_arc, false);
+ /* put cubic points in arc_path */
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ }
+
+ }
+ else { /* counter clockwise */
+
+ /* partial ending arc */
+ if(end_arc_angle > 0) {
+ q_arc.quarter = (end_angle / 90) % 4;
+ q_arc.angle = end_arc_angle;
+ /* get cubic points relative to center */
+ get_arc_control_points(&q_arc, false);
+ /* put cubic points in arc_path */
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ }
+ /* full arcs */
+ for(int32_t q = nbarc - 1; q >= 0; q--) {
+ q_arc.quarter = (q + ((start_angle + 89) / 90)) % 4;
+ q_arc.angle = 90;
+ /* get cubic points relative to center */
+ get_arc_control_points(&q_arc, true); /* 2nd parameter 'start' ignored */
+ /* put cubic points in arc_path */
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ }
+ /* partial starting arc */
+ if(start_arc_angle > 0) {
+ q_arc.quarter = (start_angle / 90) % 4;
+ q_arc.angle = start_arc_angle;
+ /* get cubic points relative to center */
+ get_arc_control_points(&q_arc, true);
+ /* put cubic points in arc_path */
+ add_split_arc_path(arc_path, pidx, &q_arc, center, cw);
+ }
+ }
+}
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.h b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.h
new file mode 100644
index 0000000..0fbff3d
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.h
@@ -0,0 +1,83 @@
+/**
+ * @file lv_draw_vglite_arc.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2021-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_VGLITE_ARC_H
+#define LV_DRAW_VGLITE_ARC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_utils.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Draw arc shape with effects
+ *
+ * @param[in] center Arc center with relative coordinates
+ * @param[in] radius Radius of external arc
+ * @param[in] start_angle Starting angle in degrees
+ * @param[in] end_angle Ending angle in degrees
+ * @param[in] clip_area Clipping area with relative coordinates to dest buff
+ * @param[in] dsc Arc description structure (width, rounded ending, opacity)
+ *
+ * @retval LV_RES_OK Draw completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_draw_arc(const lv_point_t * center, int32_t radius, int32_t start_angle, int32_t end_angle,
+ const lv_area_t * clip_area, const lv_draw_arc_dsc_t * dsc);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_VGLITE_ARC_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_blend.c b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_blend.c
new file mode 100644
index 0000000..a0f31e8
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_blend.c
@@ -0,0 +1,634 @@
+/**
+ * @file lv_draw_vglite_blend.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2020-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_vglite_blend.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_buf.h"
+#include "lv_vglite_utils.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/** Stride in px required by VG-Lite HW*/
+#define LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX 16U
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+ /**
+ * BLIT split threshold - BLITs with width or height higher than this value will be done
+ * in multiple steps. Value must be 16-aligned. Don't change.
+ */
+ #define LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR 352
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**
+ * Blit image, with optional opacity.
+ *
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] opa Opacity
+ *
+ * @retval LV_RES_OK Transfer complete
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+static lv_res_t lv_vglite_blit(const lv_area_t * src_area, lv_opa_t opa);
+
+/**
+ * Check source memory and stride alignment.
+ *
+ * @param[in] src_buf Source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ *
+ * @retval LV_RES_OK Alignment OK
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+static lv_res_t check_src_alignment(const lv_color_t * src_buf, lv_coord_t src_stride);
+
+/**
+ * Creates matrix that translates to origin of given destination area.
+ *
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ */
+static inline void lv_vglite_set_translation_matrix(const lv_area_t * dest_area);
+
+/**
+ * Creates matrix that translates to origin of given destination area with transformation (scale or rotate).
+ *
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dsc Image descriptor
+ */
+static inline void lv_vglite_set_transformation_matrix(const lv_area_t * dest_area, const lv_draw_img_dsc_t * dsc);
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+/**
+ * Move buffer pointer as close as possible to area, but with respect to alignment requirements. X-axis only.
+ *
+ * @param[in/out] area Area to be updated
+ * @param[in/out] buf Pointer to be updated
+ */
+static void align_x(lv_area_t * area, lv_color_t ** buf);
+
+/**
+ * Move buffer pointer to the area start and update variables, Y-axis only.
+ *
+ * @param[in/out] area Area to be updated
+ * @param[in/out] buf Pointer to be updated
+ * @param[in] stride Buffer stride in pixels
+ */
+static void align_y(lv_area_t * area, lv_color_t ** buf, lv_coord_t stride);
+
+/**
+ * Blit image split in tiles, with optional opacity.
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] opa Opacity
+ *
+ * @retval LV_RES_OK Transfer complete
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+static lv_res_t lv_vglite_blit_split(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa);
+#endif /*VG_LITE_BLIT_SPLIT_ENABLED*/
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+static vg_lite_matrix_t vgmatrix;
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_gpu_nxp_vglite_fill(const lv_area_t * dest_area, lv_color_t color, lv_opa_t opa)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+ lv_color32_t col32 = {.full = lv_color_to32(color)}; /*Convert color to RGBA8888*/
+ vg_lite_color_t vgcol; /* vglite takes ABGR */
+ vg_lite_buffer_t * vgbuf = lv_vglite_get_dest_buf();
+
+ vg_lite_buffer_format_t color_format = LV_COLOR_DEPTH == 16 ? VG_LITE_BGRA8888 : VG_LITE_ABGR8888;
+ if(lv_vglite_premult_and_swizzle(&vgcol, col32, opa, color_format) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Premultiplication and swizzle failed.");
+
+ if(opa >= (lv_opa_t)LV_OPA_MAX) { /*Opaque fill*/
+ vg_lite_rectangle_t rect = {
+ .x = dest_area->x1,
+ .y = dest_area->y1,
+ .width = lv_area_get_width(dest_area),
+ .height = lv_area_get_height(dest_area)
+ };
+
+ err = vg_lite_clear(vgbuf, &rect, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Clear failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+ }
+ else { /*fill with transparency*/
+
+ vg_lite_path_t path;
+ int32_t path_data[] = { /*VG rectangular path*/
+ VLC_OP_MOVE, dest_area->x1, dest_area->y1,
+ VLC_OP_LINE, dest_area->x2 + 1, dest_area->y1,
+ VLC_OP_LINE, dest_area->x2 + 1, dest_area->y2 + 1,
+ VLC_OP_LINE, dest_area->x1, dest_area->y2 + 1,
+ VLC_OP_LINE, dest_area->x1, dest_area->y1,
+ VLC_OP_END
+ };
+
+ err = vg_lite_init_path(&path, VG_LITE_S32, VG_LITE_LOW, sizeof(path_data), path_data,
+ (vg_lite_float_t) dest_area->x1, (vg_lite_float_t) dest_area->y1,
+ ((vg_lite_float_t) dest_area->x2) + 1.0f, ((vg_lite_float_t) dest_area->y2) + 1.0f);
+ VG_LITE_ERR_RETURN_INV(err, "Init path failed.");
+
+ vg_lite_matrix_t matrix;
+ vg_lite_identity(&matrix);
+
+ /*Draw rectangle*/
+ err = vg_lite_draw(vgbuf, &path, VG_LITE_FILL_EVEN_ODD, &matrix, VG_LITE_BLEND_SRC_OVER, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Draw rectangle failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+
+ err = vg_lite_clear_path(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Clear path failed.");
+ }
+
+ return LV_RES_OK;
+}
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+lv_res_t lv_gpu_nxp_vglite_blit_split(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa)
+{
+ /* Set src_vgbuf structure. */
+ lv_vglite_set_src_buf(src_buf, src_area, src_stride);
+
+ lv_color_t * orig_dest_buf = dest_buf;
+
+ lv_res_t rv = lv_vglite_blit_split(dest_buf, dest_area, dest_stride, src_buf, src_area, src_stride, opa);
+
+ /* Restore the original dest_vgbuf memory address. */
+ lv_vglite_set_dest_buf_ptr(orig_dest_buf);
+
+ return rv;
+}
+#else
+lv_res_t lv_gpu_nxp_vglite_blit(const lv_area_t * dest_area,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa)
+{
+ if(check_src_alignment(src_buf, src_stride) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Check src alignment failed.");
+
+ /* Set src_vgbuf structure. */
+ lv_vglite_set_src_buf(src_buf, src_area, src_stride);
+
+ /* Set scissor. */
+ lv_vglite_set_scissor(dest_area);
+
+ /* Set vgmatrix. */
+ lv_vglite_set_translation_matrix(dest_area);
+
+ /* Start blit. */
+ lv_res_t rv = lv_vglite_blit(src_area, opa);
+
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ return rv;
+}
+
+lv_res_t lv_gpu_nxp_vglite_blit_transform(const lv_area_t * dest_area, const lv_area_t * clip_area,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc)
+{
+ lv_res_t rv = LV_RES_INV;
+
+ if(check_src_alignment(src_buf, src_stride) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Check src alignment failed.");
+
+ /* Set src_vgbuf structure. */
+ lv_vglite_set_src_buf(src_buf, src_area, src_stride);
+
+ /* Set scissor */
+ lv_vglite_set_scissor(clip_area);
+
+ /* Set vgmatrix. */
+ lv_vglite_set_transformation_matrix(dest_area, dsc);
+
+ /* Start blit. */
+ rv = lv_vglite_blit(src_area, dsc->opa);
+
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ return rv;
+}
+#endif /*VG_LITE_BLIT_SPLIT_ENABLED*/
+
+lv_res_t lv_gpu_nxp_vglite_buffer_copy(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+
+ if(check_src_alignment(src_buf, src_stride) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Check src alignment failed.");
+
+ vg_lite_buffer_t src_vgbuf;
+ /* Set src_vgbuf structure. */
+ lv_vglite_set_buf(&src_vgbuf, src_buf, src_area, src_stride);
+
+ vg_lite_buffer_t dest_vgbuf;
+ /* Set dest_vgbuf structure. */
+ lv_vglite_set_buf(&dest_vgbuf, dest_buf, dest_area, dest_stride);
+
+ uint32_t rect[] = {
+ (uint32_t)src_area->x1, /* start x */
+ (uint32_t)src_area->y1, /* start y */
+ (uint32_t)lv_area_get_width(src_area), /* width */
+ (uint32_t)lv_area_get_height(src_area) /* height */
+ };
+
+ /* Set scissor. */
+ lv_vglite_set_scissor(dest_area);
+
+ /* Set vgmatrix. */
+ lv_vglite_set_translation_matrix(dest_area);
+
+ err = vg_lite_blit_rect(&dest_vgbuf, &src_vgbuf, rect, &vgmatrix,
+ VG_LITE_BLEND_NONE, 0xFFFFFFFFU, VG_LITE_FILTER_POINT);
+ if(err != VG_LITE_SUCCESS) {
+ LV_LOG_ERROR("Blit rectangle failed.");
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ return LV_RES_INV;
+ }
+
+ if(lv_vglite_run() != LV_RES_OK) {
+ LV_LOG_ERROR("Run failed.");
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ return LV_RES_INV;
+ }
+
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ return LV_RES_OK;
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+static lv_res_t lv_vglite_blit_split(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa)
+{
+ lv_res_t rv = LV_RES_INV;
+
+ VG_LITE_LOG_TRACE("Blit "
+ "Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | "
+ "Size: ([%dx%d] -> [%dx%d]) | "
+ "Addr: (0x%x -> 0x%x)",
+ src_area->x1, src_area->y1, src_area->x2, src_area->y2,
+ dest_area->x1, dest_area->y1, dest_area->x2, dest_area->y2,
+ lv_area_get_width(src_area), lv_area_get_height(src_area),
+ lv_area_get_width(dest_area), lv_area_get_height(dest_area),
+ (uintptr_t)src_buf, (uintptr_t)dest_buf);
+
+ /* Stage 1: Move starting pointers as close as possible to [x1, y1], so coordinates are as small as possible. */
+ align_x(src_area, (lv_color_t **)&src_buf);
+ align_y(src_area, (lv_color_t **)&src_buf, src_stride);
+ align_x(dest_area, (lv_color_t **)&dest_buf);
+ align_y(dest_area, (lv_color_t **)&dest_buf, dest_stride);
+
+ /* Stage 2: If we're in limit, do a single BLIT */
+ if((src_area->x2 < LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) &&
+ (src_area->y2 < LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR)) {
+ if(check_src_alignment(src_buf, src_stride) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Check src alignment failed.");
+
+ /* Set new dest_vgbuf and src_vgbuf memory addresses. */
+ lv_vglite_set_dest_buf_ptr(dest_buf);
+ lv_vglite_set_src_buf_ptr(src_buf);
+
+ /* Set scissor */
+ lv_vglite_set_scissor(dest_area);
+
+ /* Set vgmatrix. */
+ lv_vglite_set_translation_matrix(dest_area);
+
+ /* Start blit. */
+ rv = lv_vglite_blit(src_area, opa);
+
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ VG_LITE_LOG_TRACE("Single "
+ "Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | "
+ "Size: ([%dx%d] -> [%dx%d]) | "
+ "Addr: (0x%x -> 0x%x) %s",
+ src_area->x1, src_area->y1, src_area->x2, src_area->y2,
+ dest_area->x1, dest_area->y1, dest_area->x2, dest_area->y2,
+ lv_area_get_width(src_area), lv_area_get_height(src_area),
+ lv_area_get_width(dest_area), lv_area_get_height(dest_area),
+ (uintptr_t)src_buf, (uintptr_t)dest_buf,
+ rv == LV_RES_OK ? "OK!" : "FAILED!");
+
+ return rv;
+ };
+
+ /* Stage 3: Split the BLIT into multiple tiles */
+ VG_LITE_LOG_TRACE("Split "
+ "Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | "
+ "Size: ([%dx%d] -> [%dx%d]) | "
+ "Addr: (0x%x -> 0x%x)",
+ src_area->x1, src_area->y1, src_area->x2, src_area->y2,
+ dest_area->x1, dest_area->y1, dest_area->x2, dest_area->y2,
+ lv_area_get_width(src_area), lv_area_get_height(src_area),
+ lv_area_get_width(dest_area), lv_area_get_height(dest_area),
+ (uintptr_t)src_buf, (uintptr_t)dest_buf);
+
+ lv_coord_t width = lv_area_get_width(src_area);
+ lv_coord_t height = lv_area_get_height(src_area);
+
+ /* Number of tiles needed */
+ int total_tiles_x = (src_area->x1 + width + LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1) /
+ LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
+ int total_tiles_y = (src_area->y1 + height + LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1) /
+ LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
+
+ /* src and dst buffer shift against each other. Src buffer real data [0,0] may start actually at [3,0] in buffer, as
+ * the buffer pointer has to be aligned, while dst buffer real data [0,0] may start at [1,0] in buffer. alignment may be
+ * different */
+ int shift_src_x = (src_area->x1 > dest_area->x1) ? (src_area->x1 - dest_area->x1) : 0;
+ int shift_dest_x = (src_area->x1 < dest_area->x1) ? (dest_area->x1 - src_area->x1) : 0;
+
+ VG_LITE_LOG_TRACE("X shift: src: %d, dst: %d", shift_src_x, shift_dest_x);
+
+ lv_color_t * tile_dest_buf;
+ lv_area_t tile_dest_area;
+ const lv_color_t * tile_src_buf;
+ lv_area_t tile_src_area;
+
+ for(int y = 0; y < total_tiles_y; y++) {
+
+ tile_src_area.y1 = 0; /* no vertical alignment, always start from 0 */
+ tile_src_area.y2 = height - y * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
+ if(tile_src_area.y2 >= LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) {
+ tile_src_area.y2 = LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1; /* Should never happen */
+ }
+ tile_src_buf = src_buf + y * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR * src_stride;
+
+ tile_dest_area.y1 = tile_src_area.y1; /* y has no alignment, always in sync with src */
+ tile_dest_area.y2 = tile_src_area.y2;
+
+ tile_dest_buf = dest_buf + y * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR * dest_stride;
+
+ for(int x = 0; x < total_tiles_x; x++) {
+
+ if(x == 0) {
+ /* 1st tile is special - there may be a gap between buffer start pointer
+ * and area.x1 value, as the pointer has to be aligned.
+ * tile_src_buf pointer - keep init value from Y-loop.
+ * Also, 1st tile start is not shifted! shift is applied from 2nd tile */
+ tile_src_area.x1 = src_area->x1;
+ tile_dest_area.x1 = dest_area->x1;
+ }
+ else {
+ /* subsequent tiles always starts from 0, but shifted*/
+ tile_src_area.x1 = 0 + shift_src_x;
+ tile_dest_area.x1 = 0 + shift_dest_x;
+ /* and advance start pointer + 1 tile size */
+ tile_src_buf += LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
+ tile_dest_buf += LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
+ }
+
+ /* Clip tile end coordinates */
+ tile_src_area.x2 = width + src_area->x1 - x * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
+ if(tile_src_area.x2 >= LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) {
+ tile_src_area.x2 = LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
+ }
+
+ tile_dest_area.x2 = width + dest_area->x1 - x * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
+ if(tile_dest_area.x2 >= LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) {
+ tile_dest_area.x2 = LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
+ }
+
+ if(x < (total_tiles_x - 1)) {
+ /* And adjust end coords if shifted, but not for last tile! */
+ tile_src_area.x2 += shift_src_x;
+ tile_dest_area.x2 += shift_dest_x;
+ }
+
+ if(check_src_alignment(tile_src_buf, src_stride) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Check src alignment failed.");
+
+ /* Set new dest_vgbuf and src_vgbuf memory addresses. */
+ lv_vglite_set_dest_buf_ptr(tile_dest_buf);
+ lv_vglite_set_src_buf_ptr(tile_src_buf);
+
+ /* Set scissor */
+ lv_vglite_set_scissor(&tile_dest_area);
+
+ /* Set vgmatrix. */
+ lv_vglite_set_translation_matrix(&tile_dest_area);
+
+ /* Start blit. */
+ rv = lv_vglite_blit(&tile_src_area, opa);
+
+ /* Disable scissor. */
+ lv_vglite_disable_scissor();
+
+ VG_LITE_LOG_TRACE("Tile [%d, %d] "
+ "Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | "
+ "Size: ([%dx%d] -> [%dx%d]) | "
+ "Addr: (0x%x -> 0x%x) %s",
+ x, y,
+ tile_src_area.x1, tile_src_area.y1, tile_src_area.x2, tile_src_area.y2,
+ tile_dest_area.x1, tile_dest_area.y1, tile_dest_area.x2, tile_dest_area.y2,
+ lv_area_get_width(&tile_src_area), lv_area_get_height(&tile_src_area),
+ lv_area_get_width(&tile_dest_area), lv_area_get_height(&tile_dest_area),
+ (uintptr_t)tile_src_buf, (uintptr_t)tile_dest_buf,
+ rv == LV_RES_OK ? "OK!" : "FAILED!");
+
+ if(rv != LV_RES_OK) {
+ return rv;
+ }
+ }
+ }
+
+ return rv;
+}
+#endif /*VG_LITE_BLIT_SPLIT_ENABLED*/
+
+static lv_res_t lv_vglite_blit(const lv_area_t * src_area, lv_opa_t opa)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+ vg_lite_buffer_t * dst_vgbuf = lv_vglite_get_dest_buf();
+ vg_lite_buffer_t * src_vgbuf = lv_vglite_get_src_buf();
+
+ uint32_t rect[] = {
+ (uint32_t)src_area->x1, /* start x */
+ (uint32_t)src_area->y1, /* start y */
+ (uint32_t)lv_area_get_width(src_area), /* width */
+ (uint32_t)lv_area_get_height(src_area) /* height */
+ };
+
+ uint32_t color;
+ vg_lite_blend_t blend;
+ if(opa >= (lv_opa_t)LV_OPA_MAX) {
+ color = 0xFFFFFFFFU;
+ blend = VG_LITE_BLEND_SRC_OVER;
+ src_vgbuf->transparency_mode = VG_LITE_IMAGE_TRANSPARENT;
+ }
+ else {
+ if(vg_lite_query_feature(gcFEATURE_BIT_VG_PE_PREMULTIPLY)) {
+ color = (opa << 24) | 0x00FFFFFFU;
+ }
+ else {
+ color = (opa << 24) | (opa << 16) | (opa << 8) | opa;
+ }
+ blend = VG_LITE_BLEND_SRC_OVER;
+ src_vgbuf->image_mode = VG_LITE_MULTIPLY_IMAGE_MODE;
+ src_vgbuf->transparency_mode = VG_LITE_IMAGE_TRANSPARENT;
+ }
+
+ err = vg_lite_blit_rect(dst_vgbuf, src_vgbuf, rect, &vgmatrix, blend, color, VG_LITE_FILTER_POINT);
+ VG_LITE_ERR_RETURN_INV(err, "Blit rectangle failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+
+ return LV_RES_OK;
+}
+
+static lv_res_t check_src_alignment(const lv_color_t * src_buf, lv_coord_t src_stride)
+{
+ /* No alignment requirement for destination pixel buffer when using mode VG_LITE_LINEAR */
+
+ /* Test for pointer alignment */
+ if((((uintptr_t)src_buf) % (uintptr_t)LV_ATTRIBUTE_MEM_ALIGN_SIZE) != (uintptr_t)0x0U)
+ VG_LITE_RETURN_INV("Src buffer ptr (0x%x) not aligned to 0x%x bytes.",
+ (size_t)src_buf, LV_ATTRIBUTE_MEM_ALIGN_SIZE);
+
+ /* Test for stride alignment */
+ if((src_stride % (lv_coord_t)LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) != 0x0U)
+ VG_LITE_RETURN_INV("Src buffer stride (%d px) not aligned to %d px.",
+ src_stride, LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
+ return LV_RES_OK;
+}
+
+static inline void lv_vglite_set_translation_matrix(const lv_area_t * dest_area)
+{
+ vg_lite_identity(&vgmatrix);
+ vg_lite_translate((vg_lite_float_t)dest_area->x1, (vg_lite_float_t)dest_area->y1, &vgmatrix);
+}
+
+static inline void lv_vglite_set_transformation_matrix(const lv_area_t * dest_area, const lv_draw_img_dsc_t * dsc)
+{
+ lv_vglite_set_translation_matrix(dest_area);
+
+ bool has_scale = (dsc->zoom != LV_IMG_ZOOM_NONE);
+ bool has_rotation = (dsc->angle != 0);
+
+ vg_lite_translate(dsc->pivot.x, dsc->pivot.y, &vgmatrix);
+ if(has_rotation)
+ vg_lite_rotate(dsc->angle / 10.0f, &vgmatrix); /* angle is 1/10 degree */
+ if(has_scale) {
+ vg_lite_float_t scale = 1.0f * dsc->zoom / LV_IMG_ZOOM_NONE;
+ vg_lite_scale(scale, scale, &vgmatrix);
+ }
+ vg_lite_translate(0.0f - dsc->pivot.x, 0.0f - dsc->pivot.y, &vgmatrix);
+}
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+static void align_x(lv_area_t * area, lv_color_t ** buf)
+{
+ int alignedAreaStartPx = area->x1 - (area->x1 % (LV_ATTRIBUTE_MEM_ALIGN_SIZE / sizeof(lv_color_t)));
+ VG_LITE_COND_STOP(alignedAreaStartPx < 0, "Negative X alignment.");
+
+ area->x1 -= alignedAreaStartPx;
+ area->x2 -= alignedAreaStartPx;
+ *buf += alignedAreaStartPx;
+}
+
+static void align_y(lv_area_t * area, lv_color_t ** buf, lv_coord_t stride)
+{
+ int LineToAlignMem;
+ int alignedAreaStartPy;
+ /* find how many lines of pixels will respect memory alignment requirement */
+ if((stride % (lv_coord_t)LV_ATTRIBUTE_MEM_ALIGN_SIZE) == 0x0U) {
+ alignedAreaStartPy = area->y1;
+ }
+ else {
+ LineToAlignMem = LV_ATTRIBUTE_MEM_ALIGN_SIZE / (LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX * sizeof(lv_color_t));
+ VG_LITE_COND_STOP(LV_ATTRIBUTE_MEM_ALIGN_SIZE % (LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX * sizeof(lv_color_t)),
+ "Complex case: need gcd function.");
+ alignedAreaStartPy = area->y1 - (area->y1 % LineToAlignMem);
+ VG_LITE_COND_STOP(alignedAreaStartPy < 0, "Negative Y alignment.");
+ }
+
+ area->y1 -= alignedAreaStartPy;
+ area->y2 -= alignedAreaStartPy;
+ *buf += (uint32_t)(alignedAreaStartPy * stride);
+}
+#endif /*VG_LITE_BLIT_SPLIT_ENABLED*/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_blend.h b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_blend.h
new file mode 100644
index 0000000..1aae34b
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_blend.h
@@ -0,0 +1,168 @@
+/**
+ * @file lv_draw_vglite_blend.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2020-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_VGLITE_BLEND_H
+#define LV_DRAW_VGLITE_BLEND_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_utils.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**
+ * Enable BLIT quality degradation workaround for RT595,
+ * recommended for screen's dimension > 352 pixels.
+ */
+#define RT595_BLIT_WRKRND_ENABLED 1
+
+/* Internal compound symbol */
+#if (defined(CPU_MIMXRT595SFFOB) || defined(CPU_MIMXRT595SFFOB_cm33) || \
+ defined(CPU_MIMXRT595SFFOC) || defined(CPU_MIMXRT595SFFOC_cm33)) && \
+ RT595_BLIT_WRKRND_ENABLED
+#define VG_LITE_BLIT_SPLIT_ENABLED 1
+#else
+#define VG_LITE_BLIT_SPLIT_ENABLED 0
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Fill area, with optional opacity.
+ *
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] color Color
+ * @param[in] opa Opacity (255 = full, 128 = 50% background/50% color, 0 = no fill)
+ *
+ * @retval LV_RES_OK Fill completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_fill(const lv_area_t * dest_area, lv_color_t color, lv_opa_t opa);
+
+#if VG_LITE_BLIT_SPLIT_ENABLED
+/**
+ * BLock Image Transfer - copy rectangular image from src_buf to dst_buf with effects.
+ * By default, image is copied directly, with optional opacity.
+ *
+ * @param[in/out] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] opa Opacity
+ *
+ * @retval LV_RES_OK Transfer complete
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_blit_split(lv_color_t * dest_buf, lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa);
+#else
+/**
+ * BLock Image Transfer - copy rectangular image from src_buf to dst_buf with effects.
+ * By default, image is copied directly, with optional opacity.
+ *
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] opa Opacity
+ *
+ * @retval LV_RES_OK Transfer complete
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_blit(const lv_area_t * dest_area,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ lv_opa_t opa);
+
+/**
+ * BLock Image Transfer - copy rectangular image from src_buf to dst_buf with transformation.
+ * By default, image is copied directly, with optional opacity.
+ *
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] clip_area Clip area with relative coordinates of destination buffer
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ * @param[in] dsc Image descriptor
+ *
+ * @retval LV_RES_OK Transfer complete
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_blit_transform(const lv_area_t * dest_area, const lv_area_t * clip_area,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * dsc);
+
+#endif /*VG_LITE_BLIT_SPLIT_ENABLED*/
+
+/**
+ * BLock Image Transfer - simple copy of rectangular image from source to destination.
+ *
+ * @param[in] dest_buf Destination buffer
+ * @param[in] dest_area Area with relative coordinates of destination buffer
+ * @param[in] dest_stride Stride of destination buffer in pixels
+ * @param[in] src_buf Source buffer
+ * @param[in] src_area Source area with relative coordinates of source buffer
+ * @param[in] src_stride Stride of source buffer in pixels
+ *
+ * @retval LV_RES_OK Transfer complete
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_buffer_copy(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, const lv_area_t * src_area, lv_coord_t src_stride);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_VGLITE_BLEND_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_line.c b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_line.c
new file mode 100644
index 0000000..bf7bee1
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_line.c
@@ -0,0 +1,142 @@
+/**
+ * @file lv_draw_vglite_line.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_vglite_line.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_buf.h"
+#include
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_gpu_nxp_vglite_draw_line(const lv_point_t * point1, const lv_point_t * point2,
+ const lv_area_t * clip_area, const lv_draw_line_dsc_t * dsc)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+ vg_lite_path_t path;
+ vg_lite_color_t vgcol; /* vglite takes ABGR */
+ vg_lite_buffer_t * vgbuf = lv_vglite_get_dest_buf();
+ vg_lite_cap_style_t cap_style = (dsc->round_start || dsc->round_end) ? VG_LITE_CAP_ROUND : VG_LITE_CAP_BUTT;
+ vg_lite_join_style_t join_style = (dsc->round_start || dsc->round_end) ? VG_LITE_JOIN_ROUND : VG_LITE_JOIN_MITER;
+
+ bool is_dashed = (dsc->dash_width && dsc->dash_gap);
+
+ vg_lite_float_t stroke_dash_pattern[2] = {0, 0};
+ uint32_t stroke_dash_count = 0;
+ vg_lite_float_t stroke_dash_phase = 0;
+ if(is_dashed) {
+ stroke_dash_pattern[0] = (vg_lite_float_t)dsc->dash_width;
+ stroke_dash_pattern[1] = (vg_lite_float_t)dsc->dash_gap;
+ stroke_dash_count = sizeof(stroke_dash_pattern) / sizeof(vg_lite_float_t);
+ stroke_dash_phase = (vg_lite_float_t)dsc->dash_width / 2;
+ }
+
+ /* Choose vglite blend mode based on given lvgl blend mode */
+ vg_lite_blend_t vglite_blend_mode = lv_vglite_get_blend_mode(dsc->blend_mode);
+
+ /*** Init path ***/
+ lv_coord_t width = dsc->width;
+
+ int32_t line_path[] = { /*VG line path*/
+ VLC_OP_MOVE, point1->x, point1->y,
+ VLC_OP_LINE, point2->x, point2->y,
+ VLC_OP_END
+ };
+
+ err = vg_lite_init_path(&path, VG_LITE_S32, VG_LITE_HIGH, sizeof(line_path), line_path,
+ (vg_lite_float_t)clip_area->x1, (vg_lite_float_t)clip_area->y1,
+ ((vg_lite_float_t)clip_area->x2) + 1.0f, ((vg_lite_float_t)clip_area->y2) + 1.0f);
+ VG_LITE_ERR_RETURN_INV(err, "Init path failed.");
+
+ vg_lite_matrix_t matrix;
+ vg_lite_identity(&matrix);
+
+ lv_color32_t col32 = { .full = lv_color_to32(dsc->color) }; /*Convert color to RGBA8888*/
+ vg_lite_buffer_format_t color_format = LV_COLOR_DEPTH == 16 ? VG_LITE_BGRA8888 : VG_LITE_ABGR8888;
+ if(lv_vglite_premult_and_swizzle(&vgcol, col32, dsc->opa, color_format) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Premultiplication and swizzle failed.");
+
+ /*** Draw line ***/
+ err = vg_lite_set_draw_path_type(&path, VG_LITE_DRAW_STROKE_PATH);
+ VG_LITE_ERR_RETURN_INV(err, "Set draw path type failed.");
+
+ err = vg_lite_set_stroke(&path, cap_style, join_style, width, 8, stroke_dash_pattern, stroke_dash_count,
+ stroke_dash_phase, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Set stroke failed.");
+
+ err = vg_lite_update_stroke(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Update stroke failed.");
+
+ lv_vglite_set_scissor(clip_area);
+
+ err = vg_lite_draw(vgbuf, &path, VG_LITE_FILL_NON_ZERO, &matrix, vglite_blend_mode, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Draw line failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+
+ lv_vglite_disable_scissor();
+
+ err = vg_lite_clear_path(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Clear path failed.");
+
+ return LV_RES_OK;
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_line.h b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_line.h
new file mode 100644
index 0000000..cbd4b95
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_line.h
@@ -0,0 +1,83 @@
+/**
+ * @file lv_draw_vglite_line.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_VGLITE_LINE_H
+#define LV_DRAW_VGLITE_LINE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_utils.h"
+#include "../../lv_draw_line.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Draw line shape with effects
+ *
+ * @param[in] point1 Starting point with relative coordinates
+ * @param[in] point2 Ending point with relative coordinates
+ * @param[in] clip_area Clipping area with relative coordinates to dest buff
+ * @param[in] dsc Line description structure (width, rounded ending, opacity, ...)
+ *
+ * @retval LV_RES_OK Draw completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_gpu_nxp_vglite_draw_line(const lv_point_t * point1, const lv_point_t * point2,
+ const lv_area_t * clip_area, const lv_draw_line_dsc_t * dsc);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_VGLITE_RECT_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_rect.c b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_rect.c
new file mode 100644
index 0000000..e9db57d
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_rect.c
@@ -0,0 +1,459 @@
+/**
+ * @file lv_draw_vglite_rect.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2021-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_draw_vglite_rect.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_buf.h"
+#include
+
+/*********************
+ * DEFINES
+ *********************/
+/*********************
+ * DEFINES
+ *********************/
+
+/* Path data sizes for different elements */
+#define CUBIC_PATH_DATA_SIZE 7 /* 1 opcode, 6 arguments */
+#define LINE_PATH_DATA_SIZE 3 /* 1 opcode, 2 arguments */
+#define MOVE_PATH_DATA_SIZE 3 /* 1 opcode, 2 arguments */
+#define END_PATH_DATA_SIZE 1 /* 1 opcode, 0 arguments */
+/* Maximum possible rectangle path size
+ * is in the rounded rectangle case:
+ * - 1 move for the path start
+ * - 4 cubics for the corners
+ * - 4 lines for the sides
+ * - 1 end for the path end */
+#define RECT_PATH_DATA_MAX_SIZE 1 * MOVE_PATH_DATA_SIZE + 4 * CUBIC_PATH_DATA_SIZE + 4 * LINE_PATH_DATA_SIZE + 1 * END_PATH_DATA_SIZE
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**
+ * Generates path data for rectangle drawing.
+ *
+ * @param[in/out] path The path data to initialize
+ * @param[in/out] path_size The resulting size of the created path data
+ * @param[in] dsc The style descriptor for the rectangle to be drawn
+ * @param[in] coords The coordinates of the rectangle to be drawn
+ */
+static void lv_vglite_create_rect_path_data(int32_t * path_data, uint32_t * path_data_size,
+ lv_coord_t radius,
+ const lv_area_t * coords);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_gpu_nxp_vglite_draw_bg(const lv_area_t * coords, const lv_area_t * clip_area,
+ const lv_draw_rect_dsc_t * dsc)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+ lv_coord_t width = lv_area_get_width(coords);
+ lv_coord_t height = lv_area_get_height(coords);
+ vg_lite_color_t vgcol;
+ lv_coord_t radius = dsc->radius;
+ vg_lite_buffer_t * vgbuf = lv_vglite_get_dest_buf();
+
+ if(dsc->radius < 0)
+ return LV_RES_INV;
+
+ /*** Init path ***/
+ int32_t path_data[RECT_PATH_DATA_MAX_SIZE];
+ uint32_t path_data_size;
+ lv_vglite_create_rect_path_data(path_data, &path_data_size, radius, coords);
+ vg_lite_quality_t path_quality = dsc->radius > 0 ? VG_LITE_HIGH : VG_LITE_LOW;
+
+ vg_lite_path_t path;
+ err = vg_lite_init_path(&path, VG_LITE_S32, path_quality, path_data_size, path_data,
+ (vg_lite_float_t)clip_area->x1, (vg_lite_float_t)clip_area->y1,
+ ((vg_lite_float_t)clip_area->x2) + 1.0f, ((vg_lite_float_t)clip_area->y2) + 1.0f);
+ VG_LITE_ERR_RETURN_INV(err, "Init path failed.");
+
+ vg_lite_matrix_t matrix;
+ vg_lite_identity(&matrix);
+
+ vg_lite_matrix_t * grad_matrix;
+ vg_lite_linear_gradient_t gradient;
+
+ /*** Init Color/Gradient ***/
+ if(dsc->bg_grad.dir != (lv_grad_dir_t)LV_GRAD_DIR_NONE) {
+ uint32_t colors[2];
+ uint32_t stops[2];
+ lv_color32_t col32[2];
+
+ /* Gradient setup */
+ uint8_t cnt = LV_MAX(dsc->bg_grad.stops_count, 2);
+ for(uint8_t i = 0; i < cnt; i++) {
+ col32[i].full = lv_color_to32(dsc->bg_grad.stops[i].color); /*Convert color to RGBA8888*/
+ stops[i] = dsc->bg_grad.stops[i].frac;
+
+ vg_lite_buffer_format_t color_format = LV_COLOR_DEPTH == 16 ? VG_LITE_ABGR8888 : VG_LITE_ARGB8888;
+ if(lv_vglite_premult_and_swizzle(&colors[i], col32[i], dsc->bg_opa, color_format) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Premultiplication and swizzle failed.");
+ }
+
+ lv_memset_00(&gradient, sizeof(vg_lite_linear_gradient_t));
+
+ err = vg_lite_init_grad(&gradient);
+ VG_LITE_ERR_RETURN_INV(err, "Init gradient failed");
+
+ err = vg_lite_set_grad(&gradient, cnt, colors, stops);
+ VG_LITE_ERR_RETURN_INV(err, "Set gradient failed.");
+
+ err = vg_lite_update_grad(&gradient);
+ VG_LITE_ERR_RETURN_INV(err, "Update gradient failed.");
+
+ grad_matrix = vg_lite_get_grad_matrix(&gradient);
+ vg_lite_identity(grad_matrix);
+ vg_lite_translate((float)coords->x1, (float)coords->y1, grad_matrix);
+
+ if(dsc->bg_grad.dir == (lv_grad_dir_t)LV_GRAD_DIR_VER) {
+ vg_lite_scale(1.0f, (float)height / 256.0f, grad_matrix);
+ vg_lite_rotate(90.0f, grad_matrix);
+ }
+ else { /*LV_GRAD_DIR_HOR*/
+ vg_lite_scale((float)width / 256.0f, 1.0f, grad_matrix);
+ }
+ }
+
+ lv_color32_t bg_col32 = {.full = lv_color_to32(dsc->bg_color)}; /*Convert color to RGBA8888*/
+ vg_lite_buffer_format_t color_format = LV_COLOR_DEPTH == 16 ? VG_LITE_BGRA8888 : VG_LITE_ABGR8888;
+ if(lv_vglite_premult_and_swizzle(&vgcol, bg_col32, dsc->bg_opa, color_format) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Premultiplication and swizzle failed.");
+
+ lv_vglite_set_scissor(clip_area);
+
+ /*** Draw rectangle ***/
+ if(dsc->bg_grad.dir == (lv_grad_dir_t)LV_GRAD_DIR_NONE) {
+ err = vg_lite_draw(vgbuf, &path, VG_LITE_FILL_EVEN_ODD, &matrix, VG_LITE_BLEND_SRC_OVER, vgcol);
+ }
+ else {
+ err = vg_lite_draw_gradient(vgbuf, &path, VG_LITE_FILL_EVEN_ODD, &matrix, &gradient, VG_LITE_BLEND_SRC_OVER);
+ }
+ VG_LITE_ERR_RETURN_INV(err, "Draw gradient failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+
+ lv_vglite_disable_scissor();
+
+ err = vg_lite_clear_path(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Clear path failed.");
+
+ if(dsc->bg_grad.dir != (lv_grad_dir_t)LV_GRAD_DIR_NONE) {
+ err = vg_lite_clear_grad(&gradient);
+ VG_LITE_ERR_RETURN_INV(err, "Clear gradient failed.");
+ }
+
+ return LV_RES_OK;
+}
+
+lv_res_t lv_gpu_nxp_vglite_draw_border_generic(const lv_area_t * coords, const lv_area_t * clip_area,
+ const lv_draw_rect_dsc_t * dsc, bool border)
+{
+ vg_lite_error_t err = VG_LITE_SUCCESS;
+ vg_lite_color_t vgcol; /* vglite takes ABGR */
+ lv_coord_t radius = dsc->radius;
+ vg_lite_buffer_t * vgbuf = lv_vglite_get_dest_buf();
+
+ if(radius < 0)
+ return LV_RES_INV;
+
+ if(border) {
+ /* Draw border - only has radius if object has radius*/
+ lv_coord_t border_half = (lv_coord_t)floor(dsc->border_width / 2.0f);
+ if(radius > border_half)
+ radius = radius - border_half;
+ }
+ else {
+ /* Draw outline - always has radius, leave the same radius in the circle case */
+ lv_coord_t outline_half = (lv_coord_t)ceil(dsc->outline_width / 2.0f);
+ if(radius < (lv_coord_t)LV_RADIUS_CIRCLE - outline_half)
+ radius = radius + outline_half;
+ }
+
+ vg_lite_cap_style_t cap_style = (radius) ? VG_LITE_CAP_ROUND : VG_LITE_CAP_BUTT;
+ vg_lite_join_style_t join_style = (radius) ? VG_LITE_JOIN_ROUND : VG_LITE_JOIN_MITER;
+
+ /* Choose vglite blend mode based on given lvgl blend mode */
+ vg_lite_blend_t vglite_blend_mode = lv_vglite_get_blend_mode(dsc->blend_mode);
+
+ /*** Init path ***/
+ int32_t path_data[RECT_PATH_DATA_MAX_SIZE];
+ uint32_t path_data_size;
+ lv_vglite_create_rect_path_data(path_data, &path_data_size, radius, coords);
+ vg_lite_quality_t path_quality = dsc->radius > 0 ? VG_LITE_HIGH : VG_LITE_LOW;
+
+ vg_lite_path_t path;
+ err = vg_lite_init_path(&path, VG_LITE_S32, path_quality, path_data_size, path_data,
+ (vg_lite_float_t)clip_area->x1, (vg_lite_float_t)clip_area->y1,
+ ((vg_lite_float_t)clip_area->x2) + 1.0f, ((vg_lite_float_t)clip_area->y2) + 1.0f);
+ VG_LITE_ERR_RETURN_INV(err, "Init path failed.");
+
+ vg_lite_matrix_t matrix;
+ vg_lite_identity(&matrix);
+
+ lv_opa_t opa;
+ lv_color32_t col32;
+ lv_coord_t line_width;
+
+ if(border) {
+ opa = dsc->border_opa;
+ col32.full = lv_color_to32(dsc->border_color); /*Convert color to RGBA8888*/
+ line_width = dsc->border_width;
+ }
+ else {
+ opa = dsc->outline_opa;
+ col32.full = lv_color_to32(dsc->outline_color); /*Convert color to RGBA8888*/
+ line_width = dsc->outline_width;
+ }
+
+ vg_lite_buffer_format_t color_format = LV_COLOR_DEPTH == 16 ? VG_LITE_BGRA8888 : VG_LITE_ABGR8888;
+ if(lv_vglite_premult_and_swizzle(&vgcol, col32, opa, color_format) != LV_RES_OK)
+ VG_LITE_RETURN_INV("Premultiplication and swizzle failed.");
+
+ /*** Draw border ***/
+ err = vg_lite_set_draw_path_type(&path, VG_LITE_DRAW_STROKE_PATH);
+ VG_LITE_ERR_RETURN_INV(err, "Set draw path type failed.");
+
+ err = vg_lite_set_stroke(&path, cap_style, join_style, line_width, 8, NULL, 0, 0, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Set stroke failed.");
+
+ err = vg_lite_update_stroke(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Update stroke failed.");
+
+ lv_vglite_set_scissor(clip_area);
+
+ err = vg_lite_draw(vgbuf, &path, VG_LITE_FILL_NON_ZERO, &matrix, vglite_blend_mode, vgcol);
+ VG_LITE_ERR_RETURN_INV(err, "Draw border failed.");
+
+ if(lv_vglite_run() != LV_RES_OK)
+ VG_LITE_RETURN_INV("Run failed.");
+
+ lv_vglite_disable_scissor();
+
+ err = vg_lite_clear_path(&path);
+ VG_LITE_ERR_RETURN_INV(err, "Clear path failed.");
+
+ return LV_RES_OK;
+
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void lv_vglite_create_rect_path_data(int32_t * path_data, uint32_t * path_data_size,
+ lv_coord_t radius,
+ const lv_area_t * coords)
+{
+ lv_coord_t rect_width = lv_area_get_width(coords);
+ lv_coord_t rect_height = lv_area_get_height(coords);
+
+ /* Get the final radius. Can't be larger than the half of the shortest side */
+ int32_t shortest_side = LV_MIN(rect_width, rect_height);
+ int32_t final_radius = LV_MIN(radius, shortest_side / 2);
+
+ /* Path data element index */
+ uint8_t pidx = 0;
+
+ if((radius == (lv_coord_t)LV_RADIUS_CIRCLE) && (rect_width == rect_height)) {
+
+ /* Get the control point offset for rounded cases */
+ int32_t cpoff = (int32_t)((float)final_radius * BEZIER_OPTIM_CIRCLE);
+
+ /* Circle case */
+ /* Starting point */
+ path_data[pidx++] = VLC_OP_MOVE;
+ path_data[pidx++] = coords->x1 + final_radius;
+ path_data[pidx++] = coords->y1;
+
+ /* Top-right arc */
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = cpoff;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = final_radius - cpoff;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = final_radius;
+
+ /* Bottom-right arc*/
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = cpoff;
+ path_data[pidx++] = cpoff - final_radius;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = final_radius;
+
+ /* Bottom-left arc */
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = 0 - cpoff;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = cpoff - final_radius;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = 0 - final_radius;
+
+ /* Top-left arc*/
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = 0 - cpoff;
+ path_data[pidx++] = final_radius - cpoff;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = 0 - final_radius;
+
+ /* Ending point */
+ path_data[pidx++] = VLC_OP_END;
+ }
+ else if(radius > 0) {
+ /* Get the control point offset for rounded cases */
+ int32_t cpoff = (int32_t)((float)final_radius * BEZIER_OPTIM_CIRCLE);
+
+ /* Rounded rectangle case */
+ /* Starting point */
+ path_data[pidx++] = VLC_OP_MOVE;
+ path_data[pidx++] = coords->x1 + final_radius;
+ path_data[pidx++] = coords->y1;
+
+ /* Top side */
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x2 - final_radius + 1; // Extended for VGLite
+ path_data[pidx++] = coords->y1;
+
+ /* Top-right corner */
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = cpoff;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = final_radius - cpoff;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = final_radius;
+
+ /* Right side */
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x2 + 1; // Extended for VGLite
+ path_data[pidx++] = coords->y2 - final_radius + 1; // Extended for VGLite
+
+ /* Bottom-right corner*/
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = cpoff;
+ path_data[pidx++] = cpoff - final_radius;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = final_radius;
+
+ /* Bottom side */
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x1 + final_radius;
+ path_data[pidx++] = coords->y2 + 1; // Extended for VGLite
+
+ /* Bottom-left corner */
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = 0 - cpoff;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = cpoff - final_radius;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = 0 - final_radius;
+
+ /* Left side*/
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x1;
+ path_data[pidx++] = coords->y1 + final_radius;
+
+ /* Top-left corner */
+ path_data[pidx++] = VLC_OP_CUBIC_REL;
+ path_data[pidx++] = 0;
+ path_data[pidx++] = 0 - cpoff;
+ path_data[pidx++] = final_radius - cpoff;
+ path_data[pidx++] = 0 - final_radius;
+ path_data[pidx++] = final_radius;
+ path_data[pidx++] = 0 - final_radius;
+
+ /* Ending point */
+ path_data[pidx++] = VLC_OP_END;
+ }
+ else {
+ /* Non-rounded rectangle case */
+ /* Starting point */
+ path_data[pidx++] = VLC_OP_MOVE;
+ path_data[pidx++] = coords->x1;
+ path_data[pidx++] = coords->y1;
+
+ /* Top side */
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x2 + 1; // Extended for VGLite
+ path_data[pidx++] = coords->y1;
+
+ /* Right side */
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x2 + 1; // Extended for VGLite
+ path_data[pidx++] = coords->y2 + 1; // Extended for VGLite
+
+ /* Bottom side */
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x1;
+ path_data[pidx++] = coords->y2 + 1; // Extended for VGLite
+
+ /* Left side*/
+ path_data[pidx++] = VLC_OP_LINE;
+ path_data[pidx++] = coords->x1;
+ path_data[pidx++] = coords->y1;
+
+ /* Ending point */
+ path_data[pidx++] = VLC_OP_END;
+ }
+
+ /* Resulting path size */
+ *path_data_size = pidx * sizeof(int32_t);
+}
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_rect.h b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_rect.h
new file mode 100644
index 0000000..7958227
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_draw_vglite_rect.h
@@ -0,0 +1,97 @@
+/**
+ * @file lv_draw_vglite_rect.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2021-2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_DRAW_VGLITE_RECT_H
+#define LV_DRAW_VGLITE_RECT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "lv_vglite_utils.h"
+#include "../../lv_draw_rect.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Draw rectangle background with effects (rounded corners, gradient)
+ *
+ * @param[in] coords Coordinates of the rectangle background (relative to dest buff)
+ * @param[in] clip_area Clipping area with relative coordinates to dest buff
+ * @param[in] dsc Description of the rectangle background
+ *
+ * @retval LV_RES_OK Draw completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ *
+ */
+lv_res_t lv_gpu_nxp_vglite_draw_bg(const lv_area_t * coords, const lv_area_t * clip_area,
+ const lv_draw_rect_dsc_t * dsc);
+
+/**
+ * Draw rectangle border/outline shape with effects (rounded corners, opacity)
+ *
+ * @param[in] coords Coordinates of the rectangle border/outline (relative to dest buff)
+ * @param[in] clip_area Clipping area with relative coordinates to dest buff
+ * @param[in] dsc Description of the rectangle border/outline
+ * @param[in] border True for border, False for outline
+ *
+ * @retval LV_RES_OK Draw completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ *
+ */
+lv_res_t lv_gpu_nxp_vglite_draw_border_generic(const lv_area_t * coords, const lv_area_t * clip_area,
+ const lv_draw_rect_dsc_t * dsc, bool border);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_DRAW_VGLITE_RECT_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_vglite_buf.c b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_buf.c
new file mode 100644
index 0000000..e1ff6a2
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_buf.c
@@ -0,0 +1,141 @@
+/**
+ * @file lv_vglite_buf.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_vglite_buf.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+
+/*********************
+ * DEFINES
+ *********************/
+
+#if LV_COLOR_DEPTH == 16
+ #define VG_LITE_PX_FMT VG_LITE_RGB565
+#elif LV_COLOR_DEPTH == 32
+ #define VG_LITE_PX_FMT VG_LITE_BGRA8888
+#else
+ #error Only 16bit and 32bit color depth are supported. Set LV_COLOR_DEPTH to 16 or 32.
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static inline void lv_vglite_set_dest_buf(const lv_color_t * buf, const lv_area_t * area, lv_coord_t stride);
+static inline void lv_vglite_set_buf_ptr(vg_lite_buffer_t * vgbuf, const lv_color_t * buf);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+static vg_lite_buffer_t dest_vgbuf;
+static vg_lite_buffer_t src_vgbuf;
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_gpu_nxp_vglite_init_buf(const lv_color_t * buf, const lv_area_t * area, lv_coord_t stride)
+{
+ lv_vglite_set_dest_buf(buf, area, stride);
+}
+
+vg_lite_buffer_t * lv_vglite_get_dest_buf(void)
+{
+ return &dest_vgbuf;
+}
+
+vg_lite_buffer_t * lv_vglite_get_src_buf(void)
+{
+ return &src_vgbuf;
+}
+
+void lv_vglite_set_dest_buf_ptr(const lv_color_t * buf)
+{
+ lv_vglite_set_buf_ptr(&dest_vgbuf, buf);
+}
+
+void lv_vglite_set_src_buf_ptr(const lv_color_t * buf)
+{
+ lv_vglite_set_buf_ptr(&src_vgbuf, buf);
+}
+
+void lv_vglite_set_src_buf(const lv_color_t * buf, const lv_area_t * area, lv_coord_t stride)
+{
+ if(src_vgbuf.memory != (void *)buf)
+ lv_vglite_set_buf(&src_vgbuf, buf, area, stride);
+}
+
+void lv_vglite_set_buf(vg_lite_buffer_t * vgbuf, const lv_color_t * buf,
+ const lv_area_t * area, lv_coord_t stride)
+{
+ vgbuf->format = VG_LITE_PX_FMT;
+ vgbuf->tiled = VG_LITE_LINEAR;
+ vgbuf->image_mode = VG_LITE_NORMAL_IMAGE_MODE;
+ vgbuf->transparency_mode = VG_LITE_IMAGE_OPAQUE;
+
+ vgbuf->width = (int32_t)lv_area_get_width(area);
+ vgbuf->height = (int32_t)lv_area_get_height(area);
+ vgbuf->stride = (int32_t)(stride) * sizeof(lv_color_t);
+
+ lv_memset_00(&vgbuf->yuv, sizeof(vgbuf->yuv));
+
+ vgbuf->memory = (void *)buf;
+ vgbuf->address = (uint32_t)vgbuf->memory;
+ vgbuf->handle = NULL;
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static inline void lv_vglite_set_dest_buf(const lv_color_t * buf, const lv_area_t * area, lv_coord_t stride)
+{
+ lv_vglite_set_buf(&dest_vgbuf, buf, area, stride);
+}
+
+static inline void lv_vglite_set_buf_ptr(vg_lite_buffer_t * vgbuf, const lv_color_t * buf)
+{
+ vgbuf->memory = (void *)buf;
+ vgbuf->address = (uint32_t)vgbuf->memory;
+}
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_vglite_buf.h b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_buf.h
new file mode 100644
index 0000000..e89af1c
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_buf.h
@@ -0,0 +1,124 @@
+/**
+ * @file lv_vglite_buf.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_VGLITE_BUF_H
+#define LV_VGLITE_BUF_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "vg_lite.h"
+#include "../../sw/lv_draw_sw.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+/**
+ * Init vglite destination buffer. It will be done once per frame.
+ *
+ * @param[in] buf Destination buffer address (does not require alignment for VG_LITE_LINEAR mode)
+ * @param[in] area Destination buffer area (for width and height)
+ * @param[in] stride Stride of destination buffer
+ */
+void lv_gpu_nxp_vglite_init_buf(const lv_color_t * buf, const lv_area_t * area, lv_coord_t stride);
+
+/**
+ * Get vglite destination buffer pointer.
+ *
+ * @retval The vglite destination buffer
+ */
+vg_lite_buffer_t * lv_vglite_get_dest_buf(void);
+
+/**
+ * Get vglite source buffer pointer.
+ *
+ * @retval The vglite source buffer
+ */
+vg_lite_buffer_t * lv_vglite_get_src_buf(void);
+
+/**
+ * Set vglite destination buffer address only.
+ *
+ * @param[in] buf Destination buffer address (does not require alignment for VG_LITE_LINEAR mode)
+ */
+void lv_vglite_set_dest_buf_ptr(const lv_color_t * buf);
+
+/**
+ * Set vglite source buffer address only.
+ *
+ * @param[in] buf Source buffer address
+ */
+void lv_vglite_set_src_buf_ptr(const lv_color_t * buf);
+
+/**
+ * Set vglite source buffer. It will be done only if buffer addreess is different.
+ *
+ * @param[in] buf Source buffer address
+ * @param[in] area Source buffer area (for width and height)
+ * @param[in] stride Stride of source buffer
+ */
+void lv_vglite_set_src_buf(const lv_color_t * buf, const lv_area_t * area, lv_coord_t stride);
+
+/**
+ * Set vglite buffer.
+ *
+ * @param[in] vgbuf Address of the VGLite buffer object
+ * @param[in] buf Address of the memory for the VGLite buffer
+ * @param[in] area buffer area (for width and height)
+ * @param[in] stride buffer stride
+ */
+void lv_vglite_set_buf(vg_lite_buffer_t * vgbuf, const lv_color_t * buf,
+ const lv_area_t * area, lv_coord_t stride);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_VGLITE_BUF_H*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_vglite_utils.c b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_utils.c
new file mode 100644
index 0000000..adc9f77
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_utils.c
@@ -0,0 +1,149 @@
+/**
+ * @file lv_vglite_utils.c
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+
+#include "lv_vglite_utils.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "../../../core/lv_refr.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**
+ * Clean and invalidate cache.
+ */
+static inline void invalidate_cache(void);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_res_t lv_vglite_run(void)
+{
+ invalidate_cache();
+
+ VG_LITE_ERR_RETURN_INV(vg_lite_flush(), "Flush failed.");
+
+ return LV_RES_OK;
+}
+
+lv_res_t lv_vglite_premult_and_swizzle(vg_lite_color_t * vg_col32, lv_color32_t lv_col32, lv_opa_t opa,
+ vg_lite_buffer_format_t vg_col_format)
+{
+
+ lv_color32_t lv_col32_premul = lv_col32;
+ if(opa <= (lv_opa_t)LV_OPA_MAX) {
+ /* Only pre-multiply color if hardware pre-multiplication is not present */
+ if(!vg_lite_query_feature(gcFEATURE_BIT_VG_PE_PREMULTIPLY)) {
+ lv_col32_premul.ch.red = (uint8_t)(((uint16_t)lv_col32.ch.red * opa) >> 8);
+ lv_col32_premul.ch.green = (uint8_t)(((uint16_t)lv_col32.ch.green * opa) >> 8);
+ lv_col32_premul.ch.blue = (uint8_t)(((uint16_t)lv_col32.ch.blue * opa) >> 8);
+ }
+ lv_col32_premul.ch.alpha = opa;
+ }
+
+ switch(vg_col_format) {
+ case VG_LITE_BGRA8888:
+ *vg_col32 = lv_col32_premul.full;
+ break;
+ case VG_LITE_RGBA8888:
+ *vg_col32 = ((uint32_t)lv_col32_premul.ch.red << 24) | ((uint32_t)lv_col32_premul.ch.green << 16) |
+ ((uint32_t)lv_col32_premul.ch.blue << 8) | (uint32_t)lv_col32_premul.ch.alpha;
+ break;
+ case VG_LITE_ABGR8888:
+ *vg_col32 = ((uint32_t)lv_col32_premul.ch.alpha << 24) | ((uint32_t)lv_col32_premul.ch.blue << 16) |
+ ((uint32_t)lv_col32_premul.ch.green << 8) | (uint32_t)lv_col32_premul.ch.red;
+ break;
+ case VG_LITE_ARGB8888:
+ *vg_col32 = ((uint32_t)lv_col32_premul.ch.alpha << 24) | ((uint32_t)lv_col32_premul.ch.red << 16) |
+ ((uint32_t)lv_col32_premul.ch.green << 8) | (uint32_t)lv_col32_premul.ch.blue;
+ break;
+ default:
+ return LV_RES_INV;
+ }
+
+ return LV_RES_OK;
+}
+
+vg_lite_blend_t lv_vglite_get_blend_mode(lv_blend_mode_t lv_blend_mode)
+{
+ vg_lite_blend_t vg_blend_mode;
+ switch(lv_blend_mode) {
+ case LV_BLEND_MODE_ADDITIVE:
+ vg_blend_mode = VG_LITE_BLEND_ADDITIVE;
+ break;
+ case LV_BLEND_MODE_SUBTRACTIVE:
+ vg_blend_mode = VG_LITE_BLEND_SUBTRACT;
+ break;
+ case LV_BLEND_MODE_MULTIPLY:
+ vg_blend_mode = VG_LITE_BLEND_MULTIPLY;
+ break;
+ case LV_BLEND_MODE_REPLACE:
+ vg_blend_mode = VG_LITE_BLEND_NONE;
+ break;
+ default:
+ vg_blend_mode = VG_LITE_BLEND_SRC_OVER;
+ break;
+ }
+ return vg_blend_mode;
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static inline void invalidate_cache(void)
+{
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ if(disp->driver->clean_dcache_cb)
+ disp->driver->clean_dcache_cb(disp->driver);
+}
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp/vglite/lv_vglite_utils.h b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_utils.h
new file mode 100644
index 0000000..3122d68
--- /dev/null
+++ b/lib/lvgl/src/draw/nxp/vglite/lv_vglite_utils.h
@@ -0,0 +1,198 @@
+/**
+ * @file lv_vglite_utils.h
+ *
+ */
+
+/**
+ * MIT License
+ *
+ * Copyright 2022, 2023 NXP
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next paragraph)
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef LV_VGLITE_UTILS_H
+#define LV_VGLITE_UTILS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lv_conf_internal.h"
+
+#if LV_USE_GPU_NXP_VG_LITE
+#include "vg_lite.h"
+#include "../../sw/lv_draw_sw.h"
+#include "../../../misc/lv_log.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+#ifndef LV_GPU_NXP_VG_LITE_LOG_ERRORS
+/** Enable logging of VG-Lite errors (\see LV_LOG_ERROR)*/
+#define LV_GPU_NXP_VG_LITE_LOG_ERRORS 1
+#endif
+
+#ifndef LV_GPU_NXP_VG_LITE_LOG_TRACES
+/** Enable logging of VG-Lite traces (\see LV_LOG_ERROR)*/
+#define LV_GPU_NXP_VG_LITE_LOG_TRACES 0
+#endif
+
+/* The optimal Bezier control point offset for radial unit
+ * see: https://spencermortensen.com/articles/bezier-circle/
+ **/
+#define BEZIER_OPTIM_CIRCLE 0.551915024494f
+
+/* Draw lines for control points of Bezier curves */
+#define BEZIER_DBG_CONTROL_POINTS 0
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**
+ * Enable scissor and set the clipping box.
+ *
+ * @param[in] clip_area Clip area with relative coordinates of destination buffer
+ */
+static inline void lv_vglite_set_scissor(const lv_area_t * clip_area);
+
+/**
+ * Disable scissor.
+ */
+static inline void lv_vglite_disable_scissor(void);
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Premultiplies and swizzles given LVGL 32bit color to obtain vglite color.
+ *
+ * @param[in/out] vg_col32 The obtained vglite color
+ * @param[in] lv_col32 The initial LVGL 32bit color
+ * @param[in] opa The opacity to premultiply with
+ * @param[in] vg_col_format The format of the resulting vglite color
+ *
+ * @retval LV_RES_OK Operation completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_vglite_premult_and_swizzle(vg_lite_color_t * vg_col32, lv_color32_t lv_col32, lv_opa_t opa,
+ vg_lite_buffer_format_t vg_col_format);
+
+/**
+ * Get vglite blend mode.
+ *
+ * @param[in] lv_blend_mode The LVGL blend mode
+ *
+ * @retval The vglite blend mode
+ */
+vg_lite_blend_t lv_vglite_get_blend_mode(lv_blend_mode_t lv_blend_mode);
+
+/**
+ * Clear cache and flush command to VG-Lite.
+ *
+ * @retval LV_RES_OK Run completed
+ * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
+ */
+lv_res_t lv_vglite_run(void);
+
+/**********************
+ * MACROS
+ **********************/
+
+#define VG_LITE_COND_STOP(cond, txt) \
+ do { \
+ if (cond) { \
+ LV_LOG_ERROR("%s. STOP!", txt); \
+ for ( ; ; ); \
+ } \
+ } while(0)
+
+#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
+#define VG_LITE_ERR_RETURN_INV(err, fmt, ...) \
+ do { \
+ if(err != VG_LITE_SUCCESS) { \
+ LV_LOG_ERROR(fmt" (err = %d)", \
+ err, ##__VA_ARGS__); \
+ return LV_RES_INV; \
+ } \
+ } while (0)
+#else
+#define VG_LITE_ERR_RETURN_INV(err, fmt, ...) \
+ do { \
+ if(err != VG_LITE_SUCCESS) { \
+ return LV_RES_INV; \
+ } \
+ }while(0)
+#endif /*LV_GPU_NXP_VG_LITE_LOG_ERRORS*/
+
+#if LV_GPU_NXP_VG_LITE_LOG_TRACES
+#define VG_LITE_LOG_TRACE(fmt, ...) \
+ do { \
+ LV_LOG(fmt, ##__VA_ARGS__); \
+ } while (0)
+
+#define VG_LITE_RETURN_INV(fmt, ...) \
+ do { \
+ LV_LOG_ERROR(fmt, ##__VA_ARGS__); \
+ return LV_RES_INV; \
+ } while (0)
+#else
+#define VG_LITE_LOG_TRACE(fmt, ...) \
+ do { \
+ } while (0)
+#define VG_LITE_RETURN_INV(fmt, ...) \
+ do { \
+ return LV_RES_INV; \
+ }while(0)
+#endif /*LV_GPU_NXP_VG_LITE_LOG_TRACES*/
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static inline void lv_vglite_set_scissor(const lv_area_t * clip_area)
+{
+ vg_lite_enable_scissor();
+ vg_lite_set_scissor((int32_t)clip_area->x1, (int32_t)clip_area->y1,
+ (int32_t)lv_area_get_width(clip_area),
+ (int32_t)lv_area_get_height(clip_area));
+}
+
+static inline void lv_vglite_disable_scissor(void)
+{
+ vg_lite_disable_scissor();
+}
+
+#endif /*LV_USE_GPU_NXP_VG_LITE*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_VGLITE_UTILS_H*/
diff --git a/lib/lvgl/src/draw/nxp_pxp/lv_draw_nxp_pxp.mk b/lib/lvgl/src/draw/nxp_pxp/lv_draw_nxp_pxp.mk
deleted file mode 100644
index 446e852..0000000
--- a/lib/lvgl/src/draw/nxp_pxp/lv_draw_nxp_pxp.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-CSRCS += lv_gpu_nxp_pxp.c
-CSRCS += lv_gpu_nxp_pxp_osa.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_pxp
-VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_pxp
-
-CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_pxp"
diff --git a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp.c b/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp.c
deleted file mode 100644
index a6fb49b..0000000
--- a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/**
- * @file lv_gpu_nxp_pxp.c
- *
- */
-
-/**
- * MIT License
- *
- * Copyright (c) 2020 NXP
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next paragraph)
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_gpu_nxp_pxp.h"
-
-#if LV_USE_GPU_NXP_PXP
-
-#include "../misc/lv_mem.h"
-#include "../misc/lv_log.h"
-
-#include "fsl_pxp.h"
-#include "fsl_cache.h"
-
-/*********************
- * DEFINES
- *********************/
-
-#if LV_COLOR_16_SWAP
- #error Color swap not implemented. Disable LV_COLOR_16_SWAP feature.
-#endif
-
-#if LV_COLOR_DEPTH==16
- #define PXP_OUT_PIXEL_FORMAT kPXP_OutputPixelFormatRGB565
- #define PXP_AS_PIXEL_FORMAT kPXP_AsPixelFormatRGB565
- #define PXP_PS_PIXEL_FORMAT kPXP_PsPixelFormatRGB565
-#else
- #error Only 16bit color depth is supported. Set LV_COLOR_DEPTH to 16.
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-static void lv_gpu_nxp_pxp_run(void);
-static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src,
- lv_coord_t src_width,
- lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa, lv_color_t recolor, lv_opa_t recolorOpa);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-static bool colorKeyEnabled = false;
-static uint32_t colorKey = 0x0;
-
-static bool recolorEnabled = false;
-static lv_color_t recolor = {.full = 0x0};
-static lv_opa_t recolorOpa = 0x0;
-
-static lv_nxp_pxp_cfg_t pxp_cfg;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Reset and initialize PXP device. This function should be called as a part
- * of display init sequence.
- *
- * @return LV_RES_OK: PXP init ok; LV_RES_INV: init error. See error log for more information.
- */
-lv_res_t lv_gpu_nxp_pxp_init(lv_nxp_pxp_cfg_t * cfg)
-{
- if(!cfg || !cfg->pxp_interrupt_deinit || !cfg->pxp_interrupt_init || !cfg->pxp_run) {
- LV_LOG_ERROR("PXP configuration error. Check callback pointers.");
- return LV_RES_INV;
- }
-
- PXP_Init(PXP);
- PXP_EnableCsc1(PXP, false); /*Disable CSC1, it is enabled by default.*/
- PXP_EnableInterrupts(PXP, kPXP_CompleteInterruptEnable);
-
- pxp_cfg = *cfg;
- if(pxp_cfg.pxp_interrupt_init() != LV_RES_OK) {
- PXP_Deinit(PXP);
- LV_LOG_ERROR("PXP interrupt init error. Check pxp_interrupt_init callback.");
- return LV_RES_INV;
- }
-
- colorKey = lv_color_to32(LV_COLOR_CHROMA_KEY);
-
- return LV_RES_OK;
-}
-
-/**
- * Disable PXP device. Should be called during display deinit sequence.
- */
-void lv_gpu_nxp_pxp_deinit(void)
-{
- pxp_cfg.pxp_interrupt_deinit();
- PXP_DisableInterrupts(PXP, kPXP_CompleteInterruptEnable);
- PXP_Deinit(LV_GPU_NXP_PXP_ID);
-}
-
-/**
- * Fill area, with optional opacity.
- *
- * @param[in/out] dest_buf destination buffer
- * @param[in] dest_width width (stride) of destination buffer in pixels
- * @param[in] fill_area area to fill
- * @param[in] color color
- * @param[in] opa transparency of the color
- */
-void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_area_t * fill_area, lv_color_t color,
- lv_opa_t opa)
-{
- PXP_Init(LV_GPU_NXP_PXP_ID);
- PXP_EnableCsc1(LV_GPU_NXP_PXP_ID, false); /*Disable CSC1, it is enabled by default.*/
- PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /*Block size 16x16 for higher performance*/
-
- /*OUT buffer configure*/
- pxp_output_buffer_config_t outputConfig = {
- .pixelFormat = PXP_OUT_PIXEL_FORMAT,
- .interlacedMode = kPXP_OutputProgressive,
- .buffer0Addr = (uint32_t)(dest_buf + dest_width * fill_area->y1 + fill_area->x1),
- .buffer1Addr = (uint32_t)NULL,
- .pitchBytes = dest_width * sizeof(lv_color_t),
- .width = fill_area->x2 - fill_area->x1 + 1,
- .height = fill_area->y2 - fill_area->y1 + 1,
- };
-
- PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputConfig);
-
- if(opa > LV_OPA_MAX) {
- /*Simple color fill without opacity - AS disabled, PS as color generator*/
- PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /*Disable AS.*/
- PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U); /*Disable PS.*/
- PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color));
- }
- else {
- /*Fill with opacity - AS used as source (same as OUT), PS used as color generator, blended together*/
- pxp_as_buffer_config_t asBufferConfig;
- pxp_porter_duff_config_t pdConfig;
-
- /*Set AS to OUT*/
- asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT;
- asBufferConfig.bufferAddr = (uint32_t)outputConfig.buffer0Addr;
- asBufferConfig.pitchBytes = outputConfig.pitchBytes;
-
- PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
- PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, fill_area->x2 - fill_area->x1 + 1,
- fill_area->y2 - fill_area->y1 + 1);
-
- /*Disable PS, use as color generator*/
- PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
- PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(color));
-
- /*Configure Porter-Duff blending - For RGB 565 only!*/
- pdConfig.enable = 1;
- pdConfig.dstColorMode = kPXP_PorterDuffColorStraight;
- pdConfig.srcColorMode = kPXP_PorterDuffColorStraight;
- pdConfig.dstGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha;
- pdConfig.srcGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha;
- pdConfig.srcFactorMode = kPXP_PorterDuffFactorStraight;
- pdConfig.dstFactorMode = kPXP_PorterDuffFactorStraight;
- pdConfig.srcGlobalAlpha = opa;
- pdConfig.dstGlobalAlpha = 255 - opa;
- pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
- pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
- PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig);
- }
-
- lv_gpu_nxp_pxp_run(); /*Start PXP task*/
-}
-
-/**
- * @brief BLock Image Transfer - copy rectangular image from src buffer to dst buffer with effects.
- *
- * By default, image is copied directly, with optional opacity configured by \p opa.
- * Color keying can be enabled by calling lv_gpu_nxp_pxp_enable_color_key() before calling this function.
- * Recoloring can be enabled by calling lv_gpu_nxp_pxp_enable_recolor() before calling this function.
- * Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
- *
- * @param[in/out] dest destination buffer
- * @param[in] dest_width width (stride) of destination buffer in pixels
- * @param[in] src source buffer
- * @param[in] src_with width (stride) of source buffer in pixels
- * @param[in] copy_w width of area to be copied from src to dest
- * @param[in] copy_h height of area to be copied from src to dest
- * @param[in] opa opacity of the result
- */
-void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src, lv_coord_t src_width,
- lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa)
-{
-
- if(recolorEnabled) { /*switch to recolor version of blit*/
- lv_gpu_nxp_pxp_blit_recolor(dest, dest_width, src, src_width, copy_width, copy_height, opa, recolor, recolorOpa);
- return;
- };
-
- PXP_Init(PXP);
- PXP_EnableCsc1(PXP, false); /*Disable CSC1, it is enabled by default.*/
- PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /*block size 16x16 for higher performance*/
-
- pxp_output_buffer_config_t outputBufferConfig;
- pxp_as_buffer_config_t asBufferConfig;
- pxp_as_blend_config_t asBlendConfig;
-
- asBlendConfig.alpha = opa;
- asBlendConfig.invertAlpha = false;
- asBlendConfig.alphaMode = kPXP_AlphaRop;
- asBlendConfig.ropMode = kPXP_RopMergeAs;
-
- if(opa >= LV_OPA_MAX && !colorKeyEnabled) {
- /*Simple blit, no effect - Disable PS buffer*/
- PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
- }
- else {
- /*Alpha blending or color keying enabled - PS must be enabled to fetch background pixels
- PS and OUT buffers are the same, blend will be done in-place*/
- pxp_ps_buffer_config_t psBufferConfig = {
- .pixelFormat = PXP_PS_PIXEL_FORMAT,
- .swapByte = false,
- .bufferAddr = (uint32_t)dest,
- .bufferAddrU = 0U,
- .bufferAddrV = 0U,
- .pitchBytes = dest_width * sizeof(lv_color_t)
- };
- asBlendConfig.alphaMode = kPXP_AlphaOverride;
- PXP_SetProcessSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &psBufferConfig);
- PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1, copy_height - 1);
- }
-
- /*AS buffer - source image*/
- asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT;
- asBufferConfig.bufferAddr = (uint32_t)src;
- asBufferConfig.pitchBytes = src_width * sizeof(lv_color_t);
- PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
- PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1U, copy_height - 1U);
- PXP_SetAlphaSurfaceBlendConfig(LV_GPU_NXP_PXP_ID, &asBlendConfig);
-
- if(colorKeyEnabled) {
- PXP_SetAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, colorKey, colorKey);
- }
- PXP_EnableAlphaSurfaceOverlayColorKey(LV_GPU_NXP_PXP_ID, colorKeyEnabled);
-
- /*Output buffer.*/
- outputBufferConfig.pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT;
- outputBufferConfig.interlacedMode = kPXP_OutputProgressive;
- outputBufferConfig.buffer0Addr = (uint32_t)dest;
- outputBufferConfig.buffer1Addr = (uint32_t)0U;
- outputBufferConfig.pitchBytes = dest_width * sizeof(lv_color_t);
- outputBufferConfig.width = copy_width;
- outputBufferConfig.height = copy_height;
- PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig);
-
- lv_gpu_nxp_pxp_run(); /* Start PXP task */
-}
-
-/**
- * @brief Enable color keying for subsequent calls to lv_gpu_nxp_pxp_blit()
- *
- * Color key is defined by symbol in lv_conf.h
- */
-void lv_gpu_nxp_pxp_enable_color_key(void)
-{
- colorKeyEnabled = true;
-}
-
-/**
- * @brief Disable color keying for subsequent calls to lv_gpu_nxp_pxp_blit()
- *
- */
-void lv_gpu_nxp_pxp_disable_color_key(void)
-{
- colorKeyEnabled = false;
-}
-
-/**
- * @brief Enable recolor feature for subsequent calls to lv_gpu_nxp_pxp_blit()
- *
- * @param[in] color recolor value
- * @param[in] opa effect opacity
- */
-void lv_gpu_nxp_pxp_enable_recolor(lv_color_t color, lv_opa_t opa)
-{
- recolorEnabled = true;
- recolor = color;
- recolorOpa = opa;
-
-}
-
-/**
- * @brief Disable recolor feature for subsequent calls to lv_gpu_nxp_pxp_blit()
- */
-void lv_gpu_nxp_pxp_disable_recolor(void)
-{
- recolorEnabled = false;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * @brief Start PXP job and wait for results
- *
- * Function used internally to start PXP task according current device
- * configuration.
- */
-static void lv_gpu_nxp_pxp_run(void)
-{
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
-
- if(disp && disp->driver->clean_dcache_cb) { /* Clean & invalidate cache */
- disp->driver->clean_dcache_cb(disp->driver);
- }
-
- pxp_cfg.pxp_run();
-}
-
-/**
- * @brief BLock Image Transfer - copy rectangular image from src buffer to dst buffer with recoloring.
- *
- * Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
- *
- * @param[in/out] dest destination buffer
- * @param[in] dest_width width (stride) of destination buffer in pixels
- * @param[in] src source buffer
- * @param[in] src_with width (stride) of source buffer in pixels
- * @param[in] copy_w width of area to be copied from src to dest
- * @param[in] copy_h height of area to be copied from src to dest
- * @param[in] opa opacity of the result
- * @param[in] recolor recolor value
- * @param[in] recolorOpa effect opacity
- */
-static void lv_gpu_nxp_pxp_blit_recolor(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src,
- lv_coord_t src_width,
- lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa, lv_color_t recolor, lv_opa_t recolorOpa)
-{
- pxp_output_buffer_config_t outputBufferConfig;
- pxp_as_buffer_config_t asBufferConfig;
-
- if(colorKeyEnabled) {
- /*should never get here, recolor & color keying not supported. Draw black box instead.*/
- const lv_area_t fill_area = {.x1 = 0, .y1 = 0, .x2 = copy_width - 1, .y2 = copy_height - 1};
- lv_gpu_nxp_pxp_fill(dest, dest_width, &fill_area, lv_color_black(), LV_OPA_MAX);
- LV_LOG_WARN("Recoloring and color keying is not supported. Black rectangle rendered.");
- return ;
- }
- else {
- /*Recoloring without color keying*/
- if(opa > LV_OPA_MAX) {
- /*Recolor with full opacity - AS source image, PS color generator, OUT destination*/
- PXP_Init(PXP);
- PXP_EnableCsc1(PXP, false); /*Disable CSC1, it is enabled by default.*/
- PXP_SetProcessBlockSize(PXP, kPXP_BlockSize16); /*block size 16x16 for higher performance*/
-
- /*AS buffer - source image*/
- asBufferConfig.pixelFormat = PXP_AS_PIXEL_FORMAT;
- asBufferConfig.bufferAddr = (uint32_t)src;
- asBufferConfig.pitchBytes = src_width * sizeof(lv_color_t);
- PXP_SetAlphaSurfaceBufferConfig(LV_GPU_NXP_PXP_ID, &asBufferConfig);
- PXP_SetAlphaSurfacePosition(LV_GPU_NXP_PXP_ID, 0U, 0U, copy_width - 1U, copy_height - 1U);
-
- /*Disable PS buffer, use as color generator*/
- PXP_SetProcessSurfacePosition(LV_GPU_NXP_PXP_ID, 0xFFFFU, 0xFFFFU, 0U, 0U);
- PXP_SetProcessSurfaceBackGroundColor(LV_GPU_NXP_PXP_ID, lv_color_to32(recolor));
-
- /*Output buffer*/
- outputBufferConfig.pixelFormat = (pxp_output_pixel_format_t)PXP_OUT_PIXEL_FORMAT;
- outputBufferConfig.interlacedMode = kPXP_OutputProgressive;
- outputBufferConfig.buffer0Addr = (uint32_t)dest;
- outputBufferConfig.buffer1Addr = (uint32_t)0U;
- outputBufferConfig.pitchBytes = dest_width * sizeof(lv_color_t);
- outputBufferConfig.width = copy_width;
- outputBufferConfig.height = copy_height;
- PXP_SetOutputBufferConfig(LV_GPU_NXP_PXP_ID, &outputBufferConfig);
-
- pxp_porter_duff_config_t pdConfig;
-
- /*Configure Porter-Duff blending - For RGB 565 only!*/
- pdConfig.enable = 1;
- pdConfig.dstColorMode = kPXP_PorterDuffColorStraight;
- pdConfig.srcColorMode = kPXP_PorterDuffColorStraight;
- pdConfig.dstGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha;
- pdConfig.srcGlobalAlphaMode = kPXP_PorterDuffGlobalAlpha;
- pdConfig.srcFactorMode = kPXP_PorterDuffFactorStraight;
- pdConfig.dstFactorMode = kPXP_PorterDuffFactorStraight;
- pdConfig.srcGlobalAlpha = recolorOpa;
- pdConfig.dstGlobalAlpha = 255 - recolorOpa;
- pdConfig.srcAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
- pdConfig.dstAlphaMode = kPXP_PorterDuffAlphaStraight; /*don't care*/
- PXP_SetPorterDuffConfig(LV_GPU_NXP_PXP_ID, &pdConfig);
-
- lv_gpu_nxp_pxp_run(); /*Start PXP task*/
-
- }
- else {
- /*Recolor with transparency*/
-
- /*Step 1: Recolor with full opacity to temporary buffer*/
- lv_color_t * tmpBuf = (lv_color_t *)lv_mem_buf_get(copy_width * copy_height * sizeof(lv_color_t));
- lv_gpu_nxp_pxp_blit_recolor(tmpBuf, copy_width, src, src_width, copy_width, copy_height, LV_OPA_COVER, recolor,
- recolorOpa);
-
- /*Step 2: BLIT temporary results with required opacity to output*/
- lv_gpu_nxp_pxp_disable_recolor(); /*make sure to take BLIT path, not the recolor*/
- lv_gpu_nxp_pxp_blit(dest, dest_width, tmpBuf, copy_width, copy_width, copy_height, opa);
- lv_gpu_nxp_pxp_enable_recolor(recolor, recolorOpa); /*restore state*/
-
- /*Step 3: Clean-up memory*/
- lv_mem_buf_release(tmpBuf);
- }
- }
-}
-
-#endif /* LV_USE_GPU_NXP_PXP */
diff --git a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp.h b/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp.h
deleted file mode 100644
index 8d81288..0000000
--- a/lib/lvgl/src/draw/nxp_pxp/lv_gpu_nxp_pxp.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * @file lv_gpu_nxp_pxp.h
- *
- */
-
-/**
- * MIT License
- *
- * Copyright (c) 2020 NXP
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next paragraph)
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef LV_SRC_LV_GPU_LV_GPU_NXP_PXP_H_
-#define LV_SRC_LV_GPU_LV_GPU_NXP_PXP_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "../../lv_conf_internal.h"
-
-#if LV_USE_GPU_NXP_PXP
-
-#include "../misc/lv_area.h"
-#include "../misc/lv_color.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/** PXP module instance to use*/
-#define LV_GPU_NXP_PXP_ID PXP
-
-/** PXP interrupt line I*/
-#define LV_GPU_NXP_PXP_IRQ_ID PXP_IRQn
-
-#ifndef LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT
-/** Minimum area (in pixels) for image copy with 100% opacity to be handled by PXP*/
-#define LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT
-/** Minimum area (in pixels) for image copy with transparency to be handled by PXP*/
-#define LV_GPU_NXP_PXP_BLIT_OPA_SIZE_LIMIT 16
-#endif
-
-#ifndef LV_GPU_NXP_PXP_BUFF_SYNC_BLIT_SIZE_LIMIT
-/** Minimum invalidated area (in pixels) to be synchronized by PXP during buffer sync */
-#define LV_GPU_NXP_PXP_BUFF_SYNC_BLIT_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_PXP_FILL_SIZE_LIMIT
-/** Minimum area (in pixels) to be filled by PXP with 100% opacity*/
-#define LV_GPU_NXP_PXP_FILL_SIZE_LIMIT 64
-#endif
-
-#ifndef LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT
-/** Minimum area (in pixels) to be filled by PXP with transparency*/
-#define LV_GPU_NXP_PXP_FILL_OPA_SIZE_LIMIT 32
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-/**
- * NXP PXP device configuration - call-backs used for
- * interrupt init/wait/deinit.
- */
-typedef struct {
- /** Callback for PXP interrupt initialization*/
- lv_res_t (*pxp_interrupt_init)(void);
-
- /** Callback for PXP interrupt de-initialization*/
- void (*pxp_interrupt_deinit)(void);
-
- /** Callback that should start PXP and wait for operation complete*/
- void (*pxp_run)(void);
-} lv_nxp_pxp_cfg_t;
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Reset and initialize PXP device. This function should be called as a part
- * of display init sequence.
- *
- * @return LV_RES_OK: PXP init ok; LV_RES_INV: init error. See error log for more information.
- */
-lv_res_t lv_gpu_nxp_pxp_init(lv_nxp_pxp_cfg_t * cfg);
-
-/**
- * Disable PXP device. Should be called during display deinit sequence.
- */
-void lv_gpu_nxp_pxp_deinit(void);
-
-/**
- * Fill area, with optional opacity.
- *
- * @param[in/out] dest_buf destination buffer
- * @param[in] dest_width width (stride) of destination buffer in pixels
- * @param[in] fill_area area to fill
- * @param[in] color color
- * @param[in] opa transparency of the color
- */
-void lv_gpu_nxp_pxp_fill(lv_color_t * dest_buf, lv_coord_t dest_width, const lv_area_t * fill_area, lv_color_t color,
- lv_opa_t opa);
-
-/**
- * @brief BLock Image Transfer - copy rectangular image from src buffer to dst buffer with effects.
- *
- * By default, image is copied directly, with optional opacity configured by \p opa.
- * Color keying can be enabled by calling lv_gpu_nxp_pxp_enable_color_key() before calling this function.
- * Recoloring can be enabled by calling lv_gpu_nxp_pxp_enable_recolor() before calling this function.
- * Note that color keying and recoloring at the same time is not supported and black rectangle is rendered.
- *
- * @param[in/out] dest destination buffer
- * @param[in] dest_width width (stride) of destination buffer in pixels
- * @param[in] src source buffer
- * @param[in] src_with width (stride) of source buffer in pixels
- * @param[in] copy_w width of area to be copied from src to dest
- * @param[in] copy_h height of area to be copied from src to dest
- * @param[in] opa opacity of the result
- */
-void lv_gpu_nxp_pxp_blit(lv_color_t * dest, lv_coord_t dest_width, const lv_color_t * src, lv_coord_t src_width,
- lv_coord_t copy_width, lv_coord_t copy_height, lv_opa_t opa);
-
-/**
- * @brief Enable color keying for subsequent calls to lv_gpu_nxp_pxp_blit()
- *
- * Color key is defined by LV_COLOR_TRANSP symbol in lv_conf.h
- */
-void lv_gpu_nxp_pxp_enable_color_key(void);
-
-/**
- * @brief Disable color keying for subsequent calls to lv_gpu_nxp_pxp_blit()
- *
- */
-void lv_gpu_nxp_pxp_disable_color_key(void);
-
-/**
- * @brief Enable recolor feature for subsequent calls to lv_gpu_nxp_pxp_blit()
- *
- * @param[in] color recolor value
- * @param[in] opa effect opacity
- */
-void lv_gpu_nxp_pxp_enable_recolor(lv_color_t color, lv_opa_t opa);
-
-/**
- * @brief Disable recolor feature for subsequent calls to lv_gpu_nxp_pxp_blit()
- */
-void lv_gpu_nxp_pxp_disable_recolor(void);
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif /*LV_USE_GPU_NXP_PXP*/
-
-#ifdef __cplusplus
-} /*extern "C"*/
-#endif
-
-#endif /*LV_SRC_LV_GPU_LV_GPU_NXP_PXP_H_*/
diff --git a/lib/lvgl/src/draw/nxp_vglite/lv_draw_nxp_vglite.mk b/lib/lvgl/src/draw/nxp_vglite/lv_draw_nxp_vglite.mk
deleted file mode 100644
index 95ee9a5..0000000
--- a/lib/lvgl/src/draw/nxp_vglite/lv_draw_nxp_vglite.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-CSRCS += lv_gpu_nxp_vglite.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_vglite
-VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_vglite
-
-CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp_vglite"
diff --git a/lib/lvgl/src/draw/nxp_vglite/lv_gpu_nxp_vglite.c b/lib/lvgl/src/draw/nxp_vglite/lv_gpu_nxp_vglite.c
deleted file mode 100644
index 43dd881..0000000
--- a/lib/lvgl/src/draw/nxp_vglite/lv_gpu_nxp_vglite.c
+++ /dev/null
@@ -1,770 +0,0 @@
-/**
- * @file lv_gpu_nxp_vglite.c
- *
- */
-
-/**
- * MIT License
- *
- * Copyright (c) 2020 NXP
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next paragraph)
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_gpu_nxp_vglite.h"
-
-#if LV_USE_GPU_NXP_VG_LITE
-
-#include "lvgl.h"
-#include "../misc/lv_log.h"
-#include "fsl_cache.h"
-#include "vg_lite.h"
-#include "fsl_debug_console.h"
-
-/*********************
- * DEFINES
- *********************/
-
-#if LV_COLOR_DEPTH==16
- #define VGLITE_PX_FMT VG_LITE_RGB565
-#else
- #error Only 16bit color depth is supported. Set LV_COLOR_DEPTH to 16.
-#endif
-
-/* Enable BLIT quality degradation workaround for RT595 */
-#define RT595_BLIT_WRKRND_ENABLED 1
-
-/* If LV_HOR_RES_MAX/LV_VER_RES_MAX is higher than this value, workaround will be enabled */
-#define RT595_BLIT_WRKRND_THR 352
-
-/* Print detailed info to SDK console (NOT to LVGL log system) */
-#define BLIT_DBG_VERBOSE 0
-
-/* Draw rectangles around BLIT tiles */
-#define BLIT_DBG_AREAS 0
-
-/* Redirect PRINT to SDK PRINTF */
-#define PRINT PRINTF
-
-/* Verbose debug print */
-#if BLIT_DBG_VERBOSE
- #define PRINT_BLT PRINTF
-#else
- #define PRINT_BLT(...)
-#endif
-
-/* Internal compound symbol */
-#if (defined(CPU_MIMXRT595SFFOB) || defined(CPU_MIMXRT595SFFOB_cm33) || \
- defined(CPU_MIMXRT595SFFOC) || defined(CPU_MIMXRT595SFFOC_cm33)) && \
- ((LV_HOR_RES_MAX > RT595_BLIT_WRKRND_THR) || (LV_VER_RES_MAX > RT595_BLIT_WRKRND_THR)) && \
- RT595_BLIT_WRKRND_ENABLED
-#define _BLIT_SPLIT_ENABLED 1
-#else
-#define _BLIT_SPLIT_ENABLED 0
-#endif
-
-/* BLIT split threshold - BLITs with width or height higher than this value will be done
- * in multiple steps. Value must be 16-aligned. Don't change.
- * */
-#define LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR 352
-
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-static lv_res_t _init_vg_buf(vg_lite_buffer_t * dst, uint32_t width, uint32_t height, uint32_t stride,
- const lv_color_t * ptr, bool source);
-
-static lv_res_t _lv_gpu_nxp_vglite_blit_single(lv_gpu_nxp_vglite_blit_info_t * blit);
-#if _BLIT_SPLIT_ENABLED
-static void _align_x(lv_area_t * area, lv_color_t ** buf);
-static void _align_y(lv_area_t * area, lv_color_t ** buf, uint32_t stridePx);
-static void _sw_blit(lv_gpu_nxp_vglite_blit_info_t * blit);
-#if BLIT_DBG_AREAS
-static void _draw_rectangle(lv_color_t * dest_buf, lv_coord_t dest_width, lv_coord_t dest_height,
- lv_area_t * fill_area, lv_color_t color);
-#endif
-static lv_res_t _lv_gpu_nxp_vglite_check_blit(lv_gpu_nxp_vglite_blit_info_t * blit);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-#define CHECK(cond, txt) \
- do { \
- if (cond) { \
- PRINT("%s. STOP!\n", txt); \
- for ( ; ; ); \
- } \
- } while(0)
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/***
- * Fills rectangular area in buffer.
- * @param[in] dest_buf Destination buffer pointer (must be aligned on 32 bytes)
- * @param[in] dest_width Destination buffer width in pixels (must be aligned on 16 px)
- * @param[in] dest_height Destination buffer height in pixels
- * @param[in] fill_area Area to be filled
- * @param[in] color Fill color
- * @param[in] opa Opacity (255 = full, 128 = 50% background/50% color, 0 = no fill)
- * @retval LV_RES_OK Fill completed
- * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
- */
-lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv_coord_t dest_height,
- const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa)
-{
- vg_lite_buffer_t rt;
- vg_lite_rectangle_t rect;
- vg_lite_error_t err = VG_LITE_SUCCESS;
- lv_color32_t col32 = {.full = lv_color_to32(color)}; /*Convert color to RGBA8888*/
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
-
- if(_init_vg_buf(&rt, (uint32_t) dest_width, (uint32_t) dest_height, (uint32_t) dest_width * sizeof(lv_color_t),
- (const lv_color_t *) dest_buf, false) != LV_RES_OK) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("init_vg_buf reported error. Fill failed.");
-#endif
- return LV_RES_INV;
- }
-
- if(opa >= (lv_opa_t) LV_OPA_MAX) { /*Opaque fill*/
- rect.x = fill_area->x1;
- rect.y = fill_area->y1;
- rect.width = (int32_t) fill_area->x2 - (int32_t) fill_area->x1 + 1;
- rect.height = (int32_t) fill_area->y2 - (int32_t) fill_area->y1 + 1;
-
- if(disp != NULL && disp->driver->clean_dcache_cb != NULL) { /*Clean & invalidate cache*/
- disp->driver->clean_dcache_cb(disp->driver);
- }
-
- err = vg_lite_clear(&rt, &rect, col32.full);
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_clear reported error. Fill failed.");
-#endif
- return LV_RES_INV;
- }
- err = vg_lite_finish();
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_finish reported error. Fill failed.");
-#endif
- return LV_RES_INV;
- }
- }
- else { /*fill with transparency*/
-
- vg_lite_path_t path;
- lv_color32_t colMix;
- int16_t path_data[] = { /*VG rectangular path*/
- VLC_OP_MOVE, fill_area->x1, fill_area->y1,
- VLC_OP_LINE, fill_area->x2 + 1, fill_area->y1,
- VLC_OP_LINE, fill_area->x2 + 1, fill_area->y2 + 1,
- VLC_OP_LINE, fill_area->x1, fill_area->y2 + 1,
- VLC_OP_LINE, fill_area->x1, fill_area->y1,
- VLC_OP_END
- };
-
- err = vg_lite_init_path(&path, VG_LITE_S16, VG_LITE_LOW, sizeof(path_data), path_data,
- (vg_lite_float_t) fill_area->x1, (vg_lite_float_t) fill_area->y1, ((vg_lite_float_t) fill_area->x2) + 1.0f,
- ((vg_lite_float_t) fill_area->y2) + 1.0f);
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_init_path() failed.");
-#endif
- return LV_RES_INV;
- }
-
- colMix.ch.red = (uint8_t)(((uint16_t)col32.ch.red * opa) >> 8); /*Pre-multiply color*/
- colMix.ch.green = (uint8_t)(((uint16_t)col32.ch.green * opa) >> 8);
- colMix.ch.blue = (uint8_t)(((uint16_t)col32.ch.blue * opa) >> 8);
- colMix.ch.alpha = opa;
-
- if((disp != NULL) && (disp->driver->clean_dcache_cb != NULL)) { /*Clean & invalidate cache*/
- disp->driver->clean_dcache_cb(disp->driver);
- }
-
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
-
- /*Draw rectangle*/
- err = vg_lite_draw(&rt, &path, VG_LITE_FILL_EVEN_ODD, &matrix, VG_LITE_BLEND_SRC_OVER, colMix.full);
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_draw() failed.");
-#endif
- vg_lite_clear_path(&path);
- return LV_RES_INV;
- }
-
- err = vg_lite_finish();
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_finish() failed.");
-#endif
- return LV_RES_INV;
- }
-
- err = vg_lite_clear_path(&path);
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_clear_path() failed.");
-#endif
- return LV_RES_INV;
- }
- }
-
- if(err == VG_LITE_SUCCESS) {
- return LV_RES_OK;
- }
- else {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("VG Lite Fill failed.");
-#endif
- return LV_RES_INV;
- }
-}
-
-/***
- * BLock Image Transfer.
- * @param[in] blit Description of the transfer
- * @retval LV_RES_OK Transfer complete
- * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
- */
-lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
-{
-#if _BLIT_SPLIT_ENABLED
-
- lv_res_t rv = LV_RES_INV;
-
- if(_lv_gpu_nxp_vglite_check_blit(blit) != LV_RES_OK) {
- PRINT_BLT("Blit check failed\n");
- return LV_RES_INV;
- }
-
- PRINT_BLT("BLIT from: "
- "Area: %03d,%03d - %03d,%03d "
- "Addr: %d\n\n",
- blit->src_area.x1, blit->src_area.y1,
- blit->src_area.x2, blit->src_area.y2,
- (uintptr_t) blit->src);
-
- PRINT_BLT("BLIT to: "
- "Area: %03d,%03d - %03d,%03d "
- "Addr: %d\n\n",
- blit->dst_area.x1, blit->dst_area.y1,
- blit->dst_area.x2, blit->dst_area.y2,
- (uintptr_t) blit->src);
-
- /* Stage 1: Move starting pointers as close as possible to [x1, y1], so coordinates are as small as possible. */
- _align_x(&blit->src_area, (lv_color_t **)&blit->src);
- _align_y(&blit->src_area, (lv_color_t **)&blit->src, blit->src_stride / sizeof(lv_color_t));
- _align_x(&blit->dst_area, (lv_color_t **)&blit->dst);
- _align_y(&blit->dst_area, (lv_color_t **)&blit->dst, blit->dst_stride / sizeof(lv_color_t));
-
- /* Stage 2: If we're in limit, do a single BLIT */
- if((blit->src_area.x2 < LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) &&
- (blit->src_area.y2 < LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR)) {
- PRINT_BLT("Simple blit!\n");
- return _lv_gpu_nxp_vglite_blit_single(blit);
- };
-
- /* Stage 3: Split the BLIT into multiple tiles */
- PRINT_BLT("Split blit!\n");
-
- PRINT_BLT("Blit "
- "([%03d,%03d], [%03d,%03d]) -> "
- "([%03d,%03d], [%03d,%03d]) | "
- "([%03dx%03d] -> [%03dx%03d]) | "
- "A:(%d -> %d)\n",
- blit->src_area.x1, blit->src_area.y1, blit->src_area.x2, blit->src_area.y2,
- blit->dst_area.x1, blit->dst_area.y1, blit->dst_area.x2, blit->dst_area.y2,
- lv_area_get_width(&blit->src_area), lv_area_get_height(&blit->src_area),
- lv_area_get_width(&blit->dst_area), lv_area_get_height(&blit->dst_area),
- (uintptr_t) blit->src, (uintptr_t) blit->dst);
-
-
- uint32_t totalWidth = lv_area_get_width(&blit->src_area);
- uint32_t totalHeight = lv_area_get_height(&blit->src_area);
-
- lv_gpu_nxp_vglite_blit_info_t tileBlit;
-
- /* Number of tiles needed */
- int totalTilesX = (blit->src_area.x1 + totalWidth + LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1) /
- LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
- int totalTilesY = (blit->src_area.y1 + totalHeight + LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1) /
- LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
-
- /* src and dst buffer shift against each other. Src buffer real data [0,0] may start actually at [3,0] in buffer, as
- * the buffer pointer has to be aligned, while dst buffer real data [0,0] may start at [1,0] in buffer. alignment may be
- * different */
- int shiftSrcX = (blit->src_area.x1 > blit->dst_area.x1) ? (blit->src_area.x1 - blit->dst_area.x1) : 0;
- int shiftDstX = (blit->src_area.x1 < blit->dst_area.x1) ? (blit->dst_area.x1 - blit->src_area.x1) : 0;
-
- PRINT_BLT("\n");
- PRINT_BLT("Align shift: src: %d, dst: %d\n", shiftSrcX, shiftDstX);
-
- tileBlit = *blit;
-
- for(int tileY = 0; tileY < totalTilesY; tileY++) {
-
- tileBlit.src_area.y1 = 0; /* no vertical alignment, always start from 0 */
- tileBlit.src_area.y2 = totalHeight - tileY * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
- if(tileBlit.src_area.y2 >= LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) {
- tileBlit.src_area.y2 = LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1; /* Should never happen */
- }
- tileBlit.src = blit->src + tileY * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR * blit->src_stride / sizeof(
- lv_color_t); /* stride in px! */
-
- tileBlit.dst_area.y1 = tileBlit.src_area.y1; /* y has no alignment, always in sync with src */
- tileBlit.dst_area.y2 = tileBlit.src_area.y2;
-
- tileBlit.dst = blit->dst + tileY * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR * blit->dst_stride / sizeof(
- lv_color_t); /* stride in px! */
-
- for(int tileX = 0; tileX < totalTilesX; tileX++) {
-
- if(tileX == 0) {
- /* 1st tile is special - there may be a gap between buffer start pointer
- * and area.x1 value, as the pointer has to be aligned.
- * tileBlit.src pointer - keep init value from Y-loop.
- * Also, 1st tile start is not shifted! shift is applied from 2nd tile */
- tileBlit.src_area.x1 = blit->src_area.x1;
- tileBlit.dst_area.x1 = blit->dst_area.x1;
- }
- else {
- /* subsequent tiles always starts from 0, but shifted*/
- tileBlit.src_area.x1 = 0 + shiftSrcX;
- tileBlit.dst_area.x1 = 0 + shiftDstX;
- /* and advance start pointer + 1 tile size */
- tileBlit.src += LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
- tileBlit.dst += LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR;
- }
-
- /* Clip tile end coordinates */
- tileBlit.src_area.x2 = totalWidth + blit->src_area.x1 - tileX * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
- if(tileBlit.src_area.x2 >= LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) {
- tileBlit.src_area.x2 = LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
- }
-
- tileBlit.dst_area.x2 = totalWidth + blit->dst_area.x1 - tileX * LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
- if(tileBlit.dst_area.x2 >= LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR) {
- tileBlit.dst_area.x2 = LV_GPU_NXP_VG_LITE_BLIT_SPLIT_THR - 1;
- }
-
- if(tileX < (totalTilesX - 1)) {
- /* And adjust end coords if shifted, but not for last tile! */
- tileBlit.src_area.x2 += shiftSrcX;
- tileBlit.dst_area.x2 += shiftDstX;
- }
-
- rv = _lv_gpu_nxp_vglite_blit_single(&tileBlit);
-
-#if BLIT_DBG_AREAS
- _draw_rectangle((lv_color_t *) tileBlit.dst, tileBlit.dst_width, tileBlit.dst_height, &tileBlit.dst_area, LV_COLOR_RED);
- _draw_rectangle((lv_color_t *) tileBlit.src, tileBlit.src_width, tileBlit.src_height, &tileBlit.src_area,
- LV_COLOR_GREEN);
-#endif
-
- PRINT_BLT("Tile [%d, %d]: "
- "([%d,%d], [%d,%d]) -> "
- "([%d,%d], [%d,%d]) | "
- "([%dx%d] -> [%dx%d]) | "
- "A:(0x%8X -> 0x%8X) %s\n",
- tileX, tileY,
- tileBlit.src_area.x1, tileBlit.src_area.y1, tileBlit.src_area.x2, tileBlit.src_area.y2,
- tileBlit.dst_area.x1, tileBlit.dst_area.y1, tileBlit.dst_area.x2, tileBlit.dst_area.y2,
- lv_area_get_width(&tileBlit.src_area), lv_area_get_height(&tileBlit.src_area),
- lv_area_get_width(&tileBlit.dst_area), lv_area_get_height(&tileBlit.dst_area),
- (uintptr_t) tileBlit.src, (uintptr_t) tileBlit.dst,
- rv == LV_RES_OK ? "OK!" : "!!! FAILED !!!");
-
- if(rv != LV_RES_OK) { /* if anything goes wrong... */
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("Split BLIT failed. Trying SW BLIT instead.");
-#endif
- _sw_blit(&tileBlit);
- rv = LV_RES_OK; /* Don't report error, as SW BLIT was performed */
- }
-
- }
- PRINT_BLT(" \n");
- }
-
- return rv; /* should never fail */
-
-#else /* non RT595 */
- /* Just pass down */
- return _lv_gpu_nxp_vglite_blit_single(blit);
-#endif
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/***
- * BLock Image Transfer - single direct BLIT.
- * @param[in] blit Description of the transfer
- * @retval LV_RES_OK Transfer complete
- * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
- */
-static lv_res_t _lv_gpu_nxp_vglite_blit_single(lv_gpu_nxp_vglite_blit_info_t * blit)
-{
- vg_lite_buffer_t src_vgbuf, dst_vgbuf;
- vg_lite_error_t err = VG_LITE_SUCCESS;
- uint32_t rect[4];
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
-
- if(blit == NULL) {
- /*Wrong parameter*/
- return LV_RES_INV;
- }
-
- if(blit->opa < (lv_opa_t) LV_OPA_MIN) {
- return LV_RES_OK; /*Nothing to BLIT*/
- }
-
- /*Wrap src/dst buffer into VG-Lite buffer*/
- if(_init_vg_buf(&src_vgbuf, (uint32_t) blit->src_width, (uint32_t) blit->src_height, (uint32_t) blit->src_stride,
- blit->src, true) != LV_RES_OK) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("init_vg_buf reported error. BLIT failed.");
-#endif
- return LV_RES_INV;
- }
-
- if(_init_vg_buf(&dst_vgbuf, (uint32_t) blit->dst_width, (uint32_t) blit->dst_height, (uint32_t) blit->dst_stride,
- blit->dst, false) != LV_RES_OK) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("init_vg_buf reported error. BLIT failed.");
-#endif
- return LV_RES_INV;
- }
-
- rect[0] = (uint32_t) blit->src_area.x1; /* start x */
- rect[1] = (uint32_t) blit->src_area.y1; /* start y */
- rect[2] = (uint32_t) blit->src_area.x2 - (uint32_t) blit->src_area.x1 + 1U; /* width */
- rect[3] = (uint32_t) blit->src_area.y2 - (uint32_t) blit->src_area.y1 + 1U; /* height */
-
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- vg_lite_translate((vg_lite_float_t)blit->dst_area.x1, (vg_lite_float_t)blit->dst_area.y1, &matrix);
-
- if((disp != NULL) && (disp->driver->clean_dcache_cb != NULL)) { /*Clean & invalidate cache*/
- disp->driver->clean_dcache_cb(disp->driver);
- }
-
- uint32_t color;
- vg_lite_blend_t blend;
- if(blit->opa >= (uint8_t) LV_OPA_MAX) {
- color = 0x0;
- blend = VG_LITE_BLEND_NONE;
- }
- else {
- uint32_t opa = (uint32_t) blit->opa;
- color = (opa << 24) | (opa << 16) | (opa << 8) | opa;
- blend = VG_LITE_BLEND_SRC_OVER;
- src_vgbuf.image_mode = VG_LITE_MULTIPLY_IMAGE_MODE;
- }
-
- err = vg_lite_blit_rect(&dst_vgbuf, &src_vgbuf, rect, &matrix, blend, color, VG_LITE_FILTER_POINT);
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_blit_rect() failed.");
-#endif
- return LV_RES_INV;
- }
-
- err = vg_lite_finish();
- if(err != VG_LITE_SUCCESS) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_finish() failed.");
-#endif
- return LV_RES_INV;
- }
-
- if(err == VG_LITE_SUCCESS) {
- return LV_RES_OK;
- }
- else {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("vg_lite_blit_rect or vg_lite_finish reported error. BLIT failed.");
-#endif
- return LV_RES_INV;
- }
-}
-
-/***
- * Fills vg_lite_buffer_t structure according given parameters.
- * @param[out] dst Buffer structure to be filled
- * @param[in] width Width of buffer in pixels
- * @param[in] height Height of buffer in pixels
- * @param[in] stride Stride of the buffer in bytes
- * @param[in] ptr Pointer to the buffer (must be aligned according VG-Lite requirements)
- */
-static lv_res_t _init_vg_buf(vg_lite_buffer_t * dst, uint32_t width, uint32_t height, uint32_t stride,
- const lv_color_t * ptr, bool source)
-{
- if((((uintptr_t)ptr) % (uintptr_t)LV_ATTRIBUTE_MEM_ALIGN_SIZE) != 0x0U) { /*Test for alignment*/
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("ptr (0x%X) not aligned to %d.", (size_t) ptr, LV_ATTRIBUTE_MEM_ALIGN_SIZE);
-#endif
- return LV_RES_INV;
- }
-
- if(source &&
- (stride % (LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX * sizeof(lv_color_t))) != 0x0U) { /*Test for stride alignment*/
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("Buffer stride (%d px) not aligned to %d bytes.", stride,
- LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX * sizeof(lv_color_t));
-#endif
- return LV_RES_INV;
- }
-
- dst->format = VGLITE_PX_FMT;
- dst->tiled = VG_LITE_LINEAR;
- dst->image_mode = VG_LITE_NORMAL_IMAGE_MODE;
- dst->transparency_mode = VG_LITE_IMAGE_OPAQUE;
-
- dst->width = (int32_t) width;
- dst->height = (int32_t) height;
- dst->stride = (int32_t) stride;
-
- void * r_ptr = memset(&dst->yuv, 0, sizeof(dst->yuv));
- if(r_ptr == NULL) {
- return LV_RES_INV;
- }
-
- dst->memory = (void *)ptr;
- dst->address = (uint32_t) dst->memory;
- dst->handle = NULL;
-
- return LV_RES_OK;
-}
-
-#if _BLIT_SPLIT_ENABLED
-
-/**
- * Software BLIT as a fall-back scenario
- * @param[in] blit BLIT configuration
- */
-static void _sw_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
-{
- int x, y;
-
- lv_coord_t w = lv_area_get_width(&blit->src_area);
- lv_coord_t h = lv_area_get_height(&blit->src_area);
-
- uint32_t srcStridePx = blit->src_stride / sizeof(lv_color_t);
- uint32_t dstStridePx = blit->dst_stride / sizeof(lv_color_t);
-
- lv_color_t * src = (lv_color_t *)blit->src + blit->src_area.y1 * srcStridePx + blit->src_area.x1;
- lv_color_t * dst = (lv_color_t *)blit->dst + blit->dst_area.y1 * dstStridePx + blit->dst_area.x1;
-
- if(blit->opa >= LV_OPA_MAX) {
- /* simple copy */
- for(y = 0; y < h; y++) {
- _lv_memcpy(dst, src, w * sizeof(lv_color_t));
- src += srcStridePx;
- dst += dstStridePx;
- }
- }
- else if(blit->opa >= LV_OPA_MIN) {
- /* alpha blending */
- for(y = 0; y < h; y++) {
- for(x = 0; x < w; x++) {
- dst[x] = lv_color_mix(src[x], dst[x], blit->opa);
- }
- src += srcStridePx;
- dst += dstStridePx;
- }
- }
-}
-
-/**
- * Verify BLIT structure - widths, stride, pointer alignment
- * @param[in] blit
- * @return
- */
-static lv_res_t _lv_gpu_nxp_vglite_check_blit(lv_gpu_nxp_vglite_blit_info_t * blit)
-{
-
- if(lv_area_get_width(&blit->src_area) < LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) { /* Test for minimal width */
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("source area width (%d) is smaller than required (%d).", lv_area_get_width(&blit->src_area),
- LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
-#endif
- return LV_RES_INV;
- }
-
- if(lv_area_get_width(&blit->dst_area) < LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) { /* Test for minimal width */
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("destination area width (%d) is smaller than required (%d).", lv_area_get_width(&blit->dst_area),
- LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
-#endif
- return LV_RES_INV;
- }
-
- if((((uintptr_t) blit->src) % LV_ATTRIBUTE_MEM_ALIGN_SIZE) != 0x0) { /* Test for pointer alignment */
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("source buffer ptr (0x%X) not aligned to %d.", (size_t) blit->src, LV_ATTRIBUTE_MEM_ALIGN_SIZE);
-#endif
- return LV_RES_INV;
- }
- /* No alignment requirement for destination pixel buffer when using mode VG_LITE_LINEAR */
-
- if((blit->src_stride % (LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX * LV_COLOR_DEPTH / 8)) !=
- 0x0) { /* Test for stride alignment */
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("source buffer stride (%d px) not aligned to %d px.", blit->src_stride,
- LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
-#endif
- return LV_RES_INV;
- }
-
- if((blit->dst_stride % (LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX * LV_COLOR_DEPTH / 8)) !=
- 0x0) { /* Test for stride alignment */
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("destination buffer stride (%d px) not aligned to %d px.", blit->dst_stride,
- LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
-#endif
- return LV_RES_INV;
- }
-
- if((lv_area_get_width(&blit->src_area) != lv_area_get_width(&blit->dst_area)) ||
- (lv_area_get_height(&blit->src_area) != lv_area_get_height(&blit->dst_area))) {
-#if LV_GPU_NXP_VG_LITE_LOG_ERRORS
- LV_LOG_ERROR("source and destination buffer areas are not equal.");
-#endif
- return LV_RES_INV;
- }
-
- return LV_RES_OK;
-}
-
-/***
- * Move buffer pointer as close as possible to area, but with respect to alignment requirements. X-axis only.
- * @param[in,out] area Area to be updated
- * @param[in,out] buf Pointer to be updated
- */
-static void _align_x(lv_area_t * area, lv_color_t ** buf)
-{
-
- int alignedAreaStartPx = area->x1 - (area->x1 % (LV_ATTRIBUTE_MEM_ALIGN_SIZE * 8 / LV_COLOR_DEPTH));
- CHECK(alignedAreaStartPx < 0, "Should never happen.");
-
- area->x1 -= alignedAreaStartPx;
- area->x2 -= alignedAreaStartPx;
- *buf += alignedAreaStartPx;
-}
-
-/***
- * Move buffer pointer to the area start and update variables, Y-axis only.
- * @param[in,out] area Area to be updated
- * @param[in,out] buf Pointer to be updated
- * @param[in] stridePx Buffer stride in pixels
- */
-static void _align_y(lv_area_t * area, lv_color_t ** buf, uint32_t stridePx)
-{
- int LineToAlignMem;
- int alignedAreaStartPy;
- /* find how many lines of pixels will respect memory alignment requirement */
- if(stridePx % LV_ATTRIBUTE_MEM_ALIGN_SIZE == 0) {
- alignedAreaStartPy = area->y1;
- }
- else {
- LineToAlignMem = LV_ATTRIBUTE_MEM_ALIGN_SIZE / (sizeof(lv_color_t) * LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX);
- CHECK(LV_ATTRIBUTE_MEM_ALIGN_SIZE % (sizeof(lv_color_t) * LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX) != 0,
- "Complex case: need gcd function.");
- alignedAreaStartPy = area->y1 - (area->y1 % LineToAlignMem);
- CHECK(alignedAreaStartPy < 0, "Should never happen.");
- }
-
- area->y1 -= alignedAreaStartPy;
- area->y2 -= alignedAreaStartPy;
- *buf += alignedAreaStartPy * stridePx;
-}
-
-#if BLIT_DBG_AREAS
-/***
- * Draws a simple rectangle, 1 px line width.
- * @param dest_buf Destination buffer
- * @param dest_width Destination buffer width (must be aligned on 16px)
- * @param dest_height Destination buffer height
- * @param fill_area Rectangle coordinates
- * @param color Rectangle color
- */
-static void _draw_rectangle(lv_color_t * dest_buf, lv_coord_t dest_width, lv_coord_t dest_height,
- lv_area_t * fill_area, lv_color_t color)
-{
-
- lv_area_t a;
-
- /* top line */
- a.x1 = fill_area->x1;
- a.x2 = fill_area->x2;
- a.y1 = fill_area->y1;
- a.y2 = fill_area->y1;
- lv_gpu_nxp_vglite_fill(dest_buf, dest_width, dest_height, &a, color, LV_OPA_COVER);
-
-
- /* bottom line */
- a.x1 = fill_area->x1;
- a.x2 = fill_area->x2;
- a.y1 = fill_area->y2;
- a.y2 = fill_area->y2;
- lv_gpu_nxp_vglite_fill(dest_buf, dest_width, dest_height, &a, color, LV_OPA_COVER);
-
- /* left line */
- a.x1 = fill_area->x1;
- a.x2 = fill_area->x1;
- a.y1 = fill_area->y1;
- a.y2 = fill_area->y2;
- lv_gpu_nxp_vglite_fill(dest_buf, dest_width, dest_height, &a, color, LV_OPA_COVER);
-
- /* right line */
- a.x1 = fill_area->x2;
- a.x2 = fill_area->x2;
- a.y1 = fill_area->y1;
- a.y2 = fill_area->y2;
- lv_gpu_nxp_vglite_fill(dest_buf, dest_width, dest_height, &a, color, LV_OPA_COVER);
-}
-#endif /* BLIT_DBG_AREAS */
-
-#endif /* _BLIT_SPLIT_ENABLED */
-
-#endif /*LV_USE_GPU_NXP_VG_LITE*/
diff --git a/lib/lvgl/src/draw/nxp_vglite/lv_gpu_nxp_vglite.h b/lib/lvgl/src/draw/nxp_vglite/lv_gpu_nxp_vglite.h
deleted file mode 100644
index 26f4c3f..0000000
--- a/lib/lvgl/src/draw/nxp_vglite/lv_gpu_nxp_vglite.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * @file lv_gpu_nxp_vglite.h
- *
- */
-
-/**
- * MIT License
- *
- * Copyright (c) 2020 NXP
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next paragraph)
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_
-#define LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "../../lv_conf_internal.h"
-
-#if LV_USE_GPU_NXP_VG_LITE
-
-/*********************
- * DEFINES
- *********************/
-
-/** Use this symbol as limit to disable feature (value has to be larger than supported resolution) */
-#define LV_GPU_NXP_VG_LITE_FEATURE_DISABLED (1920*1080+1)
-
-/** Stride in px required by VG-Lite HW. Don't change this. */
-#define LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX 16U
-
-#ifndef LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT
-/** Minimum area (in pixels) to be filled by VG-Lite with 100% opacity*/
-#define LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT
-/** Minimum area (in pixels) to be filled by VG-Lite with transparency*/
-#define LV_GPU_NXP_VG_LITE_FILL_OPA_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT
-/** Minimum area (in pixels) for image copy with 100% opacity to be handled by VG-Lite*/
-#define LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_VG_LITE_BUFF_SYNC_BLIT_SIZE_LIMIT
-/** Minimum invalidated area (in pixels) to be synchronized by VG-Lite during buffer sync */
-#define LV_GPU_NXP_VG_LITE_BUFF_SYNC_BLIT_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT
-/** Minimum area (in pixels) for image copy with transparency to be handled by VG-Lite*/
-#define LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT 32
-#endif
-
-#ifndef LV_GPU_NXP_VG_LITE_LOG_ERRORS
-/** Enable logging of VG-Lite errors (\see LV_LOG_ERROR)*/
-#define LV_GPU_NXP_VG_LITE_LOG_ERRORS 1
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * BLock Image Transfer descriptor structure
- */
-typedef struct {
-
- const lv_color_t * src; /**< Source buffer pointer (must be aligned on 32 bytes)*/
- lv_area_t src_area; /**< Area to be copied from source*/
- lv_coord_t src_width; /**< Source buffer width*/
- lv_coord_t src_height; /**< Source buffer height*/
- uint32_t src_stride; /**< Source buffer stride in bytes (must be aligned on 16 px)*/
-
- const lv_color_t * dst; /**< Destination buffer pointer (must be aligned on 32 bytes)*/
- lv_area_t dst_area; /**< Target area in destination buffer (must be the same as src_area)*/
- lv_coord_t dst_width; /**< Destination buffer width*/
- lv_coord_t dst_height; /**< Destination buffer height*/
- uint32_t dst_stride; /**< Destination buffer stride in bytes (must be aligned on 16 px)*/
-
- lv_opa_t opa; /**< Opacity - alpha mix (0 = source not copied, 255 = 100% opaque)*/
-
-} lv_gpu_nxp_vglite_blit_info_t;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/***
- * Fills rectangular area in buffer.
- * @param[in] dest_buf Destination buffer pointer (must be aligned on 32 bytes)
- * @param[in] dest_width Destination buffer width in pixels ((must be aligned on 16 px)
- * @param[in] dest_height Destination buffer height in pixels
- * @param[in] fill_area Area to be filled
- * @param[in] color Fill color
- * @param[in] opa Opacity (255 = full, 128 = 50% background/50% color, 0 = no fill)
- * @retval LV_RES_OK Fill completed
- * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
- */
-lv_res_t lv_gpu_nxp_vglite_fill(lv_color_t * dest_buf, lv_coord_t dest_width, lv_coord_t dest_height,
- const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa);
-
-/***
- * BLock Image Transfer.
- * @param[in] blit Description of the transfer
- * @retval LV_RES_OK Transfer complete
- * @retval LV_RES_INV Error occurred (\see LV_GPU_NXP_VG_LITE_LOG_ERRORS)
- */
-lv_res_t lv_gpu_nxp_vglite_blit(lv_gpu_nxp_vglite_blit_info_t * blit);
-
-#endif /*LV_USE_GPU_NXP_VG_LITE*/
-
-#ifdef __cplusplus
-} /*extern "C"*/
-#endif
-
-#endif /*LV_SRC_LV_GPU_LV_GPU_NXP_VGLITE_H_*/
diff --git a/lib/lvgl/src/draw/renesas/lv_draw_renesas.mk b/lib/lvgl/src/draw/renesas/lv_draw_renesas.mk
new file mode 100644
index 0000000..b5e3ad1
--- /dev/null
+++ b/lib/lvgl/src/draw/renesas/lv_draw_renesas.mk
@@ -0,0 +1,7 @@
+CSRCS += lv_gpu_d2_ra6m3.c
+CSRCS += lv_gpu_d2_draw_label.c
+
+DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/renesas
+VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/renesas
+
+CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/renesas"
diff --git a/lib/lvgl/src/draw/renesas/lv_gpu_d2_draw_label.c b/lib/lvgl/src/draw/renesas/lv_gpu_d2_draw_label.c
new file mode 100644
index 0000000..e92ebf1
--- /dev/null
+++ b/lib/lvgl/src/draw/renesas/lv_gpu_d2_draw_label.c
@@ -0,0 +1,292 @@
+/**
+ * @file lv_gpu_d2_draw_label.c
+ *
+ * @description HAL layer for display driver
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../draw/lv_draw_label.h"
+#include "../../misc/lv_assert.h"
+#include "../../core/lv_refr.h"
+#include "lv_gpu_d2_ra6m3.h"
+
+#if LV_USE_GPU_RA6M3_G2D
+#include LV_GPU_RA6M3_G2D_INCLUDE
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * GLOBAL VARIABLES
+ **********************/
+extern const uint8_t _lv_bpp1_opa_table[2];
+extern const uint8_t _lv_bpp2_opa_table[4];
+extern const uint8_t _lv_bpp4_opa_table[16];
+extern const uint8_t _lv_bpp8_opa_table[256];
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void LV_ATTRIBUTE_FAST_MEM draw_letter_normal(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
+ const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p)
+{
+
+ const uint8_t * bpp_opa_table_p;
+ uint32_t bitmask_init;
+ uint32_t bitmask;
+ uint32_t bpp = g->bpp;
+ lv_opa_t opa = dsc->opa;
+ uint32_t shades;
+ if(bpp == 3) bpp = 4;
+
+#if LV_USE_IMGFONT
+ if(bpp == LV_IMGFONT_BPP) { //is imgfont
+ lv_area_t fill_area;
+ fill_area.x1 = pos->x;
+ fill_area.y1 = pos->y;
+ fill_area.x2 = pos->x + g->box_w - 1;
+ fill_area.y2 = pos->y + g->box_h - 1;
+ lv_draw_img_dsc_t img_dsc;
+ lv_draw_img_dsc_init(&img_dsc);
+ img_dsc.angle = 0;
+ img_dsc.zoom = LV_IMG_ZOOM_NONE;
+ img_dsc.opa = dsc->opa;
+ img_dsc.blend_mode = dsc->blend_mode;
+ lv_draw_img(draw_ctx, &img_dsc, &fill_area, map_p);
+ return;
+ }
+#endif
+
+ switch(bpp) {
+ case 1:
+ bpp_opa_table_p = _lv_bpp1_opa_table;
+ bitmask_init = 0x80;
+ shades = 2;
+ break;
+ case 2:
+ bpp_opa_table_p = _lv_bpp2_opa_table;
+ bitmask_init = 0xC0;
+ shades = 4;
+ break;
+ case 4:
+ bpp_opa_table_p = _lv_bpp4_opa_table;
+ bitmask_init = 0xF0;
+ shades = 16;
+ break;
+ case 8:
+ bpp_opa_table_p = _lv_bpp8_opa_table;
+ bitmask_init = 0xFF;
+ shades = 256;
+ break; /*No opa table, pixel value will be used directly*/
+ default:
+ LV_LOG_WARN("lv_draw_letter: invalid bpp");
+ return; /*Invalid bpp. Can't render the letter*/
+ }
+
+ static lv_opa_t opa_table[256];
+ static lv_opa_t prev_opa = LV_OPA_TRANSP;
+ static uint32_t prev_bpp = 0;
+ if(opa < LV_OPA_MAX) {
+ if(prev_opa != opa || prev_bpp != bpp) {
+ uint32_t i;
+ for(i = 0; i < shades; i++) {
+ opa_table[i] = bpp_opa_table_p[i] == LV_OPA_COVER ? opa : ((bpp_opa_table_p[i] * opa) >> 8);
+ }
+ }
+ bpp_opa_table_p = opa_table;
+ prev_opa = opa;
+ prev_bpp = bpp;
+ }
+
+ int32_t col, row;
+ int32_t box_w = g->box_w;
+ int32_t box_h = g->box_h;
+ int32_t width_bit = box_w * bpp; /*Letter width in bits*/
+
+ /*Calculate the col/row start/end on the map*/
+ int32_t col_start = pos->x >= draw_ctx->clip_area->x1 ? 0 : draw_ctx->clip_area->x1 - pos->x;
+ int32_t col_end = pos->x + box_w <= draw_ctx->clip_area->x2 ? box_w : draw_ctx->clip_area->x2 - pos->x + 1;
+ int32_t row_start = pos->y >= draw_ctx->clip_area->y1 ? 0 : draw_ctx->clip_area->y1 - pos->y;
+ int32_t row_end = pos->y + box_h <= draw_ctx->clip_area->y2 ? box_h : draw_ctx->clip_area->y2 - pos->y + 1;
+
+ /*Move on the map too*/
+ uint32_t bit_ofs = (row_start * width_bit) + (col_start * bpp);
+ map_p += bit_ofs >> 3;
+
+ uint8_t letter_px;
+ uint32_t col_bit;
+ col_bit = bit_ofs & 0x7; /*"& 0x7" equals to "% 8" just faster*/
+
+ lv_draw_sw_blend_dsc_t blend_dsc;
+ lv_memset_00(&blend_dsc, sizeof(blend_dsc));
+ blend_dsc.color = dsc->color;
+ blend_dsc.opa = LV_OPA_COVER;
+ blend_dsc.blend_mode = dsc->blend_mode;
+
+ lv_coord_t hor_res = lv_disp_get_hor_res(_lv_refr_get_disp_refreshing());
+ uint32_t mask_buf_size = box_w * box_h > hor_res ? hor_res : box_w * box_h;
+ lv_opa_t * mask_buf = lv_mem_buf_get(mask_buf_size);
+ blend_dsc.mask_buf = mask_buf;
+ int32_t mask_p = 0;
+
+ lv_area_t fill_area;
+ fill_area.x1 = col_start + pos->x;
+ fill_area.x2 = col_end + pos->x - 1;
+ fill_area.y1 = row_start + pos->y;
+ fill_area.y2 = fill_area.y1;
+#if LV_DRAW_COMPLEX
+ lv_coord_t fill_w = lv_area_get_width(&fill_area);
+ lv_area_t mask_area;
+ lv_area_copy(&mask_area, &fill_area);
+ mask_area.y2 = mask_area.y1 + row_end;
+ bool mask_any = lv_draw_mask_is_any(&mask_area);
+#endif
+ blend_dsc.blend_area = &fill_area;
+ blend_dsc.mask_area = &fill_area;
+
+ uint32_t col_bit_max = 8 - bpp;
+ uint32_t col_bit_row_ofs = (box_w + col_start - col_end) * bpp;
+
+ for(row = row_start ; row < row_end; row++) {
+#if LV_DRAW_COMPLEX
+ int32_t mask_p_start = mask_p;
+#endif
+ bitmask = bitmask_init >> col_bit;
+ for(col = col_start; col < col_end; col++) {
+ /*Load the pixel's opacity into the mask*/
+ letter_px = (*map_p & bitmask) >> (col_bit_max - col_bit);
+ if(letter_px) {
+ mask_buf[mask_p] = bpp_opa_table_p[letter_px];
+ }
+ else {
+ mask_buf[mask_p] = 0;
+ }
+
+ /*Go to the next column*/
+ if(col_bit < col_bit_max) {
+ col_bit += bpp;
+ bitmask = bitmask >> bpp;
+ }
+ else {
+ col_bit = 0;
+ bitmask = bitmask_init;
+ map_p++;
+ }
+
+ /*Next mask byte*/
+ mask_p++;
+ }
+
+#if LV_DRAW_COMPLEX
+ /*Apply masks if any*/
+ if(mask_any) {
+ blend_dsc.mask_res = lv_draw_mask_apply(mask_buf + mask_p_start, fill_area.x1, fill_area.y2,
+ fill_w);
+ if(blend_dsc.mask_res == LV_DRAW_MASK_RES_TRANSP) {
+ lv_memset_00(mask_buf + mask_p_start, fill_w);
+ }
+ }
+#endif
+
+ if((uint32_t) mask_p + (col_end - col_start) < mask_buf_size) {
+ fill_area.y2 ++;
+ }
+ else {
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ lv_draw_ra6m3_2d_blend(draw_ctx, &blend_dsc);
+
+ fill_area.y1 = fill_area.y2 + 1;
+ fill_area.y2 = fill_area.y1;
+ mask_p = 0;
+ }
+
+ col_bit += col_bit_row_ofs;
+ map_p += (col_bit >> 3);
+ col_bit = col_bit & 0x7;
+ }
+
+ /*Flush the last part*/
+ if(fill_area.y1 != fill_area.y2) {
+ fill_area.y2--;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ lv_draw_ra6m3_2d_blend(draw_ctx, &blend_dsc);
+ mask_p = 0;
+ }
+
+ lv_mem_buf_release(mask_buf);
+}
+
+void lv_draw_gpu_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
+ uint32_t letter)
+{
+ const lv_font_t * font_p = dsc->font;
+
+ lv_opa_t opa = dsc->opa;
+ if(opa < LV_OPA_MIN) return;
+ if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
+
+ if(font_p == NULL) {
+ LV_LOG_WARN("lv_draw_letter: font is NULL");
+ return;
+ }
+
+ lv_font_glyph_dsc_t g;
+ bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0');
+ if(g_ret == false) {
+ /*Add warning if the dsc is not found
+ *but do not print warning for non printable ASCII chars (e.g. '\n')*/
+ if(letter >= 0x20 &&
+ letter != 0xf8ff && /*LV_SYMBOL_DUMMY*/
+ letter != 0x200c) { /*ZERO WIDTH NON-JOINER*/
+ LV_LOG_WARN("lv_draw_letter: glyph dsc. not found for U+%X", letter);
+ }
+ return;
+ }
+
+ /*Don't draw anything if the character is empty. E.g. space*/
+ if((g.box_h == 0) || (g.box_w == 0)) return;
+
+ lv_point_t gpos;
+ gpos.x = pos_p->x + g.ofs_x;
+ gpos.y = pos_p->y + (dsc->font->line_height - dsc->font->base_line) - g.box_h - g.ofs_y;
+
+ /*If the letter is completely out of mask don't draw it*/
+ if(gpos.x + g.box_w < draw_ctx->clip_area->x1 ||
+ gpos.x > draw_ctx->clip_area->x2 ||
+ gpos.y + g.box_h < draw_ctx->clip_area->y1 ||
+ gpos.y > draw_ctx->clip_area->y2) {
+ return;
+ }
+
+ const uint8_t * map_p = lv_font_get_glyph_bitmap(font_p, letter);
+ if(map_p == NULL) {
+ LV_LOG_WARN("lv_draw_letter: character's bitmap not found");
+ return;
+ }
+
+ if(font_p->subpx) {
+#if LV_DRAW_COMPLEX && LV_USE_FONT_SUBPX
+ draw_letter_subpx(pos_x, pos_y, &g, clip_area, map_p, color, opa, blend_mode);
+#else
+ LV_LOG_WARN("Can't draw sub-pixel rendered letter because LV_USE_FONT_SUBPX == 0 in lv_conf.h");
+#endif
+ }
+ else {
+ draw_letter_normal(draw_ctx, dsc, &gpos, &g, map_p);
+ }
+}
+
+#endif
diff --git a/lib/lvgl/src/draw/renesas/lv_gpu_d2_ra6m3.c b/lib/lvgl/src/draw/renesas/lv_gpu_d2_ra6m3.c
new file mode 100644
index 0000000..ba4c084
--- /dev/null
+++ b/lib/lvgl/src/draw/renesas/lv_gpu_d2_ra6m3.c
@@ -0,0 +1,742 @@
+/**
+ * @file lv_gpu_d2_ra6m3.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_gpu_d2_ra6m3.h"
+#include "../../core/lv_refr.h"
+#include
+
+#if LV_USE_GPU_RA6M3_G2D
+
+#include LV_GPU_RA6M3_G2D_INCLUDE
+
+/*********************
+ * DEFINES
+ *********************/
+#define LOG_ERRORS
+#ifdef LOG_ERRORS
+ #define STRINGIFY(x) #x
+ #define TOSTRING(x) STRINGIFY(x)
+
+ #define ERROR_LIST_SIZE (4)
+ #define D2_EXEC(a) lv_port_gpu_log_error(a, __func__, __LINE__)
+#else
+ /* here is error logging not enabled */
+ #define D2_EXEC(a) a;
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef struct {
+ d2_s32 error;
+ const char * func;
+ int line;
+} log_error_entry;
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+#ifdef LOG_ERRORS
+ static void lv_port_gpu_log_error(d2_s32 status, const char * func, int line);
+#endif
+static void invalidate_cache(void);
+
+void lv_draw_gpu_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
+ uint32_t letter);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+#ifdef LOG_ERRORS
+ static log_error_entry log_error_list[ERROR_LIST_SIZE];
+ static int error_list_index;
+ static int error_count;
+#endif
+
+static d2_device * _d2_handle;
+static d2_renderbuffer * renderbuffer;
+
+static d2_s32 src_cf_val, dst_cf_val;
+static lv_draw_img_dsc_t img_dsc;
+static bool color_key_enabled, alpha_enabled, blend_enabled, colorize_enabled;
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+static d2_s32 lv_port_gpu_cf_lv_to_d2(lv_img_cf_t cf)
+{
+ d2_s32 d2_cf;
+
+#if (DLG_LVGL_CF == 1)
+ switch(cf & ~(1 << 5)) {
+#else
+ switch(cf) {
+#endif /* (DLG_LVGL_CF == 1) */
+ case LV_IMG_CF_TRUE_COLOR:
+ d2_cf = d2_mode_rgb565;
+ break;
+ case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
+ d2_cf = d2_mode_rgb565;
+ break;
+ case LV_IMG_CF_ALPHA_1BIT:
+ d2_cf = d2_mode_alpha1;
+ break;
+ case LV_IMG_CF_ALPHA_2BIT:
+ d2_cf = d2_mode_alpha2;
+ break;
+ case LV_IMG_CF_ALPHA_4BIT:
+ d2_cf = d2_mode_alpha4;
+ break;
+ case LV_IMG_CF_ALPHA_8BIT:
+ d2_cf = d2_mode_alpha8;
+ break;
+ case LV_IMG_CF_INDEXED_1BIT:
+ d2_cf = d2_mode_i1 | d2_mode_clut;
+ break;
+ case LV_IMG_CF_INDEXED_2BIT:
+ d2_cf = d2_mode_i2 | d2_mode_clut;
+ break;
+ case LV_IMG_CF_INDEXED_4BIT:
+ d2_cf = d2_mode_i4 | d2_mode_clut;
+ break;
+ case LV_IMG_CF_INDEXED_8BIT:
+ d2_cf = d2_mode_i8 | d2_mode_clut;
+ break;
+#if (DLG_LVGL_CF == 1)
+ case LV_IMG_CF_RGB565:
+ d2_cf = d2_mode_rgb565;
+ break;
+ case LV_IMG_CF_RGB888:
+ d2_cf = d2_mode_rgb888;
+ break;
+ case LV_IMG_CF_RGBA8888:
+ d2_cf = d2_mode_rgba8888;
+ break;
+#endif /* DLG_LVGL_CF */
+ default:
+ return -1;
+ }
+
+#if (DLG_LVGL_CF == 1)
+ return d2_cf | (cf & (1 << 5) ? d2_mode_rle : 0);
+#else
+ return d2_cf;
+#endif /* (DLG_LVGL_CF == 1) */
+}
+
+static bool lv_port_gpu_cf_fb_valid(d2_s32 cf)
+{
+ if((cf & (d2_mode_rle | d2_mode_clut)) || cf < 0) {
+ return false;
+ }
+
+ switch(cf) {
+ case d2_mode_alpha8:
+ case d2_mode_rgb565:
+ case d2_mode_argb8888:
+ case d2_mode_argb4444:
+ case d2_mode_rgba8888:
+ case d2_mode_rgba4444:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static bool lv_port_gpu_cf_has_alpha(d2_s32 cf)
+{
+ switch(cf & ~(d2_mode_clut | d2_mode_rle)) {
+ case d2_mode_argb8888:
+ case d2_mode_rgba8888:
+ case d2_mode_argb4444:
+ case d2_mode_rgba4444:
+ case d2_mode_argb1555:
+ case d2_mode_rgba5551:
+ case d2_mode_ai44:
+ case d2_mode_i8:
+ case d2_mode_i4:
+ case d2_mode_i2:
+ case d2_mode_i1:
+ case d2_mode_alpha8:
+ case d2_mode_alpha4:
+ case d2_mode_alpha2:
+ case d2_mode_alpha1:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static bool lv_port_gpu_cf_is_alpha(d2_s32 cf)
+{
+ switch(cf & ~d2_mode_rle) {
+ case d2_mode_alpha8:
+ case d2_mode_alpha4:
+ case d2_mode_alpha2:
+ case d2_mode_alpha1:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static d2_color lv_port_gpu_color_lv_to_d2(lv_color_t color)
+{
+ uint8_t alpha, red, green, blue;
+
+ alpha = 0xFF;
+ red = color.ch.red << 3 | color.ch.red >> 2;
+ green = color.ch.green << 2 | color.ch.green >> 4;
+ blue = color.ch.blue << 3 | color.ch.blue >> 2;
+
+ return (alpha) << 24UL
+ | (red) << 16UL
+ | (green) << 8UL
+ | (blue) << 0UL;
+}
+
+static void lv_port_gpu_get_recolor_consts(d2_color * cl, d2_color * ch)
+{
+ d2_color c = lv_port_gpu_color_lv_to_d2(img_dsc.recolor);
+ d2_alpha r, g, b, opa = img_dsc.recolor_opa > LV_OPA_MAX ? LV_OPA_COVER : img_dsc.recolor_opa;
+
+ r = ((uint32_t)((uint8_t)(c >> 16UL)) * opa) / 255;
+ g = ((uint32_t)((uint8_t)(c >> 8UL)) * opa) / 255;
+ b = ((uint32_t)((uint8_t)(c >> 0UL)) * opa) / 255;
+ *cl = r << 16UL | g << 8UL | b << 0UL;
+
+ r += 255 - opa;
+ g += 255 - opa;
+ b += 255 - opa;
+ *ch = r << 16UL | g << 8UL | b << 0UL;
+}
+
+static int lv_port_gpu_handle_indexed_color(const lv_color_t ** src, const d2_color ** clut, d2_s32 cf)
+{
+ int clut_len = 0;
+
+ if(cf & d2_mode_clut) {
+ /* Calculate CLUT length in entries */
+ switch(cf & ~(d2_mode_clut | d2_mode_rle)) {
+ case d2_mode_i1:
+ clut_len = 2;
+ break;
+ case d2_mode_i2:
+ clut_len = 4;
+ break;
+ case d2_mode_i4:
+ clut_len = 16;
+ break;
+ case d2_mode_i8:
+ clut_len = 256;
+ break;
+ case d2_mode_ai44:
+ clut_len = 16;
+ break;
+ default:
+ return 0;
+ }
+
+ *clut = (const d2_color *)*src;
+ *src = (const lv_color_t *)((const uint32_t *)*src + clut_len);
+ }
+ return clut_len;
+}
+
+static int lv_port_gpu_cf_bpp(d2_s32 cf)
+{
+ switch(cf & ~(d2_mode_clut | d2_mode_rle)) {
+ case d2_mode_argb8888:
+ return 32;
+ case d2_mode_rgba8888:
+ return 32;
+ case d2_mode_rgb888:
+ return 32;
+ case d2_mode_argb4444:
+ return 16;
+ case d2_mode_rgba4444:
+ return 16;
+ case d2_mode_argb1555:
+ return 16;
+ case d2_mode_rgba5551:
+ return 16;
+ case d2_mode_rgb565:
+ return 16;
+ case d2_mode_ai44:
+ return 8;
+ case d2_mode_i8:
+ return 8;
+ case d2_mode_i4:
+ return 4;
+ case d2_mode_i2:
+ return 2;
+ case d2_mode_i1:
+ return 1;
+ case d2_mode_alpha8:
+ return 8;
+ case d2_mode_alpha4:
+ return 4;
+ case d2_mode_alpha2:
+ return 2;
+ case d2_mode_alpha1:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static d2_s32 lv_port_gpu_cf_get_default(void)
+{
+ return d2_mode_rgb565;
+}
+
+static void lv_port_gpu_config_blit_clear(void)
+{
+ alpha_enabled = false;
+ color_key_enabled = false;
+ blend_enabled = true;
+ colorize_enabled = false;
+
+ lv_draw_img_dsc_init(&img_dsc);
+
+ src_cf_val = lv_port_gpu_cf_get_default();
+ dst_cf_val = lv_port_gpu_cf_get_default();
+}
+
+void lv_port_gpu_init(void)
+{
+ lv_port_gpu_config_blit_clear();
+}
+
+static void lv_port_gpu_rotate_point(int * x, int * y, float cos_angle, float sin_angle, int pivot_x, int pivot_y)
+{
+ float fx, fy;
+
+ *x -= pivot_x;
+ *y -= pivot_y;
+
+ fx = ((float) * x) / 16.0f;
+ fy = ((float) * y) / 16.0f;
+
+ *x = (int)(((fx * cos_angle) - (fy * sin_angle)) * 16.0f);
+ *y = (int)(((fx * sin_angle) + (fy * cos_angle)) * 16.0f);
+
+ *x += pivot_x;
+ *y += pivot_y;
+}
+
+void lv_draw_ra6m3_g2d_init(void)
+{
+ if(_d2_handle != NULL) {
+ return;
+ }
+
+ _d2_handle = d2_opendevice(0);
+
+ if(_d2_handle == NULL)
+ return;
+
+ /* set blocksize for default displaylist */
+ if(d2_setdlistblocksize(_d2_handle, 25) != D2_OK) {
+ LV_LOG_ERROR("Could NOT d2_setdlistblocksize\n");
+ d2_closedevice(_d2_handle);
+
+ return;
+ }
+
+ /* bind the hardware */
+ if(d2_inithw(_d2_handle, 0) != D2_OK) {
+ LV_LOG_ERROR("Could NOT d2_inithw\n");
+ d2_closedevice(_d2_handle);
+
+ return;
+ }
+
+ renderbuffer = d2_newrenderbuffer(_d2_handle, 20, 20);
+ if(!renderbuffer) {
+ LV_LOG_ERROR("NO renderbuffer\n");
+ d2_closedevice(_d2_handle);
+
+ return;
+ }
+}
+
+static void lv_port_gpu_hw_deinit(void)
+{
+ if(_d2_handle == NULL)
+ return;
+
+ D2_EXEC(d2_freerenderbuffer(_d2_handle, renderbuffer));
+ D2_EXEC(d2_closedevice(_d2_handle));
+
+ renderbuffer = NULL;
+ _d2_handle = NULL;
+}
+
+void lv_port_gpu_flush(void)
+{
+ lv_port_gpu_hw_deinit();
+}
+
+static void lv_port_gpu_start_render(void)
+{
+ D2_EXEC(d2_selectrenderbuffer(_d2_handle, renderbuffer));
+}
+
+static void lv_port_gpu_complete_render(void)
+{
+ D2_EXEC(d2_flushframe(_d2_handle));
+}
+
+void lv_port_gpu_wait(lv_draw_ctx_t * draw_ctx)
+{
+ lv_port_gpu_complete_render();
+
+ lv_draw_sw_wait_for_finish(draw_ctx);
+}
+
+static void lv_port_gpu_execute_render(void)
+{
+ if(_d2_handle) {
+ D2_EXEC(d2_executerenderbuffer(_d2_handle, renderbuffer, 0));
+ }
+}
+
+void lv_port_gpu_blit(int32_t x, int32_t y, lv_color_t * dst, const lv_area_t * fill_area)
+{
+ uint32_t ModeSrc;
+
+ ModeSrc = d2_mode_rgb565;
+
+ lv_coord_t dst_width, dst_hight;
+ dst_width = lv_area_get_width(fill_area);
+ dst_hight = lv_area_get_height(fill_area);
+
+ d2_selectrenderbuffer(_d2_handle, renderbuffer);
+
+ // Generate render operations
+ d2_framebuffer(_d2_handle, (uint16_t *)&fb_background[0], LV_HOR_RES_MAX, LV_HOR_RES_MAX,
+ MAX(fill_area->y2 + 1, 2), lv_port_gpu_cf_get_default());
+
+ d2_cliprect(_d2_handle, 0, 0, LV_HOR_RES_MAX - 1, fill_area->y2);
+ d2_setblitsrc(_d2_handle, (void *) dst, dst_width, dst_width, dst_hight, ModeSrc);
+ d2_blitcopy(_d2_handle, dst_width, dst_hight, 0, 0, D2_FIX4(dst_width), D2_FIX4(dst_hight),
+ D2_FIX4(fill_area->x1), D2_FIX4(fill_area->y1), 0);
+
+ // Execute render operations
+ d2_executerenderbuffer(_d2_handle, renderbuffer, 0);
+}
+
+void lv_port_gpu_fill(lv_color_t * dest_buf, const lv_area_t * fill_area, lv_coord_t dst_width,
+ lv_color_t color, lv_opa_t opa)
+{
+ invalidate_cache();
+
+ lv_port_gpu_start_render();
+
+ D2_EXEC(d2_framebuffer(_d2_handle, d1_maptovidmem(_d2_handle, dest_buf), MAX(dst_width, 2), MAX(dst_width, 2),
+ MAX(fill_area->y2 + 1, 2), lv_port_gpu_cf_get_default()));
+
+ D2_EXEC(d2_cliprect(_d2_handle, 0, 0, dst_width - 1, fill_area->y2));
+ D2_EXEC(d2_setalpha(_d2_handle, opa > LV_OPA_MAX ? 0xFF : opa));
+ D2_EXEC(d2_setcolor(_d2_handle, 0, lv_port_gpu_color_lv_to_d2(color)));
+ D2_EXEC(d2_renderbox(_d2_handle, D2_FIX4(fill_area->x1), D2_FIX4(fill_area->y1),
+ D2_FIX4(lv_area_get_width(fill_area)), D2_FIX4(lv_area_get_height(fill_area))));
+
+ lv_port_gpu_execute_render();
+}
+
+bool lv_port_gpu_config_blit(const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t dst_cf,
+ lv_img_cf_t src_cf, bool alpha_en, bool color_key_en, bool blend_en, bool colorize_en)
+{
+ d2_s32 d2_src_cf, d2_dst_cf;
+
+ if(blend_en && draw_dsc->blend_mode != LV_BLEND_MODE_NORMAL
+ && draw_dsc->blend_mode != LV_BLEND_MODE_ADDITIVE) {
+ return false;
+ }
+
+ d2_src_cf = lv_port_gpu_cf_lv_to_d2(src_cf);
+ d2_dst_cf = lv_port_gpu_cf_lv_to_d2(dst_cf);
+ if(d2_src_cf < 0 || !lv_port_gpu_cf_fb_valid(d2_dst_cf)) {
+ return false;
+ }
+ src_cf_val = d2_src_cf;
+ dst_cf_val = d2_dst_cf;
+
+ img_dsc = *draw_dsc;
+
+ /* Disable alpha if alpha channel does not exist */
+ alpha_enabled = lv_port_gpu_cf_has_alpha(src_cf_val) ? alpha_en : 0;
+ color_key_enabled = color_key_en;
+ blend_enabled = blend_en;
+ colorize_enabled = colorize_en | lv_port_gpu_cf_is_alpha(src_cf_val);
+
+ return true;
+}
+
+static void lv_port_gpu_blit_internal(const lv_area_t * dest_area, const lv_color_t * src_buf,
+ const lv_area_t * src_area, d2_u32 flags)
+{
+ const lv_area_t * img_area = src_area;
+ lv_area_t img_area_scaled;
+ lv_coord_t w, h, img_w, img_h;
+ d2_s32 pitch;
+ int bpp = lv_port_gpu_cf_bpp(src_cf_val);
+
+ D2_EXEC(d2_cliprect(_d2_handle, dest_area->x1, dest_area->y1, dest_area->x2, dest_area->y2));
+
+ pitch = w = lv_area_get_width(src_area);
+ h = lv_area_get_height(src_area);
+
+ if(img_dsc.zoom != LV_IMG_ZOOM_NONE) {
+ img_area_scaled.x1 = src_area->x1 + ((((int32_t)0 - img_dsc.pivot.x) * img_dsc.zoom) >> 8) + img_dsc.pivot.x;
+ img_area_scaled.x2 = src_area->x1 + ((((int32_t)w - img_dsc.pivot.x) * img_dsc.zoom) >> 8) + img_dsc.pivot.x;
+ img_area_scaled.y1 = src_area->y1 + ((((int32_t)0 - img_dsc.pivot.y) * img_dsc.zoom) >> 8) + img_dsc.pivot.y;
+ img_area_scaled.y2 = src_area->y1 + ((((int32_t)h - img_dsc.pivot.y) * img_dsc.zoom) >> 8) + img_dsc.pivot.y;
+ img_area = &img_area_scaled;
+ }
+
+ img_w = lv_area_get_width(img_area);
+ img_h = lv_area_get_height(img_area);
+
+ if(0 < bpp && bpp < 8) {
+ pitch = (w + (8 - bpp)) & (~(8 - bpp));
+ }
+
+ if(img_dsc.angle == 0) {
+ D2_EXEC(d2_setblitsrc(_d2_handle, (void *) src_buf, pitch, w, h, src_cf_val));
+
+ D2_EXEC(d2_blitcopy(_d2_handle, w, h, 0, 0,
+ D2_FIX4(img_w), D2_FIX4(img_h), D2_FIX4(img_area->x1), D2_FIX4(img_area->y1), flags));
+ }
+ else {
+ int x, y, x1, y1, x2, y2, x3, y3, x4, y4, dxu, dxv, dyu, dyv, xx, xy, yx, yy;
+ int pivot_scaled_x, pivot_scaled_y;
+ int tex_offset = (flags & d2_bf_filter) ? -32767 : 0;
+ d2_u8 amode, cmode = d2_to_copy;
+ float angle = ((float)img_dsc.angle / 10) * M_PI / 180;
+ float cos_angle = cosf(angle);
+ float sin_angle = sinf(angle);
+ d2_u8 fillmode_backup;
+
+ /* setup texture params */
+ fillmode_backup = d2_getfillmode(_d2_handle);
+ D2_EXEC(d2_setfillmode(_d2_handle, d2_fm_texture));
+ D2_EXEC(d2_settexture(_d2_handle, (void *) src_buf, pitch, w, h, src_cf_val));
+ D2_EXEC(d2_settexturemode(_d2_handle, flags & (d2_bf_filter | d2_bf_wrap)));
+ amode = flags & d2_bf_usealpha ? d2_to_copy : d2_to_one;
+ cmode = flags & d2_bf_colorize2 ? d2_to_blend : d2_to_copy;
+ D2_EXEC(d2_settextureoperation(_d2_handle, amode, cmode, cmode, cmode));
+ if(flags & d2_bf_colorize2) {
+ d2_color cl = d2_getcolor(_d2_handle, 0), ch = d2_getcolor(_d2_handle, 1);
+ D2_EXEC(d2_settexopparam(_d2_handle, d2_cc_red, (uint8_t)(cl >> 16UL),
+ (uint8_t)(ch >> 16UL)));
+ D2_EXEC(d2_settexopparam(_d2_handle, d2_cc_green, (uint8_t)(cl >> 8UL),
+ (uint8_t)(ch >> 8UL)));
+ D2_EXEC(d2_settexopparam(_d2_handle, d2_cc_blue, (uint8_t)(cl >> 0UL),
+ (uint8_t)(ch >> 0UL)));
+ }
+
+ x = D2_FIX4(img_area->x1);
+ y = D2_FIX4(img_area->y1);
+
+ /* define quad points */
+ x1 = D2_FIX4(0);
+ y1 = D2_FIX4(0);
+ x2 = D2_FIX4(img_w);
+ y2 = D2_FIX4(0);
+ x3 = D2_FIX4(img_w);
+ y3 = D2_FIX4(img_h);
+ x4 = D2_FIX4(0);
+ y4 = D2_FIX4(img_h);
+
+ /* rotate points for quad */
+ pivot_scaled_x = (img_dsc.pivot.x * img_dsc.zoom) >> 4;
+ pivot_scaled_y = (img_dsc.pivot.y * img_dsc.zoom) >> 4;
+
+ lv_port_gpu_rotate_point(&x1, &y1, cos_angle, sin_angle, pivot_scaled_x, pivot_scaled_y);
+ lv_port_gpu_rotate_point(&x2, &y2, cos_angle, sin_angle, pivot_scaled_x, pivot_scaled_y);
+ lv_port_gpu_rotate_point(&x3, &y3, cos_angle, sin_angle, pivot_scaled_x, pivot_scaled_y);
+ lv_port_gpu_rotate_point(&x4, &y4, cos_angle, sin_angle, pivot_scaled_x, pivot_scaled_y);
+
+ /* compute texture increments */
+ xx = (int)(cos_angle * 65536.0f);
+ xy = (int)(sin_angle * 65536.0f);
+ yx = (int)(-sin_angle * 65536.0f);
+ yy = (int)(cos_angle * 65536.0f);
+ dxu = ((D2_FIX16(w) / D2_FIX4(img_w)) * xx) >> 12;
+ dxv = ((D2_FIX16(w) / D2_FIX4(img_w)) * xy) >> 12;
+ dyu = ((D2_FIX16(h) / D2_FIX4(img_h)) * yx) >> 12;
+ dyv = ((D2_FIX16(h) / D2_FIX4(img_h)) * yy) >> 12;
+
+ /* map texture exactly to rotated quad, so texel center is always (0/0) top-left */
+ D2_EXEC(d2_settexelcenter(_d2_handle, 0, 0));
+ D2_EXEC(d2_settexturemapping(_d2_handle, (d2_point)(x + x1), (d2_point)(y + y1),
+ tex_offset, tex_offset, dxu, dxv, dyu, dyv));
+
+ int minx = MAX(dest_area->x1, D2_INT4(x + MIN(x1, MIN(x2, MIN(x3, x4)))));
+ int maxx = MIN(dest_area->x2, D2_INT4(x + MAX(x1, MAX(x2, MAX(x3, x4)))));
+ int slice = (flags & d2_bf_filter) ? 6 : 8;
+
+ /* Perform render operation in slices to acheive better performance */
+ for(int posx = minx; posx < maxx; posx += slice) {
+ D2_EXEC(d2_cliprect(_d2_handle, posx, dest_area->y1, MIN(posx + slice - 1, maxx), dest_area->y2));
+ D2_EXEC(d2_renderquad(_d2_handle, (d2_point)(x + x1), (d2_point)(y + y1),
+ (d2_point)(x + x2), (d2_point)(y + y2),
+ (d2_point)(x + x3), (d2_point)(y + y3),
+ (d2_point)(x + x4), (d2_point)(y + y4), 0));
+ }
+ D2_EXEC(d2_setfillmode(_d2_handle, fillmode_backup));
+ }
+}
+
+void lv_port_ra_gpu_blit(lv_color_t * dst, const lv_area_t * dst_area, lv_coord_t dest_stride,
+ const lv_color_t * src, const lv_area_t * src_area, lv_opa_t opa)
+{
+ d2_u32 flags = 0;
+ const d2_color * clut = NULL;
+ int clut_len = 0;
+
+ invalidate_cache();
+
+ clut_len = lv_port_gpu_handle_indexed_color(&src, &clut, src_cf_val);
+
+ lv_port_gpu_start_render();
+
+ D2_EXEC(d2_framebuffer(_d2_handle, d1_maptovidmem(_d2_handle, dst), MAX(dest_stride, 2),
+ MAX(dst_area->x2 + 1, 2), MAX(dst_area->y2 + 1, 2), dst_cf_val));
+
+ flags |= alpha_enabled ? d2_bf_usealpha : 0;
+
+ D2_EXEC(d2_setalpha(_d2_handle, opa > LV_OPA_MAX ? LV_OPA_COVER : opa));
+
+ if(clut) {
+ D2_EXEC(d2_writetexclut_direct(_d2_handle, clut, 0, clut_len));
+ }
+
+ flags |= color_key_enabled ? d2_bf_usealpha : 0;
+ flags |= (colorize_enabled || img_dsc.recolor_opa != LV_OPA_TRANSP) ? d2_bf_colorize2 : 0;
+ if(colorize_enabled) {
+ D2_EXEC(d2_setcolor(_d2_handle, 0, lv_port_gpu_color_lv_to_d2(img_dsc.recolor)));
+ D2_EXEC(d2_setcolor(_d2_handle, 1, lv_port_gpu_color_lv_to_d2(img_dsc.recolor)));
+ }
+ else if(img_dsc.recolor_opa != LV_OPA_TRANSP) {
+ d2_color cl = 0, ch = 0;
+ lv_port_gpu_get_recolor_consts(&cl, &ch);
+ D2_EXEC(d2_setcolor(_d2_handle, 0, cl));
+ D2_EXEC(d2_setcolor(_d2_handle, 1, ch));
+ }
+
+ flags |= ((img_dsc.angle || img_dsc.zoom != LV_IMG_ZOOM_NONE) && img_dsc.antialias) ? d2_bf_filter : 0;
+
+ if(blend_enabled) {
+ D2_EXEC(d2_setblendmode(_d2_handle, d2_bm_alpha,
+ img_dsc.blend_mode != LV_BLEND_MODE_NORMAL ? d2_bm_one : d2_bm_one_minus_alpha));
+ D2_EXEC(d2_setalphablendmode(_d2_handle, d2_bm_one, d2_bm_one_minus_alpha));
+ }
+ else {
+ D2_EXEC(d2_setblendmode(_d2_handle, d2_bm_one, d2_bm_zero));
+ D2_EXEC(d2_setalphablendmode(_d2_handle, d2_bm_one, d2_bm_zero));
+ }
+
+ lv_port_gpu_blit_internal(dst_area, src, src_area, flags);
+
+ lv_port_gpu_execute_render();
+}
+
+void lv_draw_ra6m3_2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+{
+ lv_area_t blend_area;
+ if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area)) return;
+
+ bool done = false;
+
+ if(dsc->mask_buf == NULL && dsc->blend_mode == LV_BLEND_MODE_NORMAL && lv_area_get_size(&blend_area) > 100) {
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+
+ lv_color_t * dest_buf = draw_ctx->buf;
+
+ const lv_color_t * src_buf = dsc->src_buf;
+ if(src_buf) {
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+
+ lv_area_t src_area;
+ src_area.x1 = blend_area.x1 - (dsc->blend_area->x1 - draw_ctx->buf_area->x1);
+ src_area.y1 = blend_area.y1 - (dsc->blend_area->y1 - draw_ctx->buf_area->y1);
+ src_area.x2 = src_area.x1 + lv_area_get_width(dsc->blend_area) - 1;
+ src_area.y2 = src_area.y1 + lv_area_get_height(dsc->blend_area) - 1;
+
+ lv_port_ra_gpu_blit(dest_buf, &blend_area, dest_stride, src_buf, &src_area, dsc->opa);
+ done = true;
+ }
+ else if(dsc->opa >= LV_OPA_MAX) {
+ lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ lv_port_gpu_fill(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa);
+ done = true;
+ }
+ }
+
+ if(!done) lv_draw_sw_blend_basic(draw_ctx, dsc);
+}
+
+static void lv_port_gpu_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t color_format)
+{
+ /*TODO basic ARGB8888 image can be handles here*/
+
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, color_format);
+}
+
+void lv_draw_ra6m3_2d_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+ lv_draw_sw_init_ctx(drv, draw_ctx);
+
+ lv_draw_ra6m3_dma2d_ctx_t * ra_2d_draw_ctx = (lv_draw_sw_ctx_t *)draw_ctx;
+
+ ra_2d_draw_ctx->blend = lv_draw_ra6m3_2d_blend;
+ ra_2d_draw_ctx->base_draw.draw_img_decoded = lv_port_gpu_img_decoded;
+ ra_2d_draw_ctx->base_draw.wait_for_finish = lv_port_gpu_wait;
+ ra_2d_draw_ctx->base_draw.draw_letter = lv_draw_gpu_letter;
+ //ra_2d_draw_ctx->base_draw.buffer_copy = lv_draw_ra6m3_2d_buffer_copy;
+}
+
+void lv_draw_stm32_dma2d_ctx_deinit(lv_disp_t * disp, lv_draw_ctx_t * draw_ctx)
+{
+ LV_UNUSED(disp);
+ LV_UNUSED(draw_ctx);
+}
+
+static void invalidate_cache(void)
+{
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ if(disp->driver->clean_dcache_cb) disp->driver->clean_dcache_cb(disp->driver);
+}
+
+#ifdef LOG_ERRORS
+static void lv_port_gpu_log_error(d2_s32 status, const char * func, int line)
+{
+ if(status) {
+ log_error_list[error_list_index].error = status;
+ log_error_list[error_list_index].func = func;
+ log_error_list[error_list_index].line = line;
+ LV_LOG_ERROR("%s\r\n", d2_geterrorstring(_d2_handle));
+ LV_LOG_ERROR("%d:\t%d - %s : %d\r\n", error_count,
+ log_error_list[error_list_index].error,
+ log_error_list[error_list_index].func,
+ log_error_list[error_list_index].line);
+
+ error_count++;
+ error_list_index++;
+ if(error_list_index >= ERROR_LIST_SIZE) {
+ error_list_index = 0;
+ }
+ }
+}
+#endif
+#endif /* LV_USE_GPU_RA6M3_G2D */
diff --git a/lib/lvgl/src/draw/renesas/lv_gpu_d2_ra6m3.h b/lib/lvgl/src/draw/renesas/lv_gpu_d2_ra6m3.h
new file mode 100644
index 0000000..5d37ce4
--- /dev/null
+++ b/lib/lvgl/src/draw/renesas/lv_gpu_d2_ra6m3.h
@@ -0,0 +1,56 @@
+/**
+ * @file lv_gpu_d2_ra6m3.h
+ *
+ */
+#ifndef LV_GPU_D2_RA6M3_H
+#define LV_GPU_D2_RA6M3_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../misc/lv_color.h"
+
+#if LV_USE_GPU_RA6M3_G2D
+#include "../../core/lv_disp.h"
+#include "../sw/lv_draw_sw.h"
+
+/**********************
+ * DEFINE
+ **********************/
+#define MIN(A, B) ((A) < (B) ? (A) : (B))
+#define MAX(A, B) ((A) > (B) ? (A) : (B))
+#define M_PI 3.1415926
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef lv_draw_sw_ctx_t lv_draw_ra6m3_dma2d_ctx_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+void lv_draw_ra6m3_g2d_init(void);
+
+void lv_port_gpu_init(void);
+
+void lv_port_gpu_flush(void);
+
+void lv_port_gpu_blit(int32_t x, int32_t y, lv_color_t * dst, const lv_area_t * fill_area);
+
+void lv_draw_ra6m3_2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+
+void lv_draw_ra6m3_2d_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+void lv_draw_ra6m3_2d_ctx_deinit(lv_disp_drv_t * disp, lv_draw_ctx_t * draw_ctx);
+
+#endif /*LV_USE_GPU_GD32_IPA*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl.c
index 430f3a2..91dbfff 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl.c
@@ -7,7 +7,6 @@
* INCLUDES
*********************/
-
#include "../../lv_conf_internal.h"
#if LV_USE_GPU_SDL
@@ -15,6 +14,7 @@
#include "lv_draw_sdl.h"
#include "lv_draw_sdl_utils.h"
#include "lv_draw_sdl_texture_cache.h"
+#include "lv_draw_sdl_layer.h"
/*********************
* DEFINES
@@ -69,6 +69,10 @@ void lv_draw_sdl_init_ctx(lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx)
draw_ctx->draw_arc = lv_draw_sdl_draw_arc;
draw_ctx->draw_polygon = lv_draw_sdl_polygon;
draw_ctx->draw_bg = lv_draw_sdl_draw_bg;
+ draw_ctx->layer_init = lv_draw_sdl_layer_init;
+ draw_ctx->layer_blend = lv_draw_sdl_layer_blend;
+ draw_ctx->layer_destroy = lv_draw_sdl_layer_destroy;
+ draw_ctx->layer_instance_size = sizeof(lv_draw_sdl_layer_ctx_t);
lv_draw_sdl_ctx_t * draw_ctx_sdl = (lv_draw_sdl_ctx_t *) draw_ctx;
draw_ctx_sdl->renderer = ((lv_draw_sdl_drv_param_t *) disp_drv->user_data)->renderer;
draw_ctx_sdl->internals = lv_mem_alloc(sizeof(lv_draw_sdl_context_internals_t));
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl.h
index 9b44a7b..7b3b3d1 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl.h
@@ -6,7 +6,6 @@
#ifndef LV_DRAW_SDL_H
#define LV_DRAW_SDL_H
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl.mk b/lib/lvgl/src/draw/sdl/lv_draw_sdl.mk
index 6609c38..c5c28b6 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl.mk
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl.mk
@@ -11,6 +11,7 @@ CSRCS += lv_draw_sdl_rect.c
CSRCS += lv_draw_sdl_stack_blur.c
CSRCS += lv_draw_sdl_texture_cache.c
CSRCS += lv_draw_sdl_utils.c
+CSRCS += lv_draw_sdl_layer.c
DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl
VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_arc.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_arc.c
index 5786eae..9361daf 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_arc.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_arc.c
@@ -67,7 +67,6 @@ void lv_draw_sdl_draw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * ds
area_in.x2 -= dsc->width;
area_in.y2 -= dsc->width;
-
while(start_angle >= 360) start_angle -= 360;
while(end_angle >= 360) end_angle -= 360;
@@ -104,7 +103,9 @@ void lv_draw_sdl_draw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * ds
}
lv_coord_t w = lv_area_get_width(&draw_area), h = lv_area_get_height(&draw_area);
- SDL_Texture * texture = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1, w, h);
+ bool texture_cached = false;
+ SDL_Texture * texture = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1, w, h,
+ &texture_cached);
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
dump_masks(texture, &draw_area, mask_ids, mask_ids_count, cap_ids[0] != LV_MASK_ID_INV ? cap_ids : NULL);
@@ -135,6 +136,11 @@ void lv_draw_sdl_draw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * ds
SDL_SetTextureColorMod(texture, color.r, color.g, color.b);
SDL_SetTextureAlphaMod(texture, dsc->opa);
SDL_RenderCopy(ctx->renderer, texture, &srcrect, &dstrect);
+
+ if(!texture_cached) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
}
/**********************
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.c
index 1ee843f..9bf6385 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.c
@@ -13,7 +13,6 @@
#include "../../misc/lv_gc.h"
#include "../../core/lv_refr.h"
#include "lv_draw_sdl_composite.h"
-#include "lv_draw_sdl_mask.h"
#include "lv_draw_sdl_utils.h"
#include "lv_draw_sdl_priv.h"
#include "lv_draw_sdl_texture_cache.h"
@@ -84,20 +83,26 @@ bool lv_draw_sdl_composite_begin(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coor
const bool draw_blend = blend_mode != LV_BLEND_MODE_NORMAL;
if(draw_mask || draw_blend) {
lv_draw_sdl_context_internals_t * internals = ctx->internals;
- LV_ASSERT(internals->mask == NULL && internals->composition == NULL);
+ LV_ASSERT(internals->mask == NULL && internals->composition == NULL && internals->target_backup == NULL);
lv_coord_t w = lv_area_get_width(apply_area), h = lv_area_get_height(apply_area);
- internals->composition = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0, w, h);
- /* Don't need to worry about overflow */
+ internals->composition = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0, w, h,
+ &internals->composition_cached);
+ /* Don't need to worry about integral overflow */
lv_coord_t ofs_x = (lv_coord_t) - apply_area->x1, ofs_y = (lv_coord_t) - apply_area->y1;
/* Offset draw area to start with (0,0) of coords */
lv_area_move(coords_out, ofs_x, ofs_y);
lv_area_move(clip_out, ofs_x, ofs_y);
+ internals->target_backup = SDL_GetRenderTarget(ctx->renderer);
SDL_SetRenderTarget(ctx->renderer, internals->composition);
SDL_SetRenderDrawColor(ctx->renderer, 255, 255, 255, 0);
- SDL_RenderClear(ctx->renderer);
+ /* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
+ SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_NONE);
+ SDL_RenderFillRect(ctx->renderer, NULL);
+ SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_BLEND);
#if LV_GPU_SDL_CUSTOM_BLEND_MODE
- internals->mask = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM0, w, h);
+ internals->mask = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM0, w, h,
+ &internals->composition_cached);
dump_masks(internals->mask, apply_area);
#endif
}
@@ -140,7 +145,7 @@ void lv_draw_sdl_composite_end(lv_draw_sdl_ctx_t * ctx, const lv_area_t * apply_
SDL_Rect dst_rect;
lv_area_to_sdl_rect(apply_area, &dst_rect);
- SDL_SetRenderTarget(ctx->renderer, ctx->base_draw.buf);
+ SDL_SetRenderTarget(ctx->renderer, internals->target_backup);
switch(blend_mode) {
case LV_BLEND_MODE_NORMAL:
SDL_SetTextureBlendMode(internals->composition, SDL_BLENDMODE_BLEND);
@@ -171,29 +176,47 @@ void lv_draw_sdl_composite_end(lv_draw_sdl_ctx_t * ctx, const lv_area_t * apply_
break;
}
SDL_RenderCopy(ctx->renderer, internals->composition, &src_rect, &dst_rect);
+ if(!internals->composition_cached) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(internals->composition);
+ }
}
- internals->mask = internals->composition = NULL;
+ internals->mask = internals->composition = internals->target_backup = NULL;
}
SDL_Texture * lv_draw_sdl_composite_texture_obtain(lv_draw_sdl_ctx_t * ctx, lv_draw_sdl_composite_texture_id_t id,
- lv_coord_t w, lv_coord_t h)
+ lv_coord_t w, lv_coord_t h, bool * texture_in_cache)
{
lv_point_t * tex_size = NULL;
composite_key_t mask_key = mask_key_create(id);
SDL_Texture * result = lv_draw_sdl_texture_cache_get_with_userdata(ctx, &mask_key, sizeof(composite_key_t), NULL,
(void **) &tex_size);
- if(!result || tex_size->x < w || tex_size->y < h) {
+ if(result == NULL || tex_size->x < w || tex_size->y < h) {
lv_coord_t size = next_pow_of_2(LV_MAX(w, h));
int access = SDL_TEXTUREACCESS_STREAMING;
- if(id >= LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0) {
+ if(id >= LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TRANSFORM0) {
+ access = SDL_TEXTUREACCESS_TARGET;
+ }
+ else if(id >= LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0) {
access = SDL_TEXTUREACCESS_TARGET;
}
result = SDL_CreateTexture(ctx->renderer, LV_DRAW_SDL_TEXTURE_FORMAT, access, size, size);
tex_size = lv_mem_alloc(sizeof(lv_point_t));
tex_size->x = tex_size->y = size;
- lv_draw_sdl_texture_cache_put_advanced(ctx, &mask_key, sizeof(composite_key_t), result, tex_size, lv_mem_free, 0);
+ bool in_cache = lv_draw_sdl_texture_cache_put_advanced(ctx, &mask_key, sizeof(composite_key_t), result,
+ tex_size, lv_mem_free, 0);
+ if(!in_cache) {
+ lv_mem_free(tex_size);
+ }
+ if(texture_in_cache != NULL) {
+ *texture_in_cache = in_cache;
+ }
}
+ else if(texture_in_cache != NULL) {
+ *texture_in_cache = true;
+ }
+
return result;
}
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.h
index 3050815..57191bb 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_composite.h
@@ -35,6 +35,7 @@ typedef enum lv_draw_sdl_composite_texture_id_t {
LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1,
LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET0,
LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TARGET1,
+ LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TRANSFORM0,
} lv_draw_sdl_composite_texture_id_t;
/**********************
@@ -44,6 +45,7 @@ typedef enum lv_draw_sdl_composite_texture_id_t {
/**
* Begin drawing with mask. Render target will be switched to a temporary texture,
* and drawing coordinates may get clipped or translated
+ * @param ctx Drawing context
* @param coords_in Original coordinates
* @param clip_in Original clip area
* @param extension Useful for shadows or outlines, can be NULL
@@ -58,8 +60,18 @@ bool lv_draw_sdl_composite_begin(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coor
void lv_draw_sdl_composite_end(lv_draw_sdl_ctx_t * ctx, const lv_area_t * apply_area, lv_blend_mode_t blend_mode);
+/**
+ *
+ * @param ctx Drawing context
+ * @param id Texture ID
+ * @param w Maximum width needed
+ * @param h Maximum height needed
+ * @param texture_in_cache output to query if the texture is in cache. If it's not in cache, you'll need to destroy it
+ * by yourself
+ * @return Obtained texture
+ */
SDL_Texture * lv_draw_sdl_composite_texture_obtain(lv_draw_sdl_ctx_t * ctx, lv_draw_sdl_composite_texture_id_t id,
- lv_coord_t w, lv_coord_t h);
+ lv_coord_t w, lv_coord_t h, bool * texture_in_cache);
/**********************
* MACROS
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.c
index c678238..0136a26 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.c
@@ -22,6 +22,7 @@
#include "lv_draw_sdl_texture_cache.h"
#include "lv_draw_sdl_composite.h"
#include "lv_draw_sdl_rect.h"
+#include "lv_draw_sdl_layer.h"
/*********************
* DEFINES
@@ -71,7 +72,8 @@ static void draw_img_rounded(lv_draw_sdl_ctx_t * ctx, SDL_Texture * texture, con
lv_coord_t radius);
static SDL_Texture * img_rounded_frag_obtain(lv_draw_sdl_ctx_t * ctx, SDL_Texture * texture,
- const lv_draw_sdl_img_header_t * header, int w, int h, lv_coord_t radius);
+ const lv_draw_sdl_img_header_t * header, int w, int h, lv_coord_t radius,
+ bool * in_cache);
static lv_draw_img_rounded_key_t rounded_key_create(const SDL_Texture * texture, lv_coord_t w, lv_coord_t h,
lv_coord_t radius);
@@ -86,7 +88,6 @@ static void calc_draw_part(SDL_Texture * texture, const lv_draw_sdl_img_header_t
* MACROS
**********************/
-
static void apply_recolor_opa(SDL_Texture * texture, const lv_draw_img_dsc_t * draw_dsc);
/**********************
@@ -105,11 +106,16 @@ lv_res_t lv_draw_sdl_img_core(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t
lv_draw_sdl_img_header_t * header = NULL;
SDL_Texture * texture = lv_draw_sdl_texture_cache_get_with_userdata(ctx, key, key_size, &texture_found,
(void **) &header);
+ bool texture_in_cache = false;
if(!texture_found) {
- lv_draw_sdl_img_load_texture(ctx, key, key_size, src, draw_dsc->frame_id, &texture, &header);
+ lv_draw_sdl_img_load_texture(ctx, key, key_size, src, draw_dsc->frame_id, &texture, &header,
+ &texture_in_cache);
+ }
+ else {
+ texture_in_cache = true;
}
SDL_free(key);
- if(!texture) {
+ if(!texture || !header) {
return LV_RES_INV;
}
@@ -123,11 +129,15 @@ lv_res_t lv_draw_sdl_img_core(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t
/* Coords will be translated so coords will start at (0,0) */
lv_area_t t_coords = zoomed_cords, t_clip = *clip, apply_area;
+ bool has_composite = false;
+
if(!check_mask_simple_radius(&t_coords, &radius)) {
- lv_draw_sdl_composite_begin(ctx, &zoomed_cords, clip, NULL, draw_dsc->blend_mode,
- &t_coords, &t_clip, &apply_area);
+ has_composite = lv_draw_sdl_composite_begin(ctx, &zoomed_cords, clip, NULL, draw_dsc->blend_mode,
+ &t_coords, &t_clip, &apply_area);
}
+ lv_draw_sdl_transform_areas_offset(ctx, has_composite, &apply_area, &t_coords, &t_clip);
+
SDL_Rect clip_rect, coords_rect;
lv_area_to_sdl_rect(&t_clip, &clip_rect);
lv_area_to_sdl_rect(&t_coords, &coords_rect);
@@ -143,6 +153,14 @@ lv_res_t lv_draw_sdl_img_core(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t
lv_draw_sdl_composite_end(ctx, &apply_area, draw_dsc->blend_mode);
+ if(!texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ if(!header->managed) {
+ SDL_DestroyTexture(texture);
+ }
+ lv_mem_free(header);
+ }
+
return LV_RES_OK;
}
@@ -180,7 +198,7 @@ static void calc_draw_part(SDL_Texture * texture, const lv_draw_sdl_img_header_t
bool lv_draw_sdl_img_load_texture(lv_draw_sdl_ctx_t * ctx, lv_draw_sdl_cache_key_head_img_t * key, size_t key_size,
const void * src, int32_t frame_id, SDL_Texture ** texture,
- lv_draw_sdl_img_header_t ** header)
+ lv_draw_sdl_img_header_t ** header, bool * texture_in_cache)
{
_lv_img_cache_entry_t * cdsc = _lv_img_cache_open(src, lv_color_white(), frame_id);
lv_draw_sdl_cache_flag_t tex_flags = 0;
@@ -205,16 +223,18 @@ bool lv_draw_sdl_img_load_texture(lv_draw_sdl_ctx_t * ctx, lv_draw_sdl_cache_key
#endif
}
if(texture && cdsc) {
- *header = SDL_malloc(sizeof(lv_draw_sdl_img_header_t));
+ *header = lv_mem_alloc(sizeof(lv_draw_sdl_img_header_t));
SDL_memcpy(&(*header)->base, &cdsc->dec_dsc.header, sizeof(lv_img_header_t));
(*header)->rect = rect;
- lv_draw_sdl_texture_cache_put_advanced(ctx, key, key_size, *texture, *header, SDL_free, tex_flags);
+ (*header)->managed = (tex_flags & LV_DRAW_SDL_CACHE_FLAG_MANAGED) != 0;
+ *texture_in_cache = lv_draw_sdl_texture_cache_put_advanced(ctx, key, key_size, *texture, *header, SDL_free,
+ tex_flags);
+ return true;
}
else {
- lv_draw_sdl_texture_cache_put(ctx, key, key_size, NULL);
+ *texture_in_cache = lv_draw_sdl_texture_cache_put(ctx, key, key_size, NULL);
return false;
}
- return true;
}
/**********************
@@ -308,14 +328,14 @@ static void draw_img_simple(lv_draw_sdl_ctx_t * ctx, SDL_Texture * texture, cons
}
}
-
static void draw_img_rounded(lv_draw_sdl_ctx_t * ctx, SDL_Texture * texture, const lv_draw_sdl_img_header_t * header,
const lv_draw_img_dsc_t * draw_dsc, const lv_area_t * coords, const lv_area_t * clip,
lv_coord_t radius)
{
const int w = lv_area_get_width(coords), h = lv_area_get_height(coords);
lv_coord_t real_radius = LV_MIN3(radius, w, h);
- SDL_Texture * frag = img_rounded_frag_obtain(ctx, texture, header, w, h, real_radius);
+ bool frag_in_cache = false;
+ SDL_Texture * frag = img_rounded_frag_obtain(ctx, texture, header, w, h, real_radius, &frag_in_cache);
apply_recolor_opa(frag, draw_dsc);
lv_draw_sdl_rect_bg_frag_draw_corners(ctx, frag, real_radius, coords, clip, true);
@@ -355,6 +375,11 @@ static void draw_img_rounded(lv_draw_sdl_ctx_t * ctx, SDL_Texture * texture, con
SDL_RenderCopy(ctx->renderer, texture, &src_rect, &dst_rect);
}
SDL_RenderSetClipRect(ctx->renderer, NULL);
+
+ if(!frag_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(frag);
+ }
}
static void apply_recolor_opa(SDL_Texture * texture, const lv_draw_img_dsc_t * draw_dsc)
@@ -372,22 +397,28 @@ static void apply_recolor_opa(SDL_Texture * texture, const lv_draw_img_dsc_t * d
}
static SDL_Texture * img_rounded_frag_obtain(lv_draw_sdl_ctx_t * ctx, SDL_Texture * texture,
- const lv_draw_sdl_img_header_t * header, int w, int h, lv_coord_t radius)
+ const lv_draw_sdl_img_header_t * header, int w, int h, lv_coord_t radius,
+ bool * in_cache)
{
lv_draw_img_rounded_key_t key = rounded_key_create(texture, w, h, radius);
- SDL_Texture * mask_frag = lv_draw_sdl_rect_bg_frag_obtain(ctx, radius);
+ bool mask_frag_in_cache = false;
+ SDL_Texture * mask_frag = lv_draw_sdl_rect_bg_frag_obtain(ctx, radius, &mask_frag_in_cache);
SDL_Texture * img_frag = lv_draw_sdl_texture_cache_get(ctx, &key, sizeof(key), NULL);
if(img_frag == NULL) {
const lv_coord_t full_frag_size = radius * 2 + 3;
img_frag = SDL_CreateTexture(ctx->renderer, LV_DRAW_SDL_TEXTURE_FORMAT, SDL_TEXTUREACCESS_TARGET,
full_frag_size, full_frag_size);
+ SDL_assert(img_frag);
SDL_SetTextureBlendMode(img_frag, SDL_BLENDMODE_BLEND);
SDL_Texture * old_target = SDL_GetRenderTarget(ctx->renderer);
SDL_SetRenderTarget(ctx->renderer, img_frag);
SDL_SetRenderDrawColor(ctx->renderer, 0, 0, 0, 0);
- SDL_RenderClear(ctx->renderer);
+ /* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
+ SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_NONE);
+ SDL_RenderFillRect(ctx->renderer, NULL);
+ SDL_SetRenderDrawBlendMode(ctx->renderer, SDL_BLENDMODE_BLEND);
- lv_area_t coords = {0, 0, w - 1, h - 1}, clip;
+ lv_area_t coords = {0, 0, w - 1, h - 1};
lv_area_t frag_coords = {0, 0, full_frag_size - 1, full_frag_size - 1};
lv_draw_sdl_rect_bg_frag_draw_corners(ctx, mask_frag, radius, &frag_coords, NULL, false);
@@ -438,7 +469,14 @@ static SDL_Texture * img_rounded_frag_obtain(lv_draw_sdl_ctx_t * ctx, SDL_Textur
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
SDL_SetRenderTarget(ctx->renderer, old_target);
- lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), img_frag);
+ *in_cache = lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), img_frag);
+ }
+ else {
+ *in_cache = true;
+ }
+ if(!mask_frag_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(mask_frag);
}
return img_frag;
}
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.h
index 0e27027..e027bd9 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_img.h
@@ -6,7 +6,6 @@
#ifndef LV_DRAW_SDL_IMG_H
#define LV_DRAW_SDL_IMG_H
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -35,6 +34,7 @@ extern "C" {
typedef struct lv_draw_sdl_img_header_t {
lv_img_header_t base;
SDL_Rect rect;
+ bool managed;
} lv_draw_sdl_img_header_t;
/**********************
@@ -56,9 +56,22 @@ typedef struct lv_draw_sdl_img_header_t {
/*=====================
* Other functions
*====================*/
+/**
+ *
+ * @param ctx Drawing context
+ * @param key Texture cache key
+ * @param key_size Size of texture cache key
+ * @param src Image source pointer
+ * @param frame_id Frame ID for animated image
+ * @param texture Texture for render
+ * @param header Header also holds sdl image info
+ * @param texture_in_cache Whether the texture has been put in the cache. Please note for managed texture,
+ * this will be false too. So you'll need to check header.managed too.
+ * @return Whether the image has been loaded successfully
+ */
bool lv_draw_sdl_img_load_texture(lv_draw_sdl_ctx_t * ctx, lv_draw_sdl_cache_key_head_img_t * key, size_t key_size,
const void * src, int32_t frame_id, SDL_Texture ** texture,
- lv_draw_sdl_img_header_t ** header);
+ lv_draw_sdl_img_header_t ** header, bool * texture_in_cache);
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_label.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_label.c
index 344f40a..2e51fee 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_label.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_label.c
@@ -19,6 +19,7 @@
#include "lv_draw_sdl_utils.h"
#include "lv_draw_sdl_texture_cache.h"
#include "lv_draw_sdl_composite.h"
+#include "lv_draw_sdl_layer.h"
/*********************
* DEFINES
@@ -40,7 +41,6 @@ typedef struct {
static lv_font_glyph_key_t font_key_glyph_create(const lv_font_t * font_p, uint32_t letter);
-
/**********************
* STATIC VARIABLES
**********************/
@@ -53,7 +53,7 @@ static lv_font_glyph_key_t font_key_glyph_create(const lv_font_t * font_p, uint3
* GLOBAL FUNCTIONS
**********************/
-void lv_draw_sdl_draw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
+void lv_draw_sdl_draw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
uint32_t letter)
{
const lv_area_t * clip_area = draw_ctx->clip_area;
@@ -116,6 +116,7 @@ void lv_draw_sdl_draw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t
lv_font_glyph_key_t glyph_key = font_key_glyph_create(font_p, letter);
bool glyph_found = false;
SDL_Texture * texture = lv_draw_sdl_texture_cache_get(ctx, &glyph_key, sizeof(glyph_key), &glyph_found);
+ bool in_cache = false;
if(!glyph_found) {
if(g.resolved_font) {
font_p = g.resolved_font;
@@ -127,18 +128,27 @@ void lv_draw_sdl_draw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t
texture = SDL_CreateTextureFromSurface(renderer, mask);
SDL_FreeSurface(mask);
lv_mem_free(buf);
- lv_draw_sdl_texture_cache_put(ctx, &glyph_key, sizeof(glyph_key), texture);
+ in_cache = lv_draw_sdl_texture_cache_put(ctx, &glyph_key, sizeof(glyph_key), texture);
+ }
+ else {
+ in_cache = true;
}
if(!texture) {
return;
}
lv_area_t t_letter = letter_area, t_clip = *clip_area, apply_area;
- bool has_mask = lv_draw_sdl_composite_begin(ctx, &letter_area, clip_area, NULL, dsc->blend_mode, &t_letter, &t_clip,
- &apply_area);
+ bool has_composite = lv_draw_sdl_composite_begin(ctx, &letter_area, clip_area, NULL, dsc->blend_mode, &t_letter,
+ &t_clip, &apply_area);
+
+ lv_draw_sdl_transform_areas_offset(ctx, has_composite, &apply_area, &t_letter, &t_clip);
/*If the letter is completely out of mask don't draw it*/
if(!_lv_area_intersect(&draw_area, &t_letter, &t_clip)) {
+ if(!in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
return;
}
SDL_Rect srcrect, dstrect;
@@ -153,6 +163,11 @@ void lv_draw_sdl_draw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t
SDL_RenderCopy(renderer, texture, &srcrect, &dstrect);
lv_draw_sdl_composite_end(ctx, &apply_area, dsc->blend_mode);
+
+ if(!in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
}
/**********************
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_layer.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_layer.c
new file mode 100644
index 0000000..d517636
--- /dev/null
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_layer.c
@@ -0,0 +1,147 @@
+/**
+ * @file lv_draw_sdl_refr.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../lv_conf_internal.h"
+
+#if LV_USE_GPU_SDL
+
+#include "../../core/lv_refr.h"
+
+#include "lv_draw_sdl.h"
+#include "lv_draw_sdl_priv.h"
+#include "lv_draw_sdl_composite.h"
+#include "lv_draw_sdl_utils.h"
+#include "lv_draw_sdl_layer.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+lv_draw_layer_ctx_t * lv_draw_sdl_layer_init(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags)
+{
+ lv_draw_sdl_ctx_t * ctx = (lv_draw_sdl_ctx_t *) draw_ctx;
+ SDL_Renderer * renderer = ctx->renderer;
+
+ lv_draw_sdl_layer_ctx_t * transform_ctx = (lv_draw_sdl_layer_ctx_t *) layer_ctx;
+
+ transform_ctx->flags = flags;
+ transform_ctx->orig_target = SDL_GetRenderTarget(renderer);
+
+ lv_coord_t target_w = lv_area_get_width(&layer_ctx->area_full);
+ lv_coord_t target_h = lv_area_get_height(&layer_ctx->area_full);
+
+ enum lv_draw_sdl_composite_texture_id_t texture_id = LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_TRANSFORM0 +
+ ctx->internals->transform_count;
+ transform_ctx->target = lv_draw_sdl_composite_texture_obtain(ctx, texture_id, target_w, target_h,
+ &transform_ctx->target_in_cache);
+ transform_ctx->target_rect.x = 0;
+ transform_ctx->target_rect.y = 0;
+ transform_ctx->target_rect.w = target_w;
+ transform_ctx->target_rect.h = target_h;
+
+ layer_ctx->max_row_with_alpha = target_h;
+ layer_ctx->max_row_with_no_alpha = target_h;
+
+ SDL_SetTextureBlendMode(transform_ctx->target, SDL_BLENDMODE_BLEND);
+ SDL_SetRenderTarget(renderer, transform_ctx->target);
+
+ /* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
+ SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);
+ SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
+ SDL_RenderFillRect(renderer, NULL);
+ SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
+
+ /* Set proper drawing context for transform layer */
+ ctx->internals->transform_count += 1;
+ draw_ctx->buf_area = &layer_ctx->area_full;
+ draw_ctx->clip_area = &layer_ctx->area_full;
+
+ return layer_ctx;
+}
+
+void lv_draw_sdl_layer_blend(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx,
+ const lv_draw_img_dsc_t * draw_dsc)
+{
+ lv_draw_sdl_ctx_t * ctx = (lv_draw_sdl_ctx_t *) draw_ctx;
+ lv_draw_sdl_layer_ctx_t * transform_ctx = (lv_draw_sdl_layer_ctx_t *) layer_ctx;
+
+ SDL_Renderer * renderer = ctx->renderer;
+
+ SDL_Rect trans_rect;
+
+ if(transform_ctx->flags & LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE) {
+ lv_area_zoom_to_sdl_rect(&layer_ctx->area_act, &trans_rect, draw_dsc->zoom, &draw_dsc->pivot);
+ }
+ else {
+ lv_area_zoom_to_sdl_rect(&layer_ctx->area_full, &trans_rect, draw_dsc->zoom, &draw_dsc->pivot);
+ }
+
+ SDL_SetRenderTarget(renderer, transform_ctx->orig_target);
+
+ /*Render off-screen texture, transformed*/
+ SDL_Rect clip_rect;
+ lv_area_to_sdl_rect(layer_ctx->original.clip_area, &clip_rect);
+ SDL_Point center = {.x = draw_dsc->pivot.x, .y = draw_dsc->pivot.y};
+ SDL_RenderSetClipRect(renderer, &clip_rect);
+ SDL_SetTextureAlphaMod(transform_ctx->target, draw_dsc->opa);
+ SDL_RenderCopyEx(renderer, transform_ctx->target, &transform_ctx->target_rect, &trans_rect,
+ draw_dsc->angle, ¢er, SDL_FLIP_NONE);
+ SDL_RenderSetClipRect(renderer, NULL);
+}
+
+void lv_draw_sdl_layer_destroy(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx)
+{
+ lv_draw_sdl_ctx_t * ctx = (lv_draw_sdl_ctx_t *) draw_ctx;
+ lv_draw_sdl_layer_ctx_t * transform_ctx = (lv_draw_sdl_layer_ctx_t *) layer_ctx;
+ if(!transform_ctx->target_in_cache && transform_ctx->target != NULL) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(transform_ctx->target);
+ }
+ ctx->internals->transform_count -= 1;
+}
+
+void lv_draw_sdl_transform_areas_offset(lv_draw_sdl_ctx_t * ctx, bool has_composite, lv_area_t * apply_area,
+ lv_area_t * coords, lv_area_t * clip)
+{
+ if(ctx->internals->transform_count == 0) {
+ return;
+ }
+ lv_area_t * area = ctx->base_draw.buf_area;
+ lv_area_move(coords, -area->x1, -area->y1);
+ lv_area_move(clip, -area->x1, -area->y1);
+ if(has_composite) {
+ lv_area_move(apply_area, -area->x1, -area->y1);
+ }
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+#endif /*LV_USE_GPU_SDL*/
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_layer.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_layer.h
new file mode 100644
index 0000000..f6aa668
--- /dev/null
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_layer.h
@@ -0,0 +1,56 @@
+/**
+ * @file lv_draw_sdl_refr.h
+ *
+ */
+
+#ifndef LV_TEMPL_H
+#define LV_TEMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_draw_sdl.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef struct _lv_draw_sdl_layer_ctx_t {
+ lv_draw_layer_ctx_t base;
+
+ SDL_Texture * orig_target;
+ SDL_Texture * target;
+ SDL_Rect target_rect;
+ bool target_in_cache;
+ lv_draw_layer_flags_t flags;
+} lv_draw_sdl_layer_ctx_t;
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+lv_draw_layer_ctx_t * lv_draw_sdl_layer_init(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+void lv_draw_sdl_layer_blend(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * transform_ctx,
+ const lv_draw_img_dsc_t * draw_dsc);
+
+void lv_draw_sdl_layer_destroy(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx);
+
+void lv_draw_sdl_transform_areas_offset(lv_draw_sdl_ctx_t * ctx, bool has_composite, lv_area_t * apply_area,
+ lv_area_t * coords, lv_area_t * clip);
+/**********************
+ * MACROS
+ **********************/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_TEMPL_H*/
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_line.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_line.c
index 8dd7b2e..204e1a3 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_line.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_line.c
@@ -53,7 +53,7 @@ static SDL_Texture * line_texture_create(lv_draw_sdl_ctx_t * sdl_ctx, const lv_d
* GLOBAL FUNCTIONS
**********************/
void lv_draw_sdl_draw_line(lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc, const lv_point_t * point1,
- const lv_point_t * point2)
+ const lv_point_t * point2, bool * in_cache)
{
lv_draw_sdl_ctx_t * sdl_ctx = (lv_draw_sdl_ctx_t *) draw_ctx;
SDL_Renderer * renderer = sdl_ctx->renderer;
@@ -68,7 +68,7 @@ void lv_draw_sdl_draw_line(lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t *
SDL_Texture * texture = lv_draw_sdl_texture_cache_get(sdl_ctx, &key, sizeof(key), NULL);
if(!texture) {
texture = line_texture_create(sdl_ctx, dsc, (lv_coord_t) length);
- lv_draw_sdl_texture_cache_put(sdl_ctx, &key, sizeof(key), texture);
+ *in_cache = lv_draw_sdl_texture_cache_put(sdl_ctx, &key, sizeof(key), texture);
}
lv_area_t coords = {x1, y1, x2, y2};
@@ -126,7 +126,10 @@ static SDL_Texture * line_texture_create(lv_draw_sdl_ctx_t * sdl_ctx, const lv_d
SDL_SetRenderTarget(sdl_ctx->renderer, texture);
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(sdl_ctx->renderer, 0xFF, 0xFF, 0xFF, 0x0);
- SDL_RenderClear(sdl_ctx->renderer);
+ /* SDL_RenderClear is not working properly, so we overwrite the target with solid color */
+ SDL_SetRenderDrawBlendMode(sdl_ctx->renderer, SDL_BLENDMODE_NONE);
+ SDL_RenderFillRect(sdl_ctx->renderer, NULL);
+ SDL_SetRenderDrawBlendMode(sdl_ctx->renderer, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(sdl_ctx->renderer, 0xFF, 0xFF, 0xFF, 0xFF);
SDL_Rect line_rect = {1 + dsc->width / 2, 1, length, dsc->width};
SDL_RenderFillRect(sdl_ctx->renderer, &line_rect);
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_mask.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_mask.h
index a562d73..66e78b8 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_mask.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_mask.h
@@ -39,7 +39,6 @@ lv_opa_t * lv_draw_sdl_mask_dump_opa(const lv_area_t * coords, const int16_t * i
SDL_Texture * lv_draw_sdl_mask_dump_texture(SDL_Renderer * renderer, const lv_area_t * coords, const int16_t * ids,
int16_t ids_count);
-
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_polygon.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_polygon.c
index c5df50c..68305c7 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_polygon.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_polygon.c
@@ -77,7 +77,9 @@ void lv_draw_sdl_polygon(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dr
int16_t mask_id = lv_draw_mask_add(&polygon_param, NULL);
lv_coord_t w = lv_area_get_width(&draw_area), h = lv_area_get_height(&draw_area);
- SDL_Texture * texture = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1, w, h);
+ bool texture_in_cache = false;
+ SDL_Texture * texture = lv_draw_sdl_composite_texture_obtain(ctx, LV_DRAW_SDL_COMPOSITE_TEXTURE_ID_STREAM1, w, h,
+ &texture_in_cache);
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
dump_masks(texture, &draw_area);
@@ -91,6 +93,10 @@ void lv_draw_sdl_polygon(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dr
SDL_SetTextureColorMod(texture, color.r, color.g, color.b);
SDL_SetTextureAlphaMod(texture, draw_dsc->bg_opa);
SDL_RenderCopy(ctx->renderer, texture, &srcrect, &dstrect);
+ if(!texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
}
/**********************
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_priv.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_priv.h
index 1f44c22..716edac 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_priv.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_priv.h
@@ -6,7 +6,6 @@
#ifndef LV_DRAW_SDL_PRIV_H
#define LV_DRAW_SDL_PRIV_H
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -35,6 +34,9 @@ typedef struct lv_draw_sdl_context_internals_t {
lv_lru_t * texture_cache;
SDL_Texture * mask;
SDL_Texture * composition;
+ bool composition_cached;
+ SDL_Texture * target_backup;
+ uint8_t transform_count;
} lv_draw_sdl_context_internals_t;
/**********************
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.c
index 4df113e..96f7f21 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.c
@@ -21,12 +21,14 @@
#include "lv_draw_sdl_composite.h"
#include "lv_draw_sdl_mask.h"
#include "lv_draw_sdl_stack_blur.h"
-#include "lv_draw_sdl_img.h"
+#include "lv_draw_sdl_layer.h"
/*********************
* DEFINES
*********************/
+#define FRAG_SPACING 3
+
/**********************
* TYPEDEFS
**********************/
@@ -37,6 +39,23 @@ typedef struct {
lv_coord_t size;
} lv_draw_rect_bg_key_t;
+typedef struct {
+ lv_sdl_cache_key_magic_t magic;
+ lv_gradient_stop_t stops[LV_GRADIENT_MAX_STOPS];
+ uint8_t stops_count;
+ lv_grad_dir_t dir;
+} lv_draw_rect_grad_strip_key_t;
+
+typedef struct {
+ lv_sdl_cache_key_magic_t magic;
+ lv_gradient_stop_t stops[LV_GRADIENT_MAX_STOPS];
+ uint8_t stops_count;
+ lv_grad_dir_t dir;
+ lv_coord_t w;
+ lv_coord_t h;
+ lv_coord_t radius;
+} lv_draw_rect_grad_frag_key_t;
+
typedef struct {
lv_sdl_cache_key_magic_t magic;
lv_coord_t radius;
@@ -57,6 +76,12 @@ typedef struct {
static void draw_bg_color(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
const lv_draw_rect_dsc_t * dsc);
+static void draw_bg_grad_simple(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
+ const lv_grad_dsc_t * grad, bool blend_mod);
+
+static void draw_bg_grad_radius(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
+ const lv_draw_rect_dsc_t * dsc);
+
static void draw_bg_img(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
const lv_draw_rect_dsc_t * dsc);
@@ -81,6 +106,11 @@ static void frag_render_center(SDL_Renderer * renderer, SDL_Texture * frag, lv_c
static lv_draw_rect_bg_key_t rect_bg_key_create(lv_coord_t radius, lv_coord_t size);
+static lv_draw_rect_grad_frag_key_t rect_grad_frag_key_create(const lv_grad_dsc_t * grad, lv_coord_t w, lv_coord_t h,
+ lv_coord_t radius);
+
+static lv_draw_rect_grad_strip_key_t rect_grad_strip_key_create(const lv_grad_dsc_t * grad);
+
static lv_draw_rect_shadow_key_t rect_shadow_key_create(lv_coord_t radius, lv_coord_t size, lv_coord_t blur);
static lv_draw_rect_border_key_t rect_border_key_create(lv_coord_t rout, lv_coord_t rin, const lv_area_t * outer_area,
@@ -124,7 +154,11 @@ void lv_draw_sdl_draw_rect(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t *
}
/* Coords will be translated so coords will start at (0,0) */
lv_area_t t_coords = *coords, t_clip = *clip, apply_area, t_area;
- lv_draw_sdl_composite_begin(ctx, coords, clip, &extension, dsc->blend_mode, &t_coords, &t_clip, &apply_area);
+ bool has_composite = lv_draw_sdl_composite_begin(ctx, coords, clip, &extension, dsc->blend_mode, &t_coords, &t_clip,
+ &apply_area);
+
+ lv_draw_sdl_transform_areas_offset(ctx, has_composite, &apply_area, &t_coords, &t_clip);
+
bool has_content = _lv_area_intersect(&t_area, &t_coords, &t_clip);
SDL_Rect clip_rect;
@@ -141,20 +175,106 @@ void lv_draw_sdl_draw_rect(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t *
lv_draw_sdl_composite_end(ctx, &apply_area, dsc->blend_mode);
}
-SDL_Texture * lv_draw_sdl_rect_bg_frag_obtain(lv_draw_sdl_ctx_t * ctx, lv_coord_t radius)
+SDL_Texture * lv_draw_sdl_rect_bg_frag_obtain(lv_draw_sdl_ctx_t * ctx, lv_coord_t radius, bool * in_cache)
{
lv_draw_rect_bg_key_t key = rect_bg_key_create(radius, radius);
- lv_area_t coords = {0, 0, radius * 2 - 1, radius * 2 - 1};
- lv_area_t coords_frag = {0, 0, radius - 1, radius - 1};
SDL_Texture * texture = lv_draw_sdl_texture_cache_get(ctx, &key, sizeof(key), NULL);
if(texture == NULL) {
+ lv_area_t coords = {0, 0, radius * 2 - 1, radius * 2 - 1};
+ lv_area_t coords_frag = {0, 0, radius - 1, radius - 1};
lv_draw_mask_radius_param_t mask_rout_param;
lv_draw_mask_radius_init(&mask_rout_param, &coords, radius, false);
int16_t mask_id = lv_draw_mask_add(&mask_rout_param, NULL);
texture = lv_draw_sdl_mask_dump_texture(ctx->renderer, &coords_frag, &mask_id, 1);
+ SDL_assert(texture != NULL);
lv_draw_mask_remove_id(mask_id);
- SDL_assert(texture);
- lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ *in_cache = lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ }
+ else {
+ *in_cache = true;
+ }
+ return texture;
+}
+
+SDL_Texture * lv_draw_sdl_rect_grad_frag_obtain(lv_draw_sdl_ctx_t * ctx, const lv_grad_dsc_t * grad, lv_coord_t w,
+ lv_coord_t h, lv_coord_t radius, bool * in_cache)
+{
+ lv_draw_rect_grad_frag_key_t key = rect_grad_frag_key_create(grad, w, h, radius);
+ SDL_Texture * texture = lv_draw_sdl_texture_cache_get(ctx, &key, sizeof(key), NULL);
+ if(texture == NULL) {
+ lv_area_t coords = {0, 0, radius * 2 + FRAG_SPACING - 1, radius * 2 + FRAG_SPACING - 1};
+ texture = SDL_CreateTexture(ctx->renderer, LV_DRAW_SDL_TEXTURE_FORMAT, SDL_TEXTUREACCESS_TARGET,
+ lv_area_get_width(&coords), lv_area_get_height(&coords));
+ SDL_assert(texture != NULL);
+
+ lv_draw_mask_radius_param_t mask_rout_param;
+ lv_draw_mask_radius_init(&mask_rout_param, &coords, radius, false);
+ int16_t mask_id = lv_draw_mask_add(&mask_rout_param, NULL);
+ SDL_Texture * mask = lv_draw_sdl_mask_dump_texture(ctx->renderer, &coords, &mask_id, 1);
+ SDL_assert(mask != NULL);
+ SDL_SetTextureBlendMode(mask, SDL_BLENDMODE_NONE);
+ lv_draw_mask_remove_id(mask_id);
+
+ SDL_Texture * target_backup = SDL_GetRenderTarget(ctx->renderer);
+ SDL_SetRenderTarget(ctx->renderer, texture);
+ SDL_RenderCopy(ctx->renderer, mask, NULL, NULL);
+ SDL_DestroyTexture(mask);
+
+ lv_area_t blend_coords = {.x1 = 0, .y1 = 0, .x2 = w - 1, .y2 = h - 1};
+ lv_area_t draw_area = {.x1 = 0, .y1 = 0, .x2 = radius - 1, .y2 = radius - 1};
+ /* Align to top left */
+ lv_area_align(&coords, &draw_area, LV_ALIGN_TOP_LEFT, 0, 0);
+ lv_area_align(&coords, &blend_coords, LV_ALIGN_TOP_LEFT, 0, 0);
+ draw_bg_grad_simple(ctx, &blend_coords, &draw_area, grad, true);
+
+ /* Align to top right */
+ lv_area_align(&coords, &draw_area, LV_ALIGN_TOP_RIGHT, 0, 0);
+ lv_area_align(&coords, &blend_coords, LV_ALIGN_TOP_RIGHT, 0, 0);
+ draw_bg_grad_simple(ctx, &blend_coords, &draw_area, grad, true);
+
+ /* Align to bottom right */
+ lv_area_align(&coords, &draw_area, LV_ALIGN_BOTTOM_RIGHT, 0, 0);
+ lv_area_align(&coords, &blend_coords, LV_ALIGN_BOTTOM_RIGHT, 0, 0);
+ draw_bg_grad_simple(ctx, &blend_coords, &draw_area, grad, true);
+
+ /* Align to bottom left */
+ lv_area_align(&coords, &draw_area, LV_ALIGN_BOTTOM_LEFT, 0, 0);
+ lv_area_align(&coords, &blend_coords, LV_ALIGN_BOTTOM_LEFT, 0, 0);
+ draw_bg_grad_simple(ctx, &blend_coords, &draw_area, grad, true);
+
+ SDL_SetRenderTarget(ctx->renderer, target_backup);
+ *in_cache = lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ }
+ else {
+ *in_cache = true;
+ }
+ return texture;
+}
+
+SDL_Texture * lv_draw_sdl_rect_grad_strip_obtain(lv_draw_sdl_ctx_t * ctx, const lv_grad_dsc_t * grad, bool * in_cache)
+{
+ lv_draw_rect_grad_strip_key_t key = rect_grad_strip_key_create(grad);
+ SDL_Texture * texture = lv_draw_sdl_texture_cache_get(ctx, &key, sizeof(key), NULL);
+ if(texture == NULL) {
+ Uint32 amask = 0xFF000000;
+ Uint32 rmask = 0x00FF0000;
+ Uint32 gmask = 0x0000FF00;
+ Uint32 bmask = 0x000000FF;
+ lv_color_t pixels[256];
+ for(int i = 0; i < 256; i++) {
+ pixels[i] = lv_gradient_calculate(grad, 256, i);
+ }
+ int width = grad->dir == LV_GRAD_DIR_VER ? 1 : 256;
+ int height = grad->dir == LV_GRAD_DIR_VER ? 256 : 1;
+ SDL_Surface * surface = SDL_CreateRGBSurfaceFrom(pixels, width, height, LV_COLOR_DEPTH, width * LV_COLOR_DEPTH / 8,
+ rmask, gmask, bmask, amask);
+ texture = SDL_CreateTextureFromSurface(ctx->renderer, surface);
+ SDL_assert(texture != NULL);
+ SDL_FreeSurface(surface);
+ *in_cache = lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ }
+ else {
+ *in_cache = true;
}
return texture;
}
@@ -189,7 +309,7 @@ void lv_draw_sdl_rect_bg_frag_draw_corners(lv_draw_sdl_ctx_t * ctx, SDL_Texture
if(full) {
lv_coord_t sx = (lv_coord_t)(dst_area.x1 - corner_area.x1),
sy = (lv_coord_t)(dst_area.y1 - corner_area.y1);
- SDL_Rect src_rect = {frag_size + 3 + sx, sy, dw, dh};
+ SDL_Rect src_rect = {frag_size + FRAG_SPACING + sx, sy, dw, dh};
SDL_RenderCopy(ctx->renderer, frag, &src_rect, &dst_rect);
}
else {
@@ -208,7 +328,7 @@ void lv_draw_sdl_rect_bg_frag_draw_corners(lv_draw_sdl_ctx_t * ctx, SDL_Texture
if(full) {
lv_coord_t sx = (lv_coord_t)(dst_area.x1 - corner_area.x1),
sy = (lv_coord_t)(dst_area.y1 - corner_area.y1);
- SDL_Rect src_rect = {frag_size + 3 + sx, frag_size + 3 + sy, dw, dh};
+ SDL_Rect src_rect = {frag_size + FRAG_SPACING + sx, frag_size + FRAG_SPACING + sy, dw, dh};
SDL_RenderCopy(ctx->renderer, frag, &src_rect, &dst_rect);
}
else {
@@ -216,7 +336,7 @@ void lv_draw_sdl_rect_bg_frag_draw_corners(lv_draw_sdl_ctx_t * ctx, SDL_Texture
SDL_RenderCopyEx(ctx->renderer, frag, &src_rect, &dst_rect, 0, NULL, SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL);
}
}
- /* Lower left, right edge should not be clip */
+ /* Lower left, right edge should not be clipped */
corner_area.x1 = coords->x1;
corner_area.x2 = coords->x1 + frag_size - 1;
if(_lv_area_intersect(&dst_area, &corner_area, clip)) {
@@ -227,7 +347,7 @@ void lv_draw_sdl_rect_bg_frag_draw_corners(lv_draw_sdl_ctx_t * ctx, SDL_Texture
if(full) {
lv_coord_t sx = (lv_coord_t)(dst_area.x1 - corner_area.x1),
sy = (lv_coord_t)(dst_area.y1 - corner_area.y1);
- SDL_Rect src_rect = {sx, frag_size + 3 + sy, dw, dh};
+ SDL_Rect src_rect = {sx, frag_size + FRAG_SPACING + sy, dw, dh};
SDL_RenderCopy(ctx->renderer, frag, &src_rect, &dst_rect);
}
else {
@@ -237,7 +357,6 @@ void lv_draw_sdl_rect_bg_frag_draw_corners(lv_draw_sdl_ctx_t * ctx, SDL_Texture
}
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -248,9 +367,23 @@ static void draw_bg_color(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, con
if(dsc->bg_opa == 0) {
return;
}
- SDL_Color bg_color;
- lv_color_to_sdl_color(&dsc->bg_color, &bg_color);
lv_coord_t radius = dsc->radius;
+ SDL_Color bg_color;
+ if(dsc->bg_grad.dir == LV_GRAD_DIR_NONE) {
+ lv_color_to_sdl_color(&dsc->bg_color, &bg_color);
+ }
+ else if(dsc->bg_grad.stops_count == 1) {
+ lv_color_to_sdl_color(&dsc->bg_grad.stops[0].color, &bg_color);
+ }
+ else {
+ if(radius <= 0) {
+ draw_bg_grad_simple(ctx, coords, draw_area, &dsc->bg_grad, false);
+ }
+ else {
+ draw_bg_grad_radius(ctx, coords, draw_area, dsc);
+ }
+ return;
+ }
if(radius <= 0) {
SDL_Rect rect;
lv_area_to_sdl_rect(draw_area, &rect);
@@ -263,7 +396,8 @@ static void draw_bg_color(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, con
/*A small texture with a quarter of the rect is enough*/
lv_coord_t bg_w = lv_area_get_width(coords), bg_h = lv_area_get_height(coords);
lv_coord_t real_radius = LV_MIN3(bg_w / 2, bg_h / 2, radius);
- SDL_Texture * texture = lv_draw_sdl_rect_bg_frag_obtain(ctx, real_radius);
+ bool texture_in_cache = false;
+ SDL_Texture * texture = lv_draw_sdl_rect_bg_frag_obtain(ctx, real_radius, &texture_in_cache);
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
SDL_SetTextureAlphaMod(texture, dsc->bg_opa);
@@ -271,11 +405,131 @@ static void draw_bg_color(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, con
lv_draw_sdl_rect_bg_frag_draw_corners(ctx, texture, real_radius, coords, draw_area, false);
frag_render_borders(ctx->renderer, texture, real_radius, coords, draw_area, false);
frag_render_center(ctx->renderer, texture, real_radius, coords, draw_area, false);
+
+ if(!texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
+}
+
+static void draw_bg_grad_simple(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
+ const lv_grad_dsc_t * grad, bool blend_mod)
+{
+ SDL_Rect dstrect;
+ lv_area_to_sdl_rect(draw_area, &dstrect);
+ SDL_Rect srcrect;
+ if(grad->dir == LV_GRAD_DIR_VER) {
+ lv_coord_t coords_h = lv_area_get_height(coords);
+ srcrect.x = 0;
+ srcrect.y = (draw_area->y1 - coords->y1) * 255 / coords_h;
+ srcrect.w = 1;
+ srcrect.h = dstrect.h * 256 / coords_h;
+
+ if(srcrect.y < 0 || srcrect.y > 255) {
+ return;
+ }
+ }
+ else {
+ lv_coord_t coords_w = lv_area_get_width(coords);
+ srcrect.x = (draw_area->x1 - coords->x1) * 255 / coords_w;
+ srcrect.y = 0;
+ srcrect.w = dstrect.w * 256 / coords_w;
+ srcrect.h = 1;
+
+ if(srcrect.x < 0 || srcrect.x > 255) {
+ return;
+ }
+ }
+
+ bool grad_texture_in_cache = false;
+ SDL_Texture * grad_texture = lv_draw_sdl_rect_grad_strip_obtain(ctx, grad, &grad_texture_in_cache);
+ if(blend_mod) {
+ SDL_SetTextureBlendMode(grad_texture, SDL_BLENDMODE_MOD);
+ }
+ else {
+ SDL_SetTextureBlendMode(grad_texture, SDL_BLENDMODE_BLEND);
+ }
+
+ SDL_RenderCopy(ctx->renderer, grad_texture, &srcrect, &dstrect);
+
+ if(!grad_texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(grad_texture);
+ }
+}
+
+static void draw_bg_grad_radius(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
+ const lv_draw_rect_dsc_t * dsc)
+{
+ lv_coord_t radius = dsc->radius;
+ /*A small texture with a quarter of the rect is enough*/
+ lv_coord_t bg_w = lv_area_get_width(coords), bg_h = lv_area_get_height(coords);
+ lv_coord_t real_radius = LV_MIN3(bg_w / 2, bg_h / 2, radius);
+ bool grad_texture_in_cache = false;
+ SDL_Texture * grad_texture = lv_draw_sdl_rect_grad_frag_obtain(ctx, &dsc->bg_grad, bg_w, bg_h, radius,
+ &grad_texture_in_cache);
+ SDL_SetTextureBlendMode(grad_texture, SDL_BLENDMODE_BLEND);
+
+ lv_draw_sdl_rect_bg_frag_draw_corners(ctx, grad_texture, real_radius, coords, draw_area, true);
+ lv_area_t part_coords;
+ lv_area_t part_area;
+ if(bg_w > radius * 2) {
+ /*Draw left, middle, right*/
+ part_coords.x1 = 0;
+ part_coords.x2 = radius - 1;
+ part_coords.y1 = radius;
+ part_coords.y2 = bg_h - radius - 1;
+
+ lv_area_align(coords, &part_coords, LV_ALIGN_LEFT_MID, 0, 0);
+ _lv_area_intersect(&part_area, &part_coords, draw_area);
+ draw_bg_grad_simple(ctx, coords, &part_area, &dsc->bg_grad, false);
+
+ lv_area_align(coords, &part_coords, LV_ALIGN_RIGHT_MID, 0, 0);
+ _lv_area_intersect(&part_area, &part_coords, draw_area);
+ draw_bg_grad_simple(ctx, coords, &part_area, &dsc->bg_grad, false);
+
+ part_coords.x1 = radius;
+ part_coords.x2 = bg_w - radius - 1;
+ part_coords.y1 = 0;
+ part_coords.y2 = bg_h - 1;
+ lv_area_align(coords, &part_coords, LV_ALIGN_CENTER, 0, 0);
+ _lv_area_intersect(&part_area, &part_coords, draw_area);
+ draw_bg_grad_simple(ctx, coords, &part_area, &dsc->bg_grad, false);
+ }
+ else if(bg_h > radius * 2) {
+ /*Draw top, middle, bottom*/
+ part_coords.x1 = radius;
+ part_coords.x2 = bg_w - radius - 1;
+ part_coords.y1 = 0;
+ part_coords.y2 = radius - 1;
+
+ lv_area_align(coords, &part_coords, LV_ALIGN_TOP_MID, 0, 0);
+ _lv_area_intersect(&part_area, &part_coords, draw_area);
+ draw_bg_grad_simple(ctx, coords, &part_area, &dsc->bg_grad, false);
+
+ lv_area_align(coords, &part_coords, LV_ALIGN_BOTTOM_MID, 0, 0);
+ _lv_area_intersect(&part_area, &part_coords, draw_area);
+ draw_bg_grad_simple(ctx, coords, &part_area, &dsc->bg_grad, false);
+
+ part_coords.x1 = 0;
+ part_coords.x2 = bg_w - 1;
+ part_coords.y1 = radius;
+ part_coords.y2 = bg_h - radius - 1;
+ lv_area_align(coords, &part_coords, LV_ALIGN_CENTER, 0, 0);
+ _lv_area_intersect(&part_area, &part_coords, draw_area);
+ draw_bg_grad_simple(ctx, coords, &part_area, &dsc->bg_grad, false);
+ }
+
+ if(!grad_texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(grad_texture);
+ }
}
static void draw_bg_img(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
const lv_draw_rect_dsc_t * dsc)
{
+ LV_UNUSED(draw_area);
if(SKIP_IMAGE(dsc)) return;
lv_img_src_t src_type = lv_img_src_get_type(dsc->bg_img_src);
@@ -405,6 +659,7 @@ static void draw_shadow(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const
lv_draw_rect_shadow_key_t key = rect_shadow_key_create(radius, frag_size, sw);
SDL_Texture * texture = lv_draw_sdl_texture_cache_get(ctx, &key, sizeof(key), NULL);
+ bool texture_in_cache = false;
if(texture == NULL) {
lv_area_t mask_area = {blur_growth, blur_growth}, mask_area_blurred = {0, 0};
lv_area_set_width(&mask_area, frag_size * 2);
@@ -423,7 +678,10 @@ static void draw_shadow(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const
lv_mem_buf_release(mask_buf);
lv_draw_mask_remove_id(mask_id);
SDL_assert(texture);
- lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ texture_in_cache = lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ }
+ else {
+ texture_in_cache = true;
}
SDL_Color shadow_color;
@@ -435,8 +693,12 @@ static void draw_shadow(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const
lv_draw_sdl_rect_bg_frag_draw_corners(ctx, texture, blur_frag_size, &shadow_area, clip, false);
frag_render_borders(ctx->renderer, texture, blur_frag_size, &shadow_area, clip, false);
frag_render_center(ctx->renderer, texture, blur_frag_size, &shadow_area, clip, false);
-}
+ if(!texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
+}
static void draw_border(lv_draw_sdl_ctx_t * ctx, const lv_area_t * coords, const lv_area_t * draw_area,
const lv_draw_rect_dsc_t * dsc)
@@ -516,9 +778,10 @@ static void draw_border_generic(lv_draw_sdl_ctx_t * ctx, const lv_area_t * outer
lv_coord_t max_side = LV_MAX4(key.offsets.x1, key.offsets.y1, -key.offsets.x2, -key.offsets.y2);
lv_coord_t frag_size = LV_MAX(radius, max_side);
SDL_Texture * texture = lv_draw_sdl_texture_cache_get(ctx, &key, sizeof(key), NULL);
+ bool texture_in_cache;
if(texture == NULL) {
- /* Create a mask texture with size of (frag_size * 2 + 3) */
- const lv_area_t frag_area = {0, 0, frag_size * 2 + 2, frag_size * 2 + 2};
+ /* Create a mask texture with size of (frag_size * 2 + FRAG_SPACING) */
+ const lv_area_t frag_area = {0, 0, frag_size * 2 + FRAG_SPACING - 1, frag_size * 2 + FRAG_SPACING - 1};
/*Create mask for the outer area*/
int16_t mask_ids[2] = {LV_MASK_ID_INV, LV_MASK_ID_INV};
@@ -542,7 +805,10 @@ static void draw_border_generic(lv_draw_sdl_ctx_t * ctx, const lv_area_t * outer
lv_draw_mask_remove_id(mask_ids[1]);
lv_draw_mask_remove_id(mask_ids[0]);
SDL_assert(texture);
- lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ texture_in_cache = lv_draw_sdl_texture_cache_put(ctx, &key, sizeof(key), texture);
+ }
+ else {
+ texture_in_cache = true;
}
SDL_Rect outer_rect;
@@ -556,6 +822,11 @@ static void draw_border_generic(lv_draw_sdl_ctx_t * ctx, const lv_area_t * outer
lv_draw_sdl_rect_bg_frag_draw_corners(ctx, texture, frag_size, outer_area, clip, true);
frag_render_borders(renderer, texture, frag_size, outer_area, clip, true);
+
+ if(!texture_in_cache) {
+ LV_LOG_WARN("Texture is not cached, this will impact performance.");
+ SDL_DestroyTexture(texture);
+ }
}
static void frag_render_borders(SDL_Renderer * renderer, SDL_Texture * frag, lv_coord_t frag_size,
@@ -591,7 +862,7 @@ static void frag_render_borders(SDL_Renderer * renderer, SDL_Texture * frag, lv_
lv_coord_t dh = lv_area_get_height(&dst_area);
if(full) {
lv_coord_t sy = (lv_coord_t)(dst_area.y1 - border_area.y1);
- SDL_Rect src_rect = {frag_size + 1, frag_size + 3 + sy, 1, dh};
+ SDL_Rect src_rect = {frag_size + 1, frag_size + FRAG_SPACING + sy, 1, dh};
SDL_RenderCopy(renderer, frag, &src_rect, &dst_rect);
}
else {
@@ -630,7 +901,7 @@ static void frag_render_borders(SDL_Renderer * renderer, SDL_Texture * frag, lv_
lv_coord_t dw = lv_area_get_width(&dst_area);
if(full) {
lv_coord_t sx = (lv_coord_t)(dst_area.x1 - border_area.x1);
- SDL_Rect src_rect = {frag_size + 3 + sx, frag_size + 1, dw, 1};
+ SDL_Rect src_rect = {frag_size + FRAG_SPACING + sx, frag_size + 1, dw, 1};
SDL_RenderCopy(renderer, frag, &src_rect, &dst_rect);
}
else {
@@ -678,6 +949,38 @@ static lv_draw_rect_bg_key_t rect_bg_key_create(lv_coord_t radius, lv_coord_t si
return key;
}
+static lv_draw_rect_grad_frag_key_t rect_grad_frag_key_create(const lv_grad_dsc_t * grad, lv_coord_t w, lv_coord_t h,
+ lv_coord_t radius)
+{
+ lv_draw_rect_grad_frag_key_t key;
+ SDL_memset(&key, 0, sizeof(key));
+ key.magic = LV_GPU_CACHE_KEY_MAGIC_RECT_GRAD;
+ key.stops_count = grad->stops_count;
+ key.dir = grad->dir;
+ for(uint8_t i = 0; i < grad->stops_count; i++) {
+ key.stops[i].frac = grad->stops[i].frac;
+ key.stops[i].color = grad->stops[i].color;
+ }
+ key.w = w;
+ key.h = h;
+ key.radius = radius;
+ return key;
+}
+
+static lv_draw_rect_grad_strip_key_t rect_grad_strip_key_create(const lv_grad_dsc_t * grad)
+{
+ lv_draw_rect_grad_strip_key_t key;
+ SDL_memset(&key, 0, sizeof(key));
+ key.magic = LV_GPU_CACHE_KEY_MAGIC_RECT_GRAD;
+ key.stops_count = grad->stops_count;
+ key.dir = grad->dir;
+ for(uint8_t i = 0; i < grad->stops_count; i++) {
+ key.stops[i].frac = grad->stops[i].frac;
+ key.stops[i].color = grad->stops[i].color;
+ }
+ return key;
+}
+
static lv_draw_rect_shadow_key_t rect_shadow_key_create(lv_coord_t radius, lv_coord_t size, lv_coord_t blur)
{
lv_draw_rect_shadow_key_t key;
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.h
index 1e9be34..0fc3d77 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_rect.h
@@ -6,7 +6,6 @@
#ifndef LV_DRAW_SDL_RECT_H
#define LV_DRAW_SDL_RECT_H
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -57,7 +56,36 @@ typedef struct lv_draw_sdl_rect_header_t {
* Other functions
*====================*/
-SDL_Texture * lv_draw_sdl_rect_bg_frag_obtain(lv_draw_sdl_ctx_t * ctx, lv_coord_t radius);
+/**
+ *
+ * @param ctx Drawing context
+ * @param radius Corner radius of the rectangle
+ * @param in_cache Whether the texture has been put in the cache
+ * @return Background fragment texture
+ */
+SDL_Texture * lv_draw_sdl_rect_bg_frag_obtain(lv_draw_sdl_ctx_t * ctx, lv_coord_t radius, bool * in_cache);
+
+/**
+ *
+ * @param ctx Drawing context
+ * @param grad Gradient info
+ * @param w Width of the rectangle
+ * @param h Height of the rectangle
+ * @param radius Corner radius of the rectangle
+ * @param in_cache Whether the texture has been put in the cache
+ * @return Gradient fragment texture
+ */
+SDL_Texture * lv_draw_sdl_rect_grad_frag_obtain(lv_draw_sdl_ctx_t * ctx, const lv_grad_dsc_t * grad, lv_coord_t w,
+ lv_coord_t h, lv_coord_t radius, bool * in_cache);
+
+/**
+ *
+ * @param ctx Drawing context
+ * @param grad Gradient info
+ * @param in_cache Whether the texture has been put in the cache
+ * @return Gradient strip texture
+ */
+SDL_Texture * lv_draw_sdl_rect_grad_strip_obtain(lv_draw_sdl_ctx_t * ctx, const lv_grad_dsc_t * grad, bool * in_cache);
void lv_draw_sdl_rect_bg_frag_draw_corners(lv_draw_sdl_ctx_t * ctx, SDL_Texture * frag, lv_coord_t frag_size,
const lv_area_t * coords, const lv_area_t * clip, bool full);
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_stack_blur.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_stack_blur.c
index 1c411b0..dd94c6c 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_stack_blur.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_stack_blur.c
@@ -122,8 +122,8 @@ static void stack_blur_job(lv_opa_t * src, unsigned int w, unsigned int h, unsig
for(y = minY; y < maxY; y++) {
sum_r =
- sum_in_r =
- sum_out_r = 0;
+ sum_in_r =
+ sum_out_r = 0;
src_ptr = src + stride * y; // start of line (0,y)
@@ -134,7 +134,6 @@ static void stack_blur_job(lv_opa_t * src, unsigned int w, unsigned int h, unsig
sum_out_r += src_ptr[0];
}
-
for(i = 1; i <= radius; i++) {
if(i <= wm) src_ptr += 1;
stack_ptr = &stack[i + radius];
@@ -143,7 +142,6 @@ static void stack_blur_job(lv_opa_t * src, unsigned int w, unsigned int h, unsig
sum_in_r += src_ptr[0];
}
-
sp = radius;
xp = radius;
if(xp > wm) xp = wm;
@@ -189,8 +187,8 @@ static void stack_blur_job(lv_opa_t * src, unsigned int w, unsigned int h, unsig
for(x = minX; x < maxX; x++) {
sum_r =
- sum_in_r =
- sum_out_r = 0;
+ sum_in_r =
+ sum_out_r = 0;
src_ptr = src + x; // x,0
for(i = 0; i <= radius; i++) {
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.c b/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.c
index 6845add..4067417 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.c
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.c
@@ -81,12 +81,12 @@ SDL_Texture * lv_draw_sdl_texture_cache_get_with_userdata(lv_draw_sdl_ctx_t * ct
return value->texture;
}
-void lv_draw_sdl_texture_cache_put(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length, SDL_Texture * texture)
+bool lv_draw_sdl_texture_cache_put(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length, SDL_Texture * texture)
{
- lv_draw_sdl_texture_cache_put_advanced(ctx, key, key_length, texture, NULL, NULL, 0);
+ return lv_draw_sdl_texture_cache_put_advanced(ctx, key, key_length, texture, NULL, NULL, 0);
}
-void lv_draw_sdl_texture_cache_put_advanced(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length,
+bool lv_draw_sdl_texture_cache_put_advanced(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length,
SDL_Texture * texture, void * userdata, void userdata_free(void *),
lv_draw_sdl_cache_flag_t flags)
{
@@ -97,22 +97,20 @@ void lv_draw_sdl_texture_cache_put_advanced(lv_draw_sdl_ctx_t * ctx, const void
value->userdata_free = userdata_free;
value->flags = flags;
if(!texture) {
- lv_lru_set(lru, key, key_length, value, 1);
- return;
+ return lv_lru_set(lru, key, key_length, value, 1) == LV_LRU_OK;
}
if(flags & LV_DRAW_SDL_CACHE_FLAG_MANAGED) {
/* Managed texture doesn't count into cache size */
LV_LOG_INFO("cache texture %p", texture);
- lv_lru_set(lru, key, key_length, value, 1);
- return;
+ return lv_lru_set(lru, key, key_length, value, 1) == LV_LRU_OK;
}
Uint32 format;
int access, width, height;
if(SDL_QueryTexture(texture, &format, &access, &width, &height) != 0) {
- return;
+ return false;
}
LV_LOG_INFO("cache texture %p, %d*%d@%dbpp", texture, width, height, SDL_BITSPERPIXEL(format));
- lv_lru_set(lru, key, key_length, value, width * height * SDL_BITSPERPIXEL(format) / 8);
+ return lv_lru_set(lru, key, key_length, value, width * height * SDL_BITSPERPIXEL(format) / 8) == LV_LRU_OK;
}
lv_draw_sdl_cache_key_head_img_t * lv_draw_sdl_texture_img_key_create(const void * src, int32_t frame_id, size_t * size)
diff --git a/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.h b/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.h
index dc8b578..3a799f5 100644
--- a/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.h
+++ b/lib/lvgl/src/draw/sdl/lv_draw_sdl_texture_cache.h
@@ -50,6 +50,7 @@ typedef enum {
LV_GPU_CACHE_KEY_MAGIC_RECT_BG = 0x31,
LV_GPU_CACHE_KEY_MAGIC_RECT_SHADOW = 0x32,
LV_GPU_CACHE_KEY_MAGIC_RECT_BORDER = 0x33,
+ LV_GPU_CACHE_KEY_MAGIC_RECT_GRAD = 0x34,
LV_GPU_CACHE_KEY_MAGIC_FONT_GLYPH = 0x41,
LV_GPU_CACHE_KEY_MAGIC_MASK = 0x51,
} lv_sdl_cache_key_magic_t;
@@ -81,9 +82,15 @@ SDL_Texture * lv_draw_sdl_texture_cache_get(lv_draw_sdl_ctx_t * ctx, const void
SDL_Texture * lv_draw_sdl_texture_cache_get_with_userdata(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length,
bool * found, void ** userdata);
-void lv_draw_sdl_texture_cache_put(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length, SDL_Texture * texture);
+/**
+ * @return Whether the texture has been put in the cache
+ */
+bool lv_draw_sdl_texture_cache_put(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length, SDL_Texture * texture);
-void lv_draw_sdl_texture_cache_put_advanced(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length,
+/**
+ * @return Whether the texture has been put in the cache
+ */
+bool lv_draw_sdl_texture_cache_put_advanced(lv_draw_sdl_ctx_t * ctx, const void * key, size_t key_length,
SDL_Texture * texture, void * userdata, void userdata_free(void *),
lv_draw_sdl_cache_flag_t flags);
diff --git a/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.c b/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.c
index 3398cc8..458561d 100644
--- a/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.c
+++ b/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.c
@@ -11,100 +11,109 @@
#if LV_USE_GPU_STM32_DMA2D
-#include LV_GPU_DMA2D_CMSIS_INCLUDE
-
/*********************
* DEFINES
*********************/
-
#if LV_COLOR_16_SWAP
- // TODO: F7 has red blue swap bit in control register for all layers and output
- #error "Can't use DMA2D with LV_COLOR_16_SWAP 1"
+ // Note: DMA2D red/blue swap (RBS) works for all color modes
+ #define RBS_BIT 1U
+#else
+ #define RBS_BIT 0U
#endif
-#if LV_COLOR_DEPTH == 8
- #error "Can't use DMA2D with LV_COLOR_DEPTH == 8"
-#endif
+#define CACHE_ROW_SIZE 32U // cache row size in Bytes
+
+// For code/implementation discussion refer to https://github.com/lvgl/lvgl/issues/3714#issuecomment-1365187036
+// astyle --options=lvgl/scripts/code-format.cfg --ignore-exclude-errors lvgl/src/draw/stm32_dma2d/*.c lvgl/src/draw/stm32_dma2d/*.h
#if LV_COLOR_DEPTH == 16
- #define LV_DMA2D_COLOR_FORMAT LV_DMA2D_RGB565
+ const dma2d_color_format_t LvglColorFormat = RGB565;
#elif LV_COLOR_DEPTH == 32
- #define LV_DMA2D_COLOR_FORMAT LV_DMA2D_ARGB8888
+ const dma2d_color_format_t LvglColorFormat = ARGB8888;
#else
- /*Can't use GPU with other formats*/
+ #error "Cannot use DMA2D with LV_COLOR_DEPTH other than 16 or 32"
#endif
-/**********************
- * TYPEDEFS
- **********************/
+#if defined (LV_STM32_DMA2D_USE_M7_CACHE)
+ // Cortex-M7 DCache present
+ #define __lv_gpu_stm32_dma2d_clean_cache(address, offset, width, height, pixel_size) _lv_gpu_stm32_dma2d_clean_cache(address, offset, width, height, pixel_size)
+ #define __lv_gpu_stm32_dma2d_invalidate_cache(address, offset, width, height, pixel_size) _lv_gpu_stm32_dma2d_invalidate_cache(address, offset, width, height, pixel_size)
+#else
+ #define __lv_gpu_stm32_dma2d_clean_cache(address, offset, width, height, pixel_size)
+ #define __lv_gpu_stm32_dma2d_invalidate_cache(address, offset, width, height, pixel_size)
+#endif
/**********************
* STATIC PROTOTYPES
**********************/
+static void lv_draw_stm32_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+static void lv_draw_stm32_dma2d_buffer_copy(lv_draw_ctx_t * draw_ctx,
+ void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
+ void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area);
+static void lv_draw_stm32_dma2d_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * img_dsc,
+ const lv_area_t * coords, const uint8_t * src_buf, lv_img_cf_t color_format);
+static dma2d_color_format_t lv_color_format_to_dma2d_color_format(lv_img_cf_t color_format);
+static lv_point_t lv_area_get_offset(const lv_area_t * area1, const lv_area_t * area2);
-static void lv_draw_stm32_dma2d_blend_fill(lv_color_t * dest_buf, lv_coord_t dest_stride, const lv_area_t * fill_area,
- lv_color_t color);
+lv_res_t lv_draw_stm32_dma2d_img(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * img_dsc,
+ const lv_area_t * src_area, const void * src);
+LV_STM32_DMA2D_STATIC void _lv_draw_stm32_dma2d_blend_fill(const lv_color_t * dst_buf, lv_coord_t dst_stride,
+ const lv_area_t * draw_area, lv_color_t color, lv_opa_t opa);
+LV_STM32_DMA2D_STATIC void _lv_draw_stm32_dma2d_blend_map(const lv_color_t * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * draw_area, const void * src_buf, lv_coord_t src_stride, const lv_point_t * src_offset, lv_opa_t opa,
+ dma2d_color_format_t src_color_format, bool ignore_src_alpha);
+LV_STM32_DMA2D_STATIC void _lv_draw_stm32_dma2d_blend_paint(const lv_color_t * dst_buf, lv_coord_t dst_stride,
+ const lv_area_t * draw_area, const lv_opa_t * mask_buf, lv_coord_t mask_stride, const lv_point_t * mask_offset,
+ lv_color_t color, lv_opa_t opa);
+LV_STM32_DMA2D_STATIC void _lv_gpu_stm32_dma2d_await_dma_transfer_finish(lv_disp_drv_t * disp_drv);
+LV_STM32_DMA2D_STATIC void _lv_gpu_stm32_dma2d_start_dma_transfer(void);
+#if defined(LV_STM32_DMA2D_TEST)
+ LV_STM32_DMA2D_STATIC bool _lv_gpu_stm32_dwt_init(void);
+ LV_STM32_DMA2D_STATIC void _lv_gpu_stm32_dwt_reset(void);
+ LV_STM32_DMA2D_STATIC uint32_t _lv_gpu_stm32_dwt_get_us(void);
+#endif
-static void lv_draw_stm32_dma2d_blend_map(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
- const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa);
-
-static void lv_draw_stm32_dma2d_img_decoded(lv_draw_ctx_t * draw, const lv_draw_img_dsc_t * dsc,
- const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t color_format);
-
-
-static void invalidate_cache(void);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
+static bool isDma2dInProgess = false; // indicates whether DMA2D transfer *initiated here* is in progress
/**
* Turn on the peripheral and set output color mode, this only needs to be done once
*/
void lv_draw_stm32_dma2d_init(void)
{
- /*Enable DMA2D clock*/
-#if defined(STM32F4) || defined(STM32F7)
- RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN;
+ // Enable DMA2D clock
+#if defined(STM32F4) || defined(STM32F7) || defined(STM32U5)
+ RCC->AHB1ENR |= RCC_AHB1ENR_DMA2DEN; // enable DMA2D
+ // wait for hardware access to complete
+ __asm volatile("DSB\n");
+ volatile uint32_t temp = RCC->AHB1ENR;
+ LV_UNUSED(temp);
#elif defined(STM32H7)
RCC->AHB3ENR |= RCC_AHB3ENR_DMA2DEN;
+ // wait for hardware access to complete
+ __asm volatile("DSB\n");
+ volatile uint32_t temp = RCC->AHB3ENR;
+ LV_UNUSED(temp);
#else
# warning "LVGL can't enable the clock of DMA2D"
#endif
-
- /*Wait for hardware access to complete*/
- __asm volatile("DSB\n");
-
- /*Delay after setting peripheral clock*/
- volatile uint32_t temp = RCC->AHB1ENR;
- LV_UNUSED(temp);
-
- /*set output colour mode*/
- DMA2D->OPFCCR = LV_DMA2D_COLOR_FORMAT;
+ // AHB master timer configuration
+ DMA2D->AMTCR = 0; // AHB bus guaranteed dead time disabled
+#if defined(LV_STM32_DMA2D_TEST)
+ _lv_gpu_stm32_dwt_init(); // init µs timer
+#endif
}
-
void lv_draw_stm32_dma2d_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
{
-
lv_draw_sw_init_ctx(drv, draw_ctx);
lv_draw_stm32_dma2d_ctx_t * dma2d_draw_ctx = (lv_draw_sw_ctx_t *)draw_ctx;
dma2d_draw_ctx->blend = lv_draw_stm32_dma2d_blend;
- // dma2d_draw_ctx->base_draw.draw_img_decoded = lv_draw_stm32_dma2d_img_decoded;
- dma2d_draw_ctx->base_draw.wait_for_finish = lv_gpu_stm32_dma2d_wait_cb;
+ dma2d_draw_ctx->base_draw.draw_img_decoded = lv_draw_stm32_dma2d_img_decoded;
+ //dma2d_draw_ctx->base_draw.draw_img = lv_draw_stm32_dma2d_img;
dma2d_draw_ctx->base_draw.buffer_copy = lv_draw_stm32_dma2d_buffer_copy;
-
}
void lv_draw_stm32_dma2d_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
@@ -113,153 +122,652 @@ void lv_draw_stm32_dma2d_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ct
LV_UNUSED(draw_ctx);
}
-
-void lv_draw_stm32_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+static void lv_draw_stm32_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
{
- lv_area_t blend_area;
- if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area)) return;
+ if(dsc->blend_mode != LV_BLEND_MODE_NORMAL) {
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+ return;
+ }
+ // Note: x1 must be zero. Otherwise, there is no way to correctly calculate dest_stride.
+ //LV_ASSERT_MSG(draw_ctx->buf_area->x1 == 0); // critical?
+ // Both draw buffer start address and buffer size *must* be 32-byte aligned since draw buffer cache is being invalidated.
+ //uint32_t drawBufferLength = lv_area_get_size(draw_ctx->buf_area) * sizeof(lv_color_t);
+ //LV_ASSERT_MSG(drawBufferLength % CACHE_ROW_SIZE == 0); // critical, but this is not the way to test it
+ //LV_ASSERT_MSG((uint32_t)draw_ctx->buf % CACHE_ROW_SIZE == 0, "draw_ctx.buf is not 32B aligned"); // critical?
- bool done = false;
-
- if(dsc->mask_buf == NULL && dsc->blend_mode == LV_BLEND_MODE_NORMAL && lv_area_get_size(&blend_area) > 100) {
- lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
-
- lv_color_t * dest_buf = draw_ctx->buf;
- dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) + (blend_area.x1 - draw_ctx->buf_area->x1);
-
- const lv_color_t * src_buf = dsc->src_buf;
- if(src_buf) {
- lv_draw_sw_blend_basic(draw_ctx, dsc);
- lv_coord_t src_stride;
- src_stride = lv_area_get_width(dsc->blend_area);
- src_buf += src_stride * (blend_area.y1 - dsc->blend_area->y1) + (blend_area.x1 - dsc->blend_area->x1);
- lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
- lv_draw_stm32_dma2d_blend_map(dest_buf, &blend_area, dest_stride, src_buf, src_stride, dsc->opa);
- done = true;
- }
- else if(dsc->opa >= LV_OPA_MAX) {
- lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
- lv_draw_stm32_dma2d_blend_fill(dest_buf, dest_stride, &blend_area, dsc->color);
- done = true;
- }
+ if(dsc->src_buf) {
+ // For performance reasons, both source buffer start address and buffer size *should* be 32-byte aligned since source buffer cache is being cleaned.
+ //uint32_t srcBufferLength = lv_area_get_size(dsc->blend_area) * sizeof(lv_color_t);
+ //LV_ASSERT_MSG(srcBufferLength % CACHE_ROW_SIZE == 0); // FIXME: assert fails (performance, non-critical)
+ //LV_ASSERT_MSG((uint32_t)dsc->src_buf % CACHE_ROW_SIZE == 0); // FIXME: assert fails (performance, non-critical)
}
- if(!done) lv_draw_sw_blend_basic(draw_ctx, dsc);
+ lv_area_t draw_area;
+ if(!_lv_area_intersect(&draw_area, dsc->blend_area, draw_ctx->clip_area)) return;
+ // + draw_ctx->buf_area has the entire draw buffer location
+ // + draw_ctx->clip_area has the current draw buffer location
+ // + dsc->blend_area has the location of the area intended to be painted - image etc.
+ // + draw_area has the area actually being painted
+ // All coordinates are relative to the screen.
+
+ const lv_opa_t * mask = dsc->mask_buf;
+
+ if(dsc->mask_buf && dsc->mask_res == LV_DRAW_MASK_RES_TRANSP) return;
+ else if(dsc->mask_res == LV_DRAW_MASK_RES_FULL_COVER) mask = NULL;
+
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+ if(mask != NULL) {
+ // For performance reasons, both mask buffer start address and buffer size *should* be 32-byte aligned since mask buffer cache is being cleaned.
+ //uint32_t srcBufferLength = lv_area_get_size(dsc->mask_area) * sizeof(lv_opa_t);
+ //LV_ASSERT_MSG(srcBufferLength % CACHE_ROW_SIZE == 0); // FIXME: assert fails (performance, non-critical)
+ //LV_ASSERT_MSG((uint32_t)mask % CACHE_ROW_SIZE == 0); // FIXME: assert fails (performance, non-critical)
+
+ lv_coord_t mask_stride = lv_area_get_width(dsc->mask_area);
+ lv_point_t mask_offset = lv_area_get_offset(dsc->mask_area, &draw_area); // mask offset in relation to draw_area
+
+ if(dsc->src_buf == NULL) { // 93.5%
+ lv_area_move(&draw_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ _lv_draw_stm32_dma2d_blend_paint(draw_ctx->buf, dest_stride, &draw_area, mask, mask_stride, &mask_offset, dsc->color,
+ dsc->opa);
+ }
+ else { // 0.2%
+ // note: (x)RGB dsc->src_buf does not carry alpha channel bytes,
+ // alpha channel bytes are carried in dsc->mask_buf
+#if LV_COLOR_DEPTH == 32
+ lv_coord_t src_stride = lv_area_get_width(dsc->blend_area);
+ lv_point_t src_offset = lv_area_get_offset(dsc->blend_area, &draw_area); // source image offset in relation to draw_area
+ lv_coord_t draw_width = lv_area_get_width(&draw_area);
+ lv_coord_t draw_height = lv_area_get_height(&draw_area);
+
+ // merge mask alpha bytes with src RGB bytes
+ // TODO: optimize by reading 4 or 8 mask bytes at a time
+ mask += (mask_stride * mask_offset.y) + mask_offset.x;
+ lv_color_t * src_buf = (lv_color_t *)dsc->src_buf;
+ src_buf += (src_stride * src_offset.y) + src_offset.x;
+ uint16_t mask_buffer_offset = mask_stride - draw_width;
+ uint16_t src_buffer_offset = src_stride - draw_width;
+ while(draw_height > 0) {
+ draw_height--;
+ for(uint16_t x = 0; x < draw_width; x++) {
+ (*src_buf).ch.alpha = *mask;
+ src_buf++;
+ mask++;
+ }
+ mask += mask_buffer_offset;
+ src_buf += src_buffer_offset;
+ }
+
+ lv_area_move(&draw_area, -draw_ctx->buf_area->x1,
+ -draw_ctx->buf_area->y1); // translate the screen draw area to the origin of the buffer area
+ _lv_draw_stm32_dma2d_blend_map(draw_ctx->buf, dest_stride, &draw_area, dsc->src_buf, src_stride, &src_offset, dsc->opa,
+ ARGB8888, false);
+#else
+ // Note: 16-bit bitmap hardware blending with mask and background is possible, but requires a temp 24 or 32-bit buffer to combine bitmap with mask first.
+
+ lv_draw_sw_blend_basic(draw_ctx, dsc); // (e.g. Shop Items)
+ // clean cache after software drawing - this does not help since this is not the only place where buffer is written without dma2d
+ // lv_coord_t draw_width = lv_area_get_width(&draw_area);
+ // lv_coord_t draw_height = lv_area_get_height(&draw_area);
+ // uint32_t dest_address = (uint32_t)(draw_ctx->buf + (dest_stride * draw_area.y1) + draw_area.x1);
+ // __lv_gpu_stm32_dma2d_clean_cache(dest_address, dest_stride - draw_width, draw_width, draw_height, sizeof(lv_color_t));
+#endif
+ }
+ }
+ else {
+ if(dsc->src_buf == NULL) { // 6.1%
+ lv_area_move(&draw_area, -draw_ctx->buf_area->x1,
+ -draw_ctx->buf_area->y1); // translate the screen draw area to the origin of the buffer area
+ _lv_draw_stm32_dma2d_blend_fill(draw_ctx->buf, dest_stride, &draw_area, dsc->color, dsc->opa);
+ }
+ else { // 0.2%
+ lv_coord_t src_stride = lv_area_get_width(dsc->blend_area);
+ lv_point_t src_offset = lv_area_get_offset(dsc->blend_area, &draw_area); // source image offset in relation to draw_area
+ lv_area_move(&draw_area, -draw_ctx->buf_area->x1,
+ -draw_ctx->buf_area->y1); // translate the screen draw area to the origin of the buffer area
+ _lv_draw_stm32_dma2d_blend_map(draw_ctx->buf, dest_stride, &draw_area, dsc->src_buf, src_stride, &src_offset, dsc->opa,
+ LvglColorFormat, true);
+ }
+ }
}
-void lv_draw_stm32_dma2d_buffer_copy(lv_draw_ctx_t * draw_ctx,
- void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
- void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area)
+// Does dest_area = intersect(draw_ctx->clip_area, src_area) ?
+// See: https://github.com/lvgl/lvgl/issues/3714#issuecomment-1331710788
+static void lv_draw_stm32_dma2d_buffer_copy(lv_draw_ctx_t * draw_ctx, void * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * dest_area, void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area)
{
+ // Both draw buffer start address and buffer size *must* be 32-byte aligned since draw buffer cache is being invalidated.
+ //uint32_t drawBufferLength = lv_area_get_size(draw_ctx->buf_area) * sizeof(lv_color_t);
+ //LV_ASSERT_MSG(drawBufferLength % CACHE_ROW_SIZE == 0); // critical, but this is not the way to test it
+ //LV_ASSERT_MSG((uint32_t)draw_ctx->buf % CACHE_ROW_SIZE == 0, "draw_ctx.buf is not 32B aligned"); // critical?
+ // FIXME:
+ // 1. Both src_buf and dest_buf pixel size *must* be known to use DMA2D.
+ // 2. Verify both buffers start addresses and lengths are 32-byte (cache row size) aligned.
LV_UNUSED(draw_ctx);
- lv_draw_stm32_dma2d_blend_map(dest_buf, dest_area, dest_stride, src_buf, src_stride, LV_OPA_MAX);
+ lv_point_t src_offset = lv_area_get_offset(src_area, dest_area);
+ // FIXME: use lv_area_move(dest_area, -dest_area->x1, -dest_area->y1) here ?
+ // TODO: It is assumed that dest_buf and src_buf buffers are of lv_color_t type. Verify it, this assumption may be incorrect.
+ _lv_draw_stm32_dma2d_blend_map((const lv_color_t *)dest_buf, dest_stride, dest_area, (const lv_color_t *)src_buf,
+ src_stride, &src_offset, 0xff, LvglColorFormat, true);
+ // TODO: Investigate if output buffer cache needs to be invalidated. It depends on what the destination buffer is and how it is used next - by dma2d or not.
+ _lv_gpu_stm32_dma2d_await_dma_transfer_finish(NULL); // TODO: is this line needed here?
}
-
-static void lv_draw_stm32_dma2d_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
- const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t color_format)
+static void lv_draw_stm32_dma2d_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * img_dsc,
+ const lv_area_t * coords, const uint8_t * src_buf, lv_img_cf_t color_format)
{
- /*TODO basic ARGB8888 image can be handles here*/
+ if(draw_ctx->draw_img_decoded == NULL) return;
+ lv_area_t draw_area;
+ lv_area_copy(&draw_area, draw_ctx->clip_area);
- lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, color_format);
-}
+ bool mask_any = lv_draw_mask_is_any(&draw_area);
+ bool transform = img_dsc->angle != 0 || img_dsc->zoom != LV_IMG_ZOOM_NONE;
+ const dma2d_color_format_t bitmapColorFormat = lv_color_format_to_dma2d_color_format(color_format);
+ const bool ignoreBitmapAlpha = (color_format == LV_IMG_CF_RGBX8888);
-static void lv_draw_stm32_dma2d_blend_fill(lv_color_t * dest_buf, lv_coord_t dest_stride, const lv_area_t * fill_area,
- lv_color_t color)
-{
- /*Simply fill an area*/
- int32_t area_w = lv_area_get_width(fill_area);
- int32_t area_h = lv_area_get_height(fill_area);
- invalidate_cache();
-
- DMA2D->CR = 0x30000;
- DMA2D->OMAR = (uint32_t)dest_buf;
- /*as input color mode is same as output we don't need to convert here do we?*/
- DMA2D->OCOLR = color.full;
- DMA2D->OOR = dest_stride - area_w;
- DMA2D->NLR = (area_w << DMA2D_NLR_PL_Pos) | (area_h << DMA2D_NLR_NL_Pos);
-
- /*start transfer*/
- DMA2D->CR |= DMA2D_CR_START_Msk;
-
-}
-
-
-static void lv_draw_stm32_dma2d_blend_map(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
- const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa)
-{
-
- /*Simple copy*/
- int32_t dest_w = lv_area_get_width(dest_area);
- int32_t dest_h = lv_area_get_height(dest_area);
-
- invalidate_cache();
- if(opa >= LV_OPA_MAX) {
- DMA2D->CR = 0;
- /*copy output colour mode, this register controls both input and output colour format*/
- DMA2D->FGPFCCR = LV_DMA2D_COLOR_FORMAT;
- DMA2D->FGMAR = (uint32_t)src_buf;
- DMA2D->FGOR = src_stride - dest_w;
- DMA2D->OMAR = (uint32_t)dest_buf;
- DMA2D->OOR = dest_stride - dest_w;
- DMA2D->NLR = (dest_w << DMA2D_NLR_PL_Pos) | (dest_h << DMA2D_NLR_NL_Pos);
-
- /*start transfer*/
- DMA2D->CR |= DMA2D_CR_START_Msk;
+ if(!mask_any && !transform && bitmapColorFormat != UNSUPPORTED && img_dsc->recolor_opa == LV_OPA_TRANSP) {
+ // simple bitmap blending, optionally with supported color format conversion - handle directly by dma2d
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+ lv_coord_t src_stride = lv_area_get_width(coords);
+ lv_point_t src_offset = lv_area_get_offset(coords, &draw_area); // source image offset in relation to draw_area
+ lv_area_move(&draw_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ _lv_draw_stm32_dma2d_blend_map(draw_ctx->buf, dest_stride, &draw_area, src_buf, src_stride, &src_offset,
+ img_dsc->opa, bitmapColorFormat, ignoreBitmapAlpha);
}
else {
- DMA2D->CR = 0x20000;
+ // all more complex cases which require additional image transformations
+ lv_draw_sw_img_decoded(draw_ctx, img_dsc, coords, src_buf, color_format);
- DMA2D->BGPFCCR = LV_DMA2D_COLOR_FORMAT;
- DMA2D->BGMAR = (uint32_t)dest_buf;
- DMA2D->BGOR = dest_stride - dest_w;
-
- DMA2D->FGPFCCR = (uint32_t)LV_DMA2D_COLOR_FORMAT
- /*alpha mode 2, replace with foreground * alpha value*/
- | (2 << DMA2D_FGPFCCR_AM_Pos)
- /*alpha value*/
- | (opa << DMA2D_FGPFCCR_ALPHA_Pos);
- DMA2D->FGMAR = (uint32_t)src_buf;
- DMA2D->FGOR = src_stride - dest_w;
-
- DMA2D->OMAR = (uint32_t)src_buf;
- DMA2D->OOR = src_stride - dest_w;
- DMA2D->NLR = (dest_w << DMA2D_NLR_PL_Pos) | (dest_h << DMA2D_NLR_NL_Pos);
-
- /*start transfer*/
- DMA2D->CR |= DMA2D_CR_START_Msk;
}
}
-void lv_gpu_stm32_dma2d_wait_cb(lv_draw_ctx_t * draw_ctx)
+static lv_point_t lv_area_get_offset(const lv_area_t * area1, const lv_area_t * area2)
{
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
- if(disp->driver && disp->driver->wait_cb) {
- while(DMA2D->CR & DMA2D_CR_START_Msk) {
- disp->driver->wait_cb(disp->driver);
- }
- }
- else {
- while(DMA2D->CR & DMA2D_CR_START_Msk);
- }
- lv_draw_sw_wait_for_finish(draw_ctx);
+ lv_point_t offset = {x: area2->x1 - area1->x1, y: area2->y1 - area1->y1};
+ return offset;
+}
+static dma2d_color_format_t lv_color_format_to_dma2d_color_format(lv_img_cf_t color_format)
+{
+ switch(color_format) {
+ case LV_IMG_CF_RGBA8888:
+ // note: LV_IMG_CF_RGBA8888 is actually ARGB8888
+ return ARGB8888;
+ case LV_IMG_CF_RGBX8888:
+ // note: LV_IMG_CF_RGBX8888 is actually XRGB8888
+ return ARGB8888;
+ case LV_IMG_CF_RGB565:
+ return RGB565;
+ case LV_IMG_CF_TRUE_COLOR:
+ return LvglColorFormat;
+ case LV_IMG_CF_TRUE_COLOR_ALPHA:
+#if LV_COLOR_DEPTH == 16
+ // bitmap color format is 24b ARGB8565 - dma2d unsupported
+ return UNSUPPORTED;
+#elif LV_COLOR_DEPTH == 32
+ return ARGB8888;
+#else
+ // unknown bitmap color format
+ return UNSUPPORTED;
+#endif
+ default:
+ return UNSUPPORTED;
+ }
+}
+
+lv_res_t lv_draw_stm32_dma2d_img(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * img_dsc,
+ const lv_area_t * src_area, const void * src)
+{
+ //if(lv_img_src_get_type(src) != LV_IMG_SRC_VARIABLE) return LV_RES_INV;
+ return LV_RES_INV;
+ if(img_dsc->opa <= LV_OPA_MIN) return LV_RES_OK;
+ const lv_img_dsc_t * img = src;
+ const dma2d_color_format_t bitmapColorFormat = lv_color_format_to_dma2d_color_format(img->header.cf);
+ const bool ignoreBitmapAlpha = (img->header.cf == LV_IMG_CF_RGBX8888);
+
+ if(bitmapColorFormat == UNSUPPORTED || img_dsc->angle != 0 || img_dsc->zoom != LV_IMG_ZOOM_NONE) {
+ return LV_RES_INV; // sorry, dma2d can handle this
+ }
+
+ // FIXME: handle dsc.pivot, dsc.recolor, dsc.blend_mode
+ // FIXME: src pixel size *must* be known to use DMA2D
+ // FIXME: If image is drawn by SW, then output cache needs to be cleaned next. Currently it is not possible.
+ // Both draw buffer start address and buffer size *must* be 32-byte aligned since draw buffer cache is being invalidated.
+ //uint32_t drawBufferLength = lv_area_get_size(draw_ctx->buf_area) * sizeof(lv_color_t);
+ //LV_ASSERT_MSG(drawBufferLength % CACHE_ROW_SIZE == 0); // critical, but this is not the way to test it
+ //LV_ASSERT_MSG((uint32_t)draw_ctx->buf % CACHE_ROW_SIZE == 0, "draw_ctx.buf is not 32B aligned"); // critical?
+
+ // For performance reasons, both source buffer start address and buffer size *should* be 32-byte aligned since source buffer cache is being cleaned.
+ //uint32_t srcBufferLength = lv_area_get_size(src_area) * sizeof(lv_color_t); // TODO: verify src pixel size = sizeof(lv_color_t)
+ //LV_ASSERT_MSG(srcBufferLength % CACHE_ROW_SIZE == 0); // FIXME: assert fails (performance, non-critical)
+ //LV_ASSERT_MSG((uint32_t)src % CACHE_ROW_SIZE == 0); // FIXME: assert fails (performance, non-critical)
+
+ lv_area_t draw_area;
+ if(!_lv_area_intersect(&draw_area, src_area, draw_ctx->clip_area)) return LV_RES_OK;
+
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+ lv_point_t src_offset = lv_area_get_offset(src_area, &draw_area); // source image offset in relation to draw_area
+ lv_area_move(&draw_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ _lv_draw_stm32_dma2d_blend_map(draw_ctx->buf, dest_stride, &draw_area, img->data, img->header.w,
+ &src_offset, img_dsc->opa, bitmapColorFormat, ignoreBitmapAlpha);
+ return LV_RES_OK;
}
/**********************
* STATIC FUNCTIONS
**********************/
-static void invalidate_cache(void)
+/**
+ * @brief Fills draw_area with specified color.
+ * @param color color to be painted, note: alpha is ignored
+ */
+LV_STM32_DMA2D_STATIC void _lv_draw_stm32_dma2d_blend_fill(const lv_color_t * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * draw_area, lv_color_t color, lv_opa_t opa)
{
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
- if(disp->driver->clean_dcache_cb) disp->driver->clean_dcache_cb(disp->driver);
- else {
-#if __CORTEX_M >= 0x07
- if((SCB->CCR) & (uint32_t)SCB_CCR_DC_Msk)
- SCB_CleanInvalidateDCache();
+ LV_ASSERT_MSG(!isDma2dInProgess, "dma2d transfer has not finished"); // critical
+ lv_coord_t draw_width = lv_area_get_width(draw_area);
+ lv_coord_t draw_height = lv_area_get_height(draw_area);
+
+ _lv_gpu_stm32_dma2d_await_dma_transfer_finish(NULL);
+
+ if(opa >= LV_OPA_MAX) {
+ DMA2D->CR = 0x3UL << DMA2D_CR_MODE_Pos; // Register-to-memory (no FG nor BG, only output stage active)
+
+ DMA2D->OPFCCR = LvglColorFormat;
+#if defined(DMA2D_OPFCCR_RBS_Pos)
+ DMA2D->OPFCCR |= (RBS_BIT << DMA2D_OPFCCR_RBS_Pos);
#endif
+ DMA2D->OMAR = (uint32_t)(dest_buf + (dest_stride * draw_area->y1) + draw_area->x1);
+ DMA2D->OOR = dest_stride - draw_width; // out buffer offset
+ // Note: unlike FGCOLR and BGCOLR, OCOLR bits must match DMA2D_OUTPUT_COLOR, alpha can be specified
+#if RBS_BIT
+ // swap red/blue bits
+ DMA2D->OCOLR = (color.ch.blue << 11) | (color.ch.green_l << 5 | color.ch.green_h << 8) | (color.ch.red);
+#else
+ DMA2D->OCOLR = color.full;
+#endif
+ }
+ else {
+ DMA2D->CR = 0x2UL << DMA2D_CR_MODE_Pos; // Memory-to-memory with blending (FG and BG fetch with PFC and blending)
+
+ DMA2D->FGPFCCR = A8;
+ DMA2D->FGPFCCR |= (opa << DMA2D_FGPFCCR_ALPHA_Pos);
+ // Alpha Mode 1: Replace original foreground image alpha channel value by FGPFCCR.ALPHA
+ DMA2D->FGPFCCR |= (0x1UL << DMA2D_FGPFCCR_AM_Pos);
+ //DMA2D->FGPFCCR |= (RBS_BIT << DMA2D_FGPFCCR_RBS_Pos);
+
+ // Note: in Alpha Mode 1 FGMAR and FGOR are not used to supply foreground A8 bytes,
+ // those bytes are replaced by constant ALPHA defined in FGPFCCR
+ DMA2D->FGMAR = (uint32_t)dest_buf;
+ DMA2D->FGOR = dest_stride;
+ DMA2D->FGCOLR = lv_color_to32(color) & 0x00ffffff; // swap FGCOLR R/B bits if FGPFCCR.RBS (RBS_BIT) bit is set
+
+ DMA2D->BGPFCCR = LvglColorFormat;
+#if defined(DMA2D_BGPFCCR_RBS_Pos)
+ DMA2D->BGPFCCR |= (RBS_BIT << DMA2D_BGPFCCR_RBS_Pos);
+#endif
+ DMA2D->BGMAR = (uint32_t)(dest_buf + (dest_stride * draw_area->y1) + draw_area->x1);
+ DMA2D->BGOR = dest_stride - draw_width;
+ DMA2D->BGCOLR = 0; // used in A4 and A8 modes only
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->BGMAR, DMA2D->BGOR, draw_width, draw_height, sizeof(lv_color_t));
+
+ DMA2D->OPFCCR = LvglColorFormat;
+#if defined(DMA2D_OPFCCR_RBS_Pos)
+ DMA2D->OPFCCR |= (RBS_BIT << DMA2D_OPFCCR_RBS_Pos);
+#endif
+ DMA2D->OMAR = DMA2D->BGMAR;
+ DMA2D->OOR = DMA2D->BGOR;
+ DMA2D->OCOLR = 0;
+ }
+ // PL - pixel per lines (14 bit), NL - number of lines (16 bit)
+ DMA2D->NLR = (draw_width << DMA2D_NLR_PL_Pos) | (draw_height << DMA2D_NLR_NL_Pos);
+
+ _lv_gpu_stm32_dma2d_start_dma_transfer();
+}
+
+/**
+ * @brief Draws src (foreground) map on dst (background) map.
+ * @param src_offset src offset in relation to dst, useful when src is larger than draw_area
+ * @param opa constant opacity to be applied
+ * @param bitmapColorCode bitmap color type
+ * @param ignoreAlpha if TRUE, bitmap src alpha channel is ignored
+ */
+LV_STM32_DMA2D_STATIC void _lv_draw_stm32_dma2d_blend_map(const lv_color_t * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * draw_area, const void * src_buf, lv_coord_t src_stride, const lv_point_t * src_offset, lv_opa_t opa,
+ dma2d_color_format_t src_color_format, bool ignore_src_alpha)
+{
+ LV_ASSERT_MSG(!isDma2dInProgess, "dma2d transfer has not finished"); // critical
+ if(opa <= LV_OPA_MIN || src_color_format == UNSUPPORTED) return;
+ lv_coord_t draw_width = lv_area_get_width(draw_area);
+ lv_coord_t draw_height = lv_area_get_height(draw_area);
+ bool bitmapHasOpacity = !ignore_src_alpha && (src_color_format == ARGB8888 || src_color_format == ARGB1555 ||
+ src_color_format == ARGB4444);
+
+ if(opa >= LV_OPA_MAX) opa = 0xff;
+
+ uint8_t srcBpp; // source bytes per pixel
+ switch(src_color_format) {
+ case ARGB8888:
+ srcBpp = 4;
+ break;
+ case RGB888:
+ srcBpp = 3;
+ break;
+ case RGB565:
+ case ARGB1555:
+ case ARGB4444:
+ srcBpp = 2;
+ break;
+ default:
+ LV_LOG_ERROR("unsupported color format");
+ return;
+ }
+
+ _lv_gpu_stm32_dma2d_await_dma_transfer_finish(NULL);
+
+ DMA2D->FGPFCCR = src_color_format;
+
+ if(opa == 0xff && !bitmapHasOpacity) {
+ // no need to blend
+ if(src_color_format == LvglColorFormat) {
+ // no need to convert pixel format (PFC) either
+ DMA2D->CR = 0x0UL;
+ }
+ else {
+ DMA2D->CR = 0x1UL << DMA2D_CR_MODE_Pos; // Memory-to-memory with PFC (FG fetch only with FG PFC active)
+ }
+ // Alpha Mode 0: No modification of the foreground image alpha channel value
+ }
+ else {
+ // blend
+ DMA2D->CR = 0x2UL << DMA2D_CR_MODE_Pos; // Memory-to-memory with blending (FG and BG fetch with PFC and blending)
+ DMA2D->FGPFCCR |= (opa << DMA2D_FGPFCCR_ALPHA_Pos);
+ if(bitmapHasOpacity) {
+ // Alpha Mode 2: Replace original foreground image alpha channel value by FGPFCCR.ALPHA multiplied with original alpha channel value
+ DMA2D->FGPFCCR |= (0x2UL << DMA2D_FGPFCCR_AM_Pos);
+ }
+ else {
+ // Alpha Mode 1: Replace original foreground image alpha channel value by FGPFCCR.ALPHA
+ DMA2D->FGPFCCR |= (0x1UL << DMA2D_FGPFCCR_AM_Pos);
+ }
+ }
+#if defined(DMA2D_FGPFCCR_RBS_Pos)
+ DMA2D->FGPFCCR |= (RBS_BIT << DMA2D_FGPFCCR_RBS_Pos);
+#endif
+ DMA2D->FGMAR = ((uint32_t)src_buf) + srcBpp * ((src_stride * src_offset->y) + src_offset->x);
+ DMA2D->FGOR = src_stride - draw_width;
+ DMA2D->FGCOLR = 0; // used in A4 and A8 modes only
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->FGMAR, DMA2D->FGOR, draw_width, draw_height, srcBpp);
+
+ DMA2D->OPFCCR = LvglColorFormat;
+#if defined(DMA2D_OPFCCR_RBS_Pos)
+ DMA2D->OPFCCR |= (RBS_BIT << DMA2D_OPFCCR_RBS_Pos);
+#endif
+ DMA2D->OMAR = (uint32_t)(dest_buf + (dest_stride * draw_area->y1) + draw_area->x1);
+ DMA2D->OOR = dest_stride - draw_width;
+ DMA2D->OCOLR = 0;
+
+ if(opa != 0xff || bitmapHasOpacity) {
+ // use background (BG*) registers
+ DMA2D->BGPFCCR = LvglColorFormat;
+#if defined(DMA2D_BGPFCCR_RBS_Pos)
+ DMA2D->BGPFCCR |= (RBS_BIT << DMA2D_BGPFCCR_RBS_Pos);
+#endif
+ DMA2D->BGMAR = DMA2D->OMAR;
+ DMA2D->BGOR = DMA2D->OOR;
+ DMA2D->BGCOLR = 0; // used in A4 and A8 modes only
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->BGMAR, DMA2D->BGOR, draw_width, draw_height, sizeof(lv_color_t));
+ }
+
+ // PL - pixel per lines (14 bit), NL - number of lines (16 bit)
+ DMA2D->NLR = (draw_width << DMA2D_NLR_PL_Pos) | (draw_height << DMA2D_NLR_NL_Pos);
+
+ _lv_gpu_stm32_dma2d_start_dma_transfer();
+}
+
+/**
+ * @brief Paints solid color with alpha mask with additional constant opacity. Useful e.g. for painting anti-aliased fonts.
+ * @param src_offset src offset in relation to dst, useful when src (alpha mask) is larger than draw_area
+ * @param color color to paint, note: alpha is ignored
+ * @param opa constant opacity to be applied
+ */
+LV_STM32_DMA2D_STATIC void _lv_draw_stm32_dma2d_blend_paint(const lv_color_t * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * draw_area, const lv_opa_t * mask_buf, lv_coord_t mask_stride, const lv_point_t * mask_offset,
+ lv_color_t color, lv_opa_t opa)
+{
+ LV_ASSERT_MSG(!isDma2dInProgess, "dma2d transfer has not finished"); // critical
+ lv_coord_t draw_width = lv_area_get_width(draw_area);
+ lv_coord_t draw_height = lv_area_get_height(draw_area);
+
+ _lv_gpu_stm32_dma2d_await_dma_transfer_finish(NULL);
+
+ DMA2D->CR = 0x2UL << DMA2D_CR_MODE_Pos; // Memory-to-memory with blending (FG and BG fetch with PFC and blending)
+
+ DMA2D->FGPFCCR = A8;
+ if(opa < LV_OPA_MAX) {
+ DMA2D->FGPFCCR |= (opa << DMA2D_FGPFCCR_ALPHA_Pos);
+ DMA2D->FGPFCCR |= (0x2UL <<
+ DMA2D_FGPFCCR_AM_Pos); // Alpha Mode: Replace original foreground image alpha channel value by FGPFCCR.ALPHA multiplied with original alpha channel value
+ }
+ //DMA2D->FGPFCCR |= (RBS_BIT << DMA2D_FGPFCCR_RBS_Pos);
+ DMA2D->FGMAR = (uint32_t)(mask_buf + (mask_stride * mask_offset->y) + mask_offset->x);
+ DMA2D->FGOR = mask_stride - draw_width;
+ DMA2D->FGCOLR = lv_color_to32(color) & 0x00ffffff; // swap FGCOLR R/B bits if FGPFCCR.RBS (RBS_BIT) bit is set
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->FGMAR, DMA2D->FGOR, draw_width, draw_height, sizeof(lv_opa_t));
+
+ DMA2D->BGPFCCR = LvglColorFormat;
+#if defined(DMA2D_BGPFCCR_RBS_Pos)
+ DMA2D->BGPFCCR |= (RBS_BIT << DMA2D_BGPFCCR_RBS_Pos);
+#endif
+ DMA2D->BGMAR = (uint32_t)(dest_buf + (dest_stride * draw_area->y1) + draw_area->x1);
+ DMA2D->BGOR = dest_stride - draw_width;
+ DMA2D->BGCOLR = 0; // used in A4 and A8 modes only
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->BGMAR, DMA2D->BGOR, draw_width, draw_height, sizeof(lv_color_t));
+
+ DMA2D->OPFCCR = LvglColorFormat;
+#if defined(DMA2D_OPFCCR_RBS_Pos)
+ DMA2D->OPFCCR |= (RBS_BIT << DMA2D_OPFCCR_RBS_Pos);
+#endif
+ DMA2D->OMAR = DMA2D->BGMAR;
+ DMA2D->OOR = DMA2D->BGOR;
+ DMA2D->OCOLR = 0;
+ // PL - pixel per lines (14 bit), NL - number of lines (16 bit)
+ DMA2D->NLR = (draw_width << DMA2D_NLR_PL_Pos) | (draw_height << DMA2D_NLR_NL_Pos);
+
+ _lv_gpu_stm32_dma2d_start_dma_transfer();
+}
+
+/**
+ * @brief Copies src (foreground) map to the dst (background) map.
+ * @param src_offset src offset in relation to dst, useful when src is larger than draw_area
+ */
+void _lv_draw_stm32_dma2d_copy_buffer(const lv_color_t * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * draw_area, const lv_color_t * src_buf, lv_coord_t src_stride, const lv_point_t * src_offset)
+{
+ LV_ASSERT_MSG(!isDma2dInProgess, "dma2d transfer has not finished"); // critical
+ lv_coord_t draw_width = lv_area_get_width(draw_area);
+ lv_coord_t draw_height = lv_area_get_height(draw_area);
+
+ _lv_gpu_stm32_dma2d_await_dma_transfer_finish(NULL);
+
+ DMA2D->CR = 0x0UL; // Memory-to-memory (FG fetch only)
+
+ DMA2D->FGPFCCR = LvglColorFormat;
+#if defined(DMA2D_FGPFCCR_RBS_Pos)
+ DMA2D->FGPFCCR |= (RBS_BIT << DMA2D_FGPFCCR_RBS_Pos);
+#endif
+ DMA2D->FGMAR = (uint32_t)(src_buf + (src_stride * src_offset->y) + src_offset->x);
+ DMA2D->FGOR = src_stride - draw_width;
+ DMA2D->FGCOLR = 0; // used in A4 and A8 modes only
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->FGMAR, DMA2D->FGOR, draw_width, draw_height, sizeof(lv_color_t));
+
+ // Note BG* registers do not need to be set up since BG is not used
+
+ DMA2D->OPFCCR = LvglColorFormat;
+#if defined(DMA2D_OPFCCR_RBS_Pos)
+ DMA2D->OPFCCR |= (RBS_BIT << DMA2D_OPFCCR_RBS_Pos);
+#endif
+ DMA2D->OMAR = (uint32_t)(dest_buf + (dest_stride * draw_area->y1) + draw_area->x1);
+ DMA2D->OOR = dest_stride - draw_width;
+ DMA2D->OCOLR = 0;
+
+ // PL - pixel per lines (14 bit), NL - number of lines (16 bit)
+ DMA2D->NLR = (draw_width << DMA2D_NLR_PL_Pos) | (draw_height << DMA2D_NLR_NL_Pos);
+
+ _lv_gpu_stm32_dma2d_start_dma_transfer();
+}
+
+LV_STM32_DMA2D_STATIC void _lv_gpu_stm32_dma2d_start_dma_transfer(void)
+{
+ LV_ASSERT_MSG(!isDma2dInProgess, "dma2d transfer has not finished");
+ isDma2dInProgess = true;
+ DMA2D->IFCR = 0x3FU; // trigger ISR flags reset
+ // Note: cleaning output buffer cache is needed only when buffer may be misaligned or adjacent area may have been drawn in sw-fashion, e.g. using lv_draw_sw_blend_basic()
+#if LV_COLOR_DEPTH == 16
+ __lv_gpu_stm32_dma2d_clean_cache(DMA2D->OMAR, DMA2D->OOR, (DMA2D->NLR & DMA2D_NLR_PL_Msk) >> DMA2D_NLR_PL_Pos,
+ (DMA2D->NLR & DMA2D_NLR_NL_Msk) >> DMA2D_NLR_NL_Pos, sizeof(lv_color_t));
+#endif
+ DMA2D->CR |= DMA2D_CR_START;
+ // Note: for some reason mask buffer gets damaged during transfer if waiting is postponed
+ _lv_gpu_stm32_dma2d_await_dma_transfer_finish(NULL); // FIXME: this line should not be needed here, but it is
+}
+
+LV_STM32_DMA2D_STATIC void _lv_gpu_stm32_dma2d_await_dma_transfer_finish(lv_disp_drv_t * disp_drv)
+{
+ if(disp_drv && disp_drv->wait_cb) {
+ while((DMA2D->CR & DMA2D_CR_START) != 0U) {
+ disp_drv->wait_cb(disp_drv);
+ }
+ }
+ else {
+ while((DMA2D->CR & DMA2D_CR_START) != 0U);
+ }
+
+ __IO uint32_t isrFlags = DMA2D->ISR;
+
+ if(isrFlags & DMA2D_ISR_CEIF) {
+ LV_LOG_ERROR("DMA2D config error");
+ }
+
+ if(isrFlags & DMA2D_ISR_TEIF) {
+ LV_LOG_ERROR("DMA2D transfer error");
+ }
+
+ DMA2D->IFCR = 0x3FU; // trigger ISR flags reset
+
+ if(isDma2dInProgess) {
+ // invalidate output buffer cached memory ONLY after DMA2D transfer
+ //__lv_gpu_stm32_dma2d_invalidate_cache(DMA2D->OMAR, DMA2D->OOR, (DMA2D->NLR & DMA2D_NLR_PL_Msk) >> DMA2D_NLR_PL_Pos, (DMA2D->NLR & DMA2D_NLR_NL_Msk) >> DMA2D_NLR_NL_Pos, sizeof(lv_color_t));
+ isDma2dInProgess = false;
}
}
+#if defined (LV_STM32_DMA2D_USE_M7_CACHE)
+// Cortex-M7 DCache present
+void _lv_gpu_stm32_dma2d_invalidate_cache(uint32_t address, lv_coord_t offset, lv_coord_t width,
+ lv_coord_t height, uint8_t pixel_size)
+{
+ if(((SCB->CCR) & SCB_CCR_DC_Msk) == 0) return; // L1 data cache is disabled
+ uint16_t stride = pixel_size * (width + offset); // in bytes
+ uint16_t ll = pixel_size * width; // line length in bytes
+ uint32_t n = 0; // address of the next cache row after the last invalidated row
+ lv_coord_t h = 0;
+
+ __DSB();
+
+ while(h < height) {
+ uint32_t a = address + (h * stride);
+ uint32_t e = a + ll; // end address, address of the first byte after the current line
+ a &= ~(CACHE_ROW_SIZE - 1U);
+ if(a < n) a = n; // prevent the previous last cache row from being invalidated again
+
+ while(a < e) {
+ SCB->DCIMVAC = a;
+ a += CACHE_ROW_SIZE;
+ }
+
+ n = a;
+ h++;
+ };
+
+ __DSB();
+ __ISB();
+}
+
+void _lv_gpu_stm32_dma2d_clean_cache(uint32_t address, lv_coord_t offset, lv_coord_t width,
+ lv_coord_t height, uint8_t pixel_size)
+{
+ if(((SCB->CCR) & SCB_CCR_DC_Msk) == 0) return; // L1 data cache is disabled
+ uint16_t stride = pixel_size * (width + offset); // in bytes
+ uint16_t ll = pixel_size * width; // line length in bytes
+ uint32_t n = 0; // address of the next cache row after the last cleaned row
+ lv_coord_t h = 0;
+ __DSB();
+
+ while(h < height) {
+ uint32_t a = address + (h * stride);
+ uint32_t e = a + ll; // end address, address of the first byte after the current line
+ a &= ~(CACHE_ROW_SIZE - 1U);
+ if(a < n) a = n; // prevent the previous last cache row from being cleaned again
+
+ while(a < e) {
+ SCB->DCCMVAC = a;
+ a += CACHE_ROW_SIZE;
+ }
+
+ n = a;
+ h++;
+ };
+
+ __DSB();
+ __ISB();
+}
+#endif // LV_STM32_DMA2D_USE_M7_CACHE
+
+#if defined(LV_STM32_DMA2D_TEST)
+// initialize µs timer
+LV_STM32_DMA2D_STATIC bool _lv_gpu_stm32_dwt_init(void)
+{
+ // disable TRC
+ CoreDebug->DEMCR &= ~CoreDebug_DEMCR_TRCENA_Msk;
+ // enable TRC
+ CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
+
+#if defined(__CORTEX_M) && (__CORTEX_M == 7U)
+ DWT->LAR = 0xC5ACCE55;
#endif
+ // disable clock cycle counter
+ DWT->CTRL &= ~DWT_CTRL_CYCCNTENA_Msk;
+ // enable clock cycle counter
+ DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
+
+ // reset the clock cycle counter value
+ DWT->CYCCNT = 0;
+
+ // 3 NO OPERATION instructions
+ __ASM volatile("NOP");
+ __ASM volatile("NOP");
+ __ASM volatile("NOP");
+
+ // check if clock cycle counter has started
+ if(DWT->CYCCNT) {
+ return true; // clock cycle counter started
+ }
+ else {
+ return false; // clock cycle counter not started
+ }
+}
+
+// get elapsed µs since reset
+LV_STM32_DMA2D_STATIC uint32_t _lv_gpu_stm32_dwt_get_us(void)
+{
+ uint32_t us = (DWT->CYCCNT * 1000000) / HAL_RCC_GetHCLKFreq();
+ return us;
+}
+
+// reset µs timer
+LV_STM32_DMA2D_STATIC void _lv_gpu_stm32_dwt_reset(void)
+{
+ DWT->CYCCNT = 0;
+}
+#endif // LV_STM32_DMA2D_TEST
+#endif // LV_USE_GPU_STM32_DMA2D
diff --git a/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.h b/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.h
index fa7070e..42d8256 100644
--- a/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.h
+++ b/lib/lvgl/src/draw/stm32_dma2d/lv_gpu_stm32_dma2d.h
@@ -10,52 +10,63 @@
extern "C" {
#endif
-/*********************
- * INCLUDES
- *********************/
#include "../../misc/lv_color.h"
#include "../../hal/lv_hal_disp.h"
#include "../sw/lv_draw_sw.h"
#if LV_USE_GPU_STM32_DMA2D
+/*********************
+ * INCLUDES
+ *********************/
+#include LV_GPU_DMA2D_CMSIS_INCLUDE
+
/*********************
* DEFINES
*********************/
+#if defined(LV_STM32_DMA2D_TEST)
+// removes "static" modifier for some internal methods in order to test them
+#define LV_STM32_DMA2D_STATIC
+#else
+#define LV_STM32_DMA2D_STATIC static
+#endif
-#define LV_DMA2D_ARGB8888 0
-#define LV_DMA2D_RGB888 1
-#define LV_DMA2D_RGB565 2
-#define LV_DMA2D_ARGB1555 3
-#define LV_DMA2D_ARGB4444 4
+#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
+#define LV_STM32_DMA2D_USE_M7_CACHE
+#endif
/**********************
* TYPEDEFS
**********************/
+enum dma2d_color_format {
+ ARGB8888 = 0x0,
+ RGB888 = 0x01,
+ RGB565 = 0x02,
+ ARGB1555 = 0x03,
+ ARGB4444 = 0x04,
+ A8 = 0x09,
+ UNSUPPORTED = 0xff,
+};
+typedef enum dma2d_color_format dma2d_color_format_t;
typedef lv_draw_sw_ctx_t lv_draw_stm32_dma2d_ctx_t;
-
struct _lv_disp_drv_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
-
-/**
- * Turn on the peripheral and set output color mode, this only needs to be done once
- */
void lv_draw_stm32_dma2d_init(void);
-
void lv_draw_stm32_dma2d_ctx_init(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
-
void lv_draw_stm32_dma2d_ctx_deinit(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+void _lv_draw_stm32_dma2d_copy_buffer(const lv_color_t * dest_buf, lv_coord_t dest_stride,
+ const lv_area_t * draw_area, const lv_color_t * src_buf, lv_coord_t src_stride, const lv_point_t * src_offset);
-void lv_draw_stm32_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+#if defined (LV_STM32_DMA2D_USE_M7_CACHE)
+void _lv_gpu_stm32_dma2d_invalidate_cache(uint32_t address, lv_coord_t offset,
+ lv_coord_t width, lv_coord_t height, uint8_t pixel_size);
+void _lv_gpu_stm32_dma2d_clean_cache(uint32_t address, lv_coord_t offset, lv_coord_t width,
+ lv_coord_t height, uint8_t pixel_size);
+#endif
-void lv_draw_stm32_dma2d_buffer_copy(lv_draw_ctx_t * draw_ctx,
- void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
- void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area);
-
-void lv_gpu_stm32_dma2d_wait_cb(lv_draw_ctx_t * draw_ctx);
/**********************
* MACROS
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw.c b/lib/lvgl/src/draw/sw/lv_draw_sw.c
index c4cd84b..1c0c6d4 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw.c
@@ -51,9 +51,17 @@ void lv_draw_sw_init_ctx(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
draw_sw_ctx->base_draw.draw_img_decoded = lv_draw_sw_img_decoded;
draw_sw_ctx->base_draw.draw_line = lv_draw_sw_line;
draw_sw_ctx->base_draw.draw_polygon = lv_draw_sw_polygon;
+#if LV_DRAW_COMPLEX
+ draw_sw_ctx->base_draw.draw_transform = lv_draw_sw_transform;
+#endif
draw_sw_ctx->base_draw.wait_for_finish = lv_draw_sw_wait_for_finish;
draw_sw_ctx->base_draw.buffer_copy = lv_draw_sw_buffer_copy;
+ draw_sw_ctx->base_draw.layer_init = lv_draw_sw_layer_create;
+ draw_sw_ctx->base_draw.layer_adjust = lv_draw_sw_layer_adjust;
+ draw_sw_ctx->base_draw.layer_blend = lv_draw_sw_layer_blend;
+ draw_sw_ctx->base_draw.layer_destroy = lv_draw_sw_layer_destroy;
draw_sw_ctx->blend = lv_draw_sw_blend_basic;
+ draw_ctx->layer_instance_size = sizeof(lv_draw_sw_layer_ctx_t);
}
void lv_draw_sw_deinit_ctx(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
@@ -93,7 +101,6 @@ void lv_draw_sw_buffer_copy(lv_draw_ctx_t * draw_ctx,
dest_bufc += dest_stride;
src_bufc += src_stride;
}
-
}
/**********************
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw.h b/lib/lvgl/src/draw/sw/lv_draw_sw.h
index 323783e..0f6d46b 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw.h
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw.h
@@ -36,6 +36,13 @@ typedef struct {
void (*blend)(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
} lv_draw_sw_ctx_t;
+typedef struct {
+ lv_draw_layer_ctx_t base_draw;
+
+ uint32_t buf_size_bytes: 31;
+ uint32_t has_alpha : 1;
+} lv_draw_sw_layer_ctx_t;
+
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -54,11 +61,13 @@ void lv_draw_sw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, con
void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
uint32_t letter);
-LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,
- const lv_area_t * coords, const uint8_t * src_buf, lv_img_cf_t cf);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
+ const lv_draw_img_dsc_t * draw_dsc,
+ const lv_area_t * coords, const uint8_t * src_buf,
+ lv_img_cf_t cf);
-LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
- const lv_point_t * point1, const lv_point_t * point2);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+ const lv_point_t * point1, const lv_point_t * point2);
void lv_draw_sw_polygon(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * draw_dsc,
const lv_point_t * points, uint16_t point_cnt);
@@ -66,6 +75,22 @@ void lv_draw_sw_polygon(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc
void lv_draw_sw_buffer_copy(lv_draw_ctx_t * draw_ctx,
void * dest_buf, lv_coord_t dest_stride, const lv_area_t * dest_area,
void * src_buf, lv_coord_t src_stride, const lv_area_t * src_area);
+
+void lv_draw_sw_transform(lv_draw_ctx_t * draw_ctx, const lv_area_t * dest_area, const void * src_buf,
+ lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf);
+
+struct _lv_draw_layer_ctx_t * lv_draw_sw_layer_create(struct _lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+void lv_draw_sw_layer_adjust(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags);
+
+void lv_draw_sw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ const lv_draw_img_dsc_t * draw_dsc);
+
+void lv_draw_sw_layer_destroy(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx);
+
/***********************
* GLOBAL VARIABLES
***********************/
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw.mk b/lib/lvgl/src/draw/sw/lv_draw_sw.mk
index 386d9ed..4625cbc 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw.mk
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw.mk
@@ -1,13 +1,15 @@
CSRCS += lv_draw_sw.c
CSRCS += lv_draw_sw_arc.c
CSRCS += lv_draw_sw_blend.c
+CSRCS += lv_draw_sw_dither.c
+CSRCS += lv_draw_sw_gradient.c
CSRCS += lv_draw_sw_img.c
CSRCS += lv_draw_sw_letter.c
CSRCS += lv_draw_sw_line.c
-CSRCS += lv_draw_sw_rect.c
CSRCS += lv_draw_sw_polygon.c
-CSRCS += lv_draw_sw_gradient.c
-CSRCS += lv_draw_sw_dither.c
+CSRCS += lv_draw_sw_rect.c
+CSRCS += lv_draw_sw_transform.c
+CSRCS += lv_draw_sw_layer.c
DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw
VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_arc.c b/lib/lvgl/src/draw/sw/lv_draw_sw_arc.c
index 4aa2357..3ed62b6 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_arc.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_arc.c
@@ -97,8 +97,10 @@ void lv_draw_sw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, con
/*Create inner the mask*/
int16_t mask_in_id = LV_MASK_ID_INV;
lv_draw_mask_radius_param_t mask_in_param;
+ bool mask_in_param_valid = false;
if(lv_area_get_width(&area_in) > 0 && lv_area_get_height(&area_in) > 0) {
lv_draw_mask_radius_init(&mask_in_param, &area_in, LV_RADIUS_CIRCLE, true);
+ mask_in_param_valid = true;
mask_in_id = lv_draw_mask_add(&mask_in_param, NULL);
}
@@ -115,7 +117,9 @@ void lv_draw_sw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, con
if(mask_in_id != LV_MASK_ID_INV) lv_draw_mask_remove_id(mask_in_id);
lv_draw_mask_free_param(&mask_out_param);
- lv_draw_mask_free_param(&mask_in_param);
+ if(mask_in_param_valid) {
+ lv_draw_mask_free_param(&mask_in_param);
+ }
return;
}
@@ -162,7 +166,9 @@ void lv_draw_sw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, con
lv_draw_mask_free_param(&mask_angle_param);
lv_draw_mask_free_param(&mask_out_param);
- lv_draw_mask_free_param(&mask_in_param);
+ if(mask_in_param_valid) {
+ lv_draw_mask_free_param(&mask_in_param);
+ }
lv_draw_mask_remove_id(mask_angle_id);
lv_draw_mask_remove_id(mask_out_id);
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_blend.c b/lib/lvgl/src/draw/sw/lv_draw_sw_blend.c
index 82d0138..7d595ec 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_blend.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_blend.c
@@ -25,18 +25,38 @@
static void fill_set_px(lv_color_t * dest_buf, const lv_area_t * blend_area, lv_coord_t dest_stride,
lv_color_t color, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stide);
-LV_ATTRIBUTE_FAST_MEM static void fill_normal(lv_color_t * dest_buf, const lv_area_t * dest_area,
- lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride);
+
+static void /* LV_ATTRIBUTE_FAST_MEM */ fill_normal(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa,
+ const lv_opa_t * mask, lv_coord_t mask_stride);
+
+#if LV_COLOR_SCREEN_TRANSP
+static void /* LV_ATTRIBUTE_FAST_MEM */ fill_argb(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa,
+ const lv_opa_t * mask, lv_coord_t mask_stride);
+#endif /*LV_COLOR_SCREEN_TRANSP*/
+
#if LV_DRAW_COMPLEX
static void fill_blended(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride, lv_color_t color,
lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride, lv_blend_mode_t blend_mode);
#endif /*LV_DRAW_COMPLEX*/
static void map_set_px(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
- const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride);
+ const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa,
+ const lv_opa_t * mask, lv_coord_t mask_stride);
-LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
- const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride);
+static void /* LV_ATTRIBUTE_FAST_MEM */ map_normal(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, const lv_color_t * src_buf,
+ lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask,
+ lv_coord_t mask_stride);
+
+#if LV_COLOR_SCREEN_TRANSP
+static void /* LV_ATTRIBUTE_FAST_MEM */ map_argb(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, const lv_color_t * src_buf,
+ lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask,
+ lv_coord_t mask_stride, lv_blend_mode_t blend_mode);
+
+#endif /*LV_COLOR_SCREEN_TRANSP*/
#if LV_DRAW_COMPLEX
static void map_blended(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
@@ -55,22 +75,12 @@ static inline lv_color_t color_blend_true_color_multiply(lv_color_t fg, lv_color
/**********************
* MACROS
**********************/
-#if LV_COLOR_SCREEN_TRANSP == 0
#define FILL_NORMAL_MASK_PX(color) \
if(*mask == LV_OPA_COVER) *dest_buf = color; \
else *dest_buf = lv_color_mix(color, *dest_buf, *mask); \
mask++; \
dest_buf++;
-#else
-#define FILL_NORMAL_MASK_PX(color) \
- if(*mask == LV_OPA_COVER) *dest_buf = color; \
- else if(disp->driver->screen_transp) lv_color_mix_with_alpha(*dest_buf, dest_buf->ch.alpha, color, *mask, dest_buf, &dest_buf->ch.alpha); \
- else *dest_buf = lv_color_mix(color, *dest_buf, *mask); \
- mask++; \
- dest_buf++;
-#endif
-
#define MAP_NORMAL_MASK_PX(x) \
if(*mask_tmp_x) { \
if(*mask_tmp_x == LV_OPA_COVER) dest_buf[x] = src_buf[x]; \
@@ -78,16 +88,6 @@ static inline lv_color_t color_blend_true_color_multiply(lv_color_t fg, lv_color
} \
mask_tmp_x++;
-#define MAP_NORMAL_MASK_PX_SCR_TRANSP(x) \
- if(*mask_tmp_x) { \
- if(*mask_tmp_x == LV_OPA_COVER) dest_buf[x] = src_buf[x]; \
- else if(disp->driver->screen_transp) lv_color_mix_with_alpha(dest_buf[x], dest_buf[x].ch.alpha, \
- src_buf[x], *mask_tmp_x, &dest_buf[x], &dest_buf[x].ch.alpha); \
- else dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], *mask_tmp_x); \
- } \
- mask_tmp_x++;
-
-
/**********************
* GLOBAL FUNCTIONS
**********************/
@@ -105,9 +105,10 @@ void lv_draw_sw_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * d
((lv_draw_sw_ctx_t *)draw_ctx)->blend(draw_ctx, dsc);
}
-LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx,
+ const lv_draw_sw_blend_dsc_t * dsc)
{
- const lv_opa_t * mask;
+ lv_opa_t * mask;
if(dsc->mask_buf == NULL) mask = NULL;
if(dsc->mask_buf && dsc->mask_res == LV_DRAW_MASK_RES_TRANSP) return;
else if(dsc->mask_res == LV_DRAW_MASK_RES_FULL_COVER) mask = NULL;
@@ -121,7 +122,16 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx, cons
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
lv_color_t * dest_buf = draw_ctx->buf;
if(disp->driver->set_px_cb == NULL) {
- dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) + (blend_area.x1 - draw_ctx->buf_area->x1);
+ if(disp->driver->screen_transp == 0) {
+ dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) + (blend_area.x1 - draw_ctx->buf_area->x1);
+ }
+ else {
+ /*With LV_COLOR_DEPTH 16 it means ARGB8565 (3 bytes format)*/
+ uint8_t * dest_buf8 = (uint8_t *) dest_buf;
+ dest_buf8 += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 += (blend_area.x1 - draw_ctx->buf_area->x1) * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf = (lv_color_t *)dest_buf8;
+ }
}
const lv_color_t * src_buf = dsc->src_buf;
@@ -136,8 +146,18 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx, cons
lv_coord_t mask_stride;
if(mask) {
+ /*Round the values in the mask if anti-aliasing is disabled*/
+ if(disp->driver->antialiasing == 0) {
+ int32_t mask_size = lv_area_get_size(dsc->mask_area);
+ int32_t i;
+ for(i = 0; i < mask_size; i++) {
+ mask[i] = mask[i] > 128 ? LV_OPA_COVER : LV_OPA_TRANSP;
+ }
+ }
+
mask_stride = lv_area_get_width(dsc->mask_area);
- mask += mask_stride * (dsc->mask_area->y1 - blend_area.y1) + (dsc->mask_area->x1 - blend_area.x1);
+ mask += mask_stride * (blend_area.y1 - dsc->mask_area->y1) + (blend_area.x1 - dsc->mask_area->x1);
+
}
else {
mask_stride = 0;
@@ -145,7 +165,6 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx, cons
lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
-
if(disp->driver->set_px_cb) {
if(dsc->src_buf == NULL) {
fill_set_px(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa, mask, mask_stride);
@@ -154,21 +173,29 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx, cons
map_set_px(dest_buf, &blend_area, dest_stride, src_buf, src_stride, dsc->opa, mask, mask_stride);
}
}
- else if(dsc->src_buf == NULL) {
- if(dsc->blend_mode == LV_BLEND_MODE_NORMAL) {
+#if LV_COLOR_SCREEN_TRANSP
+ else if(disp->driver->screen_transp) {
+ if(dsc->src_buf == NULL) {
+ fill_argb(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa, mask, mask_stride);
+ }
+ else {
+ map_argb(dest_buf, &blend_area, dest_stride, src_buf, src_stride, dsc->opa, mask, mask_stride, dsc->blend_mode);
+ }
+ }
+#endif
+ else if(dsc->blend_mode == LV_BLEND_MODE_NORMAL) {
+ if(dsc->src_buf == NULL) {
fill_normal(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa, mask, mask_stride);
}
-#if LV_DRAW_COMPLEX
else {
- fill_blended(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa, mask, mask_stride, dsc->blend_mode);
- }
-#endif
- }
- else {
- if(dsc->blend_mode == LV_BLEND_MODE_NORMAL) {
map_normal(dest_buf, &blend_area, dest_stride, src_buf, src_stride, dsc->opa, mask, mask_stride);
}
+ }
+ else {
#if LV_DRAW_COMPLEX
+ if(dsc->src_buf == NULL) {
+ fill_blended(dest_buf, &blend_area, dest_stride, dsc->color, dsc->opa, mask, mask_stride, dsc->blend_mode);
+ }
else {
map_blended(dest_buf, &blend_area, dest_stride, src_buf, src_stride, dsc->opa, mask, mask_stride, dsc->blend_mode);
}
@@ -176,7 +203,6 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(lv_draw_ctx_t * draw_ctx, cons
}
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -203,6 +229,7 @@ static void fill_set_px(lv_color_t * dest_buf, const lv_area_t * blend_area, lv_
for(y = 0; y < h; y++) {
for(x = 0; x < w; x++) {
if(mask[x]) {
+
disp->driver->set_px_cb(disp->driver, (void *)dest_buf, dest_stride, blend_area->x1 + x, blend_area->y1 + y, color,
(uint32_t)((uint32_t)opa * mask[x]) >> 8);
}
@@ -212,10 +239,10 @@ static void fill_set_px(lv_color_t * dest_buf, const lv_area_t * blend_area, lv_
}
}
-LV_ATTRIBUTE_FAST_MEM static void fill_normal(lv_color_t * dest_buf, const lv_area_t * dest_area,
- lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride)
+static LV_ATTRIBUTE_FAST_MEM void fill_normal(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa,
+ const lv_opa_t * mask, lv_coord_t mask_stride)
{
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
int32_t w = lv_area_get_width(dest_area);
int32_t h = lv_area_get_height(dest_area);
@@ -235,6 +262,14 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(lv_color_t * dest_buf, const lv_ar
lv_color_t last_dest_color = lv_color_black();
lv_color_t last_res_color = lv_color_mix(color, last_dest_color, opa);
+#if LV_COLOR_MIX_ROUND_OFS == 0 && LV_COLOR_DEPTH == 16
+ /*lv_color_mix work with an optimized algorithm with 16 bit color depth.
+ *However, it introduces some rounded error on opa.
+ *Introduce the same error here too to make lv_color_premult produces the same result */
+ opa = (uint32_t)((uint32_t)opa + 4) >> 3;
+ opa = opa << 3;
+#endif
+
uint16_t color_premult[3];
lv_color_premult(color, opa, color_premult);
lv_opa_t opa_inv = 255 - opa;
@@ -243,19 +278,7 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(lv_color_t * dest_buf, const lv_ar
for(x = 0; x < w; x++) {
if(last_dest_color.full != dest_buf[x].full) {
last_dest_color = dest_buf[x];
-
-#if LV_COLOR_SCREEN_TRANSP
- if(disp->driver->screen_transp) {
- lv_color_mix_with_alpha(dest_buf[x], dest_buf[x].ch.alpha, color, opa, &last_res_color,
- &last_res_color.ch.alpha);
- }
- else
-#else
- LV_UNUSED(disp);
-#endif
- {
- last_res_color = lv_color_mix_premult(color_premult, dest_buf[x], opa_inv);
- }
+ last_res_color = lv_color_mix_premult(color_premult, dest_buf[x], opa_inv);
}
dest_buf[x] = last_res_color;
}
@@ -335,17 +358,8 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(lv_color_t * dest_buf, const lv_ar
if(*mask != last_mask) opa_tmp = *mask == LV_OPA_COVER ? opa :
(uint32_t)((uint32_t)(*mask) * opa) >> 8;
if(*mask != last_mask || last_dest_color.full != dest_buf[x].full) {
-#if LV_COLOR_SCREEN_TRANSP
- if(disp->driver->screen_transp) {
- lv_color_mix_with_alpha(dest_buf[x], dest_buf[x].ch.alpha, color, opa_tmp, &last_res_color,
- &last_res_color.ch.alpha);
- }
- else
-#endif
- {
- if(opa_tmp == LV_OPA_COVER) last_res_color = color;
- else last_res_color = lv_color_mix(color, dest_buf[x], opa_tmp);
- }
+ if(opa_tmp == LV_OPA_COVER) last_res_color = color;
+ else last_res_color = lv_color_mix(color, dest_buf[x], opa_tmp);
last_mask = *mask;
last_dest_color.full = dest_buf[x].full;
}
@@ -360,6 +374,162 @@ LV_ATTRIBUTE_FAST_MEM static void fill_normal(lv_color_t * dest_buf, const lv_ar
}
}
+#if LV_COLOR_SCREEN_TRANSP
+static inline void set_px_argb(uint8_t * buf, lv_color_t color, lv_opa_t opa)
+{
+ lv_color_t bg_color;
+ lv_color_t res_color;
+ lv_opa_t bg_opa = buf[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+#if LV_COLOR_DEPTH == 8
+ bg_color.full = buf[0];
+ lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &buf[1]);
+ if(buf[1] <= LV_OPA_MIN) return;
+ buf[0] = res_color.full;
+#elif LV_COLOR_DEPTH == 16
+ bg_color.full = buf[0] + (buf[1] << 8);
+ lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &buf[2]);
+ if(buf[2] <= LV_OPA_MIN) return;
+ buf[0] = res_color.full & 0xff;
+ buf[1] = res_color.full >> 8;
+#elif LV_COLOR_DEPTH == 32
+ bg_color = *((lv_color_t *)buf);
+ lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &buf[3]);
+ if(buf[3] <= LV_OPA_MIN) return;
+ buf[0] = res_color.ch.blue;
+ buf[1] = res_color.ch.green;
+ buf[2] = res_color.ch.red;
+#endif
+}
+
+static inline void set_px_argb_blend(uint8_t * buf, lv_color_t color, lv_opa_t opa, lv_color_t (*blend_fp)(lv_color_t,
+ lv_color_t, lv_opa_t))
+{
+ static lv_color_t last_dest_color;
+ static lv_color_t last_src_color;
+ static lv_color_t last_res_color;
+ static uint32_t last_opa = 0xffff; /*Set to an invalid value for first*/
+
+ lv_color_t bg_color;
+
+ /*Get the BG color*/
+#if LV_COLOR_DEPTH == 8
+ if(buf[1] <= LV_OPA_MIN) return;
+ bg_color.full = buf[0];
+#elif LV_COLOR_DEPTH == 16
+ if(buf[2] <= LV_OPA_MIN) return;
+ bg_color.full = buf[0] + (buf[1] << 8);
+#elif LV_COLOR_DEPTH == 32
+ if(buf[3] <= LV_OPA_MIN) return;
+ bg_color = *((lv_color_t *)buf);
+#endif
+
+ /*Get the result color*/
+ if(last_dest_color.full != bg_color.full || last_src_color.full != color.full || last_opa != opa) {
+ last_dest_color = bg_color;
+ last_src_color = color;
+ last_opa = opa;
+ last_res_color = blend_fp(last_src_color, last_dest_color, last_opa);
+ }
+
+ /*Set the result color*/
+#if LV_COLOR_DEPTH == 8
+ buf[0] = last_res_color.full;
+#elif LV_COLOR_DEPTH == 16
+ buf[0] = last_res_color.full & 0xff;
+ buf[1] = last_res_color.full >> 8;
+#elif LV_COLOR_DEPTH == 32
+ buf[0] = last_res_color.ch.blue;
+ buf[1] = last_res_color.ch.green;
+ buf[2] = last_res_color.ch.red;
+#endif
+
+}
+
+static void LV_ATTRIBUTE_FAST_MEM fill_argb(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa,
+ const lv_opa_t * mask, lv_coord_t mask_stride)
+{
+ uint8_t * dest_buf8 = (uint8_t *) dest_buf;
+ int32_t w = lv_area_get_width(dest_area);
+ int32_t h = lv_area_get_height(dest_area);
+
+ int32_t x;
+ int32_t y;
+
+ uint8_t ctmp[LV_IMG_PX_SIZE_ALPHA_BYTE];
+ lv_memcpy(ctmp, &color, sizeof(lv_color_t));
+ ctmp[LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = opa;
+
+ /*No mask*/
+ if(mask == NULL) {
+ if(opa >= LV_OPA_MAX) {
+ for(x = 0; x < w; x++) {
+ lv_memcpy(dest_buf8, ctmp, LV_IMG_PX_SIZE_ALPHA_BYTE);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+
+ dest_buf8 += (dest_stride - w) * LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ for(y = 1; y < h; y++) {
+ lv_memcpy(dest_buf8, (uint8_t *) dest_buf, w * LV_IMG_PX_SIZE_ALPHA_BYTE);
+ dest_buf8 += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ /*Has opacity*/
+ else {
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ for(x = 0; x < w; x++) {
+ set_px_argb(dest_buf8, color, opa);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ }
+ }
+ }
+ /*Masked*/
+ else {
+ /*Only the mask matters*/
+ if(opa >= LV_OPA_MAX) {
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ for(x = 0; x < w; x++) {
+ set_px_argb(dest_buf8, color, *mask);
+ mask++;
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ }
+ }
+ /*With opacity*/
+ else {
+ /*Buffer the result color to avoid recalculating the same color*/
+ lv_opa_t last_mask = LV_OPA_TRANSP;
+ lv_opa_t opa_tmp = LV_OPA_TRANSP;
+
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ for(x = 0; x < w; x++) {
+ if(*mask) {
+ if(*mask != last_mask) opa_tmp = *mask == LV_OPA_COVER ? opa :
+ (uint32_t)((uint32_t)(*mask) * opa) >> 8;
+
+ set_px_argb(dest_buf8, color, opa_tmp);
+ }
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ mask++;
+ }
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ mask += (mask_stride - w);
+ }
+ }
+ }
+}
+#endif
+
#if LV_DRAW_COMPLEX
static void fill_blended(lv_color_t * dest_buf, const lv_area_t * dest_area,
lv_coord_t dest_stride, lv_color_t color, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride,
@@ -433,7 +603,8 @@ static void fill_blended(lv_color_t * dest_buf, const lv_area_t * dest_area,
#endif
static void map_set_px(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
- const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride)
+ const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa,
+ const lv_opa_t * mask, lv_coord_t mask_stride)
{
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
@@ -467,8 +638,10 @@ static void map_set_px(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_co
}
}
-LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
- const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask, lv_coord_t mask_stride)
+static void LV_ATTRIBUTE_FAST_MEM map_normal(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, const lv_color_t * src_buf,
+ lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask,
+ lv_coord_t mask_stride)
{
int32_t w = lv_area_get_width(dest_area);
@@ -477,10 +650,6 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
int32_t x;
int32_t y;
-#if LV_COLOR_SCREEN_TRANSP
- lv_disp_t * disp = _lv_refr_get_disp_refreshing();
-#endif
-
/*Simple fill (maybe with opacity), no masking*/
if(mask == NULL) {
if(opa >= LV_OPA_MAX) {
@@ -493,16 +662,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
else {
for(y = 0; y < h; y++) {
for(x = 0; x < w; x++) {
-#if LV_COLOR_SCREEN_TRANSP
- if(disp->driver->screen_transp) {
- lv_color_mix_with_alpha(dest_buf[x], dest_buf[x].ch.alpha, src_buf[x], opa, &dest_buf[x],
- &dest_buf[x].ch.alpha);
- }
- else
-#endif
- {
- dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], opa);
- }
+ dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], opa);
}
dest_buf += dest_stride;
src_buf += src_stride;
@@ -523,11 +683,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
}
#else
for(x = 0; x < w && ((lv_uintptr_t)mask_tmp_x & 0x3); x++) {
-#if LV_COLOR_SCREEN_TRANSP
- MAP_NORMAL_MASK_PX_SCR_TRANSP(x)
-#else
MAP_NORMAL_MASK_PX(x)
-#endif
}
uint32_t * mask32 = (uint32_t *)mask_tmp_x;
@@ -541,17 +697,10 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
}
else {
mask_tmp_x = (const lv_opa_t *)mask32;
-#if LV_COLOR_SCREEN_TRANSP
- MAP_NORMAL_MASK_PX_SCR_TRANSP(x)
- MAP_NORMAL_MASK_PX_SCR_TRANSP(x + 1)
- MAP_NORMAL_MASK_PX_SCR_TRANSP(x + 2)
- MAP_NORMAL_MASK_PX_SCR_TRANSP(x + 3)
-#else
MAP_NORMAL_MASK_PX(x)
MAP_NORMAL_MASK_PX(x + 1)
MAP_NORMAL_MASK_PX(x + 2)
MAP_NORMAL_MASK_PX(x + 3)
-#endif
}
}
mask32++;
@@ -559,11 +708,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
mask_tmp_x = (const lv_opa_t *)mask32;
for(; x < w ; x++) {
-#if LV_COLOR_SCREEN_TRANSP
- MAP_NORMAL_MASK_PX_SCR_TRANSP(x)
-#else
MAP_NORMAL_MASK_PX(x)
-#endif
}
#endif
dest_buf += dest_stride;
@@ -577,16 +722,7 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
for(x = 0; x < w; x++) {
if(mask[x]) {
lv_opa_t opa_tmp = mask[x] >= LV_OPA_MAX ? opa : ((opa * mask[x]) >> 8);
-#if LV_COLOR_SCREEN_TRANSP
- if(disp->driver->screen_transp) {
- lv_color_mix_with_alpha(dest_buf[x], dest_buf[x].ch.alpha, src_buf[x], opa_tmp,
- &dest_buf[x], &dest_buf[x].ch.alpha);
- }
- else
-#endif
- {
- dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], opa_tmp);
- }
+ dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], opa_tmp);
}
}
dest_buf += dest_stride;
@@ -596,6 +732,148 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(lv_color_t * dest_buf, const lv_are
}
}
}
+
+#if LV_COLOR_SCREEN_TRANSP
+static void LV_ATTRIBUTE_FAST_MEM map_argb(lv_color_t * dest_buf, const lv_area_t * dest_area,
+ lv_coord_t dest_stride, const lv_color_t * src_buf,
+ lv_coord_t src_stride, lv_opa_t opa, const lv_opa_t * mask,
+ lv_coord_t mask_stride, lv_blend_mode_t blend_mode)
+
+{
+ uint8_t * dest_buf8 = (uint8_t *) dest_buf;
+
+ int32_t w = lv_area_get_width(dest_area);
+ int32_t h = lv_area_get_height(dest_area);
+
+ int32_t x;
+ int32_t y;
+
+ lv_color_t (*blend_fp)(lv_color_t, lv_color_t, lv_opa_t);
+ switch(blend_mode) {
+ case LV_BLEND_MODE_ADDITIVE:
+ blend_fp = color_blend_true_color_additive;
+ break;
+ case LV_BLEND_MODE_SUBTRACTIVE:
+ blend_fp = color_blend_true_color_subtractive;
+ break;
+ case LV_BLEND_MODE_MULTIPLY:
+ blend_fp = color_blend_true_color_multiply;
+ break;
+ default:
+ blend_fp = NULL;
+ }
+
+ /*Simple fill (maybe with opacity), no masking*/
+ if(mask == NULL) {
+ if(opa >= LV_OPA_MAX) {
+ if(blend_fp == NULL && LV_COLOR_DEPTH == 32) {
+ for(y = 0; y < h; y++) {
+ lv_memcpy(dest_buf, src_buf, w * sizeof(lv_color_t));
+ dest_buf += dest_stride;
+ src_buf += src_stride;
+ }
+ }
+ else {
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ if(blend_fp == NULL) {
+ for(x = 0; x < w; x++) {
+ set_px_argb(dest_buf8, src_buf[x], LV_OPA_COVER);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ else {
+ for(x = 0; x < w; x++) {
+ set_px_argb_blend(dest_buf8, src_buf[x], LV_OPA_COVER, blend_fp);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ src_buf += src_stride;
+ }
+ }
+ }
+ /*No mask but opacity*/
+ else {
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ if(blend_fp == NULL) {
+ for(x = 0; x < w; x++) {
+ set_px_argb(dest_buf8, src_buf[x], opa);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ else {
+ for(x = 0; x < w; x++) {
+ set_px_argb_blend(dest_buf8, src_buf[x], opa, blend_fp);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ src_buf += src_stride;
+ }
+ }
+ }
+ /*Masked*/
+ else {
+ /*Only the mask matters*/
+ if(opa > LV_OPA_MAX) {
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ if(blend_fp == NULL) {
+ for(x = 0; x < w; x++) {
+ set_px_argb(dest_buf8, src_buf[x], mask[x]);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ else {
+ for(x = 0; x < w; x++) {
+ set_px_argb_blend(dest_buf8, src_buf[x], mask[x], blend_fp);
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ src_buf += src_stride;
+ mask += mask_stride;
+ }
+ }
+ /*Handle opa and mask values too*/
+ else {
+ uint8_t * dest_buf8_row = dest_buf8;
+ for(y = 0; y < h; y++) {
+ if(blend_fp == NULL) {
+ for(x = 0; x < w; x++) {
+ if(mask[x]) {
+ lv_opa_t opa_tmp = mask[x] >= LV_OPA_MAX ? opa : ((opa * mask[x]) >> 8);
+ set_px_argb(dest_buf8, src_buf[x], opa_tmp);
+ }
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ else {
+ for(x = 0; x < w; x++) {
+ if(mask[x]) {
+ lv_opa_t opa_tmp = mask[x] >= LV_OPA_MAX ? opa : ((opa * mask[x]) >> 8);
+ set_px_argb_blend(dest_buf8, src_buf[x], opa_tmp, blend_fp);
+ }
+ dest_buf8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+ }
+ }
+ dest_buf8_row += dest_stride * LV_IMG_PX_SIZE_ALPHA_BYTE;
+ dest_buf8 = dest_buf8_row;
+ src_buf += src_stride;
+ mask += mask_stride;
+ }
+ }
+ }
+}
+#endif
+
#if LV_DRAW_COMPLEX
static void map_blended(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa,
@@ -624,13 +902,21 @@ static void map_blended(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_c
return;
}
+ lv_color_t last_dest_color;
+ lv_color_t last_src_color;
/*Simple fill (maybe with opacity), no masking*/
if(mask == NULL) {
- /*The map will be indexed from `draw_area->x1` so compensate it.*/
-
+ last_dest_color = dest_buf[0];
+ last_src_color = src_buf[0];
+ lv_color_t last_res_color = blend_fp(last_src_color, last_dest_color, opa);
for(y = 0; y < h; y++) {
for(x = 0; x < w; x++) {
- dest_buf[x] = blend_fp(src_buf[x], dest_buf[x], opa);
+ if(last_src_color.full != src_buf[x].full || last_dest_color.full != dest_buf[x].full) {
+ last_dest_color = dest_buf[x];
+ last_src_color = src_buf[x];
+ last_res_color = blend_fp(last_src_color, last_dest_color, opa);
+ }
+ dest_buf[x] = last_res_color;
}
dest_buf += dest_stride;
src_buf += src_stride;
@@ -638,11 +924,21 @@ static void map_blended(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_c
}
/*Masked*/
else {
+ last_dest_color = dest_buf[0];
+ last_src_color = src_buf[0];
+ lv_opa_t last_opa = mask[0] >= LV_OPA_MAX ? opa : ((opa * mask[0]) >> 8);
+ lv_color_t last_res_color = blend_fp(last_src_color, last_dest_color, last_opa);
for(y = 0; y < h; y++) {
for(x = 0; x < w; x++) {
if(mask[x] == 0) continue;
lv_opa_t opa_tmp = mask[x] >= LV_OPA_MAX ? opa : ((opa * mask[x]) >> 8);
- dest_buf[x] = blend_fp(src_buf[x], dest_buf[x], opa_tmp);
+ if(last_src_color.full != src_buf[x].full || last_dest_color.full != dest_buf[x].full || last_opa != opa_tmp) {
+ last_dest_color = dest_buf[x];
+ last_src_color = src_buf[x];
+ last_opa = opa_tmp;
+ last_res_color = blend_fp(last_src_color, last_dest_color, last_opa);
+ }
+ dest_buf[x] = last_res_color;
}
dest_buf += dest_stride;
src_buf += src_stride;
@@ -754,4 +1050,3 @@ static inline lv_color_t color_blend_true_color_multiply(lv_color_t fg, lv_color
}
#endif
-
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_blend.h b/lib/lvgl/src/draw/sw/lv_draw_sw_blend.h
index 9a00e53..3158d98 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_blend.h
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_blend.h
@@ -56,7 +56,8 @@ void lv_draw_sw_blend(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_d
* @param draw_ctx pointer to a draw context
* @param dsc pointer to an initialized blend descriptor
*/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_basic(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_basic(struct _lv_draw_ctx_t * draw_ctx,
+ const lv_draw_sw_blend_dsc_t * dsc);
/**********************
* MACROS
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_dither.c b/lib/lvgl/src/draw/sw/lv_draw_sw_dither.c
index ff9ebf3..d910490 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_dither.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_dither.c
@@ -14,10 +14,9 @@
* STATIC FUNCTIONS
**********************/
-
#if _DITHER_GRADIENT
-LV_ATTRIBUTE_FAST_MEM void lv_dither_none(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w)
+void LV_ATTRIBUTE_FAST_MEM lv_dither_none(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w)
{
LV_UNUSED(x);
LV_UNUSED(y);
@@ -39,8 +38,7 @@ static const uint8_t dither_ordered_threshold_matrix[8 * 8] = {
42, 26, 38, 22, 41, 25, 37, 21
}; /* Shift by 6 to normalize */
-
-LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_hor(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w)
+void LV_ATTRIBUTE_FAST_MEM lv_dither_ordered_hor(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w)
{
LV_UNUSED(x);
/* For vertical dithering, the error is spread on the next column (and not next line).
@@ -63,7 +61,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_hor(lv_grad_t * grad, lv_coord_t x,
grad->map[j] = lv_color_hex(t.full);
}
}
-LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_ver(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w)
+
+void LV_ATTRIBUTE_FAST_MEM lv_dither_ordered_ver(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w)
{
/* For vertical dithering, the error is spread on the next column (and not next line).
Since the renderer is scanline based, it's not obvious what could be used to perform the rendering efficiently.
@@ -97,9 +96,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_ver(lv_grad_t * grad, lv_coord_t x,
}
}
-
#if LV_DITHER_ERROR_DIFFUSION == 1
-LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_hor(lv_grad_t * grad, lv_coord_t xs, lv_coord_t y, lv_coord_t w)
+void LV_ATTRIBUTE_FAST_MEM lv_dither_err_diff_hor(lv_grad_t * grad, lv_coord_t xs, lv_coord_t y, lv_coord_t w)
{
LV_UNUSED(xs);
LV_UNUSED(y);
@@ -153,7 +151,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_hor(lv_grad_t * grad, lv_coord_t x
grad->map[grad->size - 1] = lv_color_hex(grad->hmap[grad->size - 1].full);
}
-LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_ver(lv_grad_t * grad, lv_coord_t xs, lv_coord_t y, lv_coord_t w)
+void LV_ATTRIBUTE_FAST_MEM lv_dither_err_diff_ver(lv_grad_t * grad, lv_coord_t xs, lv_coord_t y, lv_coord_t w)
{
/* Try to implement error diffusion on a vertical gradient and an horizontal map using those tricks:
Since the given hi-resolution gradient (in src) is vertical, the Floyd Steinberg algorithm pass need to be rotated,
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_dither.h b/lib/lvgl/src/draw/sw/lv_draw_sw_dither.h
index 6362c5a..9aaefc9 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_dither.h
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_dither.h
@@ -15,7 +15,6 @@ extern "C" {
*********************/
#include "../../core/lv_obj_pos.h"
-
/*********************
* DEFINES
*********************/
@@ -39,30 +38,29 @@ typedef void (*lv_dither_func_t)(struct _lv_gradient_cache_t * grad, lv_coord_t
#endif
-
/**********************
* PROTOTYPES
**********************/
#if LV_DRAW_COMPLEX
#if _DITHER_GRADIENT
-LV_ATTRIBUTE_FAST_MEM void lv_dither_none(struct _lv_gradient_cache_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t w);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_dither_none(struct _lv_gradient_cache_t * grad, lv_coord_t x, lv_coord_t y,
+ lv_coord_t w);
-LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_hor(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
- const lv_coord_t y, const lv_coord_t w);
-LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_ver(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
- const lv_coord_t y, const lv_coord_t w);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_dither_ordered_hor(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
+ const lv_coord_t y, const lv_coord_t w);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_dither_ordered_ver(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
+ const lv_coord_t y, const lv_coord_t w);
#if LV_DITHER_ERROR_DIFFUSION == 1
-LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_hor(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
- const lv_coord_t y, const lv_coord_t w);
-LV_ATTRIBUTE_FAST_MEM void lv_dither_err_diff_ver(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
- const lv_coord_t y, const lv_coord_t w);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_dither_err_diff_hor(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
+ const lv_coord_t y, const lv_coord_t w);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_dither_err_diff_ver(struct _lv_gradient_cache_t * grad, const lv_coord_t xs,
+ const lv_coord_t y, const lv_coord_t w);
#endif /* LV_DITHER_ERROR_DIFFUSION */
#endif /* _DITHER_GRADIENT */
#endif
-
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.c b/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.c
index 434f9cc..15fcab3 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.c
@@ -21,6 +21,7 @@
#define GRAD_CONV(t, x) t = x
#endif
+#undef ALIGN
#if defined(LV_ARCH_64)
#define ALIGN(X) (((X) + 7) & ~7)
#else
@@ -46,7 +47,6 @@ static lv_res_t find_item(lv_grad_t * c, void * ctx);
static void free_item(lv_grad_t * c);
static uint32_t compute_key(const lv_grad_dsc_t * g, lv_coord_t w, lv_coord_t h);
-
/**********************
* STATIC VARIABLE
**********************/
@@ -227,7 +227,6 @@ static lv_grad_t * allocate_item(const lv_grad_dsc_t * g, lv_coord_t w, lv_coord
return item;
}
-
/**********************
* FUNCTIONS
**********************/
@@ -292,7 +291,7 @@ lv_grad_t * lv_gradient_get(const lv_grad_dsc_t * g, lv_coord_t w, lv_coord_t h)
return item;
}
-LV_ATTRIBUTE_FAST_MEM lv_grad_color_t lv_gradient_calculate(const lv_grad_dsc_t * dsc, lv_coord_t range,
+lv_grad_color_t LV_ATTRIBUTE_FAST_MEM lv_gradient_calculate(const lv_grad_dsc_t * dsc, lv_coord_t range,
lv_coord_t frac)
{
lv_grad_color_t tmp;
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.h b/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.h
index f5f3215..ccccbaa 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.h
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_gradient.h
@@ -24,7 +24,6 @@ extern "C" {
#error LVGL needs at least 2 stops for gradients. Please increase the LV_GRADIENT_MAX_STOPS
#endif
-
/**********************
* TYPEDEFS
**********************/
@@ -59,7 +58,6 @@ typedef struct _lv_gradient_cache_t {
#endif
} lv_grad_t;
-
/**********************
* PROTOTYPES
**********************/
@@ -69,8 +67,8 @@ typedef struct _lv_gradient_cache_t {
* @param range The range to use in computation.
* @param frac The current part used in the range. frac is in [0; range]
*/
-LV_ATTRIBUTE_FAST_MEM lv_grad_color_t lv_gradient_calculate(const lv_grad_dsc_t * dsc, lv_coord_t range,
- lv_coord_t frac);
+lv_grad_color_t /* LV_ATTRIBUTE_FAST_MEM */ lv_gradient_calculate(const lv_grad_dsc_t * dsc, lv_coord_t range,
+ lv_coord_t frac);
/**
* Set the gradient cache size
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_img.c b/lib/lvgl/src/draw/sw/lv_draw_sw_img.c
index 339a46d..7b2f71a 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_img.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_img.c
@@ -17,6 +17,7 @@
/*********************
* DEFINES
*********************/
+#define MAX_BUF_SIZE (uint32_t) lv_disp_get_hor_res(_lv_refr_get_disp_refreshing())
/**********************
* TYPEDEFS
@@ -25,6 +26,8 @@
/**********************
* STATIC PROTOTYPES
**********************/
+static void convert_cb(const lv_area_t * dest_area, const void * src_buf, lv_coord_t src_w, lv_coord_t src_h,
+ lv_coord_t src_stride, const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf);
/**********************
* STATIC VARIABLES
@@ -38,286 +41,258 @@
* GLOBAL FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,
- const lv_area_t * coords, const uint8_t * src_buf, lv_img_cf_t cf)
+void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
+ const lv_draw_img_dsc_t * draw_dsc,
+ const lv_area_t * coords, const uint8_t * src_buf,
+ lv_img_cf_t cf)
{
/*Use the clip area as draw area*/
lv_area_t draw_area;
lv_area_copy(&draw_area, draw_ctx->clip_area);
bool mask_any = lv_draw_mask_is_any(&draw_area);
+ bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false;
+ lv_area_t blend_area;
lv_draw_sw_blend_dsc_t blend_dsc;
- lv_memset_00(&blend_dsc, sizeof(blend_dsc));
+
+ lv_memset_00(&blend_dsc, sizeof(lv_draw_sw_blend_dsc_t));
blend_dsc.opa = draw_dsc->opa;
blend_dsc.blend_mode = draw_dsc->blend_mode;
+ blend_dsc.blend_area = &blend_area;
/*The simplest case just copy the pixels into the draw_buf*/
- if(!mask_any && draw_dsc->angle == 0 && draw_dsc->zoom == LV_IMG_ZOOM_NONE &&
- cf == LV_IMG_CF_TRUE_COLOR && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
- blend_dsc.blend_area = coords;
+ if(!mask_any && !transform && cf == LV_IMG_CF_TRUE_COLOR && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
blend_dsc.src_buf = (const lv_color_t *)src_buf;
+
+ blend_dsc.blend_area = coords;
lv_draw_sw_blend(draw_ctx, &blend_dsc);
}
+ else if(!mask_any && !transform && cf == LV_IMG_CF_ALPHA_8BIT) {
+ lv_area_t clipped_coords;
+ if(!_lv_area_intersect(&clipped_coords, coords, draw_ctx->clip_area)) return;
+
+ blend_dsc.mask_buf = (lv_opa_t *)src_buf;
+ blend_dsc.mask_area = coords;
+ blend_dsc.src_buf = NULL;
+ blend_dsc.color = draw_dsc->recolor;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+
+ blend_dsc.blend_area = coords;
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
+ }
+#if LV_COLOR_DEPTH == 16
+ else if(!mask_any && !transform && cf == LV_IMG_CF_RGB565A8 && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
+ lv_coord_t src_w = lv_area_get_width(coords);
+ lv_coord_t src_h = lv_area_get_height(coords);
+ blend_dsc.src_buf = (const lv_color_t *)src_buf;
+ blend_dsc.mask_buf = (lv_opa_t *)src_buf;
+ blend_dsc.mask_buf += sizeof(lv_color_t) * src_w * src_h;
+ blend_dsc.blend_area = coords;
+ blend_dsc.mask_area = coords;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
+ }
+#endif
/*In the other cases every pixel need to be checked one-by-one*/
else {
- //#if LV_DRAW_COMPLEX
- /*The pixel size in byte is different if an alpha byte is added too*/
- uint8_t px_size_byte = cf == LV_IMG_CF_TRUE_COLOR_ALPHA ? LV_IMG_PX_SIZE_ALPHA_BYTE : sizeof(lv_color_t);
+ blend_area.x1 = draw_ctx->clip_area->x1;
+ blend_area.x2 = draw_ctx->clip_area->x2;
+ blend_area.y1 = draw_ctx->clip_area->y1;
+ blend_area.y2 = draw_ctx->clip_area->y2;
- /*Go to the first displayed pixel of the map*/
- int32_t src_stride = lv_area_get_width(coords);
+ lv_coord_t src_w = lv_area_get_width(coords);
+ lv_coord_t src_h = lv_area_get_height(coords);
+ lv_coord_t blend_h = lv_area_get_height(&blend_area);
+ lv_coord_t blend_w = lv_area_get_width(&blend_area);
- lv_color_t c;
- lv_color_t chroma_keyed_color = LV_COLOR_CHROMA_KEY;
- uint32_t px_i = 0;
-
- const uint8_t * map_px;
-
- lv_coord_t draw_area_h = lv_area_get_height(&draw_area);
- lv_coord_t draw_area_w = lv_area_get_width(&draw_area);
-
- lv_area_t blend_area;
- blend_area.x1 = draw_area.x1;
- blend_area.x2 = draw_area.x2;
- blend_area.y1 = draw_area.y1;
- blend_area.y2 = blend_area.y1;
- blend_dsc.blend_area = &blend_area;
-
- bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false;
- /*Simple ARGB image. Handle it as special case because it's very common*/
- if(!mask_any && !transform && cf == LV_IMG_CF_TRUE_COLOR_ALPHA && draw_dsc->recolor_opa == LV_OPA_TRANSP) {
- uint32_t hor_res = (uint32_t) lv_disp_get_hor_res(_lv_refr_get_disp_refreshing());
- uint32_t mask_buf_size = lv_area_get_size(&draw_area) > (uint32_t) hor_res ? hor_res : lv_area_get_size(&draw_area);
- lv_color_t * src_buf_rgb = lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
- lv_opa_t * mask_buf = lv_mem_buf_get(mask_buf_size);
- blend_dsc.mask_buf = mask_buf;
- blend_dsc.mask_area = &blend_area;
- blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
- blend_dsc.src_buf = src_buf_rgb;
-
- const uint8_t * src_buf_tmp = src_buf;
- src_buf_tmp += src_stride * (draw_area.y1 - coords->y1) * px_size_byte;
- src_buf_tmp += (draw_area.x1 - coords->x1) * px_size_byte;
-
- int32_t x;
- int32_t y;
- for(y = 0; y < draw_area_h; y++) {
- map_px = src_buf_tmp;
- for(x = 0; x < draw_area_w; x++, map_px += px_size_byte, px_i++) {
- lv_opa_t px_opa = map_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
- mask_buf[px_i] = px_opa;
- if(px_opa) {
-#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
- src_buf_rgb[px_i].full = map_px[0];
-#elif LV_COLOR_DEPTH == 16
- src_buf_rgb[px_i].full = map_px[0] + (map_px[1] << 8);
-#elif LV_COLOR_DEPTH == 32
- src_buf_rgb[px_i].full = *((uint32_t *)map_px);
-#endif
- }
-#if LV_COLOR_DEPTH == 32
- src_buf_rgb[px_i].ch.alpha = 0xFF;
-#endif
- }
-
- src_buf_tmp += src_stride * px_size_byte;
- if(px_i + draw_area_w <= mask_buf_size) {
- blend_area.y2 ++;
- }
- else {
- lv_draw_sw_blend(draw_ctx, &blend_dsc);
-
- blend_area.y1 = blend_area.y2 + 1;
- blend_area.y2 = blend_area.y1;
-
- px_i = 0;
- }
- }
- /*Flush the last part*/
- if(blend_area.y1 != blend_area.y2) {
- blend_area.y2--;
- lv_draw_sw_blend(draw_ctx, &blend_dsc);
- }
-
- lv_mem_buf_release(mask_buf);
- lv_mem_buf_release(src_buf_rgb);
+ uint32_t max_buf_size = MAX_BUF_SIZE;
+ uint32_t blend_size = lv_area_get_size(&blend_area);
+ uint32_t buf_h;
+ uint32_t buf_w = blend_w;
+ if(blend_size <= max_buf_size) {
+ buf_h = blend_h;
}
- /*Most complicated case: transform or other mask or chroma keyed*/
else {
- /*Build the image and a mask line-by-line*/
- uint32_t hor_res = (uint32_t) lv_disp_get_hor_res(_lv_refr_get_disp_refreshing());
- uint32_t mask_buf_size = lv_area_get_size(&draw_area) > hor_res ? hor_res : lv_area_get_size(&draw_area);
- lv_color_t * src_buf_rgb = lv_mem_buf_get(mask_buf_size * sizeof(lv_color_t));
- lv_opa_t * mask_buf = lv_mem_buf_get(mask_buf_size);
- blend_dsc.mask_buf = mask_buf;
- blend_dsc.mask_area = &blend_area;
- blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
- blend_dsc.src_buf = src_buf_rgb;
-
- const uint8_t * src_buf_tmp = NULL;
-#if LV_DRAW_COMPLEX
- lv_img_transform_dsc_t trans_dsc;
- lv_memset_00(&trans_dsc, sizeof(lv_img_transform_dsc_t));
- if(transform) {
- trans_dsc.cfg.angle = draw_dsc->angle;
- trans_dsc.cfg.zoom = draw_dsc->zoom;
- trans_dsc.cfg.src = src_buf;
- trans_dsc.cfg.src_w = src_stride;
- trans_dsc.cfg.src_h = lv_area_get_height(coords);
- trans_dsc.cfg.cf = cf;
- trans_dsc.cfg.pivot_x = draw_dsc->pivot.x;
- trans_dsc.cfg.pivot_y = draw_dsc->pivot.y;
- trans_dsc.cfg.color = draw_dsc->recolor;
- trans_dsc.cfg.antialias = draw_dsc->antialias;
-
- _lv_img_buf_transform_init(&trans_dsc);
- }
- else
-#endif
- {
- src_buf_tmp = src_buf;
- src_buf_tmp += src_stride * (draw_area.y1 - coords->y1) * px_size_byte;
- src_buf_tmp += (draw_area.x1 - coords->x1) * px_size_byte;
- }
-
- uint16_t recolor_premult[3] = {0};
- lv_opa_t recolor_opa_inv = 255 - draw_dsc->recolor_opa;
- if(draw_dsc->recolor_opa != 0) {
- lv_color_premult(draw_dsc->recolor, draw_dsc->recolor_opa, recolor_premult);
- }
-
- blend_dsc.mask_res = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
- draw_dsc->zoom != LV_IMG_ZOOM_NONE) ? LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
-
- /*Prepare the `mask_buf`if there are other masks*/
- if(mask_any) {
- lv_memset_ff(mask_buf, mask_buf_size);
- }
-
- int32_t x;
- int32_t y;
-#if LV_DRAW_COMPLEX
- int32_t rot_y = blend_area.y1 - coords->y1;
-#endif
- for(y = 0; y < draw_area_h; y++) {
- map_px = src_buf_tmp;
-#if LV_DRAW_COMPLEX
- uint32_t px_i_start = px_i;
- int32_t rot_x = blend_area.x1 - coords->x1;
-#endif
-
- for(x = 0; x < draw_area_w; x++, px_i++, map_px += px_size_byte) {
-
-#if LV_DRAW_COMPLEX
- if(transform) {
-
- /*Transform*/
- bool ret;
- ret = _lv_img_buf_transform(&trans_dsc, rot_x + x, rot_y + y);
- if(ret == false) {
- mask_buf[px_i] = LV_OPA_TRANSP;
- continue;
- }
- else {
- mask_buf[px_i] = trans_dsc.res.opa;
- c.full = trans_dsc.res.color.full;
- }
- }
- /*No transform*/
- else
-#endif
- {
- if(cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
- lv_opa_t px_opa = map_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
- mask_buf[px_i] = px_opa;
- if(px_opa == 0) {
-#if LV_COLOR_DEPTH == 32
- src_buf_rgb[px_i].full = 0;
-#endif
- continue;
- }
- }
- else {
- mask_buf[px_i] = 0xFF;
- }
-
-#if LV_COLOR_DEPTH == 1
- c.full = map_px[0];
-#elif LV_COLOR_DEPTH == 8
- c.full = map_px[0];
-#elif LV_COLOR_DEPTH == 16
- c.full = map_px[0] + (map_px[1] << 8);
-#elif LV_COLOR_DEPTH == 32
- c.full = *((uint32_t *)map_px);
- c.ch.alpha = 0xFF;
-#endif
- if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
- if(c.full == chroma_keyed_color.full) {
- mask_buf[px_i] = LV_OPA_TRANSP;
-#if LV_COLOR_DEPTH == 32
- src_buf_rgb[px_i].full = 0;
-#endif
- continue;
- }
- }
-
- }
- if(draw_dsc->recolor_opa != 0) {
- c = lv_color_mix_premult(recolor_premult, c, recolor_opa_inv);
- }
-
- src_buf_rgb[px_i].full = c.full;
- }
-#if LV_DRAW_COMPLEX
- /*Apply the masks if any*/
- if(mask_any) {
- lv_draw_mask_res_t mask_res_sub;
- mask_res_sub = lv_draw_mask_apply(mask_buf + px_i_start, blend_area.x1,
- y + draw_area.y1, draw_area_w);
- if(mask_res_sub == LV_DRAW_MASK_RES_TRANSP) {
- lv_memset_00(mask_buf + px_i_start, draw_area_w);
- blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
- }
- else if(mask_res_sub == LV_DRAW_MASK_RES_CHANGED) {
- blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
- }
- }
-#endif
-
- src_buf_tmp += src_stride * px_size_byte;
- if(px_i + draw_area_w < mask_buf_size) {
- blend_area.y2 ++;
- }
- else {
- lv_draw_sw_blend(draw_ctx, &blend_dsc);
-
- blend_area.y1 = blend_area.y2 + 1;
- blend_area.y2 = blend_area.y1;
-
- px_i = 0;
- blend_dsc.mask_res = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
- draw_dsc->zoom != LV_IMG_ZOOM_NONE) ? LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
-
- /*Prepare the `mask_buf`if there are other masks*/
- if(mask_any) {
- lv_memset_ff(mask_buf, mask_buf_size);
- }
- }
- }
-
- /*Flush the last part*/
- if(blend_area.y1 != blend_area.y2) {
- blend_area.y2--;
- lv_draw_sw_blend(draw_ctx, &blend_dsc);
- }
-
- lv_mem_buf_release(mask_buf);
- lv_mem_buf_release(src_buf_rgb);
+ /*Round to full lines*/
+ buf_h = max_buf_size / blend_w;
}
+
+ /*Create buffers and masks*/
+ uint32_t buf_size = buf_w * buf_h;
+
+ lv_color_t * rgb_buf = lv_mem_buf_get(buf_size * sizeof(lv_color_t));
+ lv_opa_t * mask_buf = lv_mem_buf_get(buf_size);
+ blend_dsc.mask_buf = mask_buf;
+ blend_dsc.mask_area = &blend_area;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ blend_dsc.src_buf = rgb_buf;
+ lv_coord_t y_last = blend_area.y2;
+ blend_area.y2 = blend_area.y1 + buf_h - 1;
+
+ lv_draw_mask_res_t mask_res_def = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
+ draw_dsc->zoom != LV_IMG_ZOOM_NONE) ?
+ LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
+ blend_dsc.mask_res = mask_res_def;
+
+ while(blend_area.y1 <= y_last) {
+ /*Apply transformations if any or separate the channels*/
+ lv_area_t transform_area;
+ lv_area_copy(&transform_area, &blend_area);
+ lv_area_move(&transform_area, -coords->x1, -coords->y1);
+ if(transform) {
+ lv_draw_transform(draw_ctx, &transform_area, src_buf, src_w, src_h, src_w,
+ draw_dsc, cf, rgb_buf, mask_buf);
+ }
+ else {
+ convert_cb(&transform_area, src_buf, src_w, src_h, src_w, draw_dsc, cf, rgb_buf, mask_buf);
+ }
+
+ /*Apply recolor*/
+ if(draw_dsc->recolor_opa > LV_OPA_MIN) {
+ uint16_t premult_v[3];
+ lv_opa_t recolor_opa = draw_dsc->recolor_opa;
+ lv_color_t recolor = draw_dsc->recolor;
+ lv_color_premult(recolor, recolor_opa, premult_v);
+ recolor_opa = 255 - recolor_opa;
+ uint32_t i;
+ for(i = 0; i < buf_size; i++) {
+ rgb_buf[i] = lv_color_mix_premult(premult_v, rgb_buf[i], recolor_opa);
+ }
+ }
+#if LV_DRAW_COMPLEX
+ /*Apply the masks if any*/
+ if(mask_any) {
+ lv_coord_t y;
+ lv_opa_t * mask_buf_tmp = mask_buf;
+ for(y = blend_area.y1; y <= blend_area.y2; y++) {
+ lv_draw_mask_res_t mask_res_line;
+ mask_res_line = lv_draw_mask_apply(mask_buf_tmp, blend_area.x1, y, blend_w);
+
+ if(mask_res_line == LV_DRAW_MASK_RES_TRANSP) {
+ lv_memset_00(mask_buf_tmp, blend_w);
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ }
+ else if(mask_res_line == LV_DRAW_MASK_RES_CHANGED) {
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
+ }
+ mask_buf_tmp += blend_w;
+ }
+ }
+#endif
+
+ /*Blend*/
+ lv_draw_sw_blend(draw_ctx, &blend_dsc);
+
+ /*Go the the next lines*/
+ blend_area.y1 = blend_area.y2 + 1;
+ blend_area.y2 = blend_area.y1 + buf_h - 1;
+ if(blend_area.y2 > y_last) blend_area.y2 = y_last;
+ }
+
+ lv_mem_buf_release(mask_buf);
+ lv_mem_buf_release(rgb_buf);
}
}
/**********************
* STATIC FUNCTIONS
**********************/
+
+/* Separate the image channels to RGB and Alpha to match LV_COLOR_DEPTH settings*/
+static void convert_cb(const lv_area_t * dest_area, const void * src_buf, lv_coord_t src_w, lv_coord_t src_h,
+ lv_coord_t src_stride, const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf)
+{
+ LV_UNUSED(draw_dsc);
+ LV_UNUSED(src_h);
+ LV_UNUSED(src_w);
+
+ const uint8_t * src_tmp8 = (const uint8_t *)src_buf;
+ lv_coord_t y;
+ lv_coord_t x;
+
+ if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
+ uint32_t px_cnt = lv_area_get_size(dest_area);
+ lv_memset_ff(abuf, px_cnt);
+
+ src_tmp8 += (src_stride * dest_area->y1 * sizeof(lv_color_t)) + dest_area->x1 * sizeof(lv_color_t);
+ uint32_t dest_w = lv_area_get_width(dest_area);
+ uint32_t dest_w_byte = dest_w * sizeof(lv_color_t);
+
+ lv_coord_t src_stride_byte = src_stride * sizeof(lv_color_t);
+ lv_color_t * cbuf_tmp = cbuf;
+ for(y = dest_area->y1; y <= dest_area->y2; y++) {
+ lv_memcpy(cbuf_tmp, src_tmp8, dest_w_byte);
+ src_tmp8 += src_stride_byte;
+ cbuf_tmp += dest_w;
+ }
+
+ /*Make "holes" for with Chroma keying*/
+ if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
+ uint32_t i;
+ lv_color_t chk = LV_COLOR_CHROMA_KEY;
+#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
+ uint8_t * cbuf_uint = (uint8_t *)cbuf;
+ uint8_t chk_v = chk.full;
+#elif LV_COLOR_DEPTH == 16
+ uint16_t * cbuf_uint = (uint16_t *)cbuf;
+ uint16_t chk_v = chk.full;
+#elif LV_COLOR_DEPTH == 32
+ uint32_t * cbuf_uint = (uint32_t *)cbuf;
+ uint32_t chk_v = chk.full;
+#endif
+ for(i = 0; i < px_cnt; i++) {
+ if(chk_v == cbuf_uint[i]) abuf[i] = 0x00;
+ }
+ }
+ }
+ else if(cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
+ src_tmp8 += (src_stride * dest_area->y1 * LV_IMG_PX_SIZE_ALPHA_BYTE) + dest_area->x1 * LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ lv_coord_t src_new_line_step_px = (src_stride - lv_area_get_width(dest_area));
+ lv_coord_t src_new_line_step_byte = src_new_line_step_px * LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ for(y = 0; y < dest_h; y++) {
+ for(x = 0; x < dest_w; x++) {
+ abuf[x] = src_tmp8[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
+ cbuf[x].full = *src_tmp8;
+#elif LV_COLOR_DEPTH == 16
+ cbuf[x].full = *src_tmp8 + ((*(src_tmp8 + 1)) << 8);
+#elif LV_COLOR_DEPTH == 32
+ cbuf[x] = *((lv_color_t *) src_tmp8);
+ cbuf[x].ch.alpha = 0xff;
+#endif
+ src_tmp8 += LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+ }
+ cbuf += dest_w;
+ abuf += dest_w;
+ src_tmp8 += src_new_line_step_byte;
+ }
+ }
+ else if(cf == LV_IMG_CF_RGB565A8) {
+ src_tmp8 += (src_stride * dest_area->y1 * sizeof(lv_color_t)) + dest_area->x1 * sizeof(lv_color_t);
+
+ lv_coord_t src_stride_byte = src_stride * sizeof(lv_color_t);
+
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ for(y = 0; y < dest_h; y++) {
+ lv_memcpy(cbuf, src_tmp8, dest_w * sizeof(lv_color_t));
+ cbuf += dest_w;
+ src_tmp8 += src_stride_byte;
+ }
+
+ src_tmp8 = (const uint8_t *)src_buf;
+ src_tmp8 += sizeof(lv_color_t) * src_w * src_h;
+ src_tmp8 += src_stride * dest_area->y1 + dest_area->x1;
+ for(y = 0; y < dest_h; y++) {
+ lv_memcpy(abuf, src_tmp8, dest_w);
+ abuf += dest_w;
+ src_tmp8 += src_stride;
+ }
+ }
+}
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_layer.c b/lib/lvgl/src/draw/sw/lv_draw_sw_layer.c
new file mode 100644
index 0000000..d6a9bfb
--- /dev/null
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_layer.c
@@ -0,0 +1,148 @@
+/**
+ * @file lv_draw_sw_layer.h
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_draw_sw.h"
+#include "../../hal/lv_hal_disp.h"
+#include "../../misc/lv_area.h"
+#include "../../core/lv_refr.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * GLOBAL VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+struct _lv_draw_layer_ctx_t * lv_draw_sw_layer_create(struct _lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags)
+{
+ if(LV_COLOR_SCREEN_TRANSP == 0 && (flags & LV_DRAW_LAYER_FLAG_HAS_ALPHA)) {
+ LV_LOG_WARN("Rendering this widget needs LV_COLOR_SCREEN_TRANSP 1");
+ return NULL;
+ }
+
+ lv_draw_sw_layer_ctx_t * layer_sw_ctx = (lv_draw_sw_layer_ctx_t *) layer_ctx;
+ uint32_t px_size = flags & LV_DRAW_LAYER_FLAG_HAS_ALPHA ? LV_IMG_PX_SIZE_ALPHA_BYTE : sizeof(lv_color_t);
+ if(flags & LV_DRAW_LAYER_FLAG_CAN_SUBDIVIDE) {
+ layer_sw_ctx->buf_size_bytes = LV_LAYER_SIMPLE_BUF_SIZE;
+ uint32_t full_size = lv_area_get_size(&layer_sw_ctx->base_draw.area_full) * px_size;
+ if(layer_sw_ctx->buf_size_bytes > full_size) layer_sw_ctx->buf_size_bytes = full_size;
+ layer_sw_ctx->base_draw.buf = lv_mem_alloc(layer_sw_ctx->buf_size_bytes);
+ if(layer_sw_ctx->base_draw.buf == NULL) {
+ LV_LOG_WARN("Cannot allocate %"LV_PRIu32" bytes for layer buffer. Allocating %"LV_PRIu32" bytes instead. (Reduced performance)",
+ (uint32_t)layer_sw_ctx->buf_size_bytes, (uint32_t)LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE * px_size);
+ layer_sw_ctx->buf_size_bytes = LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE;
+ layer_sw_ctx->base_draw.buf = lv_mem_alloc(layer_sw_ctx->buf_size_bytes);
+ if(layer_sw_ctx->base_draw.buf == NULL) {
+ return NULL;
+ }
+ }
+ layer_sw_ctx->base_draw.area_act = layer_sw_ctx->base_draw.area_full;
+ layer_sw_ctx->base_draw.area_act.y2 = layer_sw_ctx->base_draw.area_full.y1;
+ lv_coord_t w = lv_area_get_width(&layer_sw_ctx->base_draw.area_act);
+ layer_sw_ctx->base_draw.max_row_with_alpha = layer_sw_ctx->buf_size_bytes / w / LV_IMG_PX_SIZE_ALPHA_BYTE;
+ layer_sw_ctx->base_draw.max_row_with_no_alpha = layer_sw_ctx->buf_size_bytes / w / sizeof(lv_color_t);
+ }
+ else {
+ layer_sw_ctx->base_draw.area_act = layer_sw_ctx->base_draw.area_full;
+ layer_sw_ctx->buf_size_bytes = lv_area_get_size(&layer_sw_ctx->base_draw.area_full) * px_size;
+ layer_sw_ctx->base_draw.buf = lv_mem_alloc(layer_sw_ctx->buf_size_bytes);
+ lv_memset_00(layer_sw_ctx->base_draw.buf, layer_sw_ctx->buf_size_bytes);
+ layer_sw_ctx->has_alpha = flags & LV_DRAW_LAYER_FLAG_HAS_ALPHA ? 1 : 0;
+ if(layer_sw_ctx->base_draw.buf == NULL) {
+ return NULL;
+ }
+
+ draw_ctx->buf = layer_sw_ctx->base_draw.buf;
+ draw_ctx->buf_area = &layer_sw_ctx->base_draw.area_act;
+ draw_ctx->clip_area = &layer_sw_ctx->base_draw.area_act;
+
+ lv_disp_t * disp_refr = _lv_refr_get_disp_refreshing();
+ disp_refr->driver->screen_transp = flags & LV_DRAW_LAYER_FLAG_HAS_ALPHA ? 1 : 0;
+ }
+
+ return layer_ctx;
+}
+
+void lv_draw_sw_layer_adjust(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ lv_draw_layer_flags_t flags)
+{
+
+ lv_draw_sw_layer_ctx_t * layer_sw_ctx = (lv_draw_sw_layer_ctx_t *) layer_ctx;
+ lv_disp_t * disp_refr = _lv_refr_get_disp_refreshing();
+ if(flags & LV_DRAW_LAYER_FLAG_HAS_ALPHA) {
+ lv_memset_00(layer_ctx->buf, layer_sw_ctx->buf_size_bytes);
+ layer_sw_ctx->has_alpha = 1;
+ disp_refr->driver->screen_transp = 1;
+ }
+ else {
+ layer_sw_ctx->has_alpha = 0;
+ disp_refr->driver->screen_transp = 0;
+ }
+
+ draw_ctx->buf = layer_ctx->buf;
+ draw_ctx->buf_area = &layer_ctx->area_act;
+ draw_ctx->clip_area = &layer_ctx->area_act;
+}
+
+void lv_draw_sw_layer_blend(struct _lv_draw_ctx_t * draw_ctx, struct _lv_draw_layer_ctx_t * layer_ctx,
+ const lv_draw_img_dsc_t * draw_dsc)
+{
+ lv_draw_sw_layer_ctx_t * layer_sw_ctx = (lv_draw_sw_layer_ctx_t *) layer_ctx;
+
+ lv_img_dsc_t img;
+ img.data = draw_ctx->buf;
+ img.header.always_zero = 0;
+ img.header.w = lv_area_get_width(draw_ctx->buf_area);
+ img.header.h = lv_area_get_height(draw_ctx->buf_area);
+ img.header.cf = layer_sw_ctx->has_alpha ? LV_IMG_CF_TRUE_COLOR_ALPHA : LV_IMG_CF_TRUE_COLOR;
+
+ /*Restore the original draw_ctx*/
+ draw_ctx->buf = layer_ctx->original.buf;
+ draw_ctx->buf_area = layer_ctx->original.buf_area;
+ draw_ctx->clip_area = layer_ctx->original.clip_area;
+ lv_disp_t * disp_refr = _lv_refr_get_disp_refreshing();
+ disp_refr->driver->screen_transp = layer_ctx->original.screen_transp;
+
+ /*Blend the layer*/
+ lv_draw_img(draw_ctx, draw_dsc, &layer_ctx->area_act, &img);
+ lv_draw_wait_for_finish(draw_ctx);
+ lv_img_cache_invalidate_src(&img);
+}
+
+void lv_draw_sw_layer_destroy(lv_draw_ctx_t * draw_ctx, lv_draw_layer_ctx_t * layer_ctx)
+{
+ LV_UNUSED(draw_ctx);
+
+ lv_mem_free(layer_ctx->buf);
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_letter.c b/lib/lvgl/src/draw/sw/lv_draw_sw_letter.c
index 6dd1976..0faab8d 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_letter.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_letter.c
@@ -27,9 +27,8 @@
* STATIC PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
- const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p);
-
+static void /* LV_ATTRIBUTE_FAST_MEM */ draw_letter_normal(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
+ const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p);
#if LV_DRAW_COMPLEX && LV_USE_FONT_SUBPX
static void draw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos,
@@ -103,8 +102,9 @@ void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc
if(letter >= 0x20 &&
letter != 0xf8ff && /*LV_SYMBOL_DUMMY*/
letter != 0x200c) { /*ZERO WIDTH NON-JOINER*/
- LV_LOG_WARN("lv_draw_letter: glyph dsc. not found for U+%" PRIX32, letter);
+ LV_LOG_WARN("lv_draw_letter: glyph dsc. not found for U+%" LV_PRIX32, letter);
+#if LV_USE_FONT_PLACEHOLDER
/* draw placeholder */
lv_area_t glyph_coords;
lv_draw_rect_dsc_t glyph_dsc;
@@ -119,6 +119,7 @@ void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc
glyph_dsc.border_color = dsc->color;
glyph_dsc.border_width = 1;
draw_ctx->draw_rect(draw_ctx, &glyph_dsc, &glyph_coords);
+#endif
}
return;
}
@@ -160,7 +161,7 @@ void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc
* STATIC FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
+static void LV_ATTRIBUTE_FAST_MEM draw_letter_normal(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p)
{
@@ -487,8 +488,8 @@ static void draw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_
#endif
#if LV_FONT_SUBPX_BGR
- res_color.ch.blue = (uint32_t)((uint32_t)txt_rgb[0] * font_rgb[0] + (bg_rgb[0] * (255 - font_rgb[0]))) >> 8;
- res_color.ch.red = (uint32_t)((uint32_t)txt_rgb[2] * font_rgb[2] + (bg_rgb[2] * (255 - font_rgb[2]))) >> 8;
+ res_color.ch.red = (uint32_t)((uint16_t)txt_rgb[0] * font_rgb[2] + (bg_rgb[0] * (255 - font_rgb[2]))) >> 8;
+ res_color.ch.blue = (uint32_t)((uint16_t)txt_rgb[2] * font_rgb[0] + (bg_rgb[2] * (255 - font_rgb[0]))) >> 8;
#else
res_color.ch.red = (uint32_t)((uint16_t)txt_rgb[0] * font_rgb[0] + (bg_rgb[0] * (255 - font_rgb[0]))) >> 8;
res_color.ch.blue = (uint32_t)((uint16_t)txt_rgb[2] * font_rgb[2] + (bg_rgb[2] * (255 - font_rgb[2]))) >> 8;
@@ -540,6 +541,7 @@ static void draw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_
map_area.y2 ++;
}
else {
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
lv_draw_sw_blend(draw_ctx, &blend_dsc);
map_area.y1 = map_area.y2 + 1;
@@ -559,6 +561,7 @@ static void draw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_
/*Flush the last part*/
if(map_area.y1 != map_area.y2) {
map_area.y2--;
+ blend_dsc.mask_res = LV_DRAW_MASK_RES_CHANGED;
lv_draw_sw_blend(draw_ctx, &blend_dsc);
}
@@ -566,4 +569,3 @@ static void draw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_
lv_mem_buf_release(color_buf);
}
#endif /*LV_DRAW_COMPLEX && LV_USE_FONT_SUBPX*/
-
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_line.c b/lib/lvgl/src/draw/sw/lv_draw_sw_line.c
index 73833c1..b323816 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_line.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_line.c
@@ -23,12 +23,12 @@
* STATIC PROTOTYPES
**********************/
-LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
- const lv_point_t * point1, const lv_point_t * point2);
-LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
- const lv_point_t * point1, const lv_point_t * point2);
-LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
- const lv_point_t * point1, const lv_point_t * point2);
+static void /* LV_ATTRIBUTE_FAST_MEM */ draw_line_skew(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+ const lv_point_t * point1, const lv_point_t * point2);
+static void /* LV_ATTRIBUTE_FAST_MEM */ draw_line_hor(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+ const lv_point_t * point1, const lv_point_t * point2);
+static void /* LV_ATTRIBUTE_FAST_MEM */ draw_line_ver(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+ const lv_point_t * point1, const lv_point_t * point2);
/**********************
* STATIC VARIABLES
@@ -49,7 +49,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(struct _lv_draw_ctx_t * draw_ctx
* @param clip the line will be drawn only in this area
* @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable
*/
-LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_line(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
const lv_point_t * point1, const lv_point_t * point2)
{
if(dsc->width == 0) return;
@@ -108,8 +108,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_line(struct _lv_draw_ctx_t * draw_ctx, con
* STATIC FUNCTIONS
**********************/
-
-LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+static void LV_ATTRIBUTE_FAST_MEM draw_line_hor(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
const lv_point_t * point1, const lv_point_t * point2)
{
int32_t w = dsc->width - 1;
@@ -195,7 +194,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_hor(struct _lv_draw_ctx_t * draw_ctx
#endif /*LV_DRAW_COMPLEX*/
}
-LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+static void LV_ATTRIBUTE_FAST_MEM draw_line_ver(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
const lv_point_t * point1, const lv_point_t * point2)
{
int32_t w = dsc->width - 1;
@@ -275,7 +274,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_ver(struct _lv_draw_ctx_t * draw_ctx
#endif /*LV_DRAW_COMPLEX*/
}
-LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
+static void LV_ATTRIBUTE_FAST_MEM draw_line_skew(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_line_dsc_t * dsc,
const lv_point_t * point1, const lv_point_t * point2)
{
#if LV_DRAW_COMPLEX
@@ -440,4 +439,3 @@ LV_ATTRIBUTE_FAST_MEM static void draw_line_skew(struct _lv_draw_ctx_t * draw_ct
LV_LOG_WARN("Can't draw skewed line with LV_DRAW_COMPLEX == 0");
#endif /*LV_DRAW_COMPLEX*/
}
-
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_rect.c b/lib/lvgl/src/draw/sw/lv_draw_sw_rect.c
index d94431b..d201236 100644
--- a/lib/lvgl/src/draw/sw/lv_draw_sw_rect.c
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_rect.c
@@ -20,7 +20,6 @@
#define SHADOW_ENHANCE 1
#define SPLIT_LIMIT 50
-
/**********************
* TYPEDEFS
**********************/
@@ -35,11 +34,11 @@ static void draw_border(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc
static void draw_outline(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords);
#if LV_DRAW_COMPLEX
-LV_ATTRIBUTE_FAST_MEM static void draw_shadow(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
- const lv_area_t * coords);
-LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, lv_coord_t s,
- lv_coord_t r);
-LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t sw, uint16_t * sh_ups_buf);
+static void /* LV_ATTRIBUTE_FAST_MEM */ draw_shadow(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
+ const lv_area_t * coords);
+static void /* LV_ATTRIBUTE_FAST_MEM */ shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf,
+ lv_coord_t s, lv_coord_t r);
+static void /* LV_ATTRIBUTE_FAST_MEM */ shadow_blur_corner(lv_coord_t size, lv_coord_t sw, uint16_t * sh_ups_buf);
#endif
void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area, const lv_area_t * inner_area,
@@ -48,7 +47,6 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
static void draw_border_simple(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area, const lv_area_t * inner_area,
lv_color_t color, lv_opa_t opa);
-
/**********************
* STATIC VARIABLES
**********************/
@@ -92,7 +90,6 @@ void lv_draw_sw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, con
draw_bg_img(draw_ctx, dsc, coords);
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -128,7 +125,6 @@ static void draw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, co
if(!mask_any && dsc->radius == 0 && (grad_dir == LV_GRAD_DIR_NONE)) {
blend_dsc.blend_area = &bg_coords;
blend_dsc.opa = dsc->bg_opa;
-
lv_draw_sw_blend(draw_ctx, &blend_dsc);
return;
}
@@ -167,7 +163,6 @@ static void draw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, co
blend_dsc.mask_area = &blend_area;
blend_dsc.opa = LV_OPA_COVER;
-
/*Get gradient if appropriate*/
lv_grad_t * grad = lv_gradient_get(&dsc->bg_grad, coords_bg_w, coords_bg_h);
if(grad && grad_dir == LV_GRAD_DIR_HOR) {
@@ -239,7 +234,6 @@ static void draw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, co
goto bg_clean_up;
}
-
/* Draw the top of the rectangle line by line and mirror it to the bottom. */
for(h = 0; h < rout; h++) {
lv_coord_t top_y = bg_coords.y1 + h;
@@ -314,7 +308,6 @@ static void draw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, co
}
}
-
bg_clean_up:
if(mask_buf) lv_mem_buf_release(mask_buf);
if(mask_rout_id != LV_MASK_ID_INV) {
@@ -333,6 +326,14 @@ static void draw_bg_img(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc
if(dsc->bg_img_src == NULL) return;
if(dsc->bg_img_opa <= LV_OPA_MIN) return;
+ lv_area_t clip_area;
+ if(!_lv_area_intersect(&clip_area, coords, draw_ctx->clip_area)) {
+ return;
+ }
+
+ const lv_area_t * clip_area_ori = draw_ctx->clip_area;
+ draw_ctx->clip_area = &clip_area;
+
lv_img_src_t src_type = lv_img_src_get_type(dsc->bg_img_src);
if(src_type == LV_IMG_SRC_SYMBOL) {
lv_point_t size;
@@ -353,43 +354,45 @@ static void draw_bg_img(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc
else {
lv_img_header_t header;
lv_res_t res = lv_img_decoder_get_info(dsc->bg_img_src, &header);
- if(res != LV_RES_OK) {
- LV_LOG_WARN("Couldn't read the background image");
- return;
- }
+ if(res == LV_RES_OK) {
+ lv_draw_img_dsc_t img_dsc;
+ lv_draw_img_dsc_init(&img_dsc);
+ img_dsc.blend_mode = dsc->blend_mode;
+ img_dsc.recolor = dsc->bg_img_recolor;
+ img_dsc.recolor_opa = dsc->bg_img_recolor_opa;
+ img_dsc.opa = dsc->bg_img_opa;
- lv_draw_img_dsc_t img_dsc;
- lv_draw_img_dsc_init(&img_dsc);
- img_dsc.blend_mode = dsc->blend_mode;
- img_dsc.recolor = dsc->bg_img_recolor;
- img_dsc.recolor_opa = dsc->bg_img_recolor_opa;
- img_dsc.opa = dsc->bg_img_opa;
-
- /*Center align*/
- if(dsc->bg_img_tiled == false) {
- lv_area_t area;
- area.x1 = coords->x1 + lv_area_get_width(coords) / 2 - header.w / 2;
- area.y1 = coords->y1 + lv_area_get_height(coords) / 2 - header.h / 2;
- area.x2 = area.x1 + header.w - 1;
- area.y2 = area.y1 + header.h - 1;
-
- lv_draw_img(draw_ctx, &img_dsc, &area, dsc->bg_img_src);
- }
- else {
- lv_area_t area;
- area.y1 = coords->y1;
- area.y2 = area.y1 + header.h - 1;
-
- for(; area.y1 <= coords->y2; area.y1 += header.h, area.y2 += header.h) {
-
- area.x1 = coords->x1;
+ /*Center align*/
+ if(dsc->bg_img_tiled == false) {
+ lv_area_t area;
+ area.x1 = coords->x1 + lv_area_get_width(coords) / 2 - header.w / 2;
+ area.y1 = coords->y1 + lv_area_get_height(coords) / 2 - header.h / 2;
area.x2 = area.x1 + header.w - 1;
- for(; area.x1 <= coords->x2; area.x1 += header.w, area.x2 += header.w) {
- lv_draw_img(draw_ctx, &img_dsc, &area, dsc->bg_img_src);
+ area.y2 = area.y1 + header.h - 1;
+
+ lv_draw_img(draw_ctx, &img_dsc, &area, dsc->bg_img_src);
+ }
+ else {
+ lv_area_t area;
+ area.y1 = coords->y1;
+ area.y2 = area.y1 + header.h - 1;
+
+ for(; area.y1 <= coords->y2; area.y1 += header.h, area.y2 += header.h) {
+
+ area.x1 = coords->x1;
+ area.x2 = area.x1 + header.w - 1;
+ for(; area.x1 <= coords->x2; area.x1 += header.w, area.x2 += header.w) {
+ lv_draw_img(draw_ctx, &img_dsc, &area, dsc->bg_img_src);
+ }
}
}
}
+ else {
+ LV_LOG_WARN("Couldn't read the background image");
+ }
}
+
+ draw_ctx->clip_area = clip_area_ori;
}
static void draw_border(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords)
@@ -421,7 +424,7 @@ static void draw_border(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc
}
#if LV_DRAW_COMPLEX
-LV_ATTRIBUTE_FAST_MEM static void draw_shadow(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
+static void LV_ATTRIBUTE_FAST_MEM draw_shadow(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
const lv_area_t * coords)
{
/*Check whether the shadow is visible*/
@@ -470,7 +473,6 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(lv_draw_ctx_t * draw_ctx, const lv
short_side = LV_MIN(lv_area_get_width(&core_area), lv_area_get_height(&core_area));
if(r_sh > short_side >> 1) r_sh = short_side >> 1;
-
/*Get how many pixels are affected by the blur on the corners*/
int32_t corner_size = dsc->shadow_width + r_sh;
@@ -672,7 +674,6 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(lv_draw_ctx_t * draw_ctx, const lv
blend_area.y2 = shadow_area.y2;
blend_area.y1 = LV_MAX(blend_area.y1, h_half + 1);
-
if(_lv_area_intersect(&clip_area_sub, &blend_area, draw_ctx->clip_area) &&
!_lv_area_is_in(&clip_area_sub, &bg_area, r_bg)) {
lv_coord_t w = lv_area_get_width(&clip_area_sub);
@@ -941,8 +942,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_shadow(lv_draw_ctx_t * draw_ctx, const lv
* @param sw shadow width
* @param r radius
*/
-LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, lv_coord_t sw,
- lv_coord_t r)
+static void LV_ATTRIBUTE_FAST_MEM shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf,
+ lv_coord_t sw, lv_coord_t r)
{
int32_t sw_ori = sw;
int32_t size = sw_ori + r;
@@ -1028,7 +1029,7 @@ LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coord
}
-LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t sw, uint16_t * sh_ups_buf)
+static void LV_ATTRIBUTE_FAST_MEM shadow_blur_corner(lv_coord_t size, lv_coord_t sw, uint16_t * sh_ups_buf)
{
int32_t s_left = sw >> 1;
int32_t s_right = (sw >> 1);
@@ -1130,7 +1131,6 @@ static void draw_outline(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * ds
area_outer.y1 -= dsc->outline_width;
area_outer.y2 += dsc->outline_width;
-
int32_t inner_w = lv_area_get_width(&area_inner);
int32_t inner_h = lv_area_get_height(&area_inner);
int32_t rin = dsc->radius;
@@ -1150,12 +1150,13 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
bool mask_any = lv_draw_mask_is_any(outer_area);
+#if LV_DRAW_COMPLEX
+
if(!mask_any && rout == 0 && rin == 0) {
draw_border_simple(draw_ctx, outer_area, inner_area, color, opa);
return;
}
-#if LV_DRAW_COMPLEX
/*Get clipped draw area which is the real draw area.
*It is always the same or inside `coords`*/
lv_area_t draw_area;
@@ -1166,7 +1167,6 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
lv_memset_00(&blend_dsc, sizeof(blend_dsc));
blend_dsc.mask_buf = lv_mem_buf_get(draw_area_w);;
-
/*Create mask for the outer area*/
int16_t mask_rout_id = LV_MASK_ID_INV;
lv_draw_mask_radius_param_t mask_rout_param;
@@ -1272,12 +1272,12 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
/*Draw the corners*/
lv_coord_t blend_w;
- /*Left and right corner together is they close to eachother*/
+ /*Left and right corner together if they are close to each other*/
if(!split_hor) {
/*Calculate the top corner and mirror it to the bottom*/
blend_area.x1 = draw_area.x1;
blend_area.x2 = draw_area.x2;
- lv_coord_t max_h = LV_MAX(rout, outer_area->y1 - inner_area->y1);
+ lv_coord_t max_h = LV_MAX(rout, inner_area->y1 - outer_area->y1);
for(h = 0; h < max_h; h++) {
lv_coord_t top_y = outer_area->y1 + h;
lv_coord_t bottom_y = outer_area->y2 - h;
@@ -1366,6 +1366,13 @@ void draw_border_generic(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area,
#else /*LV_DRAW_COMPLEX*/
LV_UNUSED(blend_mode);
+ LV_UNUSED(rout);
+ LV_UNUSED(rin);
+ if(!mask_any) {
+ draw_border_simple(draw_ctx, outer_area, inner_area, color, opa);
+ return;
+ }
+
#endif /*LV_DRAW_COMPLEX*/
}
static void draw_border_simple(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer_area, const lv_area_t * inner_area,
@@ -1383,7 +1390,6 @@ static void draw_border_simple(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer
bool left_side = outer_area->x1 <= inner_area->x1 ? true : false;
bool right_side = outer_area->x2 >= inner_area->x2 ? true : false;
-
/*Top*/
a.x1 = outer_area->x1;
a.x2 = outer_area->x2;
@@ -1416,4 +1422,3 @@ static void draw_border_simple(lv_draw_ctx_t * draw_ctx, const lv_area_t * outer
lv_draw_sw_blend(draw_ctx, &blend_dsc);
}
}
-
diff --git a/lib/lvgl/src/draw/sw/lv_draw_sw_transform.c b/lib/lvgl/src/draw/sw/lv_draw_sw_transform.c
new file mode 100644
index 0000000..06d7e8c
--- /dev/null
+++ b/lib/lvgl/src/draw/sw/lv_draw_sw_transform.c
@@ -0,0 +1,493 @@
+/**
+ * @file lv_draw_sw_tranform.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_draw_sw.h"
+#include "../../misc/lv_assert.h"
+#include "../../misc/lv_area.h"
+#include "../../core/lv_refr.h"
+
+#if LV_DRAW_COMPLEX
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef struct {
+ int32_t x_in;
+ int32_t y_in;
+ int32_t x_out;
+ int32_t y_out;
+ int32_t sinma;
+ int32_t cosma;
+ int32_t zoom;
+ int32_t angle;
+ int32_t pivot_x_256;
+ int32_t pivot_y_256;
+ lv_point_t pivot;
+} point_transform_dsc_t;
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+/**
+ * Transform a point with 1/256 precision (the output coordinates are upscaled by 256)
+ * @param t pointer to n initialized `point_transform_dsc_t` structure
+ * @param xin X coordinate to rotate
+ * @param yin Y coordinate to rotate
+ * @param xout upscaled, transformed X
+ * @param yout upscaled, transformed Y
+ */
+static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout,
+ int32_t * yout);
+
+static void argb_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf);
+
+static void rgb_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf, lv_img_cf_t cf);
+
+#if LV_COLOR_DEPTH == 16
+static void rgb565a8_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf);
+#endif
+
+static void argb_and_rgb_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf, lv_img_cf_t cf);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_draw_sw_transform(lv_draw_ctx_t * draw_ctx, const lv_area_t * dest_area, const void * src_buf,
+ lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ const lv_draw_img_dsc_t * draw_dsc, lv_img_cf_t cf, lv_color_t * cbuf, lv_opa_t * abuf)
+{
+ LV_UNUSED(draw_ctx);
+
+ point_transform_dsc_t tr_dsc;
+ tr_dsc.angle = -draw_dsc->angle;
+ tr_dsc.zoom = (256 * 256) / draw_dsc->zoom;
+ tr_dsc.pivot = draw_dsc->pivot;
+
+ int32_t angle_low = tr_dsc.angle / 10;
+ int32_t angle_high = angle_low + 1;
+ int32_t angle_rem = tr_dsc.angle - (angle_low * 10);
+
+ int32_t s1 = lv_trigo_sin(angle_low);
+ int32_t s2 = lv_trigo_sin(angle_high);
+
+ int32_t c1 = lv_trigo_sin(angle_low + 90);
+ int32_t c2 = lv_trigo_sin(angle_high + 90);
+
+ tr_dsc.sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10;
+ tr_dsc.cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10;
+ tr_dsc.sinma = tr_dsc.sinma >> (LV_TRIGO_SHIFT - 10);
+ tr_dsc.cosma = tr_dsc.cosma >> (LV_TRIGO_SHIFT - 10);
+ tr_dsc.pivot_x_256 = tr_dsc.pivot.x * 256;
+ tr_dsc.pivot_y_256 = tr_dsc.pivot.y * 256;
+
+ lv_coord_t dest_w = lv_area_get_width(dest_area);
+ lv_coord_t dest_h = lv_area_get_height(dest_area);
+ lv_coord_t y;
+ for(y = 0; y < dest_h; y++) {
+ int32_t xs1_ups, ys1_ups, xs2_ups, ys2_ups;
+
+ transform_point_upscaled(&tr_dsc, dest_area->x1, dest_area->y1 + y, &xs1_ups, &ys1_ups);
+ transform_point_upscaled(&tr_dsc, dest_area->x2, dest_area->y1 + y, &xs2_ups, &ys2_ups);
+
+ int32_t xs_diff = xs2_ups - xs1_ups;
+ int32_t ys_diff = ys2_ups - ys1_ups;
+ int32_t xs_step_256 = 0;
+ int32_t ys_step_256 = 0;
+ if(dest_w > 1) {
+ xs_step_256 = (256 * xs_diff) / (dest_w - 1);
+ ys_step_256 = (256 * ys_diff) / (dest_w - 1);
+ }
+ int32_t xs_ups = xs1_ups + 0x80;
+ int32_t ys_ups = ys1_ups + 0x80;
+
+ if(draw_dsc->antialias == 0) {
+ switch(cf) {
+ case LV_IMG_CF_TRUE_COLOR_ALPHA:
+ argb_no_aa(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, cbuf, abuf);
+ break;
+ case LV_IMG_CF_TRUE_COLOR:
+ case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
+ rgb_no_aa(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, cbuf, abuf, cf);
+ break;
+
+#if LV_COLOR_DEPTH == 16
+ case LV_IMG_CF_RGB565A8:
+ rgb565a8_no_aa(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, cbuf, abuf);
+ break;
+#endif
+ default:
+ break;
+ }
+ }
+ else {
+ argb_and_rgb_aa(src_buf, src_w, src_h, src_stride, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, cbuf, abuf, cf);
+ }
+
+ cbuf += dest_w;
+ abuf += dest_w;
+ }
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void rgb_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf, lv_img_cf_t cf)
+{
+ int32_t xs_ups_start = xs_ups;
+ int32_t ys_ups_start = ys_ups;
+ lv_disp_t * d = _lv_refr_get_disp_refreshing();
+ lv_color_t ck = d->driver->color_chroma_key;
+
+ lv_memset_ff(abuf, x_end);
+
+ lv_coord_t x;
+ for(x = 0; x < x_end; x++) {
+ xs_ups = xs_ups_start + ((xs_step * x) >> 8);
+ ys_ups = ys_ups_start + ((ys_step * x) >> 8);
+
+ int32_t xs_int = xs_ups >> 8;
+ int32_t ys_int = ys_ups >> 8;
+ if(xs_int < 0 || xs_int >= src_w || ys_int < 0 || ys_int >= src_h) {
+ abuf[x] = 0x00;
+ }
+ else {
+
+#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
+ const uint8_t * src_tmp = src;
+ src_tmp += ys_int * src_stride + xs_int;
+ cbuf[x].full = src_tmp[0];
+#elif LV_COLOR_DEPTH == 16
+ const lv_color_t * src_tmp = (const lv_color_t *)src;
+ src_tmp += ys_int * src_stride + xs_int;
+ cbuf[x] = *src_tmp;
+#elif LV_COLOR_DEPTH == 32
+ const uint8_t * src_tmp = src;
+ src_tmp += (ys_int * src_stride * sizeof(lv_color_t)) + xs_int * sizeof(lv_color_t);
+ cbuf[x].full = *((uint32_t *)src_tmp);
+#endif
+ }
+ if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED && cbuf[x].full == ck.full) {
+ abuf[x] = 0x00;
+ }
+ }
+}
+
+static void argb_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf)
+{
+ int32_t xs_ups_start = xs_ups;
+ int32_t ys_ups_start = ys_ups;
+
+ lv_coord_t x;
+ for(x = 0; x < x_end; x++) {
+ xs_ups = xs_ups_start + ((xs_step * x) >> 8);
+ ys_ups = ys_ups_start + ((ys_step * x) >> 8);
+
+ int32_t xs_int = xs_ups >> 8;
+ int32_t ys_int = ys_ups >> 8;
+ if(xs_int < 0 || xs_int >= src_w || ys_int < 0 || ys_int >= src_h) {
+ abuf[x] = 0;
+ }
+ else {
+ const uint8_t * src_tmp = src;
+ src_tmp += (ys_int * src_stride * LV_IMG_PX_SIZE_ALPHA_BYTE) + xs_int * LV_IMG_PX_SIZE_ALPHA_BYTE;
+
+#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
+ cbuf[x].full = src_tmp[0];
+#elif LV_COLOR_DEPTH == 16
+ cbuf[x].full = src_tmp[0] + (src_tmp[1] << 8);
+#elif LV_COLOR_DEPTH == 32
+ cbuf[x].full = *((uint32_t *)src_tmp);
+#endif
+ abuf[x] = src_tmp[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+ }
+ }
+}
+
+#if LV_COLOR_DEPTH == 16
+static void rgb565a8_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf)
+{
+ int32_t xs_ups_start = xs_ups;
+ int32_t ys_ups_start = ys_ups;
+
+ lv_coord_t x;
+ for(x = 0; x < x_end; x++) {
+ xs_ups = xs_ups_start + ((xs_step * x) >> 8);
+ ys_ups = ys_ups_start + ((ys_step * x) >> 8);
+
+ int32_t xs_int = xs_ups >> 8;
+ int32_t ys_int = ys_ups >> 8;
+ if(xs_int < 0 || xs_int >= src_w || ys_int < 0 || ys_int >= src_h) {
+ abuf[x] = 0;
+ }
+ else {
+ const lv_color_t * src_tmp = (const lv_color_t *)src;
+ src_tmp += ys_int * src_stride + xs_int;
+ cbuf[x] = *src_tmp;
+
+ const lv_opa_t * a_tmp = src + src_stride * src_h * sizeof(lv_color_t);
+ a_tmp += ys_int * src_stride + xs_int;
+ abuf[x] = *a_tmp;
+ }
+ }
+}
+#endif
+
+static void argb_and_rgb_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
+ int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
+ int32_t x_end, lv_color_t * cbuf, uint8_t * abuf, lv_img_cf_t cf)
+{
+ int32_t xs_ups_start = xs_ups;
+ int32_t ys_ups_start = ys_ups;
+ bool has_alpha;
+ int32_t px_size;
+ lv_color_t ck = _LV_COLOR_ZERO_INITIALIZER;
+ switch(cf) {
+ case LV_IMG_CF_TRUE_COLOR:
+ has_alpha = false;
+ px_size = sizeof(lv_color_t);
+ break;
+ case LV_IMG_CF_TRUE_COLOR_ALPHA:
+ has_alpha = true;
+ px_size = LV_IMG_PX_SIZE_ALPHA_BYTE;
+ break;
+ case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: {
+ has_alpha = true;
+ px_size = sizeof(lv_color_t);
+ lv_disp_t * d = _lv_refr_get_disp_refreshing();
+ ck = d->driver->color_chroma_key;
+ break;
+ }
+#if LV_COLOR_DEPTH == 16
+ case LV_IMG_CF_RGB565A8:
+ has_alpha = true;
+ px_size = sizeof(lv_color_t);
+ break;
+#endif
+ default:
+ return;
+ }
+
+ lv_coord_t x;
+ for(x = 0; x < x_end; x++) {
+ xs_ups = xs_ups_start + ((xs_step * x) >> 8);
+ ys_ups = ys_ups_start + ((ys_step * x) >> 8);
+
+ int32_t xs_int = xs_ups >> 8;
+ int32_t ys_int = ys_ups >> 8;
+
+ /*Fully out of the image*/
+ if(xs_int < 0 || xs_int >= src_w || ys_int < 0 || ys_int >= src_h) {
+ abuf[x] = 0x00;
+ continue;
+ }
+
+ /*Get the direction the hor and ver neighbor
+ *`fract` will be in range of 0x00..0xFF and `next` (+/-1) indicates the direction*/
+ int32_t xs_fract = xs_ups & 0xFF;
+ int32_t ys_fract = ys_ups & 0xFF;
+
+ int32_t x_next;
+ int32_t y_next;
+ if(xs_fract < 0x80) {
+ x_next = -1;
+ xs_fract = (0x7F - xs_fract) * 2;
+ }
+ else {
+ x_next = 1;
+ xs_fract = (xs_fract - 0x80) * 2;
+ }
+ if(ys_fract < 0x80) {
+ y_next = -1;
+ ys_fract = (0x7F - ys_fract) * 2;
+ }
+ else {
+ y_next = 1;
+ ys_fract = (ys_fract - 0x80) * 2;
+ }
+
+ const uint8_t * src_tmp = src;
+ src_tmp += (ys_int * src_stride * px_size) + xs_int * px_size;
+
+ if(xs_int + x_next >= 0 &&
+ xs_int + x_next <= src_w - 1 &&
+ ys_int + y_next >= 0 &&
+ ys_int + y_next <= src_h - 1) {
+
+ const uint8_t * px_base = src_tmp;
+ const uint8_t * px_hor = src_tmp + x_next * px_size;
+ const uint8_t * px_ver = src_tmp + y_next * src_stride * px_size;
+ lv_color_t c_base;
+ lv_color_t c_ver;
+ lv_color_t c_hor;
+
+ if(has_alpha) {
+ lv_opa_t a_base;
+ lv_opa_t a_ver;
+ lv_opa_t a_hor;
+ if(cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
+ a_base = px_base[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+ a_ver = px_ver[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+ a_hor = px_hor[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+ }
+#if LV_COLOR_DEPTH == 16
+ else if(cf == LV_IMG_CF_RGB565A8) {
+ const lv_opa_t * a_tmp = src + src_stride * src_h * sizeof(lv_color_t);
+ a_base = *(a_tmp + (ys_int * src_stride) + xs_int);
+ a_hor = *(a_tmp + (ys_int * src_stride) + xs_int + x_next);
+ a_ver = *(a_tmp + ((ys_int + y_next) * src_stride) + xs_int);
+ }
+#endif
+ else if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
+ if(((lv_color_t *)px_base)->full == ck.full ||
+ ((lv_color_t *)px_ver)->full == ck.full ||
+ ((lv_color_t *)px_hor)->full == ck.full) {
+ abuf[x] = 0x00;
+ continue;
+ }
+ else {
+ a_base = 0xff;
+ a_ver = 0xff;
+ a_hor = 0xff;
+ }
+ }
+ else {
+ a_base = 0xff;
+ a_ver = 0xff;
+ a_hor = 0xff;
+ }
+
+ if(a_ver != a_base) a_ver = ((a_ver * ys_fract) + (a_base * (0x100 - ys_fract))) >> 8;
+ if(a_hor != a_base) a_hor = ((a_hor * xs_fract) + (a_base * (0x100 - xs_fract))) >> 8;
+ abuf[x] = (a_ver + a_hor) >> 1;
+
+ if(abuf[x] == 0x00) continue;
+
+#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
+ c_base.full = px_base[0];
+ c_ver.full = px_ver[0];
+ c_hor.full = px_hor[0];
+#elif LV_COLOR_DEPTH == 16
+ c_base.full = px_base[0] + (px_base[1] << 8);
+ c_ver.full = px_ver[0] + (px_ver[1] << 8);
+ c_hor.full = px_hor[0] + (px_hor[1] << 8);
+#elif LV_COLOR_DEPTH == 32
+ c_base.full = *((uint32_t *)px_base);
+ c_ver.full = *((uint32_t *)px_ver);
+ c_hor.full = *((uint32_t *)px_hor);
+#endif
+ }
+ /*No alpha channel -> RGB*/
+ else {
+ c_base = *((const lv_color_t *) px_base);
+ c_hor = *((const lv_color_t *) px_hor);
+ c_ver = *((const lv_color_t *) px_ver);
+ abuf[x] = 0xff;
+ }
+
+ if(c_base.full == c_ver.full && c_base.full == c_hor.full) {
+ cbuf[x] = c_base;
+ }
+ else {
+ c_ver = lv_color_mix(c_ver, c_base, ys_fract);
+ c_hor = lv_color_mix(c_hor, c_base, xs_fract);
+ cbuf[x] = lv_color_mix(c_hor, c_ver, LV_OPA_50);
+ }
+ }
+ /*Partially out of the image*/
+ else {
+#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
+ cbuf[x].full = src_tmp[0];
+#elif LV_COLOR_DEPTH == 16
+ cbuf[x].full = src_tmp[0] + (src_tmp[1] << 8);
+#elif LV_COLOR_DEPTH == 32
+ cbuf[x].full = *((uint32_t *)src_tmp);
+#endif
+ lv_opa_t a;
+ switch(cf) {
+ case LV_IMG_CF_TRUE_COLOR_ALPHA:
+ a = src_tmp[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+ break;
+ case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
+ a = cbuf[x].full == ck.full ? 0x00 : 0xff;
+ break;
+#if LV_COLOR_DEPTH == 16
+ case LV_IMG_CF_RGB565A8:
+ a = *(src + src_stride * src_h * sizeof(lv_color_t) + (ys_int * src_stride) + xs_int);
+ break;
+#endif
+ default:
+ a = 0xff;
+ }
+
+ if((xs_int == 0 && x_next < 0) || (xs_int == src_w - 1 && x_next > 0)) {
+ abuf[x] = (a * (0xFF - xs_fract)) >> 8;
+ }
+ else if((ys_int == 0 && y_next < 0) || (ys_int == src_h - 1 && y_next > 0)) {
+ abuf[x] = (a * (0xFF - ys_fract)) >> 8;
+ }
+ else {
+ abuf[x] = 0x00;
+ }
+ }
+ }
+}
+
+static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout,
+ int32_t * yout)
+{
+ if(t->angle == 0 && t->zoom == LV_IMG_ZOOM_NONE) {
+ *xout = xin * 256;
+ *yout = yin * 256;
+ return;
+ }
+
+ xin -= t->pivot.x;
+ yin -= t->pivot.y;
+
+ if(t->angle == 0) {
+ *xout = ((int32_t)(xin * t->zoom)) + (t->pivot_x_256);
+ *yout = ((int32_t)(yin * t->zoom)) + (t->pivot_y_256);
+ }
+ else if(t->zoom == LV_IMG_ZOOM_NONE) {
+ *xout = ((t->cosma * xin - t->sinma * yin) >> 2) + (t->pivot_x_256);
+ *yout = ((t->sinma * xin + t->cosma * yin) >> 2) + (t->pivot_y_256);
+ }
+ else {
+ *xout = (((t->cosma * xin - t->sinma * yin) * t->zoom) >> 10) + (t->pivot_x_256);
+ *yout = (((t->sinma * xin + t->cosma * yin) * t->zoom) >> 10) + (t->pivot_y_256);
+ }
+}
+
+#endif
diff --git a/lib/lvgl/src/draw/swm341_dma2d/lv_draw_swm341_dma2d.mk b/lib/lvgl/src/draw/swm341_dma2d/lv_draw_swm341_dma2d.mk
new file mode 100644
index 0000000..bc19e38
--- /dev/null
+++ b/lib/lvgl/src/draw/swm341_dma2d/lv_draw_swm341_dma2d.mk
@@ -0,0 +1,6 @@
+CSRCS += lv_gpu_swm341_dma2d.c
+
+DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d
+VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d
+
+CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d"
diff --git a/lib/lvgl/src/draw/swm341_dma2d/lv_gpu_swm341_dma2d.c b/lib/lvgl/src/draw/swm341_dma2d/lv_gpu_swm341_dma2d.c
new file mode 100644
index 0000000..74a5394
--- /dev/null
+++ b/lib/lvgl/src/draw/swm341_dma2d/lv_gpu_swm341_dma2d.c
@@ -0,0 +1,241 @@
+/**
+ * @file lv_gpu_swm341_dma2d.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_gpu_swm341_dma2d.h"
+#include "../../core/lv_refr.h"
+
+#if LV_USE_GPU_SWM341_DMA2D
+
+#include LV_GPU_SWM341_DMA2D_INCLUDE
+
+/*********************
+ * DEFINES
+ *********************/
+
+#if LV_COLOR_16_SWAP
+ #error "Can't use DMA2D with LV_COLOR_16_SWAP 1"
+#endif
+
+#if LV_COLOR_DEPTH == 8
+ #error "Can't use DMA2D with LV_COLOR_DEPTH == 8"
+#endif
+
+#if LV_COLOR_DEPTH == 16
+ #define LV_DMA2D_COLOR_FORMAT LV_SWM341_DMA2D_RGB565
+#elif LV_COLOR_DEPTH == 32
+ #define LV_DMA2D_COLOR_FORMAT LV_SWM341_DMA2D_ARGB8888
+#else
+ /*Can't use GPU with other formats*/
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static void lv_draw_swm341_dma2d_blend_fill(lv_color_t * dest_buf, lv_coord_t dest_stride, const lv_area_t * fill_area,
+ lv_color_t color);
+
+static void lv_draw_swm341_dma2d_blend_map(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa);
+
+static void lv_draw_swm341_dma2d_img_decoded(lv_draw_ctx_t * draw, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t color_format);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+/**
+ * Turn on the peripheral and set output color mode, this only needs to be done once
+ */
+void lv_draw_swm341_dma2d_init(void)
+{
+ /*Enable DMA2D clock*/
+ SYS->CLKEN0 |= (1 << SYS_CLKEN0_DMA2D_Pos);
+
+ DMA2D->CR &= ~DMA2D_CR_WAIT_Msk;
+ DMA2D->CR |= (CyclesPerUs << DMA2D_CR_WAIT_Pos);
+
+ DMA2D->IF = 0xFF;
+ DMA2D->IE = (0 << DMA2D_IE_DONE_Pos);
+
+ /*set output colour mode*/
+ DMA2D->L[DMA2D_LAYER_OUT].PFCCR = (LV_DMA2D_COLOR_FORMAT << DMA2D_PFCCR_CFMT_Pos);
+}
+
+void lv_draw_swm341_dma2d_ctx_init(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+
+ lv_draw_sw_init_ctx(drv, draw_ctx);
+
+ lv_draw_swm341_dma2d_ctx_t * dma2d_draw_ctx = (lv_draw_sw_ctx_t *)draw_ctx;
+
+ dma2d_draw_ctx->blend = lv_draw_swm341_dma2d_blend;
+ // dma2d_draw_ctx->base_draw.draw_img_decoded = lv_draw_swm341_dma2d_img_decoded;
+ dma2d_draw_ctx->base_draw.wait_for_finish = lv_gpu_swm341_dma2d_wait_cb;
+}
+
+void lv_draw_swm341_dma2d_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
+{
+ LV_UNUSED(drv);
+ LV_UNUSED(draw_ctx);
+}
+
+void lv_draw_swm341_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
+{
+ lv_area_t blend_area;
+ if(!_lv_area_intersect(&blend_area, dsc->blend_area, draw_ctx->clip_area))
+ return;
+
+ bool done = false;
+
+ if(dsc->mask_buf == NULL && dsc->blend_mode == LV_BLEND_MODE_NORMAL && lv_area_get_size(&blend_area) > 100) {
+ lv_coord_t dest_stride = lv_area_get_width(draw_ctx->buf_area);
+
+ lv_color_t * dest_buf = draw_ctx->buf;
+ dest_buf += dest_stride * (blend_area.y1 - draw_ctx->buf_area->y1) + (blend_area.x1 - draw_ctx->buf_area->x1);
+
+ const lv_color_t * src_buf = dsc->src_buf;
+ if(src_buf) {
+ lv_draw_sw_blend_basic(draw_ctx, dsc);
+ lv_coord_t src_stride;
+ src_stride = lv_area_get_width(dsc->blend_area);
+ src_buf += src_stride * (blend_area.y1 - dsc->blend_area->y1) + (blend_area.x1 - dsc->blend_area->x1);
+ lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ lv_draw_swm341_dma2d_blend_map(dest_buf, &blend_area, dest_stride, src_buf, src_stride, dsc->opa);
+ done = true;
+ }
+ else if(dsc->opa >= LV_OPA_MAX) {
+ lv_area_move(&blend_area, -draw_ctx->buf_area->x1, -draw_ctx->buf_area->y1);
+ lv_draw_swm341_dma2d_blend_fill(dest_buf, dest_stride, &blend_area, dsc->color);
+ done = true;
+ }
+ }
+
+ if(!done) lv_draw_sw_blend_basic(draw_ctx, dsc);
+}
+
+static void lv_draw_swm341_dma2d_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc,
+ const lv_area_t * coords, const uint8_t * map_p, lv_img_cf_t color_format)
+{
+ /*TODO basic ARGB8888 image can be handles here*/
+
+ lv_draw_sw_img_decoded(draw_ctx, dsc, coords, map_p, color_format);
+}
+
+static void lv_draw_swm341_dma2d_blend_fill(lv_color_t * dest_buf, lv_coord_t dest_stride, const lv_area_t * fill_area,
+ lv_color_t color)
+{
+ /*Simply fill an area*/
+ int32_t area_w = lv_area_get_width(fill_area);
+ int32_t area_h = lv_area_get_height(fill_area);
+
+#if 1
+ DMA2D->L[DMA2D_LAYER_OUT].COLOR = color.full;
+
+ DMA2D->L[DMA2D_LAYER_OUT].MAR = (uint32_t)dest_buf;
+ DMA2D->L[DMA2D_LAYER_OUT].OR = dest_stride - area_w;
+ DMA2D->NLR = ((area_w - 1) << DMA2D_NLR_NPIXEL_Pos) | ((area_h - 1) << DMA2D_NLR_NLINE_Pos);
+
+ /*start transfer*/
+ DMA2D->CR &= ~DMA2D_CR_MODE_Msk;
+ DMA2D->CR |= (3 << DMA2D_CR_MODE_Pos) |
+ (1 << DMA2D_CR_START_Pos);
+#else
+ for(uint32_t y = 0; y < area_h; y++) {
+ for(uint32_t x = 0; x < area_w; x++) {
+ dest_buf[y * dest_stride + x] = color;
+ }
+ }
+#endif
+}
+
+static void lv_draw_swm341_dma2d_blend_map(lv_color_t * dest_buf, const lv_area_t * dest_area, lv_coord_t dest_stride,
+ const lv_color_t * src_buf, lv_coord_t src_stride, lv_opa_t opa)
+{
+
+ /*Simple copy*/
+ int32_t dest_w = lv_area_get_width(dest_area);
+ int32_t dest_h = lv_area_get_height(dest_area);
+
+ if(opa >= LV_OPA_MAX) {
+#if 1
+ /*copy output colour mode, this register controls both input and output colour format*/
+ DMA2D->L[DMA2D_LAYER_FG].MAR = (uint32_t)src_buf;
+ DMA2D->L[DMA2D_LAYER_FG].OR = src_stride - dest_w;
+ DMA2D->L[DMA2D_LAYER_FG].PFCCR = (LV_DMA2D_COLOR_FORMAT << DMA2D_PFCCR_CFMT_Pos);
+
+ DMA2D->L[DMA2D_LAYER_OUT].MAR = (uint32_t)dest_buf;
+ DMA2D->L[DMA2D_LAYER_OUT].OR = dest_stride - dest_w;
+
+ DMA2D->NLR = ((dest_w - 1) << DMA2D_NLR_NPIXEL_Pos) | ((dest_h - 1) << DMA2D_NLR_NLINE_Pos);
+
+ /*start transfer*/
+ DMA2D->CR &= ~DMA2D_CR_MODE_Msk;
+ DMA2D->CR |= (0 << DMA2D_CR_MODE_Pos) |
+ (1 << DMA2D_CR_START_Pos);
+#else
+ lv_color_t temp_buf[1024];
+ for(uint32_t y = 0; y < dest_h; y++) {
+ memcpy(temp_buf, &src_buf[y * src_stride], dest_w * sizeof(lv_color_t));
+ memcpy(&dest_buf[y * dest_stride], temp_buf, dest_w * sizeof(lv_color_t));
+ }
+#endif
+ }
+ else {
+ DMA2D->L[DMA2D_LAYER_FG].MAR = (uint32_t)src_buf;
+ DMA2D->L[DMA2D_LAYER_FG].OR = src_stride - dest_w;
+ DMA2D->L[DMA2D_LAYER_FG].PFCCR = (LV_DMA2D_COLOR_FORMAT << DMA2D_PFCCR_CFMT_Pos)
+ /*alpha mode 2, replace with foreground * alpha value*/
+ | (2 << DAM2D_PFCCR_AMODE_Pos)
+ /*alpha value*/
+ | (opa << DMA2D_PFCCR_ALPHA_Pos);
+
+ DMA2D->L[DMA2D_LAYER_BG].MAR = (uint32_t)dest_buf;
+ DMA2D->L[DMA2D_LAYER_BG].OR = dest_stride - dest_w;
+ DMA2D->L[DMA2D_LAYER_BG].PFCCR = (LV_DMA2D_COLOR_FORMAT << DMA2D_PFCCR_CFMT_Pos);
+
+ DMA2D->L[DMA2D_LAYER_OUT].MAR = (uint32_t)dest_buf;
+ DMA2D->L[DMA2D_LAYER_OUT].OR = dest_stride - dest_w;
+
+ DMA2D->NLR = ((dest_w - 1) << DMA2D_NLR_NPIXEL_Pos) | ((dest_h - 1) << DMA2D_NLR_NLINE_Pos);
+
+ /*start transfer*/
+ DMA2D->CR &= ~DMA2D_CR_MODE_Msk;
+ DMA2D->CR |= (2 << DMA2D_CR_MODE_Pos) |
+ (1 << DMA2D_CR_START_Pos);
+ }
+}
+
+void lv_gpu_swm341_dma2d_wait_cb(lv_draw_ctx_t * draw_ctx)
+{
+ lv_disp_t * disp = _lv_refr_get_disp_refreshing();
+ if(disp->driver && disp->driver->wait_cb) {
+ while(DMA2D->CR & DMA2D_CR_START_Msk) {
+ disp->driver->wait_cb(disp->driver);
+ }
+ }
+ else {
+ while(DMA2D->CR & DMA2D_CR_START_Msk);
+ }
+ lv_draw_sw_wait_for_finish(draw_ctx);
+}
+
+#endif
diff --git a/lib/lvgl/src/draw/swm341_dma2d/lv_gpu_swm341_dma2d.h b/lib/lvgl/src/draw/swm341_dma2d/lv_gpu_swm341_dma2d.h
new file mode 100644
index 0000000..20b8922
--- /dev/null
+++ b/lib/lvgl/src/draw/swm341_dma2d/lv_gpu_swm341_dma2d.h
@@ -0,0 +1,64 @@
+/**
+ * @file lv_gpu_swm341_dma2d.h
+ *
+ */
+
+#ifndef LV_GPU_SWM341_DMA2D_H
+#define LV_GPU_SWM341_DMA2D_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../misc/lv_color.h"
+#include "../../hal/lv_hal_disp.h"
+#include "../sw/lv_draw_sw.h"
+
+#if LV_USE_GPU_SWM341_DMA2D
+
+/*********************
+ * DEFINES
+ *********************/
+
+#define LV_SWM341_DMA2D_ARGB8888 0
+#define LV_SWM341_DMA2D_RGB888 1
+#define LV_SWM341_DMA2D_RGB565 2
+
+/**********************
+ * TYPEDEFS
+ **********************/
+typedef lv_draw_sw_ctx_t lv_draw_swm341_dma2d_ctx_t;
+
+struct _lv_disp_drv_t;
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**
+ * Turn on the peripheral and set output color mode, this only needs to be done once
+ */
+void lv_draw_swm341_dma2d_init(void);
+
+void lv_draw_swm341_dma2d_ctx_init(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+void lv_draw_swm341_dma2d_ctx_deinit(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
+
+void lv_draw_swm341_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
+
+void lv_gpu_swm341_dma2d_wait_cb(lv_draw_ctx_t * draw_ctx);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_GPU_SWM341_DMA2D*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_GPU_SWM341_DMA2D_H*/
diff --git a/lib/lvgl/src/extra/layouts/flex/lv_flex.c b/lib/lvgl/src/extra/layouts/flex/lv_flex.c
index 405a56b..2f1a926 100644
--- a/lib/lvgl/src/extra/layouts/flex/lv_flex.c
+++ b/lib/lvgl/src/extra/layouts/flex/lv_flex.c
@@ -45,7 +45,6 @@ typedef struct {
uint32_t grow_dsc_calc : 1;
} track_t;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -72,7 +71,6 @@ lv_style_prop_t LV_STYLE_FLEX_CROSS_PLACE;
lv_style_prop_t LV_STYLE_FLEX_TRACK_PLACE;
lv_style_prop_t LV_STYLE_FLEX_GROW;
-
/**********************
* STATIC VARIABLES
**********************/
@@ -97,6 +95,7 @@ void lv_flex_init(void)
LV_STYLE_FLEX_MAIN_PLACE = lv_style_register_prop(LV_STYLE_PROP_LAYOUT_REFR);
LV_STYLE_FLEX_CROSS_PLACE = lv_style_register_prop(LV_STYLE_PROP_LAYOUT_REFR);
LV_STYLE_FLEX_TRACK_PLACE = lv_style_register_prop(LV_STYLE_PROP_LAYOUT_REFR);
+ LV_STYLE_FLEX_GROW = lv_style_register_prop(LV_STYLE_PROP_LAYOUT_REFR);
}
void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow)
@@ -120,7 +119,6 @@ void lv_obj_set_flex_grow(lv_obj_t * obj, uint8_t grow)
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
}
-
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value)
{
lv_style_value_t v = {
@@ -161,7 +159,6 @@ void lv_style_set_flex_grow(lv_style_t * style, uint8_t value)
lv_style_set_prop(style, LV_STYLE_FLEX_GROW, v);
}
-
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector)
{
lv_style_value_t v = {
@@ -370,7 +367,6 @@ static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id
t->track_fix_main_size += item_size + item_gap;
}
-
t->track_cross_size = LV_MAX(get_cross_size(item), t->track_cross_size);
t->item_cnt++;
}
@@ -444,7 +440,6 @@ static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, i
}
}
-
bool rtl = lv_obj_get_style_base_dir(cont, LV_PART_MAIN) == LV_BASE_DIR_RTL ? true : false;
lv_coord_t main_pos = 0;
@@ -470,8 +465,14 @@ static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, i
}
}
- if(f->row) item->w_layout = 1;
- else item->h_layout = 1;
+ if(f->row) {
+ item->w_layout = 1;
+ item->h_layout = 0;
+ }
+ else {
+ item->h_layout = 1;
+ item->w_layout = 0;
+ }
if(s != area_get_main_size(&item->coords)) {
lv_obj_invalidate(item);
@@ -505,7 +506,6 @@ static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, i
if(f->row && rtl) main_pos -= area_get_main_size(&item->coords);
-
/*Handle percentage value of translate*/
lv_coord_t tr_x = lv_obj_get_style_translate_x(item, LV_PART_MAIN);
lv_coord_t tr_y = lv_obj_get_style_translate_y(item, LV_PART_MAIN);
diff --git a/lib/lvgl/src/extra/layouts/flex/lv_flex.h b/lib/lvgl/src/extra/layouts/flex/lv_flex.h
index 1499d88..58c3221 100644
--- a/lib/lvgl/src/extra/layouts/flex/lv_flex.h
+++ b/lib/lvgl/src/extra/layouts/flex/lv_flex.h
@@ -139,7 +139,6 @@ static inline uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, uint32_t
return (uint8_t)v.num;
}
-
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/extra/layouts/grid/lv_grid.c b/lib/lvgl/src/extra/layouts/grid/lv_grid.c
index 6a848e4..7a6570c 100644
--- a/lib/lvgl/src/extra/layouts/grid/lv_grid.c
+++ b/lib/lvgl/src/extra/layouts/grid/lv_grid.c
@@ -40,7 +40,6 @@ typedef struct {
lv_coord_t grid_h;
} _lv_grid_calc_t;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -126,7 +125,6 @@ lv_style_prop_t LV_STYLE_GRID_CELL_Y_ALIGN;
* GLOBAL FUNCTIONS
**********************/
-
void lv_grid_init(void)
{
LV_LAYOUT_GRID = lv_layout_register(grid_update, NULL);
@@ -172,7 +170,6 @@ void lv_obj_set_grid_cell(lv_obj_t * obj, lv_grid_align_t x_align, uint8_t col_p
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
}
-
void lv_style_set_grid_row_dsc_array(lv_style_t * style, const lv_coord_t value[])
{
lv_style_value_t v = {
@@ -205,7 +202,6 @@ void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value)
lv_style_set_prop(style, LV_STYLE_GRID_COLUMN_ALIGN, v);
}
-
void lv_style_set_grid_cell_column_pos(lv_style_t * style, lv_coord_t value)
{
lv_style_value_t v = {
@@ -270,7 +266,6 @@ void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const lv_coord_t val
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_COLUMN_DSC_ARRAY, v, selector);
}
-
void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
{
lv_style_value_t v = {
@@ -287,7 +282,6 @@ void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, l
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_COLUMN_ALIGN, v, selector);
}
-
void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
{
lv_style_value_t v = {
@@ -336,7 +330,6 @@ void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_coord_t value, lv_sty
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_Y_ALIGN, v, selector);
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -548,7 +541,6 @@ static void calc_rows(lv_obj_t * cont, _lv_grid_calc_t * c)
}
}
-
lv_coord_t row_gap = lv_obj_get_style_pad_row(cont, LV_PART_MAIN);
lv_coord_t cont_h = lv_obj_get_content_height(cont) - row_gap * (c->row_num - 1);
lv_coord_t free_h = cont_h - grid_h;
@@ -561,6 +553,8 @@ static void calc_rows(lv_obj_t * cont, _lv_grid_calc_t * c)
if(IS_FR(x)) {
lv_coord_t f = GET_FR(x);
c->h[i] = (free_h * f) / row_fr_cnt;
+ last_fr_i = i;
+ last_fr_x = f;
}
}
@@ -589,7 +583,6 @@ static void item_repos(lv_obj_t * item, _lv_grid_calc_t * c, item_repos_hint_t *
lv_grid_align_t col_align = get_cell_col_align(item);
lv_grid_align_t row_align = get_cell_row_align(item);
-
lv_coord_t col_x1 = c->x[col_pos];
lv_coord_t col_x2 = c->x[col_pos + col_span - 1] + c->w[col_pos + col_span - 1];
lv_coord_t col_w = col_x2 - col_x1;
@@ -598,7 +591,6 @@ static void item_repos(lv_obj_t * item, _lv_grid_calc_t * c, item_repos_hint_t *
lv_coord_t row_y2 = c->y[row_pos + row_span - 1] + c->h[row_pos + row_span - 1];
lv_coord_t row_h = row_y2 - row_y1;
-
/*If the item has RTL base dir switch start and end*/
if(lv_obj_get_style_base_dir(item, LV_PART_MAIN) == LV_BASE_DIR_RTL) {
if(col_align == LV_GRID_ALIGN_START) col_align = LV_GRID_ALIGN_END;
@@ -776,5 +768,4 @@ static uint32_t count_tracks(const lv_coord_t * templ)
return i;
}
-
#endif /*LV_USE_GRID*/
diff --git a/lib/lvgl/src/extra/libs/bmp/lv_bmp.c b/lib/lvgl/src/extra/libs/bmp/lv_bmp.c
index 47b3756..6039009 100644
--- a/lib/lvgl/src/extra/libs/bmp/lv_bmp.c
+++ b/lib/lvgl/src/extra/libs/bmp/lv_bmp.c
@@ -34,7 +34,6 @@ typedef struct {
static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header);
static lv_res_t decoder_open(lv_img_decoder_t * dec, lv_img_decoder_dsc_t * dsc);
-
static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc,
lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);
@@ -114,7 +113,6 @@ static lv_res_t decoder_info(lv_img_decoder_t * decoder, const void * src, lv_im
return LV_RES_INV; /*If didn't succeeded earlier then it's an error*/
}
-
/**
* Open a PNG image and return the decided image
* @param src can be file name or pointer to a C array
@@ -190,7 +188,6 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t *
return LV_RES_INV; /*If not returned earlier then it failed*/
}
-
static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc,
lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf)
{
@@ -203,7 +200,14 @@ static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc
lv_fs_seek(&b->f, p, LV_FS_SEEK_SET);
lv_fs_read(&b->f, buf, len * (b->bpp / 8), NULL);
-#if LV_COLOR_DEPTH == 32
+#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 1
+ for(unsigned int i = 0; i < len * (b->bpp / 8); i += 2) {
+ buf[i] = buf[i] ^ buf[i + 1];
+ buf[i + 1] = buf[i] ^ buf[i + 1];
+ buf[i] = buf[i] ^ buf[i + 1];
+ }
+
+#elif LV_COLOR_DEPTH == 32
if(b->bpp == 32) {
lv_coord_t i;
for(i = 0; i < len; i++) {
@@ -235,7 +239,6 @@ static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc
return LV_RES_OK;
}
-
/**
* Free the allocated resources
*/
diff --git a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_littlefs.c b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_littlefs.c
new file mode 100644
index 0000000..44261c3
--- /dev/null
+++ b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_littlefs.c
@@ -0,0 +1,332 @@
+/**
+ * @file lv_fs_littlefs.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lvgl.h"
+
+#if LV_USE_FS_LITTLEFS
+#include "lfs.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+#if LV_FS_LITTLEFS_LETTER == '\0'
+ #error "LV_FS_LITTLEFS_LETTER must be an upper case ASCII letter"
+#endif
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+
+static void fs_init(void);
+
+static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
+static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p);
+
+static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
+static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
+
+static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence);
+static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
+
+static void * fs_dir_open(lv_fs_drv_t * drv, const char * path);
+static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * dir_p, char * fn);
+static lv_fs_res_t fs_dir_close(lv_fs_drv_t * drv, void * dir_p);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+void lv_fs_littlefs_init(void)
+{
+ /*----------------------------------------------------
+ * Initialize your storage device and File System
+ * -------------------------------------------------*/
+ fs_init();
+
+ /*---------------------------------------------------
+ * Register the file system interface in LVGL
+ *--------------------------------------------------*/
+
+ /*Add a simple drive to open images*/
+ static lv_fs_drv_t fs_drv; /*A driver descriptor*/
+ lv_fs_drv_init(&fs_drv);
+
+ /*Set up fields...*/
+ fs_drv.letter = LV_FS_LITTLEFS_LETTER;
+ fs_drv.cache_size = LV_FS_LITTLEFS_CACHE_SIZE;
+
+ fs_drv.open_cb = fs_open;
+ fs_drv.close_cb = fs_close;
+ fs_drv.read_cb = fs_read;
+ fs_drv.write_cb = fs_write;
+ fs_drv.seek_cb = fs_seek;
+ fs_drv.tell_cb = fs_tell;
+
+ fs_drv.dir_open_cb = fs_dir_open;
+ fs_drv.dir_close_cb = fs_dir_close;
+ fs_drv.dir_read_cb = fs_dir_read;
+
+ /*#if LV_USE_USER_DATA*/
+ fs_drv.user_data = NULL;
+ /*#endif*/
+
+ lv_fs_drv_register(&fs_drv);
+}
+
+/**
+ * Convenience function to attach registered driver to lfs_t structure by driver-label
+ * @param label the label assigned to the driver when it was registered
+ * @param lfs_p the pointer to the lfs_t structure initialized by external code/library
+ * @return pointer to a driver descriptor or NULL on error
+ */
+lv_fs_drv_t * lv_fs_littlefs_set_driver(char label, void * lfs_p)
+{
+ lv_fs_drv_t * drv_p = lv_fs_get_drv(label);
+ if(drv_p != NULL) drv_p->user_data = (lfs_t *) lfs_p;
+ return drv_p;
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+/*Initialize your Storage device and File system.*/
+static void fs_init(void)
+{
+ /* Initialize the internal flash or SD-card and LittleFS itself.
+ * Better to do it in your code to keep this library untouched for easy updating */
+}
+
+/**
+ * Open a file
+ * @param drv pointer to a driver where this function belongs
+ * @param path path to the file beginning with the driver letter (e.g. S:/folder/file.txt)
+ * @param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR
+ * @return pointer to a file descriptor or NULL on error
+ */
+static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode)
+{
+ lfs_t * lfs_p = drv->user_data;
+ uint32_t flags = 0;
+
+ flags = mode == LV_FS_MODE_RD ? LFS_O_RDONLY
+ : mode == LV_FS_MODE_WR ? LFS_O_WRONLY
+ : mode == (LV_FS_MODE_WR | LV_FS_MODE_RD) ? LFS_O_RDWR : 0;
+
+ lfs_file_t * file_p = lv_mem_alloc(sizeof(lfs_file_t));
+ if(file_p == NULL) return NULL;
+
+ int result = lfs_file_open(lfs_p, file_p, path, flags);
+
+ if(result != LFS_ERR_OK) {
+ lv_mem_free(file_p);
+ return NULL;
+ }
+
+ return file_p;
+}
+
+/**
+ * Close an opened file
+ * @param drv pointer to a driver where this function belongs
+ * @param file_p pointer to a file_t variable. (opened with fs_open)
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p)
+{
+ lfs_t * lfs_p = drv->user_data;
+
+ int result = lfs_file_close(lfs_p, file_p);
+ lv_mem_free(file_p);
+ /*lv_mem_free( lfs_p );*/ /*allocated and freed by outside-code*/
+
+ if(result != LFS_ERR_OK) return LV_FS_RES_UNKNOWN;
+ return LV_FS_RES_OK;
+}
+
+/**
+ * Read data from an opened file
+ * @param drv pointer to a driver where this function belongs
+ * @param file_p pointer to a file_t variable.
+ * @param buf pointer to a memory block where to store the read data
+ * @param btr number of Bytes To Read
+ * @param br the real number of read bytes (Byte Read)
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
+{
+ lfs_t * lfs_p = drv->user_data;
+
+ lfs_ssize_t result = lfs_file_read(lfs_p, file_p, buf, btr);
+ if(result < 0) return LV_FS_RES_UNKNOWN;
+
+ *br = (uint32_t) result;
+ return LV_FS_RES_OK;
+}
+
+/**
+ * Write into a file
+ * @param drv pointer to a driver where this function belongs
+ * @param file_p pointer to a file_t variable
+ * @param buf pointer to a buffer with the bytes to write
+ * @param btw Bytes To Write
+ * @param bw the number of real written bytes (Bytes Written). NULL if unused.
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
+{
+#ifndef LFS_READONLY
+ lfs_t * lfs_p = drv->user_data;
+
+ lfs_ssize_t result = lfs_file_write(lfs_p, file_p, buf, btw);
+ if(result < 0 || lfs_file_sync(lfs_p, file_p) < 0) return LV_FS_RES_UNKNOWN;
+
+ *bw = (uint32_t) result;
+ return LV_FS_RES_OK;
+#else
+ return LV_FS_RES_NOT_IMP;
+#endif
+}
+
+/**
+ * Set the read write pointer. Also expand the file size if necessary.
+ * @param drv pointer to a driver where this function belongs
+ * @param file_p pointer to a file_t variable. (opened with fs_open )
+ * @param pos the new position of read write pointer
+ * @param whence tells from where to interpret the `pos`. See @lv_fs_whence_t
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
+{
+ lfs_t * lfs_p = drv->user_data;
+
+ int lfs_whence = whence == LV_FS_SEEK_SET ? LFS_SEEK_SET
+ : whence == LV_FS_SEEK_CUR ? LFS_SEEK_CUR
+ : whence == LV_FS_SEEK_END ? LFS_SEEK_END : 0;
+
+ lfs_soff_t result = lfs_file_seek(lfs_p, file_p, pos, lfs_whence);
+ if(result < 0) return LV_FS_RES_UNKNOWN;
+
+ /*pos = result;*/ /*not supported by lv_fs*/
+ return LV_FS_RES_OK;
+}
+
+/**
+ * Give the position of the read write pointer
+ * @param drv pointer to a driver where this function belongs
+ * @param file_p pointer to a file_t variable.
+ * @param pos_p pointer to where to store the result
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
+{
+ lfs_t * lfs_p = drv->user_data;
+
+ lfs_soff_t result = lfs_file_tell(lfs_p, file_p);
+ if(result < 0) return LV_FS_RES_UNKNOWN;
+
+ *pos_p = (uint32_t) result;
+ return LV_FS_RES_OK;
+}
+
+/**
+ * Initialize a 'lv_fs_dir_t' variable for directory reading
+ * @param drv pointer to a driver where this function belongs
+ * @param path path to a directory
+ * @return pointer to the directory read descriptor or NULL on error
+ */
+static void * fs_dir_open(lv_fs_drv_t * drv, const char * path)
+{
+ lfs_t * lfs_p = drv->user_data;
+
+ lfs_dir_t * dir_p = lv_mem_alloc(sizeof(lfs_dir_t));
+ if(dir_p == NULL) return NULL;
+
+ int result = lfs_dir_open(lfs_p, dir_p, path);
+ if(result != LFS_ERR_OK) {
+ lv_mem_free(dir_p);
+ return NULL;
+ }
+
+ return dir_p;
+}
+
+/**
+ * Read the next filename form a directory.
+ * The name of the directories will begin with '/'
+ * @param drv pointer to a driver where this function belongs
+ * @param rddir_p pointer to an initialized 'lv_fs_dir_t' variable
+ * @param fn pointer to a buffer to store the filename
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * rddir_p, char * fn)
+{
+ lfs_t * lfs_p = drv->user_data;
+ struct lfs_info info;
+ int result;
+
+ info.name[0] = '\0';
+
+ do {
+ result = lfs_dir_read(lfs_p, rddir_p, &info);
+ if(result > 0) {
+ if(info.type == LFS_TYPE_DIR) {
+ fn[0] = '/';
+ strcpy(&fn[1], info.name);
+ }
+ else strcpy(fn, info.name);
+ }
+ else if(result == 0) fn[0] = '\0'; /*dir-scan ended*/
+ else return LV_FS_RES_UNKNOWN;
+
+ } while(!strcmp(fn, "/.") || !strcmp(fn, "/.."));
+
+ return LV_FS_RES_OK;
+}
+
+/**
+ * Close the directory reading
+ * @param drv pointer to a driver where this function belongs
+ * @param rddir_p pointer to an initialized 'lv_fs_dir_t' variable
+ * @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
+ */
+static lv_fs_res_t fs_dir_close(lv_fs_drv_t * drv, void * rddir_p)
+{
+ lfs_t * lfs_p = drv->user_data;
+
+ int result = lfs_dir_close(lfs_p, rddir_p);
+ lv_mem_free(rddir_p);
+
+ if(result != LFS_ERR_OK) return LV_FS_RES_UNKNOWN;
+ return LV_FS_RES_OK;
+}
+
+#else /*LV_USE_FS_LITTLEFS == 0*/
+
+#if defined(LV_FS_LITTLEFS_LETTER) && LV_FS_LITTLEFS_LETTER != '\0'
+ #warning "LV_USE_FS_LITTLEFS is not enabled but LV_FS_LITTLEFS_LETTER is set"
+#endif
+
+#endif /*LV_USE_FS_POSIX*/
diff --git a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_posix.c b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_posix.c
index 4e5c88c..86f404f 100644
--- a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_posix.c
+++ b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_posix.c
@@ -3,7 +3,6 @@
*
*/
-
/*********************
* INCLUDES
*********************/
@@ -104,15 +103,15 @@ static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode)
LV_UNUSED(drv);
uint32_t flags = 0;
- if(mode == LV_FS_MODE_WR) flags = O_WRONLY;
+ if(mode == LV_FS_MODE_WR) flags = O_WRONLY | O_CREAT;
else if(mode == LV_FS_MODE_RD) flags = O_RDONLY;
- else if(mode == (LV_FS_MODE_WR | LV_FS_MODE_RD)) flags = O_RDWR;
+ else if(mode == (LV_FS_MODE_WR | LV_FS_MODE_RD)) flags = O_RDWR | O_CREAT;
/*Make the path relative to the current directory (the projects root folder)*/
char buf[256];
lv_snprintf(buf, sizeof(buf), LV_FS_POSIX_PATH "%s", path);
- int f = open(buf, flags);
+ int f = open(buf, flags, 0666);
if(f < 0) return NULL;
return (void *)(lv_uintptr_t)f;
@@ -176,8 +175,8 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf,
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
{
LV_UNUSED(drv);
- lseek((lv_uintptr_t)file_p, pos, whence);
- return LV_FS_RES_OK;
+ off_t offset = lseek((lv_uintptr_t)file_p, pos, whence);
+ return offset < 0 ? LV_FS_RES_FS_ERR : LV_FS_RES_OK;
}
/**
@@ -191,8 +190,9 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
{
LV_UNUSED(drv);
- *pos_p = lseek((lv_uintptr_t)file_p, 0, SEEK_CUR);
- return LV_FS_RES_OK;
+ off_t offset = lseek((lv_uintptr_t)file_p, 0, SEEK_CUR);
+ *pos_p = offset;
+ return offset < 0 ? LV_FS_RES_FS_ERR : LV_FS_RES_OK;
}
#ifdef WIN32
diff --git a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_stdio.c b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_stdio.c
index b97de82..5472e80 100644
--- a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_stdio.c
+++ b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_stdio.c
@@ -3,7 +3,6 @@
*
*/
-
/*********************
* INCLUDES
*********************/
@@ -219,14 +218,14 @@ static void * fs_dir_open(lv_fs_drv_t * drv, const char * path)
return handle;
#else
handle->dir_p = INVALID_HANDLE_VALUE;
- WIN32_FIND_DATA fdata;
+ WIN32_FIND_DATAA fdata;
/*Make the path relative to the current directory (the projects root folder)*/
char buf[MAX_PATH_LEN];
lv_snprintf(buf, sizeof(buf), LV_FS_STDIO_PATH "%s\\*", path);
strcpy(handle->next_fn, "");
- handle->dir_p = FindFirstFile(buf, &fdata);
+ handle->dir_p = FindFirstFileA(buf, &fdata);
do {
if(strcmp(fdata.cFileName, ".") == 0 || strcmp(fdata.cFileName, "..") == 0) {
continue;
@@ -278,9 +277,9 @@ static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * dir_p, char * fn)
strcpy(fn, handle->next_fn);
strcpy(handle->next_fn, "");
- WIN32_FIND_DATA fdata;
+ WIN32_FIND_DATAA fdata;
- if(FindNextFile(handle->dir_p, &fdata) == false) return LV_FS_RES_OK;
+ if(FindNextFileA(handle->dir_p, &fdata) == false) return LV_FS_RES_OK;
do {
if(strcmp(fdata.cFileName, ".") == 0 || strcmp(fdata.cFileName, "..") == 0) {
continue;
@@ -294,7 +293,7 @@ static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * dir_p, char * fn)
}
break;
}
- } while(FindNextFile(handle->dir_p, &fdata));
+ } while(FindNextFileA(handle->dir_p, &fdata));
#endif
return LV_FS_RES_OK;
@@ -326,4 +325,3 @@ static lv_fs_res_t fs_dir_close(lv_fs_drv_t * drv, void * dir_p)
#endif
#endif /*LV_USE_FS_POSIX*/
-
diff --git a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_win32.c b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_win32.c
index 7cfd9ae..5cd016f 100644
--- a/lib/lvgl/src/extra/libs/fsdrv/lv_fs_win32.c
+++ b/lib/lvgl/src/extra/libs/fsdrv/lv_fs_win32.c
@@ -3,7 +3,6 @@
*
*/
-
/*********************
* INCLUDES
*********************/
@@ -64,7 +63,7 @@ void lv_fs_win32_init(void)
* Register the file system interface in LVGL
*--------------------------------------------------*/
- /*Add a simple drive to open images*/
+ /*Add a simple driver to open images*/
static lv_fs_drv_t fs_drv; /*A driver descriptor*/
lv_fs_drv_init(&fs_drv);
@@ -362,7 +361,7 @@ static void * fs_dir_open(lv_fs_drv_t * drv, const char * path)
dir_handle_t * handle = (dir_handle_t *)lv_mem_alloc(sizeof(dir_handle_t));
handle->dir_p = INVALID_HANDLE_VALUE;
handle->next_error = LV_FS_RES_OK;
- WIN32_FIND_DATA fdata;
+ WIN32_FIND_DATAA fdata;
/*Make the path relative to the current directory (the projects root folder)*/
char buf[MAX_PATH_LEN];
@@ -373,7 +372,7 @@ static void * fs_dir_open(lv_fs_drv_t * drv, const char * path)
#endif
strcpy(handle->next_fn, "");
- handle->dir_p = FindFirstFile(buf, &fdata);
+ handle->dir_p = FindFirstFileA(buf, &fdata);
do {
if(is_dots_name(fdata.cFileName)) {
continue;
@@ -416,7 +415,7 @@ static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * dir_p, char * fn)
lv_fs_res_t current_error = handle->next_error;
strcpy(handle->next_fn, "");
- WIN32_FIND_DATA fdata;
+ WIN32_FIND_DATAA fdata;
while(FindNextFileA(handle->dir_p, &fdata)) {
if(is_dots_name(fdata.cFileName)) {
diff --git a/lib/lvgl/src/extra/libs/fsdrv/lv_fsdrv.h b/lib/lvgl/src/extra/libs/fsdrv/lv_fsdrv.h
index 285d598..b864ad6 100644
--- a/lib/lvgl/src/extra/libs/fsdrv/lv_fsdrv.h
+++ b/lib/lvgl/src/extra/libs/fsdrv/lv_fsdrv.h
@@ -31,6 +31,11 @@ extern "C" {
void lv_fs_fatfs_init(void);
#endif
+#if LV_USE_FS_LITTLEFS != '\0'
+void lv_fs_littlefs_init(void);
+lv_fs_drv_t * lv_fs_littlefs_set_driver(char label, void * lfs_p);
+#endif
+
#if LV_USE_FS_STDIO != '\0'
void lv_fs_stdio_init(void);
#endif
diff --git a/lib/lvgl/src/extra/libs/gif/gifdec.c b/lib/lvgl/src/extra/libs/gif/gifdec.c
index 68f5005..3ee9b71 100644
--- a/lib/lvgl/src/extra/libs/gif/gifdec.c
+++ b/lib/lvgl/src/extra/libs/gif/gifdec.c
@@ -160,6 +160,7 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
#endif
}
gif->anim_start = f_gif_seek(gif, 0, LV_FS_SEEK_CUR);
+ gif->loop_count = -1;
goto ok;
fail:
f_gif_close(gif_base);
@@ -239,6 +240,7 @@ read_application_ext(gd_GIF *gif)
{
char app_id[8];
char app_auth_code[3];
+ uint16_t loop_count;
/* Discard block size (always 0x0B). */
f_gif_seek(gif, 1, LV_FS_SEEK_CUR);
@@ -249,7 +251,15 @@ read_application_ext(gd_GIF *gif)
if (!strncmp(app_id, "NETSCAPE", sizeof(app_id))) {
/* Discard block size (0x03) and constant byte (0x01). */
f_gif_seek(gif, 2, LV_FS_SEEK_CUR);
- gif->loop_count = read_num(gif);
+ loop_count = read_num(gif);
+ if(gif->loop_count < 0) {
+ if(loop_count == 0) {
+ gif->loop_count = 0;
+ }
+ else{
+ gif->loop_count = loop_count + 1;
+ }
+ }
/* Skip block terminator. */
f_gif_seek(gif, 1, LV_FS_SEEK_CUR);
} else if (gif->application) {
@@ -568,9 +578,16 @@ gd_get_frame(gd_GIF *gif)
dispose(gif);
f_gif_read(gif, &sep, 1);
while (sep != ',') {
- if (sep == ';')
- return 0;
- if (sep == '!')
+ if (sep == ';') {
+ f_gif_seek(gif, gif->anim_start, LV_FS_SEEK_SET);
+ if(gif->loop_count == 1 || gif->loop_count < 0) {
+ return 0;
+ }
+ else if(gif->loop_count > 1) {
+ gif->loop_count--;
+ }
+ }
+ else if (sep == '!')
read_ext(gif);
else return -1;
f_gif_read(gif, &sep, 1);
@@ -598,6 +615,7 @@ gd_render_frame(gd_GIF *gif, uint8_t *buffer)
void
gd_rewind(gd_GIF *gif)
{
+ gif->loop_count = -1;
f_gif_seek(gif, gif->anim_start, LV_FS_SEEK_SET);
}
diff --git a/lib/lvgl/src/extra/libs/gif/gifdec.h b/lib/lvgl/src/extra/libs/gif/gifdec.h
index 00f17c1..b68fab5 100644
--- a/lib/lvgl/src/extra/libs/gif/gifdec.h
+++ b/lib/lvgl/src/extra/libs/gif/gifdec.h
@@ -29,7 +29,7 @@ typedef struct gd_GIF {
int32_t anim_start;
uint16_t width, height;
uint16_t depth;
- uint16_t loop_count;
+ int32_t loop_count;
gd_GCE gce;
gd_Palette *palette;
gd_Palette lct, gct;
diff --git a/lib/lvgl/src/extra/libs/gif/lv_gif.c b/lib/lvgl/src/extra/libs/gif/lv_gif.c
index 4cb2955..8a8046e 100644
--- a/lib/lvgl/src/extra/libs/gif/lv_gif.c
+++ b/lib/lvgl/src/extra/libs/gif/lv_gif.c
@@ -20,7 +20,6 @@
* TYPEDEFS
**********************/
-
/**********************
* STATIC PROTOTYPES
**********************/
@@ -99,6 +98,8 @@ void lv_gif_restart(lv_obj_t * obj)
{
lv_gif_t * gifobj = (lv_gif_t *) obj;
gd_rewind(gifobj->gif);
+ lv_timer_resume(gifobj->timer);
+ lv_timer_reset(gifobj->timer);
}
/**********************
@@ -111,6 +112,7 @@ static void lv_gif_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
lv_gif_t * gifobj = (lv_gif_t *) obj;
+ gifobj->gif = NULL;
gifobj->timer = lv_timer_create(next_frame_task_cb, 10, obj);
lv_timer_pause(gifobj->timer);
}
@@ -120,7 +122,8 @@ static void lv_gif_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
LV_UNUSED(class_p);
lv_gif_t * gifobj = (lv_gif_t *) obj;
lv_img_cache_invalidate_src(&gifobj->imgdsc);
- gd_close_gif(gifobj->gif);
+ if(gifobj->gif)
+ gd_close_gif(gifobj->gif);
lv_timer_del(gifobj->timer);
}
@@ -136,14 +139,9 @@ static void next_frame_task_cb(lv_timer_t * t)
int has_next = gd_get_frame(gifobj->gif);
if(has_next == 0) {
/*It was the last repeat*/
- if(gifobj->gif->loop_count == 1) {
- lv_res_t res = lv_event_send(obj, LV_EVENT_READY, NULL);
- if(res != LV_FS_RES_OK) return;
- }
- else {
- if(gifobj->gif->loop_count > 1) gifobj->gif->loop_count--;
- gd_rewind(gifobj->gif);
- }
+ lv_res_t res = lv_event_send(obj, LV_EVENT_READY, NULL);
+ lv_timer_pause(t);
+ if(res != LV_FS_RES_OK) return;
}
gd_render_frame(gifobj->gif, (uint8_t *)gifobj->imgdsc.data);
diff --git a/lib/lvgl/src/extra/libs/lv_libs.h b/lib/lvgl/src/extra/libs/lv_libs.h
index 6782b1d..1fefe6c 100644
--- a/lib/lvgl/src/extra/libs/lv_libs.h
+++ b/lib/lvgl/src/extra/libs/lv_libs.h
@@ -22,6 +22,7 @@ extern "C" {
#include "freetype/lv_freetype.h"
#include "rlottie/lv_rlottie.h"
#include "ffmpeg/lv_ffmpeg.h"
+#include "tiny_ttf/lv_tiny_ttf.h"
/*********************
* DEFINES
diff --git a/lib/lvgl/src/extra/libs/png/lodepng.c b/lib/lvgl/src/extra/libs/png/lodepng.c
index 72b849b..82e18e1 100644
--- a/lib/lvgl/src/extra/libs/png/lodepng.c
+++ b/lib/lvgl/src/extra/libs/png/lodepng.c
@@ -5754,7 +5754,7 @@ static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const
adam7 = (unsigned char*)lodepng_malloc(passstart[7]);
if(!adam7 && passstart[7]) error = 83; /*alloc fail*/
- if(!error) {
+ if(!error && adam7) {
unsigned i;
Adam7_interlace(adam7, in, w, h, bpp);
diff --git a/lib/lvgl/src/extra/libs/png/lv_png.c b/lib/lvgl/src/extra/libs/png/lv_png.c
index d067ef5..a8171f2 100644
--- a/lib/lvgl/src/extra/libs/png/lv_png.c
+++ b/lib/lvgl/src/extra/libs/png/lv_png.c
@@ -103,20 +103,39 @@ static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * sr
else if(src_type == LV_IMG_SRC_VARIABLE) {
const lv_img_dsc_t * img_dsc = src;
const uint32_t data_size = img_dsc->data_size;
+ const uint32_t * size = ((uint32_t *)img_dsc->data) + 4;
const uint8_t magic[] = {0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a};
if(data_size < sizeof(magic)) return LV_RES_INV;
if(memcmp(magic, img_dsc->data, sizeof(magic))) return LV_RES_INV;
header->always_zero = 0;
- header->cf = img_dsc->header.cf; /*Save the color format*/
- header->w = img_dsc->header.w; /*Save the color width*/
- header->h = img_dsc->header.h; /*Save the color height*/
+
+ if(img_dsc->header.cf) {
+ header->cf = img_dsc->header.cf; /*Save the color format*/
+ }
+ else {
+ header->cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
+ }
+
+ if(img_dsc->header.w) {
+ header->w = img_dsc->header.w; /*Save the image width*/
+ }
+ else {
+ header->w = (lv_coord_t)((size[0] & 0xff000000) >> 24) + ((size[0] & 0x00ff0000) >> 8);
+ }
+
+ if(img_dsc->header.h) {
+ header->h = img_dsc->header.h; /*Save the color height*/
+ }
+ else {
+ header->h = (lv_coord_t)((size[1] & 0xff000000) >> 24) + ((size[1] & 0x00ff0000) >> 8);
+ }
+
return LV_RES_OK;
}
return LV_RES_INV; /*If didn't succeeded earlier then it's an error*/
}
-
/**
* Open a PNG image and return the decided image
* @param src can be file name or pointer to a C array
@@ -142,13 +161,13 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t *
error = lodepng_load_file(&png_data, &png_data_size, fn); /*Load the file*/
if(error) {
- LV_LOG_WARN("error %u: %s\n", error, lodepng_error_text(error));
+ LV_LOG_WARN("error %" LV_PRIu32 ": %s\n", error, lodepng_error_text(error));
return LV_RES_INV;
}
/*Decode the PNG image*/
- uint32_t png_width; /*Will be the width of the decoded image*/
- uint32_t png_height; /*Will be the width of the decoded image*/
+ unsigned png_width; /*Will be the width of the decoded image*/
+ unsigned png_height; /*Will be the width of the decoded image*/
/*Decode the loaded image in ARGB8888 */
error = lodepng_decode32(&img_data, &png_width, &png_height, png_data, png_data_size);
@@ -157,7 +176,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t *
if(img_data != NULL) {
lv_mem_free(img_data);
}
- LV_LOG_WARN("error %u: %s\n", error, lodepng_error_text(error));
+ LV_LOG_WARN("error %" LV_PRIu32 ": %s\n", error, lodepng_error_text(error));
return LV_RES_INV;
}
@@ -170,8 +189,8 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t *
/*If it's a PNG file in a C array...*/
else if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
const lv_img_dsc_t * img_dsc = dsc->src;
- uint32_t png_width; /*No used, just required by he decoder*/
- uint32_t png_height; /*No used, just required by he decoder*/
+ unsigned png_width; /*No used, just required by he decoder*/
+ unsigned png_height; /*No used, just required by he decoder*/
/*Decode the image in ARGB8888 */
error = lodepng_decode32(&img_data, &png_width, &png_height, img_dsc->data, img_dsc->data_size);
@@ -254,5 +273,3 @@ static void convert_color_depth(uint8_t * img, uint32_t px_cnt)
}
#endif /*LV_USE_PNG*/
-
-
diff --git a/lib/lvgl/src/extra/libs/qrcode/lv_qrcode.c b/lib/lvgl/src/extra/libs/qrcode/lv_qrcode.c
index 079873e..3e7b53f 100644
--- a/lib/lvgl/src/extra/libs/qrcode/lv_qrcode.c
+++ b/lib/lvgl/src/extra/libs/qrcode/lv_qrcode.c
@@ -178,7 +178,6 @@ lv_res_t lv_qrcode_update(lv_obj_t * qrcode, const void * data, uint32_t data_le
return LV_RES_OK;
}
-
void lv_qrcode_delete(lv_obj_t * qrcode)
{
lv_obj_del(qrcode);
diff --git a/lib/lvgl/src/extra/libs/qrcode/qrcodegen.c b/lib/lvgl/src/extra/libs/qrcode/qrcodegen.c
index 37ee742..bd9f08b 100644
--- a/lib/lvgl/src/extra/libs/qrcode/qrcodegen.c
+++ b/lib/lvgl/src/extra/libs/qrcode/qrcodegen.c
@@ -21,11 +21,11 @@
* Software.
*/
-#include
#include
#include
#include
#include "qrcodegen.h"
+#include "../../../misc/lv_assert.h"
#ifndef QRCODEGEN_TEST
#define testable static // Keep functions private
@@ -127,12 +127,12 @@ static const int PENALTY_N4 = 10;
// Public function - see documentation comment in header file.
bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode[],
enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl) {
-
+
size_t textLen = strlen(text);
if (textLen == 0)
return qrcodegen_encodeSegmentsAdvanced(NULL, 0, ecl, minVersion, maxVersion, mask, boostEcl, tempBuffer, qrcode);
size_t bufLen = qrcodegen_BUFFER_LEN_FOR_VERSION(maxVersion);
-
+
struct qrcodegen_Segment seg;
if (qrcodegen_isNumeric(text)) {
if (qrcodegen_calcSegmentBufferSize(qrcodegen_Mode_NUMERIC, textLen) > bufLen)
@@ -155,7 +155,7 @@ bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode
seg.data = tempBuffer;
}
return qrcodegen_encodeSegmentsAdvanced(&seg, 1, ecl, minVersion, maxVersion, mask, boostEcl, tempBuffer, qrcode);
-
+
fail:
qrcode[0] = 0; // Set size to invalid value for safety
return false;
@@ -165,7 +165,7 @@ fail:
// Public function - see documentation comment in header file.
bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcode[],
enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl) {
-
+
struct qrcodegen_Segment seg;
seg.mode = qrcodegen_Mode_BYTE;
seg.bitLength = calcSegmentBitLength(seg.mode, dataLen);
@@ -182,7 +182,7 @@ bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcod
// Appends the given number of low-order bits of the given value to the given byte-based
// bit buffer, increasing the bit length. Requires 0 <= numBits <= 16 and val < 2^numBits.
testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen) {
- assert(0 <= numBits && numBits <= 16 && (unsigned long)val >> numBits == 0);
+ LV_ASSERT(0 <= numBits && numBits <= 16 && (unsigned long)val >> numBits == 0);
for (int i = numBits - 1; i >= 0; i--, (*bitLen)++)
buffer[*bitLen >> 3] |= ((val >> i) & 1) << (7 - (*bitLen & 7));
}
@@ -202,10 +202,10 @@ bool qrcodegen_encodeSegments(const struct qrcodegen_Segment segs[], size_t len,
// Public function - see documentation comment in header file.
bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], size_t len, enum qrcodegen_Ecc ecl,
int minVersion, int maxVersion, int mask, bool boostEcl, uint8_t tempBuffer[], uint8_t qrcode[]) {
- assert(segs != NULL || len == 0);
- assert(qrcodegen_VERSION_MIN <= minVersion && minVersion <= maxVersion && maxVersion <= qrcodegen_VERSION_MAX);
- assert(0 <= (int)ecl && (int)ecl <= 3 && -1 <= (int)mask && (int)mask <= 7);
-
+ LV_ASSERT(segs != NULL || len == 0);
+ LV_ASSERT(qrcodegen_VERSION_MIN <= minVersion && minVersion <= maxVersion && maxVersion <= qrcodegen_VERSION_MAX);
+ LV_ASSERT(0 <= (int)ecl && (int)ecl <= 3 && -1 <= (int)mask && (int)mask <= 7);
+
// Find the minimal version number to use
int version, dataUsedBits;
for (version = minVersion; ; version++) {
@@ -218,14 +218,14 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz
return false;
}
}
- assert(dataUsedBits != -1);
-
+ LV_ASSERT(dataUsedBits != -1);
+
// Increase the error correction level while the data still fits in the current version number
for (int i = (int)qrcodegen_Ecc_MEDIUM; i <= (int)qrcodegen_Ecc_HIGH; i++) { // From low to high
if (boostEcl && dataUsedBits <= getNumDataCodewords(version, (enum qrcodegen_Ecc)i) * 8)
ecl = (enum qrcodegen_Ecc)i;
}
-
+
// Concatenate all segments to create the data bit string
memset(qrcode, 0, qrcodegen_BUFFER_LEN_FOR_VERSION(version) * sizeof(qrcode[0]));
int bitLen = 0;
@@ -236,29 +236,29 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz
for (int j = 0; j < seg->bitLength; j++)
appendBitsToBuffer((seg->data[j >> 3] >> (7 - (j & 7))) & 1, 1, qrcode, &bitLen);
}
- assert(bitLen == dataUsedBits);
-
+ LV_ASSERT(bitLen == dataUsedBits);
+
// Add terminator and pad up to a byte if applicable
int dataCapacityBits = getNumDataCodewords(version, ecl) * 8;
- assert(bitLen <= dataCapacityBits);
+ LV_ASSERT(bitLen <= dataCapacityBits);
int terminatorBits = dataCapacityBits - bitLen;
if (terminatorBits > 4)
terminatorBits = 4;
appendBitsToBuffer(0, terminatorBits, qrcode, &bitLen);
appendBitsToBuffer(0, (8 - bitLen % 8) % 8, qrcode, &bitLen);
- assert(bitLen % 8 == 0);
-
+ LV_ASSERT(bitLen % 8 == 0);
+
// Pad with alternating bytes until data capacity is reached
for (uint8_t padByte = 0xEC; bitLen < dataCapacityBits; padByte ^= 0xEC ^ 0x11)
appendBitsToBuffer(padByte, 8, qrcode, &bitLen);
-
+
// Draw function and data codeword modules
addEccAndInterleave(qrcode, version, ecl, tempBuffer);
initializeFunctionModules(version, qrcode);
drawCodewords(tempBuffer, getNumRawDataModules(version) / 8, qrcode);
drawWhiteFunctionModules(qrcode, version);
initializeFunctionModules(version, tempBuffer);
-
+
// Handle masking
if (mask == qrcodegen_Mask_AUTO) { // Automatically choose best mask
long minPenalty = LONG_MAX;
@@ -274,7 +274,7 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz
applyMask(tempBuffer, qrcode, msk); // Undoes the mask due to XOR
}
}
- assert(0 <= (int)mask && (int)mask <= 7);
+ LV_ASSERT(0 <= (int)mask && (int)mask <= 7);
applyMask(tempBuffer, qrcode, mask);
drawFormatBits(ecl, mask, qrcode);
return true;
@@ -290,14 +290,14 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz
// be clobbered by this function. The final answer is stored in result[0 : rawCodewords].
testable void addEccAndInterleave(uint8_t data[], int version, enum qrcodegen_Ecc ecl, uint8_t result[]) {
// Calculate parameter numbers
- assert(0 <= (int)ecl && (int)ecl < 4 && qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX);
+ LV_ASSERT(0 <= (int)ecl && (int)ecl < 4 && qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX);
int numBlocks = NUM_ERROR_CORRECTION_BLOCKS[(int)ecl][version];
int blockEccLen = ECC_CODEWORDS_PER_BLOCK [(int)ecl][version];
int rawCodewords = getNumRawDataModules(version) / 8;
int dataLen = getNumDataCodewords(version, ecl);
int numShortBlocks = numBlocks - rawCodewords % numBlocks;
int shortBlockDataLen = rawCodewords / numBlocks - blockEccLen;
-
+
// Split data into blocks, calculate ECC, and interleave
// (not concatenate) the bytes into a single sequence
uint8_t generator[qrcodegen_REED_SOLOMON_DEGREE_MAX];
@@ -323,7 +323,7 @@ testable void addEccAndInterleave(uint8_t data[], int version, enum qrcodegen_Ec
// for the given version number and error correction level. The result is in the range [9, 2956].
testable int getNumDataCodewords(int version, enum qrcodegen_Ecc ecl) {
int v = version, e = (int)ecl;
- assert(0 <= e && e < 4);
+ LV_ASSERT(0 <= e && e < 4);
return getNumRawDataModules(v) / 8
- ECC_CODEWORDS_PER_BLOCK [e][v]
* NUM_ERROR_CORRECTION_BLOCKS[e][v];
@@ -334,7 +334,7 @@ testable int getNumDataCodewords(int version, enum qrcodegen_Ecc ecl) {
// all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
// The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
testable int getNumRawDataModules(int ver) {
- assert(qrcodegen_VERSION_MIN <= ver && ver <= qrcodegen_VERSION_MAX);
+ LV_ASSERT(qrcodegen_VERSION_MIN <= ver && ver <= qrcodegen_VERSION_MAX);
int result = (16 * ver + 128) * ver + 64;
if (ver >= 2) {
int numAlign = ver / 7 + 2;
@@ -352,10 +352,10 @@ testable int getNumRawDataModules(int ver) {
// Calculates the Reed-Solomon generator polynomial of the given degree, storing in result[0 : degree].
testable void calcReedSolomonGenerator(int degree, uint8_t result[]) {
// Start with the monomial x^0
- assert(1 <= degree && degree <= qrcodegen_REED_SOLOMON_DEGREE_MAX);
+ LV_ASSERT(1 <= degree && degree <= qrcodegen_REED_SOLOMON_DEGREE_MAX);
memset(result, 0, degree * sizeof(result[0]));
result[degree - 1] = 1;
-
+
// Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),
// drop the highest term, and store the rest of the coefficients in order of descending powers.
// Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
@@ -376,9 +376,9 @@ testable void calcReedSolomonGenerator(int degree, uint8_t result[]) {
// polynomials are in big endian and the generator has an implicit leading 1 term, storing the result in result[0 : degree].
testable void calcReedSolomonRemainder(const uint8_t data[], int dataLen,
const uint8_t generator[], int degree, uint8_t result[]) {
-
+
// Perform polynomial division
- assert(1 <= degree && degree <= qrcodegen_REED_SOLOMON_DEGREE_MAX);
+ LV_ASSERT(1 <= degree && degree <= qrcodegen_REED_SOLOMON_DEGREE_MAX);
memset(result, 0, degree * sizeof(result[0]));
for (int i = 0; i < dataLen; i++) {
uint8_t factor = data[i] ^ result[0];
@@ -415,16 +415,16 @@ testable void initializeFunctionModules(int version, uint8_t qrcode[]) {
int qrsize = version * 4 + 17;
memset(qrcode, 0, ((qrsize * qrsize + 7) / 8 + 1) * sizeof(qrcode[0]));
qrcode[0] = (uint8_t)qrsize;
-
+
// Fill horizontal and vertical timing patterns
fillRectangle(6, 0, 1, qrsize, qrcode);
fillRectangle(0, 6, qrsize, 1, qrcode);
-
+
// Fill 3 finder patterns (all corners except bottom right) and format bits
fillRectangle(0, 0, 9, 9, qrcode);
fillRectangle(qrsize - 8, 0, 8, 9, qrcode);
fillRectangle(0, qrsize - 8, 9, 8, qrcode);
-
+
// Fill numerous alignment patterns
uint8_t alignPatPos[7];
int numAlign = getAlignmentPatternPositions(version, alignPatPos);
@@ -435,7 +435,7 @@ testable void initializeFunctionModules(int version, uint8_t qrcode[]) {
fillRectangle(alignPatPos[i] - 2, alignPatPos[j] - 2, 5, 5, qrcode);
}
}
-
+
// Fill version blocks
if (version >= 7) {
fillRectangle(qrsize - 11, 0, 3, 6, qrcode);
@@ -454,7 +454,7 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) {
setModule(qrcode, 6, i, false);
setModule(qrcode, i, 6, false);
}
-
+
// Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
for (int dy = -4; dy <= 4; dy++) {
for (int dx = -4; dx <= 4; dx++) {
@@ -468,7 +468,7 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) {
}
}
}
-
+
// Draw numerous alignment patterns
uint8_t alignPatPos[7];
int numAlign = getAlignmentPatternPositions(version, alignPatPos);
@@ -482,7 +482,7 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) {
}
}
}
-
+
// Draw version blocks
if (version >= 7) {
// Calculate error correction code and pack bits
@@ -490,8 +490,8 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) {
for (int i = 0; i < 12; i++)
rem = (rem << 1) ^ ((rem >> 11) * 0x1F25);
long bits = (long)version << 12 | rem; // uint18
- assert(bits >> 18 == 0);
-
+ LV_ASSERT(bits >> 18 == 0);
+
// Draw two copies
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 3; j++) {
@@ -510,15 +510,15 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) {
// the format bits, unlike drawWhiteFunctionModules() which might skip black modules.
static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask mask, uint8_t qrcode[]) {
// Calculate error correction code and pack bits
- assert(0 <= (int)mask && (int)mask <= 7);
+ LV_ASSERT(0 <= (int)mask && (int)mask <= 7);
static const int table[] = {1, 0, 3, 2};
int data = table[(int)ecl] << 3 | (int)mask; // errCorrLvl is uint2, mask is uint3
int rem = data;
for (int i = 0; i < 10; i++)
rem = (rem << 1) ^ ((rem >> 9) * 0x537);
int bits = (data << 10 | rem) ^ 0x5412; // uint15
- assert(bits >> 15 == 0);
-
+ LV_ASSERT(bits >> 15 == 0);
+
// Draw first copy
for (int i = 0; i <= 5; i++)
setModule(qrcode, 8, i, getBit(bits, i));
@@ -527,7 +527,7 @@ static void drawFormatBits(enum qrcodegen_Ecc ecl, enum qrcodegen_Mask mask, uin
setModule(qrcode, 7, 8, getBit(bits, 8));
for (int i = 9; i < 15; i++)
setModule(qrcode, 14 - i, 8, getBit(bits, i));
-
+
// Draw second copy
int qrsize = qrcodegen_getSize(qrcode);
for (int i = 0; i < 8; i++)
@@ -591,7 +591,7 @@ static void drawCodewords(const uint8_t data[], int dataLen, uint8_t qrcode[]) {
}
}
}
- assert(i == dataLen * 8);
+ LV_ASSERT(i == dataLen * 8);
}
@@ -601,7 +601,7 @@ static void drawCodewords(const uint8_t data[], int dataLen, uint8_t qrcode[]) {
// the same mask value a second time will undo the mask. A final well-formed
// QR Code needs exactly one (not zero, two, etc.) mask applied.
static void applyMask(const uint8_t functionModules[], uint8_t qrcode[], enum qrcodegen_Mask mask) {
- assert(0 <= (int)mask && (int)mask <= 7); // Disallows qrcodegen_Mask_AUTO
+ LV_ASSERT(0 <= (int)mask && (int)mask <= 7); // Disallows qrcodegen_Mask_AUTO
int qrsize = qrcodegen_getSize(qrcode);
for (int y = 0; y < qrsize; y++) {
for (int x = 0; x < qrsize; x++) {
@@ -617,7 +617,7 @@ static void applyMask(const uint8_t functionModules[], uint8_t qrcode[], enum qr
case 5: invert = x * y % 2 + x * y % 3 == 0; break;
case 6: invert = (x * y % 2 + x * y % 3) % 2 == 0; break;
case 7: invert = ((x + y) % 2 + x * y % 3) % 2 == 0; break;
- default: assert(false); return;
+ default: LV_ASSERT(false); return;
}
bool val = getModule(qrcode, x, y);
setModule(qrcode, x, y, val ^ invert);
@@ -631,7 +631,7 @@ static void applyMask(const uint8_t functionModules[], uint8_t qrcode[], enum qr
static long getPenaltyScore(const uint8_t qrcode[]) {
int qrsize = qrcodegen_getSize(qrcode);
long result = 0;
-
+
// Adjacent modules in row having same color, and finder-like patterns
for (int y = 0; y < qrsize; y++) {
unsigned char runHistory[7] = {0};
@@ -684,7 +684,7 @@ static long getPenaltyScore(const uint8_t qrcode[]) {
if (hasFinderLikePattern(runHistory))
result += PENALTY_N3;
}
-
+
// 2*2 blocks of modules having same color
for (int y = 0; y < qrsize - 1; y++) {
for (int x = 0; x < qrsize - 1; x++) {
@@ -695,7 +695,7 @@ static long getPenaltyScore(const uint8_t qrcode[]) {
result += PENALTY_N2;
}
}
-
+
// Balance of black and white modules
int black = 0;
for (int y = 0; y < qrsize; y++) {
@@ -737,9 +737,9 @@ static bool hasFinderLikePattern(const unsigned char runHistory[7]) {
// Public function - see documentation comment in header file.
int qrcodegen_getSize(const uint8_t qrcode[]) {
- assert(qrcode != NULL);
+ LV_ASSERT(qrcode != NULL);
int result = qrcode[0];
- assert((qrcodegen_VERSION_MIN * 4 + 17) <= result
+ LV_ASSERT((qrcodegen_VERSION_MIN * 4 + 17) <= result
&& result <= (qrcodegen_VERSION_MAX * 4 + 17));
return result;
}
@@ -747,7 +747,7 @@ int qrcodegen_getSize(const uint8_t qrcode[]) {
// Public function - see documentation comment in header file.
bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y) {
- assert(qrcode != NULL);
+ LV_ASSERT(qrcode != NULL);
int qrsize = qrcode[0];
return (0 <= x && x < qrsize && 0 <= y && y < qrsize) && getModule(qrcode, x, y);
}
@@ -756,7 +756,7 @@ bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y) {
// Gets the module at the given coordinates, which must be in bounds.
testable bool getModule(const uint8_t qrcode[], int x, int y) {
int qrsize = qrcode[0];
- assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize);
+ LV_ASSERT(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize);
int index = y * qrsize + x;
return getBit(qrcode[(index >> 3) + 1], index & 7);
}
@@ -765,7 +765,7 @@ testable bool getModule(const uint8_t qrcode[], int x, int y) {
// Sets the module at the given coordinates, which must be in bounds.
testable void setModule(uint8_t qrcode[], int x, int y, bool isBlack) {
int qrsize = qrcode[0];
- assert(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize);
+ LV_ASSERT(21 <= qrsize && qrsize <= 177 && 0 <= x && x < qrsize && 0 <= y && y < qrsize);
int index = y * qrsize + x;
int bitIndex = index & 7;
int byteIndex = (index >> 3) + 1;
@@ -795,7 +795,7 @@ static bool getBit(int x, int i) {
// Public function - see documentation comment in header file.
bool qrcodegen_isAlphanumeric(const char *text) {
- assert(text != NULL);
+ LV_ASSERT(text != NULL);
for (; *text != '\0'; text++) {
if (strchr(ALPHANUMERIC_CHARSET, *text) == NULL)
return false;
@@ -806,7 +806,7 @@ bool qrcodegen_isAlphanumeric(const char *text) {
// Public function - see documentation comment in header file.
bool qrcodegen_isNumeric(const char *text) {
- assert(text != NULL);
+ LV_ASSERT(text != NULL);
for (; *text != '\0'; text++) {
if (*text < '0' || *text > '9')
return false;
@@ -820,7 +820,7 @@ size_t qrcodegen_calcSegmentBufferSize(enum qrcodegen_Mode mode, size_t numChars
int temp = calcSegmentBitLength(mode, numChars);
if (temp == -1)
return SIZE_MAX;
- assert(0 <= temp && temp <= INT16_MAX);
+ LV_ASSERT(0 <= temp && temp <= INT16_MAX);
return ((size_t)temp + 7) / 8;
}
@@ -849,10 +849,10 @@ testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars) {
else if (mode == qrcodegen_Mode_ECI && numChars == 0)
result = 3 * 8;
else { // Invalid argument
- assert(false);
+ LV_ASSERT(false);
return -1;
}
- assert(result >= 0);
+ LV_ASSERT(result >= 0);
if ((unsigned int)result > (unsigned int)INT16_MAX)
return -1;
return (int)result;
@@ -861,11 +861,11 @@ testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars) {
// Public function - see documentation comment in header file.
struct qrcodegen_Segment qrcodegen_makeBytes(const uint8_t data[], size_t len, uint8_t buf[]) {
- assert(data != NULL || len == 0);
+ LV_ASSERT(data != NULL || len == 0);
struct qrcodegen_Segment result;
result.mode = qrcodegen_Mode_BYTE;
result.bitLength = calcSegmentBitLength(result.mode, len);
- assert(result.bitLength != -1);
+ LV_ASSERT(result.bitLength != -1);
result.numChars = (int)len;
if (len > 0)
memcpy(buf, data, len * sizeof(buf[0]));
@@ -876,22 +876,22 @@ struct qrcodegen_Segment qrcodegen_makeBytes(const uint8_t data[], size_t len, u
// Public function - see documentation comment in header file.
struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]) {
- assert(digits != NULL);
+ LV_ASSERT(digits != NULL);
struct qrcodegen_Segment result;
size_t len = strlen(digits);
result.mode = qrcodegen_Mode_NUMERIC;
int bitLen = calcSegmentBitLength(result.mode, len);
- assert(bitLen != -1);
+ LV_ASSERT(bitLen != -1);
result.numChars = (int)len;
if (bitLen > 0)
memset(buf, 0, ((size_t)bitLen + 7) / 8 * sizeof(buf[0]));
result.bitLength = 0;
-
+
unsigned int accumData = 0;
int accumCount = 0;
for (; *digits != '\0'; digits++) {
char c = *digits;
- assert('0' <= c && c <= '9');
+ LV_ASSERT('0' <= c && c <= '9');
accumData = accumData * 10 + (unsigned int)(c - '0');
accumCount++;
if (accumCount == 3) {
@@ -902,7 +902,7 @@ struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]
}
if (accumCount > 0) // 1 or 2 digits remaining
appendBitsToBuffer(accumData, accumCount * 3 + 1, buf, &result.bitLength);
- assert(result.bitLength == bitLen);
+ LV_ASSERT(result.bitLength == bitLen);
result.data = buf;
return result;
}
@@ -910,22 +910,22 @@ struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]
// Public function - see documentation comment in header file.
struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char *text, uint8_t buf[]) {
- assert(text != NULL);
+ LV_ASSERT(text != NULL);
struct qrcodegen_Segment result;
size_t len = strlen(text);
result.mode = qrcodegen_Mode_ALPHANUMERIC;
int bitLen = calcSegmentBitLength(result.mode, len);
- assert(bitLen != -1);
+ LV_ASSERT(bitLen != -1);
result.numChars = (int)len;
if (bitLen > 0)
memset(buf, 0, ((size_t)bitLen + 7) / 8 * sizeof(buf[0]));
result.bitLength = 0;
-
+
unsigned int accumData = 0;
int accumCount = 0;
for (; *text != '\0'; text++) {
const char *temp = strchr(ALPHANUMERIC_CHARSET, *text);
- assert(temp != NULL);
+ LV_ASSERT(temp != NULL);
accumData = accumData * 45 + (unsigned int)(temp - ALPHANUMERIC_CHARSET);
accumCount++;
if (accumCount == 2) {
@@ -936,7 +936,7 @@ struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char *text, uint8_t bu
}
if (accumCount > 0) // 1 character remaining
appendBitsToBuffer(accumData, 6, buf, &result.bitLength);
- assert(result.bitLength == bitLen);
+ LV_ASSERT(result.bitLength == bitLen);
result.data = buf;
return result;
}
@@ -949,7 +949,7 @@ struct qrcodegen_Segment qrcodegen_makeEci(long assignVal, uint8_t buf[]) {
result.numChars = 0;
result.bitLength = 0;
if (assignVal < 0) {
- assert(false);
+ LV_ASSERT(false);
} else if (assignVal < (1 << 7)) {
memset(buf, 0, 1 * sizeof(buf[0]));
appendBitsToBuffer(assignVal, 8, buf, &result.bitLength);
@@ -963,7 +963,7 @@ struct qrcodegen_Segment qrcodegen_makeEci(long assignVal, uint8_t buf[]) {
appendBitsToBuffer(assignVal >> 10, 11, buf, &result.bitLength);
appendBitsToBuffer(assignVal & 0x3FF, 10, buf, &result.bitLength);
} else {
- assert(false);
+ LV_ASSERT(false);
}
result.data = buf;
return result;
@@ -974,22 +974,22 @@ struct qrcodegen_Segment qrcodegen_makeEci(long assignVal, uint8_t buf[]) {
// Returns a non-negative number if successful. Otherwise returns -1 if a segment has too
// many characters to fit its length field, or the total bits exceeds INT16_MAX.
testable int getTotalBits(const struct qrcodegen_Segment segs[], size_t len, int version) {
- assert(segs != NULL || len == 0);
+ LV_ASSERT(segs != NULL || len == 0);
long result = 0;
for (size_t i = 0; i < len; i++) {
int numChars = segs[i].numChars;
int bitLength = segs[i].bitLength;
- assert(0 <= numChars && numChars <= INT16_MAX);
- assert(0 <= bitLength && bitLength <= INT16_MAX);
+ LV_ASSERT(0 <= numChars && numChars <= INT16_MAX);
+ LV_ASSERT(0 <= bitLength && bitLength <= INT16_MAX);
int ccbits = numCharCountBits(segs[i].mode, version);
- assert(0 <= ccbits && ccbits <= 16);
+ LV_ASSERT(0 <= ccbits && ccbits <= 16);
if (numChars >= (1L << ccbits))
return -1; // The segment's length doesn't fit the field's bit width
result += 4L + ccbits + bitLength;
if (result > INT16_MAX)
return -1; // The sum might overflow an int type
}
- assert(0 <= result && result <= INT16_MAX);
+ LV_ASSERT(0 <= result && result <= INT16_MAX);
return (int)result;
}
@@ -997,7 +997,7 @@ testable int getTotalBits(const struct qrcodegen_Segment segs[], size_t len, int
// Returns the bit width of the character count field for a segment in the given mode
// in a QR Code at the given version number. The result is in the range [0, 16].
static int numCharCountBits(enum qrcodegen_Mode mode, int version) {
- assert(qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX);
+ LV_ASSERT(qrcodegen_VERSION_MIN <= version && version <= qrcodegen_VERSION_MAX);
int i = (version + 7) / 17;
switch (mode) {
case qrcodegen_Mode_NUMERIC : { static const int temp[] = {10, 12, 14}; return temp[i]; }
@@ -1005,7 +1005,7 @@ static int numCharCountBits(enum qrcodegen_Mode mode, int version) {
case qrcodegen_Mode_BYTE : { static const int temp[] = { 8, 16, 16}; return temp[i]; }
case qrcodegen_Mode_KANJI : { static const int temp[] = { 8, 10, 12}; return temp[i]; }
case qrcodegen_Mode_ECI : return 0;
- default: assert(false); return -1; // Dummy value
+ default: LV_ASSERT(false); return -1; // Dummy value
}
}
diff --git a/lib/lvgl/src/extra/libs/rlottie/lv_rlottie.c b/lib/lvgl/src/extra/libs/rlottie/lv_rlottie.c
index a264948..730bb70 100644
--- a/lib/lvgl/src/extra/libs/rlottie/lv_rlottie.c
+++ b/lib/lvgl/src/extra/libs/rlottie/lv_rlottie.c
@@ -150,7 +150,6 @@ static void lv_rlottie_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
lv_obj_update_layout(obj);
}
-
static void lv_rlottie_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
{
LV_UNUSED(class_p);
diff --git a/lib/lvgl/src/extra/libs/sjpg/lv_sjpg.c b/lib/lvgl/src/extra/libs/sjpg/lv_sjpg.c
index 5a12ea2..1ec6b2b 100644
--- a/lib/lvgl/src/extra/libs/sjpg/lv_sjpg.c
+++ b/lib/lvgl/src/extra/libs/sjpg/lv_sjpg.c
@@ -85,7 +85,6 @@ typedef struct {
uint32_t raw_sjpg_data_next_read_pos; //Used for all types.
} io_source_t;
-
typedef struct {
uint8_t * sjpeg_data;
uint32_t sjpeg_data_size;
@@ -440,7 +439,6 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t *
JRESULT rc = jd_prepare(&jd_tmp, input_func, workb_temp, (size_t)TJPGD_WORKBUFF_SIZE, &io_source_temp);
lv_mem_free(workb_temp);
-
if(rc == JDR_OK) {
sjpeg->sjpeg_x_res = jd_tmp.width;
sjpeg->sjpeg_y_res = jd_tmp.height;
@@ -508,14 +506,12 @@ end:
uint8_t buff[22];
memset(buff, 0, sizeof(buff));
-
lv_fs_file_t lv_file;
lv_fs_res_t res = lv_fs_open(&lv_file, fn, LV_FS_MODE_RD);
if(res != LV_FS_RES_OK) {
return 78;
}
-
uint32_t rn;
res = lv_fs_read(&lv_file, buff, 22, &rn);
if(res != LV_FS_RES_OK || rn != 22) {
@@ -647,7 +643,6 @@ end:
lv_mem_free(workb_temp);
-
if(rc == JDR_OK) {
sjpeg->sjpeg_x_res = jd_tmp.width;
sjpeg->sjpeg_y_res = jd_tmp.height;
@@ -787,7 +782,6 @@ static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc
#else
#error Unsupported LV_COLOR_DEPTH
-
#endif // LV_COLOR_DEPTH
return LV_RES_OK;
}
@@ -852,7 +846,6 @@ static lv_res_t decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc
#else
#error Unsupported LV_COLOR_DEPTH
-
#endif // LV_COLOR_DEPTH
return LV_RES_OK;
diff --git a/lib/lvgl/src/extra/libs/tiny_ttf/lv_tiny_ttf.c b/lib/lvgl/src/extra/libs/tiny_ttf/lv_tiny_ttf.c
new file mode 100644
index 0000000..c275bfe
--- /dev/null
+++ b/lib/lvgl/src/extra/libs/tiny_ttf/lv_tiny_ttf.c
@@ -0,0 +1,284 @@
+#include "lv_tiny_ttf.h"
+
+#if LV_USE_TINY_TTF
+#include
+#include "../../../misc/lv_lru.h"
+
+#define STB_RECT_PACK_IMPLEMENTATION
+#define STBRP_STATIC
+#define STBTT_STATIC
+#define STB_TRUETYPE_IMPLEMENTATION
+#define STBTT_HEAP_FACTOR_SIZE_32 50
+#define STBTT_HEAP_FACTOR_SIZE_128 20
+#define STBTT_HEAP_FACTOR_SIZE_DEFAULT 10
+#define STBTT_malloc(x, u) ((void)(u), lv_mem_alloc(x))
+#define STBTT_free(x, u) ((void)(u), lv_mem_free(x))
+#define TTF_MALLOC(x) (lv_mem_alloc(x))
+#define TTF_FREE(x) (lv_mem_free(x))
+
+#if LV_TINY_TTF_FILE_SUPPORT
+/* a hydra stream that can be in memory or from a file*/
+typedef struct ttf_cb_stream {
+ lv_fs_file_t * file;
+ const void * data;
+ size_t size;
+ size_t position;
+} ttf_cb_stream_t;
+
+static void ttf_cb_stream_read(ttf_cb_stream_t * stream, void * data, size_t to_read)
+{
+ if(stream->file != NULL) {
+ uint32_t br;
+ lv_fs_read(stream->file, data, to_read, &br);
+ }
+ else {
+ if(to_read + stream->position >= stream->size) {
+ to_read = stream->size - stream->position;
+ }
+ lv_memcpy(data, ((const unsigned char *)stream->data + stream->position), to_read);
+ stream->position += to_read;
+ }
+}
+static void ttf_cb_stream_seek(ttf_cb_stream_t * stream, size_t position)
+{
+ if(stream->file != NULL) {
+ lv_fs_seek(stream->file, position, LV_FS_SEEK_SET);
+ }
+ else {
+ if(position > stream->size) {
+ stream->position = stream->size;
+ }
+ else {
+ stream->position = position;
+ }
+ }
+}
+
+/* for stream support */
+#define STBTT_STREAM_TYPE ttf_cb_stream_t *
+#define STBTT_STREAM_SEEK(s, x) ttf_cb_stream_seek(s, x);
+#define STBTT_STREAM_READ(s, x, y) ttf_cb_stream_read(s, x, y);
+#endif /*LV_TINY_TTF_FILE_SUPPORT*/
+
+#include "stb_rect_pack.h"
+#include "stb_truetype_htcw.h"
+
+typedef struct ttf_font_desc {
+ lv_fs_file_t file;
+#if LV_TINY_TTF_FILE_SUPPORT
+ ttf_cb_stream_t stream;
+#else
+ const uint8_t * stream;
+#endif
+ stbtt_fontinfo info;
+ float scale;
+ int ascent;
+ int descent;
+ lv_lru_t * bitmap_cache;
+} ttf_font_desc_t;
+
+typedef struct ttf_bitmap_cache_key {
+ uint32_t unicode_letter;
+ lv_coord_t line_height;
+} ttf_bitmap_cache_key_t;
+
+static bool ttf_get_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter,
+ uint32_t unicode_letter_next)
+{
+ if(unicode_letter < 0x20 ||
+ unicode_letter == 0xf8ff || /*LV_SYMBOL_DUMMY*/
+ unicode_letter == 0x200c) { /*ZERO WIDTH NON-JOINER*/
+ dsc_out->box_w = 0;
+ dsc_out->adv_w = 0;
+ dsc_out->box_h = 0; /*height of the bitmap in [px]*/
+ dsc_out->ofs_x = 0; /*X offset of the bitmap in [pf]*/
+ dsc_out->ofs_y = 0; /*Y offset of the bitmap in [pf]*/
+ dsc_out->bpp = 0;
+ dsc_out->is_placeholder = false;
+ return true;
+ }
+ ttf_font_desc_t * dsc = (ttf_font_desc_t *)font->dsc;
+ int g1 = stbtt_FindGlyphIndex(&dsc->info, (int)unicode_letter);
+ if(g1 == 0) {
+ /* Glyph not found */
+ return false;
+ }
+ int x1, y1, x2, y2;
+
+ stbtt_GetGlyphBitmapBox(&dsc->info, g1, dsc->scale, dsc->scale, &x1, &y1, &x2, &y2);
+ int g2 = 0;
+ if(unicode_letter_next != 0) {
+ g2 = stbtt_FindGlyphIndex(&dsc->info, (int)unicode_letter_next);
+ }
+ int advw, lsb;
+ stbtt_GetGlyphHMetrics(&dsc->info, g1, &advw, &lsb);
+ int k = stbtt_GetGlyphKernAdvance(&dsc->info, g1, g2);
+ dsc_out->adv_w = (uint16_t)floor((((float)advw + (float)k) * dsc->scale) +
+ 0.5f); /*Horizontal space required by the glyph in [px]*/
+
+ dsc_out->adv_w = (uint16_t)floor((((float)advw + (float)k) * dsc->scale) +
+ 0.5f); /*Horizontal space required by the glyph in [px]*/
+ dsc_out->box_w = (x2 - x1 + 1); /*width of the bitmap in [px]*/
+ dsc_out->box_h = (y2 - y1 + 1); /*height of the bitmap in [px]*/
+ dsc_out->ofs_x = x1; /*X offset of the bitmap in [pf]*/
+ dsc_out->ofs_y = -y2; /*Y offset of the bitmap measured from the as line*/
+ dsc_out->bpp = 8; /*Bits per pixel: 1/2/4/8*/
+ dsc_out->is_placeholder = false;
+ return true; /*true: glyph found; false: glyph was not found*/
+}
+
+static const uint8_t * ttf_get_glyph_bitmap_cb(const lv_font_t * font, uint32_t unicode_letter)
+{
+ ttf_font_desc_t * dsc = (ttf_font_desc_t *)font->dsc;
+ const stbtt_fontinfo * info = (const stbtt_fontinfo *)&dsc->info;
+ int g1 = stbtt_FindGlyphIndex(info, (int)unicode_letter);
+ if(g1 == 0) {
+ /* Glyph not found */
+ return NULL;
+ }
+ int x1, y1, x2, y2;
+ stbtt_GetGlyphBitmapBox(info, g1, dsc->scale, dsc->scale, &x1, &y1, &x2, &y2);
+ int w, h;
+ w = x2 - x1 + 1;
+ h = y2 - y1 + 1;
+ uint32_t stride = w;
+ /*Try to load from cache*/
+ ttf_bitmap_cache_key_t cache_key;
+ lv_memset(&cache_key, 0, sizeof(cache_key)); /*Zero padding*/
+ cache_key.unicode_letter = unicode_letter;
+ cache_key.line_height = font->line_height;
+ uint8_t * buffer = NULL;
+ lv_lru_get(dsc->bitmap_cache, &cache_key, sizeof(cache_key), (void **)&buffer);
+ if(buffer) {
+ return buffer;
+ }
+ LV_LOG_TRACE("cache miss for letter: %u", unicode_letter);
+ /*Prepare space in cache*/
+ size_t szb = h * stride;
+ buffer = lv_mem_alloc(szb);
+ if(!buffer) {
+ LV_LOG_ERROR("failed to allocate cache value");
+ return NULL;
+ }
+ lv_memset(buffer, 0, szb);
+ if(LV_LRU_OK != lv_lru_set(dsc->bitmap_cache, &cache_key, sizeof(cache_key), buffer, szb)) {
+ LV_LOG_ERROR("failed to add cache value");
+ lv_mem_free(buffer);
+ return NULL;
+ }
+ /*Render into cache*/
+ stbtt_MakeGlyphBitmap(info, buffer, w, h, stride, dsc->scale, dsc->scale, g1);
+ return buffer;
+}
+
+static lv_font_t * lv_tiny_ttf_create(const char * path, const void * data, size_t data_size, lv_coord_t font_size,
+ size_t cache_size)
+{
+ if((path == NULL && data == NULL) || 0 >= font_size) {
+ LV_LOG_ERROR("tiny_ttf: invalid argument\n");
+ return NULL;
+ }
+ ttf_font_desc_t * dsc = (ttf_font_desc_t *)TTF_MALLOC(sizeof(ttf_font_desc_t));
+ if(dsc == NULL) {
+ LV_LOG_ERROR("tiny_ttf: out of memory\n");
+ return NULL;
+ }
+#if LV_TINY_TTF_FILE_SUPPORT
+ if(path != NULL) {
+ if(LV_FS_RES_OK != lv_fs_open(&dsc->file, path, LV_FS_MODE_RD)) {
+ LV_LOG_ERROR("tiny_ttf: unable to open %s\n", path);
+ goto err_after_dsc;
+ }
+ dsc->stream.file = &dsc->file;
+ }
+ else {
+ dsc->stream.file = NULL;
+ dsc->stream.data = (const uint8_t *)data;
+ dsc->stream.size = data_size;
+ dsc->stream.position = 0;
+ }
+ if(0 == stbtt_InitFont(&dsc->info, &dsc->stream, stbtt_GetFontOffsetForIndex(&dsc->stream, 0))) {
+ LV_LOG_ERROR("tiny_ttf: init failed\n");
+ goto err_after_dsc;
+ }
+
+#else
+ dsc->stream = (const uint8_t *)data;
+ LV_UNUSED(data_size);
+ if(0 == stbtt_InitFont(&dsc->info, dsc->stream, stbtt_GetFontOffsetForIndex(dsc->stream, 0))) {
+ LV_LOG_ERROR("tiny_ttf: init failed\n");
+ goto err_after_dsc;
+ }
+#endif
+
+ dsc->bitmap_cache = lv_lru_create(cache_size, font_size * font_size, lv_mem_free, lv_mem_free);
+ if(dsc->bitmap_cache == NULL) {
+ LV_LOG_ERROR("failed to create lru cache");
+ goto err_after_dsc;
+ }
+
+ lv_font_t * out_font = (lv_font_t *)TTF_MALLOC(sizeof(lv_font_t));
+ if(out_font == NULL) {
+ LV_LOG_ERROR("tiny_ttf: out of memory\n");
+ goto err_after_bitmap_cache;
+ }
+ lv_memset(out_font, 0, sizeof(lv_font_t));
+ out_font->get_glyph_dsc = ttf_get_glyph_dsc_cb;
+ out_font->get_glyph_bitmap = ttf_get_glyph_bitmap_cb;
+ out_font->dsc = dsc;
+ lv_tiny_ttf_set_size(out_font, font_size);
+ return out_font;
+err_after_bitmap_cache:
+ lv_lru_del(dsc->bitmap_cache);
+err_after_dsc:
+ TTF_FREE(dsc);
+ return NULL;
+}
+#if LV_TINY_TTF_FILE_SUPPORT
+lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t font_size, size_t cache_size)
+{
+ return lv_tiny_ttf_create(path, NULL, 0, font_size, cache_size);
+}
+lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t font_size)
+{
+ return lv_tiny_ttf_create_file_ex(path, font_size, 4096);
+}
+#endif /*LV_TINY_TTF_FILE_SUPPORT*/
+lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t font_size, size_t cache_size)
+{
+ return lv_tiny_ttf_create(NULL, data, data_size, font_size, cache_size);
+}
+lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t font_size)
+{
+ return lv_tiny_ttf_create_data_ex(data, data_size, font_size, 4096);
+}
+void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t font_size)
+{
+ if(font_size <= 0) {
+ LV_LOG_ERROR("invalid font size: %"PRIx32, font_size);
+ return;
+ }
+ ttf_font_desc_t * dsc = (ttf_font_desc_t *)font->dsc;
+ dsc->scale = stbtt_ScaleForMappingEmToPixels(&dsc->info, font_size);
+ int line_gap = 0;
+ stbtt_GetFontVMetrics(&dsc->info, &dsc->ascent, &dsc->descent, &line_gap);
+ font->line_height = (lv_coord_t)(dsc->scale * (dsc->ascent - dsc->descent + line_gap));
+ font->base_line = (lv_coord_t)(dsc->scale * (line_gap - dsc->descent));
+}
+void lv_tiny_ttf_destroy(lv_font_t * font)
+{
+ if(font != NULL) {
+ if(font->dsc != NULL) {
+ ttf_font_desc_t * ttf = (ttf_font_desc_t *)font->dsc;
+#if LV_TINY_TTF_FILE_SUPPORT
+ if(ttf->stream.file != NULL) {
+ lv_fs_close(&ttf->file);
+ }
+#endif
+ lv_lru_del(ttf->bitmap_cache);
+ TTF_FREE(ttf);
+ }
+ TTF_FREE(font);
+ }
+}
+#endif /*LV_USE_TINY_TTF*/
diff --git a/lib/lvgl/src/extra/libs/tiny_ttf/lv_tiny_ttf.h b/lib/lvgl/src/extra/libs/tiny_ttf/lv_tiny_ttf.h
new file mode 100644
index 0000000..fe0936b
--- /dev/null
+++ b/lib/lvgl/src/extra/libs/tiny_ttf/lv_tiny_ttf.h
@@ -0,0 +1,62 @@
+/**
+ * @file lv_tiny_ttf.h
+ *
+ */
+
+#ifndef LV_TINY_TTF_H
+#define LV_TINY_TTF_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lvgl.h"
+
+#if LV_USE_TINY_TTF
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+#if LV_TINY_TTF_FILE_SUPPORT
+/* create a font from the specified file or path with the specified line height.*/
+lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t font_size);
+
+/* create a font from the specified file or path with the specified line height with the specified cache size.*/
+lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t font_size, size_t cache_size);
+#endif /*LV_TINY_TTF_FILE_SUPPORT*/
+
+/* create a font from the specified data pointer with the specified line height.*/
+lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t font_size);
+
+/* create a font from the specified data pointer with the specified line height and the specified cache size.*/
+lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t font_size, size_t cache_size);
+
+/* set the size of the font to a new font_size*/
+void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t font_size);
+
+/* destroy a font previously created with lv_tiny_ttf_create_xxxx()*/
+void lv_tiny_ttf_destroy(lv_font_t * font);
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_USE_TINY_TTF*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_TINY_TTF_H*/
diff --git a/lib/lvgl/src/extra/libs/tiny_ttf/stb_rect_pack.h b/lib/lvgl/src/extra/libs/tiny_ttf/stb_rect_pack.h
new file mode 100644
index 0000000..b265df9
--- /dev/null
+++ b/lib/lvgl/src/extra/libs/tiny_ttf/stb_rect_pack.h
@@ -0,0 +1,633 @@
+// stb_rect_pack.h - v1.01 - public domain - rectangle packing
+// Sean Barrett 2014
+//
+// Useful for e.g. packing rectangular textures into an atlas.
+// Does not do rotation.
+//
+// Before #including,
+//
+// #define STB_RECT_PACK_IMPLEMENTATION
+//
+// in the file that you want to have the implementation.
+//
+// Not necessarily the awesomest packing method, but better than
+// the totally naive one in stb_truetype (which is primarily what
+// this is meant to replace).
+//
+// Has only had a few tests run, may have issues.
+//
+// More docs to come.
+//
+// No memory allocations; uses qsort() and assert() from stdlib.
+// Can override those by defining STBRP_SORT and STBRP_ASSERT.
+//
+// This library currently uses the Skyline Bottom-Left algorithm.
+//
+// Please note: better rectangle packers are welcome! Please
+// implement them to the same API, but with a different init
+// function.
+//
+// Credits
+//
+// Library
+// Sean Barrett
+// Minor features
+// Martins Mozeiko
+// github:IntellectualKitty
+//
+// Bugfixes / warning fixes
+// Jeremy Jaussaud
+// Fabian Giesen
+//
+// Version history:
+//
+// 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section
+// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles
+// 0.99 (2019-02-07) warning fixes
+// 0.11 (2017-03-03) return packing success/fail result
+// 0.10 (2016-10-25) remove cast-away-const to avoid warnings
+// 0.09 (2016-08-27) fix compiler warnings
+// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
+// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
+// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
+// 0.05: added STBRP_ASSERT to allow replacing assert
+// 0.04: fixed minor bug in STBRP_LARGE_RECTS support
+// 0.01: initial release
+//
+// LICENSE
+//
+// See end of file for license information.
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// INCLUDE SECTION
+//
+
+#ifndef STB_INCLUDE_STB_RECT_PACK_H
+#define STB_INCLUDE_STB_RECT_PACK_H
+
+#define STB_RECT_PACK_VERSION 1
+
+#ifdef STBRP_STATIC
+ #define STBRP_DEF static
+#else
+ #define STBRP_DEF extern
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/// @cond
+/**
+ * Tells Doxygen to ignore a duplicate declaration
+ */
+typedef struct stbrp_context stbrp_context;
+typedef struct stbrp_node stbrp_node;
+typedef struct stbrp_rect stbrp_rect;
+/// @endcond
+
+typedef int stbrp_coord;
+
+#define STBRP__MAXVAL 0x7fffffff
+// Mostly for internal use, but this is the maximum supported coordinate value.
+
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
+STBRP_DEF int stbrp_pack_rects(stbrp_context * context, stbrp_rect * rects, int num_rects);
+// Assign packed locations to rectangles. The rectangles are of type
+// 'stbrp_rect' defined below, stored in the array 'rects', and there
+// are 'num_rects' many of them.
+//
+// Rectangles which are successfully packed have the 'was_packed' flag
+// set to a non-zero value and 'x' and 'y' store the minimum location
+// on each axis (i.e. bottom-left in cartesian coordinates, top-left
+// if you imagine y increasing downwards). Rectangles which do not fit
+// have the 'was_packed' flag set to 0.
+//
+// You should not try to access the 'rects' array from another thread
+// while this function is running, as the function temporarily reorders
+// the array while it executes.
+//
+// To pack into another rectangle, you need to call stbrp_init_target
+// again. To continue packing into the same rectangle, you can call
+// this function again. Calling this multiple times with multiple rect
+// arrays will probably produce worse packing results than calling it
+// a single time with the full rectangle array, but the option is
+// available.
+//
+// The function returns 1 if all of the rectangles were successfully
+// packed and 0 otherwise.
+
+struct stbrp_rect {
+ // reserved for your use:
+ int id;
+
+ // input:
+ stbrp_coord w, h;
+
+ // output:
+ stbrp_coord x, y;
+ int was_packed; // non-zero if valid packing
+
+}; // 16 bytes, nominally
+
+STBRP_DEF void stbrp_init_target(stbrp_context * context, int width, int height, stbrp_node * nodes, int num_nodes);
+// Initialize a rectangle packer to:
+// pack a rectangle that is 'width' by 'height' in dimensions
+// using temporary storage provided by the array 'nodes', which is 'num_nodes' long
+//
+// You must call this function every time you start packing into a new target.
+//
+// There is no "shutdown" function. The 'nodes' memory must stay valid for
+// the following stbrp_pack_rects() call (or calls), but can be freed after
+// the call (or calls) finish.
+//
+// Note: to guarantee best results, either:
+// 1. make sure 'num_nodes' >= 'width'
+// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1'
+//
+// If you don't do either of the above things, widths will be quantized to multiples
+// of small integers to guarantee the algorithm doesn't run out of temporary storage.
+//
+// If you do #2, then the non-quantized algorithm will be used, but the algorithm
+// may run out of temporary storage and be unable to pack some rectangles.
+
+STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context * context, int allow_out_of_mem);
+// Optionally call this function after init but before doing any packing to
+// change the handling of the out-of-temp-memory scenario, described above.
+// If you call init again, this will be reset to the default (false).
+
+STBRP_DEF void stbrp_setup_heuristic(stbrp_context * context, int heuristic);
+// Optionally select which packing heuristic the library should use. Different
+// heuristics will produce better/worse results for different data sets.
+// If you call init again, this will be reset to the default.
+
+enum {
+ STBRP_HEURISTIC_Skyline_default = 0,
+ STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
+ STBRP_HEURISTIC_Skyline_BF_sortHeight
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// the details of the following structures don't matter to you, but they must
+// be visible so you can handle the memory allocations for them
+
+struct stbrp_node {
+ stbrp_coord x, y;
+ stbrp_node * next;
+};
+
+struct stbrp_context {
+ int width;
+ int height;
+ int align;
+ int init_mode;
+ int heuristic;
+ int num_nodes;
+ stbrp_node * active_head;
+ stbrp_node * free_head;
+ stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2'
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// IMPLEMENTATION SECTION
+//
+
+#ifdef STB_RECT_PACK_IMPLEMENTATION
+#ifndef STBRP_SORT
+ #include
+ #define STBRP_SORT qsort
+#endif
+
+#ifndef STBRP_ASSERT
+ #include
+ #define STBRP_ASSERT assert
+#endif
+
+#ifdef _MSC_VER
+ #define STBRP__NOTUSED(v) (void)(v)
+ #define STBRP__CDECL __cdecl
+#else
+ #define STBRP__NOTUSED(v) (void)sizeof(v)
+ #define STBRP__CDECL
+#endif
+
+enum {
+ STBRP__INIT_skyline = 1
+};
+
+STBRP_DEF void stbrp_setup_heuristic(stbrp_context * context, int heuristic)
+{
+ switch(context->init_mode) {
+ case STBRP__INIT_skyline:
+ STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight);
+ context->heuristic = heuristic;
+ break;
+ default:
+ STBRP_ASSERT(0);
+ }
+}
+
+STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context * context, int allow_out_of_mem)
+{
+ if(allow_out_of_mem)
+ // if it's ok to run out of memory, then don't bother aligning them;
+ // this gives better packing, but may fail due to OOM (even though
+ // the rectangles easily fit). @TODO a smarter approach would be to only
+ // quantize once we've hit OOM, then we could get rid of this parameter.
+ context->align = 1;
+ else {
+ // if it's not ok to run out of memory, then quantize the widths
+ // so that num_nodes is always enough nodes.
+ //
+ // I.e. num_nodes * align >= width
+ // align >= width / num_nodes
+ // align = ceil(width/num_nodes)
+
+ context->align = (context->width + context->num_nodes - 1) / context->num_nodes;
+ }
+}
+
+STBRP_DEF void stbrp_init_target(stbrp_context * context, int width, int height, stbrp_node * nodes, int num_nodes)
+{
+ int i;
+
+ for(i = 0; i < num_nodes - 1; ++i)
+ nodes[i].next = &nodes[i + 1];
+ nodes[i].next = NULL;
+ context->init_mode = STBRP__INIT_skyline;
+ context->heuristic = STBRP_HEURISTIC_Skyline_default;
+ context->free_head = &nodes[0];
+ context->active_head = &context->extra[0];
+ context->width = width;
+ context->height = height;
+ context->num_nodes = num_nodes;
+ stbrp_setup_allow_out_of_mem(context, 0);
+
+ // node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly)
+ context->extra[0].x = 0;
+ context->extra[0].y = 0;
+ context->extra[0].next = &context->extra[1];
+ context->extra[1].x = (stbrp_coord) width;
+ context->extra[1].y = (1 << 30);
+ context->extra[1].next = NULL;
+}
+
+// find minimum y position if it starts at x1
+static int stbrp__skyline_find_min_y(stbrp_context * c, stbrp_node * first, int x0, int width, int * pwaste)
+{
+ stbrp_node * node = first;
+ int x1 = x0 + width;
+ int min_y, visited_width, waste_area;
+
+ STBRP__NOTUSED(c);
+
+ STBRP_ASSERT(first->x <= x0);
+
+#if 0
+ // skip in case we're past the node
+ while(node->next->x <= x0)
+ ++node;
+#else
+ STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency
+#endif
+
+ STBRP_ASSERT(node->x <= x0);
+
+ min_y = 0;
+ waste_area = 0;
+ visited_width = 0;
+ while(node->x < x1) {
+ if(node->y > min_y) {
+ // raise min_y higher.
+ // we've accounted for all waste up to min_y,
+ // but we'll now add more waste for everything we've visited
+ waste_area += visited_width * (node->y - min_y);
+ min_y = node->y;
+ // the first time through, visited_width might be reduced
+ if(node->x < x0)
+ visited_width += node->next->x - x0;
+ else
+ visited_width += node->next->x - node->x;
+ }
+ else {
+ // add waste area
+ int under_width = node->next->x - node->x;
+ if(under_width + visited_width > width)
+ under_width = width - visited_width;
+ waste_area += under_width * (min_y - node->y);
+ visited_width += under_width;
+ }
+ node = node->next;
+ }
+
+ *pwaste = waste_area;
+ return min_y;
+}
+
+typedef struct {
+ int x, y;
+ stbrp_node ** prev_link;
+} stbrp__findresult;
+
+static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context * c, int width, int height)
+{
+ int best_waste = (1 << 30), best_x, best_y = (1 << 30);
+ stbrp__findresult fr;
+ stbrp_node ** prev, * node, * tail, ** best = NULL;
+
+ // align to multiple of c->align
+ width = (width + c->align - 1);
+ width -= width % c->align;
+ STBRP_ASSERT(width % c->align == 0);
+
+ // if it can't possibly fit, bail immediately
+ if(width > c->width || height > c->height) {
+ fr.prev_link = NULL;
+ fr.x = fr.y = 0;
+ return fr;
+ }
+
+ node = c->active_head;
+ prev = &c->active_head;
+ while(node->x + width <= c->width) {
+ int y, waste;
+ y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste);
+ if(c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL
+ // bottom left
+ if(y < best_y) {
+ best_y = y;
+ best = prev;
+ }
+ }
+ else {
+ // best-fit
+ if(y + height <= c->height) {
+ // can only use it if it first vertically
+ if(y < best_y || (y == best_y && waste < best_waste)) {
+ best_y = y;
+ best_waste = waste;
+ best = prev;
+ }
+ }
+ }
+ prev = &node->next;
+ node = node->next;
+ }
+
+ best_x = (best == NULL) ? 0 : (*best)->x;
+
+ // if doing best-fit (BF), we also have to try aligning right edge to each node position
+ //
+ // e.g, if fitting
+ //
+ // ____________________
+ // |____________________|
+ //
+ // into
+ //
+ // | |
+ // | ____________|
+ // |____________|
+ //
+ // then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned
+ //
+ // This makes BF take about 2x the time
+
+ if(c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) {
+ tail = c->active_head;
+ node = c->active_head;
+ prev = &c->active_head;
+ // find first node that's admissible
+ while(tail->x < width)
+ tail = tail->next;
+ while(tail) {
+ int xpos = tail->x - width;
+ int y, waste;
+ STBRP_ASSERT(xpos >= 0);
+ // find the left position that matches this
+ while(node->next->x <= xpos) {
+ prev = &node->next;
+ node = node->next;
+ }
+ STBRP_ASSERT(node->next->x > xpos && node->x <= xpos);
+ y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste);
+ if(y + height <= c->height) {
+ if(y <= best_y) {
+ if(y < best_y || waste < best_waste || (waste == best_waste && xpos < best_x)) {
+ best_x = xpos;
+ STBRP_ASSERT(y <= best_y);
+ best_y = y;
+ best_waste = waste;
+ best = prev;
+ }
+ }
+ }
+ tail = tail->next;
+ }
+ }
+
+ fr.prev_link = best;
+ fr.x = best_x;
+ fr.y = best_y;
+ return fr;
+}
+
+static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context * context, int width, int height)
+{
+ // find best position according to heuristic
+ stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
+ stbrp_node * node, * cur;
+
+ // bail if:
+ // 1. it failed
+ // 2. the best node doesn't fit (we don't always check this)
+ // 3. we're out of memory
+ if(res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) {
+ res.prev_link = NULL;
+ return res;
+ }
+
+ // on success, create new node
+ node = context->free_head;
+ node->x = (stbrp_coord) res.x;
+ node->y = (stbrp_coord)(res.y + height);
+
+ context->free_head = node->next;
+
+ // insert the new node into the right starting point, and
+ // let 'cur' point to the remaining nodes needing to be
+ // stiched back in
+
+ cur = *res.prev_link;
+ if(cur->x < res.x) {
+ // preserve the existing one, so start testing with the next one
+ stbrp_node * next = cur->next;
+ cur->next = node;
+ cur = next;
+ }
+ else {
+ *res.prev_link = node;
+ }
+
+ // from here, traverse cur and free the nodes, until we get to one
+ // that shouldn't be freed
+ while(cur->next && cur->next->x <= res.x + width) {
+ stbrp_node * next = cur->next;
+ // move the current node to the free list
+ cur->next = context->free_head;
+ context->free_head = cur;
+ cur = next;
+ }
+
+ // stitch the list back in
+ node->next = cur;
+
+ if(cur->x < res.x + width)
+ cur->x = (stbrp_coord)(res.x + width);
+
+#ifdef _DEBUG
+ cur = context->active_head;
+ while(cur->x < context->width) {
+ STBRP_ASSERT(cur->x < cur->next->x);
+ cur = cur->next;
+ }
+ STBRP_ASSERT(cur->next == NULL);
+
+ {
+ int count = 0;
+ cur = context->active_head;
+ while(cur) {
+ cur = cur->next;
+ ++count;
+ }
+ cur = context->free_head;
+ while(cur) {
+ cur = cur->next;
+ ++count;
+ }
+ STBRP_ASSERT(count == context->num_nodes + 2);
+ }
+#endif
+
+ return res;
+}
+
+static int STBRP__CDECL rect_height_compare(const void * a, const void * b)
+{
+ const stbrp_rect * p = (const stbrp_rect *) a;
+ const stbrp_rect * q = (const stbrp_rect *) b;
+ if(p->h > q->h)
+ return -1;
+ if(p->h < q->h)
+ return 1;
+ return (p->w > q->w) ? -1 : (p->w < q->w);
+}
+
+static int STBRP__CDECL rect_original_order(const void * a, const void * b)
+{
+ const stbrp_rect * p = (const stbrp_rect *) a;
+ const stbrp_rect * q = (const stbrp_rect *) b;
+ return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
+}
+
+STBRP_DEF int stbrp_pack_rects(stbrp_context * context, stbrp_rect * rects, int num_rects)
+{
+ int i, all_rects_packed = 1;
+
+ // we use the 'was_packed' field internally to allow sorting/unsorting
+ for(i = 0; i < num_rects; ++i) {
+ rects[i].was_packed = i;
+ }
+
+ // sort according to heuristic
+ STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
+
+ for(i = 0; i < num_rects; ++i) {
+ if(rects[i].w == 0 || rects[i].h == 0) {
+ rects[i].x = rects[i].y = 0; // empty rect needs no space
+ }
+ else {
+ stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
+ if(fr.prev_link) {
+ rects[i].x = (stbrp_coord) fr.x;
+ rects[i].y = (stbrp_coord) fr.y;
+ }
+ else {
+ rects[i].x = rects[i].y = STBRP__MAXVAL;
+ }
+ }
+ }
+
+ // unsort
+ STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
+
+ // set was_packed flags and all_rects_packed status
+ for(i = 0; i < num_rects; ++i) {
+ rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
+ if(!rects[i].was_packed)
+ all_rects_packed = 0;
+ }
+
+ // return the all_rects_packed status
+ return all_rects_packed;
+}
+#endif
+
+#if defined(__GNUC__) || defined(__clang__)
+ #pragma GCC diagnostic pop
+#endif
+
+/*
+------------------------------------------------------------------------------
+This software is available under 2 licenses -- choose whichever you prefer.
+------------------------------------------------------------------------------
+ALTERNATIVE A - MIT License
+Copyright (c) 2017 Sean Barrett
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+------------------------------------------------------------------------------
+ALTERNATIVE B - Public Domain (www.unlicense.org)
+This is free and unencumbered software released into the public domain.
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+------------------------------------------------------------------------------
+*/
diff --git a/lib/lvgl/src/extra/libs/tiny_ttf/stb_truetype_htcw.h b/lib/lvgl/src/extra/libs/tiny_ttf/stb_truetype_htcw.h
new file mode 100644
index 0000000..e91997b
--- /dev/null
+++ b/lib/lvgl/src/extra/libs/tiny_ttf/stb_truetype_htcw.h
@@ -0,0 +1,5558 @@
+// stb_truetype.h - v1.26htcw (fork to enable streaming and low memory environments)
+// stb_truetype.h - v1.26 - public domain
+// authored from 2009-2021 by Sean Barrett / RAD Game Tools
+//
+// =======================================================================
+//
+// NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES
+//
+// This library does no range checking of the offsets found in the file,
+// meaning an attacker can use it to read arbitrary memory.
+//
+// =======================================================================
+//
+// This library processes TrueType files:
+// parse files
+// extract glyph metrics
+// extract glyph shapes
+// render glyphs to one-channel bitmaps with antialiasing (box filter)
+// render glyphs to one-channel SDF bitmaps (signed-distance field/function)
+//
+// Todo:
+// non-MS cmaps
+// crashproof on bad data
+// hinting? (no longer patented)
+// cleartype-style AA?
+// optimize: use simple memory allocator for intermediates
+// optimize: build edge-list directly from curves
+// optimize: rasterize directly from curves?
+//
+// ADDITIONAL CONTRIBUTORS
+//
+// Mikko Mononen: compound shape support, more cmap formats
+// Tor Andersson: kerning, subpixel rendering
+// Dougall Johnson: OpenType / Type 2 font handling
+// Daniel Ribeiro Maciel: basic GPOS-based kerning
+//
+// Misc other:
+// Ryan Gordon
+// Simon Glass
+// github:IntellectualKitty
+// Imanol Celaya
+// Daniel Ribeiro Maciel
+//
+// Bug/warning reports/fixes:
+// "Zer" on mollyrocket Fabian "ryg" Giesen github:NiLuJe
+// Cass Everitt Martins Mozeiko github:aloucks
+// stoiko (Haemimont Games) Cap Petschulat github:oyvindjam
+// Brian Hook Omar Cornut github:vassvik
+// Walter van Niftrik Ryan Griege
+// David Gow Peter LaValle
+// David Given Sergey Popov
+// Ivan-Assen Ivanov Giumo X. Clanjor
+// Anthony Pesch Higor Euripedes
+// Johan Duparc Thomas Fields
+// Hou Qiming Derek Vinyard
+// Rob Loach Cort Stratton
+// Kenney Phillis Jr. Brian Costabile
+// Ken Voskuil (kaesve)
+//
+// VERSION HISTORY
+//
+// 1.26 (2021-08-28) fix broken rasterizer
+// 1.25 (2021-07-11) many fixes
+// 1.24 (2020-02-05) fix warning
+// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS)
+// 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined
+// 1.21 (2019-02-25) fix warning
+// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics()
+// 1.19 (2018-02-11) GPOS kerning, STBTT_fmod
+// 1.18 (2018-01-29) add missing function
+// 1.17 (2017-07-23) make more arguments const; doc fix
+// 1.16 (2017-07-12) SDF support
+// 1.15 (2017-03-03) make more arguments const
+// 1.14 (2017-01-16) num-fonts-in-TTC function
+// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts
+// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual
+// 1.11 (2016-04-02) fix unused-variable warning
+// 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef
+// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly
+// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges
+// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints;
+// variant PackFontRanges to pack and render in separate phases;
+// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);
+// fixed an assert() bug in the new rasterizer
+// replace assert() with STBTT_assert() in new rasterizer
+//
+// Full history can be found at the end of this file.
+//
+// LICENSE
+//
+// See end of file for license information.
+//
+// USAGE
+//
+// Include this file in whatever places need to refer to it. In ONE C/C++
+// file, write:
+// #define STB_TRUETYPE_IMPLEMENTATION
+// before the #include of this file. This expands out the actual
+// implementation into that C/C++ file.
+//
+// To make the implementation private to the file that generates the implementation,
+// #define STBTT_STATIC
+//
+// Simple 3D API (don't ship this, but it's fine for tools and quick start)
+// stbtt_BakeFontBitmap() -- bake a font to a bitmap for use as texture
+// stbtt_GetBakedQuad() -- compute quad to draw for a given char
+//
+// Improved 3D API (more shippable):
+// #include "stb_rect_pack.h" -- optional, but you really want it
+// stbtt_PackBegin()
+// stbtt_PackSetOversampling() -- for improved quality on small fonts
+// stbtt_PackFontRanges() -- pack and renders
+// stbtt_PackEnd()
+// stbtt_GetPackedQuad()
+//
+// "Load" a font file from a memory buffer (you have to keep the buffer loaded)
+// stbtt_InitFont()
+// stbtt_GetFontOffsetForIndex() -- indexing for TTC font collections
+// stbtt_GetNumberOfFonts() -- number of fonts for TTC font collections
+//
+// Render a unicode codepoint to a bitmap
+// stbtt_GetCodepointBitmap() -- allocates and returns a bitmap
+// stbtt_MakeCodepointBitmap() -- renders into bitmap you provide
+// stbtt_GetCodepointBitmapBox() -- how big the bitmap must be
+//
+// Character advance/positioning
+// stbtt_GetCodepointHMetrics()
+// stbtt_GetFontVMetrics()
+// stbtt_GetFontVMetricsOS2()
+// stbtt_GetCodepointKernAdvance()
+//
+// Starting with version 1.06, the rasterizer was replaced with a new,
+// faster and generally-more-precise rasterizer. The new rasterizer more
+// accurately measures pixel coverage for anti-aliasing, except in the case
+// where multiple shapes overlap, in which case it overestimates the AA pixel
+// coverage. Thus, anti-aliasing of intersecting shapes may look wrong. If
+// this turns out to be a problem, you can re-enable the old rasterizer with
+// #define STBTT_RASTERIZER_VERSION 1
+// which will incur about a 15% speed hit.
+//
+// ADDITIONAL DOCUMENTATION
+//
+// Immediately after this block comment are a series of sample programs.
+//
+// After the sample programs is the "header file" section. This section
+// includes documentation for each API function.
+//
+// Some important concepts to understand to use this library:
+//
+// Codepoint
+// Characters are defined by unicode codepoints, e.g. 65 is
+// uppercase A, 231 is lowercase c with a cedilla, 0x7e30 is
+// the hiragana for "ma".
+//
+// Glyph
+// A visual character shape (every codepoint is rendered as
+// some glyph)
+//
+// Glyph index
+// A font-specific integer ID representing a glyph
+//
+// Baseline
+// Glyph shapes are defined relative to a baseline, which is the
+// bottom of uppercase characters. Characters extend both above
+// and below the baseline.
+//
+// Current Point
+// As you draw text to the screen, you keep track of a "current point"
+// which is the origin of each character. The current point's vertical
+// position is the baseline. Even "baked fonts" use this model.
+//
+// Vertical Font Metrics
+// The vertical qualities of the font, used to vertically position
+// and space the characters. See docs for stbtt_GetFontVMetrics.
+//
+// Font Size in Pixels or Points
+// The preferred interface for specifying font sizes in stb_truetype
+// is to specify how tall the font's vertical extent should be in pixels.
+// If that sounds good enough, skip the next paragraph.
+//
+// Most font APIs instead use "points", which are a common typographic
+// measurement for describing font size, defined as 72 points per inch.
+// stb_truetype provides a point API for compatibility. However, true
+// "per inch" conventions don't make much sense on computer displays
+// since different monitors have different number of pixels per
+// inch. For example, Windows traditionally uses a convention that
+// there are 96 pixels per inch, thus making 'inch' measurements have
+// nothing to do with inches, and thus effectively defining a point to
+// be 1.333 pixels. Additionally, the TrueType font data provides
+// an explicit scale factor to scale a given font's glyphs to points,
+// but the author has observed that this scale factor is often wrong
+// for non-commercial fonts, thus making fonts scaled in points
+// according to the TrueType spec incoherently sized in practice.
+//
+// DETAILED USAGE:
+//
+// Scale:
+// Select how high you want the font to be, in points or pixels.
+// Call ScaleForPixelHeight or ScaleForMappingEmToPixels to compute
+// a scale factor SF that will be used by all other functions.
+//
+// Baseline:
+// You need to select a y-coordinate that is the baseline of where
+// your text will appear. Call GetFontBoundingBox to get the baseline-relative
+// bounding box for all characters. SF*-y0 will be the distance in pixels
+// that the worst-case character could extend above the baseline, so if
+// you want the top edge of characters to appear at the top of the
+// screen where y=0, then you would set the baseline to SF*-y0.
+//
+// Current point:
+// Set the current point where the first character will appear. The
+// first character could extend left of the current point; this is font
+// dependent. You can either choose a current point that is the leftmost
+// point and hope, or add some padding, or check the bounding box or
+// left-side-bearing of the first character to be displayed and set
+// the current point based on that.
+//
+// Displaying a character:
+// Compute the bounding box of the character. It will contain signed values
+// relative to . I.e. if it returns x0,y0,x1,y1,
+// then the character should be displayed in the rectangle from
+// to = 32 && *text < 128) {
+ stbtt_aligned_quad q;
+ stbtt_GetBakedQuad(cdata, 512, 512, *text - 32, &x, &y, &q, 1);//1=opengl & d3d10+,0=d3d9
+ glTexCoord2f(q.s0, q.t0);
+ glVertex2f(q.x0, q.y0);
+ glTexCoord2f(q.s1, q.t0);
+ glVertex2f(q.x1, q.y0);
+ glTexCoord2f(q.s1, q.t1);
+ glVertex2f(q.x1, q.y1);
+ glTexCoord2f(q.s0, q.t1);
+ glVertex2f(q.x0, q.y1);
+ }
+ ++text;
+ }
+ glEnd();
+}
+#endif
+//
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// Complete program (this compiles): get a single bitmap, print as ASCII art
+//
+#if 0
+#include
+#define STB_TRUETYPE_IMPLEMENTATION // force following include to generate implementation
+#include "stb_truetype.h"
+
+char ttf_buffer[1 << 25];
+
+int main(int argc, char ** argv)
+{
+ stbtt_fontinfo font;
+ unsigned char * bitmap;
+ int w, h, i, j, c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20);
+
+ fread(ttf_buffer, 1, 1 << 25, fopen(argc > 3 ? argv[3] : "c:/windows/fonts/arialbd.ttf", "rb"));
+
+ stbtt_InitFont(&font, ttf_buffer, stbtt_GetFontOffsetForIndex(ttf_buffer, 0));
+ bitmap = stbtt_GetCodepointBitmap(&font, 0, stbtt_ScaleForPixelHeight(&font, s), c, &w, &h, 0, 0);
+
+ for(j = 0; j < h; ++j) {
+ for(i = 0; i < w; ++i)
+ putchar(" .:ioVM@"[bitmap[j * w + i] >> 5]);
+ putchar('\n');
+ }
+ return 0;
+}
+#endif
+//
+// Output:
+//
+// .ii.
+// @@@@@@.
+// V@Mio@@o
+// :i. V@V
+// :oM@@M
+// :@@@MM@M
+// @@o o@M
+// :@@. M@M
+// @@@o@@@@
+// :M@@V:@@.
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// Complete program: print "Hello World!" banner, with bugs
+//
+#if 0
+char buffer[24 << 20];
+unsigned char screen[20][79];
+
+int main(int arg, char ** argv)
+{
+ stbtt_fontinfo font;
+ int i, j, ascent, baseline, ch = 0;
+ float scale, xpos = 2; // leave a little padding in case the character extends left
+ char * text = "Heljo World!"; // intentionally misspelled to show 'lj' brokenness
+
+ fread(buffer, 1, 1000000, fopen("c:/windows/fonts/arialbd.ttf", "rb"));
+ stbtt_InitFont(&font, buffer, 0);
+
+ scale = stbtt_ScaleForPixelHeight(&font, 15);
+ stbtt_GetFontVMetrics(&font, &ascent, 0, 0);
+ baseline = (int)(ascent * scale);
+
+ while(text[ch]) {
+ int advance, lsb, x0, y0, x1, y1;
+ float x_shift = xpos - (float)floor(xpos);
+ stbtt_GetCodepointHMetrics(&font, text[ch], &advance, &lsb);
+ stbtt_GetCodepointBitmapBoxSubpixel(&font, text[ch], scale, scale, x_shift, 0, &x0, &y0, &x1, &y1);
+ stbtt_MakeCodepointBitmapSubpixel(&font, &screen[baseline + y0][(int)xpos + x0], x1 - x0, y1 - y0, 79, scale, scale,
+ x_shift, 0, text[ch]);
+ // note that this stomps the old data, so where character boxes overlap (e.g. 'lj') it's wrong
+ // because this API is really for baking character bitmaps into textures. if you want to render
+ // a sequence of characters, you really need to render each bitmap to a temp buffer, then
+ // "alpha blend" that into the working buffer
+ xpos += (advance * scale);
+ if(text[ch + 1])
+ xpos += scale * stbtt_GetCodepointKernAdvance(&font, text[ch], text[ch + 1]);
+ ++ch;
+ }
+
+ for(j = 0; j < 20; ++j) {
+ for(i = 0; i < 78; ++i)
+ putchar(" .:ioVM@"[screen[j][i] >> 5]);
+ putchar('\n');
+ }
+
+ return 0;
+}
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+////
+//// INTEGRATION WITH YOUR CODEBASE
+////
+//// The following sections allow you to supply alternate definitions
+//// of C library functions used by stb_truetype, e.g. if you don't
+//// link with the C runtime library.
+
+#ifdef STB_TRUETYPE_IMPLEMENTATION
+// #define your own (u)stbtt_int8/16/32 before including to override this
+#ifndef stbtt_uint8
+ typedef unsigned char stbtt_uint8;
+ typedef signed char stbtt_int8;
+ typedef unsigned short stbtt_uint16;
+ typedef signed short stbtt_int16;
+ typedef unsigned int stbtt_uint32;
+ typedef signed int stbtt_int32;
+#endif
+
+typedef char stbtt__check_size32[sizeof(stbtt_int32) == 4 ? 1 : -1];
+typedef char stbtt__check_size16[sizeof(stbtt_int16) == 2 ? 1 : -1];
+
+// define STBTT_STDIO_STREAM to stream from a FILE object
+// instead of from memory. Or define STBTT_STREAM_TYPE,
+// STBTT_STREAM_READ and STBTT_STREAM_SEEK to implement
+// another streaming source
+#ifdef STBTT_STDIO_STREAM
+ #include
+ #define STBTT_STREAM_TYPE FILE*
+ #define STBTT_STREAM_READ(s,x,y) fread(x,1,y,s);
+ #define STBTT_STREAM_SEEK(s,x) fseek(s,x,SEEK_SET);
+#endif
+
+// heap factor sizes for various counts of objects
+// adjust for your platform. Below is suitable for
+// modern PC class machines.
+#ifndef STBTT_HEAP_FACTOR_SIZE_32
+ #define STBTT_HEAP_FACTOR_SIZE_32 2000
+#endif
+
+#ifndef STBTT_HEAP_FACTOR_SIZE_128
+ #define STBTT_HEAP_FACTOR_SIZE_128 800
+#endif
+
+#ifndef STBTT_HEAP_FACTOR_SIZE_DEFAULT
+ #define STBTT_HEAP_FACTOR_SIZE_DEFAULT 100
+#endif
+
+// e.g. #define your own STBTT_ifloor/STBTT_iceil() to avoid math.h
+#ifndef STBTT_ifloor
+ #include
+ #define STBTT_ifloor(x) ((int) floor(x))
+ #define STBTT_iceil(x) ((int) ceil(x))
+#endif
+
+#ifndef STBTT_sqrt
+ #include
+ #define STBTT_sqrt(x) (float)sqrt(x)
+ #define STBTT_pow(x,y) pow(x,y)
+#endif
+
+#ifndef STBTT_fmod
+ #include
+ #define STBTT_fmod(x,y) fmod(x,y)
+#endif
+
+#ifndef STBTT_cos
+ #include
+ #define STBTT_cos(x) cos(x)
+ #define STBTT_acos(x) acos(x)
+#endif
+
+#ifndef STBTT_fabs
+ #include
+ #define STBTT_fabs(x) (float)fabs(x)
+#endif
+
+// #define your own functions "STBTT_malloc" / "STBTT_free" to avoid malloc.h
+#ifndef STBTT_malloc
+ #include
+ #define STBTT_malloc(x,u) ((void)(u),malloc(x))
+ #define STBTT_free(x,u) ((void)(u),free(x))
+#endif
+
+#ifndef STBTT_assert
+ #include
+ #define STBTT_assert(x) assert(x)
+#endif
+
+#ifndef STBTT_strlen
+ #include
+ #define STBTT_strlen(x) strlen(x)
+#endif
+
+#ifndef STBTT_memcpy
+ #include
+ #define STBTT_memcpy memcpy
+ #define STBTT_memset memset
+#endif
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+////
+//// INTERFACE
+////
+////
+
+#ifndef __STB_INCLUDE_STB_TRUETYPE_H__
+#define __STB_INCLUDE_STB_TRUETYPE_H__
+
+#ifdef STBTT_STATIC
+ #define STBTT_DEF static
+#else
+ #define STBTT_DEF extern
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// private structure
+typedef struct {
+#ifdef STBTT_STREAM_TYPE
+ STBTT_STREAM_TYPE data;
+ stbtt_uint32 offset;
+#else
+ unsigned char * data;
+#endif
+ int cursor;
+ int size;
+} stbtt__buf;
+
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// TEXTURE BAKING API
+//
+// If you use this API, you only have to call two functions ever.
+//
+
+typedef struct {
+ unsigned short x0, y0, x1, y1; // coordinates of bbox in bitmap
+ float xoff, yoff, xadvance;
+} stbtt_bakedchar;
+
+typedef struct {
+ float x0, y0, s0, t0; // top-left
+ float x1, y1, s1, t1; // bottom-right
+} stbtt_aligned_quad;
+
+STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar * chardata, int pw, int ph, // same data as above
+ int char_index, // character to display
+ float * xpos, float * ypos, // pointers to current position in screen pixel space
+ stbtt_aligned_quad * q, // output: quad to draw
+ int opengl_fillrule); // true if opengl fill rule; false if DX9 or earlier
+// Call GetBakedQuad with char_index = 'character - first_char', and it
+// creates the quad you need to draw and advances the current position.
+//
+// The coordinate system used assumes y increases downwards.
+//
+// Characters will extend both above and below the current position;
+// see discussion of "BASELINE" above.
+//
+// It's inefficient; you might want to c&p it and optimize it.
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// NEW TEXTURE BAKING API
+//
+// This provides options for packing multiple fonts into one atlas, not
+// perfectly but better than nothing.
+
+typedef struct {
+ unsigned short x0, y0, x1, y1; // coordinates of bbox in bitmap
+ float xoff, yoff, xadvance;
+ float xoff2, yoff2;
+} stbtt_packedchar;
+
+/// @cond
+/**
+ * Tells Doxygen to ignore a duplicate declaration
+ */
+typedef struct stbtt_pack_context stbtt_pack_context;
+typedef struct stbtt_fontinfo stbtt_fontinfo;
+/// @endcond
+
+#ifndef STB_RECT_PACK_VERSION
+/// @cond
+/**
+ * Tells Doxygen to ignore a duplicate declaration
+ */
+typedef struct stbrp_rect stbrp_rect;
+/// @endcond
+
+#endif
+STBTT_DEF int stbtt_PackBegin(stbtt_pack_context * spc, unsigned char * pixels, int width, int height,
+ int stride_in_bytes, int padding, void * alloc_context);
+
+// Initializes a packing context stored in the passed-in stbtt_pack_context.
+// Future calls using this context will pack characters into the bitmap passed
+// in here: a 1-channel bitmap that is width * height. stride_in_bytes is
+// the distance from one row to the next (or 0 to mean they are packed tightly
+// together). "padding" is the amount of padding to leave between each
+// character (normally you want '1' for bitmaps you'll use as textures with
+// bilinear filtering).
+//
+// Returns 0 on failure, 1 on success.
+
+STBTT_DEF void stbtt_PackEnd(stbtt_pack_context * spc);
+// Cleans up the packing context and frees all memory.
+
+#define STBTT_POINT_SIZE(x) (-(x))
+
+typedef struct {
+ float font_size;
+ int first_unicode_codepoint_in_range; // if non-zero, then the chars are continuous, and this is the first codepoint
+ int * array_of_unicode_codepoints; // if non-zero, then this is an array of unicode codepoints
+ int num_chars;
+ stbtt_packedchar * chardata_for_range; // output
+ unsigned char h_oversample, v_oversample; // don't set these, they're used internally
+} stbtt_pack_range;
+
+STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context * spc, unsigned int h_oversample,
+ unsigned int v_oversample);
+// Oversampling a font increases the quality by allowing higher-quality subpixel
+// positioning, and is especially valuable at smaller text sizes.
+//
+// This function sets the amount of oversampling for all following calls to
+// stbtt_PackFontRange(s) or stbtt_PackFontRangesGatherRects for a given
+// pack context. The default (no oversampling) is achieved by h_oversample=1
+// and v_oversample=1. The total number of pixels required is
+// h_oversample*v_oversample larger than the default; for example, 2x2
+// oversampling requires 4x the storage of 1x1. For best results, render
+// oversampled textures with bilinear filtering. Look at the readme in
+// stb/tests/oversample for information about oversampled fonts
+//
+// To use with PackFontRangesGather etc., you must set it before calls
+// call to PackFontRangesGatherRects.
+
+STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context * spc, int skip);
+// If skip != 0, this tells stb_truetype to skip any codepoints for which
+// there is no corresponding glyph. If skip=0, which is the default, then
+// codepoints without a glyph received the font's "missing character" glyph,
+// typically an empty box by convention.
+
+STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar * chardata, int pw, int ph, // same data as above
+ int char_index, // character to display
+ float * xpos, float * ypos, // pointers to current position in screen pixel space
+ stbtt_aligned_quad * q, // output: quad to draw
+ int align_to_integer);
+
+STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context * spc, const stbtt_fontinfo * info,
+ stbtt_pack_range * ranges, int num_ranges, stbrp_rect * rects);
+STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context * spc, stbrp_rect * rects, int num_rects);
+STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context * spc, const stbtt_fontinfo * info,
+ stbtt_pack_range * ranges, int num_ranges, stbrp_rect * rects);
+// Calling these functions in sequence is roughly equivalent to calling
+// stbtt_PackFontRanges(). If you more control over the packing of multiple
+// fonts, or if you want to pack custom data into a font texture, take a look
+// at the source to of stbtt_PackFontRanges() and create a custom version
+// using these functions, e.g. call GatherRects multiple times,
+// building up a single array of rects, then call PackRects once,
+// then call RenderIntoRects repeatedly. This may result in a
+// better packing than calling PackFontRanges multiple times
+// (or it may not).
+
+// this is an opaque structure that you shouldn't mess with which holds
+// all the context needed from PackBegin to PackEnd.
+struct stbtt_pack_context {
+ void * user_allocator_context;
+ void * pack_info;
+ int width;
+ int height;
+ int stride_in_bytes;
+ int padding;
+ int skip_missing;
+ unsigned int h_oversample, v_oversample;
+ unsigned char * pixels;
+ void * nodes;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// FONT LOADING
+//
+//
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_GetNumberOfFonts(STBTT_STREAM_TYPE data);
+#else
+STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char * data);
+#endif
+// This function will determine the number of fonts in a font file. TrueType
+// collection (.ttc) files may contain multiple fonts, while TrueType font
+// (.ttf) files only contain one font. The number of fonts can be used for
+// indexing with the previous function where the index is between zero and one
+// less than the total fonts. If an error occurs, -1 is returned.
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_GetFontOffsetForIndex(STBTT_STREAM_TYPE, int index);
+#else
+STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char * data, int index);
+#endif
+
+// Each .ttf/.ttc file may have more than one font. Each font has a sequential
+// index number starting from 0. Call this function to get the font offset for
+// a given index; it returns -1 if the index is out of range. A regular .ttf
+// file will only define one font and it always be at offset 0, so it will
+// return '0' for index 0, and -1 for all other indices.
+
+// The following structure is defined publicly so you can declare one on
+// the stack or as a global or etc, but you should treat it as opaque.
+struct stbtt_fontinfo {
+ void * userdata;
+#ifdef STBTT_STREAM_TYPE
+ STBTT_STREAM_TYPE data;
+#else
+ unsigned char * data; // pointer to .ttf file
+#endif
+ int fontstart; // offset of start of font
+
+ int numGlyphs; // number of glyphs, needed for range checking
+
+ int loca, head, glyf, hhea, hmtx, kern, gpos, svg; // table locations as offset from start of .ttf
+ int index_map; // a cmap mapping for our chosen character encoding
+ int indexToLocFormat; // format needed to map from glyph index to glyph
+
+ stbtt__buf cff; // cff font data
+ stbtt__buf charstrings; // the charstring index
+ stbtt__buf gsubrs; // global charstring subroutines index
+ stbtt__buf subrs; // private charstring subroutines index
+ stbtt__buf fontdicts; // array of font dicts
+ stbtt__buf fdselect; // map from glyph to fontdict
+};
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_InitFont(stbtt_fontinfo * info, STBTT_STREAM_TYPE data, int offset);
+#else
+STBTT_DEF int stbtt_InitFont(stbtt_fontinfo * info, const unsigned char * data, int offset);
+#endif
+// Given an offset into the file that defines a font, this function builds
+// the necessary cached info for the rest of the system. You must allocate
+// the stbtt_fontinfo yourself, and stbtt_InitFont will fill it out. You don't
+// need to do anything special to free it, because the contents are pure
+// value data with no additional data structures. Returns 0 on failure.
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CHARACTER TO GLYPH-INDEX CONVERSIOn
+
+STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo * info, int unicode_codepoint);
+// If you're going to perform multiple operations on the same character
+// and you want a speed-up, call this function with the character you're
+// going to process, then use glyph-based functions instead of the
+// codepoint-based functions.
+// Returns 0 if the character codepoint is not defined in the font.
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CHARACTER PROPERTIES
+//
+
+STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo * info, float pixels);
+// computes a scale factor to produce a font whose "height" is 'pixels' tall.
+// Height is measured as the distance from the highest ascender to the lowest
+// descender; in other words, it's equivalent to calling stbtt_GetFontVMetrics
+// and computing:
+// scale = pixels / (ascent - descent)
+// so if you prefer to measure height by the ascent only, use a similar calculation.
+
+STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo * info, float pixels);
+// computes a scale factor to produce a font whose EM size is mapped to
+// 'pixels' tall. This is probably what traditional APIs compute, but
+// I'm not positive.
+
+STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo * info, int * ascent, int * descent, int * lineGap);
+// ascent is the coordinate above the baseline the font extends; descent
+// is the coordinate below the baseline the font extends (i.e. it is typically negative)
+// lineGap is the spacing between one row's descent and the next row's ascent...
+// so you should advance the vertical position by "*ascent - *descent + *lineGap"
+// these are expressed in unscaled coordinates, so you must multiply by
+// the scale factor for a given size
+
+STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo * info, int * typoAscent, int * typoDescent,
+ int * typoLineGap);
+// analogous to GetFontVMetrics, but returns the "typographic" values from the OS/2
+// table (specific to MS/Windows TTF files).
+//
+// Returns 1 on success (table present), 0 on failure.
+
+STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo * info, int * x0, int * y0, int * x1, int * y1);
+// the bounding box around all possible characters
+
+STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo * info, int codepoint, int * advanceWidth,
+ int * leftSideBearing);
+// leftSideBearing is the offset from the current horizontal position to the left edge of the character
+// advanceWidth is the offset from the current horizontal position to the next horizontal position
+// these are expressed in unscaled coordinates
+
+STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo * info, int ch1, int ch2);
+// an additional amount to add to the 'advance' value between ch1 and ch2
+
+STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo * info, int codepoint, int * x0, int * y0, int * x1, int * y1);
+// Gets the bounding box of the visible part of the glyph, in unscaled coordinates
+
+STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo * info, int glyph_index, int * advanceWidth,
+ int * leftSideBearing);
+STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo * info, int glyph1, int glyph2);
+STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo * info, int glyph_index, int * x0, int * y0, int * x1, int * y1);
+// as above, but takes one or more glyph indices for greater efficiency
+
+typedef struct _stbtt_kerningentry {
+ int glyph1; // use stbtt_FindGlyphIndex
+ int glyph2;
+ int advance;
+} stbtt_kerningentry;
+
+STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo * info);
+STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo * info, stbtt_kerningentry * table, int table_length);
+// Retrieves a complete list of all of the kerning pairs provided by the font
+// stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write.
+// The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1)
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// GLYPH SHAPES (you probably don't need these, but they have to go before
+// the bitmaps for C declaration-order reasons)
+//
+
+#ifndef STBTT_vmove // you can predefine these to use different values (but why?)
+enum {
+ STBTT_vmove = 1,
+ STBTT_vline,
+ STBTT_vcurve,
+ STBTT_vcubic
+};
+#endif
+
+#ifndef stbtt_vertex // you can predefine this to use different values
+// (we share this with other code at RAD)
+#define stbtt_vertex_type short // can't use stbtt_int16 because that's not visible in the header file
+typedef struct {
+ stbtt_vertex_type x, y, cx, cy, cx1, cy1;
+ unsigned char type, padding;
+} stbtt_vertex;
+#endif
+
+STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo * info, int glyph_index);
+// returns non-zero if nothing is drawn for this glyph
+
+STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo * info, int unicode_codepoint, stbtt_vertex ** vertices);
+STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo * info, int glyph_index, stbtt_vertex ** vertices);
+// returns # of vertices and fills *vertices with the pointer to them
+// these are expressed in "unscaled" coordinates
+//
+// The shape is a series of contours. Each one starts with
+// a STBTT_moveto, then consists of a series of mixed
+// STBTT_lineto and STBTT_curveto segments. A lineto
+// draws a line from previous endpoint to its x,y; a curveto
+// draws a quadratic bezier from previous endpoint to
+// its x,y, using cx,cy as the bezier control point.
+
+STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo * info, stbtt_vertex * vertices);
+// frees the data allocated above
+
+STBTT_DEF stbtt_uint32 stbtt_FindSVGDoc(const stbtt_fontinfo * info, int gl);
+STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo * info, int unicode_codepoint, stbtt_uint32 * svgOfs);
+STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo * info, int gl, stbtt_uint32 * svgOfs);
+// fills svg with the character's SVG data.
+// returns data size or 0 if SVG not found.
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// BITMAP RENDERING
+//
+
+STBTT_DEF void stbtt_FreeBitmap(unsigned char * bitmap, void * userdata);
+// frees the bitmap allocated below
+
+STBTT_DEF unsigned char * stbtt_GetCodepointBitmap(const stbtt_fontinfo * info, float scale_x, float scale_y,
+ int codepoint, int * width, int * height, int * xoff, int * yoff);
+// allocates a large-enough single-channel 8bpp bitmap and renders the
+// specified character/glyph at the specified scale into it, with
+// antialiasing. 0 is no coverage (transparent), 255 is fully covered (opaque).
+// *width & *height are filled out with the width & height of the bitmap,
+// which is stored left-to-right, top-to-bottom.
+//
+// xoff/yoff are the offset it pixel space from the glyph origin to the top-left of the bitmap
+
+STBTT_DEF unsigned char * stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo * info, float scale_x, float scale_y,
+ float shift_x, float shift_y, int codepoint, int * width, int * height, int * xoff, int * yoff);
+// the same as stbtt_GetCodepoitnBitmap, but you can specify a subpixel
+// shift for the character
+
+STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo * info, unsigned char * output, int out_w, int out_h,
+ int out_stride, float scale_x, float scale_y, int codepoint);
+// the same as stbtt_GetCodepointBitmap, but you pass in storage for the bitmap
+// in the form of 'output', with row spacing of 'out_stride' bytes. the bitmap
+// is clipped to out_w/out_h bytes. Call stbtt_GetCodepointBitmapBox to get the
+// width and height and positioning info for it first.
+
+STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo * info, unsigned char * output, int out_w,
+ int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint);
+// same as stbtt_MakeCodepointBitmap, but you can specify a subpixel
+// shift for the character
+
+STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo * info, unsigned char * output,
+ int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x,
+ int oversample_y, float * sub_x, float * sub_y, int codepoint);
+// same as stbtt_MakeCodepointBitmapSubpixel, but prefiltering
+// is performed (see stbtt_PackSetOversampling)
+
+STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo * font, int codepoint, float scale_x, float scale_y,
+ int * ix0, int * iy0, int * ix1, int * iy1);
+// get the bbox of the bitmap centered around the glyph origin; so the
+// bitmap width is ix1-ix0, height is iy1-iy0, and location to place
+// the bitmap top left is (leftSideBearing*scale,iy0).
+// (Note that the bitmap uses y-increases-down, but the shape uses
+// y-increases-up, so CodepointBitmapBox and CodepointBox are inverted.)
+
+STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo * font, int codepoint, float scale_x,
+ float scale_y, float shift_x, float shift_y, int * ix0, int * iy0, int * ix1, int * iy1);
+// same as stbtt_GetCodepointBitmapBox, but you can specify a subpixel
+// shift for the character
+
+// the following functions are equivalent to the above functions, but operate
+// on glyph indices instead of Unicode codepoints (for efficiency)
+STBTT_DEF unsigned char * stbtt_GetGlyphBitmap(const stbtt_fontinfo * info, float scale_x, float scale_y, int glyph,
+ int * width, int * height, int * xoff, int * yoff);
+STBTT_DEF unsigned char * stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo * info, float scale_x, float scale_y,
+ float shift_x, float shift_y, int glyph, int * width, int * height, int * xoff, int * yoff);
+STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo * info, unsigned char * output, int out_w, int out_h,
+ int out_stride, float scale_x, float scale_y, int glyph);
+STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo * info, unsigned char * output, int out_w, int out_h,
+ int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph);
+STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo * info, unsigned char * output, int out_w,
+ int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x,
+ int oversample_y, float * sub_x, float * sub_y, int glyph);
+STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo * font, int glyph, float scale_x, float scale_y, int * ix0,
+ int * iy0, int * ix1, int * iy1);
+STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo * font, int glyph, float scale_x, float scale_y,
+ float shift_x, float shift_y, int * ix0, int * iy0, int * ix1, int * iy1);
+
+// @TODO: don't expose this structure
+typedef struct {
+ int w, h, stride;
+ unsigned char * pixels;
+} stbtt__bitmap;
+
+// rasterize a shape with quadratic beziers into a bitmap
+STBTT_DEF void stbtt_Rasterize(stbtt__bitmap * result, // 1-channel bitmap to draw into
+ float flatness_in_pixels, // allowable error of curve in pixels
+ stbtt_vertex * vertices, // array of vertices defining shape
+ int num_verts, // number of vertices in above array
+ float scale_x, float scale_y, // scale applied to input vertices
+ float shift_x, float shift_y, // translation applied to input vertices
+ int x_off, int y_off, // another translation applied to input
+ int invert, // if non-zero, vertically flip shape
+ void * userdata); // context for to STBTT_MALLOC
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Signed Distance Function (or Field) rendering
+
+STBTT_DEF void stbtt_FreeSDF(unsigned char * bitmap, void * userdata);
+// frees the SDF bitmap allocated below
+
+STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo * info, float scale, int glyph, int padding,
+ unsigned char onedge_value, float pixel_dist_scale, int * width, int * height, int * xoff, int * yoff);
+STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo * info, float scale, int codepoint, int padding,
+ unsigned char onedge_value, float pixel_dist_scale, int * width, int * height, int * xoff, int * yoff);
+// These functions compute a discretized SDF field for a single character, suitable for storing
+// in a single-channel texture, sampling with bilinear filtering, and testing against
+// larger than some threshold to produce scalable fonts.
+// info -- the font
+// scale -- controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap
+// glyph/codepoint -- the character to generate the SDF for
+// padding -- extra "pixels" around the character which are filled with the distance to the character (not 0),
+// which allows effects like bit outlines
+// onedge_value -- value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character)
+// pixel_dist_scale -- what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale)
+// if positive, > onedge_value is inside; if negative, < onedge_value is inside
+// width,height -- output height & width of the SDF bitmap (including padding)
+// xoff,yoff -- output origin of the character
+// return value -- a 2D array of bytes 0..255, width*height in size
+//
+// pixel_dist_scale & onedge_value are a scale & bias that allows you to make
+// optimal use of the limited 0..255 for your application, trading off precision
+// and special effects. SDF values outside the range 0..255 are clamped to 0..255.
+//
+// Example:
+// scale = stbtt_ScaleForPixelHeight(22)
+// padding = 5
+// onedge_value = 180
+// pixel_dist_scale = 180/5.0 = 36.0
+//
+// This will create an SDF bitmap in which the character is about 22 pixels
+// high but the whole bitmap is about 22+5+5=32 pixels high. To produce a filled
+// shape, sample the SDF at each pixel and fill the pixel if the SDF value
+// is greater than or equal to 180/255. (You'll actually want to antialias,
+// which is beyond the scope of this example.) Additionally, you can compute
+// offset outlines (e.g. to stroke the character border inside & outside,
+// or only outside). For example, to fill outside the character up to 3 SDF
+// pixels, you would compare against (180-36.0*3)/255 = 72/255. The above
+// choice of variables maps a range from 5 pixels outside the shape to
+// 2 pixels inside the shape to 0..255; this is intended primarily for apply
+// outside effects only (the interior range is needed to allow proper
+// antialiasing of the font at *smaller* sizes)
+//
+// The function computes the SDF analytically at each SDF pixel, not by e.g.
+// building a higher-res bitmap and approximating it. In theory the quality
+// should be as high as possible for an SDF of this size & representation, but
+// unclear if this is true in practice (perhaps building a higher-res bitmap
+// and computing from that can allow drop-out prevention).
+//
+// The algorithm has not been optimized at all, so expect it to be slow
+// if computing lots of characters or very large sizes.
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Finding the right font...
+//
+// You should really just solve this offline, keep your own tables
+// of what font is what, and don't try to get it out of the .ttf file.
+// That's because getting it out of the .ttf file is really hard, because
+// the names in the file can appear in many possible encodings, in many
+// possible languages, and e.g. if you need a case-insensitive comparison,
+// the details of that depend on the encoding & language in a complex way
+// (actually underspecified in truetype, but also gigantic).
+//
+// But you can use the provided functions in two possible ways:
+// stbtt_FindMatchingFont() will use *case-sensitive* comparisons on
+// unicode-encoded names to try to find the font you want;
+// you can run this before calling stbtt_InitFont()
+//
+// stbtt_GetFontNameString() lets you get any of the various strings
+// from the file yourself and do your own comparisons on them.
+// You have to have called stbtt_InitFont() first.
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_FindMatchingFont(STBTT_STREAM_TYPE fontdata, const char * name, int flags);
+#else
+STBTT_DEF int stbtt_FindMatchingFont(const unsigned char * fontdata, const char * name, int flags);
+#endif
+// returns the offset (not index) of the font that matches, or -1 if none
+// if you use STBTT_MACSTYLE_DONTCARE, use a font name like "Arial Bold".
+// if you use any other flag, use a font name like "Arial"; this checks
+// the 'macStyle' header field; i don't know if fonts set this consistently
+#define STBTT_MACSTYLE_DONTCARE 0
+#define STBTT_MACSTYLE_BOLD 1
+#define STBTT_MACSTYLE_ITALIC 2
+#define STBTT_MACSTYLE_UNDERSCORE 4
+#define STBTT_MACSTYLE_NONE 8 // <= not same as 0, this makes us check the bitfield is 0
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char * s1, int len1, STBTT_STREAM_TYPE s2, stbtt_uint32 s2offs,
+ int len2);
+#else
+STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char * s1, int len1, const char * s2, stbtt_uint32 s2offs,
+ int len2);
+#endif
+// returns 1/0 whether the first string interpreted as utf8 is identical to
+// the second string interpreted as big-endian utf16... useful for strings from next func
+
+STBTT_DEF stbtt_uint32 stbtt_GetFontNameString(const stbtt_fontinfo * font, int * length, int platformID,
+ int encodingID, int languageID, int nameID);
+
+// returns the string (which may be big-endian double byte, e.g. for unicode)
+// and puts the length in bytes in *length.
+//
+// some of the values for the IDs are below; for more see the truetype spec:
+// http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6name.html
+// http://www.microsoft.com/typography/otspec/name.htm
+
+enum { // platformID
+ STBTT_PLATFORM_ID_UNICODE = 0,
+ STBTT_PLATFORM_ID_MAC = 1,
+ STBTT_PLATFORM_ID_ISO = 2,
+ STBTT_PLATFORM_ID_MICROSOFT = 3
+};
+
+enum { // encodingID for STBTT_PLATFORM_ID_UNICODE
+ STBTT_UNICODE_EID_UNICODE_1_0 = 0,
+ STBTT_UNICODE_EID_UNICODE_1_1 = 1,
+ STBTT_UNICODE_EID_ISO_10646 = 2,
+ STBTT_UNICODE_EID_UNICODE_2_0_BMP = 3,
+ STBTT_UNICODE_EID_UNICODE_2_0_FULL = 4
+};
+
+enum { // encodingID for STBTT_PLATFORM_ID_MICROSOFT
+ STBTT_MS_EID_SYMBOL = 0,
+ STBTT_MS_EID_UNICODE_BMP = 1,
+ STBTT_MS_EID_SHIFTJIS = 2,
+ STBTT_MS_EID_UNICODE_FULL = 10
+};
+
+enum { // encodingID for STBTT_PLATFORM_ID_MAC; same as Script Manager codes
+ STBTT_MAC_EID_ROMAN = 0, STBTT_MAC_EID_ARABIC = 4,
+ STBTT_MAC_EID_JAPANESE = 1, STBTT_MAC_EID_HEBREW = 5,
+ STBTT_MAC_EID_CHINESE_TRAD = 2, STBTT_MAC_EID_GREEK = 6,
+ STBTT_MAC_EID_KOREAN = 3, STBTT_MAC_EID_RUSSIAN = 7
+};
+
+enum { // languageID for STBTT_PLATFORM_ID_MICROSOFT; same as LCID...
+ // problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs
+ STBTT_MS_LANG_ENGLISH = 0x0409, STBTT_MS_LANG_ITALIAN = 0x0410,
+ STBTT_MS_LANG_CHINESE = 0x0804, STBTT_MS_LANG_JAPANESE = 0x0411,
+ STBTT_MS_LANG_DUTCH = 0x0413, STBTT_MS_LANG_KOREAN = 0x0412,
+ STBTT_MS_LANG_FRENCH = 0x040c, STBTT_MS_LANG_RUSSIAN = 0x0419,
+ STBTT_MS_LANG_GERMAN = 0x0407, STBTT_MS_LANG_SPANISH = 0x0409,
+ STBTT_MS_LANG_HEBREW = 0x040d, STBTT_MS_LANG_SWEDISH = 0x041D
+};
+
+enum { // languageID for STBTT_PLATFORM_ID_MAC
+ STBTT_MAC_LANG_ENGLISH = 0, STBTT_MAC_LANG_JAPANESE = 11,
+ STBTT_MAC_LANG_ARABIC = 12, STBTT_MAC_LANG_KOREAN = 23,
+ STBTT_MAC_LANG_DUTCH = 4, STBTT_MAC_LANG_RUSSIAN = 32,
+ STBTT_MAC_LANG_FRENCH = 1, STBTT_MAC_LANG_SPANISH = 6,
+ STBTT_MAC_LANG_GERMAN = 2, STBTT_MAC_LANG_SWEDISH = 5,
+ STBTT_MAC_LANG_HEBREW = 10, STBTT_MAC_LANG_CHINESE_SIMPLIFIED = 33,
+ STBTT_MAC_LANG_ITALIAN = 3, STBTT_MAC_LANG_CHINESE_TRAD = 19
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __STB_INCLUDE_STB_TRUETYPE_H__
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+////
+//// IMPLEMENTATION
+////
+////
+
+#ifdef STB_TRUETYPE_IMPLEMENTATION
+
+#ifndef STBTT_MAX_OVERSAMPLE
+ #define STBTT_MAX_OVERSAMPLE 8
+#endif
+
+#if STBTT_MAX_OVERSAMPLE > 255
+ #error "STBTT_MAX_OVERSAMPLE cannot be > 255"
+#endif
+
+typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERSAMPLE - 1)) == 0 ? 1 : -1];
+
+#ifndef STBTT_RASTERIZER_VERSION
+ #define STBTT_RASTERIZER_VERSION 2
+#endif
+
+#ifdef _MSC_VER
+ #define STBTT__NOTUSED(v) (void)(v)
+#else
+ #define STBTT__NOTUSED(v) (void)sizeof(v)
+#endif
+
+//////////////////////////////////////////////////////////////////////////
+//
+// stbtt__buf helpers to parse data from file
+//
+
+static stbtt_uint8 stbtt__buf_get8(stbtt__buf * b)
+{
+ if(b->cursor >= b->size)
+ return 0;
+#ifdef STBTT_STREAM_TYPE
+ long pos = (long)(b->cursor + b->offset);
+ STBTT_STREAM_SEEK(b->data, pos);
+ stbtt_uint8 result;
+ STBTT_STREAM_READ(b->data, &result, 1);
+ ++b->cursor;
+ return result;
+#else
+ return b->data[b->cursor++];
+#endif
+
+}
+
+static stbtt_uint8 stbtt__buf_peek8(stbtt__buf * b)
+{
+ if(b->cursor >= b->size)
+ return 0;
+#ifdef STBTT_STREAM_TYPE
+ long pos = (long)(b->cursor + b->offset);
+ STBTT_STREAM_SEEK(b->data, pos);
+ stbtt_uint8 result;
+ STBTT_STREAM_READ(b->data, &result, 1);
+ return result;
+#else
+ return b->data[b->cursor];
+#endif
+
+}
+
+static void stbtt__buf_seek(stbtt__buf * b, int o)
+{
+ STBTT_assert(!(o > b->size || o < 0));
+ b->cursor = (o > b->size || o < 0) ? b->size : o;
+}
+
+static void stbtt__buf_skip(stbtt__buf * b, int o)
+{
+ stbtt__buf_seek(b, b->cursor + o);
+}
+
+static stbtt_uint32 stbtt__buf_get(stbtt__buf * b, int n)
+{
+ stbtt_uint32 v = 0;
+ int i;
+ STBTT_assert(n >= 1 && n <= 4);
+ for(i = 0; i < n; i++)
+ v = (v << 8) | stbtt__buf_get8(b);
+ return v;
+}
+#ifdef STBTT_STREAM_TYPE
+ static stbtt__buf stbtt__new_buf(STBTT_STREAM_TYPE s, size_t size)
+#else
+ static stbtt__buf stbtt__new_buf(const void * p, size_t size)
+#endif
+{
+ stbtt__buf r;
+ STBTT_assert(size < 0x40000000);
+#ifdef STBTT_STREAM_TYPE
+ r.data = s;
+ r.offset = 0;
+#else
+ r.data = (stbtt_uint8 *)p;
+#endif
+ r.size = (int)size;
+ r.cursor = 0;
+ return r;
+}
+
+#define stbtt__buf_get16(b) stbtt__buf_get((b), 2)
+#define stbtt__buf_get32(b) stbtt__buf_get((b), 4)
+
+static stbtt__buf stbtt__buf_range(const stbtt__buf * b, int o, int s)
+{
+ stbtt__buf r = stbtt__new_buf(NULL, 0);
+ if(o < 0 || s < 0 || o > b->size || s > b->size - o) return r;
+#ifdef STBTT_STREAM_TYPE
+ r.data = b->data;
+ r.offset = b->offset + o;
+#else
+ r.data = b->data + o;
+#endif
+ r.size = s;
+ return r;
+}
+
+static stbtt__buf stbtt__cff_get_index(stbtt__buf * b)
+{
+ int count, start, offsize;
+ start = b->cursor;
+ count = stbtt__buf_get16(b);
+ if(count) {
+ offsize = stbtt__buf_get8(b);
+ STBTT_assert(offsize >= 1 && offsize <= 4);
+ stbtt__buf_skip(b, offsize * count);
+ stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1);
+ }
+ return stbtt__buf_range(b, start, b->cursor - start);
+}
+
+static stbtt_uint32 stbtt__cff_int(stbtt__buf * b)
+{
+ int b0 = stbtt__buf_get8(b);
+ if(b0 >= 32 && b0 <= 246) return b0 - 139;
+ else if(b0 >= 247 && b0 <= 250) return (b0 - 247) * 256 + stbtt__buf_get8(b) + 108;
+ else if(b0 >= 251 && b0 <= 254) return -(b0 - 251) * 256 - stbtt__buf_get8(b) - 108;
+ else if(b0 == 28) return stbtt__buf_get16(b);
+ else if(b0 == 29) return stbtt__buf_get32(b);
+ STBTT_assert(0);
+ return 0;
+}
+
+static void stbtt__cff_skip_operand(stbtt__buf * b)
+{
+ int v, b0 = stbtt__buf_peek8(b);
+ STBTT_assert(b0 >= 28);
+ if(b0 == 30) {
+ stbtt__buf_skip(b, 1);
+ while(b->cursor < b->size) {
+ v = stbtt__buf_get8(b);
+ if((v & 0xF) == 0xF || (v >> 4) == 0xF)
+ break;
+ }
+ }
+ else {
+ stbtt__cff_int(b);
+ }
+}
+
+static stbtt__buf stbtt__dict_get(stbtt__buf * b, int key)
+{
+ stbtt__buf_seek(b, 0);
+ while(b->cursor < b->size) {
+ int start = b->cursor, end, op;
+ while(stbtt__buf_peek8(b) >= 28)
+ stbtt__cff_skip_operand(b);
+ end = b->cursor;
+ op = stbtt__buf_get8(b);
+ if(op == 12) op = stbtt__buf_get8(b) | 0x100;
+ if(op == key) return stbtt__buf_range(b, start, end - start);
+ }
+ return stbtt__buf_range(b, 0, 0);
+}
+
+static void stbtt__dict_get_ints(stbtt__buf * b, int key, int outcount, stbtt_uint32 * out)
+{
+ int i;
+ stbtt__buf operands = stbtt__dict_get(b, key);
+ for(i = 0; i < outcount && operands.cursor < operands.size; i++)
+ out[i] = stbtt__cff_int(&operands);
+}
+
+static int stbtt__cff_index_count(stbtt__buf * b)
+{
+ stbtt__buf_seek(b, 0);
+ return stbtt__buf_get16(b);
+}
+
+static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i)
+{
+ int count, offsize, start, end;
+ stbtt__buf_seek(&b, 0);
+ count = stbtt__buf_get16(&b);
+ offsize = stbtt__buf_get8(&b);
+ STBTT_assert(i >= 0 && i < count);
+ STBTT_assert(offsize >= 1 && offsize <= 4);
+ stbtt__buf_skip(&b, i * offsize);
+ start = stbtt__buf_get(&b, offsize);
+ end = stbtt__buf_get(&b, offsize);
+ return stbtt__buf_range(&b, 2 + (count + 1) * offsize + start, end - start);
+}
+
+//////////////////////////////////////////////////////////////////////////
+//
+// accessors to parse data from file
+//
+
+// on platforms that don't allow misaligned reads, if we want to allow
+// truetype fonts that aren't padded to alignment, define ALLOW_UNALIGNED_TRUETYPE
+
+#ifdef STBTT_STREAM_TYPE
+static stbtt_uint8 ttBYTE(STBTT_STREAM_TYPE s, stbtt_uint32 offset)
+{
+ STBTT_STREAM_SEEK(s, offset);
+ stbtt_uint8 r;
+ STBTT_STREAM_READ(s, &r, 1);
+ return r;
+}
+#define ttCHAR(s, offset) ((stbtt_int8)ttBYTE(s,offset))
+static stbtt_uint16 ttUSHORT(STBTT_STREAM_TYPE s, stbtt_uint32 offset)
+{
+ STBTT_STREAM_SEEK(s, offset);
+ stbtt_uint8 r[2];
+ STBTT_STREAM_READ(s, &r, 2);
+ return r[0] * 256 + r[1];
+}
+static stbtt_int16 ttSHORT(STBTT_STREAM_TYPE s, stbtt_uint32 offset)
+{
+ STBTT_STREAM_SEEK(s, offset);
+ stbtt_uint8 r[2];
+ STBTT_STREAM_READ(s, &r, 2);
+ return r[0] * 256 + r[1];
+}
+static stbtt_uint32 ttULONG(STBTT_STREAM_TYPE s, stbtt_uint32 offset)
+{
+ STBTT_STREAM_SEEK(s, offset);
+ stbtt_uint8 r[4];
+ STBTT_STREAM_READ(s, &r, 4);
+ return (r[0] << 24) + (r[1] << 16) + (r[2] << 8) + r[3];
+}
+static stbtt_int32 ttLONG(STBTT_STREAM_TYPE s, stbtt_uint32 offset)
+{
+ STBTT_STREAM_SEEK(s, offset);
+ stbtt_uint8 r[4];
+ STBTT_STREAM_READ(s, &r, 4);
+ return (r[0] << 24) + (r[1] << 16) + (r[2] << 8) + r[3];
+}
+#else
+#define ttBYTE(p, offset) (* (stbtt_uint8 *) (p+offset))
+#define ttCHAR(p, offset) (* (stbtt_int8 *) (p+offset))
+static stbtt_uint16 ttUSHORT(const stbtt_uint8 * p, stbtt_uint32 offset)
+{
+ return p[offset + 0] * 256 + p[offset + 1];
+}
+static stbtt_int16 ttSHORT(const stbtt_uint8 * p, stbtt_uint32 offset)
+{
+ return p[offset + 0] * 256 + p[offset + 1];
+}
+static stbtt_uint32 ttULONG(const stbtt_uint8 * p, stbtt_uint32 offset)
+{
+ return (p[offset + 0] << 24) + (p[offset + 1] << 16) + (p[offset + 2] << 8) + p[offset + 3];
+}
+static stbtt_int32 ttLONG(const stbtt_uint8 * p, stbtt_uint32 offset)
+{
+ return (p[offset + 0] << 24) + (p[offset + 1] << 16) + (p[offset + 2] << 8) + p[offset + 3];
+}
+#endif
+#define ttFixed(p, offset) ttLONG(p, offset)
+
+#define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3))
+#define stbtt_tag(p,str) stbtt_tag4(p,str[0],str[1],str[2],str[3])
+#ifdef STBTT_STREAM_TYPE
+ static int stbtt__isfont(STBTT_STREAM_TYPE stream, stbtt_uint32 offs)
+#else
+ static int stbtt__isfont(stbtt_uint8 * font, stbtt_uint32 offs)
+#endif
+{
+#ifdef STBTT_STREAM_TYPE
+ stbtt_uint8 font[4];
+ STBTT_STREAM_SEEK(stream, offs);
+ STBTT_STREAM_READ(stream, font, 4);
+#else
+ font += offs;
+#endif
+ // check the version number
+ if(stbtt_tag4(font, '1', 0, 0, 0)) return 1; // TrueType 1
+ if(stbtt_tag(font, "typ1")) return 1; // TrueType with type 1 font -- we don't support this!
+ if(stbtt_tag(font, "OTTO")) return 1; // OpenType with CFF
+ if(stbtt_tag4(font, 0, 1, 0, 0)) return 1; // OpenType 1.0
+ if(stbtt_tag(font, "true")) return 1; // Apple specification for TrueType fonts
+ return 0;
+}
+
+// @OPTIMIZE: binary search
+#ifdef STBTT_STREAM_TYPE
+ static stbtt_uint32 stbtt__find_table(STBTT_STREAM_TYPE data, stbtt_uint32 fontstart, const char * tag)
+#else
+ static stbtt_uint32 stbtt__find_table(stbtt_uint8 * data, stbtt_uint32 fontstart, const char * tag)
+#endif
+{
+ stbtt_int32 num_tables = ttUSHORT(data, fontstart + 4);
+ stbtt_uint32 tabledir = fontstart + 12;
+ stbtt_int32 i;
+ for(i = 0; i < num_tables; ++i) {
+ stbtt_uint32 loc = tabledir + 16 * i;
+#ifdef STBTT_STREAM_TYPE
+ stbtt_uint8 buf[4];
+ STBTT_STREAM_SEEK(data, loc + 0);
+ STBTT_STREAM_READ(data, buf, 4);
+ if(stbtt_tag(buf, tag))
+ return ttULONG(data, loc + 8);
+#else
+ if(stbtt_tag(data + loc + 0, tag))
+ return ttULONG(data, loc + 8);
+#endif
+ }
+ return 0;
+}
+#ifdef STBTT_STREAM_TYPE
+ static int stbtt_GetFontOffsetForIndex_internal(STBTT_STREAM_TYPE font_collection, int index)
+#else
+ static int stbtt_GetFontOffsetForIndex_internal(unsigned char * font_collection, int index)
+#endif
+{
+ // if it's just a font, there's only one valid index
+ if(stbtt__isfont(font_collection, 0))
+ return index == 0 ? 0 : -1;
+
+ // check if it's a TTC
+#ifdef STBTT_STREAM_TYPE
+ stbtt_uint8 buf[4];
+ STBTT_STREAM_SEEK(font_collection, 0);
+ STBTT_STREAM_READ(font_collection, buf, 4);
+ if(stbtt_tag(buf, "ttcf")) {
+#else
+ if(stbtt_tag(font_collection, "ttcf")) {
+#endif
+ // version 1?
+ if(ttULONG(font_collection, 4) == 0x00010000 || ttULONG(font_collection, 4) == 0x00020000) {
+ stbtt_int32 n = ttLONG(font_collection, 8);
+ if(index >= n)
+ return -1;
+ return ttULONG(font_collection, 12 + index * 4);
+ }
+ }
+ return -1;
+}
+#ifdef STBTT_STREAM_TYPE
+ static int stbtt_GetNumberOfFonts_internal(STBTT_STREAM_TYPE font_collection)
+#else
+ static int stbtt_GetNumberOfFonts_internal(unsigned char * font_collection)
+#endif
+{
+ // if it's just a font, there's only one valid font
+ if(stbtt__isfont(font_collection, 0))
+ return 1;
+
+ // check if it's a TTC
+#ifdef STBTT_STREAM_TYPE
+ stbtt_uint8 buf[4];
+ STBTT_STREAM_SEEK(font_collection, 0);
+ STBTT_STREAM_READ(font_collection, buf, 4);
+ if(stbtt_tag(buf, "ttcf")) {
+#else
+ if(stbtt_tag(font_collection, "ttcf")) {
+#endif
+ // version 1?
+ if(ttULONG(font_collection, 4) == 0x00010000 || ttULONG(font_collection, 4) == 0x00020000) {
+ return ttLONG(font_collection, 8);
+ }
+ }
+ return 0;
+}
+
+static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict)
+{
+ stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 };
+ stbtt__buf pdict;
+ stbtt__dict_get_ints(&fontdict, 18, 2, private_loc);
+ if(!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0);
+ pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]);
+ stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff);
+ if(!subrsoff) return stbtt__new_buf(NULL, 0);
+ stbtt__buf_seek(&cff, private_loc[1] + subrsoff);
+ return stbtt__cff_get_index(&cff);
+}
+
+// since most people won't use this, find this table the first time it's needed
+static int stbtt__get_svg(stbtt_fontinfo * info)
+{
+ stbtt_uint32 t;
+ if(info->svg < 0) {
+ t = stbtt__find_table(info->data, info->fontstart, "SVG ");
+ if(t) {
+ stbtt_uint32 offset = ttULONG(info->data, t + 2);
+ info->svg = t + offset;
+ }
+ else {
+ info->svg = 0;
+ }
+ }
+ return info->svg;
+}
+#ifdef STBTT_STREAM_TYPE
+ static int stbtt_InitFont_internal(stbtt_fontinfo * info, STBTT_STREAM_TYPE data, int fontstart)
+#else
+ static int stbtt_InitFont_internal(stbtt_fontinfo * info, unsigned char * data, int fontstart)
+#endif
+{
+ stbtt_uint32 cmap, t;
+ stbtt_int32 i, numTables;
+
+ info->data = data;
+ info->fontstart = fontstart;
+ info->cff = stbtt__new_buf(NULL, 0);
+
+ cmap = stbtt__find_table(data, fontstart, "cmap"); // required
+ info->loca = stbtt__find_table(data, fontstart, "loca"); // required
+ info->head = stbtt__find_table(data, fontstart, "head"); // required
+ info->glyf = stbtt__find_table(data, fontstart, "glyf"); // required
+ info->hhea = stbtt__find_table(data, fontstart, "hhea"); // required
+ info->hmtx = stbtt__find_table(data, fontstart, "hmtx"); // required
+ info->kern = stbtt__find_table(data, fontstart, "kern"); // not required
+ info->gpos = stbtt__find_table(data, fontstart, "GPOS"); // not required
+
+ if(!cmap || !info->head || !info->hhea || !info->hmtx)
+ return 0;
+ if(info->glyf) {
+ // required for truetype
+ if(!info->loca) return 0;
+ }
+ else {
+ // initialization for CFF / Type2 fonts (OTF)
+ stbtt__buf b, topdict, topdictidx;
+ stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0;
+ stbtt_uint32 cff;
+
+ cff = stbtt__find_table(data, fontstart, "CFF ");
+ if(!cff) return 0;
+
+ info->fontdicts = stbtt__new_buf(NULL, 0);
+ info->fdselect = stbtt__new_buf(NULL, 0);
+
+ // @TODO this should use size from table (not 512MB)
+
+#ifdef STBTT_STREAM_TYPE
+ info->cff = stbtt__new_buf(info->data, 512 * 1024 * 1024);
+ info->cff.offset = cff;
+#else
+ info->cff = stbtt__new_buf(info->data + cff, 512 * 1024 * 1024);
+#endif
+ b = info->cff;
+
+ // read the header
+ stbtt__buf_skip(&b, 2);
+ stbtt__buf_seek(&b, stbtt__buf_get8(&b)); // hdrsize
+
+ // @TODO the name INDEX could list multiple fonts,
+ // but we just use the first one.
+ stbtt__cff_get_index(&b); // name INDEX
+ topdictidx = stbtt__cff_get_index(&b);
+ topdict = stbtt__cff_index_get(topdictidx, 0);
+ stbtt__cff_get_index(&b); // string INDEX
+ info->gsubrs = stbtt__cff_get_index(&b);
+
+ stbtt__dict_get_ints(&topdict, 17, 1, &charstrings);
+ stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype);
+ stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff);
+ stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff);
+ info->subrs = stbtt__get_subrs(b, topdict);
+
+ // we only support Type 2 charstrings
+ if(cstype != 2) return 0;
+ if(charstrings == 0) return 0;
+
+ if(fdarrayoff) {
+ // looks like a CID font
+ if(!fdselectoff) return 0;
+ stbtt__buf_seek(&b, fdarrayoff);
+ info->fontdicts = stbtt__cff_get_index(&b);
+ info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size - fdselectoff);
+ }
+
+ stbtt__buf_seek(&b, charstrings);
+ info->charstrings = stbtt__cff_get_index(&b);
+ }
+
+ t = stbtt__find_table(data, fontstart, "maxp");
+ if(t)
+ info->numGlyphs = ttUSHORT(data, t + 4);
+ else
+ info->numGlyphs = 0xffff;
+
+ info->svg = -1;
+
+ // find a cmap encoding table we understand *now* to avoid searching
+ // later. (todo: could make this installable)
+ // the same regardless of glyph.
+ numTables = ttUSHORT(data, cmap + 2);
+ info->index_map = 0;
+ for(i = 0; i < numTables; ++i) {
+ stbtt_uint32 encoding_record = cmap + 4 + 8 * i;
+ // find an encoding we understand:
+ switch(ttUSHORT(data, encoding_record)) {
+ case STBTT_PLATFORM_ID_MICROSOFT:
+ switch(ttUSHORT(data, encoding_record + 2)) {
+ case STBTT_MS_EID_UNICODE_BMP:
+ case STBTT_MS_EID_UNICODE_FULL:
+ // MS/Unicode
+ info->index_map = cmap + ttULONG(data, encoding_record + 4);
+ break;
+ }
+ break;
+ case STBTT_PLATFORM_ID_UNICODE:
+ // Mac/iOS has these
+ // all the encodingIDs are unicode, so we don't bother to check it
+ info->index_map = cmap + ttULONG(data, encoding_record + 4);
+ break;
+ }
+ }
+ if(info->index_map == 0)
+ return 0;
+
+ info->indexToLocFormat = ttUSHORT(data, info->head + 50);
+ return 1;
+}
+
+STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo * info, int unicode_codepoint)
+{
+#ifdef STBTT_STREAM_TYPE
+ STBTT_STREAM_TYPE data = info->data;
+#else
+ stbtt_uint8 * data = info->data;
+#endif
+ stbtt_uint32 index_map = info->index_map;
+
+ stbtt_uint16 format = ttUSHORT(data, index_map + 0);
+ if(format == 0) { // apple byte encoding
+ stbtt_int32 bytes = ttUSHORT(data, index_map + 2);
+ if(unicode_codepoint < bytes - 6)
+ return ttBYTE(data, index_map + 6 + unicode_codepoint);
+ return 0;
+ }
+ else if(format == 6) {
+ stbtt_uint32 first = ttUSHORT(data, index_map + 6);
+ stbtt_uint32 count = ttUSHORT(data, index_map + 8);
+ if((stbtt_uint32)unicode_codepoint >= first && (stbtt_uint32)unicode_codepoint < first + count)
+ return ttUSHORT(data, index_map + 10 + (unicode_codepoint - first) * 2);
+ return 0;
+ }
+ else if(format == 2) {
+ STBTT_assert(0); // @TODO: high-byte mapping for japanese/chinese/korean
+ return 0;
+ }
+ else if(format == 4) { // standard mapping for windows fonts: binary search collection of ranges
+ stbtt_uint16 segcount = ttUSHORT(data, index_map + 6) >> 1;
+ stbtt_uint16 searchRange = ttUSHORT(data, index_map + 8) >> 1;
+ stbtt_uint16 entrySelector = ttUSHORT(data, index_map + 10);
+ stbtt_uint16 rangeShift = ttUSHORT(data, index_map + 12) >> 1;
+
+ // do a binary search of the segments
+ stbtt_uint32 endCount = index_map + 14;
+ stbtt_uint32 search = endCount;
+
+ if(unicode_codepoint > 0xffff)
+ return 0;
+
+ // they lie from endCount .. endCount + segCount
+ // but searchRange is the nearest power of two, so...
+ if(unicode_codepoint >= ttUSHORT(data, search + rangeShift * 2))
+ search += rangeShift * 2;
+
+ // now decrement to bias correctly to find smallest
+ search -= 2;
+ while(entrySelector) {
+ stbtt_uint16 end;
+ searchRange >>= 1;
+ end = ttUSHORT(data, search + searchRange * 2);
+ if(unicode_codepoint > end)
+ search += searchRange * 2;
+ --entrySelector;
+ }
+ search += 2;
+
+ {
+ stbtt_uint16 offset, start, last;
+ stbtt_uint16 item = (stbtt_uint16)((search - endCount) >> 1);
+
+ start = ttUSHORT(data, index_map + 14 + segcount * 2 + 2 + 2 * item);
+ last = ttUSHORT(data, endCount + 2 * item);
+ if(unicode_codepoint < start || unicode_codepoint > last)
+ return 0;
+
+ offset = ttUSHORT(data, index_map + 14 + segcount * 6 + 2 + 2 * item);
+ if(offset == 0)
+ return (stbtt_uint16)(unicode_codepoint + ttSHORT(data, index_map + 14 + segcount * 4 + 2 + 2 * item));
+
+ return ttUSHORT(data, offset + (unicode_codepoint - start) * 2 + index_map + 14 + segcount * 6 + 2 + 2 * item);
+ }
+ }
+ else if(format == 12 || format == 13) {
+ stbtt_uint32 ngroups = ttULONG(data, index_map + 12);
+ stbtt_int32 low, high;
+ low = 0;
+ high = (stbtt_int32)ngroups;
+ // Binary search the right group.
+ while(low < high) {
+ stbtt_int32 mid = low + ((high - low) >> 1); // rounds down, so low <= mid < high
+ stbtt_uint32 start_char = ttULONG(data, index_map + 16 + mid * 12);
+ stbtt_uint32 end_char = ttULONG(data, index_map + 16 + mid * 12 + 4);
+ if((stbtt_uint32)unicode_codepoint < start_char)
+ high = mid;
+ else if((stbtt_uint32)unicode_codepoint > end_char)
+ low = mid + 1;
+ else {
+ stbtt_uint32 start_glyph = ttULONG(data, index_map + 16 + mid * 12 + 8);
+ if(format == 12)
+ return start_glyph + unicode_codepoint - start_char;
+ else // format == 13
+ return start_glyph;
+ }
+ }
+ return 0; // not found
+ }
+ // @TODO
+ STBTT_assert(0);
+ return 0;
+}
+
+STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo * info, int unicode_codepoint, stbtt_vertex * *vertices)
+{
+ return stbtt_GetGlyphShape(info, stbtt_FindGlyphIndex(info, unicode_codepoint), vertices);
+}
+
+static void stbtt_setvertex(stbtt_vertex * v, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx,
+ stbtt_int32 cy)
+{
+ v->type = type;
+ v->x = (stbtt_int16)x;
+ v->y = (stbtt_int16)y;
+ v->cx = (stbtt_int16)cx;
+ v->cy = (stbtt_int16)cy;
+}
+
+static int stbtt__GetGlyfOffset(const stbtt_fontinfo * info, int glyph_index)
+{
+ int g1, g2;
+
+ STBTT_assert(!info->cff.size);
+
+ if(glyph_index >= info->numGlyphs) return -1; // glyph index out of range
+ if(info->indexToLocFormat >= 2) return -1; // unknown index->glyph map format
+
+ if(info->indexToLocFormat == 0) {
+ g1 = info->glyf + ttUSHORT(info->data, info->loca + glyph_index * 2) * 2;
+ g2 = info->glyf + ttUSHORT(info->data, info->loca + glyph_index * 2 + 2) * 2;
+ }
+ else {
+ g1 = info->glyf + ttULONG(info->data, info->loca + glyph_index * 4);
+ g2 = info->glyf + ttULONG(info->data, info->loca + glyph_index * 4 + 4);
+ }
+
+ return g1 == g2 ? -1 : g1; // if length is 0, return -1
+}
+
+static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo * info, int glyph_index, int * x0, int * y0, int * x1, int * y1);
+
+STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo * info, int glyph_index, int * x0, int * y0, int * x1, int * y1)
+{
+ if(info->cff.size) {
+ stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1);
+ }
+ else {
+ int g = stbtt__GetGlyfOffset(info, glyph_index);
+ if(g < 0) return 0;
+
+ if(x0) *x0 = ttSHORT(info->data, g + 2);
+ if(y0) *y0 = ttSHORT(info->data, g + 4);
+ if(x1) *x1 = ttSHORT(info->data, g + 6);
+ if(y1) *y1 = ttSHORT(info->data, g + 8);
+ }
+ return 1;
+}
+
+STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo * info, int codepoint, int * x0, int * y0, int * x1, int * y1)
+{
+ return stbtt_GetGlyphBox(info, stbtt_FindGlyphIndex(info, codepoint), x0, y0, x1, y1);
+}
+
+STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo * info, int glyph_index)
+{
+ stbtt_int16 numberOfContours;
+ int g;
+ if(info->cff.size)
+ return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0;
+ g = stbtt__GetGlyfOffset(info, glyph_index);
+ if(g < 0) return 1;
+ numberOfContours = ttSHORT(info->data, g);
+ return numberOfContours == 0;
+}
+
+static int stbtt__close_shape(stbtt_vertex * vertices, int num_vertices, int was_off, int start_off,
+ stbtt_int32 sx, stbtt_int32 sy, stbtt_int32 scx, stbtt_int32 scy, stbtt_int32 cx, stbtt_int32 cy)
+{
+ if(start_off) {
+ if(was_off)
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx + scx) >> 1, (cy + scy) >> 1, cx, cy);
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, sx, sy, scx, scy);
+ }
+ else {
+ if(was_off)
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, sx, sy, cx, cy);
+ else
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, sx, sy, 0, 0);
+ }
+ return num_vertices;
+}
+
+static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo * info, int glyph_index, stbtt_vertex * *pvertices)
+{
+ stbtt_int16 numberOfContours;
+ stbtt_uint32 endPtsOfContours;
+#ifdef STBTT_STREAM_TYPE
+ STBTT_STREAM_TYPE data = info->data;
+#else
+ stbtt_uint8 * data = info->data;
+#endif
+ stbtt_vertex * vertices = 0;
+ int num_vertices = 0;
+ int g = stbtt__GetGlyfOffset(info, glyph_index);
+
+ *pvertices = NULL;
+
+ if(g < 0) return 0;
+
+ numberOfContours = ttSHORT(data, g);
+
+ if(numberOfContours > 0) {
+ stbtt_uint8 flags = 0, flagcount;
+ stbtt_int32 ins, i, j = 0, m, n, next_move, was_off = 0, off, start_off = 0;
+ stbtt_int32 x, y, cx, cy, sx, sy, scx, scy;
+ stbtt_uint32 points;
+ endPtsOfContours = (g + 10);
+ ins = ttUSHORT(data, g + 10 + numberOfContours * 2);
+ points = g + 10 + numberOfContours * 2 + 2 + ins;
+
+ n = 1 + ttUSHORT(data, endPtsOfContours + numberOfContours * 2 - 2);
+
+ m = n + 2 * numberOfContours; // a loose bound on how many vertices we might need
+ vertices = (stbtt_vertex *)STBTT_malloc(m * sizeof(vertices[0]), info->userdata);
+ if(vertices == 0)
+ return 0;
+
+ next_move = 0;
+ flagcount = 0;
+
+ // in first pass, we load uninterpreted data into the allocated array
+ // above, shifted to the end of the array so we won't overwrite it when
+ // we create our final data starting from the front
+
+ off = m - n; // starting offset for uninterpreted data, regardless of how m ends up being calculated
+
+ // first load flags
+
+ for(i = 0; i < n; ++i) {
+ if(flagcount == 0) {
+ flags = ttBYTE(data, points++);
+ if(flags & 8)
+ flagcount = ttBYTE(data, points++);
+ }
+ else
+ --flagcount;
+ vertices[off + i].type = flags;
+ }
+
+ // now load x coordinates
+ x = 0;
+ for(i = 0; i < n; ++i) {
+ flags = vertices[off + i].type;
+ if(flags & 2) {
+ stbtt_int16 dx = ttBYTE(data, points++);
+ x += (flags & 16) ? dx : -dx; // ???
+ }
+ else {
+ if(!(flags & 16)) {
+ x = x + (stbtt_int16)(ttBYTE(data, points) * 256 + ttBYTE(data, points + 1));
+ points += 2;
+ }
+ }
+ vertices[off + i].x = (stbtt_int16)x;
+ }
+
+ // now load y coordinates
+ y = 0;
+ for(i = 0; i < n; ++i) {
+ flags = vertices[off + i].type;
+ if(flags & 4) {
+ stbtt_int16 dy = ttBYTE(data, points++);
+ y += (flags & 32) ? dy : -dy; // ???
+ }
+ else {
+ if(!(flags & 32)) {
+ y = y + (stbtt_int16)(ttBYTE(data, points) * 256 + ttBYTE(data, points + 1));
+ points += 2;
+ }
+ }
+ vertices[off + i].y = (stbtt_int16)y;
+ }
+
+ // now convert them to our format
+ num_vertices = 0;
+ sx = sy = cx = cy = scx = scy = 0;
+ for(i = 0; i < n; ++i) {
+ flags = vertices[off + i].type;
+ x = (stbtt_int16)vertices[off + i].x;
+ y = (stbtt_int16)vertices[off + i].y;
+
+ if(next_move == i) {
+ if(i != 0)
+ num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx, sy, scx, scy, cx, cy);
+
+ // now start the new one
+ start_off = !(flags & 1);
+ if(start_off) {
+ // if we start off with an off-curve point, then when we need to find a point on the curve
+ // where we can start, and we need to save some state for when we wraparound.
+ scx = x;
+ scy = y;
+ if(!(vertices[off + i + 1].type & 1)) {
+ // next point is also a curve point, so interpolate an on-point curve
+ sx = (x + (stbtt_int32)vertices[off + i + 1].x) >> 1;
+ sy = (y + (stbtt_int32)vertices[off + i + 1].y) >> 1;
+ }
+ else {
+ // otherwise just use the next point as our start point
+ sx = (stbtt_int32)vertices[off + i + 1].x;
+ sy = (stbtt_int32)vertices[off + i + 1].y;
+ ++i; // we're using point i+1 as the starting point, so skip it
+ }
+ }
+ else {
+ sx = x;
+ sy = y;
+ }
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vmove, sx, sy, 0, 0);
+ was_off = 0;
+ next_move = 1 + ttUSHORT(data, endPtsOfContours + j * 2);
+ ++j;
+ }
+ else {
+ if(!(flags & 1)) { // if it's a curve
+ if(was_off) // two off-curve control points in a row means interpolate an on-curve midpoint
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx + x) >> 1, (cy + y) >> 1, cx, cy);
+ cx = x;
+ cy = y;
+ was_off = 1;
+ }
+ else {
+ if(was_off)
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, x, y, cx, cy);
+ else
+ stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, x, y, 0, 0);
+ was_off = 0;
+ }
+ }
+ }
+ num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx, sy, scx, scy, cx, cy);
+ }
+ else if(numberOfContours < 0) {
+ // Compound shapes.
+ int more = 1;
+ stbtt_uint32 comp = g + 10;
+ num_vertices = 0;
+ vertices = 0;
+ while(more) {
+ stbtt_uint16 flags, gidx;
+ int comp_num_verts = 0, i;
+ stbtt_vertex * comp_verts = 0, * tmp = 0;
+ float mtx[6] = { 1, 0, 0, 1, 0, 0 }, m, n;
+
+ flags = ttSHORT(data, comp);
+ comp += 2;
+ gidx = ttSHORT(data, comp);
+ comp += 2;
+
+ if(flags & 2) { // XY values
+ if(flags & 1) { // shorts
+ mtx[4] = ttSHORT(data, comp);
+ comp += 2;
+ mtx[5] = ttSHORT(data, comp);
+ comp += 2;
+ }
+ else {
+ mtx[4] = ttCHAR(data, comp);
+ comp += 1;
+ mtx[5] = ttCHAR(data, comp);
+ comp += 1;
+ }
+ }
+ else {
+ // @TODO handle matching point
+ STBTT_assert(0);
+ }
+ if(flags & (1 << 3)) { // WE_HAVE_A_SCALE
+ mtx[0] = mtx[3] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ mtx[1] = mtx[2] = 0;
+ }
+ else if(flags & (1 << 6)) { // WE_HAVE_AN_X_AND_YSCALE
+ mtx[0] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ mtx[1] = mtx[2] = 0;
+ mtx[3] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ }
+ else if(flags & (1 << 7)) { // WE_HAVE_A_TWO_BY_TWO
+ mtx[0] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ mtx[1] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ mtx[2] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ mtx[3] = ttSHORT(data, comp) / 16384.0f;
+ comp += 2;
+ }
+
+ // Find transformation scales.
+ m = (float)STBTT_sqrt(mtx[0] * mtx[0] + mtx[1] * mtx[1]);
+ n = (float)STBTT_sqrt(mtx[2] * mtx[2] + mtx[3] * mtx[3]);
+
+ // Get indexed glyph.
+ comp_num_verts = stbtt_GetGlyphShape(info, gidx, &comp_verts);
+ if(comp_num_verts > 0) {
+ // Transform vertices.
+ for(i = 0; i < comp_num_verts; ++i) {
+ stbtt_vertex * v = &comp_verts[i];
+ stbtt_vertex_type x, y;
+ x = v->x;
+ y = v->y;
+ v->x = (stbtt_vertex_type)(m * (mtx[0] * x + mtx[2] * y + mtx[4]));
+ v->y = (stbtt_vertex_type)(n * (mtx[1] * x + mtx[3] * y + mtx[5]));
+ x = v->cx;
+ y = v->cy;
+ v->cx = (stbtt_vertex_type)(m * (mtx[0] * x + mtx[2] * y + mtx[4]));
+ v->cy = (stbtt_vertex_type)(n * (mtx[1] * x + mtx[3] * y + mtx[5]));
+ }
+ // Append vertices.
+ tmp = (stbtt_vertex *)STBTT_malloc((num_vertices + comp_num_verts) * sizeof(stbtt_vertex), info->userdata);
+ if(!tmp) {
+ if(vertices) STBTT_free(vertices, info->userdata);
+ if(comp_verts) STBTT_free(comp_verts, info->userdata);
+ return 0;
+ }
+ if(num_vertices > 0 && vertices) STBTT_memcpy(tmp, vertices, num_vertices * sizeof(stbtt_vertex));
+ STBTT_memcpy(tmp + num_vertices, comp_verts, comp_num_verts * sizeof(stbtt_vertex));
+ if(vertices) STBTT_free(vertices, info->userdata);
+ vertices = tmp;
+ STBTT_free(comp_verts, info->userdata);
+ num_vertices += comp_num_verts;
+ }
+ // More components ?
+ more = flags & (1 << 5);
+ }
+ }
+ else {
+ // numberOfCounters == 0, do nothing
+ }
+
+ *pvertices = vertices;
+ return num_vertices;
+}
+
+typedef struct {
+ int bounds;
+ int started;
+ float first_x, first_y;
+ float x, y;
+ stbtt_int32 min_x, max_x, min_y, max_y;
+
+ stbtt_vertex * pvertices;
+ int num_vertices;
+} stbtt__csctx;
+
+#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0}
+
+static void stbtt__track_vertex(stbtt__csctx * c, stbtt_int32 x, stbtt_int32 y)
+{
+ if(x > c->max_x || !c->started) c->max_x = x;
+ if(y > c->max_y || !c->started) c->max_y = y;
+ if(x < c->min_x || !c->started) c->min_x = x;
+ if(y < c->min_y || !c->started) c->min_y = y;
+ c->started = 1;
+}
+
+static void stbtt__csctx_v(stbtt__csctx * c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx,
+ stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1)
+{
+ if(c->bounds) {
+ stbtt__track_vertex(c, x, y);
+ if(type == STBTT_vcubic) {
+ stbtt__track_vertex(c, cx, cy);
+ stbtt__track_vertex(c, cx1, cy1);
+ }
+ }
+ else {
+ stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy);
+ c->pvertices[c->num_vertices].cx1 = (stbtt_int16)cx1;
+ c->pvertices[c->num_vertices].cy1 = (stbtt_int16)cy1;
+ }
+ c->num_vertices++;
+}
+
+static void stbtt__csctx_close_shape(stbtt__csctx * ctx)
+{
+ if(ctx->first_x != ctx->x || ctx->first_y != ctx->y)
+ stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0);
+}
+
+static void stbtt__csctx_rmove_to(stbtt__csctx * ctx, float dx, float dy)
+{
+ stbtt__csctx_close_shape(ctx);
+ ctx->first_x = ctx->x = ctx->x + dx;
+ ctx->first_y = ctx->y = ctx->y + dy;
+ stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0);
+}
+
+static void stbtt__csctx_rline_to(stbtt__csctx * ctx, float dx, float dy)
+{
+ ctx->x += dx;
+ ctx->y += dy;
+ stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0);
+}
+
+static void stbtt__csctx_rccurve_to(stbtt__csctx * ctx, float dx1, float dy1, float dx2, float dy2, float dx3,
+ float dy3)
+{
+ float cx1 = ctx->x + dx1;
+ float cy1 = ctx->y + dy1;
+ float cx2 = cx1 + dx2;
+ float cy2 = cy1 + dy2;
+ ctx->x = cx2 + dx3;
+ ctx->y = cy2 + dy3;
+ stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2);
+}
+
+static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n)
+{
+ int count = stbtt__cff_index_count(&idx);
+ int bias = 107;
+ if(count >= 33900)
+ bias = 32768;
+ else if(count >= 1240)
+ bias = 1131;
+ n += bias;
+ if(n < 0 || n >= count)
+ return stbtt__new_buf(NULL, 0);
+ return stbtt__cff_index_get(idx, n);
+}
+
+static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo * info, int glyph_index)
+{
+ stbtt__buf fdselect = info->fdselect;
+ int nranges, start, end, v, fmt, fdselector = -1, i;
+
+ stbtt__buf_seek(&fdselect, 0);
+ fmt = stbtt__buf_get8(&fdselect);
+ if(fmt == 0) {
+ // untested
+ stbtt__buf_skip(&fdselect, glyph_index);
+ fdselector = stbtt__buf_get8(&fdselect);
+ }
+ else if(fmt == 3) {
+ nranges = stbtt__buf_get16(&fdselect);
+ start = stbtt__buf_get16(&fdselect);
+ for(i = 0; i < nranges; i++) {
+ v = stbtt__buf_get8(&fdselect);
+ end = stbtt__buf_get16(&fdselect);
+ if(glyph_index >= start && glyph_index < end) {
+ fdselector = v;
+ break;
+ }
+ start = end;
+ }
+ }
+ if(fdselector == -1) stbtt__new_buf(NULL, 0);
+ return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector));
+}
+
+static int stbtt__run_charstring(const stbtt_fontinfo * info, int glyph_index, stbtt__csctx * c)
+{
+ int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0;
+ int has_subrs = 0, clear_stack;
+ float s[48];
+ stbtt__buf subr_stack[10], subrs = info->subrs, b;
+ float f;
+
+#define STBTT__CSERR(s) (0)
+
+ // this currently ignores the initial width value, which isn't needed if we have hmtx
+ b = stbtt__cff_index_get(info->charstrings, glyph_index);
+ while(b.cursor < b.size) {
+ i = 0;
+ clear_stack = 1;
+ b0 = stbtt__buf_get8(&b);
+ switch(b0) {
+ // @TODO implement hinting
+ case 0x13: // hintmask
+ case 0x14: // cntrmask
+ if(in_header)
+ maskbits += (sp / 2); // implicit "vstem"
+ in_header = 0;
+ stbtt__buf_skip(&b, (maskbits + 7) / 8);
+ break;
+
+ case 0x01: // hstem
+ case 0x03: // vstem
+ case 0x12: // hstemhm
+ case 0x17: // vstemhm
+ maskbits += (sp / 2);
+ break;
+
+ case 0x15: // rmoveto
+ in_header = 0;
+ if(sp < 2) return STBTT__CSERR("rmoveto stack");
+ stbtt__csctx_rmove_to(c, s[sp - 2], s[sp - 1]);
+ break;
+ case 0x04: // vmoveto
+ in_header = 0;
+ if(sp < 1) return STBTT__CSERR("vmoveto stack");
+ stbtt__csctx_rmove_to(c, 0, s[sp - 1]);
+ break;
+ case 0x16: // hmoveto
+ in_header = 0;
+ if(sp < 1) return STBTT__CSERR("hmoveto stack");
+ stbtt__csctx_rmove_to(c, s[sp - 1], 0);
+ break;
+
+ case 0x05: // rlineto
+ if(sp < 2) return STBTT__CSERR("rlineto stack");
+ for(; i + 1 < sp; i += 2)
+ stbtt__csctx_rline_to(c, s[i], s[i + 1]);
+ break;
+
+ // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical
+ // starting from a different place.
+
+ case 0x07: // vlineto
+ if(sp < 1) return STBTT__CSERR("vlineto stack");
+ goto vlineto;
+ case 0x06: // hlineto
+ if(sp < 1) return STBTT__CSERR("hlineto stack");
+ for(;;) {
+ if(i >= sp) break;
+ stbtt__csctx_rline_to(c, s[i], 0);
+ i++;
+vlineto:
+ if(i >= sp) break;
+ stbtt__csctx_rline_to(c, 0, s[i]);
+ i++;
+ }
+ break;
+
+ case 0x1F: // hvcurveto
+ if(sp < 4) return STBTT__CSERR("hvcurveto stack");
+ goto hvcurveto;
+ case 0x1E: // vhcurveto
+ if(sp < 4) return STBTT__CSERR("vhcurveto stack");
+ for(;;) {
+ if(i + 3 >= sp) break;
+ stbtt__csctx_rccurve_to(c, 0, s[i], s[i + 1], s[i + 2], s[i + 3], (sp - i == 5) ? s[i + 4] : 0.0f);
+ i += 4;
+hvcurveto:
+ if(i + 3 >= sp) break;
+ stbtt__csctx_rccurve_to(c, s[i], 0, s[i + 1], s[i + 2], (sp - i == 5) ? s[i + 4] : 0.0f, s[i + 3]);
+ i += 4;
+ }
+ break;
+
+ case 0x08: // rrcurveto
+ if(sp < 6) return STBTT__CSERR("rcurveline stack");
+ for(; i + 5 < sp; i += 6)
+ stbtt__csctx_rccurve_to(c, s[i], s[i + 1], s[i + 2], s[i + 3], s[i + 4], s[i + 5]);
+ break;
+
+ case 0x18: // rcurveline
+ if(sp < 8) return STBTT__CSERR("rcurveline stack");
+ for(; i + 5 < sp - 2; i += 6)
+ stbtt__csctx_rccurve_to(c, s[i], s[i + 1], s[i + 2], s[i + 3], s[i + 4], s[i + 5]);
+ if(i + 1 >= sp) return STBTT__CSERR("rcurveline stack");
+ stbtt__csctx_rline_to(c, s[i], s[i + 1]);
+ break;
+
+ case 0x19: // rlinecurve
+ if(sp < 8) return STBTT__CSERR("rlinecurve stack");
+ for(; i + 1 < sp - 6; i += 2)
+ stbtt__csctx_rline_to(c, s[i], s[i + 1]);
+ if(i + 5 >= sp) return STBTT__CSERR("rlinecurve stack");
+ stbtt__csctx_rccurve_to(c, s[i], s[i + 1], s[i + 2], s[i + 3], s[i + 4], s[i + 5]);
+ break;
+
+ case 0x1A: // vvcurveto
+ case 0x1B: // hhcurveto
+ if(sp < 4) return STBTT__CSERR("(vv|hh)curveto stack");
+ f = 0.0;
+ if(sp & 1) {
+ f = s[i];
+ i++;
+ }
+ for(; i + 3 < sp; i += 4) {
+ if(b0 == 0x1B)
+ stbtt__csctx_rccurve_to(c, s[i], f, s[i + 1], s[i + 2], s[i + 3], 0.0);
+ else
+ stbtt__csctx_rccurve_to(c, f, s[i], s[i + 1], s[i + 2], 0.0, s[i + 3]);
+ f = 0.0;
+ }
+ break;
+
+ case 0x0A: // callsubr
+ if(!has_subrs) {
+ if(info->fdselect.size)
+ subrs = stbtt__cid_get_glyph_subrs(info, glyph_index);
+ has_subrs = 1;
+ }
+ // FALLTHROUGH
+ case 0x1D: // callgsubr
+ if(sp < 1) return STBTT__CSERR("call(g|)subr stack");
+ v = (int)s[--sp];
+ if(subr_stack_height >= 10) return STBTT__CSERR("recursion limit");
+ subr_stack[subr_stack_height++] = b;
+ b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v);
+ if(b.size == 0) return STBTT__CSERR("subr not found");
+ b.cursor = 0;
+ clear_stack = 0;
+ break;
+
+ case 0x0B: // return
+ if(subr_stack_height <= 0) return STBTT__CSERR("return outside subr");
+ b = subr_stack[--subr_stack_height];
+ clear_stack = 0;
+ break;
+
+ case 0x0E: // endchar
+ stbtt__csctx_close_shape(c);
+ return 1;
+
+ case 0x0C: { // two-byte escape
+ float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6;
+ float dx, dy;
+ int b1 = stbtt__buf_get8(&b);
+ switch(b1) {
+ // @TODO These "flex" implementations ignore the flex-depth and resolution,
+ // and always draw beziers.
+ case 0x22: // hflex
+ if(sp < 7) return STBTT__CSERR("hflex stack");
+ dx1 = s[0];
+ dx2 = s[1];
+ dy2 = s[2];
+ dx3 = s[3];
+ dx4 = s[4];
+ dx5 = s[5];
+ dx6 = s[6];
+ stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0);
+ stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0);
+ break;
+
+ case 0x23: // flex
+ if(sp < 13) return STBTT__CSERR("flex stack");
+ dx1 = s[0];
+ dy1 = s[1];
+ dx2 = s[2];
+ dy2 = s[3];
+ dx3 = s[4];
+ dy3 = s[5];
+ dx4 = s[6];
+ dy4 = s[7];
+ dx5 = s[8];
+ dy5 = s[9];
+ dx6 = s[10];
+ dy6 = s[11];
+ //fd is s[12]
+ stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3);
+ stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6);
+ break;
+
+ case 0x24: // hflex1
+ if(sp < 9) return STBTT__CSERR("hflex1 stack");
+ dx1 = s[0];
+ dy1 = s[1];
+ dx2 = s[2];
+ dy2 = s[3];
+ dx3 = s[4];
+ dx4 = s[5];
+ dx5 = s[6];
+ dy5 = s[7];
+ dx6 = s[8];
+ stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0);
+ stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1 + dy2 + dy5));
+ break;
+
+ case 0x25: // flex1
+ if(sp < 11) return STBTT__CSERR("flex1 stack");
+ dx1 = s[0];
+ dy1 = s[1];
+ dx2 = s[2];
+ dy2 = s[3];
+ dx3 = s[4];
+ dy3 = s[5];
+ dx4 = s[6];
+ dy4 = s[7];
+ dx5 = s[8];
+ dy5 = s[9];
+ dx6 = dy6 = s[10];
+ dx = dx1 + dx2 + dx3 + dx4 + dx5;
+ dy = dy1 + dy2 + dy3 + dy4 + dy5;
+ if(STBTT_fabs(dx) > STBTT_fabs(dy))
+ dy6 = -dy;
+ else
+ dx6 = -dx;
+ stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3);
+ stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6);
+ break;
+
+ default:
+ return STBTT__CSERR("unimplemented");
+ }
+ }
+ break;
+
+ default:
+ if(b0 != 255 && b0 != 28 && b0 < 32)
+ return STBTT__CSERR("reserved operator");
+
+ // push immediate
+ if(b0 == 255) {
+ f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000;
+ }
+ else {
+ stbtt__buf_skip(&b, -1);
+ f = (float)(stbtt_int16)stbtt__cff_int(&b);
+ }
+ if(sp >= 48) return STBTT__CSERR("push stack overflow");
+ s[sp++] = f;
+ clear_stack = 0;
+ break;
+ }
+ if(clear_stack) sp = 0;
+ }
+ return STBTT__CSERR("no endchar");
+
+#undef STBTT__CSERR
+}
+
+static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo * info, int glyph_index, stbtt_vertex * *pvertices)
+{
+ // runs the charstring twice, once to count and once to output (to avoid realloc)
+ stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1);
+ stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0);
+ if(stbtt__run_charstring(info, glyph_index, &count_ctx)) {
+ *pvertices = (stbtt_vertex *)STBTT_malloc(count_ctx.num_vertices * sizeof(stbtt_vertex), info->userdata);
+ output_ctx.pvertices = *pvertices;
+ if(stbtt__run_charstring(info, glyph_index, &output_ctx)) {
+ STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices);
+ return output_ctx.num_vertices;
+ }
+ }
+ *pvertices = NULL;
+ return 0;
+}
+
+static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo * info, int glyph_index, int * x0, int * y0, int * x1, int * y1)
+{
+ stbtt__csctx c = STBTT__CSCTX_INIT(1);
+ int r = stbtt__run_charstring(info, glyph_index, &c);
+ if(x0) *x0 = r ? c.min_x : 0;
+ if(y0) *y0 = r ? c.min_y : 0;
+ if(x1) *x1 = r ? c.max_x : 0;
+ if(y1) *y1 = r ? c.max_y : 0;
+ return r ? c.num_vertices : 0;
+}
+
+STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo * info, int glyph_index, stbtt_vertex * *pvertices)
+{
+ if(!info->cff.size)
+ return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices);
+ else
+ return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices);
+}
+
+STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo * info, int glyph_index, int * advanceWidth,
+ int * leftSideBearing)
+{
+ stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data, info->hhea + 34);
+ if(glyph_index < numOfLongHorMetrics) {
+ if(advanceWidth) *advanceWidth = ttSHORT(info->data, info->hmtx + 4 * glyph_index);
+ if(leftSideBearing) *leftSideBearing = ttSHORT(info->data, info->hmtx + 4 * glyph_index + 2);
+ }
+ else {
+ if(advanceWidth) *advanceWidth = ttSHORT(info->data, info->hmtx + 4 * (numOfLongHorMetrics - 1));
+ if(leftSideBearing) *leftSideBearing = ttSHORT(info->data,
+ info->hmtx + 4 * numOfLongHorMetrics + 2 * (glyph_index - numOfLongHorMetrics));
+ }
+}
+
+STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo * info)
+{
+ // we only look at the first table. it must be 'horizontal' and format 0.
+ if(!info->kern)
+ return 0;
+ if(ttUSHORT(info->data, 2 + info->kern) < 1) // number of tables, need at least 1
+ return 0;
+ if(ttUSHORT(info->data, 8 + info->kern) != 1) // horizontal flag must be set in format
+ return 0;
+
+ return ttUSHORT(info->data, 10 + info->kern);
+}
+
+STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo * info, stbtt_kerningentry * table, int table_length)
+{
+ int k, length;
+
+ // we only look at the first table. it must be 'horizontal' and format 0.
+ if(!info->kern)
+ return 0;
+ if(ttUSHORT(info->data, 2 + info->kern) < 1) // number of tables, need at least 1
+ return 0;
+ if(ttUSHORT(info->data, 8 + info->kern) != 1) // horizontal flag must be set in format
+ return 0;
+
+ length = ttUSHORT(info->data, 10 + info->kern);
+ if(table_length < length)
+ length = table_length;
+
+ for(k = 0; k < length; k++) {
+ table[k].glyph1 = ttUSHORT(info->data, 18 + (k * 6) + info->kern);
+ table[k].glyph2 = ttUSHORT(info->data, 20 + (k * 6) + info->kern);
+ table[k].advance = ttSHORT(info->data, 22 + (k * 6) + info->kern);
+ }
+
+ return length;
+}
+
+static int stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo * info, int glyph1, int glyph2)
+{
+ stbtt_uint32 needle, straw;
+ int l, r, m;
+
+ // we only look at the first table. it must be 'horizontal' and format 0.
+ if(!info->kern)
+ return 0;
+ if(ttUSHORT(info->data, info->kern + 2) < 1) // number of tables, need at least 1
+ return 0;
+ if(ttUSHORT(info->data, info->kern + 8) != 1) // horizontal flag must be set in format
+ return 0;
+
+ l = 0;
+ r = ttUSHORT(info->data, info->kern + 10) - 1;
+ needle = glyph1 << 16 | glyph2;
+ while(l <= r) {
+ m = (l + r) >> 1;
+ straw = ttULONG(info->data, info->kern + 18 + (m * 6)); // note: unaligned read
+ if(needle < straw)
+ r = m - 1;
+ else if(needle > straw)
+ l = m + 1;
+ else
+ return ttSHORT(info->data, info->kern + 22 + (m * 6));
+ }
+ return 0;
+}
+#ifdef STBTT_STREAM_TYPE
+ static stbtt_int32 stbtt__GetCoverageIndex(STBTT_STREAM_TYPE data, stbtt_uint32 coverageTable, int glyph)
+#else
+ static stbtt_int32 stbtt__GetCoverageIndex(const stbtt_uint8 * data, stbtt_uint32 coverageTable, int glyph)
+#endif
+{
+ stbtt_uint16 coverageFormat = ttUSHORT(data, coverageTable);
+ switch(coverageFormat) {
+ case 1: {
+ stbtt_uint16 glyphCount = ttUSHORT(data, coverageTable + 2);
+
+ // Binary search.
+ stbtt_int32 l = 0, r = glyphCount - 1, m;
+ int straw, needle = glyph;
+ while(l <= r) {
+ stbtt_uint32 glyphArray = coverageTable + 4;
+ stbtt_uint16 glyphID;
+ m = (l + r) >> 1;
+ glyphID = ttUSHORT(data, glyphArray + 2 * m);
+ straw = glyphID;
+ if(needle < straw)
+ r = m - 1;
+ else if(needle > straw)
+ l = m + 1;
+ else {
+ return m;
+ }
+ }
+ break;
+ }
+
+ case 2: {
+ stbtt_uint16 rangeCount = ttUSHORT(data, coverageTable + 2);
+ stbtt_uint32 rangeArray = coverageTable + 4;
+
+ // Binary search.
+ stbtt_int32 l = 0, r = rangeCount - 1, m;
+ int strawStart, strawEnd, needle = glyph;
+ while(l <= r) {
+ stbtt_uint32 rangeRecord;
+ m = (l + r) >> 1;
+ rangeRecord = rangeArray + 6 * m;
+ strawStart = ttUSHORT(data, rangeRecord);
+ strawEnd = ttUSHORT(data, rangeRecord + 2);
+ if(needle < strawStart)
+ r = m - 1;
+ else if(needle > strawEnd)
+ l = m + 1;
+ else {
+ stbtt_uint16 startCoverageIndex = ttUSHORT(data, rangeRecord + 4);
+ return startCoverageIndex + glyph - strawStart;
+ }
+ }
+ break;
+ }
+
+ default:
+ return -1; // unsupported
+ }
+
+ return -1;
+}
+#ifdef STBTT_STREAM_TYPE
+ static stbtt_int32 stbtt__GetGlyphClass(STBTT_STREAM_TYPE data, stbtt_uint32 classDefTable, int glyph)
+#else
+ static stbtt_int32 stbtt__GetGlyphClass(const stbtt_uint8 * data, stbtt_uint32 classDefTable, int glyph)
+#endif
+{
+ stbtt_uint16 classDefFormat = ttUSHORT(data, classDefTable);
+ switch(classDefFormat) {
+ case 1: {
+ stbtt_uint16 startGlyphID = ttUSHORT(data, classDefTable + 2);
+ stbtt_uint16 glyphCount = ttUSHORT(data, classDefTable + 4);
+ stbtt_uint32 classDef1ValueArray = classDefTable + 6;
+
+ if(glyph >= startGlyphID && glyph < startGlyphID + glyphCount)
+ return (stbtt_int32)ttUSHORT(data, classDef1ValueArray + 2 * (glyph - startGlyphID));
+ break;
+ }
+
+ case 2: {
+ stbtt_uint16 classRangeCount = ttUSHORT(data, classDefTable + 2);
+ stbtt_uint32 classRangeRecords = classDefTable + 4;
+
+ // Binary search.
+ stbtt_int32 l = 0, r = classRangeCount - 1, m;
+ int strawStart, strawEnd, needle = glyph;
+ while(l <= r) {
+ stbtt_uint32 classRangeRecord;
+ m = (l + r) >> 1;
+ classRangeRecord = classRangeRecords + 6 * m;
+ strawStart = ttUSHORT(data, classRangeRecord);
+ strawEnd = ttUSHORT(data, classRangeRecord + 2);
+ if(needle < strawStart)
+ r = m - 1;
+ else if(needle > strawEnd)
+ l = m + 1;
+ else
+ return (stbtt_int32)ttUSHORT(data, classRangeRecord + 4);
+ }
+ break;
+ }
+
+ default:
+ return -1; // Unsupported definition type, return an error.
+ }
+
+ // "All glyphs not assigned to a class fall into class 0". (OpenType spec)
+ return 0;
+}
+
+// Define to STBTT_assert(x) if you want to break on unimplemented formats.
+#define STBTT_GPOS_TODO_assert(x)
+
+static stbtt_int32 stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo * info, int glyph1, int glyph2)
+{
+ stbtt_uint16 lookupListOffset;
+ stbtt_uint32 lookupList;
+ stbtt_uint16 lookupCount;
+#ifdef STBTT_STREAM_TYPE
+ STBTT_STREAM_TYPE data = info->data;
+#else
+ const stbtt_uint8 * data = info->data;
+#endif
+ stbtt_int32 i, sti;
+
+ if(!info->gpos) return 0;
+
+ if(ttUSHORT(data, 0 + info->gpos) != 1) return 0; // Major version 1
+ if(ttUSHORT(data, 2 + info->gpos) != 0) return 0; // Minor version 0
+
+ lookupListOffset = ttUSHORT(data, 8 + info->gpos);
+ lookupList = lookupListOffset;
+ lookupCount = ttUSHORT(data, lookupList);
+
+ for(i = 0; i < lookupCount; ++i) {
+ stbtt_uint16 lookupOffset = ttUSHORT(data, lookupList + 2 + 2 * i);
+ stbtt_uint32 lookupTable = lookupList + lookupOffset;
+
+ stbtt_uint16 lookupType = ttUSHORT(data, lookupTable);
+ stbtt_uint16 subTableCount = ttUSHORT(data, lookupTable + 4);
+ stbtt_uint32 subTableOffsets = lookupTable + 6;
+ if(lookupType != 2) // Pair Adjustment Positioning Subtable
+ continue;
+
+ for(sti = 0; sti < subTableCount; sti++) {
+ stbtt_uint16 subtableOffset = ttUSHORT(data, subTableOffsets + 2 * sti);
+ stbtt_uint32 table = lookupTable + subtableOffset;
+ stbtt_uint16 posFormat = ttUSHORT(data, table);
+ stbtt_uint16 coverageOffset = ttUSHORT(data, table + 2);
+ stbtt_int32 coverageIndex = stbtt__GetCoverageIndex(data, table + coverageOffset, glyph1);
+ if(coverageIndex == -1) continue;
+
+ switch(posFormat) {
+ case 1: {
+ stbtt_int32 l, r, m;
+ int straw, needle;
+ stbtt_uint16 valueFormat1 = ttUSHORT(data, table + 4);
+ stbtt_uint16 valueFormat2 = ttUSHORT(data, table + 6);
+ if(valueFormat1 == 4 && valueFormat2 == 0) { // Support more formats?
+ stbtt_int32 valueRecordPairSizeInBytes = 2;
+ stbtt_uint16 pairSetCount = ttUSHORT(data, table + 8);
+ stbtt_uint16 pairPosOffset = ttUSHORT(data, table + 10 + 2 * coverageIndex);
+ stbtt_uint32 pairValueTable = table + pairPosOffset;
+ stbtt_uint16 pairValueCount = ttUSHORT(data, pairValueTable);
+ stbtt_uint32 pairValueArray = pairValueTable + 2;
+
+ if(coverageIndex >= pairSetCount) return 0;
+
+ needle = glyph2;
+ r = pairValueCount - 1;
+ l = 0;
+
+ // Binary search.
+ while(l <= r) {
+ stbtt_uint16 secondGlyph;
+ stbtt_uint32 pairValue;
+ m = (l + r) >> 1;
+ pairValue = pairValueArray + (2 + valueRecordPairSizeInBytes) * m;
+ secondGlyph = ttUSHORT(data, pairValue);
+ straw = secondGlyph;
+ if(needle < straw)
+ r = m - 1;
+ else if(needle > straw)
+ l = m + 1;
+ else {
+ stbtt_int16 xAdvance = ttSHORT(data, pairValue + 2);
+ return xAdvance;
+ }
+ }
+ }
+ else
+ return 0;
+ break;
+ }
+
+ case 2: {
+ stbtt_uint16 valueFormat1 = ttUSHORT(data, table + 4);
+ stbtt_uint16 valueFormat2 = ttUSHORT(data, table + 6);
+ if(valueFormat1 == 4 && valueFormat2 == 0) { // Support more formats?
+ stbtt_uint16 classDef1Offset = ttUSHORT(data, table + 8);
+ stbtt_uint16 classDef2Offset = ttUSHORT(data, table + 10);
+ int glyph1class = stbtt__GetGlyphClass(data, table + classDef1Offset, glyph1);
+ int glyph2class = stbtt__GetGlyphClass(data, table + classDef2Offset, glyph2);
+
+ stbtt_uint16 class1Count = ttUSHORT(data, table + 12);
+ stbtt_uint16 class2Count = ttUSHORT(data, table + 14);
+ stbtt_uint32 class1Records, class2Records;
+ stbtt_int16 xAdvance;
+
+ if(glyph1class < 0 || glyph1class >= class1Count) return 0; // malformed
+ if(glyph2class < 0 || glyph2class >= class2Count) return 0; // malformed
+
+ class1Records = table + 16;
+ class2Records = class1Records + 2 * (glyph1class * class2Count);
+ xAdvance = ttSHORT(data, class2Records + 2 * glyph2class);
+ return xAdvance;
+ }
+ else
+ return 0;
+ break;
+ }
+
+ default:
+ return 0; // Unsupported position format
+ }
+ }
+ }
+
+ return 0;
+}
+
+STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo * info, int g1, int g2)
+{
+ int xAdvance = 0;
+
+ if(info->gpos)
+ xAdvance += stbtt__GetGlyphGPOSInfoAdvance(info, g1, g2);
+ else if(info->kern)
+ xAdvance += stbtt__GetGlyphKernInfoAdvance(info, g1, g2);
+
+ return xAdvance;
+}
+
+STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo * info, int ch1, int ch2)
+{
+ if(!info->kern && !info->gpos) // if no kerning table, don't waste time looking up both codepoint->glyphs
+ return 0;
+ return stbtt_GetGlyphKernAdvance(info, stbtt_FindGlyphIndex(info, ch1), stbtt_FindGlyphIndex(info, ch2));
+}
+
+STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo * info, int codepoint, int * advanceWidth,
+ int * leftSideBearing)
+{
+ stbtt_GetGlyphHMetrics(info, stbtt_FindGlyphIndex(info, codepoint), advanceWidth, leftSideBearing);
+}
+
+STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo * info, int * ascent, int * descent, int * lineGap)
+{
+ if(ascent) *ascent = ttSHORT(info->data, info->hhea + 4);
+ if(descent) *descent = ttSHORT(info->data, info->hhea + 6);
+ if(lineGap) *lineGap = ttSHORT(info->data, info->hhea + 8);
+}
+
+STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo * info, int * typoAscent, int * typoDescent,
+ int * typoLineGap)
+{
+ int tab = stbtt__find_table(info->data, info->fontstart, "OS/2");
+ if(!tab)
+ return 0;
+ if(typoAscent) *typoAscent = ttSHORT(info->data, tab + 68);
+ if(typoDescent) *typoDescent = ttSHORT(info->data, tab + 70);
+ if(typoLineGap) *typoLineGap = ttSHORT(info->data, tab + 72);
+ return 1;
+}
+
+STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo * info, int * x0, int * y0, int * x1, int * y1)
+{
+ *x0 = ttSHORT(info->data, info->head + 36);
+ *y0 = ttSHORT(info->data, info->head + 38);
+ *x1 = ttSHORT(info->data, info->head + 40);
+ *y1 = ttSHORT(info->data, info->head + 42);
+}
+
+STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo * info, float height)
+{
+ int fheight = ttSHORT(info->data, info->hhea + 4) - ttSHORT(info->data, info->hhea + 6);
+ return (float)height / fheight;
+}
+
+STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo * info, float pixels)
+{
+ int unitsPerEm = ttUSHORT(info->data, info->head + 18);
+ return pixels / unitsPerEm;
+}
+
+STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo * info, stbtt_vertex * v)
+{
+ STBTT_free(v, info->userdata);
+}
+
+STBTT_DEF stbtt_uint32 stbtt_FindSVGDoc(const stbtt_fontinfo * info, int gl)
+{
+ int i;
+ stbtt_uint32 svg_doc_list = stbtt__get_svg((stbtt_fontinfo *)info);
+
+ int numEntries = ttUSHORT(info->data, svg_doc_list);
+ stbtt_uint32 svg_docs = svg_doc_list + 2;
+
+ for(i = 0; i < numEntries; i++) {
+ stbtt_uint32 svg_doc = svg_docs + (12 * i);
+ if((gl >= ttUSHORT(info->data, svg_doc)) && (gl <= ttUSHORT(info->data, svg_doc + 2)))
+ return svg_doc;
+ }
+ return 0;
+}
+
+STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo * info, int gl, stbtt_uint32 * svgOfs)
+{
+ stbtt_uint32 svg_doc;
+
+ if(info->svg == 0)
+ return 0;
+
+ svg_doc = stbtt_FindSVGDoc(info, gl);
+ if(svg_doc != 0) {
+ *svgOfs = info->svg + ttULONG(info->data, svg_doc + 4);
+ return ttULONG(info->data, svg_doc + 8);
+ }
+ else {
+ return 0;
+ }
+}
+
+STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo * info, int unicode_codepoint, stbtt_uint32 * svgOfs)
+{
+ return stbtt_GetGlyphSVG(info, stbtt_FindGlyphIndex(info, unicode_codepoint), svgOfs);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// antialiasing software rasterizer
+//
+
+STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo * font, int glyph, float scale_x, float scale_y,
+ float shift_x, float shift_y, int * ix0, int * iy0, int * ix1, int * iy1)
+{
+ int x0 = 0, y0 = 0, x1, y1; // =0 suppresses compiler warning
+ if(!stbtt_GetGlyphBox(font, glyph, &x0, &y0, &x1, &y1)) {
+ // e.g. space character
+ if(ix0) *ix0 = 0;
+ if(iy0) *iy0 = 0;
+ if(ix1) *ix1 = 0;
+ if(iy1) *iy1 = 0;
+ }
+ else {
+ // move to integral bboxes (treating pixels as little squares, what pixels get touched)?
+ if(ix0) *ix0 = STBTT_ifloor(x0 * scale_x + shift_x);
+ if(iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y);
+ if(ix1) *ix1 = STBTT_iceil(x1 * scale_x + shift_x);
+ if(iy1) *iy1 = STBTT_iceil(-y0 * scale_y + shift_y);
+ }
+}
+
+STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo * font, int glyph, float scale_x, float scale_y, int * ix0,
+ int * iy0, int * ix1, int * iy1)
+{
+ stbtt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y, 0.0f, 0.0f, ix0, iy0, ix1, iy1);
+}
+
+STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo * font, int codepoint, float scale_x,
+ float scale_y, float shift_x, float shift_y, int * ix0, int * iy0, int * ix1, int * iy1)
+{
+ stbtt_GetGlyphBitmapBoxSubpixel(font, stbtt_FindGlyphIndex(font, codepoint), scale_x, scale_y, shift_x, shift_y, ix0,
+ iy0, ix1, iy1);
+}
+
+STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo * font, int codepoint, float scale_x, float scale_y,
+ int * ix0, int * iy0, int * ix1, int * iy1)
+{
+ stbtt_GetCodepointBitmapBoxSubpixel(font, codepoint, scale_x, scale_y, 0.0f, 0.0f, ix0, iy0, ix1, iy1);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Rasterizer
+
+typedef struct stbtt__hheap_chunk {
+ struct stbtt__hheap_chunk * next;
+} stbtt__hheap_chunk;
+
+typedef struct stbtt__hheap {
+ struct stbtt__hheap_chunk * head;
+ void * first_free;
+ int num_remaining_in_head_chunk;
+} stbtt__hheap;
+
+static void * stbtt__hheap_alloc(stbtt__hheap * hh, size_t size, void * userdata)
+{
+ if(hh->first_free) {
+ void * p = hh->first_free;
+ hh->first_free = *(void **)p;
+ return p;
+ }
+ else {
+ if(hh->num_remaining_in_head_chunk == 0) {
+ int count = (size < 32 ? STBTT_HEAP_FACTOR_SIZE_32 : size < 128 ? STBTT_HEAP_FACTOR_SIZE_128 :
+ STBTT_HEAP_FACTOR_SIZE_DEFAULT);
+ stbtt__hheap_chunk * c = (stbtt__hheap_chunk *)STBTT_malloc(sizeof(stbtt__hheap_chunk) + size * count, userdata);
+ if(c == NULL)
+ return NULL;
+ c->next = hh->head;
+ hh->head = c;
+ hh->num_remaining_in_head_chunk = count;
+ }
+ --hh->num_remaining_in_head_chunk;
+ return (char *)(hh->head) + sizeof(stbtt__hheap_chunk) + size * hh->num_remaining_in_head_chunk;
+ }
+}
+
+static void stbtt__hheap_free(stbtt__hheap * hh, void * p)
+{
+ *(void **)p = hh->first_free;
+ hh->first_free = p;
+}
+
+static void stbtt__hheap_cleanup(stbtt__hheap * hh, void * userdata)
+{
+ stbtt__hheap_chunk * c = hh->head;
+ while(c) {
+ stbtt__hheap_chunk * n = c->next;
+ STBTT_free(c, userdata);
+ c = n;
+ }
+}
+
+typedef struct stbtt__edge {
+ float x0, y0, x1, y1;
+ int invert;
+} stbtt__edge;
+
+typedef struct stbtt__active_edge {
+ struct stbtt__active_edge * next;
+#if STBTT_RASTERIZER_VERSION==1
+ int x, dx;
+ float ey;
+ int direction;
+#elif STBTT_RASTERIZER_VERSION==2
+ float fx, fdx, fdy;
+ float direction;
+ float sy;
+ float ey;
+#else
+#error "Unrecognized value of STBTT_RASTERIZER_VERSION"
+#endif
+} stbtt__active_edge;
+
+#if STBTT_RASTERIZER_VERSION == 1
+#define STBTT_FIXSHIFT 10
+#define STBTT_FIX (1 << STBTT_FIXSHIFT)
+#define STBTT_FIXMASK (STBTT_FIX-1)
+
+static stbtt__active_edge * stbtt__new_active(stbtt__hheap * hh, stbtt__edge * e, int off_x, float start_point,
+ void * userdata)
+{
+ stbtt__active_edge * z = (stbtt__active_edge *)stbtt__hheap_alloc(hh, sizeof(*z), userdata);
+ float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+ STBTT_assert(z != NULL);
+ if(!z) return z;
+
+ // round dx down to avoid overshooting
+ if(dxdy < 0)
+ z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy);
+ else
+ z->dx = STBTT_ifloor(STBTT_FIX * dxdy);
+
+ z->x = STBTT_ifloor(STBTT_FIX * e->x0 + z->dx * (start_point -
+ e->y0)); // use z->dx so when we offset later it's by the same amount
+ z->x -= off_x * STBTT_FIX;
+
+ z->ey = e->y1;
+ z->next = 0;
+ z->direction = e->invert ? 1 : -1;
+ return z;
+}
+#elif STBTT_RASTERIZER_VERSION == 2
+static stbtt__active_edge * stbtt__new_active(stbtt__hheap * hh, stbtt__edge * e, int off_x, float start_point,
+ void * userdata)
+{
+ stbtt__active_edge * z = (stbtt__active_edge *)stbtt__hheap_alloc(hh, sizeof(*z), userdata);
+ float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+ STBTT_assert(z != NULL);
+ //STBTT_assert(e->y0 <= start_point);
+ if(!z) return z;
+ z->fdx = dxdy;
+ z->fdy = dxdy != 0.0f ? (1.0f / dxdy) : 0.0f;
+ z->fx = e->x0 + dxdy * (start_point - e->y0);
+ z->fx -= off_x;
+ z->direction = e->invert ? 1.0f : -1.0f;
+ z->sy = e->y0;
+ z->ey = e->y1;
+ z->next = 0;
+ return z;
+}
+#else
+#error "Unrecognized value of STBTT_RASTERIZER_VERSION"
+#endif
+
+#if STBTT_RASTERIZER_VERSION == 1
+// note: this routine clips fills that extend off the edges... ideally this
+// wouldn't happen, but it could happen if the truetype glyph bounding boxes
+// are wrong, or if the user supplies a too-small bitmap
+static void stbtt__fill_active_edges(unsigned char * scanline, int len, stbtt__active_edge * e, int max_weight)
+{
+ // non-zero winding fill
+ int x0 = 0, w = 0;
+
+ while(e) {
+ if(w == 0) {
+ // if we're currently at zero, we need to record the edge start point
+ x0 = e->x;
+ w += e->direction;
+ }
+ else {
+ int x1 = e->x;
+ w += e->direction;
+ // if we went to zero, we need to draw
+ if(w == 0) {
+ int i = x0 >> STBTT_FIXSHIFT;
+ int j = x1 >> STBTT_FIXSHIFT;
+
+ if(i < len && j >= 0) {
+ if(i == j) {
+ // x0,x1 are the same pixel, so compute combined coverage
+ scanline[i] = scanline[i] + (stbtt_uint8)((x1 - x0) * max_weight >> STBTT_FIXSHIFT);
+ }
+ else {
+ if(i >= 0) // add antialiasing for x0
+ scanline[i] = scanline[i] + (stbtt_uint8)(((STBTT_FIX - (x0 & STBTT_FIXMASK)) * max_weight) >> STBTT_FIXSHIFT);
+ else
+ i = -1; // clip
+
+ if(j < len) // add antialiasing for x1
+ scanline[j] = scanline[j] + (stbtt_uint8)(((x1 & STBTT_FIXMASK) * max_weight) >> STBTT_FIXSHIFT);
+ else
+ j = len; // clip
+
+ for(++i; i < j; ++i) // fill pixels between x0 and x1
+ scanline[i] = scanline[i] + (stbtt_uint8)max_weight;
+ }
+ }
+ }
+ }
+
+ e = e->next;
+ }
+}
+
+static void stbtt__rasterize_sorted_edges(stbtt__bitmap * result, stbtt__edge * e, int n, int vsubsample, int off_x,
+ int off_y, void * userdata)
+{
+ stbtt__hheap hh = { 0, 0, 0 };
+ stbtt__active_edge * active = NULL;
+ int y, j = 0;
+ int max_weight = (255 / vsubsample); // weight per vertical scanline
+ int s; // vertical subsample index
+ unsigned char scanline_data[512], * scanline;
+
+ if(result->w > 512)
+ scanline = (unsigned char *)STBTT_malloc(result->w, userdata);
+ else
+ scanline = scanline_data;
+
+ y = off_y * vsubsample;
+ e[n].y0 = (off_y + result->h) * (float)vsubsample + 1;
+
+ while(j < result->h) {
+ STBTT_memset(scanline, 0, result->w);
+ for(s = 0; s < vsubsample; ++s) {
+ // find center of pixel for this scanline
+ float scan_y = y + 0.5f;
+ stbtt__active_edge ** step = &active;
+
+ // update all active edges;
+ // remove all active edges that terminate before the center of this scanline
+ while(*step) {
+ stbtt__active_edge * z = *step;
+ if(z->ey <= scan_y) {
+ *step = z->next; // delete from list
+ STBTT_assert(z->direction);
+ z->direction = 0;
+ stbtt__hheap_free(&hh, z);
+ }
+ else {
+ z->x += z->dx; // advance to position for current scanline
+ step = &((*step)->next); // advance through list
+ }
+ }
+
+ // resort the list if needed
+ for(;;) {
+ int changed = 0;
+ step = &active;
+ while(*step && (*step)->next) {
+ if((*step)->x > (*step)->next->x) {
+ stbtt__active_edge * t = *step;
+ stbtt__active_edge * q = t->next;
+
+ t->next = q->next;
+ q->next = t;
+ *step = q;
+ changed = 1;
+ }
+ step = &(*step)->next;
+ }
+ if(!changed) break;
+ }
+
+ // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline
+ while(e->y0 <= scan_y) {
+ if(e->y1 > scan_y) {
+ stbtt__active_edge * z = stbtt__new_active(&hh, e, off_x, scan_y, userdata);
+ if(z != NULL) {
+ // find insertion point
+ if(active == NULL)
+ active = z;
+ else if(z->x < active->x) {
+ // insert at front
+ z->next = active;
+ active = z;
+ }
+ else {
+ // find thing to insert AFTER
+ stbtt__active_edge * p = active;
+ while(p->next && p->next->x < z->x)
+ p = p->next;
+ // at this point, p->next->x is NOT < z->x
+ z->next = p->next;
+ p->next = z;
+ }
+ }
+ }
+ ++e;
+ }
+
+ // now process all active edges in XOR fashion
+ if(active)
+ stbtt__fill_active_edges(scanline, result->w, active, max_weight);
+
+ ++y;
+ }
+ STBTT_memcpy(result->pixels + j * result->stride, scanline, result->w);
+ ++j;
+ }
+
+ stbtt__hheap_cleanup(&hh, userdata);
+
+ if(scanline != scanline_data)
+ STBTT_free(scanline, userdata);
+}
+
+#elif STBTT_RASTERIZER_VERSION == 2
+
+// the edge passed in here does not cross the vertical line at x or the vertical line at x+1
+// (i.e. it has already been clipped to those)
+static void stbtt__handle_clipped_edge(float * scanline, int x, stbtt__active_edge * e, float x0, float y0, float x1,
+ float y1)
+{
+ if(y0 == y1) return;
+ STBTT_assert(y0 < y1);
+ STBTT_assert(e->sy <= e->ey);
+ if(y0 > e->ey) return;
+ if(y1 < e->sy) return;
+ if(y0 < e->sy) {
+ x0 += (x1 - x0) * (e->sy - y0) / (y1 - y0);
+ y0 = e->sy;
+ }
+ if(y1 > e->ey) {
+ x1 += (x1 - x0) * (e->ey - y1) / (y1 - y0);
+ y1 = e->ey;
+ }
+
+ if(x0 == x)
+ STBTT_assert(x1 <= x + 1);
+ else if(x0 == x + 1)
+ STBTT_assert(x1 >= x);
+ else if(x0 <= x)
+ STBTT_assert(x1 <= x);
+ else if(x0 >= x + 1)
+ STBTT_assert(x1 >= x + 1);
+ else
+ STBTT_assert(x1 >= x && x1 <= x + 1);
+
+ if(x0 <= x && x1 <= x)
+ scanline[x] += e->direction * (y1 - y0);
+ else if(x0 >= x + 1 && x1 >= x + 1) {
+ /*Nothing to do*/;
+ }
+ else {
+ STBTT_assert(x0 >= x && x0 <= x + 1 && x1 >= x && x1 <= x + 1);
+ scanline[x] += e->direction * (y1 - y0) * (1 - ((x0 - x) + (x1 - x)) / 2); // coverage = 1 - average x position
+ }
+}
+
+static float stbtt__sized_trapezoid_area(float height, float top_width, float bottom_width)
+{
+ STBTT_assert(top_width >= 0);
+ STBTT_assert(bottom_width >= 0);
+ return (top_width + bottom_width) / 2.0f * height;
+}
+
+static float stbtt__position_trapezoid_area(float height, float tx0, float tx1, float bx0, float bx1)
+{
+ return stbtt__sized_trapezoid_area(height, tx1 - tx0, bx1 - bx0);
+}
+
+static float stbtt__sized_triangle_area(float height, float width)
+{
+ return height * width / 2;
+}
+
+static void stbtt__fill_active_edges_new(float * scanline, float * scanline_fill, int len, stbtt__active_edge * e,
+ float y_top)
+{
+ float y_bottom = y_top + 1;
+
+ while(e) {
+ // brute force every pixel
+
+ // compute intersection points with top & bottom
+ STBTT_assert(e->ey >= y_top);
+
+ if(e->fdx == 0) {
+ float x0 = e->fx;
+ if(x0 < len) {
+ if(x0 >= 0) {
+ stbtt__handle_clipped_edge(scanline, (int)x0, e, x0, y_top, x0, y_bottom);
+ stbtt__handle_clipped_edge(scanline_fill - 1, (int)x0 + 1, e, x0, y_top, x0, y_bottom);
+ }
+ else {
+ stbtt__handle_clipped_edge(scanline_fill - 1, 0, e, x0, y_top, x0, y_bottom);
+ }
+ }
+ }
+ else {
+ float x0 = e->fx;
+ float dx = e->fdx;
+ float xb = x0 + dx;
+ float x_top, x_bottom;
+ float sy0, sy1;
+ float dy = e->fdy;
+ STBTT_assert(e->sy <= y_bottom && e->ey >= y_top);
+
+ // compute endpoints of line segment clipped to this scanline (if the
+ // line segment starts on this scanline. x0 is the intersection of the
+ // line with y_top, but that may be off the line segment.
+ if(e->sy > y_top) {
+ x_top = x0 + dx * (e->sy - y_top);
+ sy0 = e->sy;
+ }
+ else {
+ x_top = x0;
+ sy0 = y_top;
+ }
+ if(e->ey < y_bottom) {
+ x_bottom = x0 + dx * (e->ey - y_top);
+ sy1 = e->ey;
+ }
+ else {
+ x_bottom = xb;
+ sy1 = y_bottom;
+ }
+
+ if(x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len) {
+ // from here on, we don't have to range check x values
+
+ if((int)x_top == (int)x_bottom) {
+ float height;
+ // simple case, only spans one pixel
+ int x = (int)x_top;
+ height = (sy1 - sy0) * e->direction;
+ STBTT_assert(x >= 0 && x < len);
+ scanline[x] += stbtt__position_trapezoid_area(height, x_top, x + 1.0f, x_bottom, x + 1.0f);
+ scanline_fill[x] += height; // everything right of this pixel is filled
+ }
+ else {
+ int x, x1, x2;
+ float y_crossing, y_final, step, sign, area;
+ // covers 2+ pixels
+ if(x_top > x_bottom) {
+ // flip scanline vertically; signed area is the same
+ float t;
+ sy0 = y_bottom - (sy0 - y_top);
+ sy1 = y_bottom - (sy1 - y_top);
+ t = sy0, sy0 = sy1, sy1 = t;
+ t = x_bottom, x_bottom = x_top, x_top = t;
+ dx = -dx;
+ dy = -dy;
+ t = x0, x0 = xb, xb = t;
+ }
+ STBTT_assert(dy >= 0);
+ STBTT_assert(dx >= 0);
+
+ x1 = (int)x_top;
+ x2 = (int)x_bottom;
+ // compute intersection with y axis at x1+1
+ y_crossing = y_top + dy * (x1 + 1 - x0);
+
+ // compute intersection with y axis at x2
+ y_final = y_top + dy * (x2 - x0);
+
+ // x1 x_top x2 x_bottom
+ // y_top +------|-----+------------+------------+--------|---+------------+
+ // | | | | | |
+ // | | | | | |
+ // sy0 | Txxxxx|............|............|............|............|
+ // y_crossing | *xxxxx.......|............|............|............|
+ // | | xxxxx..|............|............|............|
+ // | | /- xx*xxxx........|............|............|
+ // | | dy < | xxxxxx..|............|............|
+ // y_final | | \- | xx*xxx.........|............|
+ // sy1 | | | | xxxxxB...|............|
+ // | | | | | |
+ // | | | | | |
+ // y_bottom +------------+------------+------------+------------+------------+
+ //
+ // goal is to measure the area covered by '.' in each pixel
+
+ // if x2 is right at the right edge of x1, y_crossing can blow up, github #1057
+ // @TODO: maybe test against sy1 rather than y_bottom?
+ if(y_crossing > y_bottom)
+ y_crossing = y_bottom;
+
+ sign = e->direction;
+
+ // area of the rectangle covered from sy0..y_crossing
+ area = sign * (y_crossing - sy0);
+
+ // area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing)
+ scanline[x1] += stbtt__sized_triangle_area(area, x1 + 1 - x_top);
+
+ // check if final y_crossing is blown up; no test case for this
+ if(y_final > y_bottom) {
+ y_final = y_bottom;
+ dy = (y_final - y_crossing) / (x2 - (x1 + 1)); // if denom=0, y_final = y_crossing, so y_final <= y_bottom
+ }
+
+ // in second pixel, area covered by line segment found in first pixel
+ // is always a rectangle 1 wide * the height of that line segment; this
+ // is exactly what the variable 'area' stores. it also gets a contribution
+ // from the line segment within it. the THIRD pixel will get the first
+ // pixel's rectangle contribution, the second pixel's rectangle contribution,
+ // and its own contribution. the 'own contribution' is the same in every pixel except
+ // the leftmost and rightmost, a trapezoid that slides down in each pixel.
+ // the second pixel's contribution to the third pixel will be the
+ // rectangle 1 wide times the height change in the second pixel, which is dy.
+
+ step = sign * dy * 1; // dy is dy/dx, change in y for every 1 change in x,
+ // which multiplied by 1-pixel-width is how much pixel area changes for each step in x
+ // so the area advances by 'step' every time
+
+ for(x = x1 + 1; x < x2; ++x) {
+ scanline[x] += area + step / 2; // area of trapezoid is 1*step/2
+ area += step;
+ }
+ STBTT_assert(STBTT_fabs(area) <= 1.01f); // accumulated error from area += step unless we round step down
+ STBTT_assert(sy1 > y_final - 0.01f);
+
+ // area covered in the last pixel is the rectangle from all the pixels to the left,
+ // plus the trapezoid filled by the line segment in this pixel all the way to the right edge
+ scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1 - y_final, (float)x2, x2 + 1.0f, x_bottom, x2 + 1.0f);
+
+ // the rest of the line is filled based on the total height of the line segment in this pixel
+ scanline_fill[x2] += sign * (sy1 - sy0);
+ }
+ }
+ else {
+ // if edge goes outside of box we're drawing, we require
+ // clipping logic. since this does not match the intended use
+ // of this library, we use a different, very slow brute
+ // force implementation
+ // note though that this does happen some of the time because
+ // x_top and x_bottom can be extrapolated at the top & bottom of
+ // the shape and actually lie outside the bounding box
+ int x;
+ for(x = 0; x < len; ++x) {
+ // cases:
+ //
+ // there can be up to two intersections with the pixel. any intersection
+ // with left or right edges can be handled by splitting into two (or three)
+ // regions. intersections with top & bottom do not necessitate case-wise logic.
+ //
+ // the old way of doing this found the intersections with the left & right edges,
+ // then used some simple logic to produce up to three segments in sorted order
+ // from top-to-bottom. however, this had a problem: if an x edge was epsilon
+ // across the x border, then the corresponding y position might not be distinct
+ // from the other y segment, and it might ignored as an empty segment. to avoid
+ // that, we need to explicitly produce segments based on x positions.
+
+ // rename variables to clearly-defined pairs
+ float y0 = y_top;
+ float x1 = (float)(x);
+ float x2 = (float)(x + 1);
+ float x3 = xb;
+ float y3 = y_bottom;
+
+ // x = e->x + e->dx * (y-y_top)
+ // (y-y_top) = (x - e->x) / e->dx
+ // y = (x - e->x) / e->dx + y_top
+ float y1 = (x - x0) / dx + y_top;
+ float y2 = (x + 1 - x0) / dx + y_top;
+
+ if(x0 < x1 && x3 > x2) { // three segments descending down-right
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x1, y1);
+ stbtt__handle_clipped_edge(scanline, x, e, x1, y1, x2, y2);
+ stbtt__handle_clipped_edge(scanline, x, e, x2, y2, x3, y3);
+ }
+ else if(x3 < x1 && x0 > x2) { // three segments descending down-left
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x2, y2);
+ stbtt__handle_clipped_edge(scanline, x, e, x2, y2, x1, y1);
+ stbtt__handle_clipped_edge(scanline, x, e, x1, y1, x3, y3);
+ }
+ else if(x0 < x1 && x3 > x1) { // two segments across x, down-right
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x1, y1);
+ stbtt__handle_clipped_edge(scanline, x, e, x1, y1, x3, y3);
+ }
+ else if(x3 < x1 && x0 > x1) { // two segments across x, down-left
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x1, y1);
+ stbtt__handle_clipped_edge(scanline, x, e, x1, y1, x3, y3);
+ }
+ else if(x0 < x2 && x3 > x2) { // two segments across x+1, down-right
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x2, y2);
+ stbtt__handle_clipped_edge(scanline, x, e, x2, y2, x3, y3);
+ }
+ else if(x3 < x2 && x0 > x2) { // two segments across x+1, down-left
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x2, y2);
+ stbtt__handle_clipped_edge(scanline, x, e, x2, y2, x3, y3);
+ }
+ else { // one segment
+ stbtt__handle_clipped_edge(scanline, x, e, x0, y0, x3, y3);
+ }
+ }
+ }
+ }
+ e = e->next;
+ }
+}
+
+// directly AA rasterize edges w/o supersampling
+static void stbtt__rasterize_sorted_edges(stbtt__bitmap * result, stbtt__edge * e, int n, int vsubsample, int off_x,
+ int off_y, void * userdata)
+{
+ stbtt__hheap hh = { 0, 0, 0 };
+ stbtt__active_edge * active = NULL;
+ int y, j = 0, i;
+ float scanline_data[129], * scanline, * scanline2;
+
+ STBTT__NOTUSED(vsubsample);
+
+ if(result->w > 64)
+ scanline = (float *)STBTT_malloc((result->w * 2 + 1) * sizeof(float), userdata);
+ else
+ scanline = scanline_data;
+
+ scanline2 = scanline + result->w;
+
+ y = off_y;
+ e[n].y0 = (float)(off_y + result->h) + 1;
+
+ while(j < result->h) {
+ // find center of pixel for this scanline
+ float scan_y_top = y + 0.0f;
+ float scan_y_bottom = y + 1.0f;
+ stbtt__active_edge ** step = &active;
+
+ STBTT_memset(scanline, 0, result->w * sizeof(scanline[0]));
+ STBTT_memset(scanline2, 0, (result->w + 1) * sizeof(scanline[0]));
+
+ // update all active edges;
+ // remove all active edges that terminate before the top of this scanline
+ while(*step) {
+ stbtt__active_edge * z = *step;
+ if(z->ey <= scan_y_top) {
+ *step = z->next; // delete from list
+ STBTT_assert(z->direction);
+ z->direction = 0;
+ stbtt__hheap_free(&hh, z);
+ }
+ else {
+ step = &((*step)->next); // advance through list
+ }
+ }
+
+ // insert all edges that start before the bottom of this scanline
+ while(e->y0 <= scan_y_bottom) {
+ if(e->y0 != e->y1) {
+ stbtt__active_edge * z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);
+ if(z != NULL) {
+ if(j == 0 && off_y != 0) {
+ if(z->ey < scan_y_top) {
+ // this can happen due to subpixel positioning and some kind of fp rounding error i think
+ z->ey = scan_y_top;
+ }
+ }
+ STBTT_assert(z->ey >= scan_y_top); // if we get really unlucky a tiny bit of an edge can be out of bounds
+ // insert at front
+ z->next = active;
+ active = z;
+ }
+ }
+ ++e;
+ }
+
+ // now process all active edges
+ if(active)
+ stbtt__fill_active_edges_new(scanline, scanline2 + 1, result->w, active, scan_y_top);
+
+ {
+ float sum = 0;
+ for(i = 0; i < result->w; ++i) {
+ float k;
+ int m;
+ sum += scanline2[i];
+ k = scanline[i] + sum;
+ k = (float)STBTT_fabs(k) * 255 + 0.5f;
+ m = (int)k;
+ if(m > 255) m = 255;
+ result->pixels[j * result->stride + i] = (unsigned char)m;
+ }
+ }
+ // advance all the edges
+ step = &active;
+ while(*step) {
+ stbtt__active_edge * z = *step;
+ z->fx += z->fdx; // advance to position for current scanline
+ step = &((*step)->next); // advance through list
+ }
+
+ ++y;
+ ++j;
+ }
+
+ stbtt__hheap_cleanup(&hh, userdata);
+
+ if(scanline != scanline_data)
+ STBTT_free(scanline, userdata);
+}
+#else
+#error "Unrecognized value of STBTT_RASTERIZER_VERSION"
+#endif
+
+#define STBTT__COMPARE(a,b) ((a)->y0 < (b)->y0)
+
+static void stbtt__sort_edges_ins_sort(stbtt__edge * p, int n)
+{
+ int i, j;
+ for(i = 1; i < n; ++i) {
+ stbtt__edge t = p[i], * a = &t;
+ j = i;
+ while(j > 0) {
+ stbtt__edge * b = &p[j - 1];
+ int c = STBTT__COMPARE(a, b);
+ if(!c) break;
+ p[j] = p[j - 1];
+ --j;
+ }
+ if(i != j)
+ p[j] = t;
+ }
+}
+
+static void stbtt__sort_edges_quicksort(stbtt__edge * p, int n)
+{
+ /* threshold for transitioning to insertion sort */
+ while(n > 12) {
+ stbtt__edge t;
+ int c01, c12, c, m, i, j;
+
+ /* compute median of three */
+ m = n >> 1;
+ c01 = STBTT__COMPARE(&p[0], &p[m]);
+ c12 = STBTT__COMPARE(&p[m], &p[n - 1]);
+ /* if 0 >= mid >= end, or 0 < mid < end, then use mid */
+ if(c01 != c12) {
+ /* otherwise, we'll need to swap something else to middle */
+ int z;
+ c = STBTT__COMPARE(&p[0], &p[n - 1]);
+ /* 0>mid && midn => n; 0 0 */
+ /* 0n: 0>n => 0; 0 n */
+ z = (c == c12) ? 0 : n - 1;
+ t = p[z];
+ p[z] = p[m];
+ p[m] = t;
+ }
+ /* now p[m] is the median-of-three */
+ /* swap it to the beginning so it won't move around */
+ t = p[0];
+ p[0] = p[m];
+ p[m] = t;
+
+ /* partition loop */
+ i = 1;
+ j = n - 1;
+ for(;;) {
+ /* handling of equality is crucial here */
+ /* for sentinels & efficiency with duplicates */
+ for(;; ++i) {
+ if(!STBTT__COMPARE(&p[i], &p[0])) break;
+ }
+ for(;; --j) {
+ if(!STBTT__COMPARE(&p[0], &p[j])) break;
+ }
+ /* make sure we haven't crossed */
+ if(i >= j) break;
+ t = p[i];
+ p[i] = p[j];
+ p[j] = t;
+
+ ++i;
+ --j;
+ }
+ /* recurse on smaller side, iterate on larger */
+ if(j < (n - i)) {
+ stbtt__sort_edges_quicksort(p, j);
+ p = p + i;
+ n = n - i;
+ }
+ else {
+ stbtt__sort_edges_quicksort(p + i, n - i);
+ n = j;
+ }
+ }
+}
+
+static void stbtt__sort_edges(stbtt__edge * p, int n)
+{
+ stbtt__sort_edges_quicksort(p, n);
+ stbtt__sort_edges_ins_sort(p, n);
+}
+
+typedef struct {
+ float x, y;
+} stbtt__point;
+
+static void stbtt__rasterize(stbtt__bitmap * result, stbtt__point * pts, int * wcount, int windings, float scale_x,
+ float scale_y, float shift_x, float shift_y, int off_x, int off_y, int invert, void * userdata)
+{
+ float y_scale_inv = invert ? -scale_y : scale_y;
+ stbtt__edge * e;
+ int n, i, j, k, m;
+#if STBTT_RASTERIZER_VERSION == 1
+ int vsubsample = result->h < 8 ? 15 : 5;
+#elif STBTT_RASTERIZER_VERSION == 2
+ int vsubsample = 1;
+#else
+#error "Unrecognized value of STBTT_RASTERIZER_VERSION"
+#endif
+ // vsubsample should divide 255 evenly; otherwise we won't reach full opacity
+
+ // now we have to blow out the windings into explicit edge lists
+ n = 0;
+ for(i = 0; i < windings; ++i)
+ n += wcount[i];
+
+ e = (stbtt__edge *)STBTT_malloc(sizeof(*e) * (n + 1), userdata); // add an extra one as a sentinel
+ if(e == 0) return;
+ n = 0;
+
+ m = 0;
+ for(i = 0; i < windings; ++i) {
+ stbtt__point * p = pts + m;
+ m += wcount[i];
+ j = wcount[i] - 1;
+ for(k = 0; k < wcount[i]; j = k++) {
+ int a = k, b = j;
+ // skip the edge if horizontal
+ if(p[j].y == p[k].y)
+ continue;
+ // add edge from j to k to the list
+ e[n].invert = 0;
+ if(invert ? p[j].y > p[k].y : p[j].y < p[k].y) {
+ e[n].invert = 1;
+ a = j, b = k;
+ }
+ e[n].x0 = p[a].x * scale_x + shift_x;
+ e[n].y0 = (p[a].y * y_scale_inv + shift_y) * vsubsample;
+ e[n].x1 = p[b].x * scale_x + shift_x;
+ e[n].y1 = (p[b].y * y_scale_inv + shift_y) * vsubsample;
+ ++n;
+ }
+ }
+
+ // now sort the edges by their highest point (should snap to integer, and then by x)
+ //STBTT_sort(e, n, sizeof(e[0]), stbtt__edge_compare);
+ stbtt__sort_edges(e, n);
+
+ // now, traverse the scanlines and find the intersections on each scanline, use xor winding rule
+ stbtt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, userdata);
+
+ STBTT_free(e, userdata);
+}
+
+static void stbtt__add_point(stbtt__point * points, int n, float x, float y)
+{
+ if(!points) return; // during first pass, it's unallocated
+ points[n].x = x;
+ points[n].y = y;
+}
+
+// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching
+static int stbtt__tesselate_curve(stbtt__point * points, int * num_points, float x0, float y0, float x1, float y1,
+ float x2, float y2, float objspace_flatness_squared, int n)
+{
+ // midpoint
+ float mx = (x0 + 2 * x1 + x2) / 4;
+ float my = (y0 + 2 * y1 + y2) / 4;
+ // versus directly drawn line
+ float dx = (x0 + x2) / 2 - mx;
+ float dy = (y0 + y2) / 2 - my;
+ if(n > 16) // 65536 segments on one curve better be enough!
+ return 1;
+ if(dx * dx + dy * dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA
+ stbtt__tesselate_curve(points, num_points, x0, y0, (x0 + x1) / 2.0f, (y0 + y1) / 2.0f, mx, my,
+ objspace_flatness_squared, n + 1);
+ stbtt__tesselate_curve(points, num_points, mx, my, (x1 + x2) / 2.0f, (y1 + y2) / 2.0f, x2, y2,
+ objspace_flatness_squared, n + 1);
+ }
+ else {
+ stbtt__add_point(points, *num_points, x2, y2);
+ *num_points = *num_points + 1;
+ }
+ return 1;
+}
+
+static void stbtt__tesselate_cubic(stbtt__point * points, int * num_points, float x0, float y0, float x1, float y1,
+ float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n)
+{
+ // @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough
+ float dx0 = x1 - x0;
+ float dy0 = y1 - y0;
+ float dx1 = x2 - x1;
+ float dy1 = y2 - y1;
+ float dx2 = x3 - x2;
+ float dy2 = y3 - y2;
+ float dx = x3 - x0;
+ float dy = y3 - y0;
+ float longlen = (float)(STBTT_sqrt(dx0 * dx0 + dy0 * dy0) + STBTT_sqrt(dx1 * dx1 + dy1 * dy1) + STBTT_sqrt(
+ dx2 * dx2 + dy2 * dy2));
+ float shortlen = (float)STBTT_sqrt(dx * dx + dy * dy);
+ float flatness_squared = longlen * longlen - shortlen * shortlen;
+
+ if(n > 16) // 65536 segments on one curve better be enough!
+ return;
+
+ if(flatness_squared > objspace_flatness_squared) {
+ float x01 = (x0 + x1) / 2;
+ float y01 = (y0 + y1) / 2;
+ float x12 = (x1 + x2) / 2;
+ float y12 = (y1 + y2) / 2;
+ float x23 = (x2 + x3) / 2;
+ float y23 = (y2 + y3) / 2;
+
+ float xa = (x01 + x12) / 2;
+ float ya = (y01 + y12) / 2;
+ float xb = (x12 + x23) / 2;
+ float yb = (y12 + y23) / 2;
+
+ float mx = (xa + xb) / 2;
+ float my = (ya + yb) / 2;
+
+ stbtt__tesselate_cubic(points, num_points, x0, y0, x01, y01, xa, ya, mx, my, objspace_flatness_squared, n + 1);
+ stbtt__tesselate_cubic(points, num_points, mx, my, xb, yb, x23, y23, x3, y3, objspace_flatness_squared, n + 1);
+ }
+ else {
+ stbtt__add_point(points, *num_points, x3, y3);
+ *num_points = *num_points + 1;
+ }
+}
+
+// returns number of contours
+static stbtt__point * stbtt_FlattenCurves(stbtt_vertex * vertices, int num_verts, float objspace_flatness,
+ int ** contour_lengths, int * num_contours, void * userdata)
+{
+ stbtt__point * points = 0;
+ int num_points = 0;
+
+ float objspace_flatness_squared = objspace_flatness * objspace_flatness;
+ int i, n = 0, start = 0, pass;
+
+ // count how many "moves" there are to get the contour count
+ for(i = 0; i < num_verts; ++i)
+ if(vertices[i].type == STBTT_vmove)
+ ++n;
+
+ *num_contours = n;
+ if(n == 0) return 0;
+
+ *contour_lengths = (int *)STBTT_malloc(sizeof(**contour_lengths) * n, userdata);
+
+ if(*contour_lengths == 0) {
+ *num_contours = 0;
+ return 0;
+ }
+
+ // make two passes through the points so we don't need to realloc
+ for(pass = 0; pass < 2; ++pass) {
+ float x = 0, y = 0;
+ if(pass == 1) {
+ points = (stbtt__point *)STBTT_malloc(num_points * sizeof(points[0]), userdata);
+ if(points == NULL) goto error;
+ }
+ num_points = 0;
+ n = -1;
+ for(i = 0; i < num_verts; ++i) {
+ switch(vertices[i].type) {
+ case STBTT_vmove:
+ // start the next contour
+ if(n >= 0)
+ (*contour_lengths)[n] = num_points - start;
+ ++n;
+ start = num_points;
+
+ x = vertices[i].x, y = vertices[i].y;
+ stbtt__add_point(points, num_points++, x, y);
+ break;
+ case STBTT_vline:
+ x = vertices[i].x, y = vertices[i].y;
+ stbtt__add_point(points, num_points++, x, y);
+ break;
+ case STBTT_vcurve:
+ stbtt__tesselate_curve(points, &num_points, x, y,
+ vertices[i].cx, vertices[i].cy,
+ vertices[i].x, vertices[i].y,
+ objspace_flatness_squared, 0);
+ x = vertices[i].x, y = vertices[i].y;
+ break;
+ case STBTT_vcubic:
+ stbtt__tesselate_cubic(points, &num_points, x, y,
+ vertices[i].cx, vertices[i].cy,
+ vertices[i].cx1, vertices[i].cy1,
+ vertices[i].x, vertices[i].y,
+ objspace_flatness_squared, 0);
+ x = vertices[i].x, y = vertices[i].y;
+ break;
+ }
+ }
+ (*contour_lengths)[n] = num_points - start;
+ }
+
+ return points;
+error:
+ STBTT_free(points, userdata);
+ STBTT_free(*contour_lengths, userdata);
+ *contour_lengths = 0;
+ *num_contours = 0;
+ return NULL;
+}
+
+STBTT_DEF void stbtt_Rasterize(stbtt__bitmap * result, float flatness_in_pixels, stbtt_vertex * vertices, int num_verts,
+ float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, void * userdata)
+{
+ float scale = scale_x > scale_y ? scale_y : scale_x;
+ int winding_count = 0;
+ int * winding_lengths = NULL;
+ stbtt__point * windings = stbtt_FlattenCurves(vertices, num_verts, flatness_in_pixels / scale, &winding_lengths,
+ &winding_count, userdata);
+ if(windings) {
+ stbtt__rasterize(result, windings, winding_lengths, winding_count, scale_x, scale_y, shift_x, shift_y, x_off, y_off,
+ invert, userdata);
+ STBTT_free(winding_lengths, userdata);
+ STBTT_free(windings, userdata);
+ }
+}
+
+STBTT_DEF void stbtt_FreeBitmap(unsigned char * bitmap, void * userdata)
+{
+ STBTT_free(bitmap, userdata);
+}
+
+STBTT_DEF unsigned char * stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo * info, float scale_x, float scale_y,
+ float shift_x, float shift_y, int glyph, int * width, int * height, int * xoff, int * yoff)
+{
+ int ix0, iy0, ix1, iy1;
+ stbtt__bitmap gbm;
+ stbtt_vertex * vertices;
+ int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
+
+ if(scale_x == 0) scale_x = scale_y;
+ if(scale_y == 0) {
+ if(scale_x == 0) {
+ STBTT_free(vertices, info->userdata);
+ return NULL;
+ }
+ scale_y = scale_x;
+ }
+
+ stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0, &iy0, &ix1, &iy1);
+
+ // now we get the size
+ gbm.w = (ix1 - ix0);
+ gbm.h = (iy1 - iy0);
+ gbm.pixels = NULL; // in case we error
+
+ if(width) *width = gbm.w;
+ if(height) *height = gbm.h;
+ if(xoff) *xoff = ix0;
+ if(yoff) *yoff = iy0;
+
+ if(gbm.w && gbm.h) {
+ gbm.pixels = (unsigned char *)STBTT_malloc(gbm.w * gbm.h, info->userdata);
+ if(gbm.pixels) {
+ gbm.stride = gbm.w;
+
+ stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0, iy0, 1, info->userdata);
+ }
+ }
+ STBTT_free(vertices, info->userdata);
+ return gbm.pixels;
+}
+
+STBTT_DEF unsigned char * stbtt_GetGlyphBitmap(const stbtt_fontinfo * info, float scale_x, float scale_y, int glyph,
+ int * width, int * height, int * xoff, int * yoff)
+{
+ return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, 0.0f, 0.0f, glyph, width, height, xoff, yoff);
+}
+
+STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo * info, unsigned char * output, int out_w, int out_h,
+ int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph)
+{
+ int ix0, iy0;
+ stbtt_vertex * vertices;
+ int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
+ stbtt__bitmap gbm;
+
+ stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0, &iy0, 0, 0);
+ gbm.pixels = output;
+ gbm.w = out_w;
+ gbm.h = out_h;
+ gbm.stride = out_stride;
+
+ if(gbm.w && gbm.h)
+ stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0, iy0, 1, info->userdata);
+
+ STBTT_free(vertices, info->userdata);
+}
+
+STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo * info, unsigned char * output, int out_w, int out_h,
+ int out_stride, float scale_x, float scale_y, int glyph)
+{
+ stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f, 0.0f, glyph);
+}
+
+STBTT_DEF unsigned char * stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo * info, float scale_x, float scale_y,
+ float shift_x, float shift_y, int codepoint, int * width, int * height, int * xoff, int * yoff)
+{
+ return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, shift_x, shift_y, stbtt_FindGlyphIndex(info, codepoint),
+ width, height, xoff, yoff);
+}
+
+STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo * info, unsigned char * output,
+ int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x,
+ int oversample_y, float * sub_x, float * sub_y, int codepoint)
+{
+ stbtt_MakeGlyphBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y,
+ oversample_x, oversample_y, sub_x, sub_y, stbtt_FindGlyphIndex(info, codepoint));
+}
+
+STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo * info, unsigned char * output, int out_w,
+ int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint)
+{
+ stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y,
+ stbtt_FindGlyphIndex(info, codepoint));
+}
+
+STBTT_DEF unsigned char * stbtt_GetCodepointBitmap(const stbtt_fontinfo * info, float scale_x, float scale_y,
+ int codepoint, int * width, int * height, int * xoff, int * yoff)
+{
+ return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f, 0.0f, codepoint, width, height, xoff, yoff);
+}
+
+STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo * info, unsigned char * output, int out_w, int out_h,
+ int out_stride, float scale_x, float scale_y, int codepoint)
+{
+ stbtt_MakeCodepointBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f, 0.0f, codepoint);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// bitmap baking
+//
+// This is SUPER-CRAPPY packing to keep source code small
+#ifdef STBTT_STREAM_TYPE
+static int stbtt_BakeFontBitmap_internal(STBTT_STREAM_TYPE data,
+ int offset, // font location (use offset=0 for plain .ttf)
+ float pixel_height, // height of font in pixels
+ unsigned char * pixels, int pw, int ph, // bitmap to be filled in
+ int first_char, int num_chars, // characters to bake
+ stbtt_bakedchar * chardata)
+#else
+static int stbtt_BakeFontBitmap_internal(unsigned char * data,
+ int offset, // font location (use offset=0 for plain .ttf)
+ float pixel_height, // height of font in pixels
+ unsigned char * pixels, int pw, int ph, // bitmap to be filled in
+ int first_char, int num_chars, // characters to bake
+ stbtt_bakedchar * chardata)
+#endif
+{
+ float scale;
+ int x, y, bottom_y, i;
+ stbtt_fontinfo f;
+ f.userdata = NULL;
+ if(!stbtt_InitFont(&f, data, offset))
+ return -1;
+ STBTT_memset(pixels, 0, pw * ph); // background of 0 around pixels
+ x = y = 1;
+ bottom_y = 1;
+
+ scale = stbtt_ScaleForPixelHeight(&f, pixel_height);
+
+ for(i = 0; i < num_chars; ++i) {
+ int advance, lsb, x0, y0, x1, y1, gw, gh;
+ int g = stbtt_FindGlyphIndex(&f, first_char + i);
+ stbtt_GetGlyphHMetrics(&f, g, &advance, &lsb);
+ stbtt_GetGlyphBitmapBox(&f, g, scale, scale, &x0, &y0, &x1, &y1);
+ gw = x1 - x0;
+ gh = y1 - y0;
+ if(x + gw + 1 >= pw)
+ y = bottom_y, x = 1; // advance to next row
+ if(y + gh + 1 >= ph) // check if it fits vertically AFTER potentially moving to next row
+ return -i;
+ STBTT_assert(x + gw < pw);
+ STBTT_assert(y + gh < ph);
+ stbtt_MakeGlyphBitmap(&f, pixels + x + y * pw, gw, gh, pw, scale, scale, g);
+ chardata[i].x0 = (stbtt_int16)x;
+ chardata[i].y0 = (stbtt_int16)y;
+ chardata[i].x1 = (stbtt_int16)(x + gw);
+ chardata[i].y1 = (stbtt_int16)(y + gh);
+ chardata[i].xadvance = scale * advance;
+ chardata[i].xoff = (float)x0;
+ chardata[i].yoff = (float)y0;
+ x = x + gw + 1;
+ if(y + gh + 1 > bottom_y)
+ bottom_y = y + gh + 1;
+ }
+ return bottom_y;
+}
+
+STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar * chardata, int pw, int ph, int char_index, float * xpos,
+ float * ypos, stbtt_aligned_quad * q, int opengl_fillrule)
+{
+ float d3d_bias = opengl_fillrule ? 0 : -0.5f;
+ float ipw = 1.0f / pw, iph = 1.0f / ph;
+ const stbtt_bakedchar * b = chardata + char_index;
+ int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f);
+ int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f);
+
+ q->x0 = round_x + d3d_bias;
+ q->y0 = round_y + d3d_bias;
+ q->x1 = round_x + b->x1 - b->x0 + d3d_bias;
+ q->y1 = round_y + b->y1 - b->y0 + d3d_bias;
+
+ q->s0 = b->x0 * ipw;
+ q->t0 = b->y0 * iph;
+ q->s1 = b->x1 * ipw;
+ q->t1 = b->y1 * iph;
+
+ *xpos += b->xadvance;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// rectangle packing replacement routines if you don't have stb_rect_pack.h
+//
+
+#ifndef STB_RECT_PACK_VERSION
+
+typedef int stbrp_coord;
+
+////////////////////////////////////////////////////////////////////////////////////
+// //
+// //
+// COMPILER WARNING ?!?!? //
+// //
+// //
+// if you get a compile warning due to these symbols being defined more than //
+// once, move #include "stb_rect_pack.h" before #include "stb_truetype.h" //
+// //
+////////////////////////////////////////////////////////////////////////////////////
+
+typedef struct {
+ int width, height;
+ int x, y, bottom_y;
+} stbrp_context;
+
+typedef struct {
+ unsigned char x;
+} stbrp_node;
+
+struct stbrp_rect {
+ stbrp_coord x, y;
+ int id, w, h, was_packed;
+};
+
+static void stbrp_init_target(stbrp_context * con, int pw, int ph, stbrp_node * nodes, int num_nodes)
+{
+ con->width = pw;
+ con->height = ph;
+ con->x = 0;
+ con->y = 0;
+ con->bottom_y = 0;
+ STBTT__NOTUSED(nodes);
+ STBTT__NOTUSED(num_nodes);
+}
+
+static void stbrp_pack_rects(stbrp_context * con, stbrp_rect * rects, int num_rects)
+{
+ int i;
+ for(i = 0; i < num_rects; ++i) {
+ if(con->x + rects[i].w > con->width) {
+ con->x = 0;
+ con->y = con->bottom_y;
+ }
+ if(con->y + rects[i].h > con->height)
+ break;
+ rects[i].x = con->x;
+ rects[i].y = con->y;
+ rects[i].was_packed = 1;
+ con->x += rects[i].w;
+ if(con->y + rects[i].h > con->bottom_y)
+ con->bottom_y = con->y + rects[i].h;
+ }
+ for(; i < num_rects; ++i)
+ rects[i].was_packed = 0;
+}
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// bitmap baking
+//
+// This is SUPER-AWESOME (tm Ryan Gordon) packing using stb_rect_pack.h. If
+// stb_rect_pack.h isn't available, it uses the BakeFontBitmap strategy.
+
+STBTT_DEF int stbtt_PackBegin(stbtt_pack_context * spc, unsigned char * pixels, int pw, int ph, int stride_in_bytes,
+ int padding, void * alloc_context)
+{
+ stbrp_context * context = (stbrp_context *)STBTT_malloc(sizeof(*context), alloc_context);
+ int num_nodes = pw - padding;
+ stbrp_node * nodes = (stbrp_node *)STBTT_malloc(sizeof(*nodes) * num_nodes, alloc_context);
+
+ if(context == NULL || nodes == NULL) {
+ if(context != NULL) STBTT_free(context, alloc_context);
+ if(nodes != NULL) STBTT_free(nodes, alloc_context);
+ return 0;
+ }
+
+ spc->user_allocator_context = alloc_context;
+ spc->width = pw;
+ spc->height = ph;
+ spc->pixels = pixels;
+ spc->pack_info = context;
+ spc->nodes = nodes;
+ spc->padding = padding;
+ spc->stride_in_bytes = stride_in_bytes != 0 ? stride_in_bytes : pw;
+ spc->h_oversample = 1;
+ spc->v_oversample = 1;
+ spc->skip_missing = 0;
+
+ stbrp_init_target(context, pw - padding, ph - padding, nodes, num_nodes);
+
+ if(pixels)
+ STBTT_memset(pixels, 0, pw * ph); // background of 0 around pixels
+
+ return 1;
+}
+
+STBTT_DEF void stbtt_PackEnd(stbtt_pack_context * spc)
+{
+ STBTT_free(spc->nodes, spc->user_allocator_context);
+ STBTT_free(spc->pack_info, spc->user_allocator_context);
+}
+
+STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context * spc, unsigned int h_oversample, unsigned int v_oversample)
+{
+ STBTT_assert(h_oversample <= STBTT_MAX_OVERSAMPLE);
+ STBTT_assert(v_oversample <= STBTT_MAX_OVERSAMPLE);
+ if(h_oversample <= STBTT_MAX_OVERSAMPLE)
+ spc->h_oversample = h_oversample;
+ if(v_oversample <= STBTT_MAX_OVERSAMPLE)
+ spc->v_oversample = v_oversample;
+}
+
+STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context * spc, int skip)
+{
+ spc->skip_missing = skip;
+}
+
+#define STBTT__OVER_MASK (STBTT_MAX_OVERSAMPLE-1)
+
+static void stbtt__h_prefilter(unsigned char * pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)
+{
+ unsigned char buffer[STBTT_MAX_OVERSAMPLE];
+ int safe_w = w - kernel_width;
+ int j;
+ STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
+ for(j = 0; j < h; ++j) {
+ int i;
+ unsigned int total;
+ STBTT_memset(buffer, 0, kernel_width);
+
+ total = 0;
+
+ // make kernel_width a constant in common cases so compiler can optimize out the divide
+ switch(kernel_width) {
+ case 2:
+ for(i = 0; i <= safe_w; ++i) {
+ total += pixels[i] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char)(total / 2);
+ }
+ break;
+ case 3:
+ for(i = 0; i <= safe_w; ++i) {
+ total += pixels[i] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char)(total / 3);
+ }
+ break;
+ case 4:
+ for(i = 0; i <= safe_w; ++i) {
+ total += pixels[i] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char)(total / 4);
+ }
+ break;
+ case 5:
+ for(i = 0; i <= safe_w; ++i) {
+ total += pixels[i] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char)(total / 5);
+ }
+ break;
+ default:
+ for(i = 0; i <= safe_w; ++i) {
+ total += pixels[i] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i];
+ pixels[i] = (unsigned char)(total / kernel_width);
+ }
+ break;
+ }
+
+ for(; i < w; ++i) {
+ STBTT_assert(pixels[i] == 0);
+ total -= buffer[i & STBTT__OVER_MASK];
+ pixels[i] = (unsigned char)(total / kernel_width);
+ }
+
+ pixels += stride_in_bytes;
+ }
+}
+
+static void stbtt__v_prefilter(unsigned char * pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)
+{
+ unsigned char buffer[STBTT_MAX_OVERSAMPLE];
+ int safe_h = h - kernel_width;
+ int j;
+ STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
+ for(j = 0; j < w; ++j) {
+ int i;
+ unsigned int total;
+ STBTT_memset(buffer, 0, kernel_width);
+
+ total = 0;
+
+ // make kernel_width a constant in common cases so compiler can optimize out the divide
+ switch(kernel_width) {
+ case 2:
+ for(i = 0; i <= safe_h; ++i) {
+ total += pixels[i * stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i * stride_in_bytes];
+ pixels[i * stride_in_bytes] = (unsigned char)(total / 2);
+ }
+ break;
+ case 3:
+ for(i = 0; i <= safe_h; ++i) {
+ total += pixels[i * stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i * stride_in_bytes];
+ pixels[i * stride_in_bytes] = (unsigned char)(total / 3);
+ }
+ break;
+ case 4:
+ for(i = 0; i <= safe_h; ++i) {
+ total += pixels[i * stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i * stride_in_bytes];
+ pixels[i * stride_in_bytes] = (unsigned char)(total / 4);
+ }
+ break;
+ case 5:
+ for(i = 0; i <= safe_h; ++i) {
+ total += pixels[i * stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i * stride_in_bytes];
+ pixels[i * stride_in_bytes] = (unsigned char)(total / 5);
+ }
+ break;
+ default:
+ for(i = 0; i <= safe_h; ++i) {
+ total += pixels[i * stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
+ buffer[(i + kernel_width) & STBTT__OVER_MASK] = pixels[i * stride_in_bytes];
+ pixels[i * stride_in_bytes] = (unsigned char)(total / kernel_width);
+ }
+ break;
+ }
+
+ for(; i < h; ++i) {
+ STBTT_assert(pixels[i * stride_in_bytes] == 0);
+ total -= buffer[i & STBTT__OVER_MASK];
+ pixels[i * stride_in_bytes] = (unsigned char)(total / kernel_width);
+ }
+
+ pixels += 1;
+ }
+}
+
+static float stbtt__oversample_shift(int oversample)
+{
+ if(!oversample)
+ return 0.0f;
+
+ // The prefilter is a box filter of width "oversample",
+ // which shifts phase by (oversample - 1)/2 pixels in
+ // oversampled space. We want to shift in the opposite
+ // direction to counter this.
+ return (float) - (oversample - 1) / (2.0f * (float)oversample);
+}
+
+// rects array must be big enough to accommodate all characters in the given ranges
+STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context * spc, const stbtt_fontinfo * info,
+ stbtt_pack_range * ranges, int num_ranges, stbrp_rect * rects)
+{
+ int i, j, k;
+ int missing_glyph_added = 0;
+
+ k = 0;
+ for(i = 0; i < num_ranges; ++i) {
+ float fh = ranges[i].font_size;
+ float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh);
+ ranges[i].h_oversample = (unsigned char)spc->h_oversample;
+ ranges[i].v_oversample = (unsigned char)spc->v_oversample;
+ for(j = 0; j < ranges[i].num_chars; ++j) {
+ int x0, y0, x1, y1;
+ int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j :
+ ranges[i].array_of_unicode_codepoints[j];
+ int glyph = stbtt_FindGlyphIndex(info, codepoint);
+ if(glyph == 0 && (spc->skip_missing || missing_glyph_added)) {
+ rects[k].w = rects[k].h = 0;
+ }
+ else {
+ stbtt_GetGlyphBitmapBoxSubpixel(info, glyph,
+ scale * spc->h_oversample,
+ scale * spc->v_oversample,
+ 0, 0,
+ &x0, &y0, &x1, &y1);
+ rects[k].w = (stbrp_coord)(x1 - x0 + spc->padding + spc->h_oversample - 1);
+ rects[k].h = (stbrp_coord)(y1 - y0 + spc->padding + spc->v_oversample - 1);
+ if(glyph == 0)
+ missing_glyph_added = 1;
+ }
+ ++k;
+ }
+ }
+
+ return k;
+}
+
+STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo * info, unsigned char * output, int out_w,
+ int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int prefilter_x, int prefilter_y,
+ float * sub_x, float * sub_y, int glyph)
+{
+ stbtt_MakeGlyphBitmapSubpixel(info,
+ output,
+ out_w - (prefilter_x - 1),
+ out_h - (prefilter_y - 1),
+ out_stride,
+ scale_x,
+ scale_y,
+ shift_x,
+ shift_y,
+ glyph);
+
+ if(prefilter_x > 1)
+ stbtt__h_prefilter(output, out_w, out_h, out_stride, prefilter_x);
+
+ if(prefilter_y > 1)
+ stbtt__v_prefilter(output, out_w, out_h, out_stride, prefilter_y);
+
+ *sub_x = stbtt__oversample_shift(prefilter_x);
+ *sub_y = stbtt__oversample_shift(prefilter_y);
+}
+
+// rects array must be big enough to accommodate all characters in the given ranges
+STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context * spc, const stbtt_fontinfo * info,
+ stbtt_pack_range * ranges, int num_ranges, stbrp_rect * rects)
+{
+ int i, j, k, missing_glyph = -1, return_value = 1;
+
+ // save current values
+ int old_h_over = spc->h_oversample;
+ int old_v_over = spc->v_oversample;
+
+ k = 0;
+ for(i = 0; i < num_ranges; ++i) {
+ float fh = ranges[i].font_size;
+ float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh);
+ float recip_h, recip_v, sub_x, sub_y;
+ spc->h_oversample = ranges[i].h_oversample;
+ spc->v_oversample = ranges[i].v_oversample;
+ recip_h = 1.0f / spc->h_oversample;
+ recip_v = 1.0f / spc->v_oversample;
+ sub_x = stbtt__oversample_shift(spc->h_oversample);
+ sub_y = stbtt__oversample_shift(spc->v_oversample);
+ for(j = 0; j < ranges[i].num_chars; ++j) {
+ stbrp_rect * r = &rects[k];
+ if(r->was_packed && r->w != 0 && r->h != 0) {
+ stbtt_packedchar * bc = &ranges[i].chardata_for_range[j];
+ int advance, lsb, x0, y0, x1, y1;
+ int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j :
+ ranges[i].array_of_unicode_codepoints[j];
+ int glyph = stbtt_FindGlyphIndex(info, codepoint);
+ stbrp_coord pad = (stbrp_coord)spc->padding;
+
+ // pad on left and top
+ r->x += pad;
+ r->y += pad;
+ r->w -= pad;
+ r->h -= pad;
+ stbtt_GetGlyphHMetrics(info, glyph, &advance, &lsb);
+ stbtt_GetGlyphBitmapBox(info, glyph,
+ scale * spc->h_oversample,
+ scale * spc->v_oversample,
+ &x0, &y0, &x1, &y1);
+ stbtt_MakeGlyphBitmapSubpixel(info,
+ spc->pixels + r->x + r->y * spc->stride_in_bytes,
+ r->w - spc->h_oversample + 1,
+ r->h - spc->v_oversample + 1,
+ spc->stride_in_bytes,
+ scale * spc->h_oversample,
+ scale * spc->v_oversample,
+ 0, 0,
+ glyph);
+
+ if(spc->h_oversample > 1)
+ stbtt__h_prefilter(spc->pixels + r->x + r->y * spc->stride_in_bytes,
+ r->w, r->h, spc->stride_in_bytes,
+ spc->h_oversample);
+
+ if(spc->v_oversample > 1)
+ stbtt__v_prefilter(spc->pixels + r->x + r->y * spc->stride_in_bytes,
+ r->w, r->h, spc->stride_in_bytes,
+ spc->v_oversample);
+
+ bc->x0 = (stbtt_int16)r->x;
+ bc->y0 = (stbtt_int16)r->y;
+ bc->x1 = (stbtt_int16)(r->x + r->w);
+ bc->y1 = (stbtt_int16)(r->y + r->h);
+ bc->xadvance = scale * advance;
+ bc->xoff = (float)x0 * recip_h + sub_x;
+ bc->yoff = (float)y0 * recip_v + sub_y;
+ bc->xoff2 = (x0 + r->w) * recip_h + sub_x;
+ bc->yoff2 = (y0 + r->h) * recip_v + sub_y;
+
+ if(glyph == 0)
+ missing_glyph = j;
+ }
+ else if(spc->skip_missing) {
+ return_value = 0;
+ }
+ else if(r->was_packed && r->w == 0 && r->h == 0 && missing_glyph >= 0) {
+ ranges[i].chardata_for_range[j] = ranges[i].chardata_for_range[missing_glyph];
+ }
+ else {
+ return_value = 0; // if any fail, report failure
+ }
+
+ ++k;
+ }
+ }
+
+ // restore original values
+ spc->h_oversample = old_h_over;
+ spc->v_oversample = old_v_over;
+
+ return return_value;
+}
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context * spc, STBTT_STREAM_TYPE fontdata, int font_index,
+ stbtt_pack_range * ranges, int num_ranges);
+#else
+STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context * spc, const unsigned char * fontdata, int font_index,
+ stbtt_pack_range * ranges, int num_ranges);
+#endif
+
+STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context * spc, stbrp_rect * rects, int num_rects)
+{
+ stbrp_pack_rects((stbrp_context *)spc->pack_info, rects, num_rects);
+}
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context * spc, STBTT_STREAM_TYPE fontdata, int font_index,
+ stbtt_pack_range * ranges, int num_ranges)
+#else
+STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context * spc, const unsigned char * fontdata, int font_index,
+ stbtt_pack_range * ranges, int num_ranges)
+#endif
+{
+ stbtt_fontinfo info;
+ int i, j, n, return_value = 1;
+ //stbrp_context *context = (stbrp_context *) spc->pack_info;
+ stbrp_rect * rects;
+
+ // flag all characters as NOT packed
+ for(i = 0; i < num_ranges; ++i)
+ for(j = 0; j < ranges[i].num_chars; ++j)
+ ranges[i].chardata_for_range[j].x0 =
+ ranges[i].chardata_for_range[j].y0 =
+ ranges[i].chardata_for_range[j].x1 =
+ ranges[i].chardata_for_range[j].y1 = 0;
+
+ n = 0;
+ for(i = 0; i < num_ranges; ++i)
+ n += ranges[i].num_chars;
+
+ rects = (stbrp_rect *)STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context);
+ if(rects == NULL)
+ return 0;
+
+ info.userdata = spc->user_allocator_context;
+ stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata, font_index));
+
+ n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects);
+
+ stbtt_PackFontRangesPackRects(spc, rects, n);
+
+ return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects);
+
+ STBTT_free(rects, spc->user_allocator_context);
+ return return_value;
+}
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context * spc, STBTT_STREAM_TYPE fontdata, int font_index, float font_size,
+ int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar * chardata_for_range);
+#else
+STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context * spc, const unsigned char * fontdata, int font_index,
+ float font_size,
+ int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar * chardata_for_range);
+#endif
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context * spc, STBTT_STREAM_TYPE fontdata, int font_index, float font_size,
+ int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar * chardata_for_range)
+#else
+STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context * spc, const unsigned char * fontdata, int font_index,
+ float font_size,
+ int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar * chardata_for_range)
+#endif
+{
+ stbtt_pack_range range;
+ range.first_unicode_codepoint_in_range = first_unicode_codepoint_in_range;
+ range.array_of_unicode_codepoints = NULL;
+ range.num_chars = num_chars_in_range;
+ range.chardata_for_range = chardata_for_range;
+ range.font_size = font_size;
+ return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1);
+}
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF void stbtt_GetScaledFontVMetrics(STBTT_STREAM_TYPE fontdata, int index, float size, float * ascent,
+ float * descent, float * lineGap);
+#else
+STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char * fontdata, int index, float size, float * ascent,
+ float * descent, float * lineGap);
+#endif
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF void stbtt_GetScaledFontVMetrics(STBTT_STREAM_TYPE fontdata, int index, float size, float * ascent,
+ float * descent, float * lineGap)
+#else
+STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char * fontdata, int index, float size, float * ascent,
+ float * descent, float * lineGap)
+#endif
+{
+ int i_ascent, i_descent, i_lineGap;
+ float scale;
+ stbtt_fontinfo info;
+ stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata, index));
+ scale = size > 0 ? stbtt_ScaleForPixelHeight(&info, size) : stbtt_ScaleForMappingEmToPixels(&info, -size);
+ stbtt_GetFontVMetrics(&info, &i_ascent, &i_descent, &i_lineGap);
+ *ascent = (float)i_ascent * scale;
+ *descent = (float)i_descent * scale;
+ *lineGap = (float)i_lineGap * scale;
+}
+
+STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar * chardata, int pw, int ph, int char_index, float * xpos,
+ float * ypos, stbtt_aligned_quad * q, int align_to_integer)
+{
+ float ipw = 1.0f / pw, iph = 1.0f / ph;
+ const stbtt_packedchar * b = chardata + char_index;
+
+ if(align_to_integer) {
+ float x = (float)STBTT_ifloor((*xpos + b->xoff) + 0.5f);
+ float y = (float)STBTT_ifloor((*ypos + b->yoff) + 0.5f);
+ q->x0 = x;
+ q->y0 = y;
+ q->x1 = x + b->xoff2 - b->xoff;
+ q->y1 = y + b->yoff2 - b->yoff;
+ }
+ else {
+ q->x0 = *xpos + b->xoff;
+ q->y0 = *ypos + b->yoff;
+ q->x1 = *xpos + b->xoff2;
+ q->y1 = *ypos + b->yoff2;
+ }
+
+ q->s0 = b->x0 * ipw;
+ q->t0 = b->y0 * iph;
+ q->s1 = b->x1 * ipw;
+ q->t1 = b->y1 * iph;
+
+ *xpos += b->xadvance;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// sdf computation
+//
+
+#define STBTT_min(a,b) ((a) < (b) ? (a) : (b))
+#define STBTT_max(a,b) ((a) < (b) ? (b) : (a))
+
+static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2], float q1[2], float q2[2],
+ float hits[2][2])
+{
+ float q0perp = q0[1] * ray[0] - q0[0] * ray[1];
+ float q1perp = q1[1] * ray[0] - q1[0] * ray[1];
+ float q2perp = q2[1] * ray[0] - q2[0] * ray[1];
+ float roperp = orig[1] * ray[0] - orig[0] * ray[1];
+
+ float a = q0perp - 2 * q1perp + q2perp;
+ float b = q1perp - q0perp;
+ float c = q0perp - roperp;
+
+ float s0 = 0., s1 = 0.;
+ int num_s = 0;
+
+ if(a != 0.0f) {
+ float discr = b * b - a * c;
+ if(discr > 0.0f) {
+ float rcpna = -1 / a;
+ float d = (float)STBTT_sqrt(discr);
+ s0 = (b + d) * rcpna;
+ s1 = (b - d) * rcpna;
+ if(s0 >= 0.0f && s0 <= 1.0f)
+ num_s = 1;
+ if(d > 0.0f && s1 >= 0.0f && s1 <= 1.0f) {
+ if(num_s == 0) s0 = s1;
+ ++num_s;
+ }
+ }
+ }
+ else {
+ // 2*b*s + c = 0
+ // s = -c / (2*b)
+ s0 = c / (-2 * b);
+ if(s0 >= 0.0f && s0 <= 1.0f)
+ num_s = 1;
+ }
+
+ if(num_s == 0)
+ return 0;
+ else {
+ float rcp_len2 = 1 / (ray[0] * ray[0] + ray[1] * ray[1]);
+ float rayn_x = ray[0] * rcp_len2, rayn_y = ray[1] * rcp_len2;
+
+ float q0d = q0[0] * rayn_x + q0[1] * rayn_y;
+ float q1d = q1[0] * rayn_x + q1[1] * rayn_y;
+ float q2d = q2[0] * rayn_x + q2[1] * rayn_y;
+ float rod = orig[0] * rayn_x + orig[1] * rayn_y;
+
+ float q10d = q1d - q0d;
+ float q20d = q2d - q0d;
+ float q0rd = q0d - rod;
+
+ hits[0][0] = q0rd + s0 * (2.0f - 2.0f * s0) * q10d + s0 * s0 * q20d;
+ hits[0][1] = a * s0 + b;
+
+ if(num_s > 1) {
+ hits[1][0] = q0rd + s1 * (2.0f - 2.0f * s1) * q10d + s1 * s1 * q20d;
+ hits[1][1] = a * s1 + b;
+ return 2;
+ }
+ else {
+ return 1;
+ }
+ }
+}
+
+static int equal(float * a, float * b)
+{
+ return (a[0] == b[0] && a[1] == b[1]);
+}
+
+static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex * verts)
+{
+ int i;
+ float orig[2], ray[2] = { 1, 0 };
+ float y_frac;
+ int winding = 0;
+
+ // make sure y never passes through a vertex of the shape
+ y_frac = (float)STBTT_fmod(y, 1.0f);
+ if(y_frac < 0.01f)
+ y += 0.01f;
+ else if(y_frac > 0.99f)
+ y -= 0.01f;
+
+ orig[0] = x;
+ orig[1] = y;
+
+ // test a ray from (-infinity,y) to (x,y)
+ for(i = 0; i < nverts; ++i) {
+ if(verts[i].type == STBTT_vline) {
+ int x0 = (int)verts[i - 1].x, y0 = (int)verts[i - 1].y;
+ int x1 = (int)verts[i].x, y1 = (int)verts[i].y;
+ if(y > STBTT_min(y0, y1) && y < STBTT_max(y0, y1) && x > STBTT_min(x0, x1)) {
+ float x_inter = (y - y0) / (y1 - y0) * (x1 - x0) + x0;
+ if(x_inter < x)
+ winding += (y0 < y1) ? 1 : -1;
+ }
+ }
+ if(verts[i].type == STBTT_vcurve) {
+ int x0 = (int)verts[i - 1].x, y0 = (int)verts[i - 1].y;
+ int x1 = (int)verts[i].cx, y1 = (int)verts[i].cy;
+ int x2 = (int)verts[i].x, y2 = (int)verts[i].y;
+ int ax = STBTT_min(x0, STBTT_min(x1, x2)), ay = STBTT_min(y0, STBTT_min(y1, y2));
+ int by = STBTT_max(y0, STBTT_max(y1, y2));
+ if(y > ay && y < by && x > ax) {
+ float q0[2], q1[2], q2[2];
+ float hits[2][2];
+ q0[0] = (float)x0;
+ q0[1] = (float)y0;
+ q1[0] = (float)x1;
+ q1[1] = (float)y1;
+ q2[0] = (float)x2;
+ q2[1] = (float)y2;
+ if(equal(q0, q1) || equal(q1, q2)) {
+ x0 = (int)verts[i - 1].x;
+ y0 = (int)verts[i - 1].y;
+ x1 = (int)verts[i].x;
+ y1 = (int)verts[i].y;
+ if(y > STBTT_min(y0, y1) && y < STBTT_max(y0, y1) && x > STBTT_min(x0, x1)) {
+ float x_inter = (y - y0) / (y1 - y0) * (x1 - x0) + x0;
+ if(x_inter < x)
+ winding += (y0 < y1) ? 1 : -1;
+ }
+ }
+ else {
+ int num_hits = stbtt__ray_intersect_bezier(orig, ray, q0, q1, q2, hits);
+ if(num_hits >= 1)
+ if(hits[0][0] < 0)
+ winding += (hits[0][1] < 0 ? -1 : 1);
+ if(num_hits >= 2)
+ if(hits[1][0] < 0)
+ winding += (hits[1][1] < 0 ? -1 : 1);
+ }
+ }
+ }
+ }
+ return winding;
+}
+
+static float stbtt__cuberoot(float x)
+{
+ if(x < 0)
+ return -(float)STBTT_pow(-x, 1.0f / 3.0f);
+ else
+ return (float)STBTT_pow(x, 1.0f / 3.0f);
+}
+
+// x^3 + a*x^2 + b*x + c = 0
+static int stbtt__solve_cubic(float a, float b, float c, float * r)
+{
+ float s = -a / 3;
+ float p = b - a * a / 3;
+ float q = a * (2 * a * a - 9 * b) / 27 + c;
+ float p3 = p * p * p;
+ float d = q * q + 4 * p3 / 27;
+ if(d >= 0) {
+ float z = (float)STBTT_sqrt(d);
+ float u = (-q + z) / 2;
+ float v = (-q - z) / 2;
+ u = stbtt__cuberoot(u);
+ v = stbtt__cuberoot(v);
+ r[0] = s + u + v;
+ return 1;
+ }
+ else {
+ float u = (float)STBTT_sqrt(-p / 3);
+ float v = (float)STBTT_acos(-STBTT_sqrt(-27 / p3) * q / 2) / 3; // p3 must be negative, since d is negative
+ float m = (float)STBTT_cos(v);
+ float n = (float)STBTT_cos(v - 3.141592f / 2) * 1.732050808f;
+ r[0] = s + u * 2 * m;
+ r[1] = s - u * (m + n);
+ r[2] = s - u * (m - n);
+
+ //STBTT_assert( STBTT_fabs(((r[0]+a)*r[0]+b)*r[0]+c) < 0.05f); // these asserts may not be safe at all scales, though they're in bezier t parameter units so maybe?
+ //STBTT_assert( STBTT_fabs(((r[1]+a)*r[1]+b)*r[1]+c) < 0.05f);
+ //STBTT_assert( STBTT_fabs(((r[2]+a)*r[2]+b)*r[2]+c) < 0.05f);
+ return 3;
+ }
+}
+
+STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo * info, float scale, int glyph, int padding,
+ unsigned char onedge_value, float pixel_dist_scale, int * width, int * height, int * xoff, int * yoff)
+{
+ float scale_x = scale, scale_y = scale;
+ int ix0, iy0, ix1, iy1;
+ int w, h;
+ unsigned char * data;
+
+ if(scale == 0) return NULL;
+
+ stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale, scale, 0.0f, 0.0f, &ix0, &iy0, &ix1, &iy1);
+
+ // if empty, return NULL
+ if(ix0 == ix1 || iy0 == iy1)
+ return NULL;
+
+ ix0 -= padding;
+ iy0 -= padding;
+ ix1 += padding;
+ iy1 += padding;
+
+ w = (ix1 - ix0);
+ h = (iy1 - iy0);
+
+ if(width) *width = w;
+ if(height) *height = h;
+ if(xoff) *xoff = ix0;
+ if(yoff) *yoff = iy0;
+
+ // invert for y-downwards bitmaps
+ scale_y = -scale_y;
+
+ {
+ int x, y, i, j;
+ float * precompute;
+ stbtt_vertex * verts;
+ int num_verts = stbtt_GetGlyphShape(info, glyph, &verts);
+ data = (unsigned char *)STBTT_malloc(w * h, info->userdata);
+ precompute = (float *)STBTT_malloc(num_verts * sizeof(float), info->userdata);
+
+ for(i = 0, j = num_verts - 1; i < num_verts; j = i++) {
+ if(verts[i].type == STBTT_vline) {
+ float x0 = verts[i].x * scale_x, y0 = verts[i].y * scale_y;
+ float x1 = verts[j].x * scale_x, y1 = verts[j].y * scale_y;
+ float dist = (float)STBTT_sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));
+ precompute[i] = (dist == 0) ? 0.0f : 1.0f / dist;
+ }
+ else if(verts[i].type == STBTT_vcurve) {
+ float x2 = verts[j].x * scale_x, y2 = verts[j].y * scale_y;
+ float x1 = verts[i].cx * scale_x, y1 = verts[i].cy * scale_y;
+ float x0 = verts[i].x * scale_x, y0 = verts[i].y * scale_y;
+ float bx = x0 - 2 * x1 + x2, by = y0 - 2 * y1 + y2;
+ float len2 = bx * bx + by * by;
+ if(len2 != 0.0f)
+ precompute[i] = 1.0f / (bx * bx + by * by);
+ else
+ precompute[i] = 0.0f;
+ }
+ else
+ precompute[i] = 0.0f;
+ }
+
+ for(y = iy0; y < iy1; ++y) {
+ for(x = ix0; x < ix1; ++x) {
+ float val;
+ float min_dist = 999999.0f;
+ float sx = (float)x + 0.5f;
+ float sy = (float)y + 0.5f;
+ float x_gspace = (sx / scale_x);
+ float y_gspace = (sy / scale_y);
+
+ int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts,
+ verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path
+
+ for(i = 0; i < num_verts; ++i) {
+ float x0 = verts[i].x * scale_x, y0 = verts[i].y * scale_y;
+
+ if(verts[i].type == STBTT_vline && precompute[i] != 0.0f) {
+ float x1 = verts[i - 1].x * scale_x, y1 = verts[i - 1].y * scale_y;
+
+ float dist, dist2 = (x0 - sx) * (x0 - sx) + (y0 - sy) * (y0 - sy);
+ if(dist2 < min_dist * min_dist)
+ min_dist = (float)STBTT_sqrt(dist2);
+
+ // coarse culling against bbox
+ //if (sx > STBTT_min(x0,x1)-min_dist && sx < STBTT_max(x0,x1)+min_dist &&
+ // sy > STBTT_min(y0,y1)-min_dist && sy < STBTT_max(y0,y1)+min_dist)
+ dist = (float)STBTT_fabs((x1 - x0) * (y0 - sy) - (y1 - y0) * (x0 - sx)) * precompute[i];
+ STBTT_assert(i != 0);
+ if(dist < min_dist) {
+ // check position along line
+ // x' = x0 + t*(x1-x0), y' = y0 + t*(y1-y0)
+ // minimize (x'-sx)*(x'-sx)+(y'-sy)*(y'-sy)
+ float dx = x1 - x0, dy = y1 - y0;
+ float px = x0 - sx, py = y0 - sy;
+ // minimize (px+t*dx)^2 + (py+t*dy)^2 = px*px + 2*px*dx*t + t^2*dx*dx + py*py + 2*py*dy*t + t^2*dy*dy
+ // derivative: 2*px*dx + 2*py*dy + (2*dx*dx+2*dy*dy)*t, set to 0 and solve
+ float t = -(px * dx + py * dy) / (dx * dx + dy * dy);
+ if(t >= 0.0f && t <= 1.0f)
+ min_dist = dist;
+ }
+ }
+ else if(verts[i].type == STBTT_vcurve) {
+ float x2 = verts[i - 1].x * scale_x, y2 = verts[i - 1].y * scale_y;
+ float x1 = verts[i].cx * scale_x, y1 = verts[i].cy * scale_y;
+ float box_x0 = STBTT_min(STBTT_min(x0, x1), x2);
+ float box_y0 = STBTT_min(STBTT_min(y0, y1), y2);
+ float box_x1 = STBTT_max(STBTT_max(x0, x1), x2);
+ float box_y1 = STBTT_max(STBTT_max(y0, y1), y2);
+ // coarse culling against bbox to avoid computing cubic unnecessarily
+ if(sx > box_x0 - min_dist && sx < box_x1 + min_dist && sy > box_y0 - min_dist && sy < box_y1 + min_dist) {
+ int num = 0;
+ float ax = x1 - x0, ay = y1 - y0;
+ float bx = x0 - 2 * x1 + x2, by = y0 - 2 * y1 + y2;
+ float mx = x0 - sx, my = y0 - sy;
+ float res[3] = { 0.f, 0.f, 0.f };
+ float px, py, t, it, dist2;
+ float a_inv = precompute[i];
+ if(a_inv == 0.0f) { // if a_inv is 0, it's 2nd degree so use quadratic formula
+ float a = 3 * (ax * bx + ay * by);
+ float b = 2 * (ax * ax + ay * ay) + (mx * bx + my * by);
+ float c = mx * ax + my * ay;
+ if(a == 0.0f) { // if a is 0, it's linear
+ if(b != 0.0f) {
+ res[num++] = -c / b;
+ }
+ }
+ else {
+ float discriminant = b * b - 4 * a * c;
+ if(discriminant < 0)
+ num = 0;
+ else {
+ float root = (float)STBTT_sqrt(discriminant);
+ res[0] = (-b - root) / (2 * a);
+ res[1] = (-b + root) / (2 * a);
+ num = 2; // don't bother distinguishing 1-solution case, as code below will still work
+ }
+ }
+ }
+ else {
+ float b = 3 * (ax * bx + ay * by) * a_inv; // could precompute this as it doesn't depend on sample point
+ float c = (2 * (ax * ax + ay * ay) + (mx * bx + my * by)) * a_inv;
+ float d = (mx * ax + my * ay) * a_inv;
+ num = stbtt__solve_cubic(b, c, d, res);
+ }
+ dist2 = (x0 - sx) * (x0 - sx) + (y0 - sy) * (y0 - sy);
+ if(dist2 < min_dist * min_dist)
+ min_dist = (float)STBTT_sqrt(dist2);
+
+ if(num >= 1 && res[0] >= 0.0f && res[0] <= 1.0f) {
+ t = res[0], it = 1.0f - t;
+ px = it * it * x0 + 2 * t * it * x1 + t * t * x2;
+ py = it * it * y0 + 2 * t * it * y1 + t * t * y2;
+ dist2 = (px - sx) * (px - sx) + (py - sy) * (py - sy);
+ if(dist2 < min_dist * min_dist)
+ min_dist = (float)STBTT_sqrt(dist2);
+ }
+ if(num >= 2 && res[1] >= 0.0f && res[1] <= 1.0f) {
+ t = res[1], it = 1.0f - t;
+ px = it * it * x0 + 2 * t * it * x1 + t * t * x2;
+ py = it * it * y0 + 2 * t * it * y1 + t * t * y2;
+ dist2 = (px - sx) * (px - sx) + (py - sy) * (py - sy);
+ if(dist2 < min_dist * min_dist)
+ min_dist = (float)STBTT_sqrt(dist2);
+ }
+ if(num >= 3 && res[2] >= 0.0f && res[2] <= 1.0f) {
+ t = res[2], it = 1.0f - t;
+ px = it * it * x0 + 2 * t * it * x1 + t * t * x2;
+ py = it * it * y0 + 2 * t * it * y1 + t * t * y2;
+ dist2 = (px - sx) * (px - sx) + (py - sy) * (py - sy);
+ if(dist2 < min_dist * min_dist)
+ min_dist = (float)STBTT_sqrt(dist2);
+ }
+ }
+ }
+ }
+ if(winding == 0)
+ min_dist = -min_dist; // if outside the shape, value is negative
+ val = onedge_value + pixel_dist_scale * min_dist;
+ if(val < 0)
+ val = 0;
+ else if(val > 255)
+ val = 255;
+ data[(y - iy0) * w + (x - ix0)] = (unsigned char)val;
+ }
+ }
+ STBTT_free(precompute, info->userdata);
+ STBTT_free(verts, info->userdata);
+ }
+ return data;
+}
+
+STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo * info, float scale, int codepoint, int padding,
+ unsigned char onedge_value, float pixel_dist_scale, int * width, int * height, int * xoff, int * yoff)
+{
+ return stbtt_GetGlyphSDF(info, scale, stbtt_FindGlyphIndex(info, codepoint), padding, onedge_value, pixel_dist_scale,
+ width, height, xoff, yoff);
+}
+
+STBTT_DEF void stbtt_FreeSDF(unsigned char * bitmap, void * userdata)
+{
+ STBTT_free(bitmap, userdata);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// font name matching -- recommended not to use this
+//
+
+// check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string
+#ifdef STBTT_STREAM_TYPE
+static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 * s1, stbtt_int32 len1, STBTT_STREAM_TYPE s2,
+ stbtt_uint32 s2offs, stbtt_int32 len2)
+#else
+static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 * s1, stbtt_int32 len1, stbtt_uint8 * s2,
+ stbtt_uint32 s2offs, stbtt_int32 len2)
+#endif
+{
+ stbtt_int32 i = 0;
+
+ // convert utf16 to utf8 and compare the results while converting
+ while(len2) {
+ stbtt_uint16 ch = ttUSHORT(s2, s2offs);
+ if(ch < 0x80) {
+ if(i >= len1) return -1;
+ if(s1[i++] != ch) return -1;
+ }
+ else if(ch < 0x800) {
+ if(i + 1 >= len1) return -1;
+ if(s1[i++] != 0xc0 + (ch >> 6)) return -1;
+ if(s1[i++] != 0x80 + (ch & 0x3f)) return -1;
+ }
+ else if(ch >= 0xd800 && ch < 0xdc00) {
+ stbtt_uint32 c;
+ stbtt_uint16 ch2 = ttUSHORT(s2, s2offs + 2);
+ if(i + 3 >= len1) return -1;
+ c = ((ch - 0xd800) << 10) + (ch2 - 0xdc00) + 0x10000;
+ if(s1[i++] != 0xf0 + (c >> 18)) return -1;
+ if(s1[i++] != 0x80 + ((c >> 12) & 0x3f)) return -1;
+ if(s1[i++] != 0x80 + ((c >> 6) & 0x3f)) return -1;
+ if(s1[i++] != 0x80 + ((c) & 0x3f)) return -1;
+ s2offs += 2; // plus another 2 below
+ len2 -= 2;
+ }
+ else if(ch >= 0xdc00 && ch < 0xe000) {
+ return -1;
+ }
+ else {
+ if(i + 2 >= len1) return -1;
+ if(s1[i++] != 0xe0 + (ch >> 12)) return -1;
+ if(s1[i++] != 0x80 + ((ch >> 6) & 0x3f)) return -1;
+ if(s1[i++] != 0x80 + ((ch) & 0x3f)) return -1;
+ }
+ s2offs += 2;
+ len2 -= 2;
+ }
+ return i;
+}
+#ifdef STBTT_STREAM_TYPE
+static int stbtt_CompareUTF8toUTF16_bigendian_internal(char * s1, int len1, STBTT_STREAM_TYPE s2, stbtt_uint32 s2offs,
+ int len2)
+{
+ return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8 *)s1, len1, s2, s2offs, len2);
+}
+#else
+static int stbtt_CompareUTF8toUTF16_bigendian_internal(char * s1, int len1, char * s2, stbtt_uint32 s2offs, int len2)
+{
+ return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8 *)s1, len1, (stbtt_uint8 *)s2, s2offs, len2);
+}
+#endif
+// returns results in whatever encoding you request... but note that 2-byte encodings
+// will be BIG-ENDIAN... use stbtt_CompareUTF8toUTF16_bigendian() to compare
+STBTT_DEF stbtt_uint32 stbtt_GetFontNameString(const stbtt_fontinfo * font, int * length, int platformID,
+ int encodingID, int languageID, int nameID)
+{
+ stbtt_int32 i, count, stringOffset;
+ stbtt_uint32 offset = font->fontstart;
+ stbtt_uint32 nm = stbtt__find_table(font->data, offset, "name");
+ if(!nm) return 0;
+
+ count = ttUSHORT(font->data, nm + 2);
+ stringOffset = nm + ttUSHORT(font->data, nm + 4);
+ for(i = 0; i < count; ++i) {
+ stbtt_uint32 loc = nm + 6 + 12 * i;
+ if(platformID == ttUSHORT(font->data, loc + 0) && encodingID == ttUSHORT(font->data, loc + 2)
+ && languageID == ttUSHORT(font->data, loc + 4) && nameID == ttUSHORT(font->data, loc + 6)) {
+ *length = ttUSHORT(font->data, loc + 8);
+ return stringOffset + ttUSHORT(font->data, loc + 10);
+ }
+ }
+ return 0;
+}
+#ifdef STBTT_STREAM_TYPE
+static int stbtt__matchpair(STBTT_STREAM_TYPE fc, stbtt_uint32 nm, stbtt_uint8 * name, stbtt_int32 nlen,
+ stbtt_int32 target_id, stbtt_int32 next_id)
+#else
+static int stbtt__matchpair(stbtt_uint8 * fc, stbtt_uint32 nm, stbtt_uint8 * name, stbtt_int32 nlen,
+ stbtt_int32 target_id, stbtt_int32 next_id)
+#endif
+{
+ stbtt_int32 i;
+ stbtt_int32 count = ttUSHORT(fc, nm + 2);
+ stbtt_int32 stringOffset = nm + ttUSHORT(fc, nm + 4);
+
+ for(i = 0; i < count; ++i) {
+ stbtt_uint32 loc = nm + 6 + 12 * i;
+ stbtt_int32 id = ttUSHORT(fc, loc + 6);
+ if(id == target_id) {
+ // find the encoding
+ stbtt_int32 platform = ttUSHORT(fc, loc + 0), encoding = ttUSHORT(fc, loc + 2), language = ttUSHORT(fc, loc + 4);
+
+ // is this a Unicode encoding?
+ if(platform == 0 || (platform == 3 && encoding == 1) || (platform == 3 && encoding == 10)) {
+ stbtt_int32 slen = ttUSHORT(fc, loc + 8);
+ stbtt_int32 off = ttUSHORT(fc, loc + 10);
+
+ // check if there's a prefix match
+ stbtt_int32 matchlen = stbtt__CompareUTF8toUTF16_bigendian_prefix(name, nlen, fc, stringOffset + off, slen);
+ if(matchlen >= 0) {
+ // check for target_id+1 immediately following, with same encoding & language
+ if(i + 1 < count && ttUSHORT(fc, loc + 12 + 6) == next_id && ttUSHORT(fc, loc + 12) == platform &&
+ ttUSHORT(fc, loc + 12 + 2) == encoding && ttUSHORT(fc, loc + 12 + 4) == language) {
+ slen = ttUSHORT(fc, loc + 12 + 8);
+ off = ttUSHORT(fc, loc + 12 + 10);
+ if(slen == 0) {
+ if(matchlen == nlen)
+ return 1;
+ }
+ else if(matchlen < nlen && name[matchlen] == ' ') {
+ ++matchlen;
+#ifdef STBTT_STREAM_TYPE
+ if(stbtt_CompareUTF8toUTF16_bigendian_internal((char *)(name + matchlen), nlen - matchlen, fc, stringOffset + off,
+ slen))
+#else
+ if(stbtt_CompareUTF8toUTF16_bigendian_internal((char *)(name + matchlen), nlen - matchlen, (char *)fc,
+ stringOffset + off, slen))
+#endif
+ return 1;
+ }
+ }
+ else {
+ // if nothing immediately following
+ if(matchlen == nlen)
+ return 1;
+ }
+ }
+ }
+
+ // @TODO handle other encodings
+ }
+ }
+ return 0;
+}
+#ifdef STBTT_STREAM_TYPE
+ static int stbtt__matches(STBTT_STREAM_TYPE fc, stbtt_uint32 offset, stbtt_uint8 * name, stbtt_int32 flags)
+#else
+ static int stbtt__matches(stbtt_uint8 * fc, stbtt_uint32 offset, stbtt_uint8 * name, stbtt_int32 flags)
+#endif
+
+{
+ stbtt_int32 nlen = (stbtt_int32)STBTT_strlen((char *)name);
+ stbtt_uint32 nm, hd;
+ if(!stbtt__isfont(fc, offset)) return 0;
+
+ // check italics/bold/underline flags in macStyle...
+ if(flags) {
+ hd = stbtt__find_table(fc, offset, "head");
+ if((ttUSHORT(fc, hd + 44) & 7) != (flags & 7)) return 0;
+ }
+
+ nm = stbtt__find_table(fc, offset, "name");
+ if(!nm) return 0;
+
+ if(flags) {
+ if(name == NULL) return 1;
+ // if we checked the macStyle flags, then just check the family and ignore the subfamily
+ if(stbtt__matchpair(fc, nm, name, nlen, 16, -1)) return 1;
+ if(stbtt__matchpair(fc, nm, name, nlen, 1, -1)) return 1;
+ if(stbtt__matchpair(fc, nm, name, nlen, 3, -1)) return 1;
+ }
+ else {
+ if(name == NULL) return 1;
+ if(stbtt__matchpair(fc, nm, name, nlen, 16, 17)) return 1;
+ if(stbtt__matchpair(fc, nm, name, nlen, 1, 2)) return 1;
+ if(stbtt__matchpair(fc, nm, name, nlen, 3, -1)) return 1;
+ }
+
+ return 0;
+}
+#ifdef STBTT_STREAM_TYPE
+ static int stbtt_FindMatchingFont_internal(STBTT_STREAM_TYPE font_collection, char * name_utf8, stbtt_int32 flags)
+#else
+ static int stbtt_FindMatchingFont_internal(unsigned char * font_collection, char * name_utf8, stbtt_int32 flags)
+#endif
+{
+ stbtt_int32 i;
+ for(i = 0;; ++i) {
+ stbtt_int32 off = stbtt_GetFontOffsetForIndex(font_collection, i);
+ if(off < 0) return off;
+#ifdef STBTT_STREAM_TYPE
+ if(stbtt__matches(font_collection, off, (stbtt_uint8 *)name_utf8, flags))
+#else
+ if(stbtt__matches((stbtt_uint8 *)font_collection, off, (stbtt_uint8 *)name_utf8, flags))
+#endif
+ return off;
+ }
+}
+
+#if defined(__GNUC__) || defined(__clang__)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_BakeFontBitmap(STBTT_STREAM_TYPE data, int offset,
+ float pixel_height, unsigned char * pixels, int pw, int ph,
+ int first_char, int num_chars, stbtt_bakedchar * chardata);
+#else
+STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char * data, int offset,
+ float pixel_height, unsigned char * pixels, int pw, int ph,
+ int first_char, int num_chars, stbtt_bakedchar * chardata);
+#endif
+
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_BakeFontBitmap(STBTT_STREAM_TYPE data, int offset,
+ float pixel_height, unsigned char * pixels, int pw, int ph,
+ int first_char, int num_chars, stbtt_bakedchar * chardata)
+#else
+STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char * data, int offset,
+ float pixel_height, unsigned char * pixels, int pw, int ph,
+ int first_char, int num_chars, stbtt_bakedchar * chardata)
+#endif
+{
+#ifdef STBTT_STREAM_TYPE
+ return stbtt_BakeFontBitmap_internal(data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata);
+#else
+ return stbtt_BakeFontBitmap_internal((unsigned char *)data, offset, pixel_height, pixels, pw, ph, first_char, num_chars,
+ chardata);
+#endif
+}
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_GetFontOffsetForIndex(STBTT_STREAM_TYPE data, int index)
+{
+ return stbtt_GetFontOffsetForIndex_internal(data, index);
+}
+#else
+STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char * data, int index)
+{
+ return stbtt_GetFontOffsetForIndex_internal((unsigned char *)data, index);
+}
+#endif
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_GetNumberOfFonts(STBTT_STREAM_TYPE data)
+{
+ return stbtt_GetNumberOfFonts_internal(data);
+}
+#else
+STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char * data)
+{
+ return stbtt_GetNumberOfFonts_internal((unsigned char *)data);
+}
+#endif
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_InitFont(stbtt_fontinfo * info, STBTT_STREAM_TYPE data, int offset)
+{
+ return stbtt_InitFont_internal(info, data, offset);
+}
+#else
+STBTT_DEF int stbtt_InitFont(stbtt_fontinfo * info, const unsigned char * data, int offset)
+{
+ return stbtt_InitFont_internal(info, (unsigned char *)data, offset);
+}
+#endif
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_FindMatchingFont(STBTT_STREAM_TYPE fontdata, const char * name, int flags)
+{
+ return stbtt_FindMatchingFont_internal(fontdata, (char *)name, flags);
+}
+#else
+STBTT_DEF int stbtt_FindMatchingFont(const unsigned char * fontdata, const char * name, int flags)
+{
+ return stbtt_FindMatchingFont_internal((unsigned char *)fontdata, (char *)name, flags);
+}
+#endif
+#ifdef STBTT_STREAM_TYPE
+STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char * s1, int len1, STBTT_STREAM_TYPE s2, stbtt_uint32 s2offs,
+ int len2)
+{
+ return stbtt_CompareUTF8toUTF16_bigendian_internal((char *)s1, len1, s2, s2offs, len2);
+}
+#else
+STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char * s1, int len1, const char * s2, stbtt_uint32 s2offs,
+ int len2)
+{
+ return stbtt_CompareUTF8toUTF16_bigendian_internal((char *)s1, len1, (char *)s2, s2offs, len2);
+}
+#endif
+
+#if defined(__GNUC__) || defined(__clang__)
+ #pragma GCC diagnostic pop
+ #pragma GCC diagnostic pop
+#endif
+
+#endif // STB_TRUETYPE_IMPLEMENTATION
+
+// FULL VERSION HISTORY
+//
+// 1.25 (2021-07-11) many fixes
+// 1.24 (2020-02-05) fix warning
+// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS)
+// 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined
+// 1.21 (2019-02-25) fix warning
+// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics()
+// 1.19 (2018-02-11) OpenType GPOS kerning (horizontal only), STBTT_fmod
+// 1.18 (2018-01-29) add missing function
+// 1.17 (2017-07-23) make more arguments const; doc fix
+// 1.16 (2017-07-12) SDF support
+// 1.15 (2017-03-03) make more arguments const
+// 1.14 (2017-01-16) num-fonts-in-TTC function
+// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts
+// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual
+// 1.11 (2016-04-02) fix unused-variable warning
+// 1.10 (2016-04-02) allow user-defined fabs() replacement
+// fix memory leak if fontsize=0.0
+// fix warning from duplicate typedef
+// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use alloc userdata for PackFontRanges
+// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges
+// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints;
+// allow PackFontRanges to pack and render in separate phases;
+// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);
+// fixed an assert() bug in the new rasterizer
+// replace assert() with STBTT_assert() in new rasterizer
+// 1.06 (2015-07-14) performance improvements (~35% faster on x86 and x64 on test machine)
+// also more precise AA rasterizer, except if shapes overlap
+// remove need for STBTT_sort
+// 1.05 (2015-04-15) fix misplaced definitions for STBTT_STATIC
+// 1.04 (2015-04-15) typo in example
+// 1.03 (2015-04-12) STBTT_STATIC, fix memory leak in new packing, various fixes
+// 1.02 (2014-12-10) fix various warnings & compile issues w/ stb_rect_pack, C++
+// 1.01 (2014-12-08) fix subpixel position when oversampling to exactly match
+// non-oversampled; STBTT_POINT_SIZE for packed case only
+// 1.00 (2014-12-06) add new PackBegin etc. API, w/ support for oversampling
+// 0.99 (2014-09-18) fix multiple bugs with subpixel rendering (ryg)
+// 0.9 (2014-08-07) support certain mac/iOS fonts without an MS platformID
+// 0.8b (2014-07-07) fix a warning
+// 0.8 (2014-05-25) fix a few more warnings
+// 0.7 (2013-09-25) bugfix: subpixel glyph bug fixed in 0.5 had come back
+// 0.6c (2012-07-24) improve documentation
+// 0.6b (2012-07-20) fix a few more warnings
+// 0.6 (2012-07-17) fix warnings; added stbtt_ScaleForMappingEmToPixels,
+// stbtt_GetFontBoundingBox, stbtt_IsGlyphEmpty
+// 0.5 (2011-12-09) bugfixes:
+// subpixel glyph renderer computed wrong bounding box
+// first vertex of shape can be off-curve (FreeSans)
+// 0.4b (2011-12-03) fixed an error in the font baking example
+// 0.4 (2011-12-01) kerning, subpixel rendering (tor)
+// bugfixes for:
+// codepoint-to-glyph conversion using table fmt=12
+// codepoint-to-glyph conversion using table fmt=4
+// stbtt_GetBakedQuad with non-square texture (Zer)
+// updated Hello World! sample to use kerning and subpixel
+// fixed some warnings
+// 0.3 (2009-06-24) cmap fmt=12, compound shapes (MM)
+// userdata, malloc-from-userdata, non-zero fill (stb)
+// 0.2 (2009-03-11) Fix unsigned/signed char warnings
+// 0.1 (2009-03-09) First public release
+//
+
+/*
+------------------------------------------------------------------------------
+This software is available under 2 licenses -- choose whichever you prefer.
+------------------------------------------------------------------------------
+ALTERNATIVE A - MIT License
+Copyright (c) 2017 Sean Barrett
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+------------------------------------------------------------------------------
+ALTERNATIVE B - Public Domain (www.unlicense.org)
+This is free and unencumbered software released into the public domain.
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+------------------------------------------------------------------------------
+*/
diff --git a/lib/lvgl/src/extra/lv_extra.c b/lib/lvgl/src/extra/lv_extra.c
index 0b50002..3808337 100644
--- a/lib/lvgl/src/extra/lv_extra.c
+++ b/lib/lvgl/src/extra/lv_extra.c
@@ -50,6 +50,10 @@ void lv_extra_init(void)
lv_fs_fatfs_init();
#endif
+#if LV_USE_FS_LITTLEFS != '\0'
+ lv_fs_littlefs_init();
+#endif
+
#if LV_USE_FS_STDIO != '\0'
lv_fs_stdio_init();
#endif
diff --git a/lib/lvgl/src/extra/lv_extra.mk b/lib/lvgl/src/extra/lv_extra.mk
index 1afcc7b..8d418ad 100644
--- a/lib/lvgl/src/extra/lv_extra.mk
+++ b/lib/lvgl/src/extra/lv_extra.mk
@@ -1 +1 @@
-CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra -name \*.c)
+CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra -name "*.c")
diff --git a/lib/lvgl/src/extra/others/fragment/lv_fragment.h b/lib/lvgl/src/extra/others/fragment/lv_fragment.h
index da30b39..dd8d5b4 100644
--- a/lib/lvgl/src/extra/others/fragment/lv_fragment.h
+++ b/lib/lvgl/src/extra/others/fragment/lv_fragment.h
@@ -266,7 +266,6 @@ lv_fragment_t * lv_fragment_manager_find_by_container(lv_fragment_manager_t * ma
*/
lv_fragment_t * lv_fragment_manager_get_parent_fragment(lv_fragment_manager_t * manager);
-
/**
* Create a fragment instance.
*
@@ -325,7 +324,6 @@ void lv_fragment_del_obj(lv_fragment_t * fragment);
*/
void lv_fragment_recreate_obj(lv_fragment_t * fragment);
-
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/extra/others/fragment/lv_fragment_manager.c b/lib/lvgl/src/extra/others/fragment/lv_fragment_manager.c
index 4a30134..25c604b 100644
--- a/lib/lvgl/src/extra/others/fragment/lv_fragment_manager.c
+++ b/lib/lvgl/src/extra/others/fragment/lv_fragment_manager.c
@@ -36,7 +36,6 @@ struct _lv_fragment_manager_t {
lv_ll_t stack;
};
-
/**********************
* STATIC PROTOTYPES
**********************/
@@ -127,23 +126,25 @@ void lv_fragment_manager_remove(lv_fragment_manager_t * manager, lv_fragment_t *
bool was_top = false;
if(states->in_stack) {
void * stack_top = _lv_ll_get_tail(&manager->stack);
- lv_fragment_stack_item_t * stack = NULL;
- _LV_LL_READ_BACK(&manager->stack, stack) {
- if(stack->states == states) {
- was_top = stack_top == stack;
- void * stack_prev = _lv_ll_get_prev(&manager->stack, stack);
+ lv_fragment_stack_item_t * item = NULL;
+ _LV_LL_READ_BACK(&manager->stack, item) {
+ if(item->states == states) {
+ was_top = stack_top == item;
+ void * stack_prev = _lv_ll_get_prev(&manager->stack, item);
if(!stack_prev) break;
prev = ((lv_fragment_stack_item_t *) stack_prev)->states;
break;
}
}
- if(stack) {
- _lv_ll_remove(&manager->stack, stack);
+ if(item) {
+ _lv_ll_remove(&manager->stack, item);
+ lv_mem_free(item);
}
}
item_del_obj(states);
item_del_fragment(states);
_lv_ll_remove(&manager->attached, states);
+ lv_mem_free(states);
if(prev && was_top) {
item_create_obj(prev);
}
@@ -185,14 +186,15 @@ void lv_fragment_manager_replace(lv_fragment_manager_t * manager, lv_fragment_t
bool lv_fragment_manager_send_event(lv_fragment_manager_t * manager, int code, void * userdata)
{
LV_ASSERT_NULL(manager);
- lv_fragment_stack_item_t * top = _lv_ll_get_tail(&manager->stack);
- if(!top) return false;
- lv_fragment_managed_states_t * states = top->states;
- lv_fragment_t * instance = states->instance;
- if(!instance) return false;
- if(lv_fragment_manager_send_event(instance->child_manager, code, userdata)) return true;
- if(!states->cls->event_cb) return false;
- return states->cls->event_cb(instance, code, userdata);
+ lv_fragment_managed_states_t * p = NULL;
+ _LV_LL_READ_BACK(&manager->attached, p) {
+ if(!p->obj_created || p->destroying_obj) continue;
+ lv_fragment_t * instance = p->instance;
+ if(!instance) continue;
+ if(lv_fragment_manager_send_event(instance->child_manager, code, userdata)) return true;
+ if(p->cls->event_cb && p->cls->event_cb(instance, code, userdata)) return true;
+ }
+ return false;
}
size_t lv_fragment_manager_get_stack_size(lv_fragment_manager_t * manager)
@@ -255,24 +257,23 @@ static void item_del_fragment(lv_fragment_managed_states_t * item)
item->instance = NULL;
}
-
static lv_fragment_managed_states_t * fragment_attach(lv_fragment_manager_t * manager, lv_fragment_t * fragment,
lv_obj_t * const * container)
{
LV_ASSERT(manager);
LV_ASSERT(fragment);
LV_ASSERT(fragment->managed == NULL);
- lv_fragment_managed_states_t * item = _lv_ll_ins_tail(&manager->attached);
- lv_memset_00(item, sizeof(lv_fragment_managed_states_t));
- item->cls = fragment->cls;
- item->manager = manager;
- item->container = container;
- item->instance = fragment;
- fragment->managed = item;
+ lv_fragment_managed_states_t * states = _lv_ll_ins_tail(&manager->attached);
+ lv_memset_00(states, sizeof(lv_fragment_managed_states_t));
+ states->cls = fragment->cls;
+ states->manager = manager;
+ states->container = container;
+ states->instance = fragment;
+ fragment->managed = states;
if(fragment->cls->attached_cb) {
fragment->cls->attached_cb(fragment);
}
- return item;
+ return states;
}
#endif /*LV_USE_FRAGMENT*/
diff --git a/lib/lvgl/src/extra/others/gridnav/lv_gridnav.c b/lib/lvgl/src/extra/others/gridnav/lv_gridnav.c
index f209ed7..505a977 100644
--- a/lib/lvgl/src/extra/others/gridnav/lv_gridnav.c
+++ b/lib/lvgl/src/extra/others/gridnav/lv_gridnav.c
@@ -217,6 +217,7 @@ static void gridnav_event_cb(lv_event_t * e)
if(dsc->focused_obj == NULL) dsc->focused_obj = find_first_focusable(obj);
if(dsc->focused_obj) {
lv_obj_add_state(dsc->focused_obj, LV_STATE_FOCUSED | LV_STATE_FOCUS_KEY);
+ lv_obj_clear_state(dsc->focused_obj, LV_STATE_PRESSED); /*Be sure the focuses obj is not stuck in pressed state*/
lv_obj_scroll_to_view(dsc->focused_obj, LV_ANIM_OFF);
}
}
@@ -348,7 +349,7 @@ static lv_obj_t * find_last_focusable(lv_obj_t * obj)
{
uint32_t child_cnt = lv_obj_get_child_cnt(obj);
int32_t i;
- for(i = child_cnt - 1; i >= 0; i++) {
+ for(i = child_cnt - 1; i >= 0; i--) {
lv_obj_t * child = lv_obj_get_child(obj, i);
if(obj_is_focuable(child)) return child;
}
diff --git a/lib/lvgl/src/extra/others/ime/lv_ime_pinyin.c b/lib/lvgl/src/extra/others/ime/lv_ime_pinyin.c
new file mode 100644
index 0000000..06f09ff
--- /dev/null
+++ b/lib/lvgl/src/extra/others/ime/lv_ime_pinyin.c
@@ -0,0 +1,1186 @@
+/**
+ * @file lv_ime_pinyin.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_ime_pinyin.h"
+#if LV_USE_IME_PINYIN != 0
+
+#include
+
+/*********************
+ * DEFINES
+ *********************/
+#define MY_CLASS &lv_ime_pinyin_class
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+static void lv_ime_pinyin_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
+static void lv_ime_pinyin_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
+static void lv_ime_pinyin_style_change_event(lv_event_t * e);
+static void lv_ime_pinyin_kb_event(lv_event_t * e);
+static void lv_ime_pinyin_cand_panel_event(lv_event_t * e);
+
+static void init_pinyin_dict(lv_obj_t * obj, lv_pinyin_dict_t * dict);
+static void pinyin_input_proc(lv_obj_t * obj);
+static void pinyin_page_proc(lv_obj_t * obj, uint16_t btn);
+static char * pinyin_search_matching(lv_obj_t * obj, char * py_str, uint16_t * cand_num);
+static void pinyin_ime_clear_data(lv_obj_t * obj);
+
+#if LV_IME_PINYIN_USE_K9_MODE
+ static void pinyin_k9_init_data(lv_obj_t * obj);
+ static void pinyin_k9_get_legal_py(lv_obj_t * obj, char * k9_input, const char * py9_map[]);
+ static bool pinyin_k9_is_valid_py(lv_obj_t * obj, char * py_str);
+ static void pinyin_k9_fill_cand(lv_obj_t * obj);
+ static void pinyin_k9_cand_page_proc(lv_obj_t * obj, uint16_t dir);
+#endif
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+const lv_obj_class_t lv_ime_pinyin_class = {
+ .constructor_cb = lv_ime_pinyin_constructor,
+ .destructor_cb = lv_ime_pinyin_destructor,
+ .width_def = LV_SIZE_CONTENT,
+ .height_def = LV_SIZE_CONTENT,
+ .group_def = LV_OBJ_CLASS_GROUP_DEF_TRUE,
+ .instance_size = sizeof(lv_ime_pinyin_t),
+ .base_class = &lv_obj_class
+};
+
+#if LV_IME_PINYIN_USE_K9_MODE
+static char * lv_btnm_def_pinyin_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 20] = {\
+ ",\0", "1#\0", "abc \0", "def\0", LV_SYMBOL_BACKSPACE"\0", "\n\0",
+ ".\0", "ghi\0", "jkl\0", "mno\0", LV_SYMBOL_KEYBOARD"\0", "\n\0",
+ "?\0", "pqrs\0", "tuv\0", "wxyz\0", LV_SYMBOL_NEW_LINE"\0", "\n\0",
+ LV_SYMBOL_LEFT"\0", "\0"
+ };
+
+static lv_btnmatrix_ctrl_t default_kb_ctrl_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 16] = { 1 };
+static char lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 2][LV_IME_PINYIN_K9_MAX_INPUT] = {0};
+#endif
+
+static char lv_pinyin_cand_str[LV_IME_PINYIN_CAND_TEXT_NUM][4];
+static char * lv_btnm_def_pinyin_sel_map[LV_IME_PINYIN_CAND_TEXT_NUM + 3];
+
+#if LV_IME_PINYIN_USE_DEFAULT_DICT
+lv_pinyin_dict_t lv_ime_pinyin_def_dict[] = {
+ { "a", "啊" },
+ { "ai", "愛" },
+ { "an", "安暗案" },
+ { "ba", "吧把爸八" },
+ { "bai", "百白敗" },
+ { "ban", "半般辦" },
+ { "bang", "旁" },
+ { "bao", "保薄包報" },
+ { "bei", "被背悲北杯備" },
+ { "ben", "本" },
+ { "bi", "必比避鼻彼筆秘閉" },
+ { "bian", "便邊變変辺" },
+ { "biao", "表標" },
+ { "bie", "別" },
+ { "bing", "病並氷" },
+ { "bo", "波薄泊" },
+ { "bu", "不布步部捕補歩" },
+ { "ca", "察" },
+ { "cai", "才材菜財採" },
+ { "can", "参残參" },
+ { "ce", "策側" },
+ { "ceng", "曾" },
+ { "cha", "差查茶" },
+ { "chai", "差" },
+ { "chan", "產産單" },
+ { "chang", "場廠" },
+ { "chao", "超朝" },
+ { "che", "車" },
+ { "cheng", "成程乗" },
+ { "chi", "尺吃持赤池遅歯" },
+ { "chong", "充种重種" },
+ { "chu", "出初楚触處処" },
+ { "chuan", "川船傳" },
+ { "chuang", "創窓" },
+ { "chun", "春" },
+ { "ci", "此次辞差" },
+ { "cong", "從従" },
+ { "cu", "卒" },
+ { "cun", "存村" },
+ { "cuo", "錯" },
+ { "da", "大打答達" },
+ { "dai", "代待帯帶貸" },
+ { "dan", "但担擔誕單単" },
+ { "dang", "当党當黨" },
+ { "dao", "到道盗導島辺" },
+ { "de", "的得" },
+ { "dei", "" },
+ { "deng", "等" },
+ { "di", "地得低底弟第締" },
+ { "dian", "点电店點電" },
+ { "diao", "調" },
+ { "ding", "定町" },
+ { "dong", "冬東動働凍" },
+ { "du", "独度都渡読" },
+ { "duan", "段断短斷" },
+ { "dui", "對対" },
+ { "duo", "多駄" },
+ { "e", "嗯悪" },
+ { "en", "嗯" },
+ { "er", "而耳二兒" },
+ { "fa", "乏法發発髪" },
+ { "fan", "反返犯番仮販飯範払" },
+ { "fang", "方放房坊訪" },
+ { "fei", "非飛費" },
+ { "fen", "分份" },
+ { "feng", "風豐" },
+ { "fou", "否不" },
+ { "fu", "父夫富服符付附府幅婦復複負払" },
+ { "gai", "改概該" },
+ { "gan", "甘感敢" },
+ { "gang", "港剛" },
+ { "gao", "告高" },
+ { "ge", "各格歌革割個" },
+ { "gei", "給" },
+ { "gen", "跟根" },
+ { "geng", "更" },
+ { "gong", "工共供功公" },
+ { "gou", "夠構溝" },
+ { "gu", "古故鼓" },
+ { "guai", "掛" },
+ { "guan", "官管慣館觀関關" },
+ { "guang", "光広" },
+ { "gui", "規帰" },
+ { "guo", "果国裏菓國過" },
+ { "hai", "孩海害還" },
+ { "han", "寒漢" },
+ { "hang", "航行" },
+ { "hao", "好号" },
+ { "he", "合和喝何荷" },
+ { "hei", "黒" },
+ { "hen", "很" },
+ { "heng", "行横" },
+ { "hou", "厚喉候後" },
+ { "hu", "乎呼湖護" },
+ { "hua", "化画花話畫劃" },
+ { "huai", "壊劃" },
+ { "huan", "緩環歡還換" },
+ { "huang", "黄" },
+ { "hui", "回会慧絵揮會" },
+ { "hun", "混婚" },
+ { "huo", "活或火獲" },
+ { "i", "" },
+ { "ji", "己计及机既急季寄技即集基祭系奇紀積計記済幾際極繼績機濟" },
+ { "jia", "家加價" },
+ { "jian", "件建健肩見減間検簡漸" },
+ { "jiang", "降強講將港" },
+ { "jiao", "叫教交角覚覺較學" },
+ { "jie", "介借接姐皆届界解結階節價" },
+ { "jin", "今近禁金僅進" },
+ { "jing", "京境景静精經経" },
+ { "jiu", "就久九酒究" },
+ { "ju", "句具局居決挙據舉" },
+ { "jue", "角覚覺" },
+ { "jun", "均" },
+ { "kai", "開" },
+ { "kan", "看刊" },
+ { "kang", "康" },
+ { "kao", "考" },
+ { "ke", "可刻科克客渇課" },
+ { "ken", "肯" },
+ { "kong", "空控" },
+ { "kou", "口" },
+ { "ku", "苦庫" },
+ { "kuai", "快塊会會" },
+ { "kuang", "況" },
+ { "kun", "困" },
+ { "kuo", "括拡適" },
+ { "la", "拉啦落" },
+ { "lai", "来來頼" },
+ { "lao", "老絡落" },
+ { "le", "了楽樂" },
+ { "lei", "類" },
+ { "leng", "冷" },
+ { "li", "力立利理例礼離麗裡勵歷" },
+ { "lian", "連練臉聯" },
+ { "liang", "良量涼兩両" },
+ { "liao", "料" },
+ { "lie", "列" },
+ { "lin", "林隣賃" },
+ { "ling", "另令領" },
+ { "liu", "六留流" },
+ { "lu", "律路録緑陸履慮" },
+ { "lv", "旅" },
+ { "lun", "輪論" },
+ { "luo", "落絡" },
+ { "ma", "媽嗎嘛" },
+ { "mai", "買売" },
+ { "man", "滿" },
+ { "mang", "忙" },
+ { "mao", "毛猫貿" },
+ { "me", "麼" },
+ { "mei", "美妹每沒毎媒" },
+ { "men", "們" },
+ { "mi", "米密秘" },
+ { "mian", "免面勉眠" },
+ { "miao", "描" },
+ { "min", "民皿" },
+ { "ming", "命明名" },
+ { "mo", "末模麼" },
+ { "mou", "某" },
+ { "mu", "母木目模" },
+ { "na", "那哪拿內南" },
+ { "nan", "男南難" },
+ { "nao", "腦" },
+ { "ne", "那哪呢" },
+ { "nei", "内那哪內" },
+ { "neng", "能" },
+ { "ni", "你妳呢" },
+ { "nian", "年念" },
+ { "niang", "娘" },
+ { "nin", "您" },
+ { "ning", "凝" },
+ { "niu", "牛" },
+ { "nong", "農濃" },
+ { "nu", "女努" },
+ { "nuan", "暖" },
+ { "o", "" },
+ { "ou", "歐" },
+ { "pa", "怕" },
+ { "pian", "片便" },
+ { "pai", "迫派排" },
+ { "pan", "判番" },
+ { "pang", "旁" },
+ { "pei", "配" },
+ { "peng", "朋" },
+ { "pi", "疲否" },
+ { "pin", "品貧" },
+ { "ping", "平評" },
+ { "po", "迫破泊頗" },
+ { "pu", "普僕" },
+ { "qi", "起其奇七气期泣企妻契気" },
+ { "qian", "嵌浅千前鉛錢針" },
+ { "qiang", "強將" },
+ { "qiao", "橋繰" },
+ { "qie", "且切契" },
+ { "qin", "寝勤親" },
+ { "qing", "青清情晴輕頃請軽" },
+ { "qiu", "求秋球" },
+ { "qu", "去取趣曲區" },
+ { "quan", "全犬券" },
+ { "que", "缺確卻" },
+ { "ran", "然" },
+ { "rang", "讓" },
+ { "re", "熱" },
+ { "ren", "人任認" },
+ { "reng", "仍" },
+ { "ri", "日" },
+ { "rong", "容" },
+ { "rou", "弱若肉" },
+ { "ru", "如入" },
+ { "ruan", "軟" },
+ { "sai", "賽" },
+ { "san", "三" },
+ { "sao", "騒繰" },
+ { "se", "色" },
+ { "sen", "森" },
+ { "sha", "砂" },
+ { "shan", "善山單" },
+ { "shang", "上尚商" },
+ { "shao", "少紹" },
+ { "shaung", "雙" },
+ { "she", "社射設捨渉" },
+ { "shei", "誰" },
+ { "shen", "什申深甚身伸沈神" },
+ { "sheng", "生声昇勝乗聲" },
+ { "shi", "是失示食时事式十石施使世实史室市始柿氏士仕拭時視師試適実實識" },
+ { "shou", "手首守受授" },
+ { "shu", "束数暑殊樹書屬輸術" },
+ { "shui", "水説說誰" },
+ { "shuo", "数説說" },
+ { "si", "思寺司四私似死価" },
+ { "song", "送" },
+ { "su", "速宿素蘇訴" },
+ { "suan", "算酸" },
+ { "sui", "隨雖歲歳" },
+ { "sun", "孫" },
+ { "suo", "所" },
+ { "ta", "她他它牠" },
+ { "tai", "太台態臺" },
+ { "tan", "探談曇" },
+ { "tang", "糖" },
+ { "tao", "桃逃套討" },
+ { "te", "特" },
+ { "ti", "体提替題體戻" },
+ { "tian", "天田" },
+ { "tiao", "条條調" },
+ { "tie", "鉄" },
+ { "ting", "停庭聽町" },
+ { "tong", "同童通痛统統" },
+ { "tou", "投透頭" },
+ { "tu", "土徒茶図" },
+ { "tuan", "團" },
+ { "tui", "推退" },
+ { "tuo", "脱駄" },
+ { "u", "" },
+ { "v", "" },
+ { "wai", "外" },
+ { "wan", "完万玩晩腕灣" },
+ { "wang", "忘望亡往網" },
+ { "wei", "危位未味委為謂維違圍" },
+ { "wen", "文温問聞" },
+ { "wo", "我" },
+ { "wu", "午物五無屋亡鳥務汚" },
+ { "xi", "夕息西洗喜系昔席希析嬉膝細習係" },
+ { "xia", "下夏狭暇" },
+ { "xian", "先限嫌洗現見線顯" },
+ { "xiang", "向相香像想象降項詳響" },
+ { "xiao", "小笑消效校削咲" },
+ { "xie", "写携些解邪械協謝寫契" },
+ { "xin", "心信新辛" },
+ { "xing", "行形性幸型星興" },
+ { "xiong", "兄胸" },
+ { "xiu", "休秀修" },
+ { "xu", "須需許續緒続" },
+ { "xuan", "選懸" },
+ { "xue", "学雪削靴學" },
+ { "xun", "訓訊" },
+ { "ya", "呀押壓" },
+ { "yan", "言顔研煙嚴厳験驗塩" },
+ { "yang", "央洋陽樣様" },
+ { "yao", "要揺腰薬曜" },
+ { "ye", "也野夜邪業葉" },
+ { "yi", "一已亦依以移意医易伊役異億義議藝醫訳" },
+ { "yin", "因引音飲銀" },
+ { "ying", "英迎影映應營営" },
+ { "yong", "永用泳擁" },
+ { "you", "又有右友由尤油遊郵誘優" },
+ { "yu", "予育余雨浴欲愈御宇域語於魚與込" },
+ { "yuan", "元原源院員円園遠猿願" },
+ { "yue", "月越約楽" },
+ { "yun", "雲伝運" },
+ { "za", "雑" },
+ { "zai", "在再載災" },
+ { "zang", "蔵" },
+ { "zao", "早造" },
+ { "ze", "則擇責" },
+ { "zen", "怎" },
+ { "zeng", "曾增増" },
+ { "zha", "札" },
+ { "zhai", "宅擇" },
+ { "zhan", "站展戰戦" },
+ { "zhang", "丈長障帳張" },
+ { "zhao", "找着朝招" },
+ { "zhe", "者這" },
+ { "zhen", "真震針" },
+ { "zheng", "正整争政爭" },
+ { "zhi", "之只知支止制至治直指值置智値紙製質誌織隻識職執" },
+ { "zhong", "中种終重種眾" },
+ { "zhou", "周州昼宙洲週" },
+ { "zhu", "助主住柱株祝逐注著諸屬術" },
+ { "zhuan", "专專転" },
+ { "zhuang", "状狀" },
+ { "zhui", "追" },
+ { "zhun", "準" },
+ { "zhuo", "着" },
+ { "zi", "子自字姉資" },
+ { "zong", "總" },
+ { "zuo", "左做昨坐座作" },
+ { "zu", "足祖族卒組" },
+ { "zui", "最酔" },
+ { "zou", "走" },
+ {NULL, NULL}
+};
+#endif
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+lv_obj_t * lv_ime_pinyin_create(lv_obj_t * parent)
+{
+ LV_LOG_INFO("begin");
+ lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent);
+ lv_obj_class_init_obj(obj);
+ return obj;
+}
+
+/*=====================
+ * Setter functions
+ *====================*/
+
+/**
+ * Set the keyboard of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @param dict pointer to a Pinyin input method keyboard
+ */
+void lv_ime_pinyin_set_keyboard(lv_obj_t * obj, lv_obj_t * kb)
+{
+ if(kb) {
+ LV_ASSERT_OBJ(kb, &lv_keyboard_class);
+ }
+
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ pinyin_ime->kb = kb;
+ lv_obj_add_event_cb(pinyin_ime->kb, lv_ime_pinyin_kb_event, LV_EVENT_VALUE_CHANGED, obj);
+ lv_obj_align_to(pinyin_ime->cand_panel, pinyin_ime->kb, LV_ALIGN_OUT_TOP_MID, 0, 0);
+}
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @param dict pointer to a Pinyin input method dictionary
+ */
+void lv_ime_pinyin_set_dict(lv_obj_t * obj, lv_pinyin_dict_t * dict)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ init_pinyin_dict(obj, dict);
+}
+
+/**
+ * Set mode, 26-key input(k26) or 9-key input(k9).
+ * @param obj pointer to a Pinyin input method object
+ * @param mode the mode from 'lv_keyboard_mode_t'
+ */
+void lv_ime_pinyin_set_mode(lv_obj_t * obj, lv_ime_pinyin_mode_t mode)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ LV_ASSERT_OBJ(pinyin_ime->kb, &lv_keyboard_class);
+
+ pinyin_ime->mode = mode;
+
+#if LV_IME_PINYIN_USE_K9_MODE
+ if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K9) {
+ pinyin_k9_init_data(obj);
+ lv_keyboard_set_map(pinyin_ime->kb, LV_KEYBOARD_MODE_USER_1, (const char *)lv_btnm_def_pinyin_k9_map,
+ (const)default_kb_ctrl_k9_map);
+ lv_keyboard_set_mode(pinyin_ime->kb, LV_KEYBOARD_MODE_USER_1);
+ }
+#endif
+}
+
+/*=====================
+ * Getter functions
+ *====================*/
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin IME object
+ * @return pointer to the Pinyin IME keyboard
+ */
+lv_obj_t * lv_ime_pinyin_get_kb(lv_obj_t * obj)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ return pinyin_ime->kb;
+}
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @return pointer to the Pinyin input method candidate panel
+ */
+lv_obj_t * lv_ime_pinyin_get_cand_panel(lv_obj_t * obj)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ return pinyin_ime->cand_panel;
+}
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @return pointer to the Pinyin input method dictionary
+ */
+lv_pinyin_dict_t * lv_ime_pinyin_get_dict(lv_obj_t * obj)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ return pinyin_ime->dict;
+}
+
+/*=====================
+ * Other functions
+ *====================*/
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void lv_ime_pinyin_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
+{
+ LV_UNUSED(class_p);
+ LV_TRACE_OBJ_CREATE("begin");
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ uint16_t py_str_i = 0;
+ uint16_t btnm_i = 0;
+ for(btnm_i = 0; btnm_i < (LV_IME_PINYIN_CAND_TEXT_NUM + 3); btnm_i++) {
+ if(btnm_i == 0) {
+ lv_btnm_def_pinyin_sel_map[btnm_i] = "<";
+ }
+ else if(btnm_i == (LV_IME_PINYIN_CAND_TEXT_NUM + 1)) {
+ lv_btnm_def_pinyin_sel_map[btnm_i] = ">";
+ }
+ else if(btnm_i == (LV_IME_PINYIN_CAND_TEXT_NUM + 2)) {
+ lv_btnm_def_pinyin_sel_map[btnm_i] = "";
+ }
+ else {
+ lv_pinyin_cand_str[py_str_i][0] = ' ';
+ lv_btnm_def_pinyin_sel_map[btnm_i] = lv_pinyin_cand_str[py_str_i];
+ py_str_i++;
+ }
+ }
+
+ pinyin_ime->mode = LV_IME_PINYIN_MODE_K26;
+ pinyin_ime->py_page = 0;
+ pinyin_ime->ta_count = 0;
+ pinyin_ime->cand_num = 0;
+ lv_memset_00(pinyin_ime->input_char, sizeof(pinyin_ime->input_char));
+ lv_memset_00(pinyin_ime->py_num, sizeof(pinyin_ime->py_num));
+ lv_memset_00(pinyin_ime->py_pos, sizeof(pinyin_ime->py_pos));
+
+ lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
+
+ lv_obj_set_size(obj, LV_PCT(100), LV_PCT(55));
+ lv_obj_align(obj, LV_ALIGN_BOTTOM_MID, 0, 0);
+
+#if LV_IME_PINYIN_USE_DEFAULT_DICT
+ init_pinyin_dict(obj, lv_ime_pinyin_def_dict);
+#endif
+
+ /* Init pinyin_ime->cand_panel */
+ pinyin_ime->cand_panel = lv_btnmatrix_create(lv_scr_act());
+ lv_btnmatrix_set_map(pinyin_ime->cand_panel, (const char **)lv_btnm_def_pinyin_sel_map);
+ lv_obj_set_size(pinyin_ime->cand_panel, LV_PCT(100), LV_PCT(5));
+ lv_obj_add_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_HIDDEN);
+
+ lv_btnmatrix_set_one_checked(pinyin_ime->cand_panel, true);
+ lv_obj_clear_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_CLICK_FOCUSABLE);
+
+ /* Set cand_panel style*/
+ // Default style
+ lv_obj_set_style_bg_opa(pinyin_ime->cand_panel, LV_OPA_0, 0);
+ lv_obj_set_style_border_width(pinyin_ime->cand_panel, 0, 0);
+ lv_obj_set_style_pad_all(pinyin_ime->cand_panel, 8, 0);
+ lv_obj_set_style_pad_gap(pinyin_ime->cand_panel, 0, 0);
+ lv_obj_set_style_radius(pinyin_ime->cand_panel, 0, 0);
+ lv_obj_set_style_pad_gap(pinyin_ime->cand_panel, 0, 0);
+ lv_obj_set_style_base_dir(pinyin_ime->cand_panel, LV_BASE_DIR_LTR, 0);
+
+ // LV_PART_ITEMS style
+ lv_obj_set_style_radius(pinyin_ime->cand_panel, 12, LV_PART_ITEMS);
+ lv_obj_set_style_bg_color(pinyin_ime->cand_panel, lv_color_white(), LV_PART_ITEMS);
+ lv_obj_set_style_bg_opa(pinyin_ime->cand_panel, LV_OPA_0, LV_PART_ITEMS);
+ lv_obj_set_style_shadow_opa(pinyin_ime->cand_panel, LV_OPA_0, LV_PART_ITEMS);
+
+ // LV_PART_ITEMS | LV_STATE_PRESSED style
+ lv_obj_set_style_bg_opa(pinyin_ime->cand_panel, LV_OPA_COVER, LV_PART_ITEMS | LV_STATE_PRESSED);
+ lv_obj_set_style_bg_color(pinyin_ime->cand_panel, lv_color_white(), LV_PART_ITEMS | LV_STATE_PRESSED);
+
+ /* event handler */
+ lv_obj_add_event_cb(pinyin_ime->cand_panel, lv_ime_pinyin_cand_panel_event, LV_EVENT_VALUE_CHANGED, obj);
+ lv_obj_add_event_cb(obj, lv_ime_pinyin_style_change_event, LV_EVENT_STYLE_CHANGED, NULL);
+
+#if LV_IME_PINYIN_USE_K9_MODE
+ pinyin_ime->k9_input_str_len = 0;
+ pinyin_ime->k9_py_ll_pos = 0;
+ pinyin_ime->k9_legal_py_count = 0;
+ lv_memset_00(pinyin_ime->k9_input_str, LV_IME_PINYIN_K9_MAX_INPUT);
+
+ pinyin_k9_init_data(obj);
+
+ _lv_ll_init(&(pinyin_ime->k9_legal_py_ll), sizeof(ime_pinyin_k9_py_str_t));
+#endif
+}
+
+static void lv_ime_pinyin_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
+{
+ LV_UNUSED(class_p);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ if(lv_obj_is_valid(pinyin_ime->kb))
+ lv_obj_del(pinyin_ime->kb);
+
+ if(lv_obj_is_valid(pinyin_ime->cand_panel))
+ lv_obj_del(pinyin_ime->cand_panel);
+}
+
+static void lv_ime_pinyin_kb_event(lv_event_t * e)
+{
+ lv_event_code_t code = lv_event_get_code(e);
+ lv_obj_t * kb = lv_event_get_target(e);
+ lv_obj_t * obj = lv_event_get_user_data(e);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+#if LV_IME_PINYIN_USE_K9_MODE
+ static const char * k9_py_map[8] = {"abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
+#endif
+
+ if(code == LV_EVENT_VALUE_CHANGED) {
+ uint16_t btn_id = lv_btnmatrix_get_selected_btn(kb);
+ if(btn_id == LV_BTNMATRIX_BTN_NONE) return;
+
+ const char * txt = lv_btnmatrix_get_btn_text(kb, lv_btnmatrix_get_selected_btn(kb));
+ if(txt == NULL) return;
+
+#if LV_IME_PINYIN_USE_K9_MODE
+ if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K9) {
+ lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb);
+ uint16_t tmp_btn_str_len = strlen(pinyin_ime->input_char);
+ if((btn_id >= 16) && (tmp_btn_str_len > 0) && (btn_id < (16 + LV_IME_PINYIN_K9_CAND_TEXT_NUM))) {
+ tmp_btn_str_len = strlen(pinyin_ime->input_char);
+ lv_memset_00(pinyin_ime->input_char, sizeof(pinyin_ime->input_char));
+ strcat(pinyin_ime->input_char, txt);
+ pinyin_input_proc(obj);
+
+ for(int index = 0; index < (pinyin_ime->ta_count + tmp_btn_str_len); index++) {
+ lv_textarea_del_char(ta);
+ }
+
+ pinyin_ime->ta_count = tmp_btn_str_len;
+ pinyin_ime->k9_input_str_len = tmp_btn_str_len;
+ lv_textarea_add_text(ta, pinyin_ime->input_char);
+
+ return;
+ }
+ }
+#endif
+
+ if(strcmp(txt, "Enter") == 0 || strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) {
+ pinyin_ime_clear_data(obj);
+ lv_obj_add_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_HIDDEN);
+ }
+ else if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) {
+ // del input char
+ if(pinyin_ime->ta_count > 0) {
+ if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K26)
+ pinyin_ime->input_char[pinyin_ime->ta_count - 1] = '\0';
+#if LV_IME_PINYIN_USE_K9_MODE
+ else
+ pinyin_ime->k9_input_str[pinyin_ime->ta_count - 1] = '\0';
+#endif
+
+ pinyin_ime->ta_count = pinyin_ime->ta_count - 1;
+ if(pinyin_ime->ta_count <= 0) {
+ lv_obj_add_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_HIDDEN);
+#if LV_IME_PINYIN_USE_K9_MODE
+ lv_memset_00(lv_pinyin_k9_cand_str, sizeof(lv_pinyin_k9_cand_str));
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM], LV_SYMBOL_RIGHT"\0");
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 1], "\0");
+#endif
+ }
+ else if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) {
+ pinyin_input_proc(obj);
+ }
+#if LV_IME_PINYIN_USE_K9_MODE
+ else if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K9) {
+ pinyin_ime->k9_input_str_len = strlen(pinyin_ime->input_char) - 1;
+ pinyin_k9_get_legal_py(obj, pinyin_ime->k9_input_str, k9_py_map);
+ pinyin_k9_fill_cand(obj);
+ pinyin_input_proc(obj);
+ }
+#endif
+ }
+ }
+ else if((strcmp(txt, "ABC") == 0) || (strcmp(txt, "abc") == 0) || (strcmp(txt, "1#") == 0)) {
+ pinyin_ime->ta_count = 0;
+ lv_memset_00(pinyin_ime->input_char, sizeof(pinyin_ime->input_char));
+ return;
+ }
+ else if(strcmp(txt, LV_SYMBOL_KEYBOARD) == 0) {
+ if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) {
+ lv_ime_pinyin_set_mode(pinyin_ime, LV_IME_PINYIN_MODE_K9);
+ }
+ else {
+ lv_ime_pinyin_set_mode(pinyin_ime, LV_IME_PINYIN_MODE_K26);
+ lv_keyboard_set_mode(pinyin_ime->kb, LV_KEYBOARD_MODE_TEXT_LOWER);
+ }
+ pinyin_ime_clear_data(obj);
+ }
+ else if(strcmp(txt, LV_SYMBOL_OK) == 0) {
+ pinyin_ime_clear_data(obj);
+ }
+ else if((pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) && ((txt[0] >= 'a' && txt[0] <= 'z') || (txt[0] >= 'A' &&
+ txt[0] <= 'Z'))) {
+ strcat(pinyin_ime->input_char, txt);
+ pinyin_input_proc(obj);
+ pinyin_ime->ta_count++;
+ }
+#if LV_IME_PINYIN_USE_K9_MODE
+ else if((pinyin_ime->mode == LV_IME_PINYIN_MODE_K9) && (txt[0] >= 'a' && txt[0] <= 'z')) {
+ for(uint16_t i = 0; i < 8; i++) {
+ if((strcmp(txt, k9_py_map[i]) == 0) || (strcmp(txt, "abc ") == 0)) {
+ if(strcmp(txt, "abc ") == 0) pinyin_ime->k9_input_str_len += strlen(k9_py_map[i]) + 1;
+ else pinyin_ime->k9_input_str_len += strlen(k9_py_map[i]);
+ pinyin_ime->k9_input_str[pinyin_ime->ta_count] = 50 + i;
+
+ break;
+ }
+ }
+ pinyin_k9_get_legal_py(obj, pinyin_ime->k9_input_str, k9_py_map);
+ pinyin_k9_fill_cand(obj);
+ pinyin_input_proc(obj);
+ }
+ else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) {
+ pinyin_k9_cand_page_proc(obj, 0);
+ }
+ else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0) {
+ pinyin_k9_cand_page_proc(obj, 1);
+ }
+#endif
+ }
+}
+
+static void lv_ime_pinyin_cand_panel_event(lv_event_t * e)
+{
+ lv_event_code_t code = lv_event_get_code(e);
+ lv_obj_t * cand_panel = lv_event_get_target(e);
+ lv_obj_t * obj = (lv_obj_t *)lv_event_get_user_data(e);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ if(code == LV_EVENT_VALUE_CHANGED) {
+ uint32_t id = lv_btnmatrix_get_selected_btn(cand_panel);
+ if(id == 0) {
+ pinyin_page_proc(obj, 0);
+ return;
+ }
+ if(id == (LV_IME_PINYIN_CAND_TEXT_NUM + 1)) {
+ pinyin_page_proc(obj, 1);
+ return;
+ }
+
+ const char * txt = lv_btnmatrix_get_btn_text(cand_panel, id);
+ lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb);
+ uint16_t index = 0;
+ for(index = 0; index < pinyin_ime->ta_count; index++)
+ lv_textarea_del_char(ta);
+
+ lv_textarea_add_text(ta, txt);
+
+ pinyin_ime_clear_data(obj);
+ }
+}
+
+static void pinyin_input_proc(lv_obj_t * obj)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ pinyin_ime->cand_str = pinyin_search_matching(obj, pinyin_ime->input_char, &pinyin_ime->cand_num);
+ if(pinyin_ime->cand_str == NULL) {
+ return;
+ }
+
+ pinyin_ime->py_page = 0;
+
+ for(uint8_t i = 0; i < LV_IME_PINYIN_CAND_TEXT_NUM; i++) {
+ memset(lv_pinyin_cand_str[i], 0x00, sizeof(lv_pinyin_cand_str[i]));
+ lv_pinyin_cand_str[i][0] = ' ';
+ }
+
+ // fill buf
+ for(uint8_t i = 0; (i < pinyin_ime->cand_num && i < LV_IME_PINYIN_CAND_TEXT_NUM); i++) {
+ for(uint8_t j = 0; j < 3; j++) {
+ lv_pinyin_cand_str[i][j] = pinyin_ime->cand_str[i * 3 + j];
+ }
+ }
+
+ lv_obj_clear_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_HIDDEN);
+}
+
+static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+ uint16_t page_num = pinyin_ime->cand_num / LV_IME_PINYIN_CAND_TEXT_NUM;
+ uint16_t sur = pinyin_ime->cand_num % LV_IME_PINYIN_CAND_TEXT_NUM;
+
+ if(dir == 0) {
+ if(pinyin_ime->py_page) {
+ pinyin_ime->py_page--;
+ }
+ }
+ else {
+ if(sur == 0) {
+ page_num -= 1;
+ }
+ if(pinyin_ime->py_page < page_num) {
+ pinyin_ime->py_page++;
+ }
+ else return;
+ }
+
+ for(uint8_t i = 0; i < LV_IME_PINYIN_CAND_TEXT_NUM; i++) {
+ memset(lv_pinyin_cand_str[i], 0x00, sizeof(lv_pinyin_cand_str[i]));
+ lv_pinyin_cand_str[i][0] = ' ';
+ }
+
+ // fill buf
+ uint16_t offset = pinyin_ime->py_page * (3 * LV_IME_PINYIN_CAND_TEXT_NUM);
+ for(uint8_t i = 0; (i < pinyin_ime->cand_num && i < LV_IME_PINYIN_CAND_TEXT_NUM); i++) {
+ if((sur > 0) && (pinyin_ime->py_page == page_num)) {
+ if(i > sur)
+ break;
+ }
+ for(uint8_t j = 0; j < 3; j++) {
+ lv_pinyin_cand_str[i][j] = pinyin_ime->cand_str[offset + (i * 3) + j];
+ }
+ }
+}
+
+static void lv_ime_pinyin_style_change_event(lv_event_t * e)
+{
+ lv_event_code_t code = lv_event_get_code(e);
+ lv_obj_t * obj = lv_event_get_target(e);
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ if(code == LV_EVENT_STYLE_CHANGED) {
+ const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN);
+ lv_obj_set_style_text_font(pinyin_ime->cand_panel, font, 0);
+ }
+}
+
+static void init_pinyin_dict(lv_obj_t * obj, lv_pinyin_dict_t * dict)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ char headletter = 'a';
+ uint16_t offset_sum = 0;
+ uint16_t offset_count = 0;
+ uint16_t letter_calc = 0;
+
+ pinyin_ime->dict = dict;
+
+ for(uint16_t i = 0; ; i++) {
+ if((NULL == (dict[i].py)) || (NULL == (dict[i].py_mb))) {
+ headletter = dict[i - 1].py[0];
+ letter_calc = headletter - 'a';
+ pinyin_ime->py_num[letter_calc] = offset_count;
+ break;
+ }
+
+ if(headletter == (dict[i].py[0])) {
+ offset_count++;
+ }
+ else {
+ headletter = dict[i].py[0];
+ letter_calc = headletter - 'a';
+ pinyin_ime->py_num[letter_calc - 1] = offset_count;
+ offset_sum += offset_count;
+ pinyin_ime->py_pos[letter_calc] = offset_sum;
+
+ offset_count = 1;
+ }
+ }
+}
+
+static char * pinyin_search_matching(lv_obj_t * obj, char * py_str, uint16_t * cand_num)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ lv_pinyin_dict_t * cpHZ;
+ uint8_t index, len = 0, offset;
+ volatile uint8_t count = 0;
+
+ if(*py_str == '\0') return NULL;
+ if(*py_str == 'i') return NULL;
+ if(*py_str == 'u') return NULL;
+ if(*py_str == 'v') return NULL;
+
+ offset = py_str[0] - 'a';
+ len = strlen(py_str);
+
+ cpHZ = &pinyin_ime->dict[pinyin_ime->py_pos[offset]];
+ count = pinyin_ime->py_num[offset];
+
+ while(count--) {
+ for(index = 0; index < len; index++) {
+ if(*(py_str + index) != *((cpHZ->py) + index)) {
+ break;
+ }
+ }
+
+ // perfect match
+ if(len == 1 || index == len) {
+ // The Chinese character in UTF-8 encoding format is 3 bytes
+ * cand_num = strlen((const char *)(cpHZ->py_mb)) / 3;
+ return (char *)(cpHZ->py_mb);
+ }
+ cpHZ++;
+ }
+ return NULL;
+}
+
+static void pinyin_ime_clear_data(lv_obj_t * obj)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+#if LV_IME_PINYIN_USE_K9_MODE
+ if(pinyin_ime->mode == LV_IME_PINYIN_MODE_K9) {
+ pinyin_ime->k9_input_str_len = 0;
+ pinyin_ime->k9_py_ll_pos = 0;
+ pinyin_ime->k9_legal_py_count = 0;
+ lv_memset_00(pinyin_ime->k9_input_str, LV_IME_PINYIN_K9_MAX_INPUT);
+ lv_memset_00(lv_pinyin_k9_cand_str, sizeof(lv_pinyin_k9_cand_str));
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM], LV_SYMBOL_RIGHT"\0");
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 1], "\0");
+ }
+#endif
+
+ pinyin_ime->ta_count = 0;
+ lv_memset_00(lv_pinyin_cand_str, (sizeof(lv_pinyin_cand_str)));
+ lv_memset_00(pinyin_ime->input_char, sizeof(pinyin_ime->input_char));
+
+ lv_obj_add_flag(pinyin_ime->cand_panel, LV_OBJ_FLAG_HIDDEN);
+}
+
+#if LV_IME_PINYIN_USE_K9_MODE
+static void pinyin_k9_init_data(lv_obj_t * obj)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ uint16_t py_str_i = 0;
+ uint16_t btnm_i = 0;
+ for(btnm_i = 19; btnm_i < (LV_IME_PINYIN_K9_CAND_TEXT_NUM + 21); btnm_i++) {
+ if(py_str_i == LV_IME_PINYIN_K9_CAND_TEXT_NUM) {
+ strcpy(lv_pinyin_k9_cand_str[py_str_i], LV_SYMBOL_RIGHT"\0");
+ }
+ else if(py_str_i == LV_IME_PINYIN_K9_CAND_TEXT_NUM + 1) {
+ strcpy(lv_pinyin_k9_cand_str[py_str_i], "\0");
+ }
+ else {
+ strcpy(lv_pinyin_k9_cand_str[py_str_i], " \0");
+ }
+
+ lv_btnm_def_pinyin_k9_map[btnm_i] = lv_pinyin_k9_cand_str[py_str_i];
+ py_str_i++;
+ }
+
+ default_kb_ctrl_k9_map[0] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[4] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[5] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[9] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[10] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[14] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[15] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+ default_kb_ctrl_k9_map[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 16] = LV_KEYBOARD_CTRL_BTN_FLAGS | 1;
+}
+
+static void pinyin_k9_get_legal_py(lv_obj_t * obj, char * k9_input, const char * py9_map[])
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ uint16_t len = strlen(k9_input);
+
+ if((len == 0) || (len >= LV_IME_PINYIN_K9_MAX_INPUT)) {
+ return;
+ }
+
+ char py_comp[LV_IME_PINYIN_K9_MAX_INPUT] = {0};
+ int mark[LV_IME_PINYIN_K9_MAX_INPUT] = {0};
+ int index = 0;
+ int flag = 0;
+ int count = 0;
+
+ uint32_t ll_len = 0;
+ ime_pinyin_k9_py_str_t * ll_index = NULL;
+
+ ll_len = _lv_ll_get_len(&pinyin_ime->k9_legal_py_ll);
+ ll_index = _lv_ll_get_head(&pinyin_ime->k9_legal_py_ll);
+
+ while(index != -1) {
+ if(index == len) {
+ if(pinyin_k9_is_valid_py(obj, py_comp)) {
+ if((count >= ll_len) || (ll_len == 0)) {
+ ll_index = _lv_ll_ins_tail(&pinyin_ime->k9_legal_py_ll);
+ strcpy(ll_index->py_str, py_comp);
+ }
+ else if((count < ll_len)) {
+ strcpy(ll_index->py_str, py_comp);
+ ll_index = _lv_ll_get_next(&pinyin_ime->k9_legal_py_ll, ll_index);
+ }
+ count++;
+ }
+ index--;
+ }
+ else {
+ flag = mark[index];
+ if(flag < strlen(py9_map[k9_input[index] - '2'])) {
+ py_comp[index] = py9_map[k9_input[index] - '2'][flag];
+ mark[index] = mark[index] + 1;
+ index++;
+ }
+ else {
+ mark[index] = 0;
+ index--;
+ }
+ }
+ }
+
+ if(count > 0) {
+ pinyin_ime->ta_count++;
+ pinyin_ime->k9_legal_py_count = count;
+ }
+}
+
+/*true: visible; false: not visible*/
+static bool pinyin_k9_is_valid_py(lv_obj_t * obj, char * py_str)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ lv_pinyin_dict_t * cpHZ = NULL;
+ uint8_t index = 0, len = 0, offset = 0;
+ uint16_t ret = 1;
+ volatile uint8_t count = 0;
+
+ if(*py_str == '\0') return false;
+ if(*py_str == 'i') return false;
+ if(*py_str == 'u') return false;
+ if(*py_str == 'v') return false;
+
+ offset = py_str[0] - 'a';
+ len = strlen(py_str);
+
+ cpHZ = &pinyin_ime->dict[pinyin_ime->py_pos[offset]];
+ count = pinyin_ime->py_num[offset];
+
+ while(count--) {
+ for(index = 0; index < len; index++) {
+ if(*(py_str + index) != *((cpHZ->py) + index)) {
+ break;
+ }
+ }
+
+ // perfect match
+ if(len == 1 || index == len) {
+ return true;
+ }
+ cpHZ++;
+ }
+ return false;
+}
+
+static void pinyin_k9_fill_cand(lv_obj_t * obj)
+{
+ static uint16_t len = 0;
+ uint16_t index = 0, tmp_len = 0;
+ ime_pinyin_k9_py_str_t * ll_index = NULL;
+
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ tmp_len = pinyin_ime->k9_legal_py_count;
+
+ if(tmp_len != len) {
+ lv_memset_00(lv_pinyin_k9_cand_str, sizeof(lv_pinyin_k9_cand_str));
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM], LV_SYMBOL_RIGHT"\0");
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 1], "\0");
+ len = tmp_len;
+ }
+
+ ll_index = _lv_ll_get_head(&pinyin_ime->k9_legal_py_ll);
+ strcpy(pinyin_ime->input_char, ll_index->py_str);
+ while(ll_index) {
+ if((index >= LV_IME_PINYIN_K9_CAND_TEXT_NUM) || \
+ (index >= pinyin_ime->k9_legal_py_count))
+ break;
+
+ strcpy(lv_pinyin_k9_cand_str[index], ll_index->py_str);
+ ll_index = _lv_ll_get_next(&pinyin_ime->k9_legal_py_ll, ll_index); /*Find the next list*/
+ index++;
+ }
+ pinyin_ime->k9_py_ll_pos = index;
+
+ lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb);
+ for(index = 0; index < pinyin_ime->k9_input_str_len; index++) {
+ lv_textarea_del_char(ta);
+ }
+ pinyin_ime->k9_input_str_len = strlen(pinyin_ime->input_char);
+ lv_textarea_add_text(ta, pinyin_ime->input_char);
+}
+
+static void pinyin_k9_cand_page_proc(lv_obj_t * obj, uint16_t dir)
+{
+ lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
+
+ lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb);
+ uint16_t ll_len = _lv_ll_get_len(&pinyin_ime->k9_legal_py_ll);
+
+ if((ll_len > LV_IME_PINYIN_K9_CAND_TEXT_NUM) && (pinyin_ime->k9_legal_py_count > LV_IME_PINYIN_K9_CAND_TEXT_NUM)) {
+ ime_pinyin_k9_py_str_t * ll_index = NULL;
+ uint16_t tmp_btn_str_len = 0;
+ int count = 0;
+
+ ll_index = _lv_ll_get_head(&pinyin_ime->k9_legal_py_ll);
+ while(ll_index) {
+ if(count >= pinyin_ime->k9_py_ll_pos) break;
+
+ ll_index = _lv_ll_get_next(&pinyin_ime->k9_legal_py_ll, ll_index); /*Find the next list*/
+ count++;
+ }
+
+ if((NULL == ll_index) && (dir == 1)) return;
+
+ lv_memset_00(lv_pinyin_k9_cand_str, sizeof(lv_pinyin_k9_cand_str));
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM], LV_SYMBOL_RIGHT"\0");
+ strcpy(lv_pinyin_k9_cand_str[LV_IME_PINYIN_K9_CAND_TEXT_NUM + 1], "\0");
+
+ // next page
+ if(dir == 1) {
+ count = 0;
+ while(ll_index) {
+ if(count >= (LV_IME_PINYIN_K9_CAND_TEXT_NUM - 1))
+ break;
+
+ strcpy(lv_pinyin_k9_cand_str[count], ll_index->py_str);
+ ll_index = _lv_ll_get_next(&pinyin_ime->k9_legal_py_ll, ll_index); /*Find the next list*/
+ count++;
+ }
+ pinyin_ime->k9_py_ll_pos += count - 1;
+
+ }
+ // previous page
+ else {
+ count = LV_IME_PINYIN_K9_CAND_TEXT_NUM - 1;
+ ll_index = _lv_ll_get_prev(&pinyin_ime->k9_legal_py_ll, ll_index);
+ while(ll_index) {
+ if(count < 0) break;
+
+ strcpy(lv_pinyin_k9_cand_str[count], ll_index->py_str);
+ ll_index = _lv_ll_get_prev(&pinyin_ime->k9_legal_py_ll, ll_index); /*Find the previous list*/
+ count--;
+ }
+
+ if(pinyin_ime->k9_py_ll_pos > LV_IME_PINYIN_K9_CAND_TEXT_NUM)
+ pinyin_ime->k9_py_ll_pos -= 1;
+ }
+
+ lv_textarea_set_cursor_pos(ta, LV_TEXTAREA_CURSOR_LAST);
+ }
+}
+
+#endif /*LV_IME_PINYIN_USE_K9_MODE*/
+
+#endif /*LV_USE_IME_PINYIN*/
diff --git a/lib/lvgl/src/extra/others/ime/lv_ime_pinyin.h b/lib/lvgl/src/extra/others/ime/lv_ime_pinyin.h
new file mode 100644
index 0000000..001a27a
--- /dev/null
+++ b/lib/lvgl/src/extra/others/ime/lv_ime_pinyin.h
@@ -0,0 +1,140 @@
+/**
+ * @file lv_ime_pinyin.h
+ *
+ */
+#ifndef LV_IME_PINYIN_H
+#define LV_IME_PINYIN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "../../../lvgl.h"
+
+#if LV_USE_IME_PINYIN != 0
+
+/*********************
+ * DEFINES
+ *********************/
+#define LV_IME_PINYIN_K9_MAX_INPUT 7
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+typedef enum {
+ LV_IME_PINYIN_MODE_K26,
+ LV_IME_PINYIN_MODE_K9,
+} lv_ime_pinyin_mode_t;
+
+/*Data of pinyin_dict*/
+typedef struct {
+ const char * const py;
+ const char * const py_mb;
+} lv_pinyin_dict_t;
+
+/*Data of 9-key input(k9) mode*/
+typedef struct {
+ char py_str[7];
+} ime_pinyin_k9_py_str_t;
+
+/*Data of lv_ime_pinyin*/
+typedef struct {
+ lv_obj_t obj;
+ lv_obj_t * kb;
+ lv_obj_t * cand_panel;
+ lv_pinyin_dict_t * dict;
+ lv_ll_t k9_legal_py_ll;
+ char * cand_str; /* Candidate string */
+ char input_char[16]; /* Input box character */
+#if LV_IME_PINYIN_USE_K9_MODE
+ char k9_input_str[LV_IME_PINYIN_K9_MAX_INPUT]; /* 9-key input(k9) mode input string */
+ uint16_t k9_py_ll_pos; /* Current pinyin map pages(k9) */
+ uint16_t k9_legal_py_count; /* Count of legal Pinyin numbers(k9) */
+ uint16_t k9_input_str_len; /* 9-key input(k9) mode input string max len */
+#endif
+ uint16_t ta_count; /* The number of characters entered in the text box this time */
+ uint16_t cand_num; /* Number of candidates */
+ uint16_t py_page; /* Current pinyin map pages(k26) */
+ uint16_t py_num[26]; /* Number and length of Pinyin */
+ uint16_t py_pos[26]; /* Pinyin position */
+ uint8_t mode : 1; /* Set mode, 1: 26-key input(k26), 0: 9-key input(k9). Default: 1. */
+} lv_ime_pinyin_t;
+
+/***********************
+ * GLOBAL VARIABLES
+ ***********************/
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+lv_obj_t * lv_ime_pinyin_create(lv_obj_t * parent);
+
+/*=====================
+ * Setter functions
+ *====================*/
+
+/**
+ * Set the keyboard of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @param dict pointer to a Pinyin input method keyboard
+ */
+void lv_ime_pinyin_set_keyboard(lv_obj_t * obj, lv_obj_t * kb);
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @param dict pointer to a Pinyin input method dictionary
+ */
+void lv_ime_pinyin_set_dict(lv_obj_t * obj, lv_pinyin_dict_t * dict);
+
+/**
+ * Set mode, 26-key input(k26) or 9-key input(k9).
+ * @param obj pointer to a Pinyin input method object
+ * @param mode the mode from 'lv_ime_pinyin_mode_t'
+ */
+void lv_ime_pinyin_set_mode(lv_obj_t * obj, lv_ime_pinyin_mode_t mode);
+
+/*=====================
+ * Getter functions
+ *====================*/
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin IME object
+ * @return pointer to the Pinyin IME keyboard
+ */
+lv_obj_t * lv_ime_pinyin_get_kb(lv_obj_t * obj);
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @return pointer to the Pinyin input method candidate panel
+ */
+lv_obj_t * lv_ime_pinyin_get_cand_panel(lv_obj_t * obj);
+
+/**
+ * Set the dictionary of Pinyin input method.
+ * @param obj pointer to a Pinyin input method object
+ * @return pointer to the Pinyin input method dictionary
+ */
+lv_pinyin_dict_t * lv_ime_pinyin_get_dict(lv_obj_t * obj);
+
+/*=====================
+ * Other functions
+ *====================*/
+
+/**********************
+ * MACROS
+ **********************/
+
+#endif /*LV_IME_PINYIN*/
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*LV_USE_IME_PINYIN*/
diff --git a/lib/lvgl/src/extra/others/lv_others.h b/lib/lvgl/src/extra/others/lv_others.h
index 19afdde..106d85e 100644
--- a/lib/lvgl/src/extra/others/lv_others.h
+++ b/lib/lvgl/src/extra/others/lv_others.h
@@ -19,6 +19,7 @@ extern "C" {
#include "fragment/lv_fragment.h"
#include "imgfont/lv_imgfont.h"
#include "msg/lv_msg.h"
+#include "ime/lv_ime_pinyin.h"
/*********************
* DEFINES
diff --git a/lib/lvgl/src/extra/others/msg/lv_msg.c b/lib/lvgl/src/extra/others/msg/lv_msg.c
index 8fd434d..d54279c 100644
--- a/lib/lvgl/src/extra/others/msg/lv_msg.c
+++ b/lib/lvgl/src/extra/others/msg/lv_msg.c
@@ -94,6 +94,25 @@ void lv_msg_unsubscribe(void * s)
lv_mem_free(s);
}
+uint32_t lv_msg_unsubscribe_obj(uint32_t msg_id, lv_obj_t * obj)
+{
+ uint32_t cnt = 0;
+ sub_dsc_t * s = _lv_ll_get_head(&subs_ll);
+ while(s) {
+ sub_dsc_t * s_next = _lv_ll_get_next(&subs_ll, s);
+ if(s->callback == obj_notify_cb &&
+ (s->msg_id == LV_MSG_ID_ANY || s->msg_id == msg_id) &&
+ (obj == NULL || s->_priv_data == obj)) {
+ lv_msg_unsubscribe(s);
+ cnt++;
+ }
+
+ s = s_next;
+ }
+
+ return cnt;
+}
+
void lv_msg_send(uint32_t msg_id, const void * payload)
{
lv_msg_t m;
@@ -129,8 +148,6 @@ lv_msg_t * lv_event_get_msg(lv_event_t * e)
}
}
-
-
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/extra/others/msg/lv_msg.h b/lib/lvgl/src/extra/others/msg/lv_msg.h
index 11a55b5..0ac2f77 100644
--- a/lib/lvgl/src/extra/others/msg/lv_msg.h
+++ b/lib/lvgl/src/extra/others/msg/lv_msg.h
@@ -19,6 +19,8 @@ extern "C" {
/*********************
* DEFINES
*********************/
+#define LV_MSG_ID_ANY UINT32_MAX
+LV_EXPORT_CONST_INT(LV_MSG_ID_ANY);
/**********************
* TYPEDEFS
@@ -70,6 +72,14 @@ void * lv_msg_subsribe_obj(uint32_t msg_id, lv_obj_t * obj, void * user_data);
*/
void lv_msg_unsubscribe(void * s);
+/**
+ * Unsubscribe an object from a message ID
+ * @param msg_id the message ID to unsubcribe from or `LV_MSG_ID_ANY` for any message ID
+ * @param obj the object to unsubscribe or NULL for any object
+ * @return number of unsubscriptions
+ */
+uint32_t lv_msg_unsubscribe_obj(uint32_t msg_id, lv_obj_t * obj);
+
/**
* Send a message with a given ID and payload
* @param msg_id ID of the message to send
@@ -105,6 +115,17 @@ void * lv_msg_get_user_data(lv_msg_t * m);
*/
lv_msg_t * lv_event_get_msg(lv_event_t * e);
+/*Fix typo*/
+static inline void * lv_msg_subscribe(uint32_t msg_id, lv_msg_subscribe_cb_t cb, void * user_data)
+{
+ return lv_msg_subsribe(msg_id, cb, user_data);
+}
+
+static inline void * lv_msg_subscribe_obj(uint32_t msg_id, lv_obj_t * obj, void * user_data)
+{
+ return lv_msg_subsribe_obj(msg_id, obj, user_data);
+}
+
/**********************
* GLOBAL VARIABLES
**********************/
diff --git a/lib/lvgl/src/extra/others/snapshot/lv_snapshot.c b/lib/lvgl/src/extra/others/snapshot/lv_snapshot.c
index e9fa751..c668d01 100644
--- a/lib/lvgl/src/extra/others/snapshot/lv_snapshot.c
+++ b/lib/lvgl/src/extra/others/snapshot/lv_snapshot.c
@@ -45,7 +45,9 @@
*/
uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_img_cf_t cf)
{
+ LV_ASSERT_NULL(obj);
switch(cf) {
+ case LV_IMG_CF_TRUE_COLOR:
case LV_IMG_CF_TRUE_COLOR_ALPHA:
case LV_IMG_CF_ALPHA_1BIT:
case LV_IMG_CF_ALPHA_2BIT:
@@ -71,20 +73,22 @@ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_img_cf_t cf)
/** Take snapshot for object with its children, save image info to provided buffer.
*
- * @param obj The object to generate snapshot.
- * @param cf color format for generated image.
- * @param dsc image descriptor to store the image result.
- * @param buf the buffer to store image data.
- * @param buff_size provided buffer size in bytes.
+ * @param obj The object to generate snapshot.
+ * @param cf color format for generated image.
+ * @param dsc image descriptor to store the image result.
+ * @param buf the buffer to store image data.
+ * @param buf_size provided buffer size in bytes.
*
* @return LV_RES_OK on success, LV_RES_INV on error.
*/
-lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buff_size)
+lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buf_size)
{
- LV_ASSERT(dsc);
- LV_ASSERT(buf);
+ LV_ASSERT_NULL(obj);
+ LV_ASSERT_NULL(dsc);
+ LV_ASSERT_NULL(buf);
switch(cf) {
+ case LV_IMG_CF_TRUE_COLOR:
case LV_IMG_CF_TRUE_COLOR_ALPHA:
case LV_IMG_CF_ALPHA_1BIT:
case LV_IMG_CF_ALPHA_2BIT:
@@ -95,8 +99,8 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t *
return LV_RES_INV;
}
- if(lv_snapshot_buf_size_needed(obj, cf) > buff_size)
- return LV_RES_INV;
+ uint32_t buf_size_needed = lv_snapshot_buf_size_needed(obj, cf);
+ if(buf_size_needed == 0 || buf_size < buf_size_needed) return LV_RES_INV;
/*Width and height determine snapshot image size.*/
lv_coord_t w = lv_obj_get_width(obj);
@@ -109,7 +113,7 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t *
lv_obj_get_coords(obj, &snapshot_area);
lv_area_increase(&snapshot_area, ext_size, ext_size);
- lv_memset(buf, 0x00, buff_size);
+ lv_memset(buf, 0x00, buf_size);
lv_memset_00(dsc, sizeof(lv_img_dsc_t));
lv_disp_t * obj_disp = lv_obj_get_disp(obj);
@@ -124,7 +128,6 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t *
lv_memset_00(&fake_disp, sizeof(lv_disp_t));
fake_disp.driver = &driver;
-
lv_draw_ctx_t * draw_ctx = lv_mem_alloc(obj_disp->driver->draw_ctx_size);
LV_ASSERT_MALLOC(draw_ctx);
if(draw_ctx == NULL) return LV_RES_INV;
@@ -138,13 +141,14 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t *
lv_disp_t * refr_ori = _lv_refr_get_disp_refreshing();
_lv_refr_set_disp_refreshing(&fake_disp);
- lv_refr_obj(draw_ctx, obj);
+ lv_obj_redraw(draw_ctx, obj);
_lv_refr_set_disp_refreshing(refr_ori);
obj_disp->driver->draw_ctx_deinit(fake_disp.driver, draw_ctx);
lv_mem_free(draw_ctx);
dsc->data = buf;
+ dsc->data_size = buf_size_needed;
dsc->header.w = w;
dsc->header.h = h;
dsc->header.cf = cf;
@@ -160,20 +164,23 @@ lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t *
*/
lv_img_dsc_t * lv_snapshot_take(lv_obj_t * obj, lv_img_cf_t cf)
{
- uint32_t buff_size = lv_snapshot_buf_size_needed(obj, cf);
+ LV_ASSERT_NULL(obj);
+ uint32_t buf_size = lv_snapshot_buf_size_needed(obj, cf);
- void * buf = lv_mem_alloc(buff_size);
+ void * buf = lv_mem_alloc(buf_size);
+ LV_ASSERT_MALLOC(buf);
if(buf == NULL) {
return NULL;
}
lv_img_dsc_t * dsc = lv_mem_alloc(sizeof(lv_img_dsc_t));
+ LV_ASSERT_MALLOC(buf);
if(dsc == NULL) {
lv_mem_free(buf);
return NULL;
}
- if(lv_snapshot_take_to_buf(obj, cf, dsc, buf, buff_size) == LV_RES_INV) {
+ if(lv_snapshot_take_to_buf(obj, cf, dsc, buf, buf_size) == LV_RES_INV) {
lv_mem_free(buf);
lv_mem_free(dsc);
return NULL;
diff --git a/lib/lvgl/src/extra/others/snapshot/lv_snapshot.h b/lib/lvgl/src/extra/others/snapshot/lv_snapshot.h
index 6451926..bde9cc2 100644
--- a/lib/lvgl/src/extra/others/snapshot/lv_snapshot.h
+++ b/lib/lvgl/src/extra/others/snapshot/lv_snapshot.h
@@ -61,16 +61,15 @@ uint32_t lv_snapshot_buf_size_needed(lv_obj_t * obj, lv_img_cf_t cf);
/** Take snapshot for object with its children, save image info to provided buffer.
*
- * @param obj The object to generate snapshot.
- * @param cf color format for generated image.
- * @param dsc image descriptor to store the image result.
- * @param buff the buffer to store image data.
- * @param buff_size provided buffer size in bytes.
+ * @param obj The object to generate snapshot.
+ * @param cf color format for generated image.
+ * @param dsc image descriptor to store the image result.
+ * @param buf the buffer to store image data.
+ * @param buf_size provided buffer size in bytes.
*
* @return LV_RES_OK on success, LV_RES_INV on error.
*/
-lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buff_size);
-
+lv_res_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_img_cf_t cf, lv_img_dsc_t * dsc, void * buf, uint32_t buf_size);
/**********************
* MACROS
diff --git a/lib/lvgl/src/extra/themes/basic/lv_theme_basic.c b/lib/lvgl/src/extra/themes/basic/lv_theme_basic.c
index d342455..aed24bc 100644
--- a/lib/lvgl/src/extra/themes/basic/lv_theme_basic.c
+++ b/lib/lvgl/src/extra/themes/basic/lv_theme_basic.c
@@ -43,7 +43,6 @@ typedef struct {
#endif
} my_theme_styles_t;
-
/**********************
* STATIC PROTOTYPES
**********************/
@@ -77,7 +76,6 @@ static void style_init(void)
lv_style_set_bg_color(&styles->scr, COLOR_SCR);
lv_style_set_text_color(&styles->scr, COLOR_DIM);
-
style_init_reset(&styles->transp);
lv_style_set_bg_opa(&styles->transp, LV_OPA_TRANSP);
@@ -130,7 +128,6 @@ static void style_init(void)
#endif
}
-
/**********************
* GLOBAL FUNCTIONS
**********************/
@@ -169,7 +166,6 @@ lv_theme_t * lv_theme_basic_init(lv_disp_t * disp)
return (lv_theme_t *)&theme;
}
-
static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
{
LV_UNUSED(th);
diff --git a/lib/lvgl/src/extra/themes/default/lv_theme_default.c b/lib/lvgl/src/extra/themes/default/lv_theme_default.c
index 47392b0..5ca532e 100644
--- a/lib/lvgl/src/extra/themes/default/lv_theme_default.c
+++ b/lib/lvgl/src/extra/themes/default/lv_theme_default.c
@@ -179,7 +179,6 @@ static lv_color_t color_card;
static lv_color_t color_grey;
static bool inited = false;
-
/**********************
* MACROS
**********************/
@@ -188,7 +187,6 @@ static bool inited = false;
* STATIC FUNCTIONS
**********************/
-
static lv_color_t dark_color_filter_cb(const lv_color_filter_dsc_t * f, lv_color_t c, lv_opa_t opa)
{
LV_UNUSED(f);
@@ -628,7 +626,6 @@ static void style_init(void)
lv_style_set_transform_width(&styles->list_item_grow, PAD_DEF);
#endif
-
#if LV_USE_LED
style_init_reset(&styles->led);
lv_style_set_bg_opa(&styles->led, LV_OPA_COVER);
@@ -694,7 +691,6 @@ bool lv_theme_default_is_inited(void)
return LV_GC_ROOT(_lv_theme_default_styles) == NULL ? false : true;
}
-
static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
{
LV_UNUSED(th);
@@ -739,7 +735,6 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
}
#endif
-
#if LV_USE_CALENDAR
if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_calendar_class)) {
/*No style*/
@@ -978,7 +973,6 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
}
#endif
-
#if LV_USE_SPINNER
else if(lv_obj_check_type(obj, &lv_spinner_class)) {
lv_obj_add_style(obj, &styles->arc_indic, 0);
diff --git a/lib/lvgl/src/extra/themes/mono/lv_theme_mono.c b/lib/lvgl/src/extra/themes/mono/lv_theme_mono.c
index b249e76..a3bd1a4 100644
--- a/lib/lvgl/src/extra/themes/mono/lv_theme_mono.c
+++ b/lib/lvgl/src/extra/themes/mono/lv_theme_mono.c
@@ -52,7 +52,6 @@ typedef struct {
#endif
} my_theme_styles_t;
-
/**********************
* STATIC PROTOTYPES
**********************/
@@ -159,7 +158,6 @@ static void style_init(bool dark_bg, const lv_font_t * font)
#endif
}
-
/**********************
* GLOBAL FUNCTIONS
**********************/
@@ -196,7 +194,6 @@ lv_theme_t * lv_theme_mono_init(lv_disp_t * disp, bool dark_bg, const lv_font_t
return (lv_theme_t *)&theme;
}
-
static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
{
LV_UNUSED(th);
diff --git a/lib/lvgl/src/extra/widgets/animimg/lv_animimg.c b/lib/lvgl/src/extra/widgets/animimg/lv_animimg.c
index 135a8a4..072d02e 100644
--- a/lib/lvgl/src/extra/widgets/animimg/lv_animimg.c
+++ b/lib/lvgl/src/extra/widgets/animimg/lv_animimg.c
@@ -64,7 +64,7 @@ lv_obj_t * lv_animimg_create(lv_obj_t * parent)
return obj;
}
-void lv_animimg_set_src(lv_obj_t * obj, lv_img_dsc_t * dsc[], uint8_t num)
+void lv_animimg_set_src(lv_obj_t * obj, const void * dsc[], uint8_t num)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_animimg_t * animimg = (lv_animimg_t *)obj;
diff --git a/lib/lvgl/src/extra/widgets/animimg/lv_animimg.h b/lib/lvgl/src/extra/widgets/animimg/lv_animimg.h
index 6329494..fe039bb 100644
--- a/lib/lvgl/src/extra/widgets/animimg/lv_animimg.h
+++ b/lib/lvgl/src/extra/widgets/animimg/lv_animimg.h
@@ -37,11 +37,10 @@ typedef struct {
lv_img_t img;
lv_anim_t anim;
/*picture sequence */
- lv_img_dsc_t ** dsc;
+ const void ** dsc;
int8_t pic_count;
} lv_animimg_t;
-
/*Image parts*/
enum {
LV_ANIM_IMG_PART_MAIN,
@@ -69,7 +68,7 @@ lv_obj_t * lv_animimg_create(lv_obj_t * parent);
* @param dsc pointer to a series images
* @param num images' number
*/
-void lv_animimg_set_src(lv_obj_t * img, lv_img_dsc_t * dsc[], uint8_t num);
+void lv_animimg_set_src(lv_obj_t * img, const void * dsc[], uint8_t num);
/**
* Startup the image animation.
diff --git a/lib/lvgl/src/extra/widgets/calendar/lv_calendar.c b/lib/lvgl/src/extra/widgets/calendar/lv_calendar.c
index b806d25..16d33c8 100644
--- a/lib/lvgl/src/extra/widgets/calendar/lv_calendar.c
+++ b/lib/lvgl/src/extra/widgets/calendar/lv_calendar.c
@@ -232,7 +232,6 @@ lv_res_t lv_calendar_get_pressed_date(const lv_obj_t * obj, lv_calendar_date_t *
return LV_RES_OK;
}
-
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.c b/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.c
index 5e8f90d..95167f3 100644
--- a/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.c
+++ b/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.c
@@ -66,6 +66,45 @@ lv_obj_t * lv_calendar_header_dropdown_create(lv_obj_t * parent)
return obj;
}
+void lv_calendar_header_dropdown_set_year_list(lv_obj_t * parent, const char * years_list)
+{
+ bool child_found = false;
+ uint32_t idx = 0;
+ lv_obj_t * child = NULL;
+
+ const uint32_t calendar_child_count = lv_obj_get_child_cnt(parent);
+
+ /* Search for the header dropdown */
+ for(idx = 0; idx < calendar_child_count; idx++) {
+ child = lv_obj_get_child(parent, idx);
+ if(lv_obj_check_type(child, &lv_calendar_header_dropdown_class)) {
+ child_found = true;
+ break;
+ }
+ }
+
+ if(!child_found) return;
+
+ child_found = false;
+ const uint32_t header_child_count = lv_obj_get_child_cnt(child);
+
+ /* Search for the year dropdown */
+ for(idx = 0; idx < header_child_count; idx++) {
+ child = lv_obj_get_child(child, idx);
+ if(lv_obj_check_type(child, &lv_dropdown_class)) {
+ child_found = true;
+ break;
+ }
+ }
+
+ if(!child_found) return;
+
+ lv_dropdown_clear_options(child);
+ lv_dropdown_set_options(child, years_list);
+
+ lv_obj_invalidate(parent);
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -120,7 +159,14 @@ static void year_event_cb(lv_event_t * e)
const lv_calendar_date_t * d;
d = lv_calendar_get_showed_date(calendar);
lv_calendar_date_t newd = *d;
- newd.year = 2023 - sel;
+
+ /* Get the first year on the options list
+ * NOTE: Assumes the first 4 digits in the option list are numbers */
+ const char * year_p = lv_dropdown_get_options(dropdown);
+ const uint32_t year = (year_p[0] - '0') * 1000 + (year_p[1] - '0') * 100 + (year_p[2] - '0') * 10 +
+ (year_p[3] - '0');
+
+ newd.year = year - sel;
lv_calendar_set_showed_date(calendar, newd.year, newd.month);
}
@@ -132,7 +178,14 @@ static void value_changed_event_cb(lv_event_t * e)
const lv_calendar_date_t * cur_date = lv_calendar_get_showed_date(calendar);
lv_obj_t * year_dd = lv_obj_get_child(header, 0);
- lv_dropdown_set_selected(year_dd, 2023 - cur_date->year);
+
+ /* Get the first year on the options list
+ * NOTE: Assumes the first 4 digits in the option list are numbers */
+ const char * year_p = lv_dropdown_get_options(year_dd);
+ const uint32_t year = (year_p[0] - '0') * 1000 + (year_p[1] - '0') * 100 + (year_p[2] - '0') * 10 +
+ (year_p[3] - '0');
+
+ lv_dropdown_set_selected(year_dd, year - cur_date->year);
lv_obj_t * month_dd = lv_obj_get_child(header, 1);
lv_dropdown_set_selected(month_dd, cur_date->month - 1);
diff --git a/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.h b/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.h
index fca2197..e673a31 100644
--- a/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.h
+++ b/lib/lvgl/src/extra/widgets/calendar/lv_calendar_header_dropdown.h
@@ -36,6 +36,15 @@ extern const lv_obj_class_t lv_calendar_header_dropdown_class;
*/
lv_obj_t * lv_calendar_header_dropdown_create(lv_obj_t * parent);
+/**
+ * Sets a custom calendar year list
+ * @param parent pointer to a calendar object
+ * @param years_list pointer to an const char array with the years list, see lv_dropdown set_options for more information.
+ * E.g. `const char * years = "2023\n2022\n2021\n2020\n2019"
+ * Only the pointer will be saved so this variable can't be local which will be destroyed later.
+ */
+void lv_calendar_header_dropdown_set_year_list(lv_obj_t * parent, const char * years_list);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/extra/widgets/chart/lv_chart.c b/lib/lvgl/src/extra/widgets/chart/lv_chart.c
index a1b6629..0c8aeef 100644
--- a/lib/lvgl/src/extra/widgets/chart/lv_chart.c
+++ b/lib/lvgl/src/extra/widgets/chart/lv_chart.c
@@ -181,7 +181,6 @@ void lv_chart_set_div_line_count(lv_obj_t * obj, uint8_t hdiv, uint8_t vdiv)
lv_obj_invalidate(obj);
}
-
void lv_chart_set_zoom_x(lv_obj_t * obj, uint16_t zoom_x)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -261,10 +260,10 @@ uint16_t lv_chart_get_point_count(const lv_obj_t * obj)
uint16_t lv_chart_get_x_start_point(const lv_obj_t * obj, lv_chart_series_t * ser)
{
- LV_UNUSED(obj);
LV_ASSERT_NULL(ser);
+ lv_chart_t * chart = (lv_chart_t *)obj;
- return ser->start_point;
+ return chart->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
}
void lv_chart_get_point_pos_by_id(lv_obj_t * obj, lv_chart_series_t * ser, uint16_t id, lv_point_t * p_out)
@@ -292,28 +291,34 @@ void lv_chart_get_point_pos_by_id(lv_obj_t * obj, lv_chart_series_t * ser, uint1
}
else if(chart->type == LV_CHART_TYPE_BAR) {
uint32_t ser_cnt = _lv_ll_get_len(&chart->series_ll);
- int32_t ser_gap = ((int32_t)lv_obj_get_style_pad_column(obj,
- LV_PART_ITEMS) * chart->zoom_x) >> 8; /*Gap between the column on the ~same X*/
- int32_t block_gap = ((int32_t)lv_obj_get_style_pad_column(obj,
- LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/
- lv_coord_t block_w = (w - ((chart->point_cnt - 1) * block_gap)) / chart->point_cnt;
- lv_coord_t col_w = block_w / ser_cnt;
+ /*Gap between the column on the X tick*/
+ int32_t ser_gap = ((int32_t)lv_obj_get_style_pad_column(obj, LV_PART_ITEMS) * chart->zoom_x) >> 8;
- p_out->x = (int32_t)((int32_t)w * id) / chart->point_cnt;
+ /*Gap between the columns on adjacent X ticks*/
+ int32_t block_gap = ((int32_t)lv_obj_get_style_pad_column(obj, LV_PART_MAIN) * chart->zoom_x) >> 8;
+
+ lv_coord_t block_w = (w - ((chart->point_cnt - 1) * block_gap)) / chart->point_cnt;
lv_chart_series_t * ser_i = NULL;
+ uint32_t ser_idx = 0;
_LV_LL_READ_BACK(&chart->series_ll, ser_i) {
if(ser_i == ser) break;
- p_out->x += col_w;
+ ser_idx++;
}
- p_out->x += (col_w - ser_gap) / 2;
+ p_out->x = (int32_t)((int32_t)(w + block_gap) * id) / chart->point_cnt;
+ p_out->x += block_w * ser_idx / ser_cnt;
+
+ lv_coord_t col_w = (block_w - (ser_gap * (ser_cnt - 1))) / ser_cnt;
+ p_out->x += col_w / 2;
}
lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
p_out->x += lv_obj_get_style_pad_left(obj, LV_PART_MAIN) + border_width;
p_out->x -= lv_obj_get_scroll_left(obj);
+ uint32_t start_point = lv_chart_get_x_start_point(obj, ser);
+ id = ((int32_t)start_point + id) % chart->point_cnt;
int32_t temp_y = 0;
temp_y = (int32_t)((int32_t)ser->y_points[id] - chart->ymin[ser->y_axis_sec]) * h;
temp_y = temp_y / (chart->ymax[ser->y_axis_sec] - chart->ymin[ser->y_axis_sec]);
@@ -383,6 +388,7 @@ void lv_chart_remove_series(lv_obj_t * obj, lv_chart_series_t * series)
lv_chart_t * chart = (lv_chart_t *)obj;
if(!series->y_ext_buf_assigned && series->y_points) lv_mem_free(series->y_points);
+ if(!series->x_ext_buf_assigned && series->x_points) lv_mem_free(series->x_points);
_lv_ll_remove(&chart->series_ll, series);
lv_mem_free(series);
@@ -399,7 +405,6 @@ void lv_chart_hide_series(lv_obj_t * chart, lv_chart_series_t * series, bool hid
lv_chart_refresh(chart);
}
-
void lv_chart_set_series_color(lv_obj_t * chart, lv_chart_series_t * series, lv_color_t color)
{
LV_ASSERT_OBJ(chart, MY_CLASS);
@@ -476,7 +481,6 @@ void lv_chart_set_cursor_pos(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_po
lv_chart_refresh(chart);
}
-
/**
* Set the coordinate of the cursor with respect
* to the origin of series area of the chart.
@@ -514,7 +518,6 @@ lv_point_t lv_chart_get_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * curso
* Set/Get value(s)
*====================*/
-
void lv_chart_set_all_value(lv_obj_t * obj, lv_chart_series_t * ser, lv_coord_t value)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -904,7 +907,7 @@ static void draw_series_line(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
if(LV_MIN(point_w, point_h) > line_dsc_default.width / 2) line_dsc_default.raw_end = 1;
if(line_dsc_default.width == 1) line_dsc_default.raw_end = 1;
- /*If there are more points than pixels draw only vertical lines*/
+ /*If there are at least as much points as pixels then draw only vertical lines*/
bool crowded_mode = chart->point_cnt >= w ? true : false;
/*Go through all data lines*/
@@ -913,7 +916,7 @@ static void draw_series_line(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
line_dsc_default.color = ser->color;
point_dsc_default.bg_color = ser->color;
- lv_coord_t start_point = chart->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
+ lv_coord_t start_point = lv_chart_get_x_start_point(obj, ser);
p1.x = x_ofs;
p2.x = x_ofs;
@@ -1075,7 +1078,7 @@ static void draw_series_scatter(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
line_dsc_default.color = ser->color;
point_dsc_default.bg_color = ser->color;
- lv_coord_t start_point = chart->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
+ lv_coord_t start_point = lv_chart_get_x_start_point(obj, ser);
p1.x = x_ofs;
p2.x = x_ofs;
@@ -1182,7 +1185,6 @@ static void draw_series_bar(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
const lv_area_t * clip_area_ori = draw_ctx->clip_area;
draw_ctx->clip_area = &clip_area;
-
lv_chart_t * chart = (lv_chart_t *)obj;
uint16_t i;
@@ -1197,11 +1199,14 @@ static void draw_series_bar(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
int32_t block_gap = ((int32_t)lv_obj_get_style_pad_column(obj,
LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/
lv_coord_t block_w = (w - ((chart->point_cnt - 1) * block_gap)) / chart->point_cnt;
- lv_coord_t col_w = block_w / ser_cnt;
int32_t ser_gap = ((int32_t)lv_obj_get_style_pad_column(obj,
- LV_PART_ITEMS) * chart->zoom_x) >> 8; /*Gap between the column on the ~same X*/
- lv_coord_t x_ofs = pad_left - lv_obj_get_scroll_left(obj);
- lv_coord_t y_ofs = pad_top - lv_obj_get_scroll_top(obj);
+ LV_PART_ITEMS) * chart->zoom_x) >> 8; /*Gap between the columns on the ~same X*/
+ lv_coord_t col_w = (block_w - (ser_cnt - 1) * ser_gap) / ser_cnt;
+ if(col_w < 1) col_w = 1;
+
+ lv_coord_t border_w = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
+ lv_coord_t x_ofs = pad_left - lv_obj_get_scroll_left(obj) + border_w;
+ lv_coord_t y_ofs = pad_top - lv_obj_get_scroll_top(obj) + border_w;
lv_draw_rect_dsc_t col_dsc;
lv_draw_rect_dsc_init(&col_dsc);
@@ -1220,18 +1225,19 @@ static void draw_series_bar(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
/*Go through all points*/
for(i = 0; i < chart->point_cnt; i++) {
- lv_coord_t x_act = (int32_t)((int32_t)(w + block_gap) * i) / (chart->point_cnt) + obj->coords.x1 + x_ofs;
+ lv_coord_t x_act = (int32_t)((int32_t)(w - block_w) * i) / (chart->point_cnt - 1) + obj->coords.x1 + x_ofs;
part_draw_dsc.id = i;
/*Draw the current point of all data line*/
_LV_LL_READ_BACK(&chart->series_ll, ser) {
if(ser->hidden) continue;
- lv_coord_t start_point = chart->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
+
+ lv_coord_t start_point = lv_chart_get_x_start_point(obj, ser);
col_a.x1 = x_act;
- col_a.x2 = col_a.x1 + col_w - ser_gap - 1;
- x_act += col_w;
+ col_a.x2 = col_a.x1 + col_w - 1;
+ x_act += col_w + ser_gap;
if(col_a.x2 < clip_area.x1) continue;
if(col_a.x1 > clip_area.x2) break;
@@ -1325,7 +1331,8 @@ static void draw_cursors(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
cy += obj->coords.y1;
lv_area_t point_area;
- if(point_w && point_h) {
+ bool draw_point = point_w && point_h;
+ if(draw_point) {
point_area.x1 = cx - point_w;
point_area.x2 = cx + point_w;
point_area.y1 = cy - point_h;
@@ -1345,7 +1352,11 @@ static void draw_cursors(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
lv_draw_line(draw_ctx, &line_dsc_tmp, &p1, &p2);
- lv_draw_rect(draw_ctx, &point_dsc_tmp, &point_area);
+
+ if(draw_point) {
+ lv_draw_rect(draw_ctx, &point_dsc_tmp, &point_area);
+ }
+
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
}
@@ -1357,7 +1368,11 @@ static void draw_cursors(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
lv_draw_line(draw_ctx, &line_dsc_tmp, &p1, &p2);
- lv_draw_rect(draw_ctx, &point_dsc_tmp, &point_area);
+
+ if(draw_point) {
+ lv_draw_rect(draw_ctx, &point_dsc_tmp, &point_area);
+ }
+
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
}
}
@@ -1371,8 +1386,10 @@ static void draw_y_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
lv_chart_tick_dsc_t * t = get_tick_gsc(obj, axis);
- if(t->major_cnt <= 1) return;
if(!t->label_en && !t->major_len && !t->minor_len) return;
+ if(t->major_cnt <= 1) return;
+ uint32_t total_tick_num = (t->major_cnt - 1) * (t->minor_cnt);
+ if(total_tick_num == 0) return;
uint8_t sec_axis = axis == LV_CHART_AXIS_PRIMARY_Y ? 0 : 1;
@@ -1422,7 +1439,6 @@ static void draw_y_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
part_draw_dsc.line_dsc = &line_dsc;
part_draw_dsc.label_dsc = &label_dsc;
- uint32_t total_tick_num = (t->major_cnt - 1) * (t->minor_cnt);
for(i = 0; i <= total_tick_num; i++) {
/*draw a line at moving y position*/
p2.y = p1.y = y_ofs + (int32_t)((int32_t)(h - line_dsc.width) * i) / total_tick_num;
@@ -1503,6 +1519,8 @@ static void draw_x_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
lv_chart_tick_dsc_t * t = get_tick_gsc(obj, axis);
if(t->major_cnt <= 1) return;
if(!t->label_en && !t->major_len && !t->minor_len) return;
+ uint32_t total_tick_num = (t->major_cnt - 1) * (t->minor_cnt);
+ if(total_tick_num == 0) return;
uint32_t i;
lv_point_t p1;
@@ -1511,7 +1529,6 @@ static void draw_x_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
lv_coord_t pad_left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN) + lv_obj_get_style_border_width(obj, LV_PART_MAIN);
lv_coord_t w = ((int32_t)lv_obj_get_content_width(obj) * chart->zoom_x) >> 8;
-
lv_draw_label_dsc_t label_dsc;
lv_draw_label_dsc_init(&label_dsc);
lv_obj_init_draw_label_dsc(obj, LV_PART_TICKS, &label_dsc);
@@ -1521,16 +1538,16 @@ static void draw_x_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
lv_coord_t label_gap;
if(axis == LV_CHART_AXIS_PRIMARY_X) {
label_gap = t->label_en ? lv_obj_get_style_pad_bottom(obj, LV_PART_TICKS) : 0;
- y_ofs = obj->coords.y2;
+ y_ofs = obj->coords.y2 + 1;
}
else {
label_gap = t->label_en ? lv_obj_get_style_pad_top(obj, LV_PART_TICKS) : 0;
- y_ofs = obj->coords.y1;
+ y_ofs = obj->coords.y1 - 1;
}
if(axis == LV_CHART_AXIS_PRIMARY_X) {
if(y_ofs > draw_ctx->clip_area->y2) return;
- if(y_ofs + label_gap + label_dsc.font->line_height + t->major_len < draw_ctx->clip_area->y1) return;
+ if(y_ofs + label_gap + label_dsc.font->line_height + t->major_len < draw_ctx->clip_area->y1) return;
}
lv_draw_line_dsc_t line_dsc;
@@ -1555,12 +1572,12 @@ static void draw_x_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
int32_t block_gap = ((int32_t)lv_obj_get_style_pad_column(obj,
LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the columns on ~adjacent X*/
lv_coord_t block_w = (w + block_gap) / (chart->point_cnt);
+
x_ofs += (block_w - block_gap) / 2;
w -= block_w - block_gap;
}
p1.y = y_ofs;
- uint32_t total_tick_num = (t->major_cnt - 1) * t->minor_cnt;
for(i = 0; i <= total_tick_num; i++) { /*one extra loop - it may not exist in the list, empty label*/
bool major = false;
if(i % t->minor_cnt == 0) major = true;
@@ -1623,7 +1640,6 @@ static void draw_x_ticks(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, lv_chart_axis
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
}
-
if(p1.x + line_dsc.width / 2 >= obj->coords.x1 &&
p2.x - line_dsc.width / 2 <= obj->coords.x2) {
lv_draw_line(draw_ctx, &line_dsc, &p1, &p2);
@@ -1704,11 +1720,13 @@ static void invalidate_point(lv_obj_t * obj, uint16_t i)
lv_area_t col_a;
int32_t block_gap = ((int32_t)lv_obj_get_style_pad_column(obj,
LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/
+
lv_coord_t block_w = (w + block_gap) / chart->point_cnt;
+ lv_coord_t bwidth = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
lv_coord_t x_act;
x_act = (int32_t)((int32_t)(block_w) * i) ;
- x_act += obj->coords.x1 + lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+ x_act += obj->coords.x1 + bwidth + lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
lv_obj_get_coords(obj, &col_a);
col_a.x1 = x_act - scroll_left;
@@ -1785,5 +1803,4 @@ lv_chart_tick_dsc_t * get_tick_gsc(lv_obj_t * obj, lv_chart_axis_t axis)
}
}
-
#endif
diff --git a/lib/lvgl/src/extra/widgets/chart/lv_chart.h b/lib/lvgl/src/extra/widgets/chart/lv_chart.h
index 394c0e7..ed311ab 100644
--- a/lib/lvgl/src/extra/widgets/chart/lv_chart.h
+++ b/lib/lvgl/src/extra/widgets/chart/lv_chart.h
@@ -98,7 +98,6 @@ typedef struct {
uint32_t label_en : 1;
} lv_chart_tick_dsc_t;
-
typedef struct {
lv_obj_t obj;
lv_ll_t series_ll; /**< Linked list for the series (stores lv_chart_series_t)*/
@@ -315,8 +314,6 @@ void lv_chart_set_x_start_point(lv_obj_t * obj, lv_chart_series_t * ser, uint16_
*/
lv_chart_series_t * lv_chart_get_series_next(const lv_obj_t * chart, const lv_chart_series_t * ser);
-
-
/*=====================
* Cursor
*====================*/
diff --git a/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.c b/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.c
index 3fb7128..d0e157d 100644
--- a/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.c
+++ b/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.c
@@ -160,7 +160,6 @@ void lv_colorwheel_set_mode_fixed(lv_obj_t * obj, bool fixed)
* Getter functions
*====================*/
-
/**
* Get the current selected hsv of a color wheel.
* @param colorwheel pointer to color wheel object
@@ -536,8 +535,6 @@ static void lv_colorwheel_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
}
-
-
static void next_color_mode(lv_obj_t * obj)
{
lv_colorwheel_t * colorwheel = (lv_colorwheel_t *)obj;
@@ -613,7 +610,6 @@ static lv_res_t double_click_reset(lv_obj_t * obj)
* We replace division by 255 by a division by 256, a.k.a a shift right by 8 bits.
* This is wrong, but since this is only used to compute the pixels on the screen and not the final color, it's ok.
*/
-static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t * r, uint8_t * g, uint8_t * b);
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t * r, uint8_t * g, uint8_t * b)
{
if(!s) {
@@ -652,6 +648,11 @@ static lv_color_t angle_to_mode_color_fast(lv_obj_t * obj, uint16_t angle)
uint8_t r = 0, g = 0, b = 0;
static uint16_t h = 0;
static uint8_t s = 0, v = 0, m = 255;
+ static uint16_t angle_saved = 0xffff;
+
+ /*If the angle is different recalculate scaling*/
+ if(angle_saved != angle) m = 255;
+ angle_saved = angle;
switch(ext->mode) {
default:
diff --git a/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.h b/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.h
index e9c9d92..4494bc5 100644
--- a/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.h
+++ b/lib/lvgl/src/extra/widgets/colorwheel/lv_colorwheel.h
@@ -32,7 +32,6 @@ enum {
};
typedef uint8_t lv_colorwheel_mode_t;
-
/*Data of color picker*/
typedef struct {
lv_obj_t obj;
@@ -139,4 +138,3 @@ bool lv_colorwheel_get_color_mode_fixed(lv_obj_t * obj);
#endif
#endif /*LV_COLORWHEEL_H*/
-
diff --git a/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.c b/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.c
index 00c3011..6ef5d6a 100644
--- a/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.c
+++ b/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.c
@@ -112,7 +112,6 @@ void lv_imgbtn_set_state(lv_obj_t * obj, lv_imgbtn_state_t state)
* Getter functions
*====================*/
-
/**
* Get the left image in a given state
* @param obj pointer to an image button object
@@ -156,7 +155,6 @@ const void * lv_imgbtn_get_src_right(lv_obj_t * obj, lv_imgbtn_state_t state)
return imgbtn->img_src_right[state];
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -173,7 +171,6 @@ static void lv_imgbtn_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj
imgbtn->act_cf = LV_IMG_CF_UNKNOWN;
}
-
static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e)
{
LV_UNUSED(class_p);
@@ -205,6 +202,15 @@ static void lv_imgbtn_event(const lv_obj_class_t * class_p, lv_event_t * e)
p->x = LV_MAX(p->x, header.w);
}
}
+ /*Sent when the widget is checked due to LV_OBJ_FLAG_CHECKABLE */
+ else if(code == LV_EVENT_VALUE_CHANGED) {
+ if(lv_obj_has_state(obj, LV_STATE_CHECKED)) {
+ lv_imgbtn_set_state(obj, LV_IMGBTN_STATE_CHECKED_RELEASED);
+ }
+ else {
+ lv_imgbtn_set_state(obj, LV_IMGBTN_STATE_RELEASED);
+ }
+ }
}
static void draw_main(lv_event_t * e)
@@ -266,7 +272,6 @@ static void draw_main(lv_event_t * e)
clip_area_center.y1 = coords.y1;
clip_area_center.y2 = coords.y2;
-
bool comm_res;
comm_res = _lv_area_intersect(&clip_area_center, &clip_area_center, draw_ctx->clip_area);
if(comm_res) {
diff --git a/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.h b/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.h
index 597faea..9258a90 100644
--- a/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.h
+++ b/lib/lvgl/src/extra/widgets/imgbtn/lv_imgbtn.h
@@ -77,7 +77,6 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * parent);
void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src_left, const void * src_mid,
const void * src_right);
-
/**
* Use this function instead of `lv_obj_add/clear_state` to set a state manually
* @param imgbtn pointer to an image button object
@@ -113,7 +112,6 @@ const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_imgbtn_state_t state
*/
const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
-
/*=====================
* Other functions
*====================*/
diff --git a/lib/lvgl/src/extra/widgets/keyboard/lv_keyboard.c b/lib/lvgl/src/extra/widgets/keyboard/lv_keyboard.c
index 8e052e3..cbb5e1c 100644
--- a/lib/lvgl/src/extra/widgets/keyboard/lv_keyboard.c
+++ b/lib/lvgl/src/extra/widgets/keyboard/lv_keyboard.c
@@ -73,7 +73,7 @@ static const lv_btnmatrix_ctrl_t default_kb_ctrl_uc_map[] = {
};
static const char * const default_kb_map_spec[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", LV_SYMBOL_BACKSPACE, "\n",
- "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n",
+ "abc", "+", "&", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n",
"\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n",
LV_SYMBOL_KEYBOARD, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""
};
diff --git a/lib/lvgl/src/extra/widgets/led/lv_led.c b/lib/lvgl/src/extra/widgets/led/lv_led.c
index 513ecfb..88b7b87 100644
--- a/lib/lvgl/src/extra/widgets/led/lv_led.c
+++ b/lib/lvgl/src/extra/widgets/led/lv_led.c
@@ -178,6 +178,7 @@ static void lv_led_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_obj_init_draw_rect_dsc(obj, LV_PART_MAIN, &rect_dsc);
/*Use the original colors brightness to modify color->led*/
+ rect_dsc.bg_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.bg_color));
rect_dsc.bg_grad.stops[0].color = lv_color_mix(led->color, lv_color_black(),
lv_color_brightness(rect_dsc.bg_grad.stops[0].color));
rect_dsc.bg_grad.stops[1].color = lv_color_mix(led->color, lv_color_black(),
@@ -187,6 +188,7 @@ static void lv_led_event(const lv_obj_class_t * class_p, lv_event_t * e)
rect_dsc.outline_color = lv_color_mix(led->color, lv_color_black(), lv_color_brightness(rect_dsc.outline_color));
/*Mix. the color with black proportionally with brightness*/
+ rect_dsc.bg_color = lv_color_mix(rect_dsc.bg_color, lv_color_black(), led->bright);
rect_dsc.bg_grad.stops[0].color = lv_color_mix(rect_dsc.bg_grad.stops[0].color, lv_color_black(), led->bright);
rect_dsc.bg_grad.stops[1].color = lv_color_mix(rect_dsc.bg_grad.stops[1].color, lv_color_black(), led->bright);
rect_dsc.border_color = lv_color_mix(rect_dsc.border_color, lv_color_black(), led->bright);
diff --git a/lib/lvgl/src/extra/widgets/led/lv_led.h b/lib/lvgl/src/extra/widgets/led/lv_led.h
index 368bcd2..4ad1ee3 100644
--- a/lib/lvgl/src/extra/widgets/led/lv_led.h
+++ b/lib/lvgl/src/extra/widgets/led/lv_led.h
@@ -17,7 +17,6 @@ extern "C" {
#if LV_USE_LED
-
/*********************
* DEFINES
*********************/
@@ -112,5 +111,4 @@ uint8_t lv_led_get_brightness(const lv_obj_t * obj);
} /*extern "C"*/
#endif
-
#endif /*LV_LED_H*/
diff --git a/lib/lvgl/src/extra/widgets/menu/lv_menu.c b/lib/lvgl/src/extra/widgets/menu/lv_menu.c
index 78577e7..f8dfd41 100644
--- a/lib/lvgl/src/extra/widgets/menu/lv_menu.c
+++ b/lib/lvgl/src/extra/widgets/menu/lv_menu.c
@@ -195,6 +195,11 @@ void lv_menu_set_page(lv_obj_t * obj, lv_obj_t * page)
lv_menu_t * menu = (lv_menu_t *)obj;
+ /* Guard against setting the same page again */
+ if(menu->main_page == page) {
+ return;
+ }
+
/* Hide previous page */
if(menu->main_page != NULL) {
lv_obj_set_parent(menu->main_page, menu->storage);
diff --git a/lib/lvgl/src/extra/widgets/meter/lv_meter.c b/lib/lvgl/src/extra/widgets/meter/lv_meter.c
index 6f12a56..470764e 100644
--- a/lib/lvgl/src/extra/widgets/meter/lv_meter.c
+++ b/lib/lvgl/src/extra/widgets/meter/lv_meter.c
@@ -336,7 +336,7 @@ static void draw_arcs(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area_t
scale_center.x = scale_area->x1 + r_out;
scale_center.y = scale_area->y1 + r_out;
- lv_opa_t opa_main = lv_obj_get_style_opa(obj, LV_PART_MAIN);
+ lv_opa_t opa_main = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN);
lv_meter_indicator_t * indic;
lv_obj_draw_part_dsc_t part_draw_dsc;
@@ -360,6 +360,8 @@ static void draw_arcs(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area_t
int32_t end_angle = lv_map(indic->end_value, scale->min, scale->max, scale->rotation,
scale->rotation + scale->angle_range);
+ arc_dsc.start_angle = start_angle;
+ arc_dsc.end_angle = end_angle;
part_draw_dsc.radius = r_out + indic->type_data.arc.r_mod;
part_draw_dsc.sub_part_ptr = indic;
part_draw_dsc.p1 = &scale_center;
@@ -404,7 +406,7 @@ static void draw_ticks_and_labels(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, cons
_LV_LL_READ_BACK(&meter->scale_ll, scale) {
part_draw_dsc.sub_part_ptr = scale;
- lv_coord_t r_out = r_edge + scale->r_mod;
+ lv_coord_t r_out = r_edge;
lv_coord_t r_in_minor = r_out - scale->tick_length;
lv_coord_t r_in_major = r_out - scale->tick_major_length;
@@ -473,32 +475,20 @@ static void draw_ticks_and_labels(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, cons
}
}
- /*`* 256` for extra precision*/
- int32_t angle_upscale = ((i * scale->angle_range) << 8) / (scale->tick_cnt - 1);
-
- int32_t angle_low = (angle_upscale >> 8);
- int32_t angle_high = angle_low + 1;
- int32_t angle_rem = angle_upscale & 0xFF;
-
- /*Interpolate sine and cos*/
- int32_t sin_low = lv_trigo_sin(angle_low + scale->rotation);
- int32_t sin_high = lv_trigo_sin(angle_high + scale->rotation);
- int32_t sin_mid = (sin_low * (256 - angle_rem) + sin_high * angle_rem) >> 8;
-
- int32_t cos_low = lv_trigo_cos(angle_low + scale->rotation);
- int32_t cos_high = lv_trigo_cos(angle_high + scale->rotation);
- int32_t cos_mid = (cos_low * (256 - angle_rem) + cos_high * angle_rem) >> 8;
+ int32_t angle_upscale = ((i * scale->angle_range) * 10) / (scale->tick_cnt - 1) + + scale->rotation * 10;
line_dsc.color = line_color;
line_dsc.width = line_width;
- /*Use the interpolated angle to get the outer x and y coordinates.
- *Draw a little bit longer lines to be sure the mask will clip them correctly*/
- lv_point_t p_outer;
- p_outer.x = (int32_t)(((int32_t)cos_mid * (r_out + line_width) + 127) >> (LV_TRIGO_SHIFT)) + p_center.x;
- p_outer.y = (int32_t)(((int32_t)sin_mid * (r_out + line_width) + 127) >> (LV_TRIGO_SHIFT)) + p_center.y;
- part_draw_dsc.p1 = &p_outer;
+ /*Draw a little bit longer lines to be sure the mask will clip them correctly
+ *and to get a better precision*/
+ lv_point_t p_outer;
+ p_outer.x = p_center.x + r_out + LV_MAX(LV_DPI_DEF, r_out);
+ p_outer.y = p_center.y;
+ lv_point_transform(&p_outer, angle_upscale, 256, &p_center);
+
part_draw_dsc.p1 = &p_center;
+ part_draw_dsc.p2 = &p_outer;
part_draw_dsc.id = i;
part_draw_dsc.label_dsc = &label_dsc;
@@ -507,8 +497,9 @@ static void draw_ticks_and_labels(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, cons
lv_draw_mask_remove_id(outer_mask_id);
uint32_t r_text = r_in_major - scale->label_gap;
lv_point_t p;
- p.x = (int32_t)((int32_t)((int32_t)cos_mid * r_text + 127) >> LV_TRIGO_SHIFT) + p_center.x;
- p.y = (int32_t)((int32_t)((int32_t)sin_mid * r_text + 127) >> LV_TRIGO_SHIFT) + p_center.y;
+ p.x = p_center.x + r_text;
+ p.y = p_center.y;
+ lv_point_transform(&p, angle_upscale, 256, &p_center);
lv_draw_label_dsc_t label_dsc_tmp;
lv_memcpy(&label_dsc_tmp, &label_dsc, sizeof(label_dsc_tmp));
@@ -522,7 +513,8 @@ static void draw_ticks_and_labels(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, cons
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
lv_point_t label_size;
- lv_txt_get_size(&label_size, part_draw_dsc.text, label_dsc.font, label_dsc.letter_space, label_dsc.line_space,
+ lv_txt_get_size(&label_size, part_draw_dsc.text, label_dsc_tmp.font, label_dsc_tmp.letter_space,
+ label_dsc_tmp.line_space,
LV_COORD_MAX, LV_TEXT_FLAG_NONE);
lv_area_t label_cord;
@@ -557,7 +549,6 @@ static void draw_ticks_and_labels(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, cons
}
}
-
static void draw_needles(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area_t * scale_area)
{
lv_meter_t * meter = (lv_meter_t *)obj;
@@ -574,12 +565,13 @@ static void draw_needles(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area
lv_draw_img_dsc_t img_dsc;
lv_draw_img_dsc_init(&img_dsc);
lv_obj_init_draw_img_dsc(obj, LV_PART_ITEMS, &img_dsc);
- lv_opa_t opa_main = lv_obj_get_style_opa(obj, LV_PART_MAIN);
+ lv_opa_t opa_main = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN);
lv_obj_draw_part_dsc_t part_draw_dsc;
lv_obj_draw_dsc_init(&part_draw_dsc, draw_ctx);
part_draw_dsc.class_p = MY_CLASS;
part_draw_dsc.p1 = &scale_center;
+ part_draw_dsc.part = LV_PART_INDICATOR;
lv_meter_indicator_t * indic;
_LV_LL_READ_BACK(&meter->indicator_ll, indic) {
@@ -596,12 +588,12 @@ static void draw_needles(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area
line_dsc.width = indic->type_data.needle_line.width;
line_dsc.opa = indic->opa > LV_OPA_MAX ? opa_main : (opa_main * indic->opa) >> 8;
- part_draw_dsc.id = LV_METER_DRAW_PART_NEEDLE_LINE;
+ part_draw_dsc.type = LV_METER_DRAW_PART_NEEDLE_LINE;
part_draw_dsc.line_dsc = &line_dsc;
part_draw_dsc.p2 = &p_end;
-
+ part_draw_dsc.p1 = &scale_center;
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
- lv_draw_line(draw_ctx, &line_dsc, &scale_center, &p_end);
+ lv_draw_line(draw_ctx, &line_dsc, part_draw_dsc.p1, &p_end);
lv_event_send(obj, LV_EVENT_DRAW_PART_END, &part_draw_dsc);
}
else if(indic->type == LV_METER_INDICATOR_TYPE_NEEDLE_IMG) {
@@ -623,6 +615,7 @@ static void draw_needles(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx, const lv_area
if(angle > 3600) angle -= 3600;
img_dsc.angle = angle;
+ part_draw_dsc.type = LV_METER_DRAW_PART_NEEDLE_IMG;
part_draw_dsc.img_dsc = &img_dsc;
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
@@ -657,7 +650,6 @@ static void inv_arc(lv_obj_t * obj, lv_meter_indicator_t * indic, int32_t old_va
lv_obj_invalidate_area(obj, &a);
}
-
static void inv_line(lv_obj_t * obj, lv_meter_indicator_t * indic, int32_t value)
{
lv_area_t scale_area;
diff --git a/lib/lvgl/src/extra/widgets/meter/lv_meter.h b/lib/lvgl/src/extra/widgets/meter/lv_meter.h
index 24c1dae..5807c55 100644
--- a/lib/lvgl/src/extra/widgets/meter/lv_meter.h
+++ b/lib/lvgl/src/extra/widgets/meter/lv_meter.h
@@ -42,7 +42,6 @@ typedef struct {
uint16_t tick_major_width;
int16_t label_gap;
- int16_t label_color;
int32_t min;
int32_t max;
@@ -212,7 +211,6 @@ lv_meter_indicator_t * lv_meter_add_needle_img(lv_obj_t * obj, lv_meter_scale_t
lv_meter_indicator_t * lv_meter_add_arc(lv_obj_t * obj, lv_meter_scale_t * scale, uint16_t width, lv_color_t color,
int16_t r_mod);
-
/**
* Add a scale line indicator the scale. It will modify the ticks.
* @param obj pointer to a meter object
diff --git a/lib/lvgl/src/extra/widgets/msgbox/lv_msgbox.c b/lib/lvgl/src/extra/widgets/msgbox/lv_msgbox.c
index 8db5df7..757b362 100644
--- a/lib/lvgl/src/extra/widgets/msgbox/lv_msgbox.c
+++ b/lib/lvgl/src/extra/widgets/msgbox/lv_msgbox.c
@@ -106,6 +106,9 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char *
}
mbox->content = lv_obj_class_create_obj(&lv_msgbox_content_class, obj);
+ LV_ASSERT_MALLOC(mbox->content);
+ if(mbox->content == NULL) return NULL;
+ lv_obj_class_init_obj(mbox->content);
bool has_txt = txt && strlen(txt) > 0;
if(has_txt) {
@@ -135,7 +138,6 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char *
return obj;
}
-
lv_obj_t * lv_msgbox_get_title(lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
diff --git a/lib/lvgl/src/extra/widgets/span/lv_span.c b/lib/lvgl/src/extra/widgets/span/lv_span.c
index 96f0447..6f970c5 100644
--- a/lib/lvgl/src/extra/widgets/span/lv_span.c
+++ b/lib/lvgl/src/extra/widgets/span/lv_span.c
@@ -779,7 +779,7 @@ static void lv_draw_span(lv_obj_t * obj, lv_draw_ctx_t * draw_ctx)
lv_coord_t max_width = lv_area_get_width(&coords);
lv_coord_t indent = convert_indent_pct(obj, max_width);
lv_coord_t max_w = max_width - indent; /* first line need minus indent */
- lv_opa_t obj_opa = lv_obj_get_style_opa(obj, LV_PART_MAIN);
+ lv_opa_t obj_opa = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN);
/* coords of draw span-txt */
lv_point_t txt_pos;
diff --git a/lib/lvgl/src/extra/widgets/span/lv_span.h b/lib/lvgl/src/extra/widgets/span/lv_span.h
index f00d04d..3709b72 100644
--- a/lib/lvgl/src/extra/widgets/span/lv_span.h
+++ b/lib/lvgl/src/extra/widgets/span/lv_span.h
@@ -221,7 +221,6 @@ uint32_t lv_spangroup_get_expand_width(lv_obj_t * obj, uint32_t max_width);
*/
lv_coord_t lv_spangroup_get_expand_height(lv_obj_t * obj, lv_coord_t width);
-
/*=====================
* Other functions
*====================*/
diff --git a/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.c b/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.c
index 83f9086..37db45c 100644
--- a/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.c
+++ b/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.c
@@ -157,7 +157,7 @@ void lv_spinbox_set_range(lv_obj_t * obj, int32_t range_min, int32_t range_max)
* @param spinbox pointer to spinbox
* @param pos selected position in spinbox
*/
-void lv_spinbox_set_pos(lv_obj_t * obj, uint8_t pos)
+void lv_spinbox_set_cursor_pos(lv_obj_t * obj, uint8_t pos)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_spinbox_t * spinbox = (lv_spinbox_t *)obj;
@@ -434,9 +434,6 @@ static void lv_spinbox_event(const lv_obj_class_t * class_p, lv_event_t * e)
else if(c == LV_KEY_DOWN) {
lv_spinbox_decrement(obj);
}
- else {
- lv_textarea_add_char(obj, c);
- }
}
}
diff --git a/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.h b/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.h
index 14c73ba..1a4bc32 100644
--- a/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.h
+++ b/lib/lvgl/src/extra/widgets/spinbox/lv_spinbox.h
@@ -105,7 +105,7 @@ void lv_spinbox_set_range(lv_obj_t * obj, int32_t range_min, int32_t range_max);
* @param obj pointer to spinbox
* @param pos selected position in spinbox
*/
-void lv_spinbox_set_pos(lv_obj_t * obj, uint8_t pos);
+void lv_spinbox_set_cursor_pos(lv_obj_t * obj, uint8_t pos);
/**
* Set direction of digit step when clicking an encoder button while in editing mode
@@ -170,6 +170,10 @@ void lv_spinbox_decrement(lv_obj_t * obj);
* MACROS
**********************/
+/* It was ambiguous in MicroPython. See https://github.com/lvgl/lvgl/issues/3301
+ * TODO remove in v9*/
+#define lv_spinbox_set_pos lv_spinbox_set_cursor_pos
+
#endif /*LV_USE_SPINBOX*/
#ifdef __cplusplus
diff --git a/lib/lvgl/src/extra/widgets/spinner/lv_spinner.c b/lib/lvgl/src/extra/widgets/spinner/lv_spinner.c
index 6fc6d74..d0ccabd 100644
--- a/lib/lvgl/src/extra/widgets/spinner/lv_spinner.c
+++ b/lib/lvgl/src/extra/widgets/spinner/lv_spinner.c
@@ -58,7 +58,6 @@ lv_obj_t * lv_spinner_create(lv_obj_t * parent, uint32_t time, uint32_t arc_leng
return obj;
}
-
/**********************
* STATIC FUNCTIONS
**********************/
@@ -89,13 +88,11 @@ static void lv_spinner_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
lv_arc_set_rotation(obj, 270);
}
-
static void arc_anim_start_angle(void * obj, int32_t v)
{
lv_arc_set_start_angle(obj, (uint16_t) v);
}
-
static void arc_anim_end_angle(void * obj, int32_t v)
{
lv_arc_set_end_angle(obj, (uint16_t) v);
diff --git a/lib/lvgl/src/extra/widgets/tabview/lv_tabview.c b/lib/lvgl/src/extra/widgets/tabview/lv_tabview.c
index c825a14..3423517 100644
--- a/lib/lvgl/src/extra/widgets/tabview/lv_tabview.c
+++ b/lib/lvgl/src/extra/widgets/tabview/lv_tabview.c
@@ -77,8 +77,8 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
lv_obj_t * btns = lv_tabview_get_tab_btns(obj);
- char ** old_map = tabview->map;
- char ** new_map;
+ const char ** old_map = (const char **)tabview->map;
+ const char ** new_map;
/*top or bottom dir*/
if(tabview->tab_pos & LV_DIR_VER) {
@@ -121,9 +121,25 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
return page;
}
+void lv_tabview_rename_tab(lv_obj_t * obj, uint32_t id, const char * new_name)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ lv_tabview_t * tabview = (lv_tabview_t *)obj;
+
+ if(id >= tabview->tab_cnt) return;
+ if(tabview->tab_pos & LV_DIR_HOR) id *= 2;
+
+ lv_mem_free((void *)tabview->map[id]);
+ tabview->map[id] = lv_mem_alloc(strlen(new_name) + 1);
+ strcpy((void *)tabview->map[id], new_name);
+ lv_obj_invalidate(obj);
+}
+
void lv_tabview_set_act(lv_obj_t * obj, uint32_t id, lv_anim_enable_t anim_en)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
+ if(obj->being_deleted) return;
+
lv_tabview_t * tabview = (lv_tabview_t *)obj;
if(id >= tabview->tab_cnt) {
@@ -257,18 +273,17 @@ static void lv_tabview_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj
uint32_t i;
if(tabview->tab_pos & LV_DIR_VER) {
for(i = 0; i < tabview->tab_cnt; i++) {
- lv_mem_free(tabview->map[i]);
+ lv_mem_free((void *)tabview->map[i]);
tabview->map[i] = NULL;
}
}
if(tabview->tab_pos & LV_DIR_HOR) {
for(i = 0; i < tabview->tab_cnt; i++) {
- lv_mem_free(tabview->map[i * 2]);
+ lv_mem_free((void *)tabview->map[i * 2]);
tabview->map[i * 2] = NULL;
}
}
-
lv_mem_free(tabview->map);
tabview->map = NULL;
}
@@ -287,14 +302,13 @@ static void lv_tabview_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
}
-
static void btns_value_changed_event_cb(lv_event_t * e)
{
lv_obj_t * btns = lv_event_get_target(e);
lv_obj_t * tv = lv_obj_get_parent(btns);
uint32_t id = lv_btnmatrix_get_selected_btn(btns);
- lv_tabview_set_act(tv, id, LV_ANIM_ON);
+ lv_tabview_set_act(tv, id, LV_ANIM_OFF);
}
static void cont_scroll_end_event_cb(lv_event_t * e)
@@ -308,6 +322,11 @@ static void cont_scroll_end_event_cb(lv_event_t * e)
lv_tabview_set_act(tv, lv_tabview_get_tab_act(tv), LV_ANIM_OFF);
}
else if(code == LV_EVENT_SCROLL_END) {
+ lv_indev_t * indev = lv_indev_get_act();
+ if(indev && indev->proc.state == LV_INDEV_STATE_PRESSED) {
+ return;
+ }
+
lv_point_t p;
lv_obj_get_scroll_end(cont, &p);
diff --git a/lib/lvgl/src/extra/widgets/tabview/lv_tabview.h b/lib/lvgl/src/extra/widgets/tabview/lv_tabview.h
index a01c6b9..ee7d7ce 100644
--- a/lib/lvgl/src/extra/widgets/tabview/lv_tabview.h
+++ b/lib/lvgl/src/extra/widgets/tabview/lv_tabview.h
@@ -27,7 +27,7 @@ extern "C" {
typedef struct {
lv_obj_t obj;
- char ** map;
+ const char ** map;
uint16_t tab_cnt;
uint16_t tab_cur;
lv_dir_t tab_pos;
@@ -42,6 +42,8 @@ lv_obj_t * lv_tabview_create(lv_obj_t * parent, lv_dir_t tab_pos, lv_coord_t tab
lv_obj_t * lv_tabview_add_tab(lv_obj_t * tv, const char * name);
+void lv_tabview_rename_tab(lv_obj_t * obj, uint32_t tab_id, const char * new_name);
+
lv_obj_t * lv_tabview_get_content(lv_obj_t * tv);
lv_obj_t * lv_tabview_get_tab_btns(lv_obj_t * tv);
diff --git a/lib/lvgl/src/extra/widgets/tileview/lv_tileview.c b/lib/lvgl/src/extra/widgets/tileview/lv_tileview.c
index 4f98b55..17fdb51 100644
--- a/lib/lvgl/src/extra/widgets/tileview/lv_tileview.c
+++ b/lib/lvgl/src/extra/widgets/tileview/lv_tileview.c
@@ -7,6 +7,7 @@
* INCLUDES
*********************/
#include "lv_tileview.h"
+#include "../../../core/lv_indev.h"
#if LV_USE_TILEVIEW
/*********************
@@ -157,6 +158,11 @@ static void tileview_event_cb(lv_event_t * e)
lv_tileview_t * tv = (lv_tileview_t *) obj;
if(code == LV_EVENT_SCROLL_END) {
+ lv_indev_t * indev = lv_indev_get_act();
+ if(indev && indev->proc.state == LV_INDEV_STATE_PRESSED) {
+ return;
+ }
+
lv_coord_t w = lv_obj_get_content_width(obj);
lv_coord_t h = lv_obj_get_content_height(obj);
diff --git a/lib/lvgl/src/extra/widgets/win/lv_win.c b/lib/lvgl/src/extra/widgets/win/lv_win.c
index 92c3b8b..6b6a40b 100644
--- a/lib/lvgl/src/extra/widgets/win/lv_win.c
+++ b/lib/lvgl/src/extra/widgets/win/lv_win.c
@@ -9,7 +9,6 @@
#include "lv_win.h"
#if LV_USE_WIN
-
/*********************
* DEFINES
*********************/
@@ -107,4 +106,3 @@ static void lv_win_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
}
#endif
-
diff --git a/lib/lvgl/src/extra/widgets/win/lv_win.h b/lib/lvgl/src/extra/widgets/win/lv_win.h
index 4342b31..31e0e37 100644
--- a/lib/lvgl/src/extra/widgets/win/lv_win.h
+++ b/lib/lvgl/src/extra/widgets/win/lv_win.h
@@ -34,7 +34,6 @@ extern const lv_obj_class_t lv_win_class;
lv_obj_t * lv_win_create(lv_obj_t * parent, lv_coord_t header_height);
-
lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt);
lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * icon, lv_coord_t btn_w);
diff --git a/lib/lvgl/src/font/lv_font.c b/lib/lvgl/src/font/lv_font.c
index 4239b47..d4cc27e 100644
--- a/lib/lvgl/src/font/lv_font.c
+++ b/lib/lvgl/src/font/lv_font.c
@@ -68,7 +68,10 @@ bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_o
LV_ASSERT_NULL(font_p);
LV_ASSERT_NULL(dsc_out);
+#if LV_USE_FONT_PLACEHOLDER
const lv_font_t * placeholder_font = NULL;
+#endif
+
const lv_font_t * f = font_p;
dsc_out->resolved_font = NULL;
@@ -80,19 +83,22 @@ bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_o
dsc_out->resolved_font = f;
return true;
}
+#if LV_USE_FONT_PLACEHOLDER
else if(placeholder_font == NULL) {
placeholder_font = f;
}
+#endif
}
f = f->fallback;
}
+#if LV_USE_FONT_PLACEHOLDER
if(placeholder_font != NULL) {
placeholder_font->get_glyph_dsc(placeholder_font, dsc_out, letter, letter_next);
dsc_out->resolved_font = placeholder_font;
return true;
}
-
+#endif
if(letter < 0x20 ||
letter == 0xf8ff || /*LV_SYMBOL_DUMMY*/
@@ -101,8 +107,13 @@ bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_o
dsc_out->adv_w = 0;
}
else {
+#if LV_USE_FONT_PLACEHOLDER
dsc_out->box_w = font_p->line_height / 2;
dsc_out->adv_w = dsc_out->box_w + 2;
+#else
+ dsc_out->box_w = 0;
+ dsc_out->adv_w = 0;
+#endif
}
dsc_out->resolved_font = NULL;
diff --git a/lib/lvgl/src/font/lv_font_dejavu_16_persian_hebrew.c b/lib/lvgl/src/font/lv_font_dejavu_16_persian_hebrew.c
index fce6b0c..7233db2 100644
--- a/lib/lvgl/src/font/lv_font_dejavu_16_persian_hebrew.c
+++ b/lib/lvgl/src/font/lv_font_dejavu_16_persian_hebrew.c
@@ -5864,7 +5864,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -6556,8 +6555,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
}
};
-
-
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
@@ -6583,7 +6580,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -6608,7 +6604,4 @@ lv_font_t lv_font_dejavu_16_persian_hebrew = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_DEJAVU_16_PERSIAN_HEBREW*/
-
diff --git a/lib/lvgl/src/font/lv_font_fmt_txt.c b/lib/lvgl/src/font/lv_font_fmt_txt.c
index 7a36f01..78beaff 100644
--- a/lib/lvgl/src/font/lv_font_fmt_txt.c
+++ b/lib/lvgl/src/font/lv_font_fmt_txt.c
@@ -148,10 +148,10 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic
bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter,
uint32_t unicode_letter_next)
{
- bool is_tab = false;
- if(unicode_letter == '\t') {
+ /*It fixes a strange compiler optimization issue: https://github.com/lvgl/lvgl/issues/4370*/
+ bool is_tab = unicode_letter == '\t';
+ if(is_tab) {
unicode_letter = ' ';
- is_tab = true;
}
lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
uint32_t gid = get_glyph_dsc_id(font, unicode_letter);
diff --git a/lib/lvgl/src/font/lv_font_montserrat_10.c b/lib/lvgl/src/font/lv_font_montserrat_10.c
index 485d9f6..a3bc763 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_10.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_10.c
@@ -973,7 +973,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -1170,7 +1169,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -1597,7 +1595,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -1632,7 +1629,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -1657,7 +1653,4 @@ lv_font_t lv_font_montserrat_10 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_10*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_12.c b/lib/lvgl/src/font/lv_font_montserrat_12.c
index e84d00c..a220fe2 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_12.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_12.c
@@ -1234,7 +1234,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -1431,7 +1430,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -1858,7 +1856,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -1893,7 +1890,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -1918,7 +1914,4 @@ lv_font_t lv_font_montserrat_12 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_12*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_12_subpx.c b/lib/lvgl/src/font/lv_font_montserrat_12_subpx.c
index 1ffd7ed..8cf2135 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_12_subpx.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_12_subpx.c
@@ -3175,7 +3175,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -3372,7 +3371,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -3799,7 +3797,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -3834,7 +3831,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -3859,7 +3855,4 @@ lv_font_t lv_font_montserrat_12_subpx = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_12_SUBPX*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_14.c b/lib/lvgl/src/font/lv_font_montserrat_14.c
index cc4da95..801d9a5 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_14.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_14.c
@@ -1510,7 +1510,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -1707,7 +1706,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -2134,7 +2132,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -2169,7 +2166,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -2194,7 +2190,4 @@ lv_font_t lv_font_montserrat_14 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_14*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_16.c b/lib/lvgl/src/font/lv_font_montserrat_16.c
index 2b0dccf..38ea219 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_16.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_16.c
@@ -1779,7 +1779,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -1976,7 +1975,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -2403,7 +2401,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -2438,7 +2435,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -2463,7 +2459,4 @@ lv_font_t lv_font_montserrat_16 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_16*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_18.c b/lib/lvgl/src/font/lv_font_montserrat_18.c
index c2e5d1d..402385b 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_18.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_18.c
@@ -2179,7 +2179,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -2376,7 +2375,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -2803,7 +2801,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -2838,7 +2835,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -2863,7 +2859,4 @@ lv_font_t lv_font_montserrat_18 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_18*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_20.c b/lib/lvgl/src/font/lv_font_montserrat_20.c
index bf11639..1b608c2 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_20.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_20.c
@@ -2536,7 +2536,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -2733,7 +2732,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -3160,7 +3158,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -3195,7 +3192,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -3220,7 +3216,4 @@ lv_font_t lv_font_montserrat_20 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_20*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_22.c b/lib/lvgl/src/font/lv_font_montserrat_22.c
index d96a666..72e467f 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_22.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_22.c
@@ -2965,7 +2965,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -3162,7 +3161,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -3589,7 +3587,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -3624,7 +3621,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -3649,7 +3645,4 @@ lv_font_t lv_font_montserrat_22 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_22*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_24.c b/lib/lvgl/src/font/lv_font_montserrat_24.c
index 9795f70..be72d29 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_24.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_24.c
@@ -3376,7 +3376,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -3573,7 +3572,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -4000,7 +3998,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -4035,7 +4032,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -4060,7 +4056,4 @@ lv_font_t lv_font_montserrat_24 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_24*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_26.c b/lib/lvgl/src/font/lv_font_montserrat_26.c
index 416d840..fdd9245 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_26.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_26.c
@@ -3911,7 +3911,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -4108,7 +4107,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -4535,7 +4533,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -4570,7 +4567,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -4595,7 +4591,4 @@ lv_font_t lv_font_montserrat_26 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_26*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_28.c b/lib/lvgl/src/font/lv_font_montserrat_28.c
index 0ae2d7e..c90cf93 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_28.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_28.c
@@ -4460,7 +4460,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -4657,7 +4656,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -5084,7 +5082,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -5119,7 +5116,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -5144,7 +5140,4 @@ lv_font_t lv_font_montserrat_28 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_28*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_28_compressed.c b/lib/lvgl/src/font/lv_font_montserrat_28_compressed.c
index 4612584..e870315 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_28_compressed.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_28_compressed.c
@@ -2590,7 +2590,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0xff, 0x3a, 0xba, 0x40, 0x3f, 0xf9, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -2787,7 +2786,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -3214,7 +3212,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -3249,7 +3246,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -3274,7 +3270,4 @@ lv_font_t lv_font_montserrat_28_compressed = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_28_COMPRESSED*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_30.c b/lib/lvgl/src/font/lv_font_montserrat_30.c
index f5532b3..0231cb1 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_30.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_30.c
@@ -5042,7 +5042,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -5239,7 +5238,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -5666,7 +5664,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -5701,7 +5698,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -5726,7 +5722,4 @@ lv_font_t lv_font_montserrat_30 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_30*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_32.c b/lib/lvgl/src/font/lv_font_montserrat_32.c
index f4dad0c..bd3d31a 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_32.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_32.c
@@ -5531,7 +5531,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -5728,7 +5727,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -6155,7 +6153,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -6190,7 +6187,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -6215,7 +6211,4 @@ lv_font_t lv_font_montserrat_32 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_32*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_34.c b/lib/lvgl/src/font/lv_font_montserrat_34.c
index 064bb0a..143be23 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_34.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_34.c
@@ -6330,7 +6330,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -6527,7 +6526,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -6954,7 +6952,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -6989,7 +6986,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -7014,7 +7010,4 @@ lv_font_t lv_font_montserrat_34 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_34*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_36.c b/lib/lvgl/src/font/lv_font_montserrat_36.c
index e5b2b68..60ed905 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_36.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_36.c
@@ -6974,7 +6974,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -7171,7 +7170,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -7598,7 +7596,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -7633,7 +7630,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -7658,7 +7654,4 @@ lv_font_t lv_font_montserrat_36 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_36*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_38.c b/lib/lvgl/src/font/lv_font_montserrat_38.c
index 883eae5..7882ee5 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_38.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_38.c
@@ -7719,7 +7719,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -7916,7 +7915,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -8343,7 +8341,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -8378,7 +8375,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -8403,7 +8399,4 @@ lv_font_t lv_font_montserrat_38 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_38*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_40.c b/lib/lvgl/src/font/lv_font_montserrat_40.c
index 0769235..5afb1d2 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_40.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_40.c
@@ -8567,7 +8567,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -8764,7 +8763,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -9191,7 +9189,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -9226,7 +9223,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -9251,7 +9247,4 @@ lv_font_t lv_font_montserrat_40 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_40*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_42.c b/lib/lvgl/src/font/lv_font_montserrat_42.c
index a656393..c1c6c04 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_42.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_42.c
@@ -9409,7 +9409,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -9606,7 +9605,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -10033,7 +10031,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -10068,7 +10065,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -10093,7 +10089,4 @@ lv_font_t lv_font_montserrat_42 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_42*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_44.c b/lib/lvgl/src/font/lv_font_montserrat_44.c
index 4156909..062d9ac 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_44.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_44.c
@@ -10235,7 +10235,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -10432,7 +10431,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -10859,7 +10857,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -10894,7 +10891,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -10919,7 +10915,4 @@ lv_font_t lv_font_montserrat_44 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_44*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_46.c b/lib/lvgl/src/font/lv_font_montserrat_46.c
index 745b42c..7b9022b 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_46.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_46.c
@@ -11187,7 +11187,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -11384,7 +11383,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -11811,7 +11809,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -11846,7 +11843,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -11871,7 +11867,4 @@ lv_font_t lv_font_montserrat_46 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_46*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_48.c b/lib/lvgl/src/font/lv_font_montserrat_48.c
index 9961b83..12299c5 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_48.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_48.c
@@ -11888,7 +11888,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -12085,7 +12084,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -12512,7 +12510,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -12547,7 +12544,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -12572,7 +12568,4 @@ lv_font_t lv_font_montserrat_48 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_48*/
-
diff --git a/lib/lvgl/src/font/lv_font_montserrat_8.c b/lib/lvgl/src/font/lv_font_montserrat_8.c
index 3903332..6c901bb 100644
--- a/lib/lvgl/src/font/lv_font_montserrat_8.c
+++ b/lib/lvgl/src/font/lv_font_montserrat_8.c
@@ -759,7 +759,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -956,7 +955,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
* KERNING
*----------------*/
-
/*Map glyph_ids to kern left classes*/
static const uint8_t kern_left_class_mapping[] = {
0, 0, 1, 2, 0, 3, 4, 5,
@@ -1383,7 +1381,6 @@ static const int8_t kern_class_values[] = {
0, 0, 0, 0, 0
};
-
/*Collect the kern class' data in one place*/
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
.class_pair_values = kern_class_values,
@@ -1418,7 +1415,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -1443,7 +1439,4 @@ lv_font_t lv_font_montserrat_8 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_MONTSERRAT_8*/
-
diff --git a/lib/lvgl/src/font/lv_font_simsun_16_cjk.c b/lib/lvgl/src/font/lv_font_simsun_16_cjk.c
index bcd7c14..73abe1b 100644
--- a/lib/lvgl/src/font/lv_font_simsun_16_cjk.c
+++ b/lib/lvgl/src/font/lv_font_simsun_16_cjk.c
@@ -22100,7 +22100,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x2f, 0xdd, 0xdd, 0x80, 0x0, 0x0, 0x0, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -23723,8 +23722,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
}
};
-
-
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
@@ -23750,7 +23747,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -23775,7 +23771,4 @@ lv_font_t lv_font_simsun_16_cjk = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_SIMSUN_16_CJK*/
-
diff --git a/lib/lvgl/src/font/lv_font_unscii_16.c b/lib/lvgl/src/font/lv_font_unscii_16.c
index d6b0eaa..1a897bb 100644
--- a/lib/lvgl/src/font/lv_font_unscii_16.c
+++ b/lib/lvgl/src/font/lv_font_unscii_16.c
@@ -475,7 +475,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0xc0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -584,8 +583,6 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
* CHARACTER MAPPING
*--------------------*/
-
-
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] = {
{
@@ -594,8 +591,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
}
};
-
-
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
@@ -621,7 +616,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -646,7 +640,4 @@ lv_font_t lv_font_unscii_16 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_UNSCII_16*/
-
diff --git a/lib/lvgl/src/font/lv_font_unscii_8.c b/lib/lvgl/src/font/lv_font_unscii_8.c
index 1b03c85..9680cdd 100644
--- a/lib/lvgl/src/font/lv_font_unscii_8.c
+++ b/lib/lvgl/src/font/lv_font_unscii_8.c
@@ -311,7 +311,6 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0xc1, 0x42, 0xbd, 0x2c, 0x40, 0x81, 0x0
};
-
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
@@ -420,8 +419,6 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
* CHARACTER MAPPING
*--------------------*/
-
-
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] = {
{
@@ -430,8 +427,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
}
};
-
-
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
@@ -457,7 +452,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
};
-
/*-----------------
* PUBLIC FONT
*----------------*/
@@ -482,7 +476,4 @@ lv_font_t lv_font_unscii_8 = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
-
-
#endif /*#if LV_FONT_UNSCII_8*/
-
diff --git a/lib/lvgl/src/font/lv_symbol_def.h b/lib/lvgl/src/font/lv_symbol_def.h
index 696daf1..7c23658 100644
--- a/lib/lvgl/src/font/lv_symbol_def.h
+++ b/lib/lvgl/src/font/lv_symbol_def.h
@@ -31,7 +31,6 @@ extern "C" {
* If they are not predefined, they will use the following values
*/
-
#if !defined LV_SYMBOL_AUDIO
#define LV_SYMBOL_AUDIO "\xEF\x80\x81" /*61441, 0xF001*/
#endif
diff --git a/lib/lvgl/src/hal/lv_hal_disp.c b/lib/lvgl/src/hal/lv_hal_disp.c
index dbdc5dc..6f1c962 100644
--- a/lib/lvgl/src/hal/lv_hal_disp.c
+++ b/lib/lvgl/src/hal/lv_hal_disp.c
@@ -21,7 +21,11 @@
#include "../draw/sw/lv_draw_sw.h"
#include "../draw/sdl/lv_draw_sdl.h"
#include "../draw/stm32_dma2d/lv_gpu_stm32_dma2d.h"
+#include "../draw/swm341_dma2d/lv_gpu_swm341_dma2d.h"
#include "../draw/arm2d/lv_gpu_arm2d.h"
+#include "../draw/nxp/vglite/lv_draw_vglite.h"
+#include "../draw/nxp/pxp/lv_draw_pxp.h"
+#include "../draw/renesas/lv_gpu_d2_ra6m3.h"
#if LV_USE_THEME_DEFAULT
#include "../extra/themes/default/lv_theme_default.h"
@@ -88,23 +92,30 @@ void lv_disp_drv_init(lv_disp_drv_t * driver)
driver->offset_x = 0;
driver->offset_y = 0;
driver->antialiasing = LV_COLOR_DEPTH > 8 ? 1 : 0;
- driver->screen_transp = LV_COLOR_SCREEN_TRANSP;
+ driver->screen_transp = 0;
driver->dpi = LV_DPI_DEF;
driver->color_chroma_key = LV_COLOR_CHROMA_KEY;
-
-#if LV_USE_GPU_STM32_DMA2D
+#if LV_USE_GPU_RA6M3_G2D
+ driver->draw_ctx_init = lv_draw_ra6m3_2d_ctx_init;
+ driver->draw_ctx_deinit = lv_draw_ra6m3_2d_ctx_init;
+ driver->draw_ctx_size = sizeof(lv_draw_ra6m3_dma2d_ctx_t);
+#elif LV_USE_GPU_STM32_DMA2D
driver->draw_ctx_init = lv_draw_stm32_dma2d_ctx_init;
driver->draw_ctx_deinit = lv_draw_stm32_dma2d_ctx_init;
driver->draw_ctx_size = sizeof(lv_draw_stm32_dma2d_ctx_t);
-#elif LV_USE_GPU_NXP_PXP
- driver->draw_ctx_init = lv_draw_nxp_pxp_init;
- driver->draw_ctx_deinit = lv_draw_nxp_pxp_init;
- driver->draw_ctx_size = sizeof(lv_draw_nxp_pxp_t);
+#elif LV_USE_GPU_SWM341_DMA2D
+ driver->draw_ctx_init = lv_draw_swm341_dma2d_ctx_init;
+ driver->draw_ctx_deinit = lv_draw_swm341_dma2d_ctx_init;
+ driver->draw_ctx_size = sizeof(lv_draw_swm341_dma2d_ctx_t);
#elif LV_USE_GPU_NXP_VG_LITE
- driver->draw_ctx_init = lv_draw_nxp_vglite_init;
- driver->draw_ctx_deinit = lv_draw_nxp_vglite_init;
- driver->draw_ctx_size = sizeof(lv_draw_nxp_vglite_t);
+ driver->draw_ctx_init = lv_draw_vglite_ctx_init;
+ driver->draw_ctx_deinit = lv_draw_vglite_ctx_deinit;
+ driver->draw_ctx_size = sizeof(lv_draw_vglite_ctx_t);
+#elif LV_USE_GPU_NXP_PXP
+ driver->draw_ctx_init = lv_draw_pxp_ctx_init;
+ driver->draw_ctx_deinit = lv_draw_pxp_ctx_deinit;
+ driver->draw_ctx_size = sizeof(lv_draw_pxp_ctx_t);
#elif LV_USE_GPU_SDL
driver->draw_ctx_init = lv_draw_sdl_init_ctx;
driver->draw_ctx_deinit = lv_draw_sdl_deinit_ctx;
@@ -173,6 +184,10 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver)
disp->driver = driver;
+ disp->inv_en_cnt = 1;
+
+ _lv_ll_init(&disp->sync_areas, sizeof(lv_area_t));
+
lv_disp_t * disp_def_tmp = disp_def;
disp_def = disp; /*Temporarily change the default screen to create the default screens on the
new display*/
@@ -303,6 +318,7 @@ void lv_disp_remove(lv_disp_t * disp)
}
_lv_ll_remove(&LV_GC_ROOT(_lv_disp_ll), disp);
+ _lv_ll_clear(&disp->sync_areas);
if(disp->refr_timer) lv_timer_del(disp->refr_timer);
lv_mem_free(disp);
@@ -500,20 +516,8 @@ lv_coord_t lv_disp_get_dpi(const lv_disp_t * disp)
* Call in the display driver's `flush_cb` function when the flushing is finished
* @param disp_drv pointer to display driver in `flush_cb` where this function is called
*/
-LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv)
+void LV_ATTRIBUTE_FLUSH_READY lv_disp_flush_ready(lv_disp_drv_t * disp_drv)
{
- /*If the screen is transparent initialize it when the flushing is ready*/
-#if LV_COLOR_SCREEN_TRANSP
- if(disp_drv->screen_transp) {
- if(disp_drv->clear_cb) {
- disp_drv->clear_cb(disp_drv, disp_drv->draw_buf->buf_act, disp_drv->draw_buf->size);
- }
- else {
- lv_memset_00(disp_drv->draw_buf->buf_act, disp_drv->draw_buf->size * sizeof(lv_color32_t));
- }
- }
-#endif
-
disp_drv->draw_buf->flushing = 0;
disp_drv->draw_buf->flushing_last = 0;
}
@@ -524,7 +528,7 @@ LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv)
* @param disp_drv pointer to display driver
* @return true: it's the last area to flush; false: there are other areas too which will be refreshed soon
*/
-LV_ATTRIBUTE_FLUSH_READY bool lv_disp_flush_is_last(lv_disp_drv_t * disp_drv)
+bool LV_ATTRIBUTE_FLUSH_READY lv_disp_flush_is_last(lv_disp_drv_t * disp_drv)
{
return disp_drv->draw_buf->flushing_last;
}
@@ -682,28 +686,35 @@ static void set_px_alpha_generic(lv_img_dsc_t * d, lv_coord_t x, lv_coord_t y, l
lv_img_buf_set_px_alpha(d, x, y, br);
}
-static void set_px_true_color_alpha(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x,
- lv_coord_t y,
+static void set_px_true_color_alpha(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w,
+ lv_coord_t x, lv_coord_t y,
lv_color_t color, lv_opa_t opa)
{
(void) disp_drv; /*Unused*/
- if(opa <= LV_OPA_MIN) return;
- lv_img_dsc_t d;
- d.data = buf;
- d.header.always_zero = 0;
- d.header.h = 1; /*Doesn't matter*/;
- d.header.w = buf_w;
- d.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
+ uint8_t * buf_px = buf + (buf_w * y * LV_IMG_PX_SIZE_ALPHA_BYTE + x * LV_IMG_PX_SIZE_ALPHA_BYTE);
- lv_color_t bg_color = lv_img_buf_get_px_color(&d, x, y, lv_color_black());
- lv_opa_t bg_opa = lv_img_buf_get_px_alpha(&d, x, y);
-
- lv_opa_t res_opa;
+ lv_color_t bg_color;
lv_color_t res_color;
+ lv_opa_t bg_opa = buf_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
+#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
+ bg_color.full = buf_px[0];
+ lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &buf_px[2]);
+ if(buf_px[1] <= LV_OPA_MIN) return;
+ buf_px[0] = res_color.full;
+#elif LV_COLOR_DEPTH == 16
+ bg_color.full = buf_px[0] + (buf_px[1] << 8);
+ lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &buf_px[2]);
+ if(buf_px[2] <= LV_OPA_MIN) return;
+ buf_px[0] = res_color.full & 0xff;
+ buf_px[1] = res_color.full >> 8;
+#elif LV_COLOR_DEPTH == 32
+ bg_color = *((lv_color_t *)buf_px);
+ lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &buf_px[3]);
+ if(buf_px[3] <= LV_OPA_MIN) return;
+ buf_px[0] = res_color.ch.blue;
+ buf_px[1] = res_color.ch.green;
+ buf_px[2] = res_color.ch.red;
+#endif
- lv_color_mix_with_alpha(bg_color, bg_opa, color, opa, &res_color, &res_opa);
-
- lv_img_buf_set_px_alpha(&d, x, y, res_opa);
- lv_img_buf_set_px_color(&d, x, y, res_color);
}
diff --git a/lib/lvgl/src/hal/lv_hal_disp.h b/lib/lvgl/src/hal/lv_hal_disp.h
index 75ddd86..d942860 100644
--- a/lib/lvgl/src/hal/lv_hal_disp.h
+++ b/lib/lvgl/src/hal/lv_hal_disp.h
@@ -23,6 +23,7 @@ extern "C" {
#include "../misc/lv_area.h"
#include "../misc/lv_ll.h"
#include "../misc/lv_timer.h"
+#include "../misc/lv_ll.h"
/*********************
* DEFINES
@@ -117,7 +118,6 @@ typedef struct _lv_disp_drv_t {
void (*clear_cb)(struct _lv_disp_drv_t * disp_drv, uint8_t * buf, uint32_t size);
-
/** OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the
* number of flushed pixels*/
void (*monitor_cb)(struct _lv_disp_drv_t * disp_drv, uint32_t time, uint32_t px);
@@ -173,10 +173,8 @@ typedef struct _lv_disp_t {
struct _lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top*/
struct _lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys*/
uint32_t screen_cnt;
-uint8_t draw_prev_over_act :
- 1; /**< 1: Draw previous screen over active screen*/
-uint8_t del_prev :
- 1; /**< 1: Automatically delete the previous screen when the screen load animation is ready*/
+ uint8_t draw_prev_over_act : 1; /**< 1: Draw previous screen over active screen*/
+ uint8_t del_prev : 1; /**< 1: Automatically delete the previous screen when the screen load anim. is ready*/
uint8_t rendering_in_progress : 1; /**< 1: The current screen rendering is in progress*/
lv_opa_t bg_opa; /**0 to cache this number of bytes in lv_fs_read()*/
+ #define LV_FS_STDIO_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
#endif
#endif
#endif
@@ -1943,7 +2037,7 @@
#ifdef CONFIG_LV_FS_POSIX_CACHE_SIZE
#define LV_FS_POSIX_CACHE_SIZE CONFIG_LV_FS_POSIX_CACHE_SIZE
#else
- #define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+ #define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
#endif
#endif
#endif
@@ -1961,7 +2055,7 @@
#ifdef CONFIG_LV_FS_WIN32_LETTER
#define LV_FS_WIN32_LETTER CONFIG_LV_FS_WIN32_LETTER
#else
- #define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#endif
#endif
#ifndef LV_FS_WIN32_PATH
@@ -1985,7 +2079,7 @@
#ifdef CONFIG_LV_USE_FS_FATFS
#define LV_USE_FS_FATFS CONFIG_LV_USE_FS_FATFS
#else
- #define LV_USE_FS_FATFS 0
+ #define LV_USE_FS_FATFS 0
#endif
#endif
#if LV_USE_FS_FATFS
@@ -2005,6 +2099,31 @@
#endif
#endif
+/*API for LittleFS (library needs to be added separately). Uses lfs_file_open, lfs_file_read, etc*/
+#ifndef LV_USE_FS_LITTLEFS
+ #ifdef CONFIG_LV_USE_FS_LITTLEFS
+ #define LV_USE_FS_LITTLEFS CONFIG_LV_USE_FS_LITTLEFS
+ #else
+ #define LV_USE_FS_LITTLEFS 0
+ #endif
+#endif
+#if LV_USE_FS_LITTLEFS
+ #ifndef LV_FS_LITTLEFS_LETTER
+ #ifdef CONFIG_LV_FS_LITTLEFS_LETTER
+ #define LV_FS_LITTLEFS_LETTER CONFIG_LV_FS_LITTLEFS_LETTER
+ #else
+ #define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
+ #endif
+ #endif
+ #ifndef LV_FS_LITTLEFS_CACHE_SIZE
+ #ifdef CONFIG_LV_FS_LITTLEFS_CACHE_SIZE
+ #define LV_FS_LITTLEFS_CACHE_SIZE CONFIG_LV_FS_LITTLEFS_CACHE_SIZE
+ #else
+ #define LV_FS_LITTLEFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
+ #endif
+ #endif
+#endif
+
/*PNG decoder library*/
#ifndef LV_USE_PNG
#ifdef CONFIG_LV_USE_PNG
@@ -2098,6 +2217,25 @@
#endif
#endif
+/*Tiny TTF library*/
+#ifndef LV_USE_TINY_TTF
+ #ifdef CONFIG_LV_USE_TINY_TTF
+ #define LV_USE_TINY_TTF CONFIG_LV_USE_TINY_TTF
+ #else
+ #define LV_USE_TINY_TTF 0
+ #endif
+#endif
+#if LV_USE_TINY_TTF
+ /*Load TTF data from files*/
+ #ifndef LV_TINY_TTF_FILE_SUPPORT
+ #ifdef CONFIG_LV_TINY_TTF_FILE_SUPPORT
+ #define LV_TINY_TTF_FILE_SUPPORT CONFIG_LV_TINY_TTF_FILE_SUPPORT
+ #else
+ #define LV_TINY_TTF_FILE_SUPPORT 0
+ #endif
+ #endif
+#endif
+
/*Rlottie library*/
#ifndef LV_USE_RLOTTIE
#ifdef CONFIG_LV_USE_RLOTTIE
@@ -2113,7 +2251,7 @@
#ifdef CONFIG_LV_USE_FFMPEG
#define LV_USE_FFMPEG CONFIG_LV_USE_FFMPEG
#else
- #define LV_USE_FFMPEG 0
+ #define LV_USE_FFMPEG 0
#endif
#endif
#if LV_USE_FFMPEG
@@ -2145,7 +2283,7 @@
#ifdef CONFIG_LV_USE_MONKEY
#define LV_USE_MONKEY CONFIG_LV_USE_MONKEY
#else
- #define LV_USE_MONKEY 0
+ #define LV_USE_MONKEY 0
#endif
#endif
@@ -2154,7 +2292,7 @@
#ifdef CONFIG_LV_USE_GRIDNAV
#define LV_USE_GRIDNAV CONFIG_LV_USE_GRIDNAV
#else
- #define LV_USE_GRIDNAV 0
+ #define LV_USE_GRIDNAV 0
#endif
#endif
@@ -2185,6 +2323,62 @@
#endif
#endif
+/*1: Enable Pinyin input method*/
+/*Requires: lv_keyboard*/
+#ifndef LV_USE_IME_PINYIN
+ #ifdef CONFIG_LV_USE_IME_PINYIN
+ #define LV_USE_IME_PINYIN CONFIG_LV_USE_IME_PINYIN
+ #else
+ #define LV_USE_IME_PINYIN 0
+ #endif
+#endif
+#if LV_USE_IME_PINYIN
+ /*1: Use default thesaurus*/
+ /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
+ #ifndef LV_IME_PINYIN_USE_DEFAULT_DICT
+ #ifdef _LV_KCONFIG_PRESENT
+ #ifdef CONFIG_LV_IME_PINYIN_USE_DEFAULT_DICT
+ #define LV_IME_PINYIN_USE_DEFAULT_DICT CONFIG_LV_IME_PINYIN_USE_DEFAULT_DICT
+ #else
+ #define LV_IME_PINYIN_USE_DEFAULT_DICT 0
+ #endif
+ #else
+ #define LV_IME_PINYIN_USE_DEFAULT_DICT 1
+ #endif
+ #endif
+ /*Set the maximum number of candidate panels that can be displayed*/
+ /*This needs to be adjusted according to the size of the screen*/
+ #ifndef LV_IME_PINYIN_CAND_TEXT_NUM
+ #ifdef CONFIG_LV_IME_PINYIN_CAND_TEXT_NUM
+ #define LV_IME_PINYIN_CAND_TEXT_NUM CONFIG_LV_IME_PINYIN_CAND_TEXT_NUM
+ #else
+ #define LV_IME_PINYIN_CAND_TEXT_NUM 6
+ #endif
+ #endif
+
+ /*Use 9 key input(k9)*/
+ #ifndef LV_IME_PINYIN_USE_K9_MODE
+ #ifdef _LV_KCONFIG_PRESENT
+ #ifdef CONFIG_LV_IME_PINYIN_USE_K9_MODE
+ #define LV_IME_PINYIN_USE_K9_MODE CONFIG_LV_IME_PINYIN_USE_K9_MODE
+ #else
+ #define LV_IME_PINYIN_USE_K9_MODE 0
+ #endif
+ #else
+ #define LV_IME_PINYIN_USE_K9_MODE 1
+ #endif
+ #endif
+ #if LV_IME_PINYIN_USE_K9_MODE == 1
+ #ifndef LV_IME_PINYIN_K9_CAND_TEXT_NUM
+ #ifdef CONFIG_LV_IME_PINYIN_K9_CAND_TEXT_NUM
+ #define LV_IME_PINYIN_K9_CAND_TEXT_NUM CONFIG_LV_IME_PINYIN_K9_CAND_TEXT_NUM
+ #else
+ #define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
+ #endif
+ #endif
+ #endif // LV_IME_PINYIN_USE_K9_MODE
+#endif
+
/*==================
* EXAMPLES
*==================*/
@@ -2211,7 +2405,7 @@
#ifdef CONFIG_LV_USE_DEMO_WIDGETS
#define LV_USE_DEMO_WIDGETS CONFIG_LV_USE_DEMO_WIDGETS
#else
- #define LV_USE_DEMO_WIDGETS 0
+ #define LV_USE_DEMO_WIDGETS 0
#endif
#endif
#if LV_USE_DEMO_WIDGETS
@@ -2219,7 +2413,7 @@
#ifdef CONFIG_LV_DEMO_WIDGETS_SLIDESHOW
#define LV_DEMO_WIDGETS_SLIDESHOW CONFIG_LV_DEMO_WIDGETS_SLIDESHOW
#else
- #define LV_DEMO_WIDGETS_SLIDESHOW 0
+ #define LV_DEMO_WIDGETS_SLIDESHOW 0
#endif
#endif
#endif
@@ -2229,7 +2423,7 @@
#ifdef CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
#define LV_USE_DEMO_KEYPAD_AND_ENCODER CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
#else
- #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
+ #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
#endif
#endif
@@ -2238,16 +2432,26 @@
#ifdef CONFIG_LV_USE_DEMO_BENCHMARK
#define LV_USE_DEMO_BENCHMARK CONFIG_LV_USE_DEMO_BENCHMARK
#else
- #define LV_USE_DEMO_BENCHMARK 0
+ #define LV_USE_DEMO_BENCHMARK 0
#endif
#endif
+#if LV_USE_DEMO_BENCHMARK
+/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/
+#ifndef LV_DEMO_BENCHMARK_RGB565A8
+ #ifdef CONFIG_LV_DEMO_BENCHMARK_RGB565A8
+ #define LV_DEMO_BENCHMARK_RGB565A8 CONFIG_LV_DEMO_BENCHMARK_RGB565A8
+ #else
+ #define LV_DEMO_BENCHMARK_RGB565A8 0
+ #endif
+#endif
+#endif
/*Stress test for LVGL*/
#ifndef LV_USE_DEMO_STRESS
#ifdef CONFIG_LV_USE_DEMO_STRESS
#define LV_USE_DEMO_STRESS CONFIG_LV_USE_DEMO_STRESS
#else
- #define LV_USE_DEMO_STRESS 0
+ #define LV_USE_DEMO_STRESS 0
#endif
#endif
@@ -2256,46 +2460,46 @@
#ifdef CONFIG_LV_USE_DEMO_MUSIC
#define LV_USE_DEMO_MUSIC CONFIG_LV_USE_DEMO_MUSIC
#else
- #define LV_USE_DEMO_MUSIC 0
+ #define LV_USE_DEMO_MUSIC 0
#endif
#endif
#if LV_USE_DEMO_MUSIC
-#ifndef LV_DEMO_MUSIC_SQUARE
- #ifdef CONFIG_LV_DEMO_MUSIC_SQUARE
- #define LV_DEMO_MUSIC_SQUARE CONFIG_LV_DEMO_MUSIC_SQUARE
- #else
- #define LV_DEMO_MUSIC_SQUARE 0
+ #ifndef LV_DEMO_MUSIC_SQUARE
+ #ifdef CONFIG_LV_DEMO_MUSIC_SQUARE
+ #define LV_DEMO_MUSIC_SQUARE CONFIG_LV_DEMO_MUSIC_SQUARE
+ #else
+ #define LV_DEMO_MUSIC_SQUARE 0
+ #endif
#endif
-#endif
-#ifndef LV_DEMO_MUSIC_LANDSCAPE
- #ifdef CONFIG_LV_DEMO_MUSIC_LANDSCAPE
- #define LV_DEMO_MUSIC_LANDSCAPE CONFIG_LV_DEMO_MUSIC_LANDSCAPE
- #else
- #define LV_DEMO_MUSIC_LANDSCAPE 0
+ #ifndef LV_DEMO_MUSIC_LANDSCAPE
+ #ifdef CONFIG_LV_DEMO_MUSIC_LANDSCAPE
+ #define LV_DEMO_MUSIC_LANDSCAPE CONFIG_LV_DEMO_MUSIC_LANDSCAPE
+ #else
+ #define LV_DEMO_MUSIC_LANDSCAPE 0
+ #endif
#endif
-#endif
-#ifndef LV_DEMO_MUSIC_ROUND
- #ifdef CONFIG_LV_DEMO_MUSIC_ROUND
- #define LV_DEMO_MUSIC_ROUND CONFIG_LV_DEMO_MUSIC_ROUND
- #else
- #define LV_DEMO_MUSIC_ROUND 0
+ #ifndef LV_DEMO_MUSIC_ROUND
+ #ifdef CONFIG_LV_DEMO_MUSIC_ROUND
+ #define LV_DEMO_MUSIC_ROUND CONFIG_LV_DEMO_MUSIC_ROUND
+ #else
+ #define LV_DEMO_MUSIC_ROUND 0
+ #endif
#endif
-#endif
-#ifndef LV_DEMO_MUSIC_LARGE
- #ifdef CONFIG_LV_DEMO_MUSIC_LARGE
- #define LV_DEMO_MUSIC_LARGE CONFIG_LV_DEMO_MUSIC_LARGE
- #else
- #define LV_DEMO_MUSIC_LARGE 0
+ #ifndef LV_DEMO_MUSIC_LARGE
+ #ifdef CONFIG_LV_DEMO_MUSIC_LARGE
+ #define LV_DEMO_MUSIC_LARGE CONFIG_LV_DEMO_MUSIC_LARGE
+ #else
+ #define LV_DEMO_MUSIC_LARGE 0
+ #endif
#endif
-#endif
-#ifndef LV_DEMO_MUSIC_AUTO_PLAY
- #ifdef CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
- #define LV_DEMO_MUSIC_AUTO_PLAY CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
- #else
- #define LV_DEMO_MUSIC_AUTO_PLAY 0
+ #ifndef LV_DEMO_MUSIC_AUTO_PLAY
+ #ifdef CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
+ #define LV_DEMO_MUSIC_AUTO_PLAY CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
+ #else
+ #define LV_DEMO_MUSIC_AUTO_PLAY 0
+ #endif
#endif
#endif
-#endif
diff --git a/lib/lvgl/src/lv_conf_kconfig.h b/lib/lvgl/src/lv_conf_kconfig.h
index 7424789..80f7061 100644
--- a/lib/lvgl/src/lv_conf_kconfig.h
+++ b/lib/lvgl/src/lv_conf_kconfig.h
@@ -41,6 +41,50 @@ extern "C" {
# define CONFIG_LV_MEM_SIZE (CONFIG_LV_MEM_SIZE_KILOBYTES * 1024U)
#endif
+/*------------------
+ * MONITOR POSITION
+ *-----------------*/
+
+#ifdef CONFIG_LV_PERF_MONITOR_ALIGN_TOP_LEFT
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_LEFT
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_TOP_MID)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_MID
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_TOP_RIGHT)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_RIGHT
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_LEFT)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_MID)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_MID
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_RIGHT)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_LEFT_MID)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_LEFT_MID
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_RIGHT_MID)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_RIGHT_MID
+#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_CENTER)
+# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_CENTER
+#endif
+
+#ifdef CONFIG_LV_MEM_MONITOR_ALIGN_TOP_LEFT
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_LEFT
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_TOP_MID)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_MID
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_TOP_RIGHT)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_RIGHT
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_LEFT)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_MID)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_MID
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_RIGHT)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_LEFT_MID)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_LEFT_MID
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_RIGHT_MID)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_RIGHT_MID
+#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_CENTER)
+# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_CENTER
+#endif
+
/********************
* FONT SELECTION
*******************/
@@ -131,50 +175,6 @@ extern "C" {
# define CONFIG_LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
#endif
-/*------------------
- * MONITOR POSITION
- *-----------------*/
-
-#ifdef CONFIG_LV_PERF_MONITOR_ALIGN_TOP_LEFT
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_LEFT
-#elif defined(CONFIG_LV_USE_PERF_MONITOR_ALIGN_TOP_MID)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_MID
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_TOP_RIGHT)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_TOP_RIGHT
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_LEFT)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_MID)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_MID
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_BOTTOM_RIGHT)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_LEFT_MID)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_LEFT_MID
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_RIGHT_MID)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_RIGHT_MID
-#elif defined(CONFIG_LV_PERF_MONITOR_ALIGN_CENTER)
-# define CONFIG_LV_USE_PERF_MONITOR_POS LV_ALIGN_CENTER
-#endif
-
-#ifdef CONFIG_LV_MEM_MONITOR_ALIGN_TOP_LEFT
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_LEFT
-#elif defined(CONFIG_LV_USE_MEM_MONITOR_ALIGN_TOP_MID)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_MID
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_TOP_RIGHT)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_TOP_RIGHT
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_LEFT)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_MID)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_MID
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_BOTTOM_RIGHT)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_LEFT_MID)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_LEFT_MID
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_RIGHT_MID)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_RIGHT_MID
-#elif defined(CONFIG_LV_MEM_MONITOR_ALIGN_CENTER)
-# define CONFIG_LV_USE_MEM_MONITOR_POS LV_ALIGN_CENTER
-#endif
-
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/lvgl/src/misc/lv_anim.c b/lib/lvgl/src/misc/lv_anim.c
index ecb9584..9291cf4 100644
--- a/lib/lvgl/src/misc/lv_anim.c
+++ b/lib/lvgl/src/misc/lv_anim.c
@@ -49,7 +49,6 @@ static lv_timer_t * _lv_anim_tmr;
#define TRACE_ANIM(...)
#endif
-
/**********************
* GLOBAL FUNCTIONS
**********************/
@@ -147,6 +146,7 @@ bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb)
if((a->var == var || var == NULL) && (a->exec_cb == exec_cb || exec_cb == NULL)) {
_lv_ll_remove(&LV_GC_ROOT(_lv_anim_ll), a);
+ if(a->deleted_cb != NULL) a->deleted_cb(a);
lv_mem_free(a);
anim_mark_list_change(); /*Read by `anim_timer`. It need to know if a delete occurred in
the linked list*/
@@ -177,6 +177,11 @@ lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb)
return NULL;
}
+struct _lv_timer_t * lv_anim_get_timer(void)
+{
+ return _lv_anim_tmr;
+}
+
uint16_t lv_anim_count_running(void)
{
uint16_t cnt = 0;
@@ -429,6 +434,7 @@ static void anim_ready_handler(lv_anim_t * a)
/*Call the callback function at the end*/
if(a->ready_cb != NULL) a->ready_cb(a);
+ if(a->deleted_cb != NULL) a->deleted_cb(a);
lv_mem_free(a);
}
/*If the animation is not deleted then restart it*/
diff --git a/lib/lvgl/src/misc/lv_anim.h b/lib/lvgl/src/misc/lv_anim.h
index 18317eb..faef727 100644
--- a/lib/lvgl/src/misc/lv_anim.h
+++ b/lib/lvgl/src/misc/lv_anim.h
@@ -40,6 +40,7 @@ typedef enum {
} lv_anim_enable_t;
struct _lv_anim_t;
+struct _lv_timer_t;
/** Get the current value during an animation*/
typedef int32_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *);
@@ -65,12 +66,16 @@ typedef void (*lv_anim_start_cb_t)(struct _lv_anim_t *);
/** Callback used when the animation values are relative to get the current value*/
typedef int32_t (*lv_anim_get_value_cb_t)(struct _lv_anim_t *);
+/** Callback used when the animation is deleted*/
+typedef void (*lv_anim_deleted_cb_t)(struct _lv_anim_t *);
+
/** Describes an animation*/
typedef struct _lv_anim_t {
void * var; /**ready_cb = ready_cb;
}
+/**
+ * Set a function call when the animation is deleted.
+ * @param a pointer to an initialized `lv_anim_t` variable
+ * @param deleted_cb a function call when the animation is deleted
+ */
+static inline void lv_anim_set_deleted_cb(lv_anim_t * a, lv_anim_deleted_cb_t deleted_cb)
+{
+ a->deleted_cb = deleted_cb;
+}
+
/**
* Make the animation to play back to when the forward direction is ready
* @param a pointer to an initialized `lv_anim_t` variable
@@ -345,6 +360,12 @@ void lv_anim_del_all(void);
*/
lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb);
+/**
+ * Get global animation refresher timer.
+ * @return pointer to the animation refresher timer.
+ */
+struct _lv_timer_t * lv_anim_get_timer(void);
+
/**
* Delete an animation by getting the animated variable from `a`.
* Only animations with `exec_cb` will be deleted.
diff --git a/lib/lvgl/src/misc/lv_area.c b/lib/lvgl/src/misc/lv_area.c
index 7c66a9b..9226235 100644
--- a/lib/lvgl/src/misc/lv_area.c
+++ b/lib/lvgl/src/misc/lv_area.c
@@ -143,6 +143,78 @@ bool _lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area
return union_ok;
}
+/**
+ * Get resulting sub areas after removing the common parts of two areas from the first area
+ * @param res_p pointer to an array of areas with a count of 4, the resulting areas will be stored here
+ * @param a1_p pointer to the first area
+ * @param a2_p pointer to the second area
+ * @return number of results or -1 if no intersect
+ */
+int8_t _lv_area_diff(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p)
+{
+ /*Areas have no common parts*/
+ if(!_lv_area_is_on(a1_p, a2_p)) return -1;
+
+ /*No remaining areas after removing common parts*/
+ if(_lv_area_is_in(a1_p, a2_p, 0)) return 0;
+
+ /*Result counter*/
+ int8_t res_c = 0;
+
+ /*Get required information*/
+ lv_area_t n;
+ lv_coord_t a1_w = lv_area_get_width(a1_p) - 1;
+ lv_coord_t a1_h = lv_area_get_height(a1_p) - 1;
+
+ /*Compute top rectangle*/
+ lv_coord_t th = a2_p->y1 - a1_p->y1;
+ if(th > 0) {
+ n.x1 = a1_p->x1;
+ n.y1 = a1_p->y1;
+ n.x2 = a1_p->x2;
+ n.y2 = a1_p->y1 + th;
+ res_p[res_c++] = n;
+ }
+
+ /*Compute the bottom rectangle*/
+ lv_coord_t bh = a1_h - (a2_p->y2 - a1_p->y1);
+ if(bh > 0 && a2_p->y2 < a1_p->y2) {
+ n.x1 = a1_p->x1;
+ n.y1 = a2_p->y2;
+ n.x2 = a1_p->x2;
+ n.y2 = a2_p->y2 + bh;
+ res_p[res_c++] = n;
+ }
+
+ /*Compute side height*/
+ lv_coord_t y1 = a2_p->y1 > a1_p->y1 ? a2_p->y1 : a1_p->y1;
+ lv_coord_t y2 = a2_p->y2 < a1_p->y2 ? a2_p->y2 : a1_p->y2;
+ lv_coord_t sh = y2 - y1;
+
+ /*Compute the left rectangle*/
+ lv_coord_t lw = a2_p->x1 - a1_p->x1;
+ if(lw > 0 && sh > 0) {
+ n.x1 = a1_p->x1;
+ n.y1 = y1;
+ n.x2 = a1_p->x1 + lw;
+ n.y2 = y1 + sh;
+ res_p[res_c++] = n;
+ }
+
+ /*Compute the right rectangle*/
+ lv_coord_t rw = a1_w - (a2_p->x2 - a1_p->x1);
+ if(rw > 0) {
+ n.x1 = a2_p->x2;
+ n.y1 = y1;
+ n.x2 = a2_p->x2 + rw;
+ n.y2 = y1 + sh;
+ res_p[res_c++] = n;
+ }
+
+ //Return number of results
+ return res_c;
+}
+
/**
* Join two areas into a third which involves the other two
* @param res_p pointer to an area, the result will be stored here
@@ -456,6 +528,58 @@ void lv_area_align(const lv_area_t * base, lv_area_t * to_align, lv_align_t alig
to_align->y2 = to_align->y1 + h - 1;
}
+#define _LV_TRANSFORM_TRIGO_SHIFT 10
+void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_point_t * pivot)
+{
+ if(angle == 0 && zoom == 256) {
+ return;
+ }
+
+ p->x -= pivot->x;
+ p->y -= pivot->y;
+
+ if(angle == 0) {
+ p->x = (((int32_t)(p->x) * zoom) >> 8) + pivot->x;
+ p->y = (((int32_t)(p->y) * zoom) >> 8) + pivot->y;
+ return;
+ }
+
+ static int32_t angle_prev = INT32_MIN;
+ static int32_t sinma;
+ static int32_t cosma;
+ if(angle_prev != angle) {
+ int32_t angle_limited = angle;
+ if(angle_limited > 3600) angle_limited -= 3600;
+ if(angle_limited < 0) angle_limited += 3600;
+
+ int32_t angle_low = angle_limited / 10;
+ int32_t angle_high = angle_low + 1;
+ int32_t angle_rem = angle_limited - (angle_low * 10);
+
+ int32_t s1 = lv_trigo_sin(angle_low);
+ int32_t s2 = lv_trigo_sin(angle_high);
+
+ int32_t c1 = lv_trigo_sin(angle_low + 90);
+ int32_t c2 = lv_trigo_sin(angle_high + 90);
+
+ sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10;
+ cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10;
+ sinma = sinma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
+ cosma = cosma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
+ angle_prev = angle;
+ }
+ int32_t x = p->x;
+ int32_t y = p->y;
+ if(zoom == 256) {
+ p->x = ((cosma * x - sinma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
+ p->y = ((sinma * x + cosma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
+ }
+ else {
+ p->x = (((cosma * x - sinma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x;
+ p->y = (((sinma * x + cosma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y;
+ }
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/misc/lv_area.h b/lib/lvgl/src/misc/lv_area.h
index 542d86b..b30eabe 100644
--- a/lib/lvgl/src/misc/lv_area.h
+++ b/lib/lvgl/src/misc/lv_area.h
@@ -177,6 +177,15 @@ void lv_area_move(lv_area_t * area, lv_coord_t x_ofs, lv_coord_t y_ofs);
*/
bool _lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p);
+/**
+ * Get resulting sub areas after removing the common parts of two areas from the first area
+ * @param res_p pointer to an array of areas with a count of 4, the resulting areas will be stored here
+ * @param a1_p pointer to the first area
+ * @param a2_p pointer to the second area
+ * @return number of results (max 4) or -1 if no intersect
+ */
+int8_t _lv_area_diff(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p);
+
/**
* Join two areas into a third which involves the other two
* @param res_p pointer to an area, the result will be stored here
@@ -211,7 +220,6 @@ bool _lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p);
*/
bool _lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p, lv_coord_t radius);
-
/**
* Check if an area is fully out of an other
* @param aout_p pointer to an area which could be in 'aholder_p'
@@ -236,6 +244,8 @@ bool _lv_area_is_equal(const lv_area_t * a, const lv_area_t * b);
*/
void lv_area_align(const lv_area_t * base, lv_area_t * to_align, lv_align_t align, lv_coord_t ofs_x, lv_coord_t ofs_y);
+void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_point_t * pivot);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/misc/lv_async.c b/lib/lvgl/src/misc/lv_async.c
index 45a0431..c4941e8 100644
--- a/lib/lvgl/src/misc/lv_async.c
+++ b/lib/lvgl/src/misc/lv_async.c
@@ -65,6 +65,33 @@ lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data)
return LV_RES_OK;
}
+lv_res_t lv_async_call_cancel(lv_async_cb_t async_xcb, void * user_data)
+{
+ lv_timer_t * timer = lv_timer_get_next(NULL);
+ lv_res_t res = LV_RES_INV;
+
+ while(timer != NULL) {
+ /*Find the next timer node*/
+ lv_timer_t * timer_next = lv_timer_get_next(timer);
+
+ /*Find async timer callback*/
+ if(timer->timer_cb == lv_async_timer_cb) {
+ lv_async_info_t * info = (lv_async_info_t *)timer->user_data;
+
+ /*Match user function callback and user data*/
+ if(info->cb == async_xcb && info->user_data == user_data) {
+ lv_timer_del(timer);
+ lv_mem_free(info);
+ res = LV_RES_OK;
+ }
+ }
+
+ timer = timer_next;
+ }
+
+ return res;
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/lvgl/src/misc/lv_async.h b/lib/lvgl/src/misc/lv_async.h
index 3e6cb63..4ad5756 100644
--- a/lib/lvgl/src/misc/lv_async.h
+++ b/lib/lvgl/src/misc/lv_async.h
@@ -43,6 +43,13 @@ typedef void (*lv_async_cb_t)(void *);
*/
lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data);
+/**
+ * Cancel an asynchronous function call
+ * @param async_xcb a callback which is the task itself.
+ * @param user_data custom parameter
+ */
+lv_res_t lv_async_call_cancel(lv_async_cb_t async_xcb, void * user_data);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/misc/lv_bidi.c b/lib/lvgl/src/misc/lv_bidi.c
index 3dc3ce7..70af1c4 100644
--- a/lib/lvgl/src/misc/lv_bidi.c
+++ b/lib/lvgl/src/misc/lv_bidi.c
@@ -376,7 +376,6 @@ static bool lv_bidi_letter_is_weak(uint32_t letter)
*/
static bool lv_bidi_letter_is_rtl(uint32_t letter)
{
- if(letter >= 0x5d0 && letter <= 0x5ea) return true;
if(letter == 0x202E) return true; /*Unicode of LV_BIDI_RLO*/
/*Check for Persian and Arabic characters [https://en.wikipedia.org/wiki/Arabic_script_in_Unicode]*/
@@ -384,6 +383,10 @@ static bool lv_bidi_letter_is_rtl(uint32_t letter)
if(letter >= 0xFB50 && letter <= 0xFDFF) return true;
if(letter >= 0xFE70 && letter <= 0xFEFF) return true;
+ /*Check for Hebrew characters [https://en.wikipedia.org/wiki/Unicode_and_HTML_for_the_Hebrew_alphabet]*/
+ if(letter >= 0x590 && letter <= 0x5FF) return true;
+ if(letter >= 0xFB1D && letter <= 0xFB4F) return true;
+
return false;
}
diff --git a/lib/lvgl/src/misc/lv_bidi.h b/lib/lvgl/src/misc/lv_bidi.h
index a27b580..b75308e 100644
--- a/lib/lvgl/src/misc/lv_bidi.h
+++ b/lib/lvgl/src/misc/lv_bidi.h
@@ -113,7 +113,6 @@ void _lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t le
*/
void lv_bidi_calculate_align(lv_text_align_t * align, lv_base_dir_t * base_dir, const char * txt);
-
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/misc/lv_color.c b/lib/lvgl/src/misc/lv_color.c
index 0e26624..9ad5a14 100644
--- a/lib/lvgl/src/misc/lv_color.c
+++ b/lib/lvgl/src/misc/lv_color.c
@@ -33,7 +33,7 @@
* GLOBAL FUNCTIONS
**********************/
-LV_ATTRIBUTE_FAST_MEM void lv_color_fill(lv_color_t * buf, lv_color_t color, uint32_t px_num)
+void LV_ATTRIBUTE_FAST_MEM lv_color_fill(lv_color_t * buf, lv_color_t color, uint32_t px_num)
{
#if LV_COLOR_DEPTH == 16
uintptr_t buf_int = (uintptr_t)buf;
diff --git a/lib/lvgl/src/misc/lv_color.h b/lib/lvgl/src/misc/lv_color.h
index b02660e..522d15c 100644
--- a/lib/lvgl/src/misc/lv_color.h
+++ b/lib/lvgl/src/misc/lv_color.h
@@ -23,10 +23,6 @@ extern "C" {
#error "LV_COLOR_DEPTH 24 is deprecated. Use LV_COLOR_DEPTH 32 instead (lv_conf.h)"
#endif
-#if LV_COLOR_DEPTH != 32 && LV_COLOR_SCREEN_TRANSP != 0
-#error "LV_COLOR_SCREEN_TRANSP requires LV_COLOR_DEPTH == 32. Set it in lv_conf.h"
-#endif
-
#if LV_COLOR_DEPTH != 16 && LV_COLOR_16_SWAP != 0
#error "LV_COLOR_16_SWAP requires LV_COLOR_DEPTH == 16. Set it in lv_conf.h"
#endif
@@ -258,7 +254,6 @@ typedef struct _lv_color_filter_dsc_t {
void * user_data;
} lv_color_filter_dsc_t;
-
typedef enum {
LV_PALETTE_RED,
LV_PALETTE_PINK,
@@ -440,18 +435,25 @@ static inline uint32_t lv_color_to32(lv_color_t color)
* @param mix The ratio of the colors. 0: full `c2`, 255: full `c1`, 127: half `c1` and half`c2`
* @return the mixed color
*/
-LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix)
+static inline lv_color_t LV_ATTRIBUTE_FAST_MEM lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix)
{
lv_color_t ret;
-#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
+#if LV_COLOR_DEPTH == 16 && LV_COLOR_MIX_ROUND_OFS == 0
+#if LV_COLOR_16_SWAP == 1
+ c1.full = c1.full << 8 | c1.full >> 8;
+ c2.full = c2.full << 8 | c2.full >> 8;
+#endif
/*Source: https://stackoverflow.com/a/50012418/1999969*/
- mix = (mix + 4) >> 3;
+ mix = (uint32_t)((uint32_t)mix + 4) >> 3;
uint32_t bg = (uint32_t)((uint32_t)c2.full | ((uint32_t)c2.full << 16)) &
0x7E0F81F; /*0b00000111111000001111100000011111*/
uint32_t fg = (uint32_t)((uint32_t)c1.full | ((uint32_t)c1.full << 16)) & 0x7E0F81F;
uint32_t result = ((((fg - bg) * mix) >> 5) + bg) & 0x7E0F81F;
ret.full = (uint16_t)((result >> 16) | result);
+#if LV_COLOR_16_SWAP == 1
+ ret.full = ret.full << 8 | ret.full >> 8;
+#endif
#elif LV_COLOR_DEPTH != 1
/*LV_COLOR_DEPTH == 8, 16 or 32*/
LV_COLOR_SET_R(ret, LV_UDIV255((uint16_t)LV_COLOR_GET_R(c1) * mix + LV_COLOR_GET_R(c2) *
@@ -469,7 +471,7 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix(lv_color_t c1, lv_co
return ret;
}
-LV_ATTRIBUTE_FAST_MEM static inline void lv_color_premult(lv_color_t c, uint8_t mix, uint16_t * out)
+static inline void LV_ATTRIBUTE_FAST_MEM lv_color_premult(lv_color_t c, uint8_t mix, uint16_t * out)
{
#if LV_COLOR_DEPTH != 1
out[0] = (uint16_t)LV_COLOR_GET_R(c) * mix;
@@ -494,7 +496,7 @@ LV_ATTRIBUTE_FAST_MEM static inline void lv_color_premult(lv_color_t c, uint8_t
* @return the mixed color
* @note 255 won't give clearly `c1`.
*/
-LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix_premult(uint16_t * premult_c1, lv_color_t c2, uint8_t mix)
+static inline lv_color_t LV_ATTRIBUTE_FAST_MEM lv_color_mix_premult(uint16_t * premult_c1, lv_color_t c2, uint8_t mix)
{
lv_color_t ret;
#if LV_COLOR_DEPTH != 1
@@ -525,7 +527,7 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix_premult(uint16_t * p
* @param res_color the result color
* @param res_opa the result opacity
*/
-LV_ATTRIBUTE_FAST_MEM static inline void lv_color_mix_with_alpha(lv_color_t bg_color, lv_opa_t bg_opa,
+static inline void LV_ATTRIBUTE_FAST_MEM lv_color_mix_with_alpha(lv_color_t bg_color, lv_opa_t bg_opa,
lv_color_t fg_color, lv_opa_t fg_opa,
lv_color_t * res_color, lv_opa_t * res_opa)
{
@@ -641,7 +643,7 @@ static inline void lv_color_filter_dsc_init(lv_color_filter_dsc_t * dsc, lv_colo
//! @cond Doxygen_Suppress
//!
-LV_ATTRIBUTE_FAST_MEM void lv_color_fill(lv_color_t * buf, lv_color_t color, uint32_t px_num);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_color_fill(lv_color_t * buf, lv_color_t color, uint32_t px_num);
//! @endcond
lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl);
diff --git a/lib/lvgl/src/misc/lv_fs.h b/lib/lvgl/src/misc/lv_fs.h
index 9f65e1b..c941402 100644
--- a/lib/lvgl/src/misc/lv_fs.h
+++ b/lib/lvgl/src/misc/lv_fs.h
@@ -57,7 +57,6 @@ enum {
};
typedef uint8_t lv_fs_mode_t;
-
/**
* Seek modes.
*/
diff --git a/lib/lvgl/src/misc/lv_lru.c b/lib/lvgl/src/misc/lv_lru.c
index 0dcbc44..b85554e 100644
--- a/lib/lvgl/src/misc/lv_lru.c
+++ b/lib/lvgl/src/misc/lv_lru.c
@@ -48,13 +48,6 @@ static int lv_lru_cmp_keys(lv_lru_item_t * item, const void * key, uint32_t key_
/** remove an item and push it to the free items queue */
static void lv_lru_remove_item(lv_lru_t * cache, lv_lru_item_t * prev, lv_lru_item_t * item, uint32_t hash_index);
-/**
- * remove the least recently used item
- *
- * @todo we can optimise this by finding the n lru items, where n = required_space / average_length
- */
-static void lv_lru_remove_lru_item(lv_lru_t * cache);
-
/** pop an existing item off the free queue, or create a new one */
static lv_lru_item_t * lv_lru_pop_or_create_item(lv_lru_t * cache);
@@ -106,13 +99,12 @@ lv_lru_t * lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_t
return cache;
}
-
void lv_lru_del(lv_lru_t * cache)
{
LV_ASSERT_NULL(cache);
// free each of the cached items, and the hash table
- lv_lru_item_t * item = NULL, *next = NULL;
+ lv_lru_item_t * item = NULL, * next = NULL;
uint32_t i = 0;
if(cache->items) {
for(; i < cache->hash_table_size; i++) {
@@ -142,7 +134,6 @@ void lv_lru_del(lv_lru_t * cache)
lv_mem_free(cache);
}
-
lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, void * value, size_t value_length)
{
test_for_missing_cache();
@@ -152,8 +143,8 @@ lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, v
// see if the key already exists
uint32_t hash_index = lv_lru_hash(cache, key, key_length);
- size_t required = 0;
- lv_lru_item_t * item = NULL, *prev = NULL;
+ int required = 0;
+ lv_lru_item_t * item = NULL, * prev = NULL;
item = cache->items[hash_index];
while(item && lv_lru_cmp_keys(item, key, key_length)) {
@@ -163,7 +154,7 @@ lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, v
if(item) {
// update the value and value_lengths
- required = (size_t)(value_length - item->value_length);
+ required = (int)(value_length - item->value_length);
cache->value_free(item->value);
item->value = value;
item->value_length = value_length;
@@ -177,7 +168,7 @@ lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, v
memcpy(item->key, key, key_length);
item->value_length = value_length;
item->key_length = key_length;
- required = (size_t) value_length;
+ required = (int) value_length;
if(prev)
prev->next = item;
@@ -195,7 +186,6 @@ lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, v
return LV_LRU_OK;
}
-
lv_lru_res_t lv_lru_get(lv_lru_t * cache, const void * key, size_t key_size, void ** value)
{
test_for_missing_cache();
@@ -225,7 +215,7 @@ lv_lru_res_t lv_lru_remove(lv_lru_t * cache, const void * key, size_t key_size)
test_for_missing_key();
// loop until we find the item, or hit the end of a chain
- lv_lru_item_t * item = NULL, *prev = NULL;
+ lv_lru_item_t * item = NULL, * prev = NULL;
uint32_t hash_index = lv_lru_hash(cache, key, key_size);
item = cache->items[hash_index];
@@ -241,6 +231,34 @@ lv_lru_res_t lv_lru_remove(lv_lru_t * cache, const void * key, size_t key_size)
return LV_LRU_OK;
}
+void lv_lru_remove_lru_item(lv_lru_t * cache)
+{
+ lv_lru_item_t * min_item = NULL, * min_prev = NULL;
+ lv_lru_item_t * item = NULL, * prev = NULL;
+ uint32_t i = 0, min_index = -1;
+ uint64_t min_access_count = -1;
+
+ for(; i < cache->hash_table_size; i++) {
+ item = cache->items[i];
+ prev = NULL;
+
+ while(item) {
+ if(item->access_count < min_access_count || (int64_t) min_access_count == -1) {
+ min_access_count = item->access_count;
+ min_item = item;
+ min_prev = prev;
+ min_index = i;
+ }
+ prev = item;
+ item = item->next;
+ }
+ }
+
+ if(min_item) {
+ lv_lru_remove_item(cache, min_prev, min_item, min_index);
+ }
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -282,18 +300,22 @@ static uint32_t lv_lru_hash(lv_lru_t * cache, const void * key, uint32_t key_len
static int lv_lru_cmp_keys(lv_lru_item_t * item, const void * key, uint32_t key_length)
{
- if(key_length != item->key_length)
+ if(key_length != item->key_length) {
return 1;
- else
+ }
+ else {
return memcmp(key, item->key, key_length);
+ }
}
static void lv_lru_remove_item(lv_lru_t * cache, lv_lru_item_t * prev, lv_lru_item_t * item, uint32_t hash_index)
{
- if(prev)
+ if(prev) {
prev->next = item->next;
- else
+ }
+ else {
cache->items[hash_index] = (lv_lru_item_t *) item->next;
+ }
// free memory and update the free memory counter
cache->free_memory += item->value_length;
@@ -306,33 +328,6 @@ static void lv_lru_remove_item(lv_lru_t * cache, lv_lru_item_t * prev, lv_lru_it
cache->free_items = item;
}
-static void lv_lru_remove_lru_item(lv_lru_t * cache)
-{
- lv_lru_item_t * min_item = NULL, *min_prev = NULL;
- lv_lru_item_t * item = NULL, *prev = NULL;
- uint32_t i = 0, min_index = -1;
- uint64_t min_access_count = -1;
-
- for(; i < cache->hash_table_size; i++) {
- item = cache->items[i];
- prev = NULL;
-
- while(item) {
- if(item->access_count < min_access_count || (int64_t) min_access_count == -1) {
- min_access_count = item->access_count;
- min_item = item;
- min_prev = prev;
- min_index = i;
- }
- prev = item;
- item = item->next;
- }
- }
-
- if(min_item)
- lv_lru_remove_item(cache, min_prev, min_item, min_index);
-}
-
static lv_lru_item_t * lv_lru_pop_or_create_item(lv_lru_t * cache)
{
lv_lru_item_t * item = NULL;
diff --git a/lib/lvgl/src/misc/lv_lru.h b/lib/lvgl/src/misc/lv_lru.h
index 07d3bd3..de0c20e 100644
--- a/lib/lvgl/src/misc/lv_lru.h
+++ b/lib/lvgl/src/misc/lv_lru.h
@@ -21,7 +21,6 @@ extern "C" {
#include
#include
-
/*********************
* DEFINES
*********************/
@@ -55,7 +54,6 @@ typedef struct lv_lru_t {
lv_lru_item_t * free_items;
} lv_lru_t;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -71,6 +69,12 @@ lv_lru_res_t lv_lru_get(lv_lru_t * cache, const void * key, size_t key_size, voi
lv_lru_res_t lv_lru_remove(lv_lru_t * cache, const void * key, size_t key_size);
+/**
+ * remove the least recently used item
+ *
+ * @todo we can optimise this by finding the n lru items, where n = required_space / average_length
+ */
+void lv_lru_remove_lru_item(lv_lru_t * cache);
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/misc/lv_math.c b/lib/lvgl/src/misc/lv_math.c
index bfb3934..cf2d0fb 100644
--- a/lib/lvgl/src/misc/lv_math.c
+++ b/lib/lvgl/src/misc/lv_math.c
@@ -45,7 +45,7 @@ static const int16_t sin0_90_table[] = {
* @param angle
* @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
*/
-LV_ATTRIBUTE_FAST_MEM int16_t lv_trigo_sin(int16_t angle)
+int16_t LV_ATTRIBUTE_FAST_MEM lv_trigo_sin(int16_t angle)
{
int16_t ret = 0;
angle = angle % 360;
@@ -106,7 +106,7 @@ uint32_t lv_bezier3(uint32_t t, uint32_t u0, uint32_t u1, uint32_t u2, uint32_t
* If root < 256: mask = 0x800
* Else: mask = 0x8000
*/
-LV_ATTRIBUTE_FAST_MEM void lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask)
+void LV_ATTRIBUTE_FAST_MEM lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask)
{
x = x << 8; /*To get 4 bit precision. (sqrt(256) = 16 = 4 bit)*/
diff --git a/lib/lvgl/src/misc/lv_math.h b/lib/lvgl/src/misc/lv_math.h
index 4b2860a..771b4aa 100644
--- a/lib/lvgl/src/misc/lv_math.h
+++ b/lib/lvgl/src/misc/lv_math.h
@@ -44,9 +44,9 @@ typedef struct {
* @param angle
* @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
*/
-LV_ATTRIBUTE_FAST_MEM int16_t lv_trigo_sin(int16_t angle);
+int16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_trigo_sin(int16_t angle);
-static inline LV_ATTRIBUTE_FAST_MEM int16_t lv_trigo_cos(int16_t angle)
+static inline int16_t LV_ATTRIBUTE_FAST_MEM lv_trigo_cos(int16_t angle)
{
return lv_trigo_sin(angle + 90);
}
@@ -84,7 +84,7 @@ uint16_t lv_atan2(int x, int y);
* If root < 256: mask = 0x800
* Else: mask = 0x8000
*/
-LV_ATTRIBUTE_FAST_MEM void lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask);
//! @endcond
diff --git a/lib/lvgl/src/misc/lv_mem.c b/lib/lvgl/src/misc/lv_mem.c
index 91d5067..a7acc98 100644
--- a/lib/lvgl/src/misc/lv_mem.c
+++ b/lib/lvgl/src/misc/lv_mem.c
@@ -55,6 +55,8 @@
**********************/
#if LV_MEM_CUSTOM == 0
static lv_tlsf_t tlsf;
+ static uint32_t cur_used;
+ static uint32_t max_used;
#endif
static uint32_t zero_mem = ZERO_MEM_SENTINEL; /*Give the address of this variable if 0 byte should be allocated*/
@@ -135,12 +137,14 @@ void * lv_mem_alloc(size_t size)
#endif
if(alloc == NULL) {
- LV_LOG_ERROR("couldn't allocate memory (%lu bytes)", (unsigned long)size);
+ LV_LOG_INFO("couldn't allocate memory (%lu bytes)", (unsigned long)size);
+#if LV_LOG_LEVEL <= LV_LOG_LEVEL_INFO
lv_mem_monitor_t mon;
lv_mem_monitor(&mon);
- LV_LOG_ERROR("used: %6d (%3d %%), frag: %3d %%, biggest free: %6d",
- (int)(mon.total_size - mon.free_size), mon.used_pct, mon.frag_pct,
- (int)mon.free_biggest_size);
+ LV_LOG_INFO("used: %6d (%3d %%), frag: %3d %%, biggest free: %6d",
+ (int)(mon.total_size - mon.free_size), mon.used_pct, mon.frag_pct,
+ (int)mon.free_biggest_size);
+#endif
}
#if LV_MEM_ADD_JUNK
else {
@@ -148,7 +152,13 @@ void * lv_mem_alloc(size_t size)
}
#endif
- MEM_TRACE("allocated at %p", alloc);
+ if(alloc) {
+#if LV_MEM_CUSTOM == 0
+ cur_used += size;
+ max_used = LV_MAX(cur_used, max_used);
+#endif
+ MEM_TRACE("allocated at %p", alloc);
+ }
return alloc;
}
@@ -166,7 +176,9 @@ void lv_mem_free(void * data)
# if LV_MEM_ADD_JUNK
lv_memset(data, 0xbb, lv_tlsf_block_size(data));
# endif
- lv_tlsf_free(tlsf, data);
+ size_t size = lv_tlsf_free(tlsf, data);
+ if(cur_used > size) cur_used -= size;
+ else cur_used = 0;
#else
LV_MEM_CUSTOM_FREE(data);
#endif
@@ -250,11 +262,12 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p)
mon_p->frag_pct = 0; /*no fragmentation if all the RAM is used*/
}
+ mon_p->max_used = max_used;
+
MEM_TRACE("finished");
#endif
}
-
/**
* Get a temporal buffer with the given size.
* @param size the required size
@@ -351,7 +364,7 @@ void lv_mem_buf_free_all(void)
* @param src pointer to the source buffer
* @param len number of byte to copy
*/
-LV_ATTRIBUTE_FAST_MEM void * lv_memcpy(void * dst, const void * src, size_t len)
+void * LV_ATTRIBUTE_FAST_MEM lv_memcpy(void * dst, const void * src, size_t len)
{
uint8_t * d8 = dst;
const uint8_t * s8 = src;
@@ -413,7 +426,7 @@ LV_ATTRIBUTE_FAST_MEM void * lv_memcpy(void * dst, const void * src, size_t len)
* @param v value to set [0..255]
* @param len number of byte to set
*/
-LV_ATTRIBUTE_FAST_MEM void lv_memset(void * dst, uint8_t v, size_t len)
+void LV_ATTRIBUTE_FAST_MEM lv_memset(void * dst, uint8_t v, size_t len)
{
uint8_t * d8 = (uint8_t *)dst;
@@ -456,7 +469,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_memset(void * dst, uint8_t v, size_t len)
* @param dst pointer to the destination buffer
* @param len number of byte to set
*/
-LV_ATTRIBUTE_FAST_MEM void lv_memset_00(void * dst, size_t len)
+void LV_ATTRIBUTE_FAST_MEM lv_memset_00(void * dst, size_t len)
{
uint8_t * d8 = (uint8_t *)dst;
uintptr_t d_align = (lv_uintptr_t) d8 & ALIGN_MASK;
@@ -494,7 +507,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_memset_00(void * dst, size_t len)
* @param dst pointer to the destination buffer
* @param len number of byte to set
*/
-LV_ATTRIBUTE_FAST_MEM void lv_memset_ff(void * dst, size_t len)
+void LV_ATTRIBUTE_FAST_MEM lv_memset_ff(void * dst, size_t len)
{
uint8_t * d8 = (uint8_t *)dst;
uintptr_t d_align = (lv_uintptr_t) d8 & ALIGN_MASK;
diff --git a/lib/lvgl/src/misc/lv_mem.h b/lib/lvgl/src/misc/lv_mem.h
index 7a83b3d..d5d1d89 100644
--- a/lib/lvgl/src/misc/lv_mem.h
+++ b/lib/lvgl/src/misc/lv_mem.h
@@ -101,7 +101,6 @@ lv_res_t lv_mem_test(void);
*/
void lv_mem_monitor(lv_mem_monitor_t * mon_p);
-
/**
* Get a temporal buffer with the given size.
* @param size the required size
@@ -183,7 +182,7 @@ static inline void lv_memset_ff(void * dst, size_t len)
* @param src pointer to the source buffer
* @param len number of byte to copy
*/
-LV_ATTRIBUTE_FAST_MEM void * lv_memcpy(void * dst, const void * src, size_t len);
+void * /* LV_ATTRIBUTE_FAST_MEM */ lv_memcpy(void * dst, const void * src, size_t len);
/**
* Same as `memcpy` but optimized to copy only a few bytes.
@@ -191,7 +190,7 @@ LV_ATTRIBUTE_FAST_MEM void * lv_memcpy(void * dst, const void * src, size_t len)
* @param src pointer to the source buffer
* @param len number of byte to copy
*/
-LV_ATTRIBUTE_FAST_MEM static inline void * lv_memcpy_small(void * dst, const void * src, size_t len)
+static inline void * LV_ATTRIBUTE_FAST_MEM lv_memcpy_small(void * dst, const void * src, size_t len)
{
uint8_t * d8 = (uint8_t *)dst;
const uint8_t * s8 = (const uint8_t *)src;
@@ -212,21 +211,21 @@ LV_ATTRIBUTE_FAST_MEM static inline void * lv_memcpy_small(void * dst, const voi
* @param v value to set [0..255]
* @param len number of byte to set
*/
-LV_ATTRIBUTE_FAST_MEM void lv_memset(void * dst, uint8_t v, size_t len);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_memset(void * dst, uint8_t v, size_t len);
/**
* Same as `memset(dst, 0x00, len)` but optimized for 4 byte operation.
* @param dst pointer to the destination buffer
* @param len number of byte to set
*/
-LV_ATTRIBUTE_FAST_MEM void lv_memset_00(void * dst, size_t len);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_memset_00(void * dst, size_t len);
/**
* Same as `memset(dst, 0xFF, len)` but optimized for 4 byte operation.
* @param dst pointer to the destination buffer
* @param len number of byte to set
*/
-LV_ATTRIBUTE_FAST_MEM void lv_memset_ff(void * dst, size_t len);
+void /* LV_ATTRIBUTE_FAST_MEM */ lv_memset_ff(void * dst, size_t len);
//! @endcond
diff --git a/lib/lvgl/src/misc/lv_printf.h b/lib/lvgl/src/misc/lv_printf.h
index 4cbbd84..09563db 100644
--- a/lib/lvgl/src/misc/lv_printf.h
+++ b/lib/lvgl/src/misc/lv_printf.h
@@ -40,14 +40,20 @@
/* platform-specific printf format for int32_t, usually "d" or "ld" */
#define LV_PRId32 PRId32
#define LV_PRIu32 PRIu32
+ #define LV_PRIx32 PRIx32
+ #define LV_PRIX32 PRIX32
#else
#define LV_PRId32 "d"
#define LV_PRIu32 "u"
+ #define LV_PRIx32 "x"
+ #define LV_PRIX32 "X"
#endif
#else
/* hope this is correct for ports without __has_include or without inttypes.h */
#define LV_PRId32 "d"
#define LV_PRIu32 "u"
+ #define LV_PRIx32 "x"
+ #define LV_PRIX32 "X"
#endif
#ifdef __cplusplus
diff --git a/lib/lvgl/src/misc/lv_style.c b/lib/lvgl/src/misc/lv_style.c
index 1a343d5..994be81 100644
--- a/lib/lvgl/src/misc/lv_style.c
+++ b/lib/lvgl/src/misc/lv_style.c
@@ -9,6 +9,8 @@
#include "lv_style.h"
#include "../misc/lv_gc.h"
#include "../misc/lv_mem.h"
+#include "lv_assert.h"
+#include "lv_types.h"
/*********************
* DEFINES
@@ -22,6 +24,13 @@
* STATIC PROTOTYPES
**********************/
+static void lv_style_set_prop_internal(lv_style_t * style, lv_style_prop_t prop_and_meta, lv_style_value_t value,
+ void (*value_adjustment_helper)(lv_style_prop_t, lv_style_value_t, uint16_t *, lv_style_value_t *));
+static void lv_style_set_prop_helper(lv_style_prop_t prop, lv_style_value_t value, uint16_t * prop_storage,
+ lv_style_value_t * value_storage);
+static void lv_style_set_prop_meta_helper(lv_style_prop_t prop, lv_style_value_t value, uint16_t * prop_storage,
+ lv_style_value_t * value_storage);
+
/**********************
* GLOBAL VARIABLES
**********************/
@@ -40,8 +49,8 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR
[LV_STYLE_TRANSFORM_HEIGHT] = LV_STYLE_PROP_EXT_DRAW,
[LV_STYLE_TRANSLATE_X] = LV_STYLE_PROP_LAYOUT_REFR | LV_STYLE_PROP_PARENT_LAYOUT_REFR,
[LV_STYLE_TRANSLATE_Y] = LV_STYLE_PROP_LAYOUT_REFR | LV_STYLE_PROP_PARENT_LAYOUT_REFR,
- [LV_STYLE_TRANSFORM_ZOOM] = LV_STYLE_PROP_EXT_DRAW | LV_STYLE_PROP_LAYOUT_REFR | LV_STYLE_PROP_PARENT_LAYOUT_REFR,
- [LV_STYLE_TRANSFORM_ANGLE] = LV_STYLE_PROP_EXT_DRAW | LV_STYLE_PROP_LAYOUT_REFR | LV_STYLE_PROP_PARENT_LAYOUT_REFR,
+ [LV_STYLE_TRANSFORM_ZOOM] = LV_STYLE_PROP_EXT_DRAW | LV_STYLE_PROP_LAYER_REFR,
+ [LV_STYLE_TRANSFORM_ANGLE] = LV_STYLE_PROP_EXT_DRAW | LV_STYLE_PROP_LAYER_REFR,
[LV_STYLE_PAD_TOP] = LV_STYLE_PROP_EXT_DRAW | LV_STYLE_PROP_LAYOUT_REFR,
[LV_STYLE_PAD_BOTTOM] = LV_STYLE_PROP_EXT_DRAW | LV_STYLE_PROP_LAYOUT_REFR,
@@ -110,13 +119,14 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR
[LV_STYLE_RADIUS] = 0,
[LV_STYLE_CLIP_CORNER] = 0,
- [LV_STYLE_OPA] = LV_STYLE_PROP_INHERIT,
+ [LV_STYLE_OPA] = 0,
+ [LV_STYLE_OPA_LAYERED] = LV_STYLE_PROP_LAYER_REFR,
[LV_STYLE_COLOR_FILTER_DSC] = LV_STYLE_PROP_INHERIT,
[LV_STYLE_COLOR_FILTER_OPA] = LV_STYLE_PROP_INHERIT,
[LV_STYLE_ANIM_TIME] = 0,
[LV_STYLE_ANIM_SPEED] = 0,
[LV_STYLE_TRANSITION] = 0,
- [LV_STYLE_BLEND_MODE] = 0,
+ [LV_STYLE_BLEND_MODE] = LV_STYLE_PROP_LAYER_REFR,
[LV_STYLE_LAYOUT] = LV_STYLE_PROP_LAYOUT_REFR,
[LV_STYLE_BASE_DIR] = LV_STYLE_PROP_INHERIT | LV_STYLE_PROP_LAYOUT_REFR,
};
@@ -128,6 +138,7 @@ uint32_t _lv_style_custom_prop_flag_lookup_table_size = 0;
**********************/
static uint16_t last_custom_prop_id = (uint16_t)_LV_STYLE_LAST_BUILT_IN_PROP;
+static const lv_style_value_t null_style_value = { .num = 0 };
/**********************
* MACROS
@@ -155,7 +166,7 @@ void lv_style_reset(lv_style_t * style)
{
LV_ASSERT_STYLE(style);
- if(style->is_const) {
+ if(style->prop1 == LV_STYLE_PROP_ANY) {
LV_LOG_ERROR("Cannot reset const style");
return;
}
@@ -169,13 +180,24 @@ void lv_style_reset(lv_style_t * style)
lv_style_prop_t lv_style_register_prop(uint8_t flag)
{
+ if(LV_GC_ROOT(_lv_style_custom_prop_flag_lookup_table) == NULL) {
+ _lv_style_custom_prop_flag_lookup_table_size = 0;
+ last_custom_prop_id = (uint16_t)_LV_STYLE_LAST_BUILT_IN_PROP;
+ }
+
+ if(((last_custom_prop_id + 1) & LV_STYLE_PROP_META_MASK) != 0) {
+ LV_LOG_ERROR("No more custom property IDs available");
+ return LV_STYLE_PROP_INV;
+ }
+
/*
* Allocate the lookup table if it's not yet available.
*/
- uint8_t required_size = (last_custom_prop_id + 1 - _LV_STYLE_LAST_BUILT_IN_PROP);
+ size_t required_size = (last_custom_prop_id + 1 - _LV_STYLE_LAST_BUILT_IN_PROP);
if(_lv_style_custom_prop_flag_lookup_table_size < required_size) {
/* Round required_size up to the nearest 32-byte value */
required_size = (required_size + 31) & ~31;
+ LV_ASSERT_MSG(required_size > 0, "required size has become 0?");
uint8_t * old_p = LV_GC_ROOT(_lv_style_custom_prop_flag_lookup_table);
uint8_t * new_p = lv_mem_realloc(old_p, required_size * sizeof(uint8_t));
if(new_p == NULL) {
@@ -201,7 +223,7 @@ bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop)
{
LV_ASSERT_STYLE(style);
- if(style->is_const) {
+ if(style->prop1 == LV_STYLE_PROP_ANY) {
LV_LOG_ERROR("Cannot remove prop from const style");
return false;
}
@@ -209,7 +231,7 @@ bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop)
if(style->prop_cnt == 0) return false;
if(style->prop_cnt == 1) {
- if(style->prop1 == prop) {
+ if(LV_STYLE_PROP_ID_MASK(style->prop1) == prop) {
style->prop1 = LV_STYLE_PROP_INV;
style->prop_cnt = 0;
return true;
@@ -221,7 +243,7 @@ bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop)
uint16_t * old_props = (uint16_t *)tmp;
uint32_t i;
for(i = 0; i < style->prop_cnt; i++) {
- if(old_props[i] == prop) {
+ if(LV_STYLE_PROP_ID_MASK(old_props[i]) == prop) {
lv_style_value_t * old_values = (lv_style_value_t *)style->v_p.values_and_props;
if(style->prop_cnt == 2) {
@@ -260,78 +282,15 @@ bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop)
void lv_style_set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t value)
{
- LV_ASSERT_STYLE(style);
-
- if(style->is_const) {
- LV_LOG_ERROR("Cannot set property of constant style");
- return;
- }
-
- if(style->prop_cnt > 1) {
- uint8_t * tmp = style->v_p.values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
- uint16_t * props = (uint16_t *)tmp;
- int32_t i;
- for(i = style->prop_cnt - 1; i >= 0; i--) {
- if(props[i] == prop) {
- lv_style_value_t * values = (lv_style_value_t *)style->v_p.values_and_props;
- values[i] = value;
- return;
- }
- }
-
- size_t size = (style->prop_cnt + 1) * (sizeof(lv_style_value_t) + sizeof(uint16_t));
- uint8_t * values_and_props = lv_mem_realloc(style->v_p.values_and_props, size);
- if(values_and_props == NULL) return;
- style->v_p.values_and_props = values_and_props;
-
- tmp = values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
- props = (uint16_t *)tmp;
- /*Shift all props to make place for the value before them*/
- for(i = style->prop_cnt - 1; i >= 0; i--) {
- props[i + sizeof(lv_style_value_t) / sizeof(uint16_t)] = props[i];
- }
- style->prop_cnt++;
-
- /*Go to the new position wit the props*/
- tmp = values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
- props = (uint16_t *)tmp;
- lv_style_value_t * values = (lv_style_value_t *)values_and_props;
-
- /*Set the new property and value*/
- props[style->prop_cnt - 1] = prop;
- values[style->prop_cnt - 1] = value;
- }
- else if(style->prop_cnt == 1) {
- if(style->prop1 == prop) {
- style->v_p.value1 = value;
- return;
- }
- size_t size = (style->prop_cnt + 1) * (sizeof(lv_style_value_t) + sizeof(uint16_t));
- uint8_t * values_and_props = lv_mem_alloc(size);
- if(values_and_props == NULL) return;
- lv_style_value_t value_tmp = style->v_p.value1;
- style->v_p.values_and_props = values_and_props;
- style->prop_cnt++;
-
- uint8_t * tmp = values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
- uint16_t * props = (uint16_t *)tmp;
- lv_style_value_t * values = (lv_style_value_t *)values_and_props;
- props[0] = style->prop1;
- props[1] = prop;
- values[0] = value_tmp;
- values[1] = value;
- }
- else {
- style->prop_cnt = 1;
- style->prop1 = prop;
- style->v_p.value1 = value;
- }
-
- uint8_t group = _lv_style_get_prop_group(prop);
- style->has_group |= 1 << group;
+ lv_style_set_prop_internal(style, prop, value, lv_style_set_prop_helper);
}
-lv_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value)
+void lv_style_set_prop_meta(lv_style_t * style, lv_style_prop_t prop, uint16_t meta)
+{
+ lv_style_set_prop_internal(style, prop | meta, null_style_value, lv_style_set_prop_meta_helper);
+}
+
+lv_style_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value)
{
return lv_style_get_prop_inlined(style, prop, value);
}
@@ -372,6 +331,7 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
value.color = lv_color_black();
break;
case LV_STYLE_OPA:
+ case LV_STYLE_OPA_LAYERED:
case LV_STYLE_BORDER_OPA:
case LV_STYLE_TEXT_OPA:
case LV_STYLE_IMG_OPA:
@@ -436,3 +396,92 @@ uint8_t _lv_style_prop_lookup_flags(lv_style_prop_t prop)
/**********************
* STATIC FUNCTIONS
**********************/
+
+static void lv_style_set_prop_helper(lv_style_prop_t prop, lv_style_value_t value, uint16_t * prop_storage,
+ lv_style_value_t * value_storage)
+{
+ *prop_storage = prop;
+ *value_storage = value;
+}
+
+static void lv_style_set_prop_meta_helper(lv_style_prop_t prop, lv_style_value_t value, uint16_t * prop_storage,
+ lv_style_value_t * value_storage)
+{
+ LV_UNUSED(value);
+ LV_UNUSED(value_storage);
+ *prop_storage = prop; /* meta is OR-ed into the prop ID already */
+}
+
+static void lv_style_set_prop_internal(lv_style_t * style, lv_style_prop_t prop_and_meta, lv_style_value_t value,
+ void (*value_adjustment_helper)(lv_style_prop_t, lv_style_value_t, uint16_t *, lv_style_value_t *))
+{
+ LV_ASSERT_STYLE(style);
+
+ if(style->prop1 == LV_STYLE_PROP_ANY) {
+ LV_LOG_ERROR("Cannot set property of constant style");
+ return;
+ }
+
+ lv_style_prop_t prop_id = LV_STYLE_PROP_ID_MASK(prop_and_meta);
+
+ if(style->prop_cnt > 1) {
+ uint8_t * tmp = style->v_p.values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
+ uint16_t * props = (uint16_t *)tmp;
+ int32_t i;
+ for(i = style->prop_cnt - 1; i >= 0; i--) {
+ if(LV_STYLE_PROP_ID_MASK(props[i]) == prop_id) {
+ lv_style_value_t * values = (lv_style_value_t *)style->v_p.values_and_props;
+ value_adjustment_helper(prop_and_meta, value, &props[i], &values[i]);
+ return;
+ }
+ }
+
+ size_t size = (style->prop_cnt + 1) * (sizeof(lv_style_value_t) + sizeof(uint16_t));
+ uint8_t * values_and_props = lv_mem_realloc(style->v_p.values_and_props, size);
+ if(values_and_props == NULL) return;
+ style->v_p.values_and_props = values_and_props;
+
+ tmp = values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
+ props = (uint16_t *)tmp;
+ /*Shift all props to make place for the value before them*/
+ for(i = style->prop_cnt - 1; i >= 0; i--) {
+ props[i + sizeof(lv_style_value_t) / sizeof(uint16_t)] = props[i];
+ }
+ style->prop_cnt++;
+
+ /*Go to the new position wit the props*/
+ tmp = values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
+ props = (uint16_t *)tmp;
+ lv_style_value_t * values = (lv_style_value_t *)values_and_props;
+
+ /*Set the new property and value*/
+ value_adjustment_helper(prop_and_meta, value, &props[style->prop_cnt - 1], &values[style->prop_cnt - 1]);
+ }
+ else if(style->prop_cnt == 1) {
+ if(LV_STYLE_PROP_ID_MASK(style->prop1) == prop_id) {
+ value_adjustment_helper(prop_and_meta, value, &style->prop1, &style->v_p.value1);
+ return;
+ }
+ size_t size = (style->prop_cnt + 1) * (sizeof(lv_style_value_t) + sizeof(uint16_t));
+ uint8_t * values_and_props = lv_mem_alloc(size);
+ if(values_and_props == NULL) return;
+ lv_style_value_t value_tmp = style->v_p.value1;
+ style->v_p.values_and_props = values_and_props;
+ style->prop_cnt++;
+
+ uint8_t * tmp = values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
+ uint16_t * props = (uint16_t *)tmp;
+ lv_style_value_t * values = (lv_style_value_t *)values_and_props;
+ props[0] = style->prop1;
+ values[0] = value_tmp;
+ value_adjustment_helper(prop_and_meta, value, &props[1], &values[1]);
+ }
+ else {
+ style->prop_cnt = 1;
+ value_adjustment_helper(prop_and_meta, value, &style->prop1, &style->v_p.value1);
+ }
+
+ uint8_t group = _lv_style_get_prop_group(prop_id);
+ style->has_group |= 1 << group;
+}
+
diff --git a/lib/lvgl/src/misc/lv_style.h b/lib/lvgl/src/misc/lv_style.h
index eee3a94..a46036b 100644
--- a/lib/lvgl/src/misc/lv_style.h
+++ b/lib/lvgl/src/misc/lv_style.h
@@ -40,7 +40,8 @@ extern "C" {
#define LV_STYLE_PROP_EXT_DRAW (1 << 1) /*Requires ext. draw size update when changed*/
#define LV_STYLE_PROP_LAYOUT_REFR (1 << 2) /*Requires layout update when changed*/
#define LV_STYLE_PROP_PARENT_LAYOUT_REFR (1 << 3) /*Requires layout update on parent when changed*/
-#define LV_STYLE_PROP_ALL (0xf) /*Indicating all flags*/
+#define LV_STYLE_PROP_LAYER_REFR (1 << 4) /*Affects layer handling*/
+#define LV_STYLE_PROP_ALL (0x1F) /*Indicating all flags*/
/**
* Other constants
@@ -48,17 +49,32 @@ extern "C" {
#define LV_IMG_ZOOM_NONE 256 /*Value for not zooming the image*/
LV_EXPORT_CONST_INT(LV_IMG_ZOOM_NONE);
+// *INDENT-OFF*
#if LV_USE_ASSERT_STYLE
-#define LV_STYLE_CONST_INIT(var_name, prop_array) const lv_style_t var_name = { .sentinel = LV_STYLE_SENTINEL_VALUE, .v_p = { .const_props = prop_array }, .has_group = 0xFF, .is_const = 1 }
+#define LV_STYLE_CONST_INIT(var_name, prop_array) \
+ const lv_style_t var_name = { \
+ .sentinel = LV_STYLE_SENTINEL_VALUE, \
+ .v_p = { .const_props = prop_array }, \
+ .has_group = 0xFF, \
+ .prop1 = LV_STYLE_PROP_ANY, \
+ .prop_cnt = (sizeof(prop_array) / sizeof((prop_array)[0])), \
+ }
#else
-#define LV_STYLE_CONST_INIT(var_name, prop_array) const lv_style_t var_name = { .v_p = { .const_props = prop_array }, .has_group = 0xFF, .is_const = 1 }
+#define LV_STYLE_CONST_INIT(var_name, prop_array) \
+ const lv_style_t var_name = { \
+ .v_p = { .const_props = prop_array }, \
+ .has_group = 0xFF, \
+ .prop1 = LV_STYLE_PROP_ANY, \
+ .prop_cnt = (sizeof(prop_array) / sizeof((prop_array)[0])), \
+ }
#endif
+// *INDENT-ON*
-/** On simple system, don't waste resources on gradients */
-#if !defined(LV_DRAW_COMPLEX) || !defined(LV_GRADIENT_MAX_STOPS)
-#define LV_GRADIENT_MAX_STOPS 2
-#endif
+#define LV_STYLE_PROP_META_INHERIT 0x8000
+#define LV_STYLE_PROP_META_INITIAL 0x4000
+#define LV_STYLE_PROP_META_MASK (LV_STYLE_PROP_META_INHERIT | LV_STYLE_PROP_META_INITIAL)
+#define LV_STYLE_PROP_ID_MASK(prop) ((lv_style_prop_t)((prop) & ~LV_STYLE_PROP_META_MASK))
/**********************
* TYPEDEFS
@@ -160,7 +176,7 @@ typedef union {
* Props are split into groups of 16. When adding a new prop to a group, ensure it does not overflow into the next one.
*/
typedef enum {
- LV_STYLE_PROP_INV,
+ LV_STYLE_PROP_INV = 0,
/*Group 0*/
LV_STYLE_WIDTH = 1,
@@ -172,12 +188,8 @@ typedef enum {
LV_STYLE_X = 7,
LV_STYLE_Y = 8,
LV_STYLE_ALIGN = 9,
- LV_STYLE_TRANSFORM_WIDTH = 10,
- LV_STYLE_TRANSFORM_HEIGHT = 11,
- LV_STYLE_TRANSLATE_X = 12,
- LV_STYLE_TRANSLATE_Y = 13,
- LV_STYLE_TRANSFORM_ZOOM = 14,
- LV_STYLE_TRANSFORM_ANGLE = 15,
+ LV_STYLE_LAYOUT = 10,
+ LV_STYLE_RADIUS = 11,
/*Group 1*/
LV_STYLE_PAD_TOP = 16,
@@ -186,6 +198,8 @@ typedef enum {
LV_STYLE_PAD_RIGHT = 19,
LV_STYLE_PAD_ROW = 20,
LV_STYLE_PAD_COLUMN = 21,
+ LV_STYLE_BASE_DIR = 22,
+ LV_STYLE_CLIP_CORNER = 23,
/*Group 2*/
LV_STYLE_BG_COLOR = 32,
@@ -245,25 +259,39 @@ typedef enum {
LV_STYLE_TEXT_ALIGN = 91,
/*Group 6*/
- LV_STYLE_RADIUS = 96,
- LV_STYLE_CLIP_CORNER = 97,
- LV_STYLE_OPA = 98,
- LV_STYLE_COLOR_FILTER_DSC = 99,
- LV_STYLE_COLOR_FILTER_OPA = 100,
- LV_STYLE_ANIM = 101,
- LV_STYLE_ANIM_TIME = 102,
- LV_STYLE_ANIM_SPEED = 103,
- LV_STYLE_TRANSITION = 104,
- LV_STYLE_BLEND_MODE = 105,
- LV_STYLE_LAYOUT = 106,
- LV_STYLE_BASE_DIR = 107,
+ LV_STYLE_OPA = 96,
+ LV_STYLE_OPA_LAYERED = 97,
+ LV_STYLE_COLOR_FILTER_DSC = 98,
+ LV_STYLE_COLOR_FILTER_OPA = 99,
+ LV_STYLE_ANIM = 100,
+ LV_STYLE_ANIM_TIME = 101,
+ LV_STYLE_ANIM_SPEED = 102,
+ LV_STYLE_TRANSITION = 103,
+ LV_STYLE_BLEND_MODE = 104,
+ LV_STYLE_TRANSFORM_WIDTH = 105,
+ LV_STYLE_TRANSFORM_HEIGHT = 106,
+ LV_STYLE_TRANSLATE_X = 107,
+ LV_STYLE_TRANSLATE_Y = 108,
+ LV_STYLE_TRANSFORM_ZOOM = 109,
+ LV_STYLE_TRANSFORM_ANGLE = 110,
+ LV_STYLE_TRANSFORM_PIVOT_X = 111,
+ LV_STYLE_TRANSFORM_PIVOT_Y = 112,
- _LV_STYLE_LAST_BUILT_IN_PROP = 111,
+ _LV_STYLE_LAST_BUILT_IN_PROP = 112,
_LV_STYLE_NUM_BUILT_IN_PROPS = _LV_STYLE_LAST_BUILT_IN_PROP + 1,
- LV_STYLE_PROP_ANY = 0xFFFF
+ LV_STYLE_PROP_ANY = 0xFFFF,
+ _LV_STYLE_PROP_CONST = 0xFFFF /* magic value for const styles */
} lv_style_prop_t;
+enum {
+ LV_STYLE_RES_NOT_FOUND,
+ LV_STYLE_RES_FOUND,
+ LV_STYLE_RES_INHERIT
+};
+
+typedef uint8_t lv_style_res_t;
+
/**
* Descriptor for style transitions
*/
@@ -302,8 +330,7 @@ typedef struct {
const lv_style_const_prop_t * const_props;
} v_p;
- uint16_t prop1 : 15;
- uint16_t is_const : 1;
+ uint16_t prop1;
uint8_t has_group;
uint8_t prop_cnt;
} lv_style_t;
@@ -312,7 +339,6 @@ typedef struct {
* GLOBAL PROTOTYPES
**********************/
-
/**
* Initialize a style
* @param style pointer to a style to initialize
@@ -367,16 +393,13 @@ bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop);
void lv_style_set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t value);
/**
- * Get the value of a property
- * @param style pointer to a style
- * @param prop the ID of a property
- * @param value pointer to a `lv_style_value_t` variable to store the value
- * @return LV_RES_INV: the property wasn't found in the style (`value` is unchanged)
- * LV_RES_OK: the property was fond, and `value` is set accordingly
- * @note For performance reasons there are no sanity check on `style`
+ * Set a special meta state for a property in a style.
+ * This function shouldn't be used directly by the user.
+ * @param style pointer to style
+ * @param prop the ID of a property (e.g. `LV_STYLE_BG_COLOR`)
+ * @param meta the meta value to attach to the property in the style
*/
-lv_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value);
-
+void lv_style_set_prop_meta(lv_style_t * style, lv_style_prop_t prop, uint16_t meta);
/**
* Get the value of a property
@@ -386,42 +409,8 @@ lv_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_st
* @return LV_RES_INV: the property wasn't found in the style (`value` is unchanged)
* LV_RES_OK: the property was fond, and `value` is set accordingly
* @note For performance reasons there are no sanity check on `style`
- * @note This function is the same as ::lv_style_get_prop but inlined. Use it only on performance critical places
*/
-static inline lv_res_t lv_style_get_prop_inlined(const lv_style_t * style, lv_style_prop_t prop,
- lv_style_value_t * value)
-{
- if(style->is_const) {
- const lv_style_const_prop_t * const_prop;
- for(const_prop = style->v_p.const_props; const_prop->prop != LV_STYLE_PROP_INV; const_prop++) {
- if(const_prop->prop == prop) {
- *value = const_prop->value;
- return LV_RES_OK;
- }
- }
- return LV_RES_INV;
- }
-
- if(style->prop_cnt == 0) return LV_RES_INV;
-
- if(style->prop_cnt > 1) {
- uint8_t * tmp = style->v_p.values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
- uint16_t * props = (uint16_t *)tmp;
- uint32_t i;
- for(i = 0; i < style->prop_cnt; i++) {
- if(props[i] == prop) {
- lv_style_value_t * values = (lv_style_value_t *)style->v_p.values_and_props;
- *value = values[i];
- return LV_RES_OK;
- }
- }
- }
- else if(style->prop1 == prop) {
- *value = style->v_p.value1;
- return LV_RES_OK;
- }
- return LV_RES_INV;
-}
+lv_style_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value);
/**
* Initialize a transition descriptor.
@@ -446,6 +435,66 @@ void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style
*/
lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop);
+/**
+ * Get the value of a property
+ * @param style pointer to a style
+ * @param prop the ID of a property
+ * @param value pointer to a `lv_style_value_t` variable to store the value
+ * @return LV_RES_INV: the property wasn't found in the style (`value` is unchanged)
+ * LV_RES_OK: the property was fond, and `value` is set accordingly
+ * @note For performance reasons there are no sanity check on `style`
+ * @note This function is the same as ::lv_style_get_prop but inlined. Use it only on performance critical places
+ */
+static inline lv_style_res_t lv_style_get_prop_inlined(const lv_style_t * style, lv_style_prop_t prop,
+ lv_style_value_t * value)
+{
+ if(style->prop1 == LV_STYLE_PROP_ANY) {
+ const lv_style_const_prop_t * const_prop;
+ uint32_t i;
+ for(i = 0; i < style->prop_cnt; i++) {
+ const_prop = style->v_p.const_props + i;
+ lv_style_prop_t prop_id = LV_STYLE_PROP_ID_MASK(const_prop->prop);
+ if(prop_id == prop) {
+ if(const_prop->prop & LV_STYLE_PROP_META_INHERIT)
+ return LV_STYLE_RES_INHERIT;
+ *value = (const_prop->prop & LV_STYLE_PROP_META_INITIAL) ? lv_style_prop_get_default(prop_id) : const_prop->value;
+ return LV_STYLE_RES_FOUND;
+ }
+ }
+ return LV_STYLE_RES_NOT_FOUND;
+ }
+
+ if(style->prop_cnt == 0) return LV_STYLE_RES_NOT_FOUND;
+
+ if(style->prop_cnt > 1) {
+ uint8_t * tmp = style->v_p.values_and_props + style->prop_cnt * sizeof(lv_style_value_t);
+ uint16_t * props = (uint16_t *)tmp;
+ uint32_t i;
+ for(i = 0; i < style->prop_cnt; i++) {
+ lv_style_prop_t prop_id = LV_STYLE_PROP_ID_MASK(props[i]);
+ if(prop_id == prop) {
+ if(props[i] & LV_STYLE_PROP_META_INHERIT)
+ return LV_STYLE_RES_INHERIT;
+ if(props[i] & LV_STYLE_PROP_META_INITIAL)
+ *value = lv_style_prop_get_default(prop_id);
+ else {
+ lv_style_value_t * values = (lv_style_value_t *)style->v_p.values_and_props;
+ *value = values[i];
+ }
+ return LV_STYLE_RES_FOUND;
+ }
+ }
+ }
+ else if(LV_STYLE_PROP_ID_MASK(style->prop1) == prop) {
+ if(style->prop1 & LV_STYLE_PROP_META_INHERIT)
+ return LV_STYLE_RES_INHERIT;
+ *value = (style->prop1 & LV_STYLE_PROP_META_INITIAL) ? lv_style_prop_get_default(LV_STYLE_PROP_ID_MASK(
+ style->prop1)) : style->v_p.value1;
+ return LV_STYLE_RES_FOUND;
+ }
+ return LV_STYLE_RES_NOT_FOUND;
+}
+
/**
* Checks if a style is empty (has no properties)
* @param style pointer to a style
diff --git a/lib/lvgl/src/misc/lv_style_gen.c b/lib/lvgl/src/misc/lv_style_gen.c
index e4dfbf4..0b8479d 100644
--- a/lib/lvgl/src/misc/lv_style_gen.c
+++ b/lib/lvgl/src/misc/lv_style_gen.c
@@ -120,6 +120,22 @@ void lv_style_set_transform_angle(lv_style_t * style, lv_coord_t value)
lv_style_set_prop(style, LV_STYLE_TRANSFORM_ANGLE, v);
}
+void lv_style_set_transform_pivot_x(lv_style_t * style, lv_coord_t value)
+{
+ lv_style_value_t v = {
+ .num = (int32_t)value
+ };
+ lv_style_set_prop(style, LV_STYLE_TRANSFORM_PIVOT_X, v);
+}
+
+void lv_style_set_transform_pivot_y(lv_style_t * style, lv_coord_t value)
+{
+ lv_style_value_t v = {
+ .num = (int32_t)value
+ };
+ lv_style_set_prop(style, LV_STYLE_TRANSFORM_PIVOT_Y, v);
+}
+
void lv_style_set_pad_top(lv_style_t * style, lv_coord_t value)
{
lv_style_value_t v = {
@@ -584,6 +600,14 @@ void lv_style_set_opa(lv_style_t * style, lv_opa_t value)
lv_style_set_prop(style, LV_STYLE_OPA, v);
}
+void lv_style_set_opa_layered(lv_style_t * style, lv_opa_t value)
+{
+ lv_style_value_t v = {
+ .num = (int32_t)value
+ };
+ lv_style_set_prop(style, LV_STYLE_OPA_LAYERED, v);
+}
+
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value)
{
lv_style_value_t v = {
diff --git a/lib/lvgl/src/misc/lv_style_gen.h b/lib/lvgl/src/misc/lv_style_gen.h
index f62206f..66ba068 100644
--- a/lib/lvgl/src/misc/lv_style_gen.h
+++ b/lib/lvgl/src/misc/lv_style_gen.h
@@ -13,6 +13,8 @@ void lv_style_set_translate_x(lv_style_t * style, lv_coord_t value);
void lv_style_set_translate_y(lv_style_t * style, lv_coord_t value);
void lv_style_set_transform_zoom(lv_style_t * style, lv_coord_t value);
void lv_style_set_transform_angle(lv_style_t * style, lv_coord_t value);
+void lv_style_set_transform_pivot_x(lv_style_t * style, lv_coord_t value);
+void lv_style_set_transform_pivot_y(lv_style_t * style, lv_coord_t value);
void lv_style_set_pad_top(lv_style_t * style, lv_coord_t value);
void lv_style_set_pad_bottom(lv_style_t * style, lv_coord_t value);
void lv_style_set_pad_left(lv_style_t * style, lv_coord_t value);
@@ -71,6 +73,7 @@ void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value);
void lv_style_set_radius(lv_style_t * style, lv_coord_t value);
void lv_style_set_clip_corner(lv_style_t * style, bool value);
void lv_style_set_opa(lv_style_t * style, lv_opa_t value);
+void lv_style_set_opa_layered(lv_style_t * style, lv_opa_t value);
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value);
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value);
void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value);
@@ -156,6 +159,16 @@ void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value);
.prop = LV_STYLE_TRANSFORM_ANGLE, .value = { .num = (int32_t)val } \
}
+#define LV_STYLE_CONST_TRANSFORM_PIVOT_X(val) \
+ { \
+ .prop = LV_STYLE_TRANSFORM_PIVOT_X, .value = { .num = (int32_t)val } \
+ }
+
+#define LV_STYLE_CONST_TRANSFORM_PIVOT_Y(val) \
+ { \
+ .prop = LV_STYLE_TRANSFORM_PIVOT_Y, .value = { .num = (int32_t)val } \
+ }
+
#define LV_STYLE_CONST_PAD_TOP(val) \
{ \
.prop = LV_STYLE_PAD_TOP, .value = { .num = (int32_t)val } \
@@ -446,6 +459,11 @@ void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value);
.prop = LV_STYLE_OPA, .value = { .num = (int32_t)val } \
}
+#define LV_STYLE_CONST_OPA_LAYERED(val) \
+ { \
+ .prop = LV_STYLE_OPA_LAYERED, .value = { .num = (int32_t)val } \
+ }
+
#define LV_STYLE_CONST_COLOR_FILTER_DSC(val) \
{ \
.prop = LV_STYLE_COLOR_FILTER_DSC, .value = { .ptr = val } \
diff --git a/lib/lvgl/src/misc/lv_timer.c b/lib/lvgl/src/misc/lv_timer.c
index d8dd55b..a21038a 100644
--- a/lib/lvgl/src/misc/lv_timer.c
+++ b/lib/lvgl/src/misc/lv_timer.c
@@ -64,7 +64,7 @@ void _lv_timer_core_init(void)
* Call it periodically to handle lv_timers.
* @return the time after which it must be called again
*/
-LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_timer_handler(void)
+uint32_t LV_ATTRIBUTE_TIMER_HANDLER lv_timer_handler(void)
{
TIMER_TRACE("begin");
diff --git a/lib/lvgl/src/misc/lv_timer.h b/lib/lvgl/src/misc/lv_timer.h
index a9a8e50..50da8c9 100644
--- a/lib/lvgl/src/misc/lv_timer.h
+++ b/lib/lvgl/src/misc/lv_timer.h
@@ -65,7 +65,7 @@ void _lv_timer_core_init(void);
* Call it periodically to handle lv_timers.
* @return time till it needs to be run next (in ms)
*/
-LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_timer_handler(void);
+uint32_t /* LV_ATTRIBUTE_TIMER_HANDLER */ lv_timer_handler(void);
//! @endcond
@@ -75,7 +75,7 @@ LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_timer_handler(void);
* This function is used to simplify the porting.
* @param __ms the period for running lv_timer_handler()
*/
-static inline LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_timer_handler_run_in_period(uint32_t ms)
+static inline uint32_t LV_ATTRIBUTE_TIMER_HANDLER lv_timer_handler_run_in_period(uint32_t ms)
{
static uint32_t last_tick = 0;
uint32_t curr_tick = lv_tick_get();
diff --git a/lib/lvgl/src/misc/lv_tlsf.c b/lib/lvgl/src/misc/lv_tlsf.c
index 64197f9..fd3cc76 100644
--- a/lib/lvgl/src/misc/lv_tlsf.c
+++ b/lib/lvgl/src/misc/lv_tlsf.c
@@ -358,7 +358,6 @@ static const size_t block_size_min =
sizeof(block_header_t) - sizeof(block_header_t *);
static const size_t block_size_max = tlsf_cast(size_t, 1) << FL_INDEX_MAX;
-
/* The TLSF control structure. */
typedef struct control_t {
/* Empty lists point at this block to indicate they are free. */
@@ -1157,18 +1156,22 @@ void * lv_tlsf_memalign(lv_tlsf_t tlsf, size_t align, size_t size)
return block_prepare_used(control, block, adjust);
}
-void lv_tlsf_free(lv_tlsf_t tlsf, const void * ptr)
+size_t lv_tlsf_free(lv_tlsf_t tlsf, const void * ptr)
{
+ size_t size = 0;
/* Don't attempt to free a NULL pointer. */
if(ptr) {
control_t * control = tlsf_cast(control_t *, tlsf);
block_header_t * block = block_from_ptr(ptr);
tlsf_assert(!block_is_free(block) && "block already marked as free");
+ size = block->size;
block_mark_as_free(block);
block = block_merge_prev(control, block);
block = block_merge_next(control, block);
block_insert(control, block);
}
+
+ return size;
}
/*
@@ -1204,6 +1207,10 @@ void * lv_tlsf_realloc(lv_tlsf_t tlsf, void * ptr, size_t size)
const size_t cursize = block_size(block);
const size_t combined = cursize + block_size(next) + block_header_overhead;
const size_t adjust = adjust_request_size(size, ALIGN_SIZE);
+ if(size > cursize && adjust == 0) {
+ /* The request is probably too large, fail */
+ return NULL;
+ }
tlsf_assert(!block_is_free(block) && "block already marked as free");
diff --git a/lib/lvgl/src/misc/lv_tlsf.h b/lib/lvgl/src/misc/lv_tlsf.h
index 9380ee8..f12590b 100644
--- a/lib/lvgl/src/misc/lv_tlsf.h
+++ b/lib/lvgl/src/misc/lv_tlsf.h
@@ -66,7 +66,7 @@ void lv_tlsf_remove_pool(lv_tlsf_t tlsf, lv_pool_t pool);
void * lv_tlsf_malloc(lv_tlsf_t tlsf, size_t bytes);
void * lv_tlsf_memalign(lv_tlsf_t tlsf, size_t align, size_t bytes);
void * lv_tlsf_realloc(lv_tlsf_t tlsf, void * ptr, size_t size);
-void lv_tlsf_free(lv_tlsf_t tlsf, const void * ptr);
+size_t lv_tlsf_free(lv_tlsf_t tlsf, const void * ptr);
/* Returns internal block size, not original request size */
size_t lv_tlsf_block_size(void * ptr);
diff --git a/lib/lvgl/src/misc/lv_txt.c b/lib/lvgl/src/misc/lv_txt.c
index ef60d74..da7eca0 100644
--- a/lib/lvgl/src/misc/lv_txt.c
+++ b/lib/lvgl/src/misc/lv_txt.c
@@ -798,7 +798,7 @@ static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c)
*/
static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i)
{
- if(i == NULL) return txt[1]; /*Get the next char*/
+ if(i == NULL) return txt[0]; /*Get the next char*/
uint8_t letter = txt[*i];
(*i)++;
diff --git a/lib/lvgl/src/widgets/lv_arc.c b/lib/lvgl/src/widgets/lv_arc.c
index 99ffb1f..0f62455 100644
--- a/lib/lvgl/src/widgets/lv_arc.c
+++ b/lib/lvgl/src/widgets/lv_arc.c
@@ -21,6 +21,10 @@
#define MY_CLASS &lv_arc_class
#define VALUE_UNSET INT16_MIN
+#define CLICK_OUTSIDE_BG_ANGLES ((uint32_t) 0x00U)
+#define CLICK_INSIDE_BG_ANGLES ((uint32_t) 0x01U)
+#define CLICK_CLOSER_TO_MAX_END ((uint32_t) 0x00U)
+#define CLICK_CLOSER_TO_MIN_END ((uint32_t) 0x01U)
/**********************
* TYPEDEFS
@@ -35,9 +39,12 @@ static void lv_arc_draw(lv_event_t * e);
static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e);
static void inv_arc_area(lv_obj_t * arc, uint16_t start_angle, uint16_t end_angle, lv_part_t part);
static void inv_knob_area(lv_obj_t * obj);
-static void get_center(lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r);
+static void get_center(const lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r);
+static lv_coord_t get_angle(const lv_obj_t * obj);
static void get_knob_area(lv_obj_t * arc, const lv_point_t * center, lv_coord_t r, lv_area_t * knob_area);
static void value_update(lv_obj_t * arc);
+static lv_coord_t knob_get_extra_size(lv_obj_t * obj);
+static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, const uint32_t tolerance_deg);
/**********************
* STATIC VARIABLES
@@ -317,6 +324,58 @@ lv_arc_mode_t lv_arc_get_mode(const lv_obj_t * obj)
return ((lv_arc_t *) obj)->type;
}
+/*=====================
+ * Other functions
+ *====================*/
+
+void lv_arc_align_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_align, lv_coord_t r_offset)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ LV_ASSERT_NULL(obj_to_align);
+
+ lv_obj_update_layout(obj);
+
+ lv_point_t center;
+ lv_coord_t arc_r;
+ get_center(obj, ¢er, &arc_r);
+ lv_coord_t indic_width = lv_obj_get_style_arc_width(obj, LV_PART_INDICATOR);
+ lv_coord_t indic_width_half = indic_width / 2;
+ arc_r -= indic_width_half;
+ arc_r += r_offset;
+
+ uint16_t angle = get_angle(obj);
+ lv_coord_t knob_x = (arc_r * lv_trigo_sin(angle + 90)) >> LV_TRIGO_SHIFT;
+ lv_coord_t knob_y = (arc_r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT;
+ lv_obj_align_to(obj_to_align, obj, LV_ALIGN_CENTER, knob_x, knob_y);
+}
+
+void lv_arc_rotate_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_rotate, lv_coord_t r_offset)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ LV_ASSERT_NULL(obj_to_rotate);
+
+ lv_obj_update_layout(obj);
+
+ lv_point_t center;
+ lv_coord_t arc_r;
+ get_center(obj, ¢er, &arc_r);
+ lv_coord_t indic_width = lv_obj_get_style_arc_width(obj, LV_PART_INDICATOR);
+ lv_coord_t indic_width_half = indic_width / 2;
+ arc_r -= indic_width_half;
+
+ arc_r += r_offset;
+ lv_obj_align_to(obj_to_rotate, obj, LV_ALIGN_CENTER, 0, -arc_r);
+
+ lv_obj_update_layout(obj);
+
+ uint16_t angle = get_angle(obj);
+ lv_coord_t pivot_x = obj_to_rotate->coords.x1 - center.x;
+ lv_coord_t pivot_y = obj_to_rotate->coords.y1 - center.y;
+ lv_obj_set_style_transform_pivot_x(obj_to_rotate, -pivot_x, 0);
+ lv_obj_set_style_transform_pivot_y(obj_to_rotate, -pivot_y, 0);
+ lv_obj_set_style_transform_angle(obj_to_rotate, angle * 10 + 900, 0);
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -343,12 +402,12 @@ static void lv_arc_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
arc->chg_rate = 720;
arc->last_tick = lv_tick_get();
arc->last_angle = arc->indic_angle_end;
+ arc->in_out = CLICK_OUTSIDE_BG_ANGLES;
lv_obj_add_flag(obj, LV_OBJ_FLAG_CLICKABLE);
- lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLL_CHAIN);
+ lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLL_CHAIN | LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_ext_click_area(obj, LV_DPI_DEF / 10);
-
LV_TRACE_OBJ_CREATE("finished");
}
@@ -422,29 +481,54 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
angle -= arc->rotation;
angle -= arc->bg_angle_start; /*Make the angle relative to the start angle*/
+ /* If we click near the bg_angle_start the angle will be close to 360° instead of an small angle */
if(angle < 0) angle += 360;
- int16_t deg_range = bg_end - arc->bg_angle_start;
+ const uint32_t circumference = (uint32_t)((2U * r * 314U) / 100U); /* Equivalent to: 2r * 3.14, avoiding floats */
+ const uint32_t tolerance_deg = (360U * LV_DPX(50U)) / circumference;
+ const uint32_t min_close_prev = (uint32_t) arc->min_close;
+ const bool is_angle_within_bg_bounds = lv_arc_angle_within_bg_bounds(obj, (uint32_t) angle, tolerance_deg);
+ if(!is_angle_within_bg_bounds) {
+ return;
+ }
+
+ int16_t deg_range = bg_end - arc->bg_angle_start;
int16_t last_angle_rel = arc->last_angle - arc->bg_angle_start;
int16_t delta_angle = angle - last_angle_rel;
- /*Do not allow big jumps.
+ /*Do not allow big jumps (jumps bigger than 280°).
*It's mainly to avoid jumping to the opposite end if the "dead" range between min. and max. is crossed.
*Check which end was closer on the last valid press (arc->min_close) and prefer that end*/
if(LV_ABS(delta_angle) > 280) {
if(arc->min_close) angle = 0;
else angle = deg_range;
}
- else {
- if(angle < deg_range / 2)arc->min_close = 1;
- else arc->min_close = 0;
+ /* Check if click was outside the background arc start and end angles */
+ else if(CLICK_OUTSIDE_BG_ANGLES == arc->in_out) {
+ if(arc->min_close) angle = -deg_range;
+ else angle = deg_range;
}
+ else { /* Keep the angle value */ }
+
+ /* Prevent big jumps when the click goes from start to end angle in the invisible
+ * part of the background arc without being released */
+ if(((min_close_prev == CLICK_CLOSER_TO_MIN_END) && (arc->min_close == CLICK_CLOSER_TO_MAX_END))
+ && ((CLICK_OUTSIDE_BG_ANGLES == arc->in_out) && (LV_ABS(delta_angle) > 280))) {
+ angle = 0;
+ }
+ else if(((min_close_prev == CLICK_CLOSER_TO_MAX_END) && (arc->min_close == CLICK_CLOSER_TO_MIN_END))
+ && (CLICK_OUTSIDE_BG_ANGLES == arc->in_out)) {
+ angle = deg_range;
+ }
+ else { /* Keep the angle value */ }
/*Calculate the slew rate limited angle based on change rate (degrees/sec)*/
delta_angle = angle - last_angle_rel;
+
uint32_t delta_tick = lv_tick_elaps(arc->last_tick);
- int16_t delta_angle_max = (arc->chg_rate * delta_tick) / 1000;
+ /* delta_angle_max can never be signed. delta_tick is always signed, same for ch_rate */
+ const uint16_t delta_angle_max = (arc->chg_rate * delta_tick) / 1000;
if(delta_angle > delta_angle_max) {
delta_angle = delta_angle_max;
@@ -452,6 +536,7 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
else if(delta_angle < -delta_angle_max) {
delta_angle = -delta_angle_max;
}
+ else { /* Nothing to do */ }
angle = last_angle_rel + delta_angle; /*Apply the limited angle change*/
@@ -508,7 +593,7 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
}
else if(code == LV_EVENT_HIT_TEST) {
- lv_hit_test_info_t * info = lv_event_get_param(e);;
+ lv_hit_test_info_t * info = lv_event_get_param(e);
lv_point_t p;
lv_coord_t r;
@@ -545,8 +630,11 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_coord_t knob_bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_KNOB);
lv_coord_t knob_pad = LV_MAX4(knob_left, knob_right, knob_top, knob_bottom) + 2;
+ lv_coord_t knob_extra_size = knob_pad - bg_pad;
+ knob_extra_size += knob_get_extra_size(obj);
+
lv_coord_t * s = lv_event_get_param(e);
- *s = LV_MAX(*s, knob_pad - bg_pad);
+ *s = LV_MAX(*s, knob_extra_size);
}
else if(code == LV_EVENT_DRAW_MAIN) {
lv_arc_draw(e);
@@ -661,6 +749,7 @@ static void inv_arc_area(lv_obj_t * obj, uint16_t start_angle, uint16_t end_angl
lv_area_t inv_area;
lv_draw_arc_get_area(c.x, c.y, r, start_angle, end_angle, w, rounded, &inv_area);
+
lv_obj_invalidate_area(obj, &inv_area);
}
@@ -672,10 +761,17 @@ static void inv_knob_area(lv_obj_t * obj)
lv_area_t a;
get_knob_area(obj, &c, r, &a);
+
+ lv_coord_t knob_extra_size = knob_get_extra_size(obj);
+
+ if(knob_extra_size > 0) {
+ lv_area_increase(&a, knob_extra_size, knob_extra_size);
+ }
+
lv_obj_invalidate_area(obj, &a);
}
-static void get_center(lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r)
+static void get_center(const lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r)
{
lv_coord_t left_bg = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
lv_coord_t right_bg = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
@@ -691,15 +787,9 @@ static void get_center(lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r)
if(arc_r) *arc_r = r;
}
-static void get_knob_area(lv_obj_t * obj, const lv_point_t * center, lv_coord_t r, lv_area_t * knob_area)
+static lv_coord_t get_angle(const lv_obj_t * obj)
{
- LV_ASSERT_OBJ(obj, MY_CLASS);
lv_arc_t * arc = (lv_arc_t *)obj;
-
- lv_coord_t indic_width = lv_obj_get_style_arc_width(obj, LV_PART_INDICATOR);
- lv_coord_t indic_width_half = indic_width / 2;
- r -= indic_width_half;
-
uint16_t angle = arc->rotation;
if(arc->type == LV_ARC_MODE_NORMAL) {
angle += arc->indic_angle_end;
@@ -708,10 +798,27 @@ static void get_knob_area(lv_obj_t * obj, const lv_point_t * center, lv_coord_t
angle += arc->indic_angle_start;
}
else if(arc->type == LV_ARC_MODE_SYMMETRICAL) {
- int32_t range_midpoint = (int32_t)(arc->min_value + arc->max_value) / 2;
- if(arc->value < range_midpoint) angle += arc->indic_angle_start;
- else angle += arc->indic_angle_end;
+ int16_t bg_end = arc->bg_angle_end;
+ if(arc->bg_angle_end < arc->bg_angle_start) bg_end = arc->bg_angle_end + 360;
+ int16_t indic_end = arc->indic_angle_end;
+ if(arc->indic_angle_end < arc->indic_angle_start) indic_end = arc->indic_angle_end + 360;
+
+ int32_t angle_midpoint = (int32_t)(arc->bg_angle_start + bg_end) / 2;
+ if(arc->indic_angle_start < angle_midpoint) angle += arc->indic_angle_start;
+ else if(indic_end > angle_midpoint) angle += arc->indic_angle_end;
+ else angle += angle_midpoint;
}
+
+ return angle;
+}
+
+static void get_knob_area(lv_obj_t * obj, const lv_point_t * center, lv_coord_t r, lv_area_t * knob_area)
+{
+ lv_coord_t indic_width = lv_obj_get_style_arc_width(obj, LV_PART_INDICATOR);
+ lv_coord_t indic_width_half = indic_width / 2;
+ r -= indic_width_half;
+
+ lv_coord_t angle = get_angle(obj);
lv_coord_t knob_x = (r * lv_trigo_sin(angle + 90)) >> LV_TRIGO_SHIFT;
lv_coord_t knob_y = (r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT;
@@ -759,12 +866,13 @@ static void value_update(lv_obj_t * obj)
}
break;
case LV_ARC_MODE_REVERSE:
- angle = lv_map(arc->value, arc->min_value, arc->max_value, arc->bg_angle_start, bg_end);
+ angle = lv_map(arc->value, arc->min_value, arc->max_value, bg_end, arc->bg_angle_start);
lv_arc_set_angles(obj, angle, arc->bg_angle_end);
break;
case LV_ARC_MODE_NORMAL:
angle = lv_map(arc->value, arc->min_value, arc->max_value, arc->bg_angle_start, bg_end);
lv_arc_set_angles(obj, arc->bg_angle_start, angle);
+
break;
default:
LV_LOG_WARN("Invalid mode: %d", arc->type);
@@ -773,4 +881,136 @@ static void value_update(lv_obj_t * obj)
arc->last_angle = angle; /*Cache angle for slew rate limiting*/
}
+static lv_coord_t knob_get_extra_size(lv_obj_t * obj)
+{
+ lv_coord_t knob_shadow_size = 0;
+ knob_shadow_size += lv_obj_get_style_shadow_width(obj, LV_PART_KNOB);
+ knob_shadow_size += lv_obj_get_style_shadow_spread(obj, LV_PART_KNOB);
+ knob_shadow_size += LV_ABS(lv_obj_get_style_shadow_ofs_x(obj, LV_PART_KNOB));
+ knob_shadow_size += LV_ABS(lv_obj_get_style_shadow_ofs_y(obj, LV_PART_KNOB));
+
+ lv_coord_t knob_outline_size = 0;
+ knob_outline_size += lv_obj_get_style_outline_width(obj, LV_PART_KNOB);
+ knob_outline_size += lv_obj_get_style_outline_pad(obj, LV_PART_KNOB);
+
+ return LV_MAX(knob_shadow_size, knob_outline_size);
+}
+
+/**
+ * Check if angle is within arc background bounds
+ *
+ * In order to avoid unexpected value update of the arc value when the user clicks
+ * outside of the arc background we need to check if the angle (of the clicked point)
+ * is within the bounds of the background.
+ *
+ * A tolerance (extra room) also should be taken into consideration.
+ *
+ * E.g. Arc with start angle of 0° and end angle of 90°, the background is only visible in
+ * that range, from 90° to 360° the background is invisible. Click in 150° should not update
+ * the arc value, click within the arc angle range should.
+ *
+ * IMPORTANT NOTE: angle is always relative to bg_angle_start, e.g. if bg_angle_start is 30
+ * and we click a bit to the left, angle is 10, not the expected 40.
+ *
+ * @param obj Pointer to lv_arc
+ * @param angle Angle to be checked
+ * @param tolerance_deg Tolerance
+ *
+ * @return true if angle is within arc background bounds, false otherwise
+ */
+static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, const uint32_t tolerance_deg)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ lv_arc_t * arc = (lv_arc_t *)obj;
+
+ uint32_t smaller_angle = 0;
+ uint32_t bigger_angle = 0;
+
+ /* Determine which background angle is smaller and bigger */
+ if(arc->bg_angle_start < arc->bg_angle_end) {
+ bigger_angle = arc->bg_angle_end;
+ smaller_angle = arc->bg_angle_start;
+ }
+ else {
+ bigger_angle = (360 - arc->bg_angle_start) + arc->bg_angle_end;
+ smaller_angle = 0;
+ }
+
+ /* Angle is between both background angles */
+ if((smaller_angle <= angle) && (angle <= bigger_angle)) {
+
+ if(((bigger_angle - smaller_angle) / 2U) >= angle) {
+ arc->min_close = 1;
+ }
+ else {
+ arc->min_close = 0;
+ }
+
+ arc->in_out = CLICK_INSIDE_BG_ANGLES;
+
+ return true;
+ }
+ /* Distance between background start and end angles is less than tolerance,
+ * consider the click inside the arc */
+ else if(((smaller_angle - tolerance_deg) <= 0U) &&
+ (360U - (bigger_angle + (smaller_angle - tolerance_deg)))) {
+
+ arc->min_close = 1;
+ arc->in_out = CLICK_INSIDE_BG_ANGLES;
+ return true;
+ }
+ else { /* Case handled below */ }
+
+ /* Legends:
+ * 0° = angle 0
+ * 360° = angle 360
+ * T: Tolerance
+ * A: Angle
+ * S: Arc background start angle
+ * E: Arc background end angle
+ *
+ * Start angle is bigger or equal to tolerance */
+ if((smaller_angle >= tolerance_deg)
+ /* (360° - T) --- A --- 360° */
+ && ((angle >= (360U - tolerance_deg)) && (angle <= 360U))) {
+
+ arc->min_close = 1;
+ arc->in_out = CLICK_OUTSIDE_BG_ANGLES;
+ return true;
+ }
+ /* Tolerance is bigger than bg start angle */
+ else if((smaller_angle < tolerance_deg)
+ /* (360° - (T - S)) --- A --- 360° */
+ && (((360U - (tolerance_deg - smaller_angle)) <= angle)) && (angle <= 360U)) {
+
+ arc->min_close = 1;
+ arc->in_out = CLICK_OUTSIDE_BG_ANGLES;
+ return true;
+ }
+ /* 360° is bigger than background end angle + tolerance */
+ else if((360U >= (bigger_angle + tolerance_deg))
+ /* E --- A --- (E + T) */
+ && ((bigger_angle <= (angle + smaller_angle)) &&
+ ((angle + smaller_angle) <= (bigger_angle + tolerance_deg)))) {
+
+ arc->min_close = 0;
+ arc->in_out = CLICK_OUTSIDE_BG_ANGLES;
+ return true;
+ }
+ /* Background end angle + tolerance is bigger than 360° and bg_start_angle + tolerance is not near 0° + ((bg_end_angle + tolerance) - 360°)
+ * Here we can assume background is not near 0° because of the first two initial checks */
+ else if((360U < (bigger_angle + tolerance_deg))
+ && (angle <= 0U + ((bigger_angle + tolerance_deg) - 360U)) && (angle > bigger_angle)) {
+
+ arc->min_close = 0;
+ arc->in_out = CLICK_OUTSIDE_BG_ANGLES;
+ return true;
+ }
+ else {
+ /* Nothing to do */
+ }
+
+ return false;
+}
+
#endif
diff --git a/lib/lvgl/src/widgets/lv_arc.h b/lib/lvgl/src/widgets/lv_arc.h
index 8ec39a4..6a8a072 100644
--- a/lib/lvgl/src/widgets/lv_arc.h
+++ b/lib/lvgl/src/widgets/lv_arc.h
@@ -44,10 +44,11 @@ typedef struct {
int16_t value; /*Current value of the arc*/
int16_t min_value; /*Minimum value of the arc*/
int16_t max_value; /*Maximum value of the arc*/
- uint16_t dragging : 1;
- uint16_t type : 2;
- uint16_t min_close : 1; /*1: the last pressed angle was closer to minimum end*/
- uint16_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/
+ uint32_t dragging : 1;
+ uint32_t type : 2;
+ uint32_t min_close : 1; /*1: the last pressed angle was closer to minimum end*/
+ uint32_t in_out : 1; /* 1: The click was within the background arc angles. 0: Click outside */
+ uint32_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/
uint32_t last_tick; /*Last dragging event timestamp of the arc*/
int16_t last_angle; /*Last dragging angle of the arc*/
} lv_arc_t;
@@ -85,83 +86,83 @@ lv_obj_t * lv_arc_create(lv_obj_t * parent);
/**
* Set the start angle of an arc. 0 deg: right, 90 bottom, etc.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param start the start angle
*/
-void lv_arc_set_start_angle(lv_obj_t * arc, uint16_t start);
+void lv_arc_set_start_angle(lv_obj_t * obj, uint16_t start);
/**
* Set the end angle of an arc. 0 deg: right, 90 bottom, etc.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param end the end angle
*/
-void lv_arc_set_end_angle(lv_obj_t * arc, uint16_t end);
+void lv_arc_set_end_angle(lv_obj_t * obj, uint16_t end);
/**
* Set the start and end angles
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param start the start angle
* @param end the end angle
*/
-void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end);
+void lv_arc_set_angles(lv_obj_t * obj, uint16_t start, uint16_t end);
/**
* Set the start angle of an arc background. 0 deg: right, 90 bottom, etc.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param start the start angle
*/
-void lv_arc_set_bg_start_angle(lv_obj_t * arc, uint16_t start);
+void lv_arc_set_bg_start_angle(lv_obj_t * obj, uint16_t start);
/**
* Set the start angle of an arc background. 0 deg: right, 90 bottom etc.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param end the end angle
*/
-void lv_arc_set_bg_end_angle(lv_obj_t * arc, uint16_t end);
+void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint16_t end);
/**
* Set the start and end angles of the arc background
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param start the start angle
* @param end the end angle
*/
-void lv_arc_set_bg_angles(lv_obj_t * arc, uint16_t start, uint16_t end);
+void lv_arc_set_bg_angles(lv_obj_t * obj, uint16_t start, uint16_t end);
/**
* Set the rotation for the whole arc
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param rotation rotation angle
*/
-void lv_arc_set_rotation(lv_obj_t * arc, uint16_t rotation);
+void lv_arc_set_rotation(lv_obj_t * obj, uint16_t rotation);
/**
* Set the type of arc.
- * @param arc pointer to arc object
+ * @param obj pointer to arc object
* @param mode arc's mode
*/
-void lv_arc_set_mode(lv_obj_t * arc, lv_arc_mode_t type);
+void lv_arc_set_mode(lv_obj_t * obj, lv_arc_mode_t type);
/**
* Set a new value on the arc
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param value new value
*/
-void lv_arc_set_value(lv_obj_t * arc, int16_t value);
+void lv_arc_set_value(lv_obj_t * obj, int16_t value);
/**
* Set minimum and the maximum values of an arc
- * @param arc pointer to the arc object
+ * @param obj pointer to the arc object
* @param min minimum value
* @param max maximum value
*/
-void lv_arc_set_range(lv_obj_t * arc, int16_t min, int16_t max);
+void lv_arc_set_range(lv_obj_t * obj, int16_t min, int16_t max);
/**
* Set a change rate to limit the speed how fast the arc should reach the pressed point.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @param rate the change rate
*/
-void lv_arc_set_change_rate(lv_obj_t * arc, uint16_t rate);
+void lv_arc_set_change_rate(lv_obj_t * obj, uint16_t rate);
/*=====================
* Getter functions
@@ -169,56 +170,56 @@ void lv_arc_set_change_rate(lv_obj_t * arc, uint16_t rate);
/**
* Get the start angle of an arc.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @return the start angle [0..360]
*/
uint16_t lv_arc_get_angle_start(lv_obj_t * obj);
/**
* Get the end angle of an arc.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @return the end angle [0..360]
*/
uint16_t lv_arc_get_angle_end(lv_obj_t * obj);
/**
* Get the start angle of an arc background.
- * @param arc pointer to an arc object
- * @return the start angle [0..360]
+ * @param obj pointer to an arc object
+ * @return the start angle [0..360]
*/
uint16_t lv_arc_get_bg_angle_start(lv_obj_t * obj);
/**
* Get the end angle of an arc background.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @return the end angle [0..360]
*/
uint16_t lv_arc_get_bg_angle_end(lv_obj_t * obj);
/**
* Get the value of an arc
- * @param arc pointer to an arc object
- * @return the value of the arc
+ * @param obj pointer to an arc object
+ * @return the value of the arc
*/
int16_t lv_arc_get_value(const lv_obj_t * obj);
/**
* Get the minimum value of an arc
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @return the minimum value of the arc
*/
int16_t lv_arc_get_min_value(const lv_obj_t * obj);
/**
* Get the maximum value of an arc
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @return the maximum value of the arc
*/
int16_t lv_arc_get_max_value(const lv_obj_t * obj);
/**
* Get whether the arc is type or not.
- * @param arc pointer to an arc object
+ * @param obj pointer to an arc object
* @return arc's mode
*/
lv_arc_mode_t lv_arc_get_mode(const lv_obj_t * obj);
@@ -227,6 +228,22 @@ lv_arc_mode_t lv_arc_get_mode(const lv_obj_t * obj);
* Other functions
*====================*/
+/**
+ * Align an object to the current position of the arc (knob)
+ * @param obj pointer to an arc object
+ * @param obj_to_align pointer to an object to align
+ * @param r_offset consider the radius larger with this value (< 0: for smaller radius)
+ */
+void lv_arc_align_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_align, lv_coord_t r_offset);
+
+/**
+ * Rotate an object to the current position of the arc (knob)
+ * @param obj pointer to an arc object
+ * @param obj_to_align pointer to an object to rotate
+ * @param r_offset consider the radius larger with this value (< 0: for smaller radius)
+ */
+void lv_arc_rotate_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_rotate, lv_coord_t r_offset);
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/widgets/lv_bar.c b/lib/lvgl/src/widgets/lv_bar.c
index 0da2a98..a057618 100644
--- a/lib/lvgl/src/widgets/lv_bar.c
+++ b/lib/lvgl/src/widgets/lv_bar.c
@@ -571,6 +571,8 @@ static void lv_bar_set_value_with_anim(lv_obj_t * obj, int32_t new_value, int32_
_lv_bar_anim_t * anim_info, lv_anim_enable_t en)
{
if(en == LV_ANIM_OFF) {
+ lv_anim_del(anim_info, NULL);
+ anim_info->anim_state = LV_BAR_ANIM_STATE_INV;
*value_ptr = new_value;
lv_obj_invalidate((lv_obj_t *)obj);
}
diff --git a/lib/lvgl/src/widgets/lv_btnmatrix.c b/lib/lvgl/src/widgets/lv_btnmatrix.c
index 62f86f7..5616b66 100644
--- a/lib/lvgl/src/widgets/lv_btnmatrix.c
+++ b/lib/lvgl/src/widgets/lv_btnmatrix.c
@@ -23,7 +23,7 @@
#define MY_CLASS &lv_btnmatrix_class
#define BTN_EXTRA_CLICK_AREA_MAX (LV_DPI_DEF / 10)
-#define LV_BTNMATRIX_WIDTH_MASK 0x0007
+#define LV_BTNMATRIX_WIDTH_MASK 0x000F
/**********************
* TYPEDEFS
@@ -208,7 +208,7 @@ void lv_btnmatrix_set_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctr
{
LV_ASSERT_OBJ(obj, MY_CLASS);
- lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;;
+ lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;
if(btn_id >= btnm->btn_cnt) return;
@@ -216,6 +216,19 @@ void lv_btnmatrix_set_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_ctr
lv_btnmatrix_clear_btn_ctrl_all(obj, LV_BTNMATRIX_CTRL_CHECKED);
}
+ /* If we hide a button if all buttons are now hidden hide the whole button matrix to make focus behave correctly */
+ if(ctrl & LV_BTNMATRIX_CTRL_HIDDEN) {
+ bool all_buttons_hidden = true;
+ if(btnm->btn_cnt > 1) {
+ for(uint16_t btn_idx = 0; btn_idx < btnm->btn_cnt; btn_idx++) {
+ if(btn_idx == btn_id) continue;
+ if(!(btnm->ctrl_bits[btn_idx] & LV_BTNMATRIX_CTRL_HIDDEN)) all_buttons_hidden = false;
+ }
+
+ }
+ if(all_buttons_hidden) lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
+ }
+
btnm->ctrl_bits[btn_id] |= ctrl;
invalidate_button_area(obj, btn_id);
@@ -228,10 +241,15 @@ void lv_btnmatrix_clear_btn_ctrl(lv_obj_t * obj, uint16_t btn_id, lv_btnmatrix_c
{
LV_ASSERT_OBJ(obj, MY_CLASS);
- lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;;
+ lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;
if(btn_id >= btnm->btn_cnt) return;
+ /* If all buttons were hidden the whole button matrix is hidden so we need to check and remove hidden flag if present */
+ if(ctrl & LV_BTNMATRIX_CTRL_HIDDEN) {
+ if(lv_obj_has_flag(obj, LV_OBJ_FLAG_HIDDEN)) lv_obj_clear_flag(obj, LV_OBJ_FLAG_HIDDEN);
+ }
+
btnm->ctrl_bits[btn_id] &= (~ctrl);
invalidate_button_area(obj, btn_id);
@@ -399,13 +417,10 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_point_t p;
if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
- lv_coord_t * s = lv_event_get_param(e);
if(has_popovers_in_top_row(obj)) {
/*reserve one row worth of extra space to account for popovers in the top row*/
- *s = btnm->row_cnt > 0 ? lv_obj_get_content_height(obj) / btnm->row_cnt : 0;
- }
- else {
- *s = 0;
+ lv_coord_t s = btnm->row_cnt > 0 ? lv_obj_get_content_height(obj) / btnm->row_cnt : 0;
+ lv_event_set_ext_draw_size(e, s);
}
}
if(code == LV_EVENT_STYLE_CHANGED) {
@@ -425,6 +440,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_indev_get_point(param, &p);
btn_pr = get_button_from_point(obj, &p);
/*Handle the case where there is no button there*/
+ btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
if(btn_pr != LV_BTNMATRIX_BTN_NONE) {
if(button_is_inactive(btnm->ctrl_bits[btn_pr]) == false &&
button_is_hidden(btnm->ctrl_bits[btn_pr]) == false) {
@@ -432,6 +448,9 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
invalidate_button_area(obj, btnm->btn_id_sel); /*Invalidate the new area*/
}
}
+ else {
+ btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
+ }
}
if(btnm->btn_id_sel != LV_BTNMATRIX_BTN_NONE) {
@@ -492,7 +511,6 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
if(btnm->one_check) make_one_button_checked(obj, btnm->btn_id_sel);
}
-
if((button_is_click_trig(btnm->ctrl_bits[btnm->btn_id_sel]) == true ||
button_is_popover(btnm->ctrl_bits[btnm->btn_id_sel]) == true) &&
button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel]) == false &&
@@ -523,6 +541,8 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
}
else if(code == LV_EVENT_FOCUSED) {
+ if(btnm->btn_cnt == 0) return;
+
lv_indev_t * indev = lv_event_get_param(e);
lv_indev_type_t indev_type = lv_indev_get_type(indev);
@@ -566,9 +586,15 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
else btnm->btn_id_sel++;
if(btnm->btn_id_sel >= btnm->btn_cnt) btnm->btn_id_sel = 0;
+ uint16_t btn_id_start = btnm->btn_id_sel;
while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) {
btnm->btn_id_sel++;
if(btnm->btn_id_sel >= btnm->btn_cnt) btnm->btn_id_sel = 0;
+
+ if(btnm->btn_id_sel == btn_id_start) {
+ btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
+ break;
+ }
}
}
else if(c == LV_KEY_LEFT) {
@@ -577,9 +603,15 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
if(btnm->btn_id_sel == 0) btnm->btn_id_sel = btnm->btn_cnt - 1;
else if(btnm->btn_id_sel > 0) btnm->btn_id_sel--;
+ uint16_t btn_id_start = btnm->btn_id_sel;
while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) {
if(btnm->btn_id_sel > 0) btnm->btn_id_sel--;
else btnm->btn_id_sel = btnm->btn_cnt - 1;
+
+ if(btnm->btn_id_sel == btn_id_start) {
+ btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
+ break;
+ }
}
}
else if(c == LV_KEY_DOWN) {
@@ -589,7 +621,10 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
btnm->btn_id_sel = 0;
while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) {
btnm->btn_id_sel++;
- if(btnm->btn_id_sel >= btnm->btn_cnt) btnm->btn_id_sel = 0;
+ if(btnm->btn_id_sel >= btnm->btn_cnt) {
+ btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
+ break;
+ }
}
}
else {
@@ -617,7 +652,10 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
btnm->btn_id_sel = 0;
while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) {
btnm->btn_id_sel++;
- if(btnm->btn_id_sel >= btnm->btn_cnt) btnm->btn_id_sel = 0;
+ if(btnm->btn_id_sel >= btnm->btn_cnt) {
+ btnm->btn_id_sel = LV_BTNMATRIX_BTN_NONE;
+ break;
+ }
}
}
else {
@@ -746,7 +784,6 @@ static void draw_main(lv_event_t * e)
if(recolor) draw_label_dsc_act.flag |= LV_TEXT_FLAG_RECOLOR;
else draw_label_dsc_act.flag &= ~LV_TEXT_FLAG_RECOLOR;
-
part_draw_dsc.draw_area = &btn_area;
part_draw_dsc.id = btn_i;
lv_event_send(obj, LV_EVENT_DRAW_PART_BEGIN, &part_draw_dsc);
diff --git a/lib/lvgl/src/widgets/lv_btnmatrix.h b/lib/lvgl/src/widgets/lv_btnmatrix.h
index 780d57b..2edf202 100644
--- a/lib/lvgl/src/widgets/lv_btnmatrix.h
+++ b/lib/lvgl/src/widgets/lv_btnmatrix.h
@@ -32,18 +32,19 @@ LV_EXPORT_CONST_INT(LV_BTNMATRIX_BTN_NONE);
/** Type to store button control bits (disabled, hidden etc.)
* The first 3 bits are used to store the width*/
enum {
- _LV_BTNMATRIX_WIDTH = 0x0007, /**< Reserved to stire the size units*/
- LV_BTNMATRIX_CTRL_HIDDEN = 0x0008, /**< Button hidden*/
- LV_BTNMATRIX_CTRL_NO_REPEAT = 0x0010, /**< Do not repeat press this button.*/
- LV_BTNMATRIX_CTRL_DISABLED = 0x0020, /**< Disable this button.*/
- LV_BTNMATRIX_CTRL_CHECKABLE = 0x0040, /**< The button can be toggled.*/
- LV_BTNMATRIX_CTRL_CHECKED = 0x0080, /**< Button is currently toggled (e.g. checked).*/
- LV_BTNMATRIX_CTRL_CLICK_TRIG = 0x0100, /**< 1: Send LV_EVENT_VALUE_CHANGE on CLICK, 0: Send LV_EVENT_VALUE_CHANGE on PRESS*/
- LV_BTNMATRIX_CTRL_POPOVER = 0x0200, /**< Show a popover when pressing this key*/
- LV_BTNMATRIX_CTRL_RECOLOR = 0x1000, /**< Enable text recoloring with `#color`*/
- _LV_BTNMATRIX_CTRL_RESERVED = 0x2000, /**< Reserved for later use*/
- LV_BTNMATRIX_CTRL_CUSTOM_1 = 0x4000, /**< Custom free to use flag*/
- LV_BTNMATRIX_CTRL_CUSTOM_2 = 0x8000, /**< Custom free to use flag*/
+ _LV_BTNMATRIX_WIDTH = 0x000F, /**< Reserved to store the size units*/
+ LV_BTNMATRIX_CTRL_HIDDEN = 0x0010, /**< Button hidden*/
+ LV_BTNMATRIX_CTRL_NO_REPEAT = 0x0020, /**< Do not repeat press this button.*/
+ LV_BTNMATRIX_CTRL_DISABLED = 0x0040, /**< Disable this button.*/
+ LV_BTNMATRIX_CTRL_CHECKABLE = 0x0080, /**< The button can be toggled.*/
+ LV_BTNMATRIX_CTRL_CHECKED = 0x0100, /**< Button is currently toggled (e.g. checked).*/
+ LV_BTNMATRIX_CTRL_CLICK_TRIG = 0x0200, /**< 1: Send LV_EVENT_VALUE_CHANGE on CLICK, 0: Send LV_EVENT_VALUE_CHANGE on PRESS*/
+ LV_BTNMATRIX_CTRL_POPOVER = 0x0400, /**< Show a popover when pressing this key*/
+ LV_BTNMATRIX_CTRL_RECOLOR = 0x0800, /**< Enable text recoloring with `#color`*/
+ _LV_BTNMATRIX_CTRL_RESERVED_1 = 0x1000, /**< Reserved for later use*/
+ _LV_BTNMATRIX_CTRL_RESERVED_2 = 0x2000, /**< Reserved for later use*/
+ LV_BTNMATRIX_CTRL_CUSTOM_1 = 0x4000, /**< Custom free to use flag*/
+ LV_BTNMATRIX_CTRL_CUSTOM_2 = 0x8000, /**< Custom free to use flag*/
};
typedef uint16_t lv_btnmatrix_ctrl_t;
diff --git a/lib/lvgl/src/widgets/lv_canvas.c b/lib/lvgl/src/widgets/lv_canvas.c
index bde4b92..243a083 100644
--- a/lib/lvgl/src/widgets/lv_canvas.c
+++ b/lib/lvgl/src/widgets/lv_canvas.c
@@ -158,98 +158,58 @@ void lv_canvas_copy_buf(lv_obj_t * obj, const void * to_copy, lv_coord_t x, lv_c
}
}
-void lv_canvas_transform(lv_obj_t * obj, lv_img_dsc_t * img, int16_t angle, uint16_t zoom, lv_coord_t offset_x,
+void lv_canvas_transform(lv_obj_t * obj, lv_img_dsc_t * src_img, int16_t angle, uint16_t zoom, lv_coord_t offset_x,
lv_coord_t offset_y,
int32_t pivot_x, int32_t pivot_y, bool antialias)
{
#if LV_DRAW_COMPLEX
LV_ASSERT_OBJ(obj, MY_CLASS);
- LV_ASSERT_NULL(img);
+ LV_ASSERT_NULL(src_img);
lv_canvas_t * canvas = (lv_canvas_t *)obj;
- lv_color_t color = lv_obj_get_style_img_recolor(obj, LV_PART_MAIN);
-
- int32_t dest_width = canvas->dsc.header.w;
- int32_t dest_height = canvas->dsc.header.h;
+ lv_img_dsc_t * dest_img = &canvas->dsc;
int32_t x;
int32_t y;
- bool ret;
- lv_img_transform_dsc_t dsc;
- dsc.cfg.angle = angle;
- dsc.cfg.zoom = zoom;
- dsc.cfg.src = img->data;
- dsc.cfg.src_w = img->header.w;
- dsc.cfg.src_h = img->header.h;
- dsc.cfg.cf = img->header.cf;
- dsc.cfg.pivot_x = pivot_x;
- dsc.cfg.pivot_y = pivot_y;
- dsc.cfg.color = color;
- dsc.cfg.antialias = antialias;
- _lv_img_buf_transform_init(&dsc);
+ lv_draw_img_dsc_t draw_dsc;
+ lv_draw_img_dsc_init(&draw_dsc);
+ draw_dsc.angle = angle;
+ draw_dsc.zoom = zoom;
+ draw_dsc.pivot.x = pivot_x;
+ draw_dsc.pivot.y = pivot_y;
+ draw_dsc.antialias = antialias;
- for(y = -offset_y; y < dest_height - offset_y; y++) {
- for(x = -offset_x; x < dest_width - offset_x; x++) {
+ lv_area_t dest_area;
+ dest_area.x1 = -offset_x;
+ dest_area.x2 = dest_area.x1 + dest_img->header.w - 1;
+ dest_area.y1 = -offset_y;
+ dest_area.y2 = -offset_y;
- ret = _lv_img_buf_transform(&dsc, x, y);
+ lv_color_t * cbuf = lv_mem_alloc(dest_img->header.w * sizeof(lv_color_t));
+ lv_opa_t * abuf = lv_mem_alloc(dest_img->header.w * sizeof(lv_opa_t));
+ for(y = 0; y < dest_img->header.h; y++) {
+ lv_draw_sw_transform(NULL, &dest_area, src_img->data, src_img->header.w, src_img->header.h, src_img->header.w,
+ &draw_dsc, canvas->dsc.header.cf, cbuf, abuf);
- if(ret == false) continue;
-
- if(x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) {
- /*If the image has no alpha channel just simple set the result color on the canvas*/
- if(lv_img_cf_has_alpha(img->header.cf) == false) {
- lv_img_buf_set_px_color(&canvas->dsc, x + offset_x, y + offset_y, dsc.res.color);
- }
- else {
- lv_color_t bg_color = lv_img_buf_get_px_color(&canvas->dsc, x + offset_x, y + offset_y, dsc.cfg.color);
-
- /*If the canvas has no alpha but the image has mix the image's color with
- * canvas*/
- if(lv_img_cf_has_alpha(canvas->dsc.header.cf) == false) {
- if(dsc.res.opa < LV_OPA_MAX) dsc.res.color = lv_color_mix(dsc.res.color, bg_color, dsc.res.opa);
- lv_img_buf_set_px_color(&canvas->dsc, x + offset_x, y + offset_y, dsc.res.color);
- }
- /*Both the image and canvas has alpha channel. Some extra calculation is
- required*/
- else {
- lv_opa_t bg_opa = lv_img_buf_get_px_alpha(&canvas->dsc, x + offset_x, y + offset_y);
- /*Pick the foreground if it's fully opaque or the Background is fully
- *transparent*/
- if(dsc.res.opa >= LV_OPA_MAX || bg_opa <= LV_OPA_MIN) {
- lv_img_buf_set_px_color(&canvas->dsc, x + offset_x, y + offset_y, dsc.res.color);
- lv_img_buf_set_px_alpha(&canvas->dsc, x + offset_x, y + offset_y, dsc.res.opa);
- }
- /*Opaque background: use simple mix*/
- else if(bg_opa >= LV_OPA_MAX) {
- lv_img_buf_set_px_color(&canvas->dsc, x + offset_x, y + offset_y,
- lv_color_mix(dsc.res.color, bg_color, dsc.res.opa));
- }
- /*Both colors have alpha. Expensive calculation need to be applied*/
- else {
-
- /*Info:
- * https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/
- lv_opa_t opa_res_2 = 255 - ((uint16_t)((uint16_t)(255 - dsc.res.opa) * (255 - bg_opa)) >> 8);
- if(opa_res_2 == 0) {
- opa_res_2 = 1; /*never happens, just to be sure*/
- }
- lv_opa_t ratio = (uint16_t)((uint16_t)dsc.res.opa * 255) / opa_res_2;
-
- lv_img_buf_set_px_color(&canvas->dsc, x + offset_x, y + offset_y,
- lv_color_mix(dsc.res.color, bg_color, ratio));
- lv_img_buf_set_px_alpha(&canvas->dsc, x + offset_x, y + offset_y, opa_res_2);
- }
- }
- }
+ for(x = 0; x < dest_img->header.w; x++) {
+ if(abuf[x]) {
+ lv_img_buf_set_px_color(dest_img, x, y, cbuf[x]);
+ lv_img_buf_set_px_alpha(dest_img, x, y, abuf[x]);
}
}
+
+ dest_area.y1++;
+ dest_area.y2++;
}
+ lv_mem_free(cbuf);
+ lv_mem_free(abuf);
lv_obj_invalidate(obj);
+
#else
LV_UNUSED(obj);
- LV_UNUSED(img);
+ LV_UNUSED(src_img);
LV_UNUSED(angle);
LV_UNUSED(zoom);
LV_UNUSED(offset_x);
@@ -696,7 +656,6 @@ void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t points[], uint32_t
lv_disp_t * refr_ori = _lv_refr_get_disp_refreshing();
_lv_refr_set_disp_refreshing(&fake_disp);
-
/*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
lv_color_t ctransp = LV_COLOR_CHROMA_KEY;
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
@@ -829,7 +788,6 @@ static void lv_canvas_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
lv_img_cache_invalidate_src(&canvas->dsc);
}
-
static void init_fake_disp(lv_obj_t * canvas, lv_disp_t * disp, lv_disp_drv_t * drv, lv_area_t * clip_area)
{
lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
@@ -857,6 +815,9 @@ static void init_fake_disp(lv_obj_t * canvas, lv_disp_t * disp, lv_disp_drv_t *
draw_ctx->buf = (void *)dsc->data;
lv_disp_drv_use_generic_set_px_cb(disp->driver, dsc->header.cf);
+ if(LV_COLOR_SCREEN_TRANSP && dsc->header.cf != LV_IMG_CF_TRUE_COLOR_ALPHA) {
+ drv->screen_transp = 0;
+ }
}
static void deinit_fake_disp(lv_obj_t * canvas, lv_disp_t * disp)
@@ -866,6 +827,4 @@ static void deinit_fake_disp(lv_obj_t * canvas, lv_disp_t * disp)
lv_mem_free(disp->driver->draw_ctx);
}
-
-
#endif
diff --git a/lib/lvgl/src/widgets/lv_canvas.h b/lib/lvgl/src/widgets/lv_canvas.h
index 71f0516..67e9055 100644
--- a/lib/lvgl/src/widgets/lv_canvas.h
+++ b/lib/lvgl/src/widgets/lv_canvas.h
@@ -91,7 +91,6 @@ static inline void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t
*/
void lv_canvas_set_px_opa(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_opa_t opa);
-
/**
* Set the palette color of a canvas with index format. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
* @param canvas pointer to canvas object
diff --git a/lib/lvgl/src/widgets/lv_checkbox.c b/lib/lvgl/src/widgets/lv_checkbox.c
index dd3b3d1..fa79b37 100644
--- a/lib/lvgl/src/widgets/lv_checkbox.c
+++ b/lib/lvgl/src/widgets/lv_checkbox.c
@@ -74,14 +74,16 @@ void lv_checkbox_set_text(lv_obj_t * obj, const char * txt)
size_t len = strlen(txt);
#endif
- if(!cb->static_txt) cb->txt = lv_mem_realloc(cb->txt, len + 1);
- else cb->txt = lv_mem_alloc(len + 1);
+ char * _txt = (char *)cb->txt;
+ if(!cb->static_txt) _txt = lv_mem_realloc(_txt, len + 1);
+ else _txt = lv_mem_alloc(len + 1);
#if LV_USE_ARABIC_PERSIAN_CHARS
- _lv_txt_ap_proc(txt, cb->txt);
+ _lv_txt_ap_proc(txt, _txt);
#else
- strcpy(cb->txt, txt);
+ strcpy(_txt, txt);
#endif
+ cb->txt = _txt;
cb->static_txt = 0;
lv_obj_refresh_self_size(obj);
@@ -92,7 +94,7 @@ void lv_checkbox_set_text_static(lv_obj_t * obj, const char * txt)
{
lv_checkbox_t * cb = (lv_checkbox_t *)obj;
- if(!cb->static_txt) lv_mem_free(cb->txt);
+ if(!cb->static_txt) lv_mem_free((void *)cb->txt);
cb->txt = (char *)txt;
cb->static_txt = 1;
@@ -138,7 +140,7 @@ static void lv_checkbox_destructor(const lv_obj_class_t * class_p, lv_obj_t * ob
lv_checkbox_t * cb = (lv_checkbox_t *)obj;
if(!cb->static_txt) {
- lv_mem_free(cb->txt);
+ lv_mem_free((void *)cb->txt);
cb->txt = NULL;
}
LV_TRACE_OBJ_CREATE("finished");
diff --git a/lib/lvgl/src/widgets/lv_checkbox.h b/lib/lvgl/src/widgets/lv_checkbox.h
index 772f500..11405bd 100644
--- a/lib/lvgl/src/widgets/lv_checkbox.h
+++ b/lib/lvgl/src/widgets/lv_checkbox.h
@@ -28,7 +28,7 @@ extern "C" {
typedef struct {
lv_obj_t obj;
- char * txt;
+ const char * txt;
uint32_t static_txt : 1;
} lv_checkbox_t;
diff --git a/lib/lvgl/src/widgets/lv_dropdown.c b/lib/lvgl/src/widgets/lv_dropdown.c
index f4f946f..aa51816 100644
--- a/lib/lvgl/src/widgets/lv_dropdown.c
+++ b/lib/lvgl/src/widgets/lv_dropdown.c
@@ -79,7 +79,6 @@ const lv_obj_class_t lv_dropdownlist_class = {
.base_class = &lv_obj_class
};
-
/**********************
* MACROS
**********************/
@@ -285,6 +284,10 @@ void lv_dropdown_set_selected(lv_obj_t * obj, uint16_t sel_opt)
dropdown->sel_opt_id = sel_opt < dropdown->option_cnt ? sel_opt : dropdown->option_cnt - 1;
dropdown->sel_opt_id_orig = dropdown->sel_opt_id;
+ if(dropdown->list) {
+ position_to_selected(obj);
+ }
+
lv_obj_invalidate(obj);
}
@@ -403,21 +406,25 @@ int32_t lv_dropdown_get_option_index(lv_obj_t * obj, const char * option)
const char * opts = lv_dropdown_get_options(obj);
uint32_t char_i = 0;
uint32_t opt_i = 0;
+ uint32_t option_len = strlen(option);
const char * start = opts;
while(start[char_i] != '\0') {
for(char_i = 0; (start[char_i] != '\n') && (start[char_i] != '\0'); char_i++);
- if(memcmp(start, option, LV_MIN(strlen(option), char_i)) == 0) return opt_i;
+ if(option_len == char_i && memcmp(start, option, LV_MIN(option_len, char_i)) == 0) {
+ return opt_i;
+ }
+
start = &start[char_i];
if(start[0] == '\n') start++;
+ char_i = 0;
opt_i++;
}
return -1;
}
-
const char * lv_dropdown_get_symbol(lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -535,7 +542,7 @@ void lv_dropdown_open(lv_obj_t * dropdown_obj)
lv_obj_align(label, LV_ALIGN_TOP_RIGHT, 0, 0);
break;
case LV_TEXT_ALIGN_CENTER:
- lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
+ lv_obj_align(label, LV_ALIGN_TOP_MID, 0, 0);
break;
}
@@ -769,7 +776,6 @@ static void lv_dropdown_list_event(const lv_obj_class_t * class_p, lv_event_t *
}
}
-
static void draw_main(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -1004,7 +1010,6 @@ static void draw_box_label(lv_obj_t * dropdown_obj, lv_draw_ctx_t * draw_ctx, ui
list_obj->skip_trans = 0;
}
-
static lv_res_t btn_release_handler(lv_obj_t * obj)
{
lv_dropdown_t * dropdown = (lv_dropdown_t *)obj;
diff --git a/lib/lvgl/src/widgets/lv_img.c b/lib/lvgl/src/widgets/lv_img.c
index e958109..6cc30bd 100644
--- a/lib/lvgl/src/widgets/lv_img.c
+++ b/lib/lvgl/src/widgets/lv_img.c
@@ -9,6 +9,7 @@
#include "lv_img.h"
#if LV_USE_IMG != 0
+#include "../core/lv_disp.h"
#include "../misc/lv_assert.h"
#include "../draw/lv_img_decoder.h"
#include "../misc/lv_fs.h"
@@ -165,8 +166,6 @@ void lv_img_set_offset_x(lv_obj_t * obj, lv_coord_t x)
lv_img_t * img = (lv_img_t *)obj;
- x = x % img->w;
-
img->offset.x = x;
lv_obj_invalidate(obj);
}
@@ -177,29 +176,23 @@ void lv_img_set_offset_y(lv_obj_t * obj, lv_coord_t y)
lv_img_t * img = (lv_img_t *)obj;
- y = y % img->h;
-
img->offset.y = y;
lv_obj_invalidate(obj);
}
void lv_img_set_angle(lv_obj_t * obj, int16_t angle)
{
- if(angle < 0 || angle >= 3600) angle = angle % 3600;
+ while(angle >= 3600) angle -= 3600;
+ while(angle < 0) angle += 3600;
lv_img_t * img = (lv_img_t *)obj;
if(angle == img->angle) return;
- lv_coord_t transf_zoom = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- transf_zoom = ((int32_t)transf_zoom * img->zoom) >> 8;
-
- lv_coord_t transf_angle = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
-
lv_obj_update_layout(obj); /*Be sure the object's size is calculated*/
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
lv_area_t a;
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle + img->angle, transf_zoom, &img->pivot);
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot);
a.x1 += obj->coords.x1;
a.y1 += obj->coords.y1;
a.x2 += obj->coords.x1;
@@ -207,9 +200,15 @@ void lv_img_set_angle(lv_obj_t * obj, int16_t angle)
lv_obj_invalidate_area(obj, &a);
img->angle = angle;
- lv_obj_refresh_ext_draw_size(obj);
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle + img->angle, transf_zoom, &img->pivot);
+ /* Disable invalidations because lv_obj_refresh_ext_draw_size would invalidate
+ * the whole ext draw area */
+ lv_disp_t * disp = lv_obj_get_disp(obj);
+ lv_disp_enable_invalidation(disp, false);
+ lv_obj_refresh_ext_draw_size(obj);
+ lv_disp_enable_invalidation(disp, true);
+
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot);
a.x1 += obj->coords.x1;
a.y1 += obj->coords.y1;
a.x2 += obj->coords.x1;
@@ -222,17 +221,11 @@ void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
lv_img_t * img = (lv_img_t *)obj;
if(img->pivot.x == x && img->pivot.y == y) return;
- lv_coord_t transf_zoom = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- transf_zoom = ((int32_t)transf_zoom * img->zoom) >> 8;
-
- lv_coord_t transf_angle = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- transf_angle += img->angle;
-
lv_obj_update_layout(obj); /*Be sure the object's size is calculated*/
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
lv_area_t a;
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, transf_zoom, &img->pivot);
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot);
a.x1 += obj->coords.x1;
a.y1 += obj->coords.y1;
a.x2 += obj->coords.x1;
@@ -241,9 +234,15 @@ void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
img->pivot.x = x;
img->pivot.y = y;
- lv_obj_refresh_ext_draw_size(obj);
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, transf_zoom, &img->pivot);
+ /* Disable invalidations because lv_obj_refresh_ext_draw_size would invalidate
+ * the whole ext draw area */
+ lv_disp_t * disp = lv_obj_get_disp(obj);
+ lv_disp_enable_invalidation(disp, false);
+ lv_obj_refresh_ext_draw_size(obj);
+ lv_disp_enable_invalidation(disp, true);
+
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot);
a.x1 += obj->coords.x1;
a.y1 += obj->coords.y1;
a.x2 += obj->coords.x1;
@@ -258,16 +257,11 @@ void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom)
if(zoom == 0) zoom = 1;
- lv_coord_t transf_zoom = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
-
- lv_coord_t transf_angle = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- transf_angle += img->angle;
-
lv_obj_update_layout(obj); /*Be sure the object's size is calculated*/
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
lv_area_t a;
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, ((int32_t)transf_zoom * img->zoom) >> 8, &img->pivot);
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom >> 8, &img->pivot);
a.x1 += obj->coords.x1 - 1;
a.y1 += obj->coords.y1 - 1;
a.x2 += obj->coords.x1 + 1;
@@ -275,9 +269,15 @@ void lv_img_set_zoom(lv_obj_t * obj, uint16_t zoom)
lv_obj_invalidate_area(obj, &a);
img->zoom = zoom;
- lv_obj_refresh_ext_draw_size(obj);
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, ((int32_t)transf_zoom * img->zoom) >> 8, &img->pivot);
+ /* Disable invalidations because lv_obj_refresh_ext_draw_size would invalidate
+ * the whole ext draw area */
+ lv_disp_t * disp = lv_obj_get_disp(obj);
+ lv_disp_enable_invalidation(disp, false);
+ lv_obj_refresh_ext_draw_size(obj);
+ lv_disp_enable_invalidation(disp, true);
+
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot);
a.x1 += obj->coords.x1 - 1;
a.y1 += obj->coords.y1 - 1;
a.x2 += obj->coords.x1 + 1;
@@ -424,14 +424,9 @@ static lv_point_t lv_img_get_transformed_size(lv_obj_t * obj)
{
lv_img_t * img = (lv_img_t *)obj;
- int32_t zoom_final = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- zoom_final = (zoom_final * img->zoom) >> 8;
- int32_t angle_final = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- angle_final += img->angle;
-
lv_area_t area_transform;
_lv_img_buf_get_transformed_area(&area_transform, img->w, img->h,
- angle_final, zoom_final, &img->pivot);
+ img->angle, img->zoom, &img->pivot);
return (lv_point_t) {
lv_area_get_width(&area_transform), lv_area_get_height(&area_transform)
@@ -467,42 +462,31 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e)
else if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
lv_coord_t * s = lv_event_get_param(e);
- lv_coord_t transf_zoom = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- transf_zoom = ((int32_t)transf_zoom * img->zoom) >> 8;
-
- lv_coord_t transf_angle = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- transf_angle += img->angle;
/*If the image has angle provide enough room for the rotated corners*/
- if(transf_angle || transf_zoom != LV_IMG_ZOOM_NONE) {
+ if(img->angle || img->zoom != LV_IMG_ZOOM_NONE) {
lv_area_t a;
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
- _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, transf_zoom, &img->pivot);
- lv_coord_t pad_ori = *s;
- *s = LV_MAX(*s, pad_ori - a.x1);
- *s = LV_MAX(*s, pad_ori - a.y1);
- *s = LV_MAX(*s, pad_ori + a.x2 - w);
- *s = LV_MAX(*s, pad_ori + a.y2 - h);
+ _lv_img_buf_get_transformed_area(&a, w, h, img->angle, img->zoom, &img->pivot);
+ *s = LV_MAX(*s, -a.x1);
+ *s = LV_MAX(*s, -a.y1);
+ *s = LV_MAX(*s, a.x2 - w);
+ *s = LV_MAX(*s, a.y2 - h);
}
}
else if(code == LV_EVENT_HIT_TEST) {
lv_hit_test_info_t * info = lv_event_get_param(e);
- lv_coord_t zoom = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- zoom = (zoom * img->zoom) >> 8;
-
- lv_coord_t angle = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- angle += img->angle;
/*If the object is exactly image sized (not cropped, not mosaic) and transformed
*perform hit test on its transformed area*/
if(img->w == lv_obj_get_width(obj) && img->h == lv_obj_get_height(obj) &&
- (zoom != LV_IMG_ZOOM_NONE || angle != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) {
+ (img->zoom != LV_IMG_ZOOM_NONE || img->angle != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) {
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
lv_area_t coords;
- _lv_img_buf_get_transformed_area(&coords, w, h, angle, zoom, &img->pivot);
+ _lv_img_buf_get_transformed_area(&coords, w, h, img->angle, img->zoom, &img->pivot);
coords.x1 += obj->coords.x1;
coords.y1 += obj->coords.y1;
coords.x2 += obj->coords.x1;
@@ -556,19 +540,13 @@ static void draw_img(lv_event_t * e)
return;
}
- int32_t angle_final = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- angle_final += img->angle;
-
- if(angle_final != 0) {
+ if(img->angle != 0) {
info->res = LV_COVER_RES_NOT_COVER;
return;
}
- int32_t zoom_final = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- zoom_final = (zoom_final * img->zoom) >> 8;
-
const lv_area_t * clip_area = lv_event_get_param(e);
- if(zoom_final == LV_IMG_ZOOM_NONE) {
+ if(img->zoom == LV_IMG_ZOOM_NONE) {
if(_lv_area_is_in(clip_area, &obj->coords, 0) == false) {
info->res = LV_COVER_RES_NOT_COVER;
return;
@@ -576,7 +554,7 @@ static void draw_img(lv_event_t * e)
}
else {
lv_area_t a;
- _lv_img_buf_get_transformed_area(&a, lv_obj_get_width(obj), lv_obj_get_height(obj), 0, zoom_final, &img->pivot);
+ _lv_img_buf_get_transformed_area(&a, lv_obj_get_width(obj), lv_obj_get_height(obj), 0, img->zoom, &img->pivot);
a.x1 += obj->coords.x1;
a.y1 += obj->coords.y1;
a.x2 += obj->coords.x1;
@@ -590,12 +568,6 @@ static void draw_img(lv_event_t * e)
}
else if(code == LV_EVENT_DRAW_MAIN || code == LV_EVENT_DRAW_POST) {
- int32_t zoom_final = lv_obj_get_style_transform_zoom(obj, LV_PART_MAIN);
- zoom_final = (zoom_final * img->zoom) >> 8;
-
- int32_t angle_final = lv_obj_get_style_transform_angle(obj, LV_PART_MAIN);
- angle_final += img->angle;
-
lv_coord_t obj_w = lv_obj_get_width(obj);
lv_coord_t obj_h = lv_obj_get_height(obj);
@@ -616,7 +588,7 @@ static void draw_img(lv_event_t * e)
}
else {
_lv_img_buf_get_transformed_area(&bg_coords, obj_w, obj_h,
- angle_final, zoom_final, &bg_pivot);
+ img->angle, img->zoom, &bg_pivot);
/*Modify the coordinates to draw the background for the rotated and scaled coordinates*/
bg_coords.x1 += obj->coords.x1;
@@ -636,7 +608,7 @@ static void draw_img(lv_event_t * e)
if(code == LV_EVENT_DRAW_MAIN) {
if(img->h == 0 || img->w == 0) return;
- if(zoom_final == 0) return;
+ if(img->zoom == 0) return;
lv_draw_ctx_t * draw_ctx = lv_event_get_draw_ctx(e);
@@ -666,8 +638,8 @@ static void draw_img(lv_event_t * e)
lv_draw_img_dsc_init(&img_dsc);
lv_obj_init_draw_img_dsc(obj, LV_PART_MAIN, &img_dsc);
- img_dsc.zoom = zoom_final;
- img_dsc.angle = angle_final;
+ img_dsc.zoom = img->zoom;
+ img_dsc.angle = img->angle;
img_dsc.pivot.x = img->pivot.x;
img_dsc.pivot.y = img->pivot.y;
img_dsc.antialias = img->antialias;
@@ -683,12 +655,14 @@ static void draw_img(lv_event_t * e)
draw_ctx->clip_area = &img_clip_area;
lv_area_t coords_tmp;
- coords_tmp.y1 = img_max_area.y1 + img->offset.y;
+ lv_coord_t offset_x = img->offset.x % img->w;
+ lv_coord_t offset_y = img->offset.y % img->h;
+ coords_tmp.y1 = img_max_area.y1 + offset_y;
if(coords_tmp.y1 > img_max_area.y1) coords_tmp.y1 -= img->h;
coords_tmp.y2 = coords_tmp.y1 + img->h - 1;
for(; coords_tmp.y1 < img_max_area.y2; coords_tmp.y1 += img_size_final.y, coords_tmp.y2 += img_size_final.y) {
- coords_tmp.x1 = img_max_area.x1 + img->offset.x;
+ coords_tmp.x1 = img_max_area.x1 + offset_x;
if(coords_tmp.x1 > img_max_area.x1) coords_tmp.x1 -= img->w;
coords_tmp.x2 = coords_tmp.x1 + img->w - 1;
diff --git a/lib/lvgl/src/widgets/lv_img.h b/lib/lvgl/src/widgets/lv_img.h
index 9068c50..59ef535 100644
--- a/lib/lvgl/src/widgets/lv_img.h
+++ b/lib/lvgl/src/widgets/lv_img.h
@@ -110,10 +110,10 @@ void lv_img_set_offset_x(lv_obj_t * obj, lv_coord_t x);
*/
void lv_img_set_offset_y(lv_obj_t * obj, lv_coord_t y);
-
/**
* Set the rotation angle of the image.
* The image will be rotated around the set pivot set by `lv_img_set_pivot()`
+ * Note that indexed and alpha only images can't be transformed.
* @param obj pointer to an image object
* @param angle rotation angle in degree with 0.1 degree resolution (0..3600: clock wise)
*/
@@ -121,16 +121,16 @@ void lv_img_set_angle(lv_obj_t * obj, int16_t angle);
/**
* Set the rotation center of the image.
- * The image will be rotated around this point
+ * The image will be rotated around this point.
* @param obj pointer to an image object
* @param x rotation center x of the image
* @param y rotation center y of the image
*/
void lv_img_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
-
/**
* Set the zoom factor of the image.
+ * Note that indexed and alpha only images can't be transformed.
* @param img pointer to an image object
* @param zoom the zoom factor.
* @example 256 or LV_ZOOM_IMG_NONE for no zoom
diff --git a/lib/lvgl/src/widgets/lv_label.c b/lib/lvgl/src/widgets/lv_label.c
index 6294e52..840a131 100644
--- a/lib/lvgl/src/widgets/lv_label.c
+++ b/lib/lvgl/src/widgets/lv_label.c
@@ -1,4 +1,4 @@
-/**
+/**
* @file lv_label.c
*
*/
@@ -717,7 +717,6 @@ static void lv_label_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
lv_label_set_long_mode(obj, LV_LABEL_LONG_WRAP);
lv_label_set_text(obj, "Text");
-
LV_TRACE_OBJ_CREATE("finished");
}
@@ -787,7 +786,6 @@ static void lv_label_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
}
-
static void draw_main(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -1168,7 +1166,6 @@ static void lv_label_refr_text(lv_obj_t * obj)
lv_obj_invalidate(obj);
}
-
static void lv_label_revert_dots(lv_obj_t * obj)
{
@@ -1255,7 +1252,6 @@ static void lv_label_dot_tmp_free(lv_obj_t * obj)
label->dot.tmp_ptr = NULL;
}
-
static void set_ofs_x_anim(void * obj, int32_t v)
{
lv_label_t * label = (lv_label_t *)obj;
@@ -1270,5 +1266,4 @@ static void set_ofs_y_anim(void * obj, int32_t v)
lv_obj_invalidate(obj);
}
-
#endif
diff --git a/lib/lvgl/src/widgets/lv_roller.c b/lib/lvgl/src/widgets/lv_roller.c
index fd9b394..d571e51 100644
--- a/lib/lvgl/src/widgets/lv_roller.c
+++ b/lib/lvgl/src/widgets/lv_roller.c
@@ -254,7 +254,6 @@ void lv_roller_get_selected_str(const lv_obj_t * obj, char * buf, uint32_t buf_s
buf[c] = '\0';
}
-
/**
* Get the options of a roller
* @param roller pointer to roller object
@@ -267,7 +266,6 @@ const char * lv_roller_get_options(const lv_obj_t * obj)
return lv_label_get_text(get_label(obj));
}
-
/**
* Get the total number of options
* @param roller pointer to a roller object
@@ -290,7 +288,6 @@ uint16_t lv_roller_get_option_cnt(const lv_obj_t * obj)
* STATIC FUNCTIONS
**********************/
-
static void lv_roller_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
{
LV_UNUSED(class_p);
@@ -446,7 +443,6 @@ static void lv_roller_label_event(const lv_obj_class_t * class_p, lv_event_t * e
}
}
-
static void draw_main(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -477,6 +473,7 @@ static void draw_main(lv_event_t * e)
area_ok = _lv_area_intersect(&mask_sel, draw_ctx->clip_area, &sel_area);
if(area_ok) {
lv_obj_t * label = get_label(obj);
+ if(lv_label_get_recolor(label)) label_dsc.flag |= LV_TEXT_FLAG_RECOLOR;
/*Get the size of the "selected text"*/
lv_point_t res_p;
@@ -529,6 +526,8 @@ static void draw_label(lv_event_t * e)
lv_draw_label_dsc_t label_draw_dsc;
lv_draw_label_dsc_init(&label_draw_dsc);
lv_obj_init_draw_label_dsc(roller, LV_PART_MAIN, &label_draw_dsc);
+ if(lv_label_get_recolor(label_obj)) label_draw_dsc.flag |= LV_TEXT_FLAG_RECOLOR;
+
lv_draw_ctx_t * draw_ctx = lv_event_get_draw_ctx(e);
/*If the roller has shadow or outline it has some ext. draw size
@@ -744,7 +743,6 @@ static void inf_normalize(lv_obj_t * obj)
lv_obj_t * label = get_label(obj);
-
lv_coord_t sel_y1 = roller->sel_opt_id * (font_h + line_space);
lv_coord_t mid_y1 = h / 2 - font_h / 2;
lv_coord_t new_y = mid_y1 - sel_y1;
@@ -757,7 +755,6 @@ static lv_obj_t * get_label(const lv_obj_t * obj)
return lv_obj_get_child(obj, 0);
}
-
static lv_coord_t get_selected_label_width(const lv_obj_t * obj)
{
lv_obj_t * label = get_label(obj);
@@ -777,7 +774,6 @@ static void scroll_anim_ready_cb(lv_anim_t * a)
inf_normalize(obj);
}
-
static void set_y_anim(void * obj, int32_t v)
{
lv_obj_set_y(obj, v);
diff --git a/lib/lvgl/src/widgets/lv_roller.h b/lib/lvgl/src/widgets/lv_roller.h
index 14411de..b6dc7b8 100644
--- a/lib/lvgl/src/widgets/lv_roller.h
+++ b/lib/lvgl/src/widgets/lv_roller.h
@@ -52,7 +52,6 @@ typedef struct {
extern const lv_obj_class_t lv_roller_class;
-
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -110,7 +109,6 @@ uint16_t lv_roller_get_selected(const lv_obj_t * obj);
*/
void lv_roller_get_selected_str(const lv_obj_t * obj, char * buf, uint32_t buf_size);
-
/**
* Get the options of a roller
* @param obj pointer to roller object
diff --git a/lib/lvgl/src/widgets/lv_slider.c b/lib/lvgl/src/widgets/lv_slider.c
index faee0fa..98711da 100644
--- a/lib/lvgl/src/widgets/lv_slider.c
+++ b/lib/lvgl/src/widgets/lv_slider.c
@@ -212,7 +212,7 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
/*Make the point relative to the indicator*/
new_value = p.x - (obj->coords.x1 + bg_left);
}
- new_value = (new_value * range) / indic_w;
+ new_value = (new_value * range + indic_w / 2) / indic_w;
new_value += slider->bar.min_value;
}
else {
@@ -223,7 +223,7 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
/*Make the point relative to the indicator*/
new_value = p.y - (obj->coords.y2 + bg_bottom);
- new_value = (-new_value * range) / indic_h;
+ new_value = (-new_value * range + indic_h / 2) / indic_h;
new_value += slider->bar.min_value;
}
@@ -238,10 +238,13 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
new_value = LV_CLAMP(real_min_value, new_value, real_max_value);
-
if(*slider->value_to_set != new_value) {
- *slider->value_to_set = new_value;
- lv_obj_invalidate(obj);
+ if(slider->value_to_set == &slider->bar.start_value) {
+ lv_bar_set_start_value(obj, new_value, LV_ANIM_ON);
+ }
+ else {
+ lv_bar_set_value(obj, new_value, LV_ANIM_ON);
+ }
res = lv_event_send(obj, LV_EVENT_VALUE_CHANGED, NULL);
if(res != LV_RES_OK) return;
}
@@ -337,15 +340,16 @@ static void draw_knob(lv_event_t * e)
lv_area_t knob_area;
lv_coord_t knob_size;
+ bool is_symmetrical = false;
+ if(slider->bar.mode == LV_BAR_MODE_SYMMETRICAL && slider->bar.min_value < 0 &&
+ slider->bar.max_value > 0) is_symmetrical = true;
+
if(is_horizontal) {
knob_size = lv_obj_get_height(obj);
- knob_area.x1 = LV_SLIDER_KNOB_COORD(is_rtl, slider->bar.indic_area);
+ if(is_symmetrical && slider->bar.cur_value < 0) knob_area.x1 = slider->bar.indic_area.x1;
+ else knob_area.x1 = LV_SLIDER_KNOB_COORD(is_rtl, slider->bar.indic_area);
}
else {
- bool is_symmetrical = false;
- if(slider->bar.mode == LV_BAR_MODE_SYMMETRICAL && slider->bar.min_value < 0 &&
- slider->bar.max_value > 0) is_symmetrical = true;
-
knob_size = lv_obj_get_width(obj);
if(is_symmetrical && slider->bar.cur_value < 0) knob_area.y1 = slider->bar.indic_area.y2;
else knob_area.y1 = slider->bar.indic_area.y1;
diff --git a/lib/lvgl/src/widgets/lv_switch.c b/lib/lvgl/src/widgets/lv_switch.c
index b328610..f9235ba 100644
--- a/lib/lvgl/src/widgets/lv_switch.c
+++ b/lib/lvgl/src/widgets/lv_switch.c
@@ -273,5 +273,4 @@ static void lv_switch_trigger_anim(lv_obj_t * obj)
}
}
-
#endif
diff --git a/lib/lvgl/src/widgets/lv_table.c b/lib/lvgl/src/widgets/lv_table.c
index 5ff65ab..8320bf5 100644
--- a/lib/lvgl/src/widgets/lv_table.c
+++ b/lib/lvgl/src/widgets/lv_table.c
@@ -40,8 +40,9 @@ static void refr_size_form_row(lv_obj_t * obj, uint32_t start_row);
static void refr_cell_size(lv_obj_t * obj, uint32_t row, uint32_t col);
static lv_res_t get_pressed_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col);
static size_t get_cell_txt_len(const char * txt);
-static void copy_cell_txt(char * dst, const char * txt);
+static void copy_cell_txt(lv_table_cell_t * dst, const char * txt);
static void get_cell_area(lv_obj_t * obj, uint16_t row, uint16_t col, lv_area_t * area);
+static void scroll_to_selected_cell(lv_obj_t * obj);
static inline bool is_cell_empty(void * cell)
{
@@ -97,7 +98,14 @@ void lv_table_set_cell_value(lv_obj_t * obj, uint16_t row, uint16_t col, const c
lv_table_cell_ctrl_t ctrl = 0;
/*Save the control byte*/
- if(table->cell_data[cell]) ctrl = table->cell_data[cell][0];
+ if(table->cell_data[cell]) ctrl = table->cell_data[cell]->ctrl;
+
+#if LV_USE_USER_DATA
+ void * user_data = NULL;
+
+ /*Save the user data*/
+ if(table->cell_data[cell]) user_data = table->cell_data[cell]->user_data;
+#endif
size_t to_allocate = get_cell_txt_len(txt);
@@ -107,7 +115,10 @@ void lv_table_set_cell_value(lv_obj_t * obj, uint16_t row, uint16_t col, const c
copy_cell_txt(table->cell_data[cell], txt);
- table->cell_data[cell][0] = ctrl;
+ table->cell_data[cell]->ctrl = ctrl;
+#if LV_USE_USER_DATA
+ table->cell_data[cell]->user_data = user_data;
+#endif
refr_cell_size(obj, row, col);
}
@@ -130,7 +141,14 @@ void lv_table_set_cell_value_fmt(lv_obj_t * obj, uint16_t row, uint16_t col, con
lv_table_cell_ctrl_t ctrl = 0;
/*Save the control byte*/
- if(table->cell_data[cell]) ctrl = table->cell_data[cell][0];
+ if(table->cell_data[cell]) ctrl = table->cell_data[cell]->ctrl;
+
+#if LV_USE_USER_DATA
+ void * user_data = NULL;
+
+ /*Save the user_data*/
+ if(table->cell_data[cell]) user_data = table->cell_data[cell]->user_data;
+#endif
va_list ap, ap2;
va_start(ap, fmt);
@@ -153,32 +171,35 @@ void lv_table_set_cell_value_fmt(lv_obj_t * obj, uint16_t row, uint16_t col, con
/*Get the size of the Arabic text and process it*/
size_t len_ap = _lv_txt_ap_calc_bytes_cnt(raw_txt);
- table->cell_data[cell] = lv_mem_realloc(table->cell_data[cell], len_ap + 1);
+ table->cell_data[cell] = lv_mem_realloc(table->cell_data[cell], sizeof(lv_table_cell_t) + len_ap + 1);
LV_ASSERT_MALLOC(table->cell_data[cell]);
if(table->cell_data[cell] == NULL) {
va_end(ap2);
return;
}
- _lv_txt_ap_proc(raw_txt, &table->cell_data[cell][1]);
+ _lv_txt_ap_proc(raw_txt, table->cell_data[cell]->txt);
lv_mem_buf_release(raw_txt);
#else
- table->cell_data[cell] = lv_mem_realloc(table->cell_data[cell], len + 2); /*+1: trailing '\0; +1: format byte*/
+ table->cell_data[cell] = lv_mem_realloc(table->cell_data[cell],
+ sizeof(lv_table_cell_t) + len + 1); /*+1: trailing '\0; */
LV_ASSERT_MALLOC(table->cell_data[cell]);
if(table->cell_data[cell] == NULL) {
va_end(ap2);
return;
}
- table->cell_data[cell][len + 1] = 0; /*Ensure NULL termination*/
+ table->cell_data[cell]->txt[len] = 0; /*Ensure NULL termination*/
- lv_vsnprintf(&table->cell_data[cell][1], len + 1, fmt, ap2);
+ lv_vsnprintf(table->cell_data[cell]->txt, len + 1, fmt, ap2);
#endif
va_end(ap2);
- table->cell_data[cell][0] = ctrl;
-
+ table->cell_data[cell]->ctrl = ctrl;
+#if LV_USE_USER_DATA
+ table->cell_data[cell]->user_data = user_data;
+#endif
refr_cell_size(obj, row, col);
}
@@ -203,11 +224,17 @@ void lv_table_set_row_cnt(lv_obj_t * obj, uint16_t row_cnt)
uint32_t new_cell_cnt = table->col_cnt * table->row_cnt;
uint32_t i;
for(i = new_cell_cnt; i < old_cell_cnt; i++) {
+#if LV_USE_USER_DATA
+ if(table->cell_data[i]->user_data) {
+ lv_mem_free(table->cell_data[i]->user_data);
+ table->cell_data[i]->user_data = NULL;
+ }
+#endif
lv_mem_free(table->cell_data[i]);
}
}
- table->cell_data = lv_mem_realloc(table->cell_data, table->row_cnt * table->col_cnt * sizeof(char *));
+ table->cell_data = lv_mem_realloc(table->cell_data, table->row_cnt * table->col_cnt * sizeof(lv_table_cell_t *));
LV_ASSERT_MALLOC(table->cell_data);
if(table->cell_data == NULL) return;
@@ -232,7 +259,7 @@ void lv_table_set_col_cnt(lv_obj_t * obj, uint16_t col_cnt)
uint16_t old_col_cnt = table->col_cnt;
table->col_cnt = col_cnt;
- char ** new_cell_data = lv_mem_alloc(table->row_cnt * table->col_cnt * sizeof(char *));
+ lv_table_cell_t ** new_cell_data = lv_mem_alloc(table->row_cnt * table->col_cnt * sizeof(lv_table_cell_t *));
LV_ASSERT_MALLOC(new_cell_data);
if(new_cell_data == NULL) return;
uint32_t new_cell_cnt = table->col_cnt * table->row_cnt;
@@ -255,6 +282,12 @@ void lv_table_set_col_cnt(lv_obj_t * obj, uint16_t col_cnt)
int32_t i;
for(i = 0; i < (int32_t)old_col_cnt - col_cnt; i++) {
uint32_t idx = old_col_start + min_col_cnt + i;
+#if LV_USE_USER_DATA
+ if(table->cell_data[idx]->user_data) {
+ lv_mem_free(table->cell_data[idx]->user_data);
+ table->cell_data[idx]->user_data = NULL;
+ }
+#endif
lv_mem_free(table->cell_data[idx]);
table->cell_data[idx] = NULL;
}
@@ -273,7 +306,6 @@ void lv_table_set_col_cnt(lv_obj_t * obj, uint16_t col_cnt)
table->col_w[col] = LV_DPI_DEF;
}
-
refr_size_form_row(obj, 0) ;
}
@@ -303,15 +335,18 @@ void lv_table_add_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table
uint32_t cell = row * table->col_cnt + col;
if(is_cell_empty(table->cell_data[cell])) {
- table->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/
+ table->cell_data[cell] = lv_mem_alloc(sizeof(lv_table_cell_t) + 1); /*+1: trailing '\0 */
LV_ASSERT_MALLOC(table->cell_data[cell]);
if(table->cell_data[cell] == NULL) return;
- table->cell_data[cell][0] = 0;
- table->cell_data[cell][1] = '\0';
+ table->cell_data[cell]->ctrl = 0;
+#if LV_USE_USER_DATA
+ table->cell_data[cell]->user_data = NULL;
+#endif
+ table->cell_data[cell]->txt[0] = '\0';
}
- table->cell_data[cell][0] |= ctrl;
+ table->cell_data[cell]->ctrl |= ctrl;
}
void lv_table_clear_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl)
@@ -327,17 +362,51 @@ void lv_table_clear_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_tab
uint32_t cell = row * table->col_cnt + col;
if(is_cell_empty(table->cell_data[cell])) {
- table->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/
+ table->cell_data[cell] = lv_mem_alloc(sizeof(lv_table_cell_t) + 1); /*+1: trailing '\0 */
LV_ASSERT_MALLOC(table->cell_data[cell]);
if(table->cell_data[cell] == NULL) return;
- table->cell_data[cell][0] = 0;
- table->cell_data[cell][1] = '\0';
+ table->cell_data[cell]->ctrl = 0;
+#if LV_USE_USER_DATA
+ table->cell_data[cell]->user_data = NULL;
+#endif
+ table->cell_data[cell]->txt[0] = '\0';
}
- table->cell_data[cell][0] &= (~ctrl);
+ table->cell_data[cell]->ctrl &= (~ctrl);
}
+#if LV_USE_USER_DATA
+void lv_table_set_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ lv_table_t * table = (lv_table_t *)obj;
+
+ /*Auto expand*/
+ if(col >= table->col_cnt) lv_table_set_col_cnt(obj, col + 1);
+ if(row >= table->row_cnt) lv_table_set_row_cnt(obj, row + 1);
+
+ uint32_t cell = row * table->col_cnt + col;
+
+ if(is_cell_empty(table->cell_data[cell])) {
+ table->cell_data[cell] = lv_mem_alloc(sizeof(lv_table_cell_t) + 1); /*+1: trailing '\0 */
+ LV_ASSERT_MALLOC(table->cell_data[cell]);
+ if(table->cell_data[cell] == NULL) return;
+
+ table->cell_data[cell]->ctrl = 0;
+ table->cell_data[cell]->user_data = NULL;
+ table->cell_data[cell]->txt[0] = '\0';
+ }
+
+ if(table->cell_data[cell]->user_data) {
+ lv_mem_free(table->cell_data[cell]->user_data);
+ }
+
+ table->cell_data[cell]->user_data = user_data;
+}
+#endif
+
/*=====================
* Getter functions
*====================*/
@@ -355,7 +424,7 @@ const char * lv_table_get_cell_value(lv_obj_t * obj, uint16_t row, uint16_t col)
if(is_cell_empty(table->cell_data[cell])) return "";
- return &table->cell_data[cell][1]; /*Skip the format byte*/
+ return table->cell_data[cell]->txt;
}
uint16_t lv_table_get_row_cnt(lv_obj_t * obj)
@@ -400,7 +469,7 @@ bool lv_table_has_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table
uint32_t cell = row * table->col_cnt + col;
if(is_cell_empty(table->cell_data[cell])) return false;
- else return (table->cell_data[cell][0] & ctrl) == ctrl;
+ else return (table->cell_data[cell]->ctrl & ctrl) == ctrl;
}
void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col)
@@ -410,6 +479,24 @@ void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col)
*col = table->col_act;
}
+#if LV_USE_USER_DATA
+void * lv_table_get_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ lv_table_t * table = (lv_table_t *)obj;
+ if(row >= table->row_cnt || col >= table->col_cnt) {
+ LV_LOG_WARN("invalid row or column");
+ return NULL;
+ }
+ uint32_t cell = row * table->col_cnt + col;
+
+ if(is_cell_empty(table->cell_data[cell])) return NULL;
+
+ return table->cell_data[cell]->user_data;
+}
+#endif
+
/**********************
* STATIC FUNCTIONS
**********************/
@@ -427,7 +514,7 @@ static void lv_table_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
table->row_h = lv_mem_alloc(table->row_cnt * sizeof(table->row_h[0]));
table->col_w[0] = LV_DPI_DEF;
table->row_h[0] = LV_DPI_DEF;
- table->cell_data = lv_mem_realloc(table->cell_data, table->row_cnt * table->col_cnt * sizeof(char *));
+ table->cell_data = lv_mem_realloc(table->cell_data, table->row_cnt * table->col_cnt * sizeof(lv_table_cell_t *));
table->cell_data[0] = NULL;
LV_TRACE_OBJ_CREATE("finished");
@@ -441,6 +528,12 @@ static void lv_table_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
uint16_t i;
for(i = 0; i < table->col_cnt * table->row_cnt; i++) {
if(table->cell_data[i]) {
+#if LV_USE_USER_DATA
+ if(table->cell_data[i]->user_data) {
+ lv_mem_free(table->cell_data[i]->user_data);
+ table->cell_data[i]->user_data = NULL;
+ }
+#endif
lv_mem_free(table->cell_data[i]);
table->cell_data[i] = NULL;
}
@@ -516,6 +609,7 @@ static void lv_table_event(const lv_obj_class_t * class_p, lv_event_t * e)
if(col == LV_TABLE_CELL_NONE || row == LV_TABLE_CELL_NONE) {
table->col_act = 0;
table->row_act = 0;
+ scroll_to_selected_cell(obj);
lv_obj_invalidate(obj);
return;
}
@@ -560,6 +654,8 @@ static void lv_table_event(const lv_obj_class_t * class_p, lv_event_t * e)
table->row_act = row;
lv_obj_invalidate(obj);
+ scroll_to_selected_cell(obj);
+
res = lv_event_send(obj, LV_EVENT_VALUE_CHANGED, NULL);
if(res != LV_RES_OK) return;
}
@@ -569,7 +665,6 @@ static void lv_table_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
}
-
static void draw_main(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -635,7 +730,7 @@ static void draw_main(lv_event_t * e)
for(col = 0; col < table->col_cnt; col++) {
lv_table_cell_ctrl_t ctrl = 0;
- if(table->cell_data[cell]) ctrl = table->cell_data[cell][0];
+ if(table->cell_data[cell]) ctrl = table->cell_data[cell]->ctrl;
if(rtl) {
cell_area.x2 = cell_area.x1 - 1;
@@ -648,11 +743,11 @@ static void draw_main(lv_event_t * e)
uint16_t col_merge = 0;
for(col_merge = 0; col_merge + col < table->col_cnt - 1; col_merge++) {
- char * next_cell_data = table->cell_data[cell + col_merge];
+ lv_table_cell_t * next_cell_data = table->cell_data[cell + col_merge];
if(is_cell_empty(next_cell_data)) break;
- lv_table_cell_ctrl_t merge_ctrl = (lv_table_cell_ctrl_t) next_cell_data[0];
+ lv_table_cell_ctrl_t merge_ctrl = (lv_table_cell_ctrl_t) next_cell_data->ctrl;
if(merge_ctrl & LV_TABLE_CELL_CTRL_MERGE_RIGHT) {
lv_coord_t offset = table->col_w[col + col_merge + 1];
@@ -735,7 +830,7 @@ static void draw_main(lv_event_t * e)
bool crop = ctrl & LV_TABLE_CELL_CTRL_TEXT_CROP ? true : false;
if(crop) txt_flags = LV_TEXT_FLAG_EXPAND;
- lv_txt_get_size(&txt_size, table->cell_data[cell] + 1, label_dsc_def.font,
+ lv_txt_get_size(&txt_size, table->cell_data[cell]->txt, label_dsc_def.font,
label_dsc_act.letter_space, label_dsc_act.line_space,
lv_area_get_width(&txt_area), txt_flags);
@@ -750,7 +845,7 @@ static void draw_main(lv_event_t * e)
label_mask_ok = _lv_area_intersect(&label_clip_area, &clip_area, &cell_area);
if(label_mask_ok) {
draw_ctx->clip_area = &label_clip_area;
- lv_draw_label(draw_ctx, &label_dsc_act, &txt_area, table->cell_data[cell] + 1, NULL);
+ lv_draw_label(draw_ctx, &label_dsc_act, &txt_area, table->cell_data[cell]->txt, NULL);
draw_ctx->clip_area = &clip_area;
}
}
@@ -792,7 +887,6 @@ static void refr_size_form_row(lv_obj_t * obj, uint32_t start_row)
lv_obj_invalidate(obj);
}
-
static void refr_cell_size(lv_obj_t * obj, uint32_t row, uint32_t col)
{
const lv_coord_t cell_pad_left = lv_obj_get_style_pad_left(obj, LV_PART_ITEMS);
@@ -841,7 +935,7 @@ static lv_coord_t get_row_height(lv_obj_t * obj, uint16_t row_id, const lv_font_
uint16_t cell;
uint16_t col;
for(cell = row_start, col = 0; cell < row_start + table->col_cnt; cell++, col++) {
- char * cell_data = table->cell_data[cell];
+ lv_table_cell_t * cell_data = table->cell_data[cell];
if(is_cell_empty(cell_data)) {
continue;
@@ -854,11 +948,11 @@ static lv_coord_t get_row_height(lv_obj_t * obj, uint16_t row_id, const lv_font_
* exit the traversal when the current cell control is not LV_TABLE_CELL_CTRL_MERGE_RIGHT */
uint16_t col_merge = 0;
for(col_merge = 0; col_merge + col < table->col_cnt - 1; col_merge++) {
- char * next_cell_data = table->cell_data[cell + col_merge];
+ lv_table_cell_t * next_cell_data = table->cell_data[cell + col_merge];
if(is_cell_empty(next_cell_data)) break;
- lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t) next_cell_data[0];
+ lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t) next_cell_data->ctrl;
if(ctrl & LV_TABLE_CELL_CTRL_MERGE_RIGHT) {
txt_w += table->col_w[col + col_merge + 1];
}
@@ -867,7 +961,7 @@ static lv_coord_t get_row_height(lv_obj_t * obj, uint16_t row_id, const lv_font_
}
}
- lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t) cell_data[0];
+ lv_table_cell_ctrl_t ctrl = (lv_table_cell_ctrl_t) cell_data->ctrl;
/*When cropping the text we can assume the row height is equal to the line height*/
if(ctrl & LV_TABLE_CELL_CTRL_TEXT_CROP) {
@@ -879,7 +973,7 @@ static lv_coord_t get_row_height(lv_obj_t * obj, uint16_t row_id, const lv_font_
lv_point_t txt_size;
txt_w -= cell_left + cell_right;
- lv_txt_get_size(&txt_size, table->cell_data[cell] + 1, font,
+ lv_txt_get_size(&txt_size, table->cell_data[cell]->txt, font,
letter_space, line_space, txt_w, LV_TEXT_FLAG_NONE);
h_max = LV_MAX(txt_size.y + cell_top + cell_bottom, h_max);
@@ -949,23 +1043,21 @@ static size_t get_cell_txt_len(const char * txt)
size_t retval = 0;
#if LV_USE_ARABIC_PERSIAN_CHARS
- retval = _lv_txt_ap_calc_bytes_cnt(txt) + 1;
+ retval = sizeof(lv_table_cell_t) + _lv_txt_ap_calc_bytes_cnt(txt) + 1;
#else
- /* cell_data layout: [ctrl][txt][trailing '\0' terminator]
- * +2 because of the trailing '\0' and the ctrl */
- retval = strlen(txt) + 2;
+ retval = sizeof(lv_table_cell_t) + strlen(txt) + 1;
#endif
return retval;
}
/* Copy txt into dst skipping the format byte */
-static void copy_cell_txt(char * dst, const char * txt)
+static void copy_cell_txt(lv_table_cell_t * dst, const char * txt)
{
#if LV_USE_ARABIC_PERSIAN_CHARS
- _lv_txt_ap_proc(txt, &dst[1]);
+ _lv_txt_ap_proc(txt, dst->txt);
#else
- strcpy(&dst[1], txt);
+ strcpy(dst->txt, txt);
#endif
}
@@ -1004,4 +1096,25 @@ static void get_cell_area(lv_obj_t * obj, uint16_t row, uint16_t col, lv_area_t
}
+static void scroll_to_selected_cell(lv_obj_t * obj)
+{
+ lv_table_t * table = (lv_table_t *)obj;
+
+ lv_area_t a;
+ get_cell_area(obj, table->row_act, table->col_act, &a);
+ if(a.x1 < 0) {
+ lv_obj_scroll_by_bounded(obj, -a.x1, 0, LV_ANIM_ON);
+ }
+ else if(a.x2 > lv_obj_get_width(obj)) {
+ lv_obj_scroll_by_bounded(obj, lv_obj_get_width(obj) - a.x2, 0, LV_ANIM_ON);
+ }
+
+ if(a.y1 < 0) {
+ lv_obj_scroll_by_bounded(obj, 0, -a.y1, LV_ANIM_ON);
+ }
+ else if(a.y2 > lv_obj_get_height(obj)) {
+ lv_obj_scroll_by_bounded(obj, 0, lv_obj_get_height(obj) - a.y2, LV_ANIM_ON);
+ }
+
+}
#endif
diff --git a/lib/lvgl/src/widgets/lv_table.h b/lib/lvgl/src/widgets/lv_table.h
index 9106270..d36d3c6 100644
--- a/lib/lvgl/src/widgets/lv_table.h
+++ b/lib/lvgl/src/widgets/lv_table.h
@@ -46,12 +46,21 @@ enum {
typedef uint8_t lv_table_cell_ctrl_t;
+/*Data of cell*/
+typedef struct {
+ lv_table_cell_ctrl_t ctrl;
+#if LV_USE_USER_DATA
+ void * user_data; /**< Custom user data*/
+#endif
+ char txt[];
+} lv_table_cell_t;
+
/*Data of table*/
typedef struct {
lv_obj_t obj;
uint16_t col_cnt;
uint16_t row_cnt;
- char ** cell_data;
+ lv_table_cell_t ** cell_data;
lv_coord_t * row_h;
lv_coord_t * col_w;
uint16_t col_act;
@@ -134,7 +143,6 @@ void lv_table_set_col_width(lv_obj_t * obj, uint16_t col_id, lv_coord_t w);
*/
void lv_table_add_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl);
-
/**
* Clear control bits of the cell.
* @param obj pointer to a Table object
@@ -144,6 +152,17 @@ void lv_table_add_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table
*/
void lv_table_clear_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl);
+#if LV_USE_USER_DATA
+/**
+ * Add custom user data to the cell.
+ * @param obj pointer to a Table object
+ * @param row id of the row [0 .. row_cnt -1]
+ * @param col id of the column [0 .. col_cnt -1]
+ * @param user_data pointer to the new user_data. It must be allocated by user as it will be freed automatically
+ */
+void lv_table_set_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data);
+#endif
+
/*=====================
* Getter functions
*====================*/
@@ -197,6 +216,16 @@ bool lv_table_has_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table
*/
void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col);
+#if LV_USE_USER_DATA
+/**
+ * Get custom user data to the cell.
+ * @param obj pointer to a Table object
+ * @param row id of the row [0 .. row_cnt -1]
+ * @param col id of the column [0 .. col_cnt -1]
+ */
+void * lv_table_get_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col);
+#endif
+
/**********************
* MACROS
**********************/
diff --git a/lib/lvgl/src/widgets/lv_textarea.c b/lib/lvgl/src/widgets/lv_textarea.c
index 8624b01..7084244 100644
--- a/lib/lvgl/src/widgets/lv_textarea.c
+++ b/lib/lvgl/src/widgets/lv_textarea.c
@@ -435,6 +435,36 @@ void lv_textarea_set_password_mode(lv_obj_t * obj, bool en)
refr_cursor_area(obj);
}
+void lv_textarea_set_password_bullet(lv_obj_t * obj, const char * bullet)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ LV_ASSERT_NULL(bullet);
+
+ lv_textarea_t * ta = (lv_textarea_t *)obj;
+
+ if(!bullet && (ta->pwd_bullet)) {
+ lv_mem_free(ta->pwd_bullet);
+ ta->pwd_bullet = NULL;
+ }
+ else {
+ size_t txt_len = strlen(bullet);
+
+ /*Allocate memory for the pwd_bullet text*/
+ /*NOTE: Using special realloc behavior, malloc-like when data_p is NULL*/
+ ta->pwd_bullet = lv_mem_realloc(ta->pwd_bullet, txt_len + 1);
+ LV_ASSERT_MALLOC(ta->pwd_bullet);
+ if(ta->pwd_bullet == NULL) {
+ LV_LOG_ERROR("lv_textarea_set_password_bullet: couldn't allocate memory for bullet");
+ return;
+ }
+
+ strcpy(ta->pwd_bullet, bullet);
+ ta->pwd_bullet[txt_len] = '\0';
+ }
+
+ lv_obj_invalidate(obj);
+}
+
void lv_textarea_set_one_line(lv_obj_t * obj, bool en)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -590,6 +620,23 @@ bool lv_textarea_get_password_mode(const lv_obj_t * obj)
return ta->pwd_mode == 1U;
}
+const char * lv_textarea_get_password_bullet(lv_obj_t * obj)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+
+ lv_textarea_t * ta = (lv_textarea_t *)obj;
+
+ if(ta->pwd_bullet) return ta->pwd_bullet;
+
+ lv_font_glyph_dsc_t g;
+ const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN);
+
+ /*If the textarea's font has the bullet character use it else fallback to "*"*/
+ if(lv_font_get_glyph_dsc(font, &g, LV_TEXTAREA_PWD_BULLET_UNICODE, 0))
+ return LV_SYMBOL_BULLET;
+ return "*";
+}
+
bool lv_textarea_get_one_line(const lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -764,6 +811,7 @@ static void lv_textarea_constructor(const lv_obj_class_t * class_p, lv_obj_t * o
ta->pwd_mode = 0;
ta->pwd_tmp = NULL;
+ ta->pwd_bullet = NULL;
ta->pwd_show_time = LV_TEXTAREA_DEF_PWD_SHOW_TIME;
ta->accepted_chars = NULL;
ta->max_length = 0;
@@ -800,6 +848,10 @@ static void lv_textarea_destructor(const lv_obj_class_t * class_p, lv_obj_t * ob
lv_mem_free(ta->pwd_tmp);
ta->pwd_tmp = NULL;
}
+ if(ta->pwd_bullet != NULL) {
+ lv_mem_free(ta->pwd_bullet);
+ ta->pwd_bullet = NULL;
+ }
if(ta->placeholder_txt != NULL) {
lv_mem_free(ta->placeholder_txt);
ta->placeholder_txt = NULL;
@@ -870,8 +922,6 @@ static void label_event_cb(lv_event_t * e)
}
}
-
-
/**
* Called to blink the cursor
* @param ta pointer to a text area
@@ -931,13 +981,7 @@ static void pwd_char_hider(lv_obj_t * obj)
uint32_t enc_len = _lv_txt_get_encoded_length(txt);
if(enc_len == 0) return;
- /*If the textarea's font has "bullet" character use it else fallback to "*"*/
- lv_font_glyph_dsc_t g;
- const char * bullet = "*";
-
- const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN);
- if(lv_font_get_glyph_dsc(font, &g, LV_TEXTAREA_PWD_BULLET_UNICODE, 0)) bullet = LV_SYMBOL_BULLET;
-
+ const char * bullet = lv_textarea_get_password_bullet(obj);
const size_t bullet_len = strlen(bullet);
char * txt_tmp = lv_mem_buf_get(enc_len * bullet_len + 1);
@@ -1263,7 +1307,6 @@ static void draw_cursor(lv_event_t * e)
lv_area_t cur_area;
lv_area_copy(&cur_area, &ta->cursor.area);
-
cur_area.x1 += ta->label->coords.x1;
cur_area.y1 += ta->label->coords.y1;
cur_area.x2 += ta->label->coords.x1;
diff --git a/lib/lvgl/src/widgets/lv_textarea.h b/lib/lvgl/src/widgets/lv_textarea.h
index 219e272..4b3289b 100644
--- a/lib/lvgl/src/widgets/lv_textarea.h
+++ b/lib/lvgl/src/widgets/lv_textarea.h
@@ -42,6 +42,7 @@ typedef struct {
lv_obj_t * label; /*Label of the text area*/
char * placeholder_txt; /*Place holder label. only visible if text is an empty string*/
char * pwd_tmp; /*Used to store the original text in password mode*/
+ char * pwd_bullet; /*Replacement characters displayed in password mode*/
const char * accepted_chars; /*Only these characters will be accepted. NULL: accept all*/
uint32_t max_length; /*The max. number of characters. 0: no limit*/
uint16_t pwd_show_time; /*Time to show characters in password mode before change them to '*'*/
@@ -154,6 +155,13 @@ void lv_textarea_set_cursor_click_pos(lv_obj_t * obj, bool en);
*/
void lv_textarea_set_password_mode(lv_obj_t * obj, bool en);
+/**
+ * Set the replacement characters to show in password mode
+ * @param obj pointer to a text area object
+ * @param bullet pointer to the replacement text
+ */
+void lv_textarea_set_password_bullet(lv_obj_t * obj, const char * bullet);
+
/**
* Configure the text area to one line or back to normal
* @param obj pointer to a text area object
@@ -254,6 +262,13 @@ bool lv_textarea_get_cursor_click_pos(lv_obj_t * obj);
*/
bool lv_textarea_get_password_mode(const lv_obj_t * obj);
+/**
+ * Get the replacement characters to show in password mode
+ * @param obj pointer to a text area object
+ * @return pointer to the replacement text
+ */
+const char * lv_textarea_get_password_bullet(lv_obj_t * obj);
+
/**
* Get the one line configuration attribute
* @param obj pointer to a text area object
diff --git a/lib/lvgl/tests/.gitignore b/lib/lvgl/tests/.gitignore
deleted file mode 100644
index d484e9e..0000000
--- a/lib/lvgl/tests/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.out
-*_Runner.c
diff --git a/lib/lvgl/tests/CMakeLists.txt b/lib/lvgl/tests/CMakeLists.txt
deleted file mode 100644
index 2f8250d..0000000
--- a/lib/lvgl/tests/CMakeLists.txt
+++ /dev/null
@@ -1,376 +0,0 @@
-if(ESP_PLATFORM)
-
-###################################
-# Tests do not build for ESP-IDF. #
-###################################
-
-else()
-
-cmake_minimum_required(VERSION 3.13)
-project(lvgl_tests LANGUAGES C)
-
-include(CTest)
-
-set(LVGL_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-
-set(LVGL_TEST_COMMON_EXAMPLE_OPTIONS
- -DLV_BUILD_EXAMPLES=1
- -DLV_USE_DEMO_WIDGETS=1
- -DLV_USE_DEMO_STRESS=1
-)
-
-set(LVGL_TEST_OPTIONS_MINIMAL_MONOCHROME
- -DLV_COLOR_DEPTH=1
- -DLV_MEM_SIZE=65535
- -DLV_DPI_DEF=40
- -DLV_DRAW_COMPLEX=0
- -DLV_USE_METER=0
- -DLV_USE_LOG=1
- -DLV_USE_ASSERT_NULL=0
- -DLV_USE_ASSERT_MALLOC=0
- -DLV_USE_ASSERT_MEM_INTEGRITY=0
- -DLV_USE_ASSERT_OBJ=0
- -DLV_USE_ASSERT_STYLE=0
- -DLV_USE_USER_DATA=0
- -DLV_FONT_UNSCII_8=1
- -DLV_USE_BIDI=0
- -DLV_USE_ARABIC_PERSIAN_CHARS=0
- -DLV_BUILD_EXAMPLES=1
- -DLV_FONT_DEFAULT=&lv_font_montserrat_14
- -DLV_USE_PNG=1
- -DLV_USE_BMP=1
- -DLV_USE_GIF=1
- -DLV_USE_QRCODE=1
-)
-
-set(LVGL_TEST_OPTIONS_NORMAL_8BIT
- -DLV_COLOR_DEPTH=8
- -DLV_MEM_SIZE=65535
- -DLV_DPI_DEF=40
- -DLV_DRAW_COMPLEX=1
- -DLV_USE_LOG=1
- -DLV_USE_ASSERT_NULL=0
- -DLV_USE_ASSERT_MALLOC=0
- -DLV_USE_ASSERT_MEM_INTEGRITY=0
- -DLV_USE_ASSERT_OBJ=0
- -DLV_USE_ASSERT_STYLE=0
- -DLV_USE_USER_DATA=1
- -DLV_FONT_UNSCII_8=1
- -DLV_USE_FONT_SUBPX=1
- -DLV_USE_BIDI=0
- -DLV_USE_ARABIC_PERSIAN_CHARS=0
- ${LVGL_TEST_COMMON_EXAMPLE_OPTIONS}
- -DLV_FONT_DEFAULT=&lv_font_montserrat_14
- -DLV_USE_PNG=1
- -DLV_USE_BMP=1
- -DLV_USE_SJPG=1
- -DLV_USE_GIF=1
- -DLV_USE_QRCODE=1
-)
-
-set(LVGL_TEST_OPTIONS_16BIT
- -DLV_COLOR_DEPTH=16
- -DLV_COLOR_16_SWAP=0
- -DLV_MEM_SIZE=65536
- -DLV_DPI_DEF=40
- -DLV_DRAW_COMPLEX=1
- -DLV_DITHER_GRADIENT=1
- -DLV_USE_LOG=1
- -DLV_USE_ASSERT_NULL=0
- -DLV_USE_ASSERT_MALLOC=0
- -DLV_USE_ASSERT_MEM_INTEGRITY=0
- -DLV_USE_ASSERT_OBJ=0
- -DLV_USE_ASSERT_STYLE=0
- -DLV_USE_USER_DATA=1
- -DLV_FONT_UNSCII_8=1
- -DLV_USE_FONT_SUBPX=1
- -DLV_USE_BIDI=0
- -DLV_USE_ARABIC_PERSIAN_CHARS=0
- ${LVGL_TEST_COMMON_EXAMPLE_OPTIONS}
- -DLV_FONT_DEFAULT=&lv_font_montserrat_14
- -DLV_USE_PNG=1
- -DLV_USE_BMP=1
- -DLV_USE_SJPG=1
- -DLV_USE_GIF=1
- -DLV_USE_QRCODE=1
-)
-
-set(LVGL_TEST_OPTIONS_16BIT_SWAP
- -DLV_COLOR_DEPTH=16
- -DLV_COLOR_16_SWAP=1
- -DLV_MEM_SIZE=65536
- -DLV_DPI_DEF=40
- -DLV_DRAW_COMPLEX=1
- -DLV_DITHER_GRADIENT=1
- -DLV_DITHER_ERROR_DIFFUSION=1
- -DLV_GRAD_CACHE_DEF_SIZE=8*1024
- -DLV_USE_LOG=1
- -DLV_USE_ASSERT_NULL=0
- -DLV_USE_ASSERT_MALLOC=0
- -DLV_USE_ASSERT_MEM_INTEGRITY=0
- -DLV_USE_ASSERT_OBJ=0
- -DLV_USE_ASSERT_STYLE=0
- -DLV_USE_USER_DATA=1
- -DLV_FONT_UNSCII_8=1
- -DLV_USE_FONT_SUBPX=1
- -DLV_USE_BIDI=0
- -DLV_USE_ARABIC_PERSIAN_CHARS=0
- ${LVGL_TEST_COMMON_EXAMPLE_OPTIONS}
- -DLV_FONT_DEFAULT=&lv_font_montserrat_14
- -DLV_USE_PNG=1
- -DLV_USE_BMP=1
- -DLV_USE_SJPG=1
- -DLV_USE_GIF=1
- -DLV_USE_QRCODE=1
-)
-
-set(LVGL_TEST_OPTIONS_FULL_32BIT
- -DLV_COLOR_DEPTH=32
- -DLV_MEM_SIZE=8388608
- -DLV_DPI_DEF=160
- -DLV_DRAW_COMPLEX=1
- -DLV_SHADOW_CACHE_SIZE=1
- -DLV_IMG_CACHE_DEF_SIZE=32
- -DLV_USE_LOG=1
- -DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE
- -DLV_LOG_PRINTF=1
- -DLV_USE_FONT_SUBPX=1
- -DLV_FONT_SUBPX_BGR=1
- -DLV_USE_PERF_MONITOR=1
- -DLV_USE_ASSERT_NULL=1
- -DLV_USE_ASSERT_MALLOC=1
- -DLV_USE_ASSERT_MEM_INTEGRITY=1
- -DLV_USE_ASSERT_OBJ=1
- -DLV_USE_ASSERT_STYLE=1
- -DLV_USE_USER_DATA=1
- -DLV_USE_LARGE_COORD=1
- -DLV_FONT_MONTSERRAT_8=1
- -DLV_FONT_MONTSERRAT_10=1
- -DLV_FONT_MONTSERRAT_12=1
- -DLV_FONT_MONTSERRAT_14=1
- -DLV_FONT_MONTSERRAT_16=1
- -DLV_FONT_MONTSERRAT_18=1
- -DLV_FONT_MONTSERRAT_20=1
- -DLV_FONT_MONTSERRAT_22=1
- -DLV_FONT_MONTSERRAT_24=1
- -DLV_FONT_MONTSERRAT_26=1
- -DLV_FONT_MONTSERRAT_28=1
- -DLV_FONT_MONTSERRAT_30=1
- -DLV_FONT_MONTSERRAT_32=1
- -DLV_FONT_MONTSERRAT_34=1
- -DLV_FONT_MONTSERRAT_36=1
- -DLV_FONT_MONTSERRAT_38=1
- -DLV_FONT_MONTSERRAT_40=1
- -DLV_FONT_MONTSERRAT_42=1
- -DLV_FONT_MONTSERRAT_44=1
- -DLV_FONT_MONTSERRAT_46=1
- -DLV_FONT_MONTSERRAT_48=1
- -DLV_FONT_MONTSERRAT_12_SUBPX=1
- -DLV_FONT_MONTSERRAT_28_COMPRESSED=1
- -DLV_FONT_DEJAVU_16_PERSIAN_HEBREW=1
- -DLV_FONT_SIMSUN_16_CJK=1
- -DLV_FONT_UNSCII_8=1
- -DLV_FONT_UNSCII_16=1
- -DLV_FONT_FMT_TXT_LARGE=1
- -DLV_USE_FONT_COMPRESSED=1
- -DLV_USE_BIDI=1
- -DLV_USE_ARABIC_PERSIAN_CHARS=1
- -DLV_USE_PERF_MONITOR=1
- -DLV_USE_MEM_MONITOR=1
- -DLV_LABEL_TEXT_SELECTION=1
- ${LVGL_TEST_COMMON_EXAMPLE_OPTIONS}
- -DLV_FONT_DEFAULT=&lv_font_montserrat_24
- -DLV_USE_FS_STDIO=1
- -DLV_FS_STDIO_LETTER='A'
- -DLV_USE_FS_POSIX=1
- -DLV_FS_POSIX_LETTER='B'
- -DLV_USE_PNG=1
- -DLV_USE_BMP=1
- -DLV_USE_SJPG=1
- -DLV_USE_GIF=1
- -DLV_USE_QRCODE=1
- -DLV_USE_FRAGMENT=1
- -DLV_USE_IMGFONT=1
- -DLV_USE_MSG=1
-)
-
-set(LVGL_TEST_OPTIONS_TEST_COMMON
- --coverage
- -DLV_COLOR_DEPTH=32
- -DLV_MEM_SIZE=2097152
- -DLV_SHADOW_CACHE_SIZE=10240
- -DLV_IMG_CACHE_DEF_SIZE=32
- -DLV_DITHER_GRADIENT=1
- -DLV_DITHER_ERROR_DIFFUSION=1
- -DLV_GRAD_CACHE_DEF_SIZE=8*1024
- -DLV_USE_LOG=1
- -DLV_LOG_PRINTF=1
- -DLV_USE_FONT_SUBPX=1
- -DLV_FONT_SUBPX_BGR=1
- -DLV_USE_ASSERT_NULL=0
- -DLV_USE_ASSERT_MALLOC=0
- -DLV_USE_ASSERT_MEM_INTEGRITY=0
- -DLV_USE_ASSERT_OBJ=0
- -DLV_USE_ASSERT_STYLE=0
- -DLV_USE_USER_DATA=1
- -DLV_USE_LARGE_COORD=1
- -DLV_FONT_MONTSERRAT_14=1
- -DLV_FONT_MONTSERRAT_16=1
- -DLV_FONT_MONTSERRAT_18=1
- -DLV_FONT_MONTSERRAT_24=1
- -DLV_FONT_MONTSERRAT_48=1
- -DLV_FONT_MONTSERRAT_12_SUBPX=1
- -DLV_FONT_MONTSERRAT_28_COMPRESSED=1
- -DLV_FONT_DEJAVU_16_PERSIAN_HEBREW=1
- -DLV_FONT_SIMSUN_16_CJK=1
- -DLV_FONT_UNSCII_8=1
- -DLV_FONT_UNSCII_16=1
- -DLV_FONT_FMT_TXT_LARGE=1
- -DLV_USE_FONT_COMPRESSED=1
- -DLV_USE_BIDI=1
- -DLV_USE_ARABIC_PERSIAN_CHARS=1
- -DLV_LABEL_TEXT_SELECTION=1
- -DLV_USE_FS_STDIO=1
- -DLV_FS_STDIO_LETTER='A'
- -DLV_FS_STDIO_CACHE_SIZE=100
- -DLV_USE_FS_POSIX=1
- -DLV_FS_POSIX_LETTER='B'
- -DLV_FS_POSIX_CACHE_SIZE=0
- ${LVGL_TEST_COMMON_EXAMPLE_OPTIONS}
- -DLV_FONT_DEFAULT=&lv_font_montserrat_14
- -Wno-unused-but-set-variable # unused variables are common in the dual-heap arrangement
- -Wno-unused-variable
-)
-
-set(LVGL_TEST_OPTIONS_TEST_SYSHEAP
- ${LVGL_TEST_OPTIONS_TEST_COMMON}
- -DLVGL_CI_USING_SYS_HEAP
- -DLV_MEM_CUSTOM=1
- -fsanitize=address
-)
-
-set(LVGL_TEST_OPTIONS_TEST_DEFHEAP
- ${LVGL_TEST_OPTIONS_TEST_COMMON}
- -DLVGL_CI_USING_DEF_HEAP
- -DLV_MEM_SIZE=2097152
- -fsanitize=address
-)
-
-if (OPTIONS_MINIMAL_MONOCHROME)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_MINIMAL_MONOCHROME})
-elseif (OPTIONS_NORMAL_8BIT)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_NORMAL_8BIT})
-elseif (OPTIONS_16BIT)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_16BIT})
-elseif (OPTIONS_16BIT_SWAP)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_16BIT_SWAP})
-elseif (OPTIONS_FULL_32BIT)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_FULL_32BIT})
-elseif (OPTIONS_TEST_SYSHEAP)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_TEST_SYSHEAP})
- set (TEST_LIBS --coverage -fsanitize=address)
-elseif (OPTIONS_TEST_DEFHEAP)
- set (BUILD_OPTIONS ${LVGL_TEST_OPTIONS_TEST_DEFHEAP})
- set (TEST_LIBS --coverage -fsanitize=address)
-else()
- message(FATAL_ERROR "Must provide a known options value (check main.py?).")
-endif()
-
-# Options lvgl and examples are compiled with.
-set(COMPILE_OPTIONS
- -DLV_CONF_PATH=${LVGL_TEST_DIR}/src/lv_test_conf.h
- -DLV_BUILD_TEST
- -pedantic-errors
- -Wall
- -Wclobbered
- -Wdeprecated
- -Wdouble-promotion
- -Wempty-body
- -Werror
- -Wextra
- -Wformat-security
- -Wmaybe-uninitialized
- -Wmissing-prototypes
- -Wpointer-arith
- -Wmultichar
- -Wno-discarded-qualifiers
- -Wpedantic
- -Wreturn-type
- -Wshadow
- -Wshift-negative-value
- -Wsizeof-pointer-memaccess
- -Wstack-usage=5000
- -Wtype-limits
- -Wundef
- -Wuninitialized
- -Wunreachable-code
- ${BUILD_OPTIONS}
-)
-
-# Options test cases are compiled with.
-set(LVGL_TESTFILE_COMPILE_OPTIONS
- ${COMPILE_OPTIONS}
- -Wno-missing-prototypes
-)
-
-get_filename_component(LVGL_DIR ${LVGL_TEST_DIR} DIRECTORY)
-
-# Include lvgl project file.
-include(${LVGL_DIR}/CMakeLists.txt)
-target_compile_options(lvgl PUBLIC ${COMPILE_OPTIONS})
-target_compile_options(lvgl_examples PUBLIC ${COMPILE_OPTIONS})
-
-
-set(TEST_INCLUDE_DIRS
- $
- $
- $
-)
-
-add_library(test_common
- STATIC
- src/lv_test_indev.c
- src/lv_test_init.c
- src/test_fonts/font_1.c
- src/test_fonts/font_2.c
- src/test_fonts/font_3.c
- unity/unity_support.c
- unity/unity.c
-)
-target_include_directories(test_common PUBLIC ${TEST_INCLUDE_DIRS})
-target_compile_options(test_common PUBLIC ${LVGL_TESTFILE_COMPILE_OPTIONS})
-
-# Some examples `#include "lvgl/lvgl.h"` - which is a path which is not
-# in this source repository. If this repo is in a directory names 'lvgl'
-# then we can add our parent directory to the include path.
-# TODO: This is not good practice and should be fixed.
-get_filename_component(LVGL_PARENT_DIR ${LVGL_DIR} DIRECTORY)
-target_include_directories(lvgl_examples PUBLIC $)
-
-# Generate one test executable for each source file pair.
-# The sources in src/test_runners is auto-generated, the
-# sources in src/test_cases is the actual test case.
-file( GLOB TEST_CASE_FILES src/test_cases/*.c )
-foreach( test_case_fname ${TEST_CASE_FILES} )
- # If test file is foo/bar/baz.c then test_name is "baz".
- get_filename_component(test_name ${test_case_fname} NAME_WLE)
- if (${test_name} STREQUAL "_test_template")
- continue()
- endif()
- # Create path to auto-generated source file.
- set(test_runner_fname src/test_runners/${test_name}_Runner.c)
- add_executable( ${test_name}
- ${test_case_fname}
- ${test_runner_fname}
- )
- target_link_libraries(${test_name} test_common lvgl_examples lvgl_demos lvgl png ${TEST_LIBS})
- target_include_directories(${test_name} PUBLIC ${TEST_INCLUDE_DIRS})
- target_compile_options(${test_name} PUBLIC ${LVGL_TESTFILE_COMPILE_OPTIONS})
-
- add_test(
- NAME ${test_name}
- WORKING_DIRECTORY ${LVGL_TEST_DIR}
- COMMAND ${test_name})
-endforeach( test_case_fname ${TEST_CASE_FILES} )
-
-endif()
diff --git a/lib/lvgl/tests/README.md b/lib/lvgl/tests/README.md
deleted file mode 100644
index a7703b9..0000000
--- a/lib/lvgl/tests/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# Tests for LVGL
-
-The tests in the folder can be run locally and automatically by GitHub CI.
-
-## Running locally
-
-### Requirements (Linux)
-
-Install requirements by:
-
-```sh
-scripts/install-prerequisites.sh
-```
-
-### Run test
-1. Run all executable tests with `./tests/main.py test`.
-2. Build all build-only tests with `./tests/main.py build`.
-3. Clean prior test build, build all build-only tests,
- run executable tests, and generate code coverage
- report `./tests/main.py --clean --report build test`.
-
-For full information on running tests run: `./tests/main.py --help`.
-
-## Running automatically
-
-GitHub's CI automatically runs these tests on pushes and pull requests to `master` and `releasev8.*` branches.
-
-## Directory structure
-- `src` Source files of the tests
- - `test_cases` The written tests,
- - `test_runners` Generated automatically from the files in `test_cases`.
- - other miscellaneous files and folders
-- `ref_imgs` - Reference images for screenshot compare
-- `report` - Coverage report. Generated if the `report` flag was passed to `./main.py`
-- `unity` Source files of the test engine
-
-## Add new tests
-
-### Create new test file
-New test needs to be added into the `src/test_cases` folder. The name of the files should look like `test_.c`. The basic skeleton of a test file copy `_test_template.c`.
-
-### Asserts
-See the list of asserts [here](https://github.com/ThrowTheSwitch/Unity/blob/master/docs/UnityAssertionsReference.md).
-
-There are some custom, LVGL specific asserts:
-- `TEST_ASSERT_EQUAL_SCREENSHOT("image1.png")` Render the active screen and compare its content with an image in the `ref_imgs` folder.
-If the compare fails `lvgl/test_screenshot_error.h` is created with the content of the frame buffer as an image.
-To see the that image `#include "test_screenshot_error.h"` and call `test_screenshot_error_show();`.
-- `TEST_ASSERT_EQUAL_COLOR(color1, color2)` Compare two colors.
-
-### Adding new reference images
-The reference images can be taken by copy-pasting the test code in to LVGL simulator and saving the screen.
-LVGL needs to
-- 800x480 resolution
-- 32 bit color depth
-- `LV_USE_PERF_MONITOR` and `LV_USE_MEM_MONITOR` disabled
-- use the default theme, with the default color (don't set a theme manually)
diff --git a/lib/lvgl/tests/config.yml b/lib/lvgl/tests/config.yml
deleted file mode 100644
index 6dd0209..0000000
--- a/lib/lvgl/tests/config.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-:unity:
- :includes:
- - lv_test_init.h
- :suite_setup: "lv_test_init();"
- :suite_teardown: "lv_test_deinit();return num_failures;"
diff --git a/lib/lvgl/tests/main.py b/lib/lvgl/tests/main.py
deleted file mode 100644
index c4cf3ec..0000000
--- a/lib/lvgl/tests/main.py
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/usr/bin/env python3
-
-import argparse
-import errno
-import glob
-import shutil
-import subprocess
-import sys
-import os
-
-lvgl_test_dir = os.path.dirname(os.path.realpath(__file__))
-
-# Key values must match variable names in CMakeLists.txt.
-build_only_options = {
- 'OPTIONS_MINIMAL_MONOCHROME': 'Minimal config monochrome',
- 'OPTIONS_NORMAL_8BIT': 'Normal config, 8 bit color depth',
- 'OPTIONS_16BIT': 'Minimal config, 16 bit color depth',
- 'OPTIONS_16BIT_SWAP': 'Normal config, 16 bit color depth swapped',
- 'OPTIONS_FULL_32BIT': 'Full config, 32 bit color depth',
-}
-
-test_options = {
- 'OPTIONS_TEST_SYSHEAP': 'Test config, system heap, 32 bit color depth',
- 'OPTIONS_TEST_DEFHEAP': 'Test config, LVGL heap, 32 bit color depth',
-}
-
-
-def is_valid_option_name(option_name):
- return option_name in build_only_options or option_name in test_options
-
-
-def get_option_description(option_name):
- if option_name in build_only_options:
- return build_only_options[option_name]
- return test_options[option_name]
-
-
-def delete_dir_ignore_missing(dir_path):
- '''Recursively delete a directory and ignore if missing.'''
- try:
- shutil.rmtree(dir_path)
- except FileNotFoundError:
- pass
-
-
-def generate_test_runners():
- '''Generate the test runner source code.'''
- global lvgl_test_dir
- os.chdir(lvgl_test_dir)
- delete_dir_ignore_missing('src/test_runners')
- os.mkdir('src/test_runners')
-
- # TODO: Intermediate files should be in the build folders, not alongside
- # the other repo source.
- for f in glob.glob("./src/test_cases/test_*.c"):
- r = f[:-2] + "_Runner.c"
- r = r.replace("/test_cases/", "/test_runners/")
- subprocess.check_call(['ruby', 'unity/generate_test_runner.rb',
- f, r, 'config.yml'])
-
-
-def options_abbrev(options_name):
- '''Return an abbreviated version of the option name.'''
- prefix = 'OPTIONS_'
- assert options_name.startswith(prefix)
- return options_name[len(prefix):].lower()
-
-
-def get_base_buid_dir(options_name):
- '''Given the build options name, return the build directory name.
-
- Does not return the full path to the directory - just the base name.'''
- return 'build_%s' % options_abbrev(options_name)
-
-
-def get_build_dir(options_name):
- '''Given the build options name, return the build directory name.
-
- Returns absolute path to the build directory.'''
- global lvgl_test_dir
- return os.path.join(lvgl_test_dir, get_base_buid_dir(options_name))
-
-
-def build_tests(options_name, build_type, clean):
- '''Build all tests for the specified options name.'''
- global lvgl_test_dir
-
- print()
- print()
- label = 'Building: %s: %s' % (options_abbrev(
- options_name), get_option_description(options_name))
- print('=' * len(label))
- print(label)
- print('=' * len(label))
- print(flush=True)
-
- build_dir = get_build_dir(options_name)
- if clean:
- delete_dir_ignore_missing(build_dir)
-
- os.chdir(lvgl_test_dir)
- created_build_dir = False
- if not os.path.isdir(build_dir):
- os.mkdir(build_dir)
- created_build_dir = True
- os.chdir(build_dir)
- if created_build_dir:
- subprocess.check_call(['cmake', '-DCMAKE_BUILD_TYPE=%s' % build_type,
- '-D%s=1' % options_name, '..'])
- subprocess.check_call(['cmake', '--build', build_dir,
- '--parallel', str(os.cpu_count())])
-
-
-def run_tests(options_name):
- '''Run the tests for the given options name.'''
-
- print()
- print()
- label = 'Running tests for %s' % options_abbrev(options_name)
- print('=' * len(label))
- print(label)
- print('=' * len(label), flush=True)
-
- os.chdir(get_build_dir(options_name))
- subprocess.check_call(
- ['ctest', '--parallel', str(os.cpu_count()), '--output-on-failure'])
-
-
-def generate_code_coverage_report():
- '''Produce code coverage test reports for the test execution.'''
- global lvgl_test_dir
-
- print()
- print()
- label = 'Generating code coverage reports'
- print('=' * len(label))
- print(label)
- print('=' * len(label))
- print(flush=True)
-
- os.chdir(lvgl_test_dir)
- delete_dir_ignore_missing('report')
- os.mkdir('report')
- root_dir = os.pardir
- html_report_file = 'report/index.html'
- cmd = ['gcovr', '--root', root_dir, '--html-details', '--output',
- html_report_file, '--xml', 'report/coverage.xml',
- '-j', str(os.cpu_count()), '--print-summary',
- '--html-title', 'LVGL Test Coverage']
- for d in ('.*\\bexamples/.*', '\\bsrc/test_.*', '\\bsrc/lv_test.*', '\\bunity\\b'):
- cmd.extend(['--exclude', d])
-
- subprocess.check_call(cmd)
- print("Done: See %s" % html_report_file, flush=True)
-
-
-if __name__ == "__main__":
- epilog = '''This program builds and optionally runs the LVGL test programs.
- There are two types of LVGL tests: "build", and "test". The build-only
- tests, as their name suggests, only verify that the program successfully
- compiles and links (with various build options). There are also a set of
- tests that execute to verify correct LVGL library behavior.
- '''
- parser = argparse.ArgumentParser(
- description='Build and/or run LVGL tests.', epilog=epilog)
- parser.add_argument('--build-options', nargs=1,
- help='''the build option name to build or run. When
- omitted all build configurations are used.
- ''')
- parser.add_argument('--clean', action='store_true', default=False,
- help='clean existing build artifacts before operation.')
- parser.add_argument('--report', action='store_true',
- help='generate code coverage report for tests.')
- parser.add_argument('actions', nargs='*', choices=['build', 'test'],
- help='build: compile build tests, test: compile/run executable tests.')
-
- args = parser.parse_args()
-
- if args.build_options:
- options_to_build = args.build_options
- else:
- if 'build' in args.actions:
- if 'test' in args.actions:
- options_to_build = {**build_only_options, **test_options}
- else:
- options_to_build = build_only_options
- else:
- options_to_build = test_options
-
- for opt in options_to_build:
- if not is_valid_option_name(opt):
- print('Invalid build option "%s"' % opt, file=sys.stderr)
- sys.exit(errno.EINVAL)
-
- generate_test_runners()
-
- for options_name in options_to_build:
- is_test = options_name in test_options
- build_type = 'Debug'
- build_tests(options_name, build_type, args.clean)
- if is_test:
- try:
- run_tests(options_name)
- except subprocess.CalledProcessError as e:
- sys.exit(e.returncode)
-
- if args.report:
- generate_code_coverage_report()
diff --git a/lib/lvgl/tests/ref_imgs/dropdown_1.png b/lib/lvgl/tests/ref_imgs/dropdown_1.png
deleted file mode 100644
index 30bf0bb..0000000
Binary files a/lib/lvgl/tests/ref_imgs/dropdown_1.png and /dev/null differ
diff --git a/lib/lvgl/tests/ref_imgs/dropdown_2.png b/lib/lvgl/tests/ref_imgs/dropdown_2.png
deleted file mode 100644
index 6b0b533..0000000
Binary files a/lib/lvgl/tests/ref_imgs/dropdown_2.png and /dev/null differ
diff --git a/lib/lvgl/tests/ref_imgs/scr1.png b/lib/lvgl/tests/ref_imgs/scr1.png
deleted file mode 100644
index f0bd852..0000000
Binary files a/lib/lvgl/tests/ref_imgs/scr1.png and /dev/null differ
diff --git a/lib/lvgl/tests/ref_imgs/table_1.png b/lib/lvgl/tests/ref_imgs/table_1.png
deleted file mode 100644
index 193e132..0000000
Binary files a/lib/lvgl/tests/ref_imgs/table_1.png and /dev/null differ
diff --git a/lib/lvgl/tests/src/lv_test_helpers.h b/lib/lvgl/tests/src/lv_test_helpers.h
deleted file mode 100644
index 2b78c42..0000000
--- a/lib/lvgl/tests/src/lv_test_helpers.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef LV_TEST_HELPERS_H
-#define LV_TEST_HELPERS_H
-
-#ifdef LVGL_CI_USING_SYS_HEAP
-/* Skip checking heap as we don't have the info available */
-#define LV_HEAP_CHECK(x) do {} while(0)
-/* Pick a non-zero value */
-#define lv_test_get_free_mem() (65536)
-#else
-#define LV_HEAP_CHECK(x) x
-
-static inline uint32_t lv_test_get_free_mem(void)
-{
- lv_mem_monitor_t m1;
- lv_mem_monitor(&m1);
- return m1.free_size;
-}
-#endif /* LVGL_CI_USING_SYS_HEAP */
-
-
-#endif /*LV_TEST_HELPERS_H*/
-
-
diff --git a/lib/lvgl/tests/src/lv_test_indev.c b/lib/lvgl/tests/src/lv_test_indev.c
deleted file mode 100644
index 1ac6808..0000000
--- a/lib/lvgl/tests/src/lv_test_indev.c
+++ /dev/null
@@ -1,140 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-#include
-#include
-
-#include
-#include "lv_test_indev.h"
-#include "lv_test_init.h"
-
-static lv_coord_t x_act;
-static lv_coord_t y_act;
-static uint32_t key_act;
-static int32_t diff_act;
-static bool mouse_pressed;
-static bool key_pressed;
-static bool enc_pressed;
-
-void lv_test_mouse_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data)
-{
- LV_UNUSED(drv);
- data->point.x = x_act;
- data->point.y = y_act;
- data->state = mouse_pressed ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED;
-}
-
-void lv_test_mouse_move_to(lv_coord_t x, lv_coord_t y)
-{
- x_act = x;
- y_act = y;
-}
-
-void lv_test_mouse_move_by(lv_coord_t x, lv_coord_t y)
-{
- x_act += x;
- y_act += y;
-}
-
-void lv_test_mouse_press(void)
-{
- mouse_pressed = true;
-}
-
-void lv_test_mouse_release(void)
-{
- mouse_pressed = false;
-}
-
-void lv_test_mouse_click_at(lv_coord_t x, lv_coord_t y)
-{
- lv_test_mouse_release();
- lv_test_indev_wait(50);
- lv_test_mouse_move_to(x, y);
- lv_test_mouse_press();
- lv_test_indev_wait(50);
- lv_test_mouse_release();
- lv_test_indev_wait(50);
-}
-
-
-void lv_test_keypad_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data)
-{
- LV_UNUSED(drv);
- data->key = key_act;
- data->state = key_pressed ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED;
-}
-
-void lv_test_key_press(uint32_t k)
-{
- key_act = k;
- key_pressed = true;
-}
-
-void lv_test_key_release(void)
-{
- key_pressed = false;
-}
-
-void lv_test_key_hit(uint32_t k)
-{
- lv_test_key_release();
- lv_test_indev_wait(50);
- lv_test_key_press(k);
- lv_test_mouse_press();
- lv_test_indev_wait(50);
- lv_test_key_release();
- lv_test_indev_wait(50);
-}
-
-void lv_test_encoder_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data)
-{
- LV_UNUSED(drv);
- data->enc_diff = diff_act;
- data->state = enc_pressed ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED;
- diff_act = 0;
-}
-
-void lv_test_encoder_add_diff(int32_t d)
-{
- diff_act += d;
-}
-
-void lv_test_encoder_turn(int32_t d)
-{
- diff_act += d;
- lv_test_indev_wait(50);
-}
-
-
-void lv_test_encoder_press(void)
-{
- enc_pressed = true;
-}
-
-void lv_test_encoder_release(void)
-{
- enc_pressed = false;
-}
-
-void lv_test_encoder_click(void)
-{
- lv_test_encoder_release();
- lv_test_indev_wait(50);
- lv_test_encoder_press();
- lv_test_indev_wait(50);
- lv_test_encoder_release();
- lv_test_indev_wait(50);
-}
-
-
-void lv_test_indev_wait(uint32_t ms)
-{
- uint32_t t = lv_tick_get();
- while(lv_tick_elaps(t) < ms) {
- lv_timer_handler();
- lv_tick_inc(1);
- }
-}
-
-
-#endif
diff --git a/lib/lvgl/tests/src/lv_test_indev.h b/lib/lvgl/tests/src/lv_test_indev.h
deleted file mode 100644
index 2a0508f..0000000
--- a/lib/lvgl/tests/src/lv_test_indev.h
+++ /dev/null
@@ -1,54 +0,0 @@
-
-#ifndef LV_TEST_INDEV_H
-#define LV_TEST_INDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-#include "../lvgl.h"
-
-void lv_test_mouse_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data);
-
-void lv_test_mouse_move_to(lv_coord_t x, lv_coord_t y);
-void lv_test_mouse_move_by(lv_coord_t x, lv_coord_t y);
-void lv_test_mouse_press(void);
-void lv_test_mouse_release(void);
-void lv_test_mouse_click_at(lv_coord_t x, lv_coord_t y);
-
-void lv_test_keypad_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data);
-
-void lv_test_key_press(uint32_t k);
-void lv_test_key_release(void);
-void lv_test_key_hit(uint32_t k);
-
-/* encoder read callback */
-void lv_test_encoder_read_cb(lv_indev_drv_t * drv, lv_indev_data_t * data) ;
-
-/* Simulate encoder rotation, use positive parameter to rotate to the right
- * and negative to rotate to the left */
-void lv_test_encoder_add_diff(int32_t d);
-/* Same as lv_test_encoder_add_diff but with additional delay */
-void lv_test_encoder_turn(int32_t d);
-/* Set encoder to pressed */
-void lv_test_encoder_press(void);
-/* Set encoder to released */
-void lv_test_encoder_release(void);
-/* Simulate release+press+release (including delays) */
-void lv_test_encoder_click(void);
-
-/* Simulate delay */
-void lv_test_indev_wait(uint32_t ms);
-
-extern lv_indev_t * lv_test_mouse_indev;
-extern lv_indev_t * lv_test_keypad_indev;
-extern lv_indev_t * lv_test_encoder_indev;
-
-
-#ifdef __cplusplus
-} /*extern "C"*/
-#endif
-
-#endif /*LV_TEST_INDEV_H*/
-
diff --git a/lib/lvgl/tests/src/lv_test_init.c b/lib/lvgl/tests/src/lv_test_init.c
deleted file mode 100644
index 8baf389..0000000
--- a/lib/lvgl/tests/src/lv_test_init.c
+++ /dev/null
@@ -1,94 +0,0 @@
-
-#if LV_BUILD_TEST
-#include "lv_test_init.h"
-#include "lv_test_indev.h"
-#include
-#include
-#include
-
-#define HOR_RES 800
-#define VER_RES 480
-
-static void hal_init(void);
-static void dummy_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
-
-lv_indev_t * lv_test_mouse_indev;
-lv_indev_t * lv_test_keypad_indev;
-lv_indev_t * lv_test_encoder_indev;
-
-lv_color_t test_fb[HOR_RES * VER_RES];
-static lv_color_t disp_buf1[HOR_RES * VER_RES];
-
-void lv_test_init(void)
-{
- lv_init();
- hal_init();
-}
-
-void lv_test_deinit(void)
-{
- lv_mem_deinit();
-}
-
-static void hal_init(void)
-{
- static lv_disp_draw_buf_t draw_buf;
-
- lv_disp_draw_buf_init(&draw_buf, disp_buf1, NULL, HOR_RES * VER_RES);
-
- static lv_disp_drv_t disp_drv;
- lv_disp_drv_init(&disp_drv);
- disp_drv.draw_buf = &draw_buf;
- disp_drv.flush_cb = dummy_flush_cb;
- disp_drv.hor_res = HOR_RES;
- disp_drv.ver_res = VER_RES;
- lv_disp_drv_register(&disp_drv);
-
- static lv_indev_drv_t indev_mouse_drv;
- lv_indev_drv_init(&indev_mouse_drv);
- indev_mouse_drv.type = LV_INDEV_TYPE_POINTER;
- indev_mouse_drv.read_cb = lv_test_mouse_read_cb;
- lv_test_mouse_indev = lv_indev_drv_register(&indev_mouse_drv);
-
- static lv_indev_drv_t indev_keypad_drv;
- lv_indev_drv_init(&indev_keypad_drv);
- indev_keypad_drv.type = LV_INDEV_TYPE_KEYPAD;
- indev_keypad_drv.read_cb = lv_test_keypad_read_cb;
- lv_test_keypad_indev = lv_indev_drv_register(&indev_keypad_drv);
-
- static lv_indev_drv_t indev_encoder_drv;
- lv_indev_drv_init(&indev_encoder_drv);
- indev_encoder_drv.type = LV_INDEV_TYPE_ENCODER;
- indev_encoder_drv.read_cb = lv_test_encoder_read_cb;
- lv_test_encoder_indev = lv_indev_drv_register(&indev_encoder_drv);
-}
-
-static void dummy_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
-{
- LV_UNUSED(area);
- LV_UNUSED(color_p);
-
- memcpy(test_fb, color_p, lv_area_get_size(area) * sizeof(lv_color_t));
-
- lv_disp_flush_ready(disp_drv);
-}
-
-uint32_t custom_tick_get(void)
-{
- static uint64_t start_ms = 0;
- if(start_ms == 0) {
- struct timeval tv_start;
- gettimeofday(&tv_start, NULL);
- start_ms = (tv_start.tv_sec * 1000000 + tv_start.tv_usec) / 1000;
- }
-
- struct timeval tv_now;
- gettimeofday(&tv_now, NULL);
- uint64_t now_ms;
- now_ms = (tv_now.tv_sec * 1000000 + tv_now.tv_usec) / 1000;
-
- uint32_t time_ms = now_ms - start_ms;
- return time_ms;
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/lv_test_init.h b/lib/lvgl/tests/src/lv_test_init.h
deleted file mode 100644
index dc62920..0000000
--- a/lib/lvgl/tests/src/lv_test_init.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#ifndef LV_TEST_INIT_H
-#define LV_TEST_INIT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-#include <../lvgl.h>
-
-void lv_test_init(void);
-void lv_test_deinit(void);
-
-#ifdef __cplusplus
-} /*extern "C"*/
-#endif
-
-#endif /*LV_TEST_INIT_H*/
-
diff --git a/lib/lvgl/tests/src/test_cases/_test_template.c b/lib/lvgl/tests/src/test_cases/_test_template.c
deleted file mode 100644
index f340c01..0000000
--- a/lib/lvgl/tests/src/test_cases/_test_template.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-void setUp(void)
-{
- /* Function run before every test */
-}
-
-void tearDown(void)
-{
- /* Function run after every test */
-}
-
-void test_func_1(void)
-{
- TEST_FAIL();
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_arc.c b/lib/lvgl/tests/src/test_cases/test_arc.c
deleted file mode 100644
index 853a22e..0000000
--- a/lib/lvgl/tests/src/test_cases/test_arc.c
+++ /dev/null
@@ -1,167 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-#include "lv_test_indev.h"
-
-/* This function runs before each test */
-void setUp(void);
-
-void test_arc_creation_successfull(void);
-void test_arc_should_truncate_to_max_range_when_new_value_exceeds_it(void);
-void test_arc_should_truncate_to_min_range_when_new_value_is_inferior(void);
-void test_arc_should_update_value_after_updating_range(void);
-void test_arc_should_update_angles_when_changing_to_symmetrical_mode(void);
-void test_arc_should_update_angles_when_changing_to_symmetrical_mode_value_more_than_middle_range(void);
-void test_arc_angles_when_reversed(void);
-
-static lv_obj_t * active_screen = NULL;
-static lv_obj_t * arc = NULL;
-static uint32_t event_cnt;
-
-static void dummy_event_cb(lv_event_t * e);
-
-void setUp(void)
-{
- active_screen = lv_scr_act();
-}
-
-void test_arc_creation_successfull(void)
-{
- arc = lv_arc_create(active_screen);
-
- TEST_ASSERT_NOT_NULL(arc);
-}
-
-void test_arc_should_truncate_to_max_range_when_new_value_exceeds_it(void)
-{
- /* Default max range is 100 */
- int16_t value_after_truncation = 100;
-
- arc = lv_arc_create(active_screen);
-
- lv_arc_set_value(arc, 200);
-
- TEST_ASSERT_EQUAL_INT16(value_after_truncation, lv_arc_get_value(arc));
-}
-
-void test_arc_should_truncate_to_min_range_when_new_value_is_inferior(void)
-{
- /* Default min range is 100 */
- int16_t value_after_truncation = 0;
-
- arc = lv_arc_create(active_screen);
-
- lv_arc_set_value(arc, 0);
-
- TEST_ASSERT_EQUAL_INT16(value_after_truncation, lv_arc_get_value(arc));
-}
-
-void test_arc_should_update_value_after_updating_range(void)
-{
- int16_t value_after_updating_max_range = 50;
- int16_t value_after_updating_min_range = 30;
-
- arc = lv_arc_create(active_screen);
-
- lv_arc_set_value(arc, 80);
- lv_arc_set_range(arc, 1, 50);
-
- TEST_ASSERT_EQUAL_INT16(value_after_updating_max_range, lv_arc_get_value(arc));
-
- lv_arc_set_value(arc, 10);
- lv_arc_set_range(arc, 30, 50);
-
- TEST_ASSERT_EQUAL_INT16(value_after_updating_min_range, lv_arc_get_value(arc));
-}
-
-void test_arc_should_update_angles_when_changing_to_symmetrical_mode(void)
-{
- int16_t expected_angle_start = 135;
- int16_t expected_angle_end = 270;
-
- /* start angle is 135, end angle is 45 at creation */
- arc = lv_arc_create(active_screen);
- lv_arc_set_mode(arc, LV_ARC_MODE_SYMMETRICAL);
-
- TEST_ASSERT_EQUAL_INT16(expected_angle_start, lv_arc_get_angle_start(arc));
- TEST_ASSERT_EQUAL_INT16(expected_angle_end, lv_arc_get_angle_end(arc));
-}
-
-void test_arc_should_update_angles_when_changing_to_symmetrical_mode_value_more_than_middle_range(void)
-{
- int16_t expected_angle_start = 270;
- int16_t expected_angle_end = 45;
-
- /* start angle is 135, end angle is 45 at creation */
- arc = lv_arc_create(active_screen);
- lv_arc_set_value(arc, 100);
- lv_arc_set_mode(arc, LV_ARC_MODE_SYMMETRICAL);
-
- TEST_ASSERT_EQUAL_INT16(expected_angle_start, lv_arc_get_angle_start(arc));
- TEST_ASSERT_EQUAL_INT16(expected_angle_end, lv_arc_get_angle_end(arc));
-}
-
-/* See #2522 for more information */
-void test_arc_angles_when_reversed(void)
-{
- uint16_t expected_start_angle = 36;
- uint16_t expected_end_angle = 90;
- int16_t expected_value = 40;
-
- lv_obj_t * arcBlack;
- arcBlack = lv_arc_create(lv_scr_act());
-
- lv_arc_set_mode(arcBlack, LV_ARC_MODE_REVERSE);
-
- lv_arc_set_bg_angles(arcBlack, 0, 90);
-
- lv_arc_set_value(arcBlack, expected_value);
-
- TEST_ASSERT_EQUAL_UINT16(expected_start_angle, lv_arc_get_angle_start(arcBlack));
- TEST_ASSERT_EQUAL_UINT16(expected_end_angle, lv_arc_get_angle_end(arcBlack));
- TEST_ASSERT_EQUAL_INT16(expected_value, lv_arc_get_value(arcBlack));
-}
-
-void test_arc_click_area_with_adv_hittest(void)
-{
- arc = lv_arc_create(lv_scr_act());
- lv_obj_set_size(arc, 100, 100);
- lv_obj_set_style_arc_width(arc, 10, 0);
- lv_obj_add_flag(arc, LV_OBJ_FLAG_ADV_HITTEST);
- lv_obj_add_event_cb(arc, dummy_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
- lv_obj_set_ext_click_area(arc, 5);
-
- /*No click detected at the middle*/
- event_cnt = 0;
- lv_test_mouse_click_at(50, 50);
- TEST_ASSERT_EQUAL_UINT32(0, event_cnt);
-
- /*No click close to the radius - bg_arc - ext_click_area*/
- event_cnt = 0;
- lv_test_mouse_click_at(83, 50);
- TEST_ASSERT_EQUAL_UINT32(0, event_cnt);
-
- /*Click on the radius - bg_arc - ext_click_area*/
- event_cnt = 0;
- lv_test_mouse_click_at(86, 50);
- TEST_ASSERT_GREATER_THAN(0, event_cnt);
-
- /*Click on the radius + ext_click_area*/
- event_cnt = 0;
- lv_test_mouse_click_at(104, 50);
- TEST_ASSERT_GREATER_THAN(0, event_cnt);
-
- /*No click beyond to the radius + ext_click_area*/
- event_cnt = 0;
- lv_test_mouse_click_at(106, 50);
- TEST_ASSERT_EQUAL_UINT32(0, event_cnt);
-}
-
-static void dummy_event_cb(lv_event_t * e)
-{
- LV_UNUSED(e);
- event_cnt++;
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_bar.c b/lib/lvgl/tests/src/test_cases/test_bar.c
deleted file mode 100644
index 14eacbe..0000000
--- a/lib/lvgl/tests/src/test_cases/test_bar.c
+++ /dev/null
@@ -1,253 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-#include "lv_test_indev.h"
-
-static lv_obj_t * active_screen = NULL;
-static lv_obj_t * bar = NULL;
-
-void setUp(void)
-{
- active_screen = lv_scr_act();
- bar = lv_bar_create(active_screen);
-}
-
-void tearDown(void)
-{
-}
-
-void test_bar_should_have_valid_default_attributes(void)
-{
- TEST_ASSERT_EQUAL(0, lv_bar_get_min_value(bar));
- TEST_ASSERT_EQUAL(100, lv_bar_get_max_value(bar));
- TEST_ASSERT_EQUAL(LV_BAR_MODE_NORMAL, lv_bar_get_mode(bar));
-}
-
-/*
- * Bar has two parts, main and indicator, coordinates of the latter are
- * calculated based on:
- * - Bar size
- * - Bar (main part) padding
- * - Bar value
- * - Bar coordinates
- * - Bar base direction
- * See Boxing model in docs for reference.
- *
- * Bar properties assumed:
- * - mode: LV_BAR_MODE_NORMAL
- * - min value: 0
- * - max value: 100
- * - base direction: LTR
- */
-void test_bar_should_update_indicator_right_coordinate_based_on_bar_value(void)
-{
- lv_bar_t * bar_ptr = (lv_bar_t *) bar;
-
- static lv_style_t bar_style;
-
- const lv_coord_t style_padding = 5u;
- const lv_coord_t bar_width = 200u;
- const lv_coord_t bar_height = 20u;
- int32_t bar_value = 10u;
-
- lv_style_init(&bar_style);
- lv_style_set_pad_all(&bar_style, style_padding);
-
- /* Setup new style */
- lv_obj_remove_style_all(bar);
- lv_obj_add_style(bar, &bar_style, LV_PART_MAIN);
-
- /* Set properties */
- lv_obj_set_size(bar, bar_width, bar_height);
- lv_bar_set_value(bar, bar_value, LV_ANIM_OFF);
-
- /* FIXME: Remove wait */
- lv_test_indev_wait(50);
-
- int32_t actual_coord = lv_area_get_width(&bar_ptr->indic_area);
-
- /* Calculate bar indicator right coordinate, using rule of 3 */
- lv_coord_t bar_max_value = lv_bar_get_max_value(bar);
- lv_coord_t indicator_part_width = lv_obj_get_content_width(bar);
- lv_coord_t sides_padding = lv_obj_get_style_pad_left(bar, LV_PART_MAIN);
- sides_padding += lv_obj_get_style_pad_right(bar, LV_PART_MAIN);
-
- int32_t expected_coord = (bar_value * indicator_part_width) / bar_max_value;
- /* NOTE: Add 1 to calculation because the coordinates start at 0 */
- expected_coord += 1;
-
- TEST_ASSERT_EQUAL_INT32(expected_coord, actual_coord);
-}
-
-/*
- * Bar has two parts, main and indicator, coordinates of the latter are
- * calculated based on:
- * - Bar size
- * - Bar (main part) padding
- * - Bar value
- * - Bar coordinates
- * - Bar base direction
- * See Boxing model in docs for reference.
- *
- * Bar properties assumed:
- * - mode: LV_BAR_MODE_NORMAL
- * - min value: 0
- * - max value: 100
- */
-void test_bar_rtl_should_update_indicator_left_coordinate_based_on_bar_value(void)
-{
- lv_bar_t * bar_ptr = (lv_bar_t *) bar;
-
- static lv_style_t bar_style;
-
- const lv_coord_t style_padding = 5u;
- const lv_coord_t bar_width = 200u;
- const lv_coord_t bar_height = 20u;
- int32_t bar_value = 10u;
-
- lv_style_init(&bar_style);
- lv_style_set_pad_all(&bar_style, style_padding);
-
- /* Setup new style */
- lv_obj_remove_style_all(bar);
- lv_obj_add_style(bar, &bar_style, LV_PART_MAIN);
-
- /* Set properties */
- lv_obj_set_size(bar, bar_width, bar_height);
- lv_bar_set_value(bar, bar_value, LV_ANIM_OFF);
- lv_obj_set_style_base_dir(bar, LV_BASE_DIR_RTL, 0);
-
- /* FIXME: Remove wait */
- lv_test_indev_wait(50);
-
- int32_t actual_coord = bar_ptr->indic_area.x1;
-
- /* Calculate current indicator width */
- lv_coord_t bar_max_value = lv_bar_get_max_value(bar);
- lv_coord_t indicator_part_width = lv_obj_get_content_width(bar);
- lv_coord_t right_padding = lv_obj_get_style_pad_right(bar, LV_PART_MAIN);
- int32_t indicator_width = (bar_value * indicator_part_width) / bar_max_value;
-
- int32_t expected_coord = (bar_width - right_padding) - indicator_width;
- expected_coord -= 1;
-
- TEST_ASSERT_EQUAL_INT32(expected_coord, actual_coord);
-}
-
-void test_bar_indicator_area_should_get_smaller_when_padding_is_increased(void)
-{
- lv_bar_t * bar_ptr = (lv_bar_t *) bar;
-
- const lv_coord_t style_padding = 10u;
- static lv_style_t bar_style;
-
- int32_t new_height = 0u;
- int32_t new_width = 0u;
- int32_t original_height = 0u;
- int32_t original_width = 0u;
-
- lv_bar_set_value(bar, 50, LV_ANIM_OFF);
- lv_test_indev_wait(50);
-
- original_width = lv_area_get_width(&bar_ptr->indic_area);
- original_height = lv_area_get_height(&bar_ptr->indic_area);
-
- /* Setup new padding */
- lv_style_init(&bar_style);
- lv_style_set_pad_all(&bar_style, style_padding);
- lv_obj_set_size(bar, 100, 50);
-
- /* Apply new style */
- lv_obj_remove_style_all(bar);
- lv_obj_add_style(bar, &bar_style, LV_PART_MAIN);
-
- /* Notify LVGL of style change */
- lv_obj_report_style_change(&bar_style);
- lv_test_indev_wait(50);
-
- new_height = lv_area_get_height(&bar_ptr->indic_area);
- new_width = lv_area_get_width(&bar_ptr->indic_area);
-
- TEST_ASSERT_LESS_THAN_INT32(original_height, new_height);
- TEST_ASSERT_LESS_THAN_INT32(original_width, new_width);
-}
-
-void test_bar_start_value_should_only_change_when_in_range_mode(void)
-{
- int32_t new_start_value = 20u;
-
- lv_bar_set_value(bar, 90, LV_ANIM_OFF);
- lv_bar_set_start_value(bar, new_start_value, LV_ANIM_OFF);
-
- /* Start value shouldn't be updated when not in RANGE mode */
- TEST_ASSERT_EQUAL_INT32(0u, lv_bar_get_start_value(bar));
-
- /* Set bar in RANGE mode so we can edit the start value */
- lv_bar_set_mode(bar, LV_BAR_MODE_RANGE);
- lv_bar_set_start_value(bar, new_start_value, LV_ANIM_OFF);
-
- TEST_ASSERT_EQUAL_INT32(new_start_value, lv_bar_get_start_value(bar));
-}
-
-void test_bar_start_value_should_be_smaller_than_current_value_in_range_mode(void)
-{
- /* Set bar in RANGE mode so we can edit the start value */
- lv_bar_set_mode(bar, LV_BAR_MODE_RANGE);
- lv_bar_set_value(bar, 50, LV_ANIM_OFF);
- lv_bar_set_start_value(bar, 100u, LV_ANIM_OFF);
-
- TEST_ASSERT_EQUAL_INT32(lv_bar_get_value(bar), lv_bar_get_start_value(bar));
-}
-
-void test_bar_current_value_should_be_truncated_to_max_value_when_exceeds_it(void)
-{
- int32_t max_value = lv_bar_get_max_value(bar);
- int32_t new_value = max_value + 1u;
-
- lv_bar_set_value(bar, new_value, LV_ANIM_OFF);
- TEST_ASSERT_EQUAL_INT32(max_value, lv_bar_get_value(bar));
-}
-
-void test_bar_current_value_should_be_truncated_to_min_value_when_it_is_below_it(void)
-{
- int32_t min_value = lv_bar_get_min_value(bar);
- int32_t new_value = min_value - 1u;
-
- lv_bar_set_value(bar, new_value, LV_ANIM_OFF);
- TEST_ASSERT_EQUAL_INT32(min_value, lv_bar_get_value(bar));
-}
-
-/** When in symmetrical mode, the bar indicator has to be drawn towards the min
- * range value. Requires a negative min range value and a positive max range
- * value.
- *
- * Bar properties assumed:
- * - base direction: LTR
- */
-void test_bar_indicator_should_be_drawn_towards_the_min_range_side_after_setting_a_more_negative_value(void)
-{
- lv_bar_t * bar_ptr = (lv_bar_t *) bar;
-
- /* Setup bar properties */
- lv_obj_set_size(bar, 100, 50);
- lv_bar_set_mode(bar, LV_BAR_MODE_SYMMETRICAL);
- lv_bar_set_range(bar, -100, 100);
-
- /* Set bar value to 1, so it gets drawn at the middle of the bar */
- lv_bar_set_value(bar, 1, LV_ANIM_OFF);
- lv_test_indev_wait(50);
-
- lv_coord_t original_pos = bar_ptr->indic_area.x1;
-
- /* Set bar to a more negative value */
- lv_bar_set_value(bar, -50, LV_ANIM_OFF);
- lv_test_indev_wait(50);
-
- lv_coord_t final_pos = bar_ptr->indic_area.x1;
-
- TEST_ASSERT_LESS_THAN(original_pos, final_pos);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_checkbox.c b/lib/lvgl/tests/src/test_cases/test_checkbox.c
deleted file mode 100644
index 1d98570..0000000
--- a/lib/lvgl/tests/src/test_cases/test_checkbox.c
+++ /dev/null
@@ -1,96 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-#include "lv_test_helpers.h"
-#include "lv_test_indev.h"
-
-void test_checkbox_creation_successfull(void);
-void test_checkbox_should_call_event_handler_on_click_when_enabled(void);
-void test_checkbox_should_have_default_text_when_created(void);
-void test_checkbox_should_return_dinamically_allocated_text(void);
-void test_checkbox_should_allocate_memory_for_static_text(void);
-
-static lv_obj_t * active_screen = NULL;
-static lv_obj_t * checkbox = NULL;
-
-static volatile bool event_called = false;
-
-static void event_handler(lv_event_t * e)
-{
- lv_event_code_t code = lv_event_get_code(e);
-
- if(LV_EVENT_VALUE_CHANGED == code) {
- event_called = true;
- }
-}
-
-void test_checkbox_creation_successfull(void)
-{
- active_screen = lv_scr_act();
- checkbox = lv_checkbox_create(active_screen);
-
- TEST_ASSERT_NOT_NULL(checkbox);
-}
-
-void test_checkbox_should_call_event_handler_on_click_when_enabled(void)
-{
- active_screen = lv_scr_act();
- checkbox = lv_checkbox_create(active_screen);
-
- lv_obj_add_state(checkbox, LV_STATE_CHECKED);
- lv_obj_add_event_cb(checkbox, event_handler, LV_EVENT_ALL, NULL);
-
- lv_test_mouse_click_at(checkbox->coords.x1, checkbox->coords.y1);
-
- TEST_ASSERT_TRUE(event_called);
-
- event_called = false;
-}
-
-void test_checkbox_should_have_default_text_when_created(void)
-{
- const char * default_text = "Check box";
-
- active_screen = lv_scr_act();
- checkbox = lv_checkbox_create(active_screen);
-
- TEST_ASSERT_EQUAL_STRING(default_text, lv_checkbox_get_text(checkbox));
- TEST_ASSERT_NOT_NULL(lv_checkbox_get_text(checkbox));
-}
-
-void test_checkbox_should_return_dinamically_allocated_text(void)
-{
- const char * message = "Hello World!";
-
- active_screen = lv_scr_act();
- checkbox = lv_checkbox_create(active_screen);
-
- lv_checkbox_set_text(checkbox, message);
-
- TEST_ASSERT_EQUAL_STRING(message, lv_checkbox_get_text(checkbox));
- TEST_ASSERT_NOT_NULL(lv_checkbox_get_text(checkbox));
-}
-
-void test_checkbox_should_allocate_memory_for_static_text(void)
-{
- uint32_t initial_available_memory = 0;
- const char * static_text = "Keep me while you exist";
-
- lv_mem_monitor_t m1;
- lv_mem_monitor(&m1);
-
- active_screen = lv_scr_act();
- checkbox = lv_checkbox_create(active_screen);
-
- initial_available_memory = m1.free_size;
-
- lv_checkbox_set_text_static(checkbox, static_text);
-
- lv_mem_monitor(&m1);
-
- LV_HEAP_CHECK(TEST_ASSERT_LESS_THAN(initial_available_memory, m1.free_size));
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_config.c b/lib/lvgl/tests/src/test_cases/test_config.c
deleted file mode 100644
index 13672de..0000000
--- a/lib/lvgl/tests/src/test_cases/test_config.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-void test_config(void);
-
-void test_config(void)
-{
- TEST_ASSERT_EQUAL(130, LV_DPI_DEF);
- TEST_ASSERT_EQUAL(130, lv_disp_get_dpi(NULL));
- TEST_ASSERT_EQUAL(800, LV_HOR_RES);
- TEST_ASSERT_EQUAL(800, lv_disp_get_hor_res(NULL));
- TEST_ASSERT_EQUAL(480, LV_VER_RES);
- TEST_ASSERT_EQUAL(480, lv_disp_get_ver_res(NULL));
- TEST_ASSERT_EQUAL(32, LV_COLOR_DEPTH);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_demo_stress.c b/lib/lvgl/tests/src/test_cases/test_demo_stress.c
deleted file mode 100644
index 929ae3b..0000000
--- a/lib/lvgl/tests/src/test_cases/test_demo_stress.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-#include "../demos/lv_demos.h"
-
-#include "unity/unity.h"
-
-#include "lv_test_helpers.h"
-#include "lv_test_indev.h"
-
-static void loop_through_stress_test(void)
-{
-#if LV_USE_DEMO_STRESS
- lv_test_indev_wait(LV_DEMO_STRESS_TIME_STEP * 33); /* FIXME: remove magic number of states */
-#endif
-}
-void test_demo_stress(void)
-{
-#if LV_USE_DEMO_STRESS
- lv_demo_stress();
-#endif
- /* loop once to allow objects to be created */
- loop_through_stress_test();
- uint32_t mem_before = lv_test_get_free_mem();
- /* loop 10 more times */
- for(uint32_t i = 0; i < 10; i++) {
- loop_through_stress_test();
- }
- TEST_ASSERT_EQUAL(mem_before, lv_test_get_free_mem());
-}
-
-#endif
-
diff --git a/lib/lvgl/tests/src/test_cases/test_demo_widgets.c b/lib/lvgl/tests/src/test_cases/test_demo_widgets.c
deleted file mode 100644
index 48ba758..0000000
--- a/lib/lvgl/tests/src/test_cases/test_demo_widgets.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-#include "../demos/lv_demos.h"
-
-#include "unity/unity.h"
-
-#include "lv_test_helpers.h"
-#include "lv_test_indev.h"
-
-void test_demo_widgets(void)
-{
-#if LV_USE_DEMO_WIDGETS
- lv_demo_widgets();
-#endif
-}
-
-#endif
-
diff --git a/lib/lvgl/tests/src/test_cases/test_dropdown.c b/lib/lvgl/tests/src/test_cases/test_dropdown.c
deleted file mode 100644
index a49cc1d..0000000
--- a/lib/lvgl/tests/src/test_cases/test_dropdown.c
+++ /dev/null
@@ -1,445 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-#include "lv_test_indev.h"
-
-void setUp(void)
-{
- /* Function run before every test */
-}
-
-void tearDown(void)
-{
- /* Function run after every test */
- lv_obj_clean(lv_scr_act());
-}
-void test_dropdown_create_delete(void)
-{
- lv_dropdown_create(lv_scr_act());
- TEST_ASSERT_EQUAL(2, lv_obj_get_child_cnt(lv_scr_act()));
-
- lv_obj_t * dd2 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd2, 200, 0);
- TEST_ASSERT_EQUAL(4, lv_obj_get_child_cnt(lv_scr_act()));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd2));
- lv_dropdown_open(dd2);
- TEST_ASSERT_EQUAL(4, lv_obj_get_child_cnt(lv_scr_act()));
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd2));
- lv_dropdown_open(dd2); /*Try to open again*/
- TEST_ASSERT_EQUAL(4, lv_obj_get_child_cnt(lv_scr_act()));
-
- lv_obj_t * dd3 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd3, 400, 0);
- TEST_ASSERT_EQUAL(6, lv_obj_get_child_cnt(lv_scr_act()));
- lv_dropdown_open(dd3);
- TEST_ASSERT_EQUAL(6, lv_obj_get_child_cnt(lv_scr_act()));
- lv_dropdown_close(dd3);
- TEST_ASSERT_EQUAL(6, lv_obj_get_child_cnt(lv_scr_act()));
- lv_dropdown_close(dd3); /*Try to close again*/
- TEST_ASSERT_EQUAL(6, lv_obj_get_child_cnt(lv_scr_act()));
-
- lv_obj_del(dd2);
- TEST_ASSERT_EQUAL(4, lv_obj_get_child_cnt(lv_scr_act()));
-
- lv_obj_clean(lv_scr_act());
- TEST_ASSERT_EQUAL(0, lv_obj_get_child_cnt(lv_scr_act()));
-
-}
-
-void test_dropdown_set_options(void)
-{
-
- lv_mem_monitor_t m1;
- lv_mem_monitor(&m1);
-
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- TEST_ASSERT_EQUAL_STRING("Option 1\nOption 2\nOption 3", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(3, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_set_options(dd1, "a1\nb2\nc3\nd4\ne5\nf6");
- TEST_ASSERT_EQUAL_STRING("a1\nb2\nc3\nd4\ne5\nf6", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(6, lv_dropdown_get_option_cnt(dd1));
-
- lv_obj_set_width(dd1, 200);
- lv_dropdown_open(dd1);
- lv_obj_update_layout(dd1);
- TEST_ASSERT_EQUAL(200, lv_obj_get_width(lv_dropdown_get_list(dd1)));
-
- lv_dropdown_close(dd1);
-
- lv_dropdown_add_option(dd1, "x0", 0);
- TEST_ASSERT_EQUAL_STRING("x0\na1\nb2\nc3\nd4\ne5\nf6", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(7, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_add_option(dd1, "y0", 3);
- TEST_ASSERT_EQUAL_STRING("x0\na1\nb2\ny0\nc3\nd4\ne5\nf6", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(8, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_add_option(dd1, "z0", LV_DROPDOWN_POS_LAST);
- TEST_ASSERT_EQUAL_STRING("x0\na1\nb2\ny0\nc3\nd4\ne5\nf6\nz0", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(9, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_clear_options(dd1);
- TEST_ASSERT_EQUAL_STRING("", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(0, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_set_options(dd1, "o1\no2"); /*Just to add some content before lv_dropdown_set_options_static*/
-
- lv_dropdown_set_options_static(dd1, "a1\nb2\nc3\nd4\ne5\nf6");
- TEST_ASSERT_EQUAL_STRING("a1\nb2\nc3\nd4\ne5\nf6", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(6, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_add_option(dd1, "x0", 0);
- TEST_ASSERT_EQUAL_STRING("x0\na1\nb2\nc3\nd4\ne5\nf6", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(7, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_add_option(dd1, "y0", 3);
- TEST_ASSERT_EQUAL_STRING("x0\na1\nb2\ny0\nc3\nd4\ne5\nf6", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(8, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_add_option(dd1, "z0", LV_DROPDOWN_POS_LAST);
- TEST_ASSERT_EQUAL_STRING("x0\na1\nb2\ny0\nc3\nd4\ne5\nf6\nz0", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(9, lv_dropdown_get_option_cnt(dd1));
-
- lv_dropdown_clear_options(dd1);
- TEST_ASSERT_EQUAL_STRING("", lv_dropdown_get_options(dd1));
- TEST_ASSERT_EQUAL(0, lv_dropdown_get_option_cnt(dd1));
-
- lv_obj_del(dd1);
-
- lv_mem_monitor_t m2;
- lv_mem_monitor(&m2);
- TEST_ASSERT_UINT32_WITHIN(48, m1.free_size, m2.free_size);
-}
-
-void test_dropdown_select(void)
-{
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_selected(dd1, 2);
-
- TEST_ASSERT_EQUAL(2, lv_dropdown_get_selected(dd1));
-
- char buf[32];
- memset(buf, 0x00, sizeof(buf));
- lv_dropdown_get_selected_str(dd1, buf, sizeof(buf));
- TEST_ASSERT_EQUAL_STRING("Option 3", buf);
-
- memset(buf, 0x00, sizeof(buf));
- lv_dropdown_get_selected_str(dd1, buf, 4);
- TEST_ASSERT_EQUAL_STRING("Opt", buf);
-
- /*Out of range*/
- lv_dropdown_set_selected(dd1, 3);
- TEST_ASSERT_EQUAL(2, lv_dropdown_get_selected(dd1));
-}
-
-void test_dropdown_click(void)
-{
- lv_obj_clean(lv_scr_act());
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- lv_obj_update_layout(dd1);
-
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- lv_test_mouse_click_at(dd1->coords.x1 + 5, dd1->coords.y1 + 5);
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd1));
-
- lv_obj_t * list = lv_dropdown_get_list(dd1);
- TEST_ASSERT_EQUAL(0, lv_dropdown_get_selected(dd1));
- lv_test_mouse_click_at(list->coords.x1 + 5, list->coords.y2 - 25);
- TEST_ASSERT_EQUAL(2, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
-}
-
-static uint32_t event_cnt;
-static void dd_event(lv_event_t * e)
-{
- LV_UNUSED(e);
- event_cnt++;
-}
-
-void test_dropdown_keypad(void)
-{
- lv_obj_clean(lv_scr_act());
-
- lv_group_t * g = lv_group_create();
- lv_indev_set_group(lv_test_keypad_indev, g);
-
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd1, 20, 20);
- lv_dropdown_set_options(dd1, "1\n2\n3\n4\n5\n6\n7\n8");
- lv_group_add_obj(g, dd1);
- lv_obj_add_event_cb(dd1, dd_event, LV_EVENT_VALUE_CHANGED, NULL);
-
- lv_obj_t * dd2 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd2, 300, 20);
- lv_group_add_obj(g, dd2);
-
- event_cnt = 0;
-
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd2));
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd2));
-
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_RIGHT); /*Same as down*/
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(2, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(1, event_cnt);
-
- lv_test_key_hit(LV_KEY_DOWN); /*Open the list too*/
- TEST_ASSERT_NOT_NULL(lv_dropdown_get_list(dd1));
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(3, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(2, event_cnt);
-
- lv_test_key_hit(LV_KEY_RIGHT); /*Open the list too*/
- TEST_ASSERT_NOT_NULL(lv_dropdown_get_list(dd1));
- lv_test_key_hit(LV_KEY_RIGHT);
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(4, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(3, event_cnt);
-
- lv_test_key_hit(LV_KEY_LEFT); /*Open the list too*/
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd1));
- lv_test_key_hit(LV_KEY_LEFT);
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(3, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(4, event_cnt);
-
- lv_test_key_hit(LV_KEY_UP); /*Open the list too*/
- TEST_ASSERT_NOT_NULL(lv_dropdown_get_list(dd1));
- lv_test_key_hit(LV_KEY_UP);
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(2, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(5, event_cnt);
-
- lv_test_key_hit(LV_KEY_UP);
- lv_test_key_hit(LV_KEY_UP);
- lv_test_key_hit(LV_KEY_UP);
- lv_test_key_hit(LV_KEY_UP);
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(0, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(6, event_cnt);
-
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_DOWN);
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(7, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(7, event_cnt);
-
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd1));
-
- lv_test_key_hit(LV_KEY_NEXT);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd2));
-
- lv_test_key_hit(LV_KEY_ENTER);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_NOT_NULL(lv_dropdown_get_list(dd2));
-
- lv_indev_set_group(lv_test_keypad_indev, NULL);
- lv_group_del(g);
-}
-
-
-void test_dropdown_encoder(void)
-{
- lv_obj_clean(lv_scr_act());
-
- lv_group_t * g = lv_group_create();
- lv_indev_set_group(lv_test_encoder_indev, g);
-
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd1, 20, 20);
- lv_dropdown_set_options(dd1, "1\n2\n3\n4\n5\n6\n7\n8");
- lv_group_add_obj(g, dd1);
- lv_obj_add_event_cb(dd1, dd_event, LV_EVENT_VALUE_CHANGED, NULL);
-
- lv_obj_t * dd2 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd2, 300, 20);
- lv_group_add_obj(g, dd2);
-
- event_cnt = 0;
-
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd2));
- lv_test_encoder_click();
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd2));
-
- lv_test_encoder_turn(5);
- lv_test_encoder_click();
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(5, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(1, event_cnt);
-
- lv_test_encoder_click();
- lv_test_encoder_turn(-1);
- lv_test_encoder_click();
- TEST_ASSERT_EQUAL(4, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(2, event_cnt);
-
- lv_test_encoder_click();
- lv_test_encoder_turn(2);
- lv_test_encoder_press();
- lv_test_indev_wait(1000); //Long press
- lv_test_encoder_release();
- lv_test_indev_wait(50);
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_EQUAL(4, lv_dropdown_get_selected(dd1));
- TEST_ASSERT_EQUAL(2, event_cnt);
-
- lv_test_encoder_turn(1);
- lv_test_encoder_click();
- TEST_ASSERT_FALSE(lv_dropdown_is_open(dd1));
- TEST_ASSERT_TRUE(lv_dropdown_is_open(dd2));
-
- lv_indev_set_group(lv_test_encoder_indev, NULL);
- lv_group_del(g);
-}
-
-
-void test_dropdown_render_1(void)
-{
- lv_obj_clean(lv_scr_act());
-
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd1, 10, 10);
- lv_dropdown_set_selected(dd1, 1);
-
- lv_obj_t * dd2 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_pos(dd2, 200, 10);
- lv_obj_set_width(dd2, 200);
- lv_dropdown_set_selected(dd2, 2);
- lv_dropdown_open(dd2);
- TEST_ASSERT_TRUE(lv_dropdown_get_selected_highlight(dd2));
- lv_dropdown_set_selected_highlight(dd2, false);
- TEST_ASSERT_FALSE(lv_dropdown_get_selected_highlight(dd2));
-
- lv_obj_t * dd3 = lv_dropdown_create(lv_scr_act());
- lv_obj_set_style_pad_hor(dd3, 5, 0);
- lv_obj_set_style_pad_ver(dd3, 20, 0);
- lv_obj_set_pos(dd3, 500, 150);
- TEST_ASSERT_EQUAL_PTR(NULL, lv_dropdown_get_text(dd3));
- lv_dropdown_set_text(dd3, "A text");
- TEST_ASSERT_EQUAL_STRING("A text", lv_dropdown_get_text(dd3));
-
- lv_dropdown_set_selected(dd3, 2);
-
- TEST_ASSERT_EQUAL(LV_DIR_BOTTOM, lv_dropdown_get_dir(dd3));
- lv_dropdown_set_dir(dd3, LV_DIR_LEFT);
- TEST_ASSERT_EQUAL(LV_DIR_LEFT, lv_dropdown_get_dir(dd3));
-
- TEST_ASSERT_EQUAL_STRING(LV_SYMBOL_DOWN, lv_dropdown_get_symbol(dd3));
- lv_dropdown_set_symbol(dd3, LV_SYMBOL_LEFT);
- TEST_ASSERT_EQUAL_STRING(LV_SYMBOL_LEFT, lv_dropdown_get_symbol(dd3));
-
- lv_dropdown_set_options(dd3, "a0\na1\na2\na3\na4\na5\na6\na7\na8\na9\na10\na11\na12\na13\na14\na15\na16");
- lv_dropdown_open(dd3);
- lv_dropdown_set_selected(dd3, 3);
- lv_obj_t * list = lv_dropdown_get_list(dd3);
- lv_obj_set_style_text_line_space(list, 5, 0);
- lv_obj_set_style_bg_color(list, lv_color_hex3(0xf00), LV_PART_SELECTED | LV_STATE_CHECKED);
-
-
- TEST_ASSERT_EQUAL_SCREENSHOT("dropdown_1.png");
-}
-
-void test_dropdown_render_2(void)
-{
- lv_obj_clean(lv_scr_act());
- LV_IMG_DECLARE(img_caret_down);
- lv_obj_t * dd1 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd1, "Short");
- lv_dropdown_set_options(dd1, "1\n2");
- lv_dropdown_set_symbol(dd1, &img_caret_down);
- lv_dropdown_open(dd1);
-
- lv_obj_t * dd2 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd2, "Go Up");
- lv_dropdown_set_options(dd2, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15");
- lv_dropdown_set_symbol(dd2, NULL);
- lv_obj_align(dd2, LV_ALIGN_LEFT_MID, 150, 50);
- lv_dropdown_open(dd2);
-
- lv_obj_t * dd3 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd3, "Limit Down");
- lv_dropdown_set_options(dd3, "1aaaaaaaaaaaaaaaa\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15");
- lv_obj_align(dd3, LV_ALIGN_LEFT_MID, 300, -10);
- lv_dropdown_open(dd3);
-
- lv_obj_t * dd4 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd4, "Limit Top");
- lv_dropdown_set_options(dd4, "1aaaaaaaaaaaaaaaa\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15");
- lv_obj_align(dd4, LV_ALIGN_LEFT_MID, 450, 10);
- lv_dropdown_set_dir(dd4, LV_DIR_TOP);
- lv_dropdown_set_symbol(dd4, LV_SYMBOL_UP);
- lv_dropdown_open(dd4);
-
- lv_obj_t * dd5 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd5, "Go Down");
- lv_dropdown_set_options(dd5, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15");
- lv_dropdown_set_dir(dd5, LV_DIR_TOP);
- lv_dropdown_set_symbol(dd5, LV_SYMBOL_UP);
- lv_obj_align(dd5, LV_ALIGN_LEFT_MID, 650, -200);
- lv_dropdown_open(dd5);
-
- lv_obj_t * dd6 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd6, "Right");
- lv_dropdown_set_options(dd6, "1aaa\n2aa\n3aa");
- lv_dropdown_set_dir(dd6, LV_DIR_RIGHT);
- lv_dropdown_set_symbol(dd6, LV_SYMBOL_RIGHT);
- lv_obj_align(dd6, LV_ALIGN_BOTTOM_LEFT, 20, -20);
- lv_dropdown_open(dd6);
- lv_obj_set_style_text_align(lv_dropdown_get_list(dd6), LV_TEXT_ALIGN_RIGHT, 0);
-
- lv_obj_t * dd7 = lv_dropdown_create(lv_scr_act());
- lv_dropdown_set_text(dd7, "Left");
- lv_dropdown_set_options(dd7, "1aaa\n2\n3");
- lv_dropdown_set_dir(dd7, LV_DIR_LEFT);
- lv_dropdown_set_symbol(dd7, LV_SYMBOL_LEFT);
- lv_obj_align(dd7, LV_ALIGN_BOTTOM_RIGHT, -20, -20);
- lv_dropdown_open(dd7);
-
- TEST_ASSERT_EQUAL_SCREENSHOT("dropdown_2.png");
-}
-
-/* See #2893 */
-void test_dropdown_should_list_on_top(void)
-{
- lv_obj_t * cont1 = lv_obj_create(lv_scr_act());
- lv_obj_set_size(cont1, 200, 100);
-
- lv_obj_t * dd = lv_dropdown_create(cont1);
-
- lv_obj_t * cont2 = lv_obj_create(lv_scr_act());
- lv_obj_set_size(cont2, 200, 100);
- lv_obj_set_pos(cont2, 0, 100);
-
- lv_dropdown_open(dd);
- lv_obj_t * list = lv_dropdown_get_list(dd);
- TEST_ASSERT_EQUAL_PTR(lv_scr_act(), lv_obj_get_parent(list));
- TEST_ASSERT_EQUAL_INT(2, lv_obj_get_index(list));
-}
-
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_event.c b/lib/lvgl/tests/src/test_cases/test_event.c
deleted file mode 100644
index 0ef4186..0000000
--- a/lib/lvgl/tests/src/test_cases/test_event.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-static void event_object_deletion_cb(const lv_obj_class_t * cls, lv_event_t * e)
-{
- LV_UNUSED(cls);
- if(lv_event_get_code(e) == LV_EVENT_VALUE_CHANGED) {
- lv_obj_del(lv_event_get_current_target(e));
- }
-}
-
-static const lv_obj_class_t event_object_deletion_class = {
- .event_cb = event_object_deletion_cb,
- .base_class = &lv_obj_class
-};
-
-
-/* Checks for memory leaks/invalid memory accesses on deleted objects */
-void test_event_object_deletion(void)
-{
- lv_obj_t * obj = lv_obj_class_create_obj(&event_object_deletion_class, lv_scr_act());
- lv_event_send(obj, LV_EVENT_VALUE_CHANGED, NULL);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_font_loader.c b/lib/lvgl/tests/src/test_cases/test_font_loader.c
deleted file mode 100644
index c1675bb..0000000
--- a/lib/lvgl/tests/src/test_cases/test_font_loader.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * @file test_font_loader.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#if LV_BUILD_TEST
-#include "../../lvgl.h"
-
-#include "unity/unity.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-static int compare_fonts(lv_font_t * f1, lv_font_t * f2);
-void test_font_loader(void);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-extern lv_font_t font_1;
-extern lv_font_t font_2;
-extern lv_font_t font_3;
-
-void test_font_loader(void)
-{
- /*Test with cahce ('A' has cache)*/
- lv_font_t * font_1_bin = lv_font_load("A:src/test_fonts/font_1.fnt");
- lv_font_t * font_2_bin = lv_font_load("A:src/test_fonts/font_2.fnt");
- lv_font_t * font_3_bin = lv_font_load("A:src/test_fonts/font_3.fnt");
-
- compare_fonts(&font_1, font_1_bin);
- compare_fonts(&font_2, font_2_bin);
- compare_fonts(&font_3, font_3_bin);
-
- lv_font_free(font_1_bin);
- lv_font_free(font_2_bin);
- lv_font_free(font_3_bin);
-
- /*Test with cahce ('B' has NO cache)*/
- font_1_bin = lv_font_load("B:src/test_fonts/font_1.fnt");
- font_2_bin = lv_font_load("B:src/test_fonts/font_2.fnt");
- font_3_bin = lv_font_load("B:src/test_fonts/font_3.fnt");
-
- compare_fonts(&font_1, font_1_bin);
- compare_fonts(&font_2, font_2_bin);
- compare_fonts(&font_3, font_3_bin);
-
- lv_font_free(font_1_bin);
- lv_font_free(font_2_bin);
- lv_font_free(font_3_bin);
-}
-
-static int compare_fonts(lv_font_t * f1, lv_font_t * f2)
-{
- TEST_ASSERT_NOT_NULL_MESSAGE(f1, "font not null");
- TEST_ASSERT_NOT_NULL_MESSAGE(f2, "font not null");
-
- // Skip these test because -Wpedantic tells
- // ISO C forbids passing argument 1 of ‘TEST_ASSERT_EQUAL_PTR_MESSAGE’ between function pointer and ‘void *’
- // TEST_ASSERT_EQUAL_PTR_MESSAGE(f1->get_glyph_dsc, f2->get_glyph_dsc, "glyph_dsc");
- // TEST_ASSERT_EQUAL_PTR_MESSAGE(f1->get_glyph_bitmap, f2->get_glyph_bitmap, "glyph_bitmap");
-
- TEST_ASSERT_EQUAL_INT_MESSAGE(f1->line_height, f2->line_height, "line_height");
- TEST_ASSERT_EQUAL_INT_MESSAGE(f1->base_line, f2->base_line, "base_line");
- TEST_ASSERT_EQUAL_INT_MESSAGE(f1->subpx, f2->subpx, "subpx");
- lv_font_fmt_txt_dsc_t * dsc1 = (lv_font_fmt_txt_dsc_t *)f1->dsc;
- lv_font_fmt_txt_dsc_t * dsc2 = (lv_font_fmt_txt_dsc_t *)f2->dsc;
-
- TEST_ASSERT_EQUAL_INT_MESSAGE(dsc1->kern_scale, dsc2->kern_scale, "kern_scale");
- TEST_ASSERT_EQUAL_INT_MESSAGE(dsc1->cmap_num, dsc2->cmap_num, "cmap_num");
- TEST_ASSERT_EQUAL_INT_MESSAGE(dsc1->bpp, dsc2->bpp, "bpp");
- TEST_ASSERT_EQUAL_INT_MESSAGE(dsc1->kern_classes, dsc2->kern_classes, "kern_classes");
- TEST_ASSERT_EQUAL_INT_MESSAGE(dsc1->bitmap_format, dsc2->bitmap_format, "bitmap_format");
-
- // cmaps
- int total_glyphs = 0;
- for(int i = 0; i < dsc1->cmap_num; ++i) {
- lv_font_fmt_txt_cmap_t * cmaps1 = (lv_font_fmt_txt_cmap_t *)&dsc1->cmaps[i];
- lv_font_fmt_txt_cmap_t * cmaps2 = (lv_font_fmt_txt_cmap_t *)&dsc2->cmaps[i];
-
- TEST_ASSERT_EQUAL_INT_MESSAGE(cmaps1->range_start, cmaps2->range_start, "range_start");
- TEST_ASSERT_EQUAL_INT_MESSAGE(cmaps1->range_length, cmaps2->range_length, "range_length");
- TEST_ASSERT_EQUAL_INT_MESSAGE(cmaps1->glyph_id_start, cmaps2->glyph_id_start, "glyph_id_start");
- TEST_ASSERT_EQUAL_INT_MESSAGE(cmaps1->type, cmaps2->type, "type");
- TEST_ASSERT_EQUAL_INT_MESSAGE(cmaps1->list_length, cmaps2->list_length, "list_length");
-
- if(cmaps1->unicode_list != NULL && cmaps2->unicode_list != NULL) {
- TEST_ASSERT_TRUE_MESSAGE(cmaps1->unicode_list && cmaps2->unicode_list, "unicode_list");
-
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(
- (uint8_t *)cmaps1->unicode_list,
- (uint8_t *)cmaps2->unicode_list,
- sizeof(uint16_t) * cmaps1->list_length,
- "unicode_list");
- total_glyphs += cmaps1->list_length;
- }
- else {
- total_glyphs += cmaps1->range_length;
- TEST_ASSERT_EQUAL_PTR_MESSAGE(cmaps1->unicode_list, cmaps2->unicode_list, "unicode_list");
- }
-
- if(cmaps1->glyph_id_ofs_list != NULL && cmaps2->glyph_id_ofs_list != NULL) {
- uint8_t * ids1 = (uint8_t *)cmaps1->glyph_id_ofs_list;
- uint8_t * ids2 = (uint8_t *)cmaps2->glyph_id_ofs_list;
-
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(ids1, ids2, cmaps1->list_length, "glyph_id_ofs_list");
- }
- else {
- TEST_ASSERT_EQUAL_PTR_MESSAGE(cmaps1->glyph_id_ofs_list, cmaps2->glyph_id_ofs_list, "glyph_id_ofs_list");
- }
- }
-
- // kern_dsc
- if(dsc1->kern_classes == 1 && dsc2->kern_classes == 1) {
- lv_font_fmt_txt_kern_classes_t * kern1 = (lv_font_fmt_txt_kern_classes_t *)dsc1->kern_dsc;
- lv_font_fmt_txt_kern_classes_t * kern2 = (lv_font_fmt_txt_kern_classes_t *)dsc2->kern_dsc;
- if(kern1 != NULL && kern2 != NULL) {
- TEST_ASSERT_EQUAL_INT_MESSAGE(kern1->right_class_cnt, kern2->right_class_cnt, "right_class_cnt");
- TEST_ASSERT_EQUAL_INT_MESSAGE(kern1->left_class_cnt, kern2->left_class_cnt, "left_class_cnt");
-
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(
- (uint8_t *)kern1->left_class_mapping,
- (uint8_t *)kern2->left_class_mapping,
- kern1->left_class_cnt,
- "left_class_mapping");
-
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(
- (uint8_t *)kern1->right_class_mapping,
- (uint8_t *)kern2->right_class_mapping,
- kern1->right_class_cnt,
- "right_class_mapping");
-
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(
- (uint8_t *)kern1->class_pair_values,
- (uint8_t *)kern2->class_pair_values,
- kern1->right_class_cnt * kern1->left_class_cnt,
- "class_pair_values");
- }
- else {
- TEST_ASSERT_EQUAL_PTR_MESSAGE(kern1, kern2, "kern");
- }
- }
- else if(dsc1->kern_classes == 0 && dsc2->kern_classes == 0) {
- lv_font_fmt_txt_kern_pair_t * kern1 = (lv_font_fmt_txt_kern_pair_t *)dsc1->kern_dsc;
- lv_font_fmt_txt_kern_pair_t * kern2 = (lv_font_fmt_txt_kern_pair_t *)dsc2->kern_dsc;
- if(kern1 != NULL && kern2 != NULL) {
- TEST_ASSERT_EQUAL_INT_MESSAGE(kern1->glyph_ids_size, kern2->glyph_ids_size, "glyph_ids_size");
- TEST_ASSERT_EQUAL_INT_MESSAGE(kern1->pair_cnt, kern2->pair_cnt, "pair_cnt");
-
- int ids_size;
-
- if(kern1->glyph_ids_size == 0) {
- ids_size = sizeof(int8_t) * 2 * kern1->pair_cnt;
- }
- else {
- ids_size = sizeof(int16_t) * 2 * kern1->pair_cnt;
- }
-
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(kern1->glyph_ids, kern2->glyph_ids, ids_size, "glyph_ids");
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(
- (uint8_t *) kern1->values,
- (uint8_t *) kern2->values,
- kern1->pair_cnt,
- "glyph_values");
- }
- }
-
- lv_font_fmt_txt_glyph_dsc_t * glyph_dsc1 = (lv_font_fmt_txt_glyph_dsc_t *)dsc1->glyph_dsc;
- lv_font_fmt_txt_glyph_dsc_t * glyph_dsc2 = (lv_font_fmt_txt_glyph_dsc_t *)dsc2->glyph_dsc;
-
- for(int i = 0; i < total_glyphs; ++i) {
- if(i < total_glyphs - 1) {
- int size1 = glyph_dsc1[i + 1].bitmap_index - glyph_dsc1[i].bitmap_index;
-
- if(size1 > 0) {
- TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(
- dsc1->glyph_bitmap + glyph_dsc1[i].bitmap_index,
- dsc2->glyph_bitmap + glyph_dsc2[i].bitmap_index,
- size1 - 1, "glyph_bitmap");
- }
- }
- TEST_ASSERT_EQUAL_INT_MESSAGE(glyph_dsc1[i].adv_w, glyph_dsc2[i].adv_w, "adv_w");
- TEST_ASSERT_EQUAL_INT_MESSAGE(glyph_dsc1[i].box_w, glyph_dsc2[i].box_w, "box_w");
- TEST_ASSERT_EQUAL_INT_MESSAGE(glyph_dsc1[i].box_h, glyph_dsc2[i].box_h, "box_h");
- TEST_ASSERT_EQUAL_INT_MESSAGE(glyph_dsc1[i].ofs_x, glyph_dsc2[i].ofs_x, "ofs_x");
- TEST_ASSERT_EQUAL_INT_MESSAGE(glyph_dsc1[i].ofs_y, glyph_dsc2[i].ofs_y, "ofs_y");
- }
-
- LV_LOG_INFO("No differences found!");
- return 0;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif // LV_BUILD_TEST
-
diff --git a/lib/lvgl/tests/src/test_cases/test_fs.c b/lib/lvgl/tests/src/test_cases/test_fs.c
deleted file mode 100644
index 7e31a96..0000000
--- a/lib/lvgl/tests/src/test_cases/test_fs.c
+++ /dev/null
@@ -1,53 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-
-const char * read_exp =
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sed maximus orci. Morbi massa nisi, varius eu convallis ac, venenatis at metus. In in nibh id urna pretium feugiat vitae eu libero. Ut eget fringilla eros. Nunc ullamcorper lectus mauris, vel rhoncus velit volutpat et. Phasellus sed molestie massa. Maecenas quis dui sollicitudin, vulputate nunc ut, dictum quam. Nam a congue lorem. Nulla non facilisis sapien. Ut luctus nulla nibh, sed finibus urna porta non. Duis aliquet augue id urna euismod auctor. Integer pellentesque vulputate enim non mattis. Donec finibus mattis dolor, et feugiat nisi pharetra porta. Mauris ullamcorper cursus magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.";
-
-void setUp(void)
-{
- /* Function run before every test */
-}
-
-void tearDown(void)
-{
- /* Function run after every test */
-}
-#include
-void test_read(void)
-{
- lv_fs_res_t res;
-
- /*'A' has cache*/
- lv_fs_file_t fa;
- res = lv_fs_open(&fa, "A:src/test_files/readtest.txt", LV_FS_MODE_RD);
- TEST_ASSERT_EQUAL(LV_FS_RES_OK, res);
-
- /*'B' has no cache*/
- lv_fs_file_t fb;
- res = lv_fs_open(&fb, "B:src/test_files/readtest.txt", LV_FS_MODE_RD);
- TEST_ASSERT_EQUAL(LV_FS_RES_OK, res);
-
- /*Use an odd size to make sure it's not aligned with the drivier's'cache size*/
- uint8_t buf[79];
- uint32_t cnt = 0;
- uint32_t br = 1;
- while(br) {
- res = lv_fs_read(&fa, buf, sizeof(buf), &br);
- TEST_ASSERT_EQUAL(LV_FS_RES_OK, res);
- TEST_ASSERT_TRUE(memcmp(buf, read_exp + cnt, br) == 0);
-
- res = lv_fs_read(&fb, buf, sizeof(buf), &br);
- TEST_ASSERT_EQUAL(LV_FS_RES_OK, res);
- TEST_ASSERT_TRUE(memcmp(buf, read_exp + cnt, br) == 0);
- cnt += br;
- }
-
- lv_fs_close(&fa);
- lv_fs_close(&fb);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_line.c b/lib/lvgl/tests/src/test_cases/test_line.c
deleted file mode 100644
index e2f781d..0000000
--- a/lib/lvgl/tests/src/test_cases/test_line.c
+++ /dev/null
@@ -1,95 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-static lv_obj_t * active_screen = NULL;
-static lv_obj_t * line = NULL;
-
-static const uint16_t default_point_num = 0U;
-static const lv_coord_t initial_extra_draw_size = 5U;
-static const lv_coord_t final_extra_draw_size = 10U;
-
-void setUp(void)
-{
- active_screen = lv_scr_act();
- line = lv_line_create(active_screen);
-}
-
-void tearDown(void)
-{
- lv_obj_clean(active_screen);
-}
-
-void test_line_should_have_valid_documented_default_values(void)
-{
- lv_line_t * line_ptr = (lv_line_t *) line;
- TEST_ASSERT_EQUAL_UINT16(default_point_num, line_ptr->point_num);
- TEST_ASSERT_NULL(line_ptr->point_array);
- TEST_ASSERT_FALSE(lv_line_get_y_invert(line));
- TEST_ASSERT_FALSE(lv_obj_has_flag(line, LV_OBJ_FLAG_CLICKABLE));
- /* line doesn't have any points, so it's 0,0 in size */
- TEST_ASSERT_EQUAL_UINT16(0U, lv_obj_get_self_width(line));
- TEST_ASSERT_EQUAL_UINT16(0U, lv_obj_get_self_height(line));
-}
-
-void test_line_should_return_valid_y_invert(void)
-{
- lv_line_set_y_invert(line, true);
- TEST_ASSERT_TRUE(lv_line_get_y_invert(line));
-}
-
-void test_line_size_should_be_updated_after_adding_points(void)
-{
- static lv_point_t points[] = { {5, 5} };
- uint16_t point_cnt = (uint16_t) sizeof(points) / sizeof(lv_point_t);
- lv_line_set_points(line, points, point_cnt);
-
- lv_coord_t calculated_width = 0;
- lv_coord_t calculated_height = 0;
-
- /* Get the biggest coordinate on both axis */
- uint16_t point_idx = 0;
- for(point_idx = 0; point_idx < point_cnt; point_idx++) {
- calculated_width = LV_MAX(points[point_idx].x, calculated_width);
- calculated_height = LV_MAX(points[point_idx].y, calculated_height);
- }
- /* Add style line width */
- lv_coord_t line_width = lv_obj_get_style_line_width(line, LV_PART_MAIN);
- calculated_width += line_width;
- calculated_height += line_width;
-
- TEST_ASSERT_EQUAL_UINT16(calculated_width, lv_obj_get_self_width(line));
- TEST_ASSERT_EQUAL_UINT16(calculated_height, lv_obj_get_self_height(line));
-}
-
-static void line_event_cb(lv_event_t * e)
-{
- lv_event_code_t code = lv_event_get_code(e);
-
- if(code == LV_EVENT_REFR_EXT_DRAW_SIZE) {
- /* Set the new line extra draw size */
- lv_event_set_ext_draw_size(e, initial_extra_draw_size);
- }
-}
-
-void test_line_should_update_extra_draw_size_based_on_style(void)
-{
- /* Setup an event handler for line extra draw size event */
- lv_obj_add_event_cb(line, line_event_cb, LV_EVENT_ALL, NULL);
- /* Trigger the extra draw size event */
- lv_obj_refresh_ext_draw_size(line);
-
- TEST_ASSERT_EQUAL(initial_extra_draw_size, _lv_obj_get_ext_draw_size(line));
-
- /* Update line width style, the event handler should set the extra draw size
- * to the line width */
- lv_obj_set_style_line_width(line, final_extra_draw_size, LV_PART_MAIN);
-
- /* Trigger the extra draw size event */
- lv_obj_refresh_ext_draw_size(line);
-
- TEST_ASSERT_EQUAL(final_extra_draw_size, _lv_obj_get_ext_draw_size(line));
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_obj_tree.c b/lib/lvgl/tests/src/test_cases/test_obj_tree.c
deleted file mode 100644
index 73bdb0f..0000000
--- a/lib/lvgl/tests/src/test_cases/test_obj_tree.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-void test_obj_tree_1(void);
-void test_obj_tree_2(void);
-
-void test_obj_tree_1(void)
-{
- TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 0);
-}
-
-void test_obj_tree_2(void)
-{
-
- lv_obj_create(lv_scr_act());
- lv_obj_t * o2 = lv_obj_create(lv_scr_act());
- lv_obj_create(lv_scr_act());
- TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 3);
-
- lv_obj_del(o2);
- TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 2);
-
- lv_obj_clean(lv_scr_act());
- TEST_ASSERT_EQUAL(lv_obj_get_child_cnt(lv_scr_act()), 0);
-
- lv_color_t c1 = lv_color_hex(0x444444);
- lv_color_t c2 = lv_color_hex3(0x444);
- TEST_ASSERT_EQUAL_COLOR(c1, c2);
-
- lv_obj_remove_style_all(lv_scr_act());
- lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x112233), 0);
- lv_obj_set_style_bg_opa(lv_scr_act(), LV_OPA_COVER, 0);
-
- //TEST_ASSERT_EQUAL_SCREENSHOT("scr1.png")
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_slider.c b/lib/lvgl/tests/src/test_cases/test_slider.c
deleted file mode 100644
index 2fe8824..0000000
--- a/lib/lvgl/tests/src/test_cases/test_slider.c
+++ /dev/null
@@ -1,214 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-#include "lv_test_indev.h"
-
-static lv_obj_t * active_screen = NULL;
-static lv_obj_t * slider = NULL;
-static lv_obj_t * sliderRangeMode = NULL;
-static lv_obj_t * sliderNormalMode = NULL;
-static lv_obj_t * sliderSymmetricalMode = NULL;
-static lv_group_t * g = NULL;
-
-void setUp(void)
-{
- active_screen = lv_scr_act();
- slider = lv_slider_create(active_screen);
- sliderRangeMode = lv_slider_create(active_screen);
- sliderNormalMode = lv_slider_create(active_screen);
- sliderSymmetricalMode = lv_slider_create(active_screen);
-
- lv_slider_set_mode(sliderRangeMode, LV_SLIDER_MODE_RANGE);
- lv_slider_set_mode(sliderNormalMode, LV_SLIDER_MODE_NORMAL);
- lv_slider_set_mode(sliderSymmetricalMode, LV_SLIDER_MODE_SYMMETRICAL);
-
- g = lv_group_create();
- lv_indev_set_group(lv_test_encoder_indev, g);
-}
-
-void tearDown(void)
-{
- lv_obj_clean(active_screen);
-}
-
-void test_textarea_should_have_valid_documented_default_values(void)
-{
- lv_coord_t objw = lv_obj_get_width(slider);
- lv_coord_t objh = lv_obj_get_height(slider);
-
- /* Horizontal slider */
- TEST_ASSERT_TRUE(objw >= objh);
- TEST_ASSERT_FALSE(lv_obj_has_flag(slider, LV_OBJ_FLAG_SCROLL_CHAIN));
- TEST_ASSERT_FALSE(lv_obj_has_flag(slider, LV_OBJ_FLAG_SCROLLABLE));
-}
-
-void test_slider_event_keys_right_and_up_increment_value_by_one(void)
-{
- char key = LV_KEY_RIGHT;
- lv_slider_set_value(slider, 10, LV_ANIM_OFF);
- int32_t value = lv_slider_get_value(slider);
-
- lv_event_send(slider, LV_EVENT_KEY, (void *) &key);
-
- int32_t new_value = lv_slider_get_value(slider);
- TEST_ASSERT_EQUAL_INT32(value + 1, new_value);
-
- key = LV_KEY_UP;
- lv_event_send(slider, LV_EVENT_KEY, (void *) &key);
- TEST_ASSERT_EQUAL_INT32(new_value + 1, lv_slider_get_value(slider));
-}
-
-void test_slider_event_keys_left_and_down_decrement_value_by_one(void)
-{
- char key = LV_KEY_LEFT;
- lv_slider_set_value(slider, 10, LV_ANIM_OFF);
- int32_t value = lv_slider_get_value(slider);
-
- lv_event_send(slider, LV_EVENT_KEY, (void *) &key);
-
- int32_t new_value = lv_slider_get_value(slider);
- TEST_ASSERT_EQUAL_INT32(value - 1, new_value);
-
- key = LV_KEY_DOWN;
- lv_event_send(slider, LV_EVENT_KEY, (void *) &key);
- TEST_ASSERT_EQUAL_INT32(new_value - 1, lv_slider_get_value(slider));
-}
-
-void test_slider_event_invalid_key_should_not_change_values(void)
-{
- char key = LV_KEY_ENTER;
- lv_slider_set_value(slider, 10, LV_ANIM_OFF);
- int32_t value = lv_slider_get_value(slider);
-
- lv_event_send(slider, LV_EVENT_KEY, (void *) &key);
-
- TEST_ASSERT_EQUAL_INT32(value, lv_slider_get_value(slider));
-}
-
-void test_slider_range_mode_should_leave_edit_mode_if_released(void)
-{
- lv_slider_t * ptr = (lv_slider_t *) sliderRangeMode;
-
- /* Setup group and encoder indev */
- lv_group_add_obj(g, sliderNormalMode);
- lv_group_set_editing(g, true);
-
- lv_test_encoder_click();
-
- /* Always executed when handling LV_EVENT_RELEASED or
- * LV_EVENT_PRESS_LOST */
- TEST_ASSERT_FALSE(ptr->dragging);
- TEST_ASSERT_NULL(ptr->value_to_set);
- TEST_ASSERT_EQUAL(0U, ptr->left_knob_focus);
-
- /* Group leaved edit mode */
- TEST_ASSERT_FALSE(lv_group_get_editing(g));
-}
-
-void test_slider_range_mode_should_not_leave_edit_mode_if_released_with_no_left_knob_focus(void)
-{
- lv_slider_t * ptr = (lv_slider_t *) sliderRangeMode;
-
- /* Setup group and encoder indev */
- lv_group_add_obj(g, sliderRangeMode);
- lv_group_set_editing(g, true);
-
- lv_test_encoder_release();
- lv_test_indev_wait(50);
-
- /* Always executed when handling LV_EVENT_RELEASED or
- * LV_EVENT_PRESS_LOST */
- TEST_ASSERT_FALSE(ptr->dragging);
- TEST_ASSERT_NULL(ptr->value_to_set);
-
- TEST_ASSERT(lv_group_get_editing(g));
-}
-
-void test_slider_normal_mode_should_leave_edit_mode_if_released(void)
-{
- lv_slider_t * ptr = (lv_slider_t *) sliderNormalMode;
- ptr->left_knob_focus = 1;
-
- /* Setup group and encoder indev */
- lv_group_add_obj(g, sliderNormalMode);
- lv_group_set_editing(g, true);
-
- lv_test_encoder_click();
-
- /* Always executed when handling LV_EVENT_RELEASED or
- * LV_EVENT_PRESS_LOST */
- TEST_ASSERT_FALSE(ptr->dragging);
- TEST_ASSERT_NULL(ptr->value_to_set);
- TEST_ASSERT_EQUAL(0U, ptr->left_knob_focus);
-
- /* Group leaved edit mode */
- TEST_ASSERT_FALSE(lv_group_get_editing(g));
-}
-
-void test_ranged_mode_adjust_with_encoder(void)
-{
- lv_slider_set_value(sliderRangeMode, 90, LV_ANIM_OFF);
- lv_slider_set_left_value(sliderRangeMode, 10, LV_ANIM_OFF);
-
- /* Setup group and encoder indev */
- lv_group_add_obj(g, sliderRangeMode);
- lv_group_set_editing(g, false);
-
- /*Go the edit mode*/
- lv_test_encoder_click();
-
- /*Adjust the right knob*/
- lv_test_encoder_turn(-10);
- TEST_ASSERT_EQUAL(80, lv_slider_get_value(sliderRangeMode)); /*Updated?*/
- TEST_ASSERT_EQUAL(10, lv_slider_get_left_value(sliderRangeMode)); /*Maintained?*/
-
- /*Focus the left knob*/
- lv_test_encoder_click();
-
- /*Adjust the left knob*/
- lv_test_encoder_turn(5);
- TEST_ASSERT_EQUAL(80, lv_slider_get_value(sliderRangeMode)); /*Maintained?*/
- TEST_ASSERT_EQUAL(15, lv_slider_get_left_value(sliderRangeMode)); /*Updated?*/
-
-}
-
-void test_normal_mode_slider_hit_test(void)
-{
- /* Validate if point 0,0 can click in the slider */
- lv_point_t point = {
- .x = 0,
- .y = 0
- };
-
- lv_hit_test_info_t info = {
- .res = false,
- .point = &point
- };
-
- lv_slider_set_value(sliderNormalMode, 100, LV_ANIM_OFF);
- lv_event_send(sliderNormalMode, LV_EVENT_HIT_TEST, (void *) &info);
-
- /* point can click slider */
- TEST_ASSERT(info.res);
-}
-
-void test_slider_range_event_hit_test(void)
-{
- /* Validate if point 0,0 can click in the slider */
- lv_point_t point = {
- .x = 0,
- .y = 0
- };
-
- lv_hit_test_info_t info = {
- .res = false,
- .point = &point
- };
- lv_event_send(sliderRangeMode, LV_EVENT_HIT_TEST, (void *) &info);
-
- /* point can click slider in the left knob */
- TEST_ASSERT(info.res);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_snapshot.c b/lib/lvgl/tests/src/test_cases/test_snapshot.c
deleted file mode 100644
index 0c87b31..0000000
--- a/lib/lvgl/tests/src/test_cases/test_snapshot.c
+++ /dev/null
@@ -1,47 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#if LV_USE_SNAPSHOT
-
-#include "unity/unity.h"
-
-
-#define NUM_SNAPSHOTS 1
-
-void test_snapshot_should_not_leak_memory(void)
-{
- uint32_t idx = 0;
- uint32_t initial_available_memory = 0;
- uint32_t final_available_memory = 0;
- lv_mem_monitor_t monitor;
-
- lv_img_dsc_t * snapshots[NUM_SNAPSHOTS] = {NULL};
-
- lv_mem_monitor(&monitor);
- initial_available_memory = monitor.free_size;
-
- for(idx = 0; idx < NUM_SNAPSHOTS; idx++) {
- snapshots[idx] = lv_snapshot_take(lv_scr_act(), LV_IMG_CF_TRUE_COLOR_ALPHA);
- TEST_ASSERT_NOT_NULL(snapshots[idx]);
- }
-
- for(idx = 0; idx < NUM_SNAPSHOTS; idx++) {
- lv_snapshot_free(snapshots[idx]);
- }
-
- lv_mem_monitor(&monitor);
- final_available_memory = monitor.free_size;
-
- TEST_ASSERT_EQUAL(initial_available_memory, final_available_memory);
-}
-
-#else /*LV_USE_SNAPSHOT*/
-
-void test_snapshot_should_not_leak_memory(void)
-{
-
-}
-
-#endif
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_style.c b/lib/lvgl/tests/src/test_cases/test_style.c
deleted file mode 100644
index c9ece0d..0000000
--- a/lib/lvgl/tests/src/test_cases/test_style.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-#include
-
-static void obj_set_height_helper(void * obj, int32_t height)
-{
- lv_obj_set_height((lv_obj_t *)obj, (lv_coord_t)height);
-}
-
-void test_gradient_vertical_misalignment(void)
-{
- lv_obj_t * obj = lv_obj_create(lv_scr_act());
- lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0);
- lv_obj_set_style_bg_grad_color(obj, lv_color_hex(0xff0000), 0);
- lv_obj_set_style_bg_color(obj, lv_color_hex(0x00ff00), 0);
-
- lv_obj_set_size(obj, 300, 100);
-
- lv_refr_now(NULL);
- lv_obj_set_style_bg_grad_color(obj, lv_color_hex(0xffff00), 0);
- lv_obj_set_style_bg_color(obj, lv_color_hex(0x00ffff), 0);
-
- lv_anim_t a;
- lv_anim_init(&a);
- lv_anim_set_var(&a, obj);
- lv_anim_set_exec_cb(&a, obj_set_height_helper);
- lv_anim_set_time(&a, 3000);
- lv_anim_set_playback_time(&a, 3000);
- lv_anim_set_repeat_count(&a, 100);
- lv_anim_set_values(&a, 0, 300);
- lv_anim_start(&a);
-
- uint32_t i;
- for(i = 0; i < 1000; i++) {
- lv_timer_handler();
- lv_tick_inc(100);
- usleep(1000);
- }
-}
-
-void test_custom_prop_ids(void)
-{
- uint8_t fake_flag = 0;
- uint32_t initial_custom_props = lv_style_get_num_custom_props();
- uint32_t max_props_to_register = 64;
- for(uint32_t i = 0; i < max_props_to_register; i++) {
- lv_style_prop_t prop = lv_style_register_prop(fake_flag);
- /* Should have a higher index than the last built-in prop */
- TEST_ASSERT_GREATER_THAN(_LV_STYLE_LAST_BUILT_IN_PROP, prop);
- if(i == 0) {
- /* Should be equal to the first expected index of a custom prop */
- TEST_ASSERT_EQUAL(_LV_STYLE_NUM_BUILT_IN_PROPS + initial_custom_props, prop);
- }
- /*We should find our flags*/
- TEST_ASSERT_EQUAL(fake_flag, _lv_style_prop_lookup_flags(prop));
- if(fake_flag == 0xff)
- fake_flag = 0;
- else
- fake_flag++;
- }
- TEST_ASSERT_EQUAL(initial_custom_props + max_props_to_register, lv_style_get_num_custom_props());
- /*
- * Check that the resizing algorithm works correctly, given that 64 props
- * were registered + whatever's built-in. A failure here may just indicate
- * that LVGL registers more built-in properties now and this needs adjustment.
- */
- extern uint32_t _lv_style_custom_prop_flag_lookup_table_size;
- TEST_ASSERT_EQUAL(_lv_style_custom_prop_flag_lookup_table_size, 96);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_switch.c b/lib/lvgl/tests/src/test_cases/test_switch.c
deleted file mode 100644
index cfb4a1c..0000000
--- a/lib/lvgl/tests/src/test_cases/test_switch.c
+++ /dev/null
@@ -1,140 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-#include "lv_test_helpers.h"
-#include "lv_test_indev.h"
-
-#define SWITCHES_CNT 10
-
-uint8_t value_changed_event_cnt = 0;
-lv_obj_t * scr = NULL;
-lv_obj_t * sw = NULL;
-
-void setUp(void)
-{
- /* Function run before every test */
- scr = lv_scr_act();
- sw = lv_switch_create(scr);
-}
-
-void tearDown(void)
-{
- /* Function run after every test */
- value_changed_event_cnt = 0;
-}
-
-static void mouse_click_on_switch(void)
-{
- lv_test_mouse_click_at(sw->coords.x1, sw->coords.y1);
-}
-
-static void event_handler(lv_event_t * e)
-{
- lv_event_code_t event = lv_event_get_code(e);
-
- if(LV_EVENT_VALUE_CHANGED == event) {
- value_changed_event_cnt++;
- }
-
-}
-
-void test_switch_should_have_default_state_after_being_created(void)
-{
- lv_state_t state = lv_obj_get_state(sw);
- TEST_ASSERT_EQUAL(state, LV_STATE_DEFAULT);
-}
-
-void test_switch_should_not_leak_memory_after_deletion(void)
-{
- size_t idx = 0;
- uint32_t initial_available_memory = 0;
- uint32_t final_available_memory = 0;
- lv_mem_monitor_t monitor;
- lv_obj_t * switches[SWITCHES_CNT] = {NULL};
-
- lv_mem_monitor(&monitor);
- initial_available_memory = monitor.free_size;
-
- for(idx = 0; idx < SWITCHES_CNT; idx++) {
- switches[idx] = lv_switch_create(scr);
- }
-
- for(idx = 0; idx < SWITCHES_CNT; idx++) {
- lv_obj_del(switches[idx]);
- }
-
- lv_mem_monitor(&monitor);
- final_available_memory = monitor.free_size;
-
- LV_HEAP_CHECK(TEST_ASSERT_LESS_OR_EQUAL(initial_available_memory, final_available_memory));
-}
-
-void test_switch_animation(void)
-{
- lv_switch_t * anim_sw = (lv_switch_t *) sw;
- int32_t initial_anim_state = anim_sw->anim_state;
-
- /* Trigger animation */
- mouse_click_on_switch();
- /* Wait some time */
- lv_test_indev_wait(50);
-
- int32_t checked_anim_state = anim_sw->anim_state;
- TEST_ASSERT_GREATER_THAN(initial_anim_state, checked_anim_state);
- TEST_ASSERT(lv_obj_has_state(sw, LV_STATE_CHECKED));
-
- mouse_click_on_switch();
- lv_test_indev_wait(50);
-
- TEST_ASSERT_LESS_THAN(checked_anim_state, anim_sw->anim_state);
- TEST_ASSERT_FALSE(lv_obj_has_state(sw, LV_STATE_CHECKED));
-}
-
-void test_switch_should_not_have_extra_draw_size_at_creation(void)
-{
- lv_coord_t extra_size = _lv_obj_get_ext_draw_size(sw);
-
- TEST_ASSERT_EQUAL(0, extra_size);
-}
-
-void test_switch_should_update_extra_draw_size_after_editing_padding(void)
-{
- lv_coord_t pad = 6;
- lv_coord_t actual = 0;
- lv_coord_t expected = pad + _LV_SWITCH_KNOB_EXT_AREA_CORRECTION;
-
- static lv_style_t style_knob;
- lv_style_init(&style_knob);
- lv_style_set_pad_all(&style_knob, pad);
-
- lv_obj_remove_style_all(sw);
- lv_obj_add_style(sw, &style_knob, LV_PART_KNOB);
- lv_obj_center(sw);
-
- /* Get extra draw size */
- actual = _lv_obj_get_ext_draw_size(sw);
-
- TEST_ASSERT_EQUAL(expected, actual);
-}
-
-/* See #2330 for context */
-void test_switch_should_trigger_value_changed_event_only_once(void)
-{
- lv_obj_add_event_cb(sw, event_handler, LV_EVENT_ALL, NULL);
- mouse_click_on_switch();
-
- TEST_ASSERT_EQUAL(1, value_changed_event_cnt);
-}
-
-/* See #2785 for context */
-void test_switch_should_state_change_when_event_bubbling_is_enabled(void)
-{
- lv_obj_add_flag(sw, LV_OBJ_FLAG_EVENT_BUBBLE);
- mouse_click_on_switch();
-
- TEST_ASSERT(lv_obj_has_state(sw, LV_STATE_CHECKED));
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_table.c b/lib/lvgl/tests/src/test_cases/test_table.c
deleted file mode 100644
index f563718..0000000
--- a/lib/lvgl/tests/src/test_cases/test_table.c
+++ /dev/null
@@ -1,247 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-static lv_obj_t * scr = NULL;
-static lv_obj_t * table = NULL;
-
-void setUp(void)
-{
- scr = lv_scr_act();
- table = lv_table_create(scr);
-}
-
-void tearDown(void)
-{
- lv_obj_clean(lv_scr_act());
-}
-
-void test_table_should_return_assigned_cell_value(void)
-{
- uint16_t row = 0;
- uint16_t column = 0;
- const char * value = "LVGL";
-
- lv_table_set_cell_value(table, row, column, value);
-
- TEST_ASSERT_EQUAL_STRING(value, lv_table_get_cell_value(table, row, column));
-}
-
-void test_table_should_grow_columns_automatically_when_setting_formatted_cell_value(void)
-{
- /* Newly created tables have 1 column and 1 row */
- uint16_t original_column_count = lv_table_get_col_cnt(table);
- TEST_ASSERT_EQUAL_UINT16(1, original_column_count);
-
- /* Table currently only has a cell at 0,0 (row, colum) */
- lv_table_set_cell_value_fmt(table, 0, 1, "LVGL %s", "Rocks!");
-
- /* Table now should have cells at 0,0 and 0,1, so 2 columns */
- uint16_t expected_column_count = original_column_count + 1;
- TEST_ASSERT_EQUAL_UINT16(expected_column_count, lv_table_get_col_cnt(table));
-}
-
-void test_table_should_identify_cell_with_ctrl(void)
-{
- bool has_ctrl = false;
-
- has_ctrl = lv_table_has_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
-
- TEST_ASSERT_FALSE(has_ctrl);
-
- lv_table_add_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- has_ctrl = lv_table_has_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- TEST_ASSERT_TRUE(has_ctrl);
-}
-
-void test_table_should_clear_selected_cell_ctrl(void)
-{
- bool has_ctrl = false;
-
- lv_table_add_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- has_ctrl = lv_table_has_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- TEST_ASSERT_TRUE(has_ctrl);
-
- lv_table_clear_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- has_ctrl = lv_table_has_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- TEST_ASSERT_FALSE(has_ctrl);
-}
-
-void test_table_should_keep_not_selected_cell_ctrl(void)
-{
- bool has_ctrl = false;
-
- lv_table_add_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT | LV_TABLE_CELL_CTRL_TEXT_CROP);
-
- lv_table_clear_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- has_ctrl = lv_table_has_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- TEST_ASSERT_FALSE(has_ctrl);
-
- has_ctrl = lv_table_has_cell_ctrl(table, 0, 0, LV_TABLE_CELL_CTRL_TEXT_CROP);
- TEST_ASSERT_TRUE(has_ctrl);
-}
-
-/* We're using a newly created table */
-void test_table_cell_value_should_return_empty_string_when_cell_is_empty(void)
-{
- TEST_ASSERT_EQUAL_STRING("", lv_table_get_cell_value(table, 0, 0));
-}
-
-void test_table_row_height_should_increase_with_multiline_cell_value(void)
-{
- lv_table_t * table_ptr = (lv_table_t *) table;
- const char * singleline_value = "LVGL";
- const char * multiline_value = "LVGL\nRocks";
-
- lv_table_set_cell_value(table, 0, 0, singleline_value);
- lv_coord_t singleline_row_height = table_ptr->row_h[0];
-
- lv_table_set_cell_value(table, 0, 0, multiline_value);
- lv_coord_t multiline_row_height = table_ptr->row_h[0];
-
- TEST_ASSERT_GREATER_THAN(singleline_row_height, multiline_row_height);
-}
-
-void test_table_should_wrap_long_texts(void)
-{
- lv_table_t * table_ptr = (lv_table_t *) table;
- const char * long_text = "Testing automatic text wrap with a very long text";
- const char * small_text = "Hi";
-
- lv_table_set_col_width(table, 0, 50);
-
- lv_table_set_cell_value(table, 0, 0, small_text);
- lv_coord_t row_height = table_ptr->row_h[0];
-
- lv_table_set_cell_value(table, 0, 0, long_text);
- lv_coord_t wrapped_row_height = table_ptr->row_h[0];
-
- /* Row height on cells with wrapped text is bigger than cells with small texts */
- TEST_ASSERT_GREATER_THAN(row_height, wrapped_row_height);
-}
-
-static void draw_part_event_cb(lv_event_t * e)
-{
- lv_obj_t * obj = lv_event_get_target(e);
- lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
- /*If the cells are drawn...*/
- if(dsc->part == LV_PART_ITEMS) {
- uint32_t row = dsc->id / lv_table_get_col_cnt(obj);
- uint32_t col = dsc->id - row * lv_table_get_col_cnt(obj);
-
- /*Make the texts in the first cell center aligned*/
- if(row == 0) {
- dsc->label_dsc->align = LV_TEXT_ALIGN_CENTER;
- dsc->rect_dsc->bg_color = lv_color_mix(lv_palette_main(LV_PALETTE_BLUE), dsc->rect_dsc->bg_color, LV_OPA_40);
- dsc->rect_dsc->bg_opa = LV_OPA_COVER;
- }
- /*In the first column align the texts to the right*/
- else if(col == 0) {
- dsc->label_dsc->align = LV_TEXT_ALIGN_RIGHT;
- }
-
- /*Make every 2nd row grayish*/
- if(row != 0 && (row % 2 == 0)) {
- dsc->rect_dsc->bg_color = lv_color_mix(lv_palette_main(LV_PALETTE_RED), dsc->rect_dsc->bg_color, LV_OPA_30);
- dsc->rect_dsc->bg_opa = LV_OPA_COVER;
- }
- }
-}
-
-void test_table_rendering(void)
-{
- lv_obj_center(table);
- lv_obj_add_event_cb(table, draw_part_event_cb, LV_EVENT_DRAW_PART_BEGIN, NULL);
- lv_obj_set_style_border_side(table, LV_BORDER_SIDE_FULL, LV_PART_ITEMS);
- lv_obj_set_style_pad_all(table, 10, LV_PART_ITEMS);
- lv_obj_set_style_border_width(table, 5, LV_PART_ITEMS);
- lv_table_set_col_cnt(table, 5);
- lv_table_set_row_cnt(table, 5);
- lv_table_set_col_width(table, 1, 60);
- lv_table_set_col_width(table, 2, 100);
-
- lv_table_add_cell_ctrl(table, 0, 1, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- lv_table_set_cell_value(table, 0, 1, "2 cells are merged");
-
- lv_table_add_cell_ctrl(table, 1, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- lv_table_add_cell_ctrl(table, 1, 1, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- lv_table_add_cell_ctrl(table, 1, 2, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- lv_table_add_cell_ctrl(table, 1, 3, LV_TABLE_CELL_CTRL_MERGE_RIGHT);
- lv_table_set_cell_value(table, 1, 0, "5 cells are merged");
-
- uint32_t i;
- for(i = 0; i < 5; i++) {
- lv_table_set_cell_value_fmt(table, 3, i, "%d", i);
- }
-
- lv_table_set_cell_value_fmt(table, 2, 3, "Multi\nline text");
- lv_table_set_cell_value_fmt(table, 2, 4, "Very long text wrapped automatically");
-
- lv_table_add_cell_ctrl(table, 4, 3, LV_TABLE_CELL_CTRL_TEXT_CROP);
- lv_table_set_cell_value_fmt(table, 4, 3, "crop crop crop crop crop crop crop crop ");
-
- TEST_ASSERT_EQUAL_SCREENSHOT("table_1.png");
-}
-
-/* See #3120 for context */
-void test_table_should_reduce_cells(void)
-{
- const uint16_t initial_col_num = 8;
- const uint16_t initial_row_num = 1;
- const uint16_t final_col_num = 4;
- const uint16_t final_row_num = 1;
-
- lv_obj_center(table);
-
- lv_table_set_col_cnt(table, initial_col_num);
- lv_table_set_row_cnt(table, initial_row_num);
-
- uint32_t row_idx, col_idx;
- for(row_idx = 0; row_idx < initial_row_num; row_idx++) {
- for(col_idx = 0; col_idx < initial_col_num; col_idx++) {
- lv_table_set_cell_value(table, row_idx, col_idx, "00");
- }
- }
-
- lv_table_set_col_cnt(table, final_col_num);
- lv_table_set_row_cnt(table, final_row_num);
-
- for(row_idx = 0; row_idx < final_row_num; row_idx++) {
- for(col_idx = 0; col_idx < final_col_num; col_idx++) {
- lv_table_set_cell_value(table, row_idx, col_idx, "00");
- }
- }
-}
-
-/* See #3120 for context */
-void test_table_should_reduce_cells_with_more_than_one_row(void)
-{
- const uint16_t initial_col_num = 8;
- const uint16_t initial_row_num = 2;
- const uint16_t final_col_num = 4;
- const uint16_t final_row_num = 1;
-
- lv_obj_center(table);
-
- lv_table_set_col_cnt(table, initial_col_num);
- lv_table_set_row_cnt(table, initial_row_num);
-
- uint32_t row_idx, col_idx;
- for(row_idx = 0; row_idx < initial_row_num; row_idx++) {
- for(col_idx = 0; col_idx < initial_col_num; col_idx++) {
- lv_table_set_cell_value(table, row_idx, col_idx, "00");
- }
- }
-
- lv_table_set_col_cnt(table, final_col_num);
- lv_table_set_row_cnt(table, final_row_num);
-
- for(row_idx = 0; row_idx < final_row_num; row_idx++) {
- for(col_idx = 0; col_idx < final_col_num; col_idx++) {
- lv_table_set_cell_value(table, row_idx, col_idx, "00");
- }
- }
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_textarea.c b/lib/lvgl/tests/src/test_cases/test_textarea.c
deleted file mode 100644
index 99a14d8..0000000
--- a/lib/lvgl/tests/src/test_cases/test_textarea.c
+++ /dev/null
@@ -1,107 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-static lv_obj_t * active_screen = NULL;
-static lv_obj_t * textarea = NULL;
-
-static const char * textarea_default_text = "";
-
-void setUp(void)
-{
- active_screen = lv_scr_act();
- textarea = lv_textarea_create(active_screen);
-}
-
-void tearDown(void)
-{
- /* Function run after every test */
-}
-
-void test_textarea_should_have_valid_documented_defualt_values(void)
-{
- TEST_ASSERT(lv_textarea_get_cursor_click_pos(textarea));
- TEST_ASSERT_EQUAL(0U, lv_textarea_get_one_line(textarea));
- /* No placeholder text should be set on widget creation */
- TEST_ASSERT_EQUAL_STRING(textarea_default_text, lv_textarea_get_placeholder_text(textarea));
- TEST_ASSERT_EQUAL_STRING(textarea_default_text, lv_textarea_get_text(textarea));
-}
-
-/* When in password mode the lv_textarea_get_text function returns
- * the actual text, not the bullet characters. */
-void test_textarea_should_return_actual_text_when_password_mode_is_enabled(void)
-{
- const char * text = "Hello LVGL!";
-
- lv_textarea_add_text(textarea, text);
- lv_textarea_set_password_mode(textarea, true);
-
- TEST_ASSERT_TRUE(lv_textarea_get_password_mode(textarea));
- TEST_ASSERT_EQUAL_STRING(text, lv_textarea_get_text(textarea));
-}
-
-void test_textarea_should_update_label_style_with_one_line_enabled(void)
-{
- lv_textarea_t * txt_ptr = (lv_textarea_t *) textarea;
-
- lv_textarea_add_text(textarea, "Hi");
- lv_textarea_set_one_line(textarea, true);
-
- lv_coord_t left_padding = lv_obj_get_style_pad_left(txt_ptr->label, LV_PART_MAIN);
- lv_coord_t right_padding = lv_obj_get_style_pad_right(txt_ptr->label, LV_PART_MAIN);
- lv_coord_t line_width = lv_obj_get_width(txt_ptr->label);
- lv_coord_t expected_size = left_padding + right_padding + line_width;
-
- TEST_ASSERT(lv_textarea_get_one_line(textarea));
- TEST_ASSERT_EQUAL_UINT16(expected_size, lv_obj_get_width(txt_ptr->label));
- TEST_ASSERT_EQUAL_UINT16(lv_pct(100), lv_obj_get_style_min_width(txt_ptr->label, LV_PART_MAIN));
-}
-
-void test_textarea_cursor_click_pos_field_update(void)
-{
- lv_textarea_set_cursor_click_pos(textarea, false);
-
- TEST_ASSERT_FALSE(lv_textarea_get_cursor_click_pos(textarea));
-}
-
-void test_textarea_should_update_placeholder_text(void)
-{
- const char * new_placeholder = "LVGL Rocks!!!!!";
- const char * text = "Hello LVGL!";
-
- /* Allocating memory for placeholder text */
- lv_textarea_set_placeholder_text(textarea, text);
- TEST_ASSERT_EQUAL_STRING(text, lv_textarea_get_placeholder_text(textarea));
-
- /* Reallocating memory for the new placeholder text */
- lv_textarea_set_placeholder_text(textarea, new_placeholder);
- TEST_ASSERT_EQUAL_STRING(new_placeholder, lv_textarea_get_placeholder_text(textarea));
-
- /* Freeing allocated memory for placeholder text */
- lv_textarea_set_placeholder_text(textarea, "");
- TEST_ASSERT_EQUAL_STRING("", lv_textarea_get_placeholder_text(textarea));
-}
-
-void test_textarea_should_keep_only_accepted_chars(void)
-{
- const char * accepted_list = "abcd";
-
- lv_textarea_set_accepted_chars(textarea, accepted_list);
- lv_textarea_set_text(textarea, "abcde");
-
- TEST_ASSERT_EQUAL_STRING(accepted_list, lv_textarea_get_text(textarea));
-}
-
-void test_textarea_in_one_line_mode_should_ignore_line_break_characters(void)
-{
- lv_textarea_set_one_line(textarea, true);
-
- lv_textarea_add_char(textarea, '\n');
- TEST_ASSERT_EQUAL_STRING(textarea_default_text, lv_textarea_get_text(textarea));
-
- lv_textarea_add_char(textarea, '\r');
- TEST_ASSERT_EQUAL_STRING(textarea_default_text, lv_textarea_get_text(textarea));
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_cases/test_txt.c b/lib/lvgl/tests/src/test_cases/test_txt.c
deleted file mode 100644
index a855396..0000000
--- a/lib/lvgl/tests/src/test_cases/test_txt.c
+++ /dev/null
@@ -1,207 +0,0 @@
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include "unity/unity.h"
-
-static const char color_cmd = LV_TXT_COLOR_CMD[0];
-
-void test_txt_should_identify_valid_start_of_command(void)
-{
- uint32_t character = color_cmd;
- lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_WAIT;
-
- bool is_cmd = _lv_txt_is_cmd(&state, character);
-
- TEST_ASSERT_TRUE(is_cmd);
- TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_PAR);
-}
-
-void test_txt_should_identify_invalid_start_of_command(void)
-{
- uint32_t character = '$';
- lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_WAIT;
-
- bool is_cmd = _lv_txt_is_cmd(&state, character);
-
- TEST_ASSERT_FALSE(is_cmd);
- TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_WAIT);
-}
-
-void test_txt_should_identify_scaped_command_in_parameter(void)
-{
- uint32_t character = color_cmd;
- lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_PAR;
-
- bool is_cmd = _lv_txt_is_cmd(&state, character);
-
- TEST_ASSERT_FALSE(is_cmd);
- TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_WAIT);
-}
-
-void test_txt_should_skip_color_parameter_in_parameter(void)
-{
- uint32_t character = '$';
- lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_PAR;
-
- bool is_cmd = _lv_txt_is_cmd(&state, character);
-
- TEST_ASSERT_TRUE(is_cmd);
- TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_PAR);
-}
-
-void test_txt_should_reset_state_when_receiving_color_cmd_while_processing_commands(void)
-{
- uint32_t character = color_cmd;
- lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_IN;
-
- bool is_cmd = _lv_txt_is_cmd(&state, character);
-
- TEST_ASSERT_TRUE(is_cmd);
- TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_WAIT);
-}
-
-void test_txt_should_identify_space_after_parameter(void)
-{
- uint32_t character = ' ';
- lv_text_cmd_state_t state = LV_TEXT_CMD_STATE_PAR;
-
- bool is_cmd = _lv_txt_is_cmd(&state, character);
-
- TEST_ASSERT_TRUE(is_cmd);
- TEST_ASSERT_EQUAL_UINT8(state, LV_TEXT_CMD_STATE_IN);
-}
-
-void test_txt_should_insert_string_into_another(void)
-{
- const char * msg = "Hello ";
- const char * suffix = "World";
- char target[20] = {0};
- size_t msg_len = strlen(msg);
-
- strcpy(target, msg);
-
- _lv_txt_ins(target, msg_len, suffix);
-
- TEST_ASSERT_EQUAL_STRING("Hello World", target);
-}
-
-void test_txt_should_handle_null_pointers_when_inserting(void)
-{
- const char * msg = "Hello ";
- char target[20] = {0};
- size_t msg_len = strlen(msg);
-
- strcpy(target, msg);
-
- _lv_txt_ins(target, msg_len, NULL);
-
- TEST_ASSERT_EQUAL_STRING("Hello ", target);
-}
-
-void test_txt_cut_should_handle_null_pointer_to_txt(void)
-{
- _lv_txt_cut(NULL, 0, 6);
-}
-
-void test_txt_cut_happy_path(void)
-{
- char msg[] = "Hello World";
-
- _lv_txt_cut(msg, 0, 6);
-
- TEST_ASSERT_EQUAL_STRING("World", msg);
-}
-
-void test_txt_cut_should_handle_len_longer_than_string_length(void)
-{
- char msg[] = "Hello World";
-
- _lv_txt_cut(msg, 0, 30);
-
- TEST_ASSERT_EQUAL_UINT8(msg[0], 0x00);
-}
-
-void test_txt_get_encoded_next_should_decode_valid_ascii(void)
-{
- char msg[] = "Hello World!";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32((uint32_t) 'H', result);
-}
-
-void test_txt_get_encoded_next_detect_valid_2_byte_input(void)
-{
- char msg[] = "\xc3\xb1";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32(241, result);
-}
-
-void test_txt_get_encoded_next_detect_invalid_2_byte_input(void)
-{
- char msg[] = "\xc3\x28";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32(0, result);
-}
-
-void test_txt_get_encoded_next_detect_valid_3_byte_input(void)
-{
- char msg[] = "\xe2\x82\xa1";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32(8353, result);
-}
-
-void test_txt_get_encoded_next_detect_invalid_3_byte_input(void)
-{
- char msg[] = "\xe2\x28\xa1";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32(0, result);
-}
-
-void test_txt_get_encoded_next_detect_valid_4_byte_input(void)
-{
- char msg[] = "\xf0\x90\x8c\xbc";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32(66364, result);
-}
-
-void test_txt_get_encoded_next_detect_invalid_4_byte_input(void)
-{
- char msg[] = "\xf0\x28\x8c\x28";
- uint32_t result = 0;
-
- result = _lv_txt_encoded_next(msg, NULL);
-
- TEST_ASSERT_EQUAL_UINT32(0, result);
-}
-
-/* See #2615 for more information */
-void test_txt_next_line_should_handle_empty_string(void)
-{
- const lv_font_t * font_ptr = NULL;
- lv_coord_t letter_space = 0;
- lv_coord_t max_width = 0;
- lv_text_flag_t flag = LV_TEXT_FLAG_NONE;
-
- uint32_t next_line = _lv_txt_get_next_line("", font_ptr, letter_space, max_width, NULL, flag);
-
- TEST_ASSERT_EQUAL_UINT32(0, next_line);
-}
-
-#endif
diff --git a/lib/lvgl/tests/src/test_files/readtest.txt b/lib/lvgl/tests/src/test_files/readtest.txt
deleted file mode 100644
index e398426..0000000
Binary files a/lib/lvgl/tests/src/test_files/readtest.txt and /dev/null differ
diff --git a/lib/lvgl/tests/src/test_fonts/font_1.c b/lib/lvgl/tests/src/test_fonts/font_1.c
deleted file mode 100644
index f32374f..0000000
--- a/lib/lvgl/tests/src/test_fonts/font_1.c
+++ /dev/null
@@ -1,1380 +0,0 @@
-#if LV_BUILD_TEST
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 8 px
- * Bpp: 4
- * Opts: --bpp 4 --size 8 --font ../Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font ../FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o ..\generated_fonts/font_1.c
- ******************************************************************************/
-
-#ifndef FONT_1
-#define FONT_1 1
-#endif
-
-#if FONT_1
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0x58, 0xf, 0x11, 0x32, 0xb2, 0x80,
-
- /* U+22 "\"" */
- 0x73, 0x90, 0x10, 0x72, 0x90,
-
- /* U+23 "#" */
- 0x4, 0x52, 0x60, 0x4f, 0xc9, 0xc3, 0x43, 0x9c,
- 0x83, 0x64, 0x8b, 0xa1, 0x65, 0x85, 0x81,
-
- /* U+24 "$" */
- 0x0, 0x40, 0x0, 0xad, 0x68, 0x97, 0x56, 0x89,
- 0xf9, 0x60, 0x42, 0x17, 0x21, 0x69, 0x7e, 0x96,
- 0x96, 0xcc,
-
- /* U+25 "%" */
- 0x58, 0x70, 0x63, 0xd, 0x8f, 0x30, 0x30, 0xa7,
- 0xdb, 0x7, 0x12, 0x7d, 0xa1, 0x57, 0x6, 0xa2,
- 0xfa, 0x40,
-
- /* U+26 "&" */
- 0x9, 0x98, 0x2, 0x2a, 0x30, 0x0, 0x97, 0xc1,
- 0x4, 0xd6, 0xc4, 0x2, 0xe6, 0xc, 0xc4, 0x75,
- 0x33, 0x10,
-
- /* U+27 "'" */
- 0x72, 0x0, 0x39, 0x0,
-
- /* U+28 "(" */
- 0x8, 0x20, 0x32, 0x11, 0x1, 0x10, 0x8, 0x80,
- 0x22, 0x0, 0x19, 0x0,
-
- /* U+29 ")" */
- 0x73, 0x6a, 0x12, 0x7, 0x7, 0x12, 0x6a,
-
- /* U+2A "*" */
- 0x48, 0x40, 0x26, 0xc0, 0x7b, 0x90,
-
- /* U+2B "+" */
- 0x0, 0x10, 0x6, 0x80, 0x2, 0x4b, 0xc8, 0xa4,
- 0xbc, 0x88,
-
- /* U+2C "," */
- 0x0, 0x3a, 0x82, 0x0,
-
- /* U+2D "-" */
- 0x5a, 0x60,
-
- /* U+2E "." */
- 0x0, 0x3a, 0x0,
-
- /* U+2F "/" */
- 0x0, 0xa8, 0x2, 0x22, 0x0, 0x55, 0x40, 0x8,
- 0x88, 0x0, 0x4c, 0x0, 0xb5, 0xc0, 0x2, 0x2,
- 0x0,
-
- /* U+30 "0" */
- 0xa, 0xbb, 0x13, 0x65, 0xd4, 0xfa, 0x80, 0xbf,
- 0xa8, 0xb, 0xb6, 0x5d, 0x48,
-
- /* U+31 "1" */
- 0x9e, 0x29, 0x40, 0xf, 0xf0,
-
- /* U+32 "2" */
- 0x6a, 0xb9, 0x6, 0xab, 0x50, 0x9, 0x50, 0x1,
- 0x5, 0x1, 0x2d, 0xb4, 0x60,
-
- /* U+33 "3" */
- 0x7a, 0xbe, 0x7, 0xa1, 0xc0, 0x2, 0x5, 0x80,
- 0x12, 0x8c, 0xa2, 0xa8, 0x64,
-
- /* U+34 "4" */
- 0x0, 0x24, 0x80, 0x47, 0xd2, 0x0, 0x18, 0xa8,
- 0x20, 0x90, 0xa5, 0x92, 0x8b, 0xa4, 0x82,
-
- /* U+35 "5" */
- 0x3d, 0xaa, 0x3, 0x5d, 0x50, 0x1, 0xb5, 0x0,
- 0xb7, 0x42, 0x6f, 0x54, 0x33, 0x0,
-
- /* U+36 "6" */
- 0x9, 0xaa, 0x1b, 0x75, 0x50, 0xff, 0xd3, 0x45,
- 0xe1, 0x31, 0x6, 0x19, 0x8e,
-
- /* U+37 "7" */
- 0xca, 0xa6, 0xb5, 0xd5, 0x5, 0x9c, 0x1a, 0xc0,
- 0x2a, 0x70, 0x3, 0x58, 0x0,
-
- /* U+38 "8" */
- 0x1a, 0xa5, 0x92, 0x65, 0x7d, 0x25, 0xd4, 0xdc,
- 0xca, 0xb2, 0x2f, 0xa6, 0xfc,
-
- /* U+39 "9" */
- 0x4a, 0x99, 0x7, 0xdc, 0x82, 0xc5, 0xc8, 0x69,
- 0xd4, 0x86, 0x9d, 0x58, 0xa8,
-
- /* U+3A ":" */
- 0x74, 0x74, 0x0, 0x3a, 0x0,
-
- /* U+3B ";" */
- 0x74, 0x74, 0x0, 0x3a, 0x8b, 0xb1, 0x0,
-
- /* U+3C "<" */
- 0x0, 0x84, 0x0, 0x93, 0x20, 0x58, 0xa8, 0x5,
- 0xd5, 0x91, 0x1, 0x69, 0x10,
-
- /* U+3D "=" */
- 0x49, 0x98, 0x52, 0x66, 0x14, 0x99, 0x84,
-
- /* U+3E ">" */
- 0x10, 0xc, 0x53, 0x4, 0x7, 0x3d, 0xe2, 0x92,
- 0x5a, 0x29, 0x28, 0x0,
-
- /* U+3F "?" */
- 0x6a, 0xb9, 0x6, 0xab, 0x50, 0xa, 0xa0, 0x2,
- 0x94, 0x0, 0x15, 0x80, 0x0,
-
- /* U+40 "@" */
- 0x3, 0x87, 0x74, 0x28, 0x15, 0xe6, 0xf2, 0x12,
- 0xd4, 0x7d, 0x4b, 0x2e, 0x80, 0x7e, 0xa8, 0xf9,
- 0x91, 0xc7, 0x15, 0xe0, 0xf6, 0x53, 0x0,
-
- /* U+41 "A" */
- 0x0, 0xae, 0x40, 0x31, 0x9c, 0x20, 0x14, 0x4c,
- 0xa0, 0x0, 0x8d, 0x14, 0x82, 0x1f, 0x93, 0x2e,
- 0x80,
-
- /* U+42 "B" */
- 0x2d, 0x99, 0x58, 0x83, 0xcc, 0x8d, 0x41, 0xe6,
- 0x95, 0x40, 0xf3, 0x5d, 0x0, 0xf3, 0x28, 0xd0,
-
- /* U+43 "C" */
- 0x7, 0xba, 0xa1, 0x2f, 0x5d, 0x50, 0xb2, 0x80,
- 0x36, 0x50, 0x6, 0x5e, 0xba, 0xa1, 0x0,
-
- /* U+44 "D" */
- 0x2e, 0xab, 0xb1, 0x80, 0x12, 0xae, 0xbc, 0x3,
- 0x85, 0x48, 0x3, 0xa, 0x90, 0x25, 0x5d, 0x78,
- 0x0,
-
- /* U+45 "E" */
- 0x2e, 0xaa, 0x40, 0x25, 0x52, 0x1, 0xea, 0x88,
- 0xf, 0x54, 0x40, 0x4a, 0xa4, 0x80,
-
- /* U+46 "F" */
- 0x2e, 0xaa, 0x40, 0x25, 0x52, 0x1, 0x2a, 0x88,
- 0x9, 0x54, 0x40, 0xe,
-
- /* U+47 "G" */
- 0x7, 0xba, 0xa1, 0x2f, 0x5d, 0x50, 0xb2, 0x80,
- 0x4, 0x79, 0x40, 0x6, 0x45, 0xeb, 0xae, 0x40,
-
- /* U+48 "H" */
- 0x2a, 0x0, 0x15, 0x0, 0x7c, 0x95, 0x49, 0x0,
- 0x25, 0x52, 0x40, 0x3e,
-
- /* U+49 "I" */
- 0x2a, 0x0, 0xfc,
-
- /* U+4A "J" */
- 0x5, 0xad, 0x50, 0x5a, 0xa0, 0x7, 0xf7, 0x88,
- 0x4d, 0x1a, 0x0,
-
- /* U+4B "K" */
- 0x2a, 0x1, 0xa2, 0x0, 0xd, 0x41, 0x3, 0x6e,
- 0x10, 0x0, 0x77, 0x94, 0x0, 0xe3, 0x3e, 0x80,
-
- /* U+4C "L" */
- 0x2a, 0x0, 0xff, 0xe3, 0xa5, 0x51, 0xc0,
-
- /* U+4D "M" */
- 0x2c, 0x0, 0x8f, 0x0, 0x5c, 0x1, 0x0, 0x4,
- 0xe2, 0x8f, 0x0, 0xa2, 0x45, 0x0, 0x21, 0x89,
- 0x0, 0x0,
-
- /* U+4E "N" */
- 0x2d, 0x10, 0x2a, 0x1, 0xa0, 0xc, 0xdf, 0x60,
- 0x19, 0x3b, 0x80, 0x19, 0x6c, 0x0,
-
- /* U+4F "O" */
- 0x7, 0xbb, 0x8c, 0x17, 0xae, 0xd5, 0xe3, 0x94,
- 0x0, 0x14, 0x5c, 0xa0, 0x0, 0xa2, 0xab, 0xae,
- 0xd5, 0xe2,
-
- /* U+50 "P" */
- 0x2e, 0xaa, 0x48, 0x1, 0x2a, 0x82, 0x80, 0x18,
- 0x9c, 0x12, 0xa9, 0x86, 0x9, 0x54, 0x60,
-
- /* U+51 "Q" */
- 0x7, 0xbb, 0x8c, 0x17, 0xae, 0xd5, 0xe3, 0x94,
- 0x0, 0x14, 0x5c, 0xa0, 0x9, 0x15, 0x5d, 0x77,
- 0x78, 0x83, 0xdc, 0x15, 0x18,
-
- /* U+52 "R" */
- 0x2e, 0xaa, 0x48, 0x1, 0x2a, 0x82, 0x80, 0x18,
- 0x9c, 0x1e, 0xb0, 0x8c, 0x1e, 0xb4, 0x84,
-
- /* U+53 "S" */
- 0x2a, 0xa8, 0x97, 0x2a, 0x84, 0xfd, 0x30, 0x21,
- 0x13, 0x90, 0xb5, 0x4e, 0xa0,
-
- /* U+54 "T" */
- 0xaa, 0x75, 0x35, 0x50, 0xa9, 0x80, 0x3f, 0xf8,
- 0x60,
-
- /* U+55 "U" */
- 0x39, 0x0, 0x24, 0x0, 0x7f, 0xf0, 0x9, 0x40,
- 0x5, 0xc3, 0x57, 0x58, 0xc0,
-
- /* U+56 "V" */
- 0xb, 0x10, 0x2, 0xb8, 0x7c, 0x0, 0x39, 0xc1,
- 0x14, 0x57, 0x0, 0x28, 0x84, 0xb8, 0x4, 0x8b,
- 0x60, 0x0,
-
- /* U+57 "W" */
- 0x94, 0x0, 0x78, 0x81, 0xcd, 0x70, 0x33, 0x41,
- 0x54, 0x36, 0xd, 0x9c, 0x2, 0x30, 0xb9, 0x30,
- 0x39, 0xc0, 0x3, 0x32, 0x82, 0x99, 0x80,
-
- /* U+58 "X" */
- 0x58, 0x2, 0xa0, 0x50, 0x79, 0xb0, 0x4, 0x43,
- 0x84, 0x1, 0x57, 0xc2, 0xf, 0x89, 0x34, 0x0,
-
- /* U+59 "Y" */
- 0xa, 0x20, 0x5, 0x80, 0x2e, 0x42, 0x60, 0x0,
- 0x3d, 0x62, 0x60, 0x12, 0xb4, 0x0, 0x70, 0x80,
- 0x40,
-
- /* U+5A "Z" */
- 0x6a, 0xa6, 0x68, 0x35, 0x5b, 0xe0, 0x5, 0x52,
- 0x20, 0xb, 0x82, 0x0, 0x43, 0x4d, 0x50, 0x0,
-
- /* U+5B "[" */
- 0x2d, 0x40, 0x44, 0x0, 0x7f, 0xf0, 0x51, 0x0,
-
- /* U+5C "\\" */
- 0x19, 0x0, 0x84, 0xc0, 0x37, 0xa8, 0x4, 0xbe,
- 0x1, 0x8c, 0x40, 0x2a, 0x60, 0x8, 0xf4, 0x0,
-
- /* U+5D "]" */
- 0x8c, 0x80, 0xf, 0xe8, 0x0,
-
- /* U+5E "^" */
- 0x3, 0xc0, 0xa, 0xa1, 0x40, 0xb9, 0x30, 0x0,
-
- /* U+5F "_" */
- 0x77, 0xc0,
-
- /* U+60 "`" */
- 0x6, 0x60,
-
- /* U+61 "a" */
- 0x29, 0x94, 0x0, 0x42, 0xa1, 0x5b, 0x2, 0x2b,
- 0xf9, 0x10,
-
- /* U+62 "b" */
- 0x48, 0x0, 0xff, 0x92, 0xad, 0x40, 0xd, 0x57,
- 0x20, 0x1f, 0x9a, 0xa9, 0x20,
-
- /* U+63 "c" */
- 0x1a, 0xa8, 0x67, 0xaa, 0x82, 0x1, 0xd3, 0xd5,
- 0x41,
-
- /* U+64 "d" */
- 0x0, 0xd6, 0x1, 0xc3, 0x55, 0x4, 0x75, 0x48,
- 0x6, 0x10, 0x8e, 0x9b, 0x0,
-
- /* U+65 "e" */
- 0x19, 0x98, 0x60, 0x4, 0x4e, 0x39, 0x12, 0xd3,
- 0xf5, 0x41,
-
- /* U+66 "f" */
- 0xa, 0xa0, 0x10, 0x50, 0x5b, 0xb8, 0x2d, 0x1c,
- 0x3, 0xf8,
-
- /* U+67 "g" */
- 0x1a, 0x99, 0x5c, 0x74, 0xc3, 0x80, 0x46, 0x11,
- 0xd5, 0xe, 0x4, 0x61, 0x0,
-
- /* U+68 "h" */
- 0x48, 0x0, 0xfe, 0x49, 0xb4, 0x5, 0x9a, 0xf0,
- 0x10, 0x17, 0x0, 0xe0,
-
- /* U+69 "i" */
- 0x37, 0x37, 0x48, 0x0, 0xf0,
-
- /* U+6A "j" */
- 0x3, 0x70, 0x37, 0x3, 0x80, 0xf, 0xe6, 0x8c,
-
- /* U+6B "k" */
- 0x48, 0x0, 0xff, 0xa9, 0x0, 0x72, 0x50, 0x12,
- 0xa4, 0x0, 0xad, 0xae,
-
- /* U+6C "l" */
- 0x48, 0x0, 0xff, 0x0,
-
- /* U+6D "m" */
- 0x4c, 0x9b, 0x89, 0xb4, 0x5, 0x98, 0x39, 0xbf,
- 0x1, 0x1, 0x10, 0x1, 0xc0, 0x3f, 0x0,
-
- /* U+6E "n" */
- 0x4c, 0x9b, 0x40, 0x59, 0xaf, 0x1, 0x1, 0x70,
- 0xe,
-
- /* U+6F "o" */
- 0x1a, 0xa8, 0x67, 0xaa, 0x6c, 0x3, 0xa7, 0xaa,
- 0x6c,
-
- /* U+70 "p" */
- 0x4c, 0xab, 0x50, 0x3, 0x55, 0xc8, 0x7, 0xe6,
- 0xaa, 0x48, 0x1, 0x2a, 0x8a, 0x0,
-
- /* U+71 "q" */
- 0x1a, 0xa4, 0xdc, 0x75, 0x50, 0x3, 0xd1, 0xd5,
- 0x40, 0x1a, 0xa4, 0x80,
-
- /* U+72 "r" */
- 0x4b, 0xa0, 0x0, 0xd0, 0x0, 0x80, 0x3c,
-
- /* U+73 "s" */
- 0x5b, 0x95, 0xdc, 0xa5, 0x84, 0x44, 0xbc, 0xef,
- 0x80,
-
- /* U+74 "t" */
- 0x29, 0x0, 0x5a, 0x38, 0x5a, 0x38, 0x7, 0x11,
- 0x24, 0x0,
-
- /* U+75 "u" */
- 0x57, 0x1, 0xb0, 0xe, 0x1f, 0x2, 0x4, 0x29,
- 0xa0,
-
- /* U+76 "v" */
- 0xb, 0x0, 0x42, 0x7, 0x38, 0x1a, 0x2, 0xe3,
- 0xf0, 0x5, 0xb4, 0xa0,
-
- /* U+77 "w" */
- 0xb0, 0x7, 0x10, 0x50, 0x72, 0xa9, 0xe8, 0x88,
- 0xb, 0xfe, 0x92, 0xaa, 0x0, 0xc, 0x83, 0xc,
- 0x80,
-
- /* U+78 "x" */
- 0x67, 0x1b, 0x6, 0xea, 0xa0, 0x0, 0xc0, 0xc1,
- 0xfe, 0xa4, 0x0,
-
- /* U+79 "y" */
- 0xb, 0x10, 0x83, 0x8, 0x91, 0x23, 0x3, 0x2b,
- 0x90, 0xb, 0x80, 0xc0, 0x15, 0xf0, 0x0,
-
- /* U+7A "z" */
- 0x59, 0xbb, 0x2c, 0x5, 0x5, 0x48, 0xcb, 0xdc,
- 0x0,
-
- /* U+7B "{" */
- 0xa, 0x60, 0x66, 0x0, 0x4a, 0xe0, 0xae, 0x1,
- 0xcc, 0xc0,
-
- /* U+7C "|" */
- 0x28, 0x0, 0xff, 0xe0, 0x0,
-
- /* U+7D "}" */
- 0x97, 0x9, 0xc0, 0xe, 0x63, 0x6, 0x30, 0xa,
- 0x70, 0x0,
-
- /* U+7E "~" */
- 0x29, 0x35, 0x17, 0x95, 0xd1,
-
- /* U+B0 "°" */
- 0x26, 0x45, 0x63, 0x57, 0x20,
-
- /* U+2022 "•" */
- 0x0, 0x2e, 0xaf, 0x80,
-
- /* U+F001 "" */
- 0x0, 0xff, 0xe0, 0x13, 0x5f, 0x0, 0x23, 0x75,
- 0x28, 0x20, 0x7, 0x21, 0x6a, 0x0, 0xd9, 0xd2,
- 0xa0, 0x18, 0xc0, 0x3f, 0xab, 0xc2, 0xbc, 0x3,
- 0x94, 0x0, 0xa0, 0xa, 0xfa,
-
- /* U+F008 "" */
- 0xbd, 0xcc, 0xba, 0xac, 0xdb, 0x32, 0x9f, 0x34,
- 0x66, 0xdb, 0xe8, 0x1, 0xf9, 0x19, 0xb6, 0xfa,
- 0x1b, 0x66, 0x53, 0xe6,
-
- /* U+F00B "" */
- 0x34, 0x14, 0x4c, 0x79, 0x6d, 0x77, 0xb1, 0x50,
- 0xd1, 0x32, 0x8b, 0x8b, 0xbe, 0x14, 0x32, 0x33,
- 0xc9, 0x30, 0xd0, 0xef, 0x4c, 0xa1, 0xa1, 0xde,
- 0x95, 0x43, 0x44, 0xca,
-
- /* U+F00C "" */
- 0x0, 0xf4, 0xd0, 0x7, 0x4b, 0x5, 0x48, 0x2,
- 0x59, 0x68, 0x1a, 0x64, 0xcb, 0x41, 0x4a, 0xcc,
- 0x5a, 0x0, 0xa9, 0x99, 0x40, 0x10,
-
- /* U+F00D "" */
- 0x63, 0x0, 0x41, 0x56, 0x25, 0x3b, 0x69, 0x5a,
- 0xca, 0xb, 0x80, 0x14, 0x29, 0x60, 0xb0, 0xc2,
- 0x5f, 0x10, 0x0,
-
- /* U+F011 "" */
- 0x0, 0xb1, 0x44, 0x0, 0x3a, 0xe2, 0x7e, 0xe1,
- 0x20, 0xe0, 0xb, 0x81, 0x4a, 0x0, 0x94, 0x5c,
- 0x40, 0x16, 0x80, 0x12, 0x50, 0x31, 0x20, 0xa4,
- 0x1e, 0x3c, 0x5b, 0x90, 0xfa, 0xd2, 0x4c, 0x0,
-
- /* U+F013 "" */
- 0x0, 0xb3, 0x0, 0x10, 0xc4, 0xc, 0xd1, 0x1,
- 0x97, 0x70, 0x89, 0xdd, 0x34, 0x3, 0xdc, 0x10,
- 0xa0, 0xf, 0xd4, 0x3, 0xdc, 0x10, 0xa9, 0x77,
- 0x8, 0x9d, 0xd2, 0x31, 0x3, 0x34, 0x40, 0x40,
-
- /* U+F015 "" */
- 0x0, 0xc6, 0x4, 0x40, 0xd, 0x59, 0x51, 0x0,
- 0x0, 0xe8, 0x48, 0x28, 0x0, 0xfd, 0x46, 0x45,
- 0xd0, 0xe2, 0xa, 0x80, 0x8b, 0x10, 0xbe, 0x20,
- 0x40, 0x2e, 0xb0, 0x8, 0xec, 0xc0, 0x36, 0xa2,
- 0x1, 0x11, 0xa0,
-
- /* U+F019 "" */
- 0x0, 0xbf, 0xc0, 0x1f, 0xfc, 0x87, 0xf0, 0x7,
- 0xb8, 0x1, 0xd8, 0x0, 0xce, 0xf, 0x1c, 0xaa,
- 0xe8, 0x78, 0x78, 0x11, 0x43, 0xc0, 0x4, 0x89,
- 0x80,
-
- /* U+F01C "" */
- 0x5, 0xff, 0xe5, 0x1, 0xbc, 0xff, 0xb2, 0xc6,
- 0xd8, 0xc0, 0x23, 0x6b, 0x57, 0xf6, 0x6, 0xf7,
- 0x50, 0xa, 0x7e, 0x40, 0x22, 0x0, 0xf8, 0x80,
-
- /* U+F021 "" */
- 0x0, 0xf8, 0xc0, 0xaf, 0xfd, 0x67, 0x85, 0x85,
- 0xdc, 0x3c, 0xb, 0x49, 0x17, 0x40, 0x5, 0x58,
- 0x1, 0x22, 0xec, 0xea, 0x84, 0x44, 0x57, 0xbb,
- 0x42, 0x0, 0x2a, 0x80, 0x2c, 0x6b, 0x6d, 0x1,
- 0x85, 0x32, 0x3c, 0x1c, 0x28, 0xcc, 0x40, 0x80,
-
- /* U+F026 "" */
- 0x0, 0xa4, 0xd3, 0x1b, 0x2c, 0xc0, 0x39, 0x50,
- 0x1, 0x57, 0x60, 0x9, 0x38,
-
- /* U+F027 "" */
- 0x0, 0xa4, 0x0, 0x69, 0x8c, 0x3, 0x96, 0x60,
- 0x34, 0x1, 0xe4, 0x40, 0x0, 0x6a, 0xee, 0x0,
- 0x8, 0x1, 0x38, 0x0,
-
- /* U+F028 "" */
- 0x0, 0xf2, 0xa0, 0x6, 0x90, 0x26, 0xf3, 0x32,
- 0x63, 0x0, 0x3e, 0x21, 0x96, 0x60, 0x33, 0x25,
- 0x70, 0xf, 0xe5, 0x40, 0x0, 0xcc, 0x95, 0xaa,
- 0xec, 0x1, 0x7c, 0x48, 0x1, 0x38, 0x9, 0xbc,
- 0xc0,
-
- /* U+F03E "" */
- 0xdf, 0xff, 0x69, 0x7c, 0x0, 0x62, 0x8, 0xb0,
- 0x4e, 0x40, 0x1, 0xca, 0x58, 0xd8, 0x2, 0xd6,
- 0xc0, 0x31, 0x7f, 0xf8, 0x80,
-
- /* U+F048 "" */
- 0x40, 0x8, 0xac, 0x82, 0x34, 0x1, 0x2e, 0x0,
- 0xe6, 0x0, 0x8c, 0x3, 0x50, 0x80, 0x4f, 0x82,
- 0x8, 0x65, 0xec,
-
- /* U+F04B "" */
- 0x0, 0xfb, 0x68, 0x40, 0x31, 0x2f, 0x38, 0x7,
- 0xa3, 0x50, 0x3, 0x8a, 0xe8, 0x3, 0xfe, 0x2b,
- 0xa0, 0xa, 0x35, 0x0, 0x97, 0x9c, 0x2, 0xda,
- 0x10, 0xc,
-
- /* U+F04C "" */
- 0x9b, 0x90, 0x9b, 0x96, 0x46, 0x6, 0x46, 0x0,
- 0xff, 0xeb, 0xed, 0xe8, 0x6d, 0xe8,
-
- /* U+F04D "" */
- 0x24, 0x4e, 0x2d, 0xbb, 0xed, 0x0, 0xff, 0xeb,
- 0xba, 0x27, 0x38,
-
- /* U+F051 "" */
- 0x20, 0x9, 0x36, 0x0, 0xac, 0x1e, 0x40, 0x33,
- 0x70, 0x6, 0x30, 0x8, 0x68, 0x0, 0x58, 0xe0,
- 0xd8, 0x46, 0x80,
-
- /* U+F052 "" */
- 0x0, 0xc4, 0x1, 0xf4, 0x6c, 0x0, 0x73, 0xb8,
- 0x1d, 0xc0, 0x12, 0xc0, 0x5, 0xa, 0x0, 0xb0,
- 0xe, 0xb0, 0x5, 0xbb, 0xf5, 0x80, 0x29, 0xdf,
- 0xa8, 0x0, 0xa8, 0x9c, 0xa0,
-
- /* U+F053 "" */
- 0x0, 0x98, 0x80, 0xf, 0x2c, 0xf, 0x14, 0x8b,
- 0x12, 0xa0, 0x83, 0xa0, 0x1, 0xc5, 0xb0, 0x1,
- 0x62, 0xb0, 0x0, 0xbd, 0x80,
-
- /* U+F054 "" */
- 0x26, 0x0, 0x9a, 0x5c, 0x0, 0x95, 0xe, 0x0,
- 0x59, 0x85, 0x0, 0x68, 0xa0, 0x5a, 0xe0, 0xb2,
- 0xe1, 0x3, 0x79, 0x0, 0x0,
-
- /* U+F067 "" */
- 0x0, 0x90, 0x3, 0x8e, 0xcc, 0x3, 0x38, 0x38,
- 0x1, 0xe3, 0x83, 0xa1, 0xe5, 0xd4, 0x15, 0xe7,
- 0xbe, 0xc2, 0xff, 0x80, 0x3f, 0x95, 0x14, 0x0,
-
- /* U+F068 "" */
- 0x78, 0x8e, 0x79, 0x77, 0xe9,
-
- /* U+F06E "" */
- 0x0, 0x46, 0x65, 0x0, 0x1, 0xd5, 0xda, 0xf5,
- 0xd1, 0xd2, 0x84, 0x8e, 0x82, 0xd7, 0x0, 0x40,
- 0x80, 0x6a, 0x28, 0xe8, 0xe8, 0x2d, 0x1d, 0x5e,
- 0xbf, 0x5c, 0x10,
-
- /* U+F070 "" */
- 0x1d, 0x30, 0xf, 0xc3, 0x1b, 0x19, 0x95, 0x10,
- 0x4, 0xb8, 0xaf, 0x10, 0x3d, 0x40, 0x3, 0xc6,
- 0xd, 0xda, 0x82, 0x84, 0x0, 0xb7, 0x52, 0x8,
- 0x2, 0x0, 0x75, 0x51, 0xb6, 0x48, 0x58, 0x80,
- 0x2a, 0x7f, 0x13, 0xd3, 0xc4, 0x2, 0x6c, 0xc3,
- 0x8d, 0x9c, 0x0,
-
- /* U+F071 "" */
- 0x0, 0xc7, 0xc6, 0x1, 0xfb, 0xc7, 0xc0, 0x3e,
- 0x63, 0x39, 0x80, 0x3d, 0x5, 0x85, 0x0, 0x1d,
- 0x2, 0x60, 0x63, 0x0, 0x11, 0x38, 0xb, 0x8,
- 0x39, 0x0, 0x24, 0x0, 0x28, 0x20, 0x8, 0x0,
- 0x30, 0x0, 0x74, 0x40, 0xe, 0x0,
-
- /* U+F074 "" */
- 0x0, 0xf1, 0x2, 0x20, 0x2, 0x4d, 0x5a, 0xbb,
- 0xe, 0x58, 0x47, 0x70, 0xf4, 0x78, 0xf0, 0x0,
- 0xa0, 0xa0, 0x17, 0x70, 0x74, 0xf8, 0xf2, 0xaf,
- 0x6, 0xec, 0x10, 0x88, 0x0, 0x93, 0x54,
-
- /* U+F077 "" */
- 0x0, 0xfe, 0x4e, 0x40, 0x9, 0x2c, 0xad, 0x1,
- 0x2d, 0xf1, 0xed, 0x3d, 0xe0, 0x21, 0xfe, 0xe0,
- 0x2, 0x8b,
-
- /* U+F078 "" */
- 0x0, 0xfa, 0xe0, 0x2, 0x8b, 0xf7, 0x80, 0x87,
- 0xf4, 0xb7, 0xc7, 0xb4, 0x4, 0xb2, 0xb4, 0x0,
- 0x93, 0x90, 0x0,
-
- /* U+F079 "" */
- 0x0, 0x4a, 0xa, 0x26, 0x0, 0xad, 0xae, 0x7f,
- 0xeb, 0x10, 0x1, 0xa4, 0x75, 0xdc, 0x20, 0x14,
- 0x1, 0xb0, 0x0, 0x40, 0xc0, 0x31, 0xa2, 0x17,
- 0xc7, 0xd4, 0x1, 0x98, 0xff, 0x6d, 0x82, 0xa8,
- 0x0, 0xf7, 0x74, 0x2e, 0xc0, 0x0,
-
- /* U+F07B "" */
- 0xdf, 0xf5, 0x80, 0x62, 0x0, 0x27, 0xfd, 0xa0,
- 0x1f, 0x10, 0x7, 0xff, 0x10, 0x80, 0x3c, 0x40,
-
- /* U+F093 "" */
- 0x0, 0xa6, 0x40, 0x1d, 0x2c, 0xc9, 0x0, 0x9d,
- 0x80, 0xc, 0xe0, 0x7, 0xf0, 0x7, 0xb8, 0x7,
- 0xf3, 0xc2, 0x0, 0x12, 0x1e, 0x1e, 0x9d, 0xd4,
- 0xf0, 0x0, 0x17, 0x72, 0xa0, 0x0,
-
- /* U+F095 "" */
- 0x0, 0xff, 0xe1, 0xbf, 0x50, 0x7, 0xa4, 0x50,
- 0x3, 0xc4, 0x4, 0x1, 0xe8, 0xb, 0x0, 0xe1,
- 0x91, 0x70, 0x7d, 0xc4, 0xc2, 0xd0, 0x4, 0x91,
- 0xd9, 0xe1, 0x80, 0x10, 0x4e, 0x38, 0xc0, 0x0,
-
- /* U+F0C4 "" */
- 0x3, 0x0, 0xf6, 0x76, 0x1, 0x6e, 0x1, 0x51,
- 0x96, 0x1f, 0x5, 0x60, 0x68, 0x61, 0x2, 0x78,
- 0x1, 0x8, 0x1, 0x92, 0xc, 0xb2, 0x0, 0x2a,
- 0x19, 0x86, 0x90, 0xad, 0xa0, 0x7b, 0xc0,
-
- /* U+F0C5 "" */
- 0x0, 0x7f, 0xce, 0x8e, 0x80, 0x11, 0x9a, 0x30,
- 0x2, 0xb8, 0x0, 0xff, 0xe5, 0x1c, 0x3b, 0xd0,
- 0x9, 0xe, 0xe8, 0x70,
-
- /* U+F0C7 "" */
- 0x24, 0x4c, 0x21, 0xbf, 0xfc, 0x41, 0x77, 0x87,
- 0xc1, 0x13, 0x1, 0x5, 0xda, 0x2c, 0x3, 0x36,
- 0x30, 0x6, 0x45, 0x40, 0x3, 0xa3, 0x73, 0x23,
- 0x80,
-
- /* U+F0E7 "" */
- 0x7, 0xff, 0x30, 0x5, 0xa0, 0x4, 0x0, 0x98,
- 0x1, 0x4e, 0x0, 0x20, 0x3, 0xe0, 0x2, 0x5c,
- 0x42, 0x40, 0xf, 0x2, 0xe4, 0x1, 0x18, 0xc0,
- 0x6, 0x5b, 0x0, 0x80,
-
- /* U+F0EA "" */
- 0x79, 0xb9, 0x70, 0x4, 0x33, 0xb4, 0x0, 0x6a,
- 0x77, 0x18, 0x5, 0xce, 0xeb, 0xb0, 0x7, 0x8c,
- 0x3, 0x9d, 0xd0, 0xe0, 0x1c, 0xf1, 0xe0, 0x18,
-
- /* U+F0F3 "" */
- 0x0, 0xb4, 0x3, 0x27, 0x17, 0x18, 0x2, 0x44,
- 0x7, 0x80, 0x4, 0x1, 0x10, 0x18, 0x7, 0x1c,
- 0x0, 0x74, 0x63, 0xbf, 0x6b, 0xc6, 0x3e, 0x43,
- 0x0,
-
- /* U+F11C "" */
- 0xdf, 0xff, 0xb4, 0xb9, 0xdd, 0xce, 0xee, 0x20,
- 0xf2, 0x26, 0x91, 0x3c, 0x3, 0xfe, 0xf2, 0xac,
- 0xa2, 0xf0, 0x2e, 0x7f, 0xf9, 0xf8, 0x80,
-
- /* U+F124 "" */
- 0x0, 0xff, 0xe2, 0x25, 0xe0, 0x7, 0x2e, 0x5a,
- 0x38, 0x4, 0xdd, 0x46, 0x0, 0xf0, 0x6, 0xc8,
- 0x80, 0x46, 0x80, 0xb, 0x77, 0x18, 0x2, 0x40,
- 0x26, 0x88, 0x20, 0xa, 0x80, 0x7e, 0x80, 0xf,
- 0xb4, 0x98, 0x3, 0xe5, 0xd0, 0xc,
-
- /* U+F15B "" */
- 0xff, 0xa2, 0xc0, 0x39, 0x2c, 0x2, 0x47, 0x30,
- 0x8, 0xdd, 0xc0, 0x1f, 0xfc, 0xc0,
-
- /* U+F1EB "" */
- 0x0, 0x91, 0xdc, 0x80, 0x1a, 0x7e, 0xef, 0x7c,
- 0x86, 0x25, 0xfe, 0x63, 0xed, 0x33, 0xb4, 0x2f,
- 0xfd, 0x61, 0xbc, 0x43, 0x63, 0x54, 0x1b, 0x12,
- 0x1, 0xfa, 0x74, 0xaf, 0x10, 0xe, 0xcf, 0x0,
- 0xfc, 0xd2, 0x1, 0x80,
-
- /* U+F240 "" */
- 0x24, 0x4f, 0xc1, 0xbf, 0xff, 0x4d, 0x6, 0x2a,
- 0xfa, 0x14, 0x3c, 0x47, 0xce, 0x0, 0xd9, 0x9f,
- 0x42, 0x3f, 0x6e, 0xf8, 0x60,
-
- /* U+F241 "" */
- 0x24, 0x4f, 0xc1, 0xbf, 0xff, 0x4d, 0x6, 0x2a,
- 0xec, 0xb8, 0x50, 0xf1, 0x1d, 0xe0, 0xe0, 0xd,
- 0x99, 0xda, 0x90, 0x8f, 0xdb, 0xbb, 0xbc, 0x60,
-
- /* U+F242 "" */
- 0x24, 0x4f, 0xc1, 0xbf, 0xff, 0x4d, 0x6, 0x2a,
- 0xd7, 0x74, 0x28, 0x78, 0x8c, 0x1, 0x38, 0x3,
- 0x66, 0x64, 0x4a, 0x11, 0xfb, 0x76, 0xff, 0x86,
- 0x0,
-
- /* U+F243 "" */
- 0x24, 0x4f, 0xc1, 0xbf, 0xff, 0x4d, 0x6, 0x2e,
- 0x5d, 0xe8, 0x50, 0xf1, 0xf0, 0xc, 0xe0, 0xd,
- 0x9d, 0x44, 0xd0, 0x8f, 0xdb, 0xdf, 0xf8, 0x60,
-
- /* U+F244 "" */
- 0x24, 0x4f, 0xc1, 0xbf, 0xff, 0x4c, 0x5, 0xdf,
- 0xd0, 0xe0, 0x1f, 0x9c, 0x0, 0x89, 0xf4, 0x13,
- 0xff, 0xfc, 0x3c,
-
- /* U+F287 "" */
- 0x0, 0xff, 0xe1, 0xbe, 0xc0, 0x7, 0xce, 0x97,
- 0x80, 0x1a, 0x6c, 0x78, 0x9d, 0x45, 0xc8, 0x1d,
- 0x24, 0x72, 0x66, 0xab, 0xc, 0xd8, 0x85, 0xe0,
- 0x7e, 0xc8, 0x11, 0x0, 0xc, 0x4d, 0x60, 0x1f,
- 0x9b, 0xb0, 0x2,
-
- /* U+F293 "" */
- 0x6, 0xdd, 0x61, 0x82, 0x49, 0x71, 0x70, 0x69,
- 0xa3, 0x59, 0x14, 0x78, 0x9e, 0xc, 0x0, 0xf0,
- 0x10, 0x72, 0x31, 0x7f, 0x1, 0xd3, 0x65, 0x91,
- 0x24, 0x92, 0xd0, 0xd0,
-
- /* U+F2ED "" */
- 0x78, 0xdf, 0xd8, 0x70, 0x2, 0xba, 0x80, 0x3d,
- 0xdf, 0xbc, 0xc, 0xce, 0x66, 0x0, 0xff, 0xe5,
- 0x69, 0x99, 0xcc, 0xda,
-
- /* U+F304 "" */
- 0x0, 0xf3, 0xf1, 0x80, 0x72, 0x60, 0xe8, 0x6,
- 0x8b, 0x24, 0x90, 0xa, 0x1c, 0x1b, 0xdc, 0x1,
- 0xe, 0x0, 0x74, 0x0, 0x3b, 0x80, 0xf, 0x0,
- 0x14, 0x80, 0x1e, 0x0, 0x38, 0x62, 0x0, 0x1d,
- 0xdc, 0x70, 0xe,
-
- /* U+F55A "" */
- 0x0, 0x57, 0xff, 0xb0, 0x2d, 0x41, 0x8c, 0xcc,
- 0x7, 0x48, 0x0, 0x5d, 0xd2, 0x80, 0x7f, 0xf0,
- 0x29, 0x0, 0xb, 0xba, 0x50, 0xa, 0xd4, 0x18,
- 0xcc, 0xc0, 0x60,
-
- /* U+F7C2 "" */
- 0x7, 0xff, 0xb8, 0x5f, 0x27, 0x60, 0x89, 0xb,
- 0xb7, 0x84, 0x0, 0x14, 0x64, 0x10, 0xf, 0xfe,
- 0x51, 0x80, 0x61, 0x20,
-
- /* U+F8A2 "" */
- 0x0, 0xf8, 0xc0, 0x4, 0x60, 0x11, 0x60, 0x16,
- 0x51, 0x14, 0xe0, 0xf, 0x16, 0xdd, 0xa8, 0x1,
- 0xe2, 0xdb, 0xbb, 0x80, 0xb2, 0x88, 0xb0, 0x80
-};
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 34, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 34, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6, .adv_w = 50, .box_w = 3, .box_h = 3, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 11, .adv_w = 90, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 26, .adv_w = 79, .box_w = 5, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 44, .adv_w = 108, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 62, .adv_w = 88, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 80, .adv_w = 27, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 84, .adv_w = 43, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 96, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 103, .adv_w = 51, .box_w = 4, .box_h = 3, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 109, .adv_w = 74, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 119, .adv_w = 29, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 123, .adv_w = 49, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 125, .adv_w = 29, .box_w = 2, .box_h = 2, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 128, .adv_w = 45, .box_w = 5, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 145, .adv_w = 85, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 158, .adv_w = 47, .box_w = 3, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 163, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 176, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 189, .adv_w = 86, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 204, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 218, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 231, .adv_w = 77, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 244, .adv_w = 82, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 257, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 270, .adv_w = 29, .box_w = 2, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 275, .adv_w = 29, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 282, .adv_w = 74, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 295, .adv_w = 74, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 302, .adv_w = 74, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 314, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 327, .adv_w = 132, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 350, .adv_w = 94, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 367, .adv_w = 97, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 383, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 398, .adv_w = 106, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 415, .adv_w = 86, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 429, .adv_w = 81, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 441, .adv_w = 99, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 457, .adv_w = 104, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 469, .adv_w = 40, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 472, .adv_w = 66, .box_w = 5, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 483, .adv_w = 92, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 499, .adv_w = 76, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 506, .adv_w = 122, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 524, .adv_w = 104, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 538, .adv_w = 108, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 556, .adv_w = 92, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 571, .adv_w = 108, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 592, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 607, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 620, .adv_w = 75, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 629, .adv_w = 101, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 642, .adv_w = 91, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 660, .adv_w = 144, .box_w = 9, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 683, .adv_w = 86, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 699, .adv_w = 83, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 716, .adv_w = 84, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 732, .adv_w = 43, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 740, .adv_w = 45, .box_w = 5, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 756, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 761, .adv_w = 75, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 769, .adv_w = 64, .box_w = 4, .box_h = 1, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 771, .adv_w = 77, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = 5},
- {.bitmap_index = 773, .adv_w = 77, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 783, .adv_w = 87, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 796, .adv_w = 73, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 805, .adv_w = 87, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 818, .adv_w = 78, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 828, .adv_w = 45, .box_w = 4, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 838, .adv_w = 88, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 851, .adv_w = 87, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 863, .adv_w = 36, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 868, .adv_w = 36, .box_w = 3, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 876, .adv_w = 79, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 888, .adv_w = 36, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 892, .adv_w = 135, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 907, .adv_w = 87, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 916, .adv_w = 81, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 925, .adv_w = 87, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 939, .adv_w = 87, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 951, .adv_w = 52, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 958, .adv_w = 64, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 967, .adv_w = 53, .box_w = 4, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 977, .adv_w = 87, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 986, .adv_w = 72, .box_w = 6, .box_h = 4, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 998, .adv_w = 115, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1015, .adv_w = 71, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1026, .adv_w = 72, .box_w = 6, .box_h = 5, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1041, .adv_w = 67, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1050, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1060, .adv_w = 38, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1065, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1075, .adv_w = 74, .box_w = 5, .box_h = 2, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 1080, .adv_w = 54, .box_w = 3, .box_h = 3, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 1085, .adv_w = 40, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 1089, .adv_w = 128, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1118, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1138, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1166, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1188, .adv_w = 88, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1207, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1239, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1271, .adv_w = 144, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1306, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1331, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1355, .adv_w = 128, .box_w = 8, .box_h = 10, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1395, .adv_w = 64, .box_w = 4, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1408, .adv_w = 96, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1428, .adv_w = 144, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1461, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1482, .adv_w = 112, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 1501, .adv_w = 112, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1527, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1541, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1552, .adv_w = 112, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 1571, .adv_w = 112, .box_w = 9, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1600, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1621, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1642, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1666, .adv_w = 112, .box_w = 7, .box_h = 2, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 1671, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1698, .adv_w = 160, .box_w = 11, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1741, .adv_w = 144, .box_w = 11, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1779, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1810, .adv_w = 112, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1828, .adv_w = 112, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1847, .adv_w = 160, .box_w = 11, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1885, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1901, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1931, .adv_w = 128, .box_w = 9, .box_h = 9, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1963, .adv_w = 112, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1994, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2014, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2039, .adv_w = 80, .box_w = 7, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 2067, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2091, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2116, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2139, .adv_w = 128, .box_w = 10, .box_h = 10, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 2177, .adv_w = 96, .box_w = 6, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2191, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2227, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2248, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2272, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2297, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2321, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2340, .adv_w = 160, .box_w = 11, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2375, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2403, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2423, .adv_w = 128, .box_w = 9, .box_h = 9, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 2458, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2485, .adv_w = 96, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2505, .adv_w = 129, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x1f72, 0xef51, 0xef58, 0xef5b, 0xef5c, 0xef5d, 0xef61,
- 0xef63, 0xef65, 0xef69, 0xef6c, 0xef71, 0xef76, 0xef77, 0xef78,
- 0xef8e, 0xef98, 0xef9b, 0xef9c, 0xef9d, 0xefa1, 0xefa2, 0xefa3,
- 0xefa4, 0xefb7, 0xefb8, 0xefbe, 0xefc0, 0xefc1, 0xefc4, 0xefc7,
- 0xefc8, 0xefc9, 0xefcb, 0xefe3, 0xefe5, 0xf014, 0xf015, 0xf017,
- 0xf037, 0xf03a, 0xf043, 0xf06c, 0xf074, 0xf0ab, 0xf13b, 0xf190,
- 0xf191, 0xf192, 0xf193, 0xf194, 0xf1d7, 0xf1e3, 0xf23d, 0xf254,
- 0xf4aa, 0xf712, 0xf7f2
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 176, .range_length = 63475, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 59, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 0, 1, 2, 0, 3, 4, 5,
- 2, 6, 7, 8, 9, 10, 9, 10,
- 11, 12, 0, 13, 14, 15, 16, 17,
- 18, 19, 12, 20, 20, 0, 0, 0,
- 21, 22, 23, 24, 25, 22, 26, 27,
- 28, 29, 29, 30, 31, 32, 29, 29,
- 22, 33, 34, 35, 3, 36, 30, 37,
- 37, 38, 39, 40, 41, 42, 43, 0,
- 44, 0, 45, 46, 47, 48, 49, 50,
- 51, 45, 52, 52, 53, 48, 45, 45,
- 46, 46, 54, 55, 56, 57, 51, 58,
- 58, 59, 58, 60, 41, 0, 0, 9,
- 61, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 0, 1, 2, 0, 3, 4, 5,
- 2, 6, 7, 8, 9, 10, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 12,
- 18, 19, 20, 21, 21, 0, 0, 0,
- 22, 23, 24, 25, 23, 25, 25, 25,
- 23, 25, 25, 26, 25, 25, 25, 25,
- 23, 25, 23, 25, 3, 27, 28, 29,
- 29, 30, 31, 32, 33, 34, 35, 0,
- 36, 0, 37, 38, 39, 39, 39, 0,
- 39, 38, 40, 41, 38, 38, 42, 42,
- 39, 42, 39, 42, 43, 44, 45, 46,
- 46, 47, 46, 48, 0, 0, 35, 9,
- 49, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0
-};
-
-/*Kern values between classes*/
-static const int8_t kern_class_values[] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 0, 3, -3, 0, 0,
- 0, 0, -7, -8, 1, 6, 3, 2,
- -5, 1, 6, 0, 5, 1, 4, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 8, 1, -1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 3, 0, -4, 0, 0, 0, 0,
- 0, -3, 2, 3, 0, 0, -1, 0,
- -1, 1, 0, -1, 0, -1, -1, -3,
- 0, 0, 0, 0, -1, 0, 0, -2,
- -2, 0, 0, -1, 0, -3, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- -1, 0, -2, 0, -3, 0, -15, 0,
- 0, -3, 0, 3, 4, 0, 0, -3,
- 1, 1, 4, 3, -2, 3, 0, 0,
- -7, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -3, -2, -6, 0, -5,
- -1, 0, 0, 0, 0, 0, 5, 0,
- -4, -1, 0, 0, 0, -2, 0, 0,
- -1, -9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -10, -1, 5,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 4,
- 0, 1, 0, 0, -3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5, 1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1,
- 3, 1, 4, -1, 0, 0, 3, -1,
- -4, -18, 1, 3, 3, 0, -2, 0,
- 5, 0, 4, 0, 4, 0, -12, 0,
- -2, 4, 0, 4, -1, 3, 1, 0,
- 0, 0, -1, 0, 0, -2, 10, 0,
- 10, 0, 4, 0, 5, 2, 2, 4,
- 0, 0, 0, -5, 0, 0, 0, 0,
- 0, -1, 0, 1, -2, -2, -3, 1,
- 0, -1, 0, 0, 0, -5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -7, 0, -8, 0, 0, 0,
- 0, -1, 0, 13, -2, -2, 1, 1,
- -1, 0, -2, 1, 0, 0, -7, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -12, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -8, 0, 8, 0, 0, -5, 0,
- 4, 0, -9, -12, -9, -3, 4, 0,
- 0, -9, 0, 2, -3, 0, -2, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 3, 4, -16, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 0, 1, 0, 0, 0,
- 0, 0, 1, 1, -2, -3, 0, 0,
- 0, -1, 0, 0, -1, 0, 0, 0,
- -3, 0, -1, 0, -3, -3, 0, -3,
- -4, -4, -2, 0, -3, 0, -3, 0,
- 0, 0, 0, -1, 0, 0, 1, 0,
- 1, -1, 0, 0, 0, 0, 0, 1,
- -1, 0, 0, 0, -1, 1, 1, 0,
- 0, 0, 0, -2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, -1, 0,
- -2, 0, -2, 0, 0, -1, 0, 4,
- 0, 0, -1, 0, 0, 0, 0, 0,
- 0, 0, -1, -1, 0, 0, -1, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -1, -1, 0, -1, -2, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- 0, -1, -1, -1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -1, 0, 0,
- 0, 0, -1, -2, 0, -2, 0, -4,
- -1, -4, 3, 0, 0, -3, 1, 3,
- 3, 0, -3, 0, -2, 0, 0, -6,
- 1, -1, 1, -7, 1, 0, 0, 0,
- -7, 0, -7, -1, -11, -1, 0, -6,
- 0, 3, 4, 0, 2, 0, 0, 0,
- 0, 0, 0, -2, -2, 0, -4, 0,
- 0, 0, -1, 0, 0, 0, -1, 0,
- 0, 0, 0, 0, -1, -1, 0, -1,
- -2, 0, 0, 0, 0, 0, 0, 0,
- -1, -1, 0, -1, -2, -1, 0, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, -1, 0, -2,
- 0, -1, 0, -3, 1, 0, 0, -2,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 0, -1, 0, 0, 0, 0, 0, 1,
- 0, 0, -1, 0, -1, -1, -2, 0,
- 0, 0, 0, 0, 0, 0, 1, 0,
- -1, 0, 0, 0, 0, -1, -2, 0,
- -2, 0, 4, -1, 0, -4, 0, 0,
- 3, -6, -7, -5, -3, 1, 0, -1,
- -8, -2, 0, -2, 0, -3, 2, -2,
- -8, 0, -3, 0, 0, 1, 0, 1,
- -1, 0, 1, 0, -4, -5, 0, -6,
- -3, -3, -3, -4, -2, -3, 0, -2,
- -3, 1, 0, 0, 0, -1, 0, 0,
- 0, 1, 0, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- 0, -1, 0, 0, -1, 0, -2, -3,
- -3, 0, 0, -4, 0, 0, 0, 0,
- 0, 0, -1, 0, 0, 0, 0, 1,
- -1, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 6, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, 0, 0, 0,
- -2, 0, 0, 0, 0, -6, -4, 0,
- 0, 0, -2, -6, 0, 0, -1, 1,
- 0, -3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, -2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, -2, 0,
- 0, 0, 0, 2, 0, 1, -3, -3,
- 0, -1, -1, -2, 0, 0, 0, 0,
- 0, 0, -4, 0, -1, 0, -2, -1,
- 0, -3, -3, -4, -1, 0, -3, 0,
- -4, 0, 0, 0, 0, 10, 0, 0,
- 1, 0, 0, -2, 0, 1, 0, -6,
- 0, 0, 0, 0, 0, -12, -2, 4,
- 4, -1, -5, 0, 1, -2, 0, -6,
- -1, -2, 1, -9, -1, 2, 0, 2,
- -4, -2, -5, -4, -5, 0, 0, -8,
- 0, 7, 0, 0, -1, 0, 0, 0,
- -1, -1, -1, -3, -4, 0, -12, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, 0, -1, -1, -2, 0, 0,
- -3, 0, -1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -3, 0, 0, 3,
- 0, 2, 0, -3, 1, -1, 0, -3,
- -1, 0, -2, -1, -1, 0, -2, -2,
- 0, 0, -1, 0, -1, -2, -2, 0,
- 0, -1, 0, 1, -1, 0, -3, 0,
- 0, 0, -3, 0, -2, 0, -2, -2,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, -3, 1, 0, -2, 0, -1, -2,
- -4, -1, -1, -1, 0, -1, -2, 0,
- 0, 0, 0, 0, 0, -1, -1, -1,
- 0, 0, 0, 0, 2, -1, 0, -1,
- 0, 0, 0, -1, -2, -1, -1, -2,
- -1, 0, 1, 5, 0, 0, -3, 0,
- -1, 3, 0, -1, -5, -2, 2, 0,
- 0, -6, -2, 1, -2, 1, 0, -1,
- -1, -4, 0, -2, 1, 0, 0, -2,
- 0, 0, 0, 1, 1, -3, -2, 0,
- -2, -1, -2, -1, -1, 0, -2, 1,
- -2, -2, 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -1, -1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, -2,
- 0, 0, -1, -1, 0, 0, 0, 0,
- -1, 0, 0, 0, 0, -1, 0, 0,
- 0, 0, 0, -1, 0, 0, 0, 0,
- -2, 0, -3, 0, 0, 0, -4, 0,
- 1, -3, 3, 0, -1, -6, 0, 0,
- -3, -1, 0, -5, -3, -4, 0, 0,
- -6, -1, -5, -5, -6, 0, -3, 0,
- 1, 9, -2, 0, -3, -1, 0, -1,
- -2, -3, -2, -5, -5, -3, -1, 0,
- 0, -1, 0, 0, 0, 0, -9, -1,
- 4, 3, -3, -5, 0, 0, -4, 0,
- -6, -1, -1, 3, -12, -2, 0, 0,
- 0, -8, -2, -7, -1, -9, 0, 0,
- -9, 0, 8, 0, 0, -1, 0, 0,
- 0, 0, -1, -1, -5, -1, 0, -8,
- 0, 0, 0, 0, -4, 0, -1, 0,
- 0, -4, -6, 0, 0, -1, -2, -4,
- -1, 0, -1, 0, 0, 0, 0, -6,
- -1, -4, -4, -1, -2, -3, -1, -2,
- 0, -3, -1, -4, -2, 0, -2, -2,
- -1, -2, 0, 1, 0, -1, -4, 0,
- 3, 0, -2, 0, 0, 0, 0, 2,
- 0, 1, -3, 5, 0, -1, -1, -2,
- 0, 0, 0, 0, 0, 0, -4, 0,
- -1, 0, -2, -1, 0, -3, -3, -4,
- -1, 0, -3, 1, 5, 0, 0, 0,
- 0, 10, 0, 0, 1, 0, 0, -2,
- 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, -3, 0, 0, 0, 0, 0, -1,
- 0, 0, 0, -1, -1, 0, 0, -3,
- -1, 0, 0, -3, 0, 2, -1, 0,
- 0, 0, 0, 0, 0, 1, 0, 0,
- 0, 0, 2, 3, 1, -1, 0, -4,
- -2, 0, 4, -4, -4, -3, -3, 5,
- 2, 1, -11, -1, 3, -1, 0, -1,
- 1, -1, -4, 0, -1, 1, -2, -1,
- -4, -1, 0, 0, 4, 3, 0, -4,
- 0, -7, -2, 4, -2, -5, 0, -2,
- -4, -4, -1, 5, 1, 0, -2, 0,
- -3, 0, 1, 4, -3, -5, -5, -3,
- 4, 0, 0, -9, -1, 1, -2, -1,
- -3, 0, -3, -5, -2, -2, -1, 0,
- 0, -3, -3, -1, 0, 4, 3, -1,
- -7, 0, -7, -2, 0, -4, -7, 0,
- -4, -2, -4, -4, 3, 0, 0, -2,
- 0, -3, -1, 0, -1, -2, 0, 2,
- -4, 1, 0, 0, -7, 0, -1, -3,
- -2, -1, -4, -3, -4, -3, 0, -4,
- -1, -3, -2, -4, -1, 0, 0, 0,
- 6, -2, 0, -4, -1, 0, -1, -3,
- -3, -3, -4, -5, -2, -3, 3, 0,
- -2, 0, -6, -2, 1, 3, -4, -5,
- -3, -4, 4, -1, 1, -12, -2, 3,
- -3, -2, -5, 0, -4, -5, -2, -1,
- -1, -1, -3, -4, 0, 0, 0, 4,
- 4, -1, -8, 0, -8, -3, 3, -5,
- -9, -3, -4, -5, -6, -4, 3, 0,
- 0, 0, 0, -2, 0, 0, 1, -2,
- 3, 1, -2, 3, 0, 0, -4, 0,
- 0, 0, 0, 0, 0, -1, 0, 0,
- 0, 0, 0, 0, -1, 0, 0, 0,
- 0, 1, 4, 0, 0, -2, 0, 0,
- 0, 0, -1, -1, -2, 0, 0, 0,
- 0, 1, 0, 0, 0, 0, 1, 0,
- -1, 0, 5, 0, 2, 0, 0, -2,
- 0, 3, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 4, 0, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -8, 0, -1, 2, 0, 4,
- 0, 0, 13, 2, -3, -3, 1, 1,
- -1, 0, -6, 0, 0, 6, -8, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -9, 5, 18, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, -2,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, 0, -3, 0,
- 0, 0, 0, 0, 1, 17, -3, -1,
- 4, 3, -3, 1, 0, 0, 1, 1,
- -2, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -17, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -4,
- 0, 0, 0, -3, 0, 0, 0, 0,
- -3, -1, 0, 0, 0, -3, 0, -2,
- 0, -6, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -9, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, 0, 0, -2, 0, -2, 0,
- -3, 0, 0, 0, -2, 1, -2, 0,
- 0, -3, -1, -3, 0, 0, -3, 0,
- -1, 0, -6, 0, -1, 0, 0, -10,
- -2, -5, -1, -5, 0, 0, -9, 0,
- -3, -1, 0, 0, 0, 0, 0, 0,
- 0, 0, -2, -2, -1, -2, 0, 0,
- 0, 0, -3, 0, -3, 2, -1, 3,
- 0, -1, -3, -1, -2, -2, 0, -2,
- -1, -1, 1, -3, 0, 0, 0, 0,
- -11, -1, -2, 0, -3, 0, -1, -6,
- -1, 0, 0, -1, -1, 0, 0, 0,
- 0, 1, 0, -1, -2, -1, 2, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0, 0, 0,
- 0, -3, 0, -1, 0, 0, 0, -3,
- 1, 0, 0, 0, -3, -1, -3, 0,
- 0, -4, 0, -1, 0, -6, 0, 0,
- 0, 0, -12, 0, -3, -5, -6, 0,
- 0, -9, 0, -1, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, -1, -2, -1,
- -2, 0, 0, 0, 2, -2, 0, 4,
- 6, -1, -1, -4, 2, 6, 2, 3,
- -3, 2, 5, 2, 4, 3, 3, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 8, 6, -2, -1, 0, -1,
- 10, 6, 10, 0, 0, 0, 1, 0,
- 0, 5, 0, 0, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -1, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, -11, -2, -1, -5,
- -6, 0, 0, -9, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, -11, -2, -1,
- -5, -6, 0, 0, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, 0, 0, 0, -3, 1, 0, -1,
- 1, 2, 1, -4, 0, 0, -1, 1,
- 0, 1, 0, 0, 0, 0, -3, 0,
- -1, -1, -3, 0, -1, -5, 0, 8,
- -1, 0, -3, -1, 0, -1, -2, 0,
- -1, -4, -3, -2, 0, 0, 0, -2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0, 0, -11,
- -2, -1, -5, -6, 0, 0, -9, 0,
- 0, 0, 0, 0, 0, 6, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -2, 0, -4, -2, -1, 4, -1, -1,
- -5, 0, -1, 0, -1, -3, 0, 3,
- 0, 1, 0, 1, -3, -5, -2, 0,
- -5, -2, -3, -5, -5, 0, -2, -3,
- -2, -2, -1, -1, -2, -1, 0, -1,
- 0, 2, 0, 2, -1, 0, 4, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -1, -1, -1, 0, 0,
- -3, 0, -1, 0, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, -1, 0, -2,
- 0, 0, 0, 0, -1, 0, 0, -2,
- -1, 1, 0, -2, -2, -1, 0, -4,
- -1, -3, -1, -2, 0, -2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -9, 0, 4, 0, 0, -2, 0,
- 0, 0, 0, -2, 0, -1, 0, 0,
- -1, 0, 0, -1, 0, -3, 0, 0,
- 5, -2, -4, -4, 1, 1, 1, 0,
- -4, 1, 2, 1, 4, 1, 4, -1,
- -3, 0, 0, -5, 0, 0, -4, -3,
- 0, 0, -3, 0, -2, -2, 0, -2,
- 0, -2, 0, -1, 2, 0, -1, -4,
- -1, 5, 0, 0, -1, 0, -3, 0,
- 0, 2, -3, 0, 1, -1, 1, 0,
- 0, -4, 0, -1, 0, 0, -1, 1,
- -1, 0, 0, 0, -5, -2, -3, 0,
- -4, 0, 0, -6, 0, 5, -1, 0,
- -2, 0, 1, 0, -1, 0, -1, -4,
- 0, -1, 1, 0, 0, 0, 0, -1,
- 0, 0, 1, -2, 0, 0, 0, -2,
- -1, 0, -2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -8, 0, 3, 0,
- 0, -1, 0, 0, 0, 0, 0, 0,
- -1, -1, 0, 0, 0, 3, 0, 3,
- 0, 0, 0, 0, 0, -8, -7, 0,
- 6, 4, 2, -5, 1, 5, 0, 5,
- 0, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 7, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0
-};
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 61,
- .right_class_cnt = 49,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 1
-};
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t font_1 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 10, /*The maximum line height required by the font*/
- .base_line = 2, /*Baseline measured from the bottom of the line*/
-#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
- .subpx = LV_FONT_SUBPX_NONE,
-#endif
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if FONT_1*/
-#endif
diff --git a/lib/lvgl/tests/src/test_fonts/font_1.fnt b/lib/lvgl/tests/src/test_fonts/font_1.fnt
deleted file mode 100644
index bc701d5..0000000
Binary files a/lib/lvgl/tests/src/test_fonts/font_1.fnt and /dev/null differ
diff --git a/lib/lvgl/tests/src/test_fonts/font_2.c b/lib/lvgl/tests/src/test_fonts/font_2.c
deleted file mode 100644
index 0bb10f2..0000000
--- a/lib/lvgl/tests/src/test_fonts/font_2.c
+++ /dev/null
@@ -1,1410 +0,0 @@
-#if LV_BUILD_TEST
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 8 px
- * Bpp: 4
- * Opts: --bpp 4 --size 8 --font ../Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font ../FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --no-compress --no-prefilter --force-fast-kern-format --format lvgl -o ..\generated_fonts/font_2.c
- ******************************************************************************/
-
-#ifndef FONT_2
-#define FONT_2 1
-#endif
-
-#if FONT_2
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0x58, 0x57, 0x46, 0x23, 0x46,
-
- /* U+22 "\"" */
- 0x73, 0x97, 0x29, 0x0, 0x0,
-
- /* U+23 "#" */
- 0x4, 0x52, 0x60, 0x4b, 0x9b, 0xa3, 0x8, 0x7,
- 0x20, 0x6c, 0x8c, 0x81, 0x9, 0x9, 0x0,
-
- /* U+24 "$" */
- 0x0, 0x80, 0x2, 0xbd, 0xa2, 0x76, 0x80, 0x0,
- 0x8d, 0x81, 0x0, 0x84, 0x95, 0xad, 0xb3, 0x0,
- 0x80, 0x0,
-
- /* U+25 "%" */
- 0x58, 0x70, 0x63, 0x8, 0x8, 0x36, 0x0, 0x27,
- 0x58, 0x67, 0x10, 0x8, 0x27, 0x26, 0x6, 0x20,
- 0x88, 0x20,
-
- /* U+26 "&" */
- 0x9, 0x99, 0x0, 0xb, 0x3a, 0x0, 0x19, 0xc2,
- 0x20, 0x83, 0x1a, 0xa0, 0x3a, 0x99, 0x92, 0x0,
- 0x0, 0x0,
-
- /* U+27 "'" */
- 0x72, 0x72, 0x0,
-
- /* U+28 "(" */
- 0x8, 0x20, 0xb0, 0x1a, 0x3, 0x80, 0x1a, 0x0,
- 0xb0, 0x8, 0x20,
-
- /* U+29 ")" */
- 0x73, 0x19, 0xb, 0xc, 0xb, 0x19, 0x73,
-
- /* U+2A "*" */
- 0x48, 0x40, 0x6e, 0x80, 0x15, 0x10,
-
- /* U+2B "+" */
- 0x0, 0x20, 0x0, 0xa, 0x0, 0x49, 0xd9, 0x10,
- 0xa, 0x0,
-
- /* U+2C "," */
- 0x0, 0x75, 0x71,
-
- /* U+2D "-" */
- 0x5a, 0x60,
-
- /* U+2E "." */
- 0x0, 0x74,
-
- /* U+2F "/" */
- 0x0, 0xa, 0x0, 0x2, 0x80, 0x0, 0x82, 0x0,
- 0xa, 0x0, 0x4, 0x60, 0x0, 0x91, 0x0, 0x19,
- 0x0, 0x0,
-
- /* U+30 "0" */
- 0xa, 0xbb, 0x26, 0x60, 0x1b, 0x93, 0x0, 0xc6,
- 0x60, 0x1b, 0xa, 0xbb, 0x20,
-
- /* U+31 "1" */
- 0x9e, 0x20, 0xa2, 0xa, 0x20, 0xa2, 0xa, 0x20,
-
- /* U+32 "2" */
- 0x6a, 0xb9, 0x0, 0x0, 0xc0, 0x0, 0x58, 0x0,
- 0x87, 0x0, 0x9e, 0xaa, 0x30,
-
- /* U+33 "3" */
- 0x7a, 0xbe, 0x0, 0xa, 0x20, 0x4, 0xa9, 0x0,
- 0x0, 0xa2, 0x8a, 0xa9, 0x0,
-
- /* U+34 "4" */
- 0x0, 0x49, 0x0, 0x3, 0xa0, 0x0, 0x1b, 0x8,
- 0x20, 0x8b, 0xad, 0xb2, 0x0, 0x9, 0x30,
-
- /* U+35 "5" */
- 0x3d, 0xaa, 0x5, 0x60, 0x0, 0x5b, 0xa8, 0x0,
- 0x0, 0x93, 0x7a, 0xaa, 0x0,
-
- /* U+36 "6" */
- 0x9, 0xaa, 0x36, 0x70, 0x0, 0x98, 0x9a, 0x26,
- 0x80, 0x2a, 0x9, 0x9a, 0x40,
-
- /* U+37 "7" */
- 0xca, 0xad, 0x67, 0x0, 0xc0, 0x0, 0x67, 0x0,
- 0xc, 0x0, 0x6, 0x70, 0x0,
-
- /* U+38 "8" */
- 0x1a, 0xab, 0x25, 0x60, 0x48, 0x1d, 0xad, 0x38,
- 0x40, 0x1b, 0x3a, 0x9a, 0x40,
-
- /* U+39 "9" */
- 0x4a, 0x99, 0xb, 0x10, 0x95, 0x3a, 0x99, 0x80,
- 0x0, 0x95, 0x3a, 0xb8, 0x0,
-
- /* U+3A ":" */
- 0x74, 0x0, 0x0, 0x74,
-
- /* U+3B ";" */
- 0x74, 0x0, 0x0, 0x75, 0x62, 0x0,
-
- /* U+3C "<" */
- 0x0, 0x1, 0x0, 0x49, 0x80, 0x5c, 0x30, 0x0,
- 0x16, 0x91, 0x0, 0x0, 0x0,
-
- /* U+3D "=" */
- 0x49, 0x99, 0x10, 0x0, 0x0, 0x49, 0x99, 0x10,
-
- /* U+3E ">" */
- 0x10, 0x0, 0x3, 0x98, 0x20, 0x0, 0x6d, 0x14,
- 0x94, 0x0, 0x0, 0x0, 0x0,
-
- /* U+3F "?" */
- 0x6a, 0xb9, 0x0, 0x0, 0xc0, 0x0, 0xa4, 0x0,
- 0x3, 0x0, 0x2, 0x80, 0x0,
-
- /* U+40 "@" */
- 0x3, 0x87, 0x78, 0x50, 0x28, 0x4a, 0x9c, 0x75,
- 0x80, 0xb0, 0xa, 0x28, 0x80, 0xb0, 0xa, 0x28,
- 0x28, 0x49, 0x99, 0xa6, 0x3, 0x88, 0x75, 0x0,
-
- /* U+41 "A" */
- 0x0, 0xb, 0x90, 0x0, 0x3, 0x8a, 0x10, 0x0,
- 0xb1, 0x39, 0x0, 0x4d, 0x99, 0xd1, 0xb, 0x10,
- 0x3, 0x90,
-
- /* U+42 "B" */
- 0x2d, 0x99, 0xb1, 0x2a, 0x0, 0x84, 0x2d, 0x9a,
- 0xd1, 0x2a, 0x0, 0x39, 0x2d, 0x99, 0xb4,
-
- /* U+43 "C" */
- 0x7, 0xba, 0xa2, 0x59, 0x0, 0x0, 0x93, 0x0,
- 0x0, 0x59, 0x0, 0x0, 0x7, 0xba, 0xa2,
-
- /* U+44 "D" */
- 0x2e, 0xab, 0xb3, 0x2, 0xa0, 0x1, 0xc0, 0x2a,
- 0x0, 0x9, 0x22, 0xa0, 0x1, 0xc0, 0x2e, 0xab,
- 0xb3, 0x0,
-
- /* U+45 "E" */
- 0x2e, 0xaa, 0x82, 0xa0, 0x0, 0x2d, 0xaa, 0x42,
- 0xa0, 0x0, 0x2e, 0xaa, 0x90,
-
- /* U+46 "F" */
- 0x2e, 0xaa, 0x82, 0xa0, 0x0, 0x2e, 0xaa, 0x42,
- 0xa0, 0x0, 0x2a, 0x0, 0x0,
-
- /* U+47 "G" */
- 0x7, 0xba, 0xa2, 0x59, 0x0, 0x0, 0x93, 0x0,
- 0x23, 0x59, 0x0, 0x47, 0x7, 0xba, 0xa3,
-
- /* U+48 "H" */
- 0x2a, 0x0, 0x2a, 0x2a, 0x0, 0x2a, 0x2e, 0xaa,
- 0xba, 0x2a, 0x0, 0x2a, 0x2a, 0x0, 0x2a,
-
- /* U+49 "I" */
- 0x2a, 0x2a, 0x2a, 0x2a, 0x2a,
-
- /* U+4A "J" */
- 0x5, 0xad, 0x50, 0x0, 0x75, 0x0, 0x7, 0x50,
- 0x0, 0x84, 0x9, 0xab, 0x0,
-
- /* U+4B "K" */
- 0x2a, 0x1, 0xa2, 0x2a, 0x1b, 0x20, 0x2c, 0xc7,
- 0x0, 0x2d, 0x19, 0x50, 0x2a, 0x0, 0xa4,
-
- /* U+4C "L" */
- 0x2a, 0x0, 0x2, 0xa0, 0x0, 0x2a, 0x0, 0x2,
- 0xa0, 0x0, 0x2e, 0xaa, 0x70,
-
- /* U+4D "M" */
- 0x2c, 0x0, 0x3, 0xc2, 0xd7, 0x0, 0xbc, 0x29,
- 0x92, 0x84, 0xc2, 0x91, 0xb9, 0xc, 0x29, 0x3,
- 0x0, 0xc0,
-
- /* U+4E "N" */
- 0x2d, 0x10, 0x2a, 0x2c, 0xb0, 0x2a, 0x2a, 0x4b,
- 0x2a, 0x2a, 0x5, 0xca, 0x2a, 0x0, 0x7a,
-
- /* U+4F "O" */
- 0x7, 0xbb, 0xb3, 0x5, 0x90, 0x1, 0xc1, 0x93,
- 0x0, 0x8, 0x45, 0x90, 0x1, 0xc1, 0x7, 0xbb,
- 0xb3, 0x0,
-
- /* U+50 "P" */
- 0x2e, 0xaa, 0x90, 0x2a, 0x0, 0x84, 0x2a, 0x0,
- 0xa3, 0x2e, 0xaa, 0x60, 0x2a, 0x0, 0x0,
-
- /* U+51 "Q" */
- 0x7, 0xbb, 0xb3, 0x5, 0x90, 0x1, 0xc1, 0x93,
- 0x0, 0x8, 0x45, 0x90, 0x0, 0xc1, 0x7, 0xbb,
- 0xb3, 0x0, 0x0, 0x39, 0x93,
-
- /* U+52 "R" */
- 0x2e, 0xaa, 0x90, 0x2a, 0x0, 0x84, 0x2a, 0x0,
- 0xa3, 0x2d, 0xac, 0x80, 0x2a, 0x1, 0xa1,
-
- /* U+53 "S" */
- 0x2a, 0xaa, 0x27, 0x60, 0x0, 0x8, 0x98, 0x10,
- 0x0, 0x49, 0x5a, 0xaa, 0x30,
-
- /* U+54 "T" */
- 0xaa, 0xea, 0x60, 0xc, 0x0, 0x0, 0xc0, 0x0,
- 0xc, 0x0, 0x0, 0xc0, 0x0,
-
- /* U+55 "U" */
- 0x39, 0x0, 0x48, 0x39, 0x0, 0x48, 0x39, 0x0,
- 0x48, 0x1c, 0x0, 0x66, 0x6, 0xba, 0xa0,
-
- /* U+56 "V" */
- 0xb, 0x10, 0x5, 0x70, 0x49, 0x0, 0xb0, 0x0,
- 0xc1, 0x57, 0x0, 0x4, 0x9c, 0x0, 0x0, 0xc,
- 0x70, 0x0,
-
- /* U+57 "W" */
- 0x94, 0x0, 0xf1, 0x3, 0x93, 0xa0, 0x69, 0x70,
- 0x93, 0xc, 0xb, 0xb, 0xb, 0x0, 0x79, 0x80,
- 0x89, 0x70, 0x1, 0xf2, 0x2, 0xf1, 0x0,
-
- /* U+58 "X" */
- 0x58, 0x2, 0xa0, 0x8, 0x7b, 0x10, 0x0, 0xf5,
- 0x0, 0xa, 0x4b, 0x10, 0x76, 0x2, 0xb0,
-
- /* U+59 "Y" */
- 0xa, 0x20, 0xb, 0x0, 0x1b, 0x9, 0x30, 0x0,
- 0x5b, 0x80, 0x0, 0x0, 0xd0, 0x0, 0x0, 0xc,
- 0x0, 0x0,
-
- /* U+5A "Z" */
- 0x6a, 0xac, 0xd0, 0x0, 0x1b, 0x10, 0x0, 0xb2,
- 0x0, 0xb, 0x30, 0x0, 0x8d, 0xaa, 0xa0,
-
- /* U+5B "[" */
- 0x2d, 0x42, 0x90, 0x29, 0x2, 0x90, 0x29, 0x2,
- 0x90, 0x2d, 0x40,
-
- /* U+5C "\\" */
- 0x19, 0x0, 0x0, 0xa0, 0x0, 0x5, 0x50, 0x0,
- 0xa, 0x0, 0x0, 0x91, 0x0, 0x3, 0x70, 0x0,
- 0xa, 0x0,
-
- /* U+5D "]" */
- 0x8c, 0xc, 0xc, 0xc, 0xc, 0xc, 0x8c,
-
- /* U+5E "^" */
- 0x3, 0xc0, 0x0, 0x94, 0x50, 0x27, 0x9, 0x0,
-
- /* U+5F "_" */
- 0x77, 0x77,
-
- /* U+60 "`" */
- 0x6, 0x60,
-
- /* U+61 "a" */
- 0x29, 0x98, 0x2, 0x98, 0xd0, 0x84, 0xc, 0x13,
- 0xb9, 0xd1,
-
- /* U+62 "b" */
- 0x48, 0x0, 0x0, 0x48, 0x0, 0x0, 0x4c, 0xab,
- 0x50, 0x4a, 0x0, 0xc0, 0x4a, 0x0, 0xc0, 0x4c,
- 0xaa, 0x50,
-
- /* U+63 "c" */
- 0x1a, 0xaa, 0x18, 0x40, 0x0, 0x84, 0x0, 0x1,
- 0xaa, 0xa1,
-
- /* U+64 "d" */
- 0x0, 0x0, 0xb0, 0x0, 0xb, 0x1a, 0xaa, 0xb9,
- 0x40, 0x3b, 0x94, 0x2, 0xb1, 0xa9, 0x9b,
-
- /* U+65 "e" */
- 0x19, 0x99, 0x19, 0x98, 0x86, 0x85, 0x1, 0x1,
- 0xaa, 0xb1,
-
- /* U+66 "f" */
- 0xa, 0xa0, 0x2a, 0x0, 0x9d, 0x70, 0x29, 0x0,
- 0x29, 0x0, 0x29, 0x0,
-
- /* U+67 "g" */
- 0x1a, 0x99, 0xb9, 0x40, 0x1c, 0x94, 0x2, 0xc1,
- 0xaa, 0xab, 0x18, 0x9a, 0x30,
-
- /* U+68 "h" */
- 0x48, 0x0, 0x4, 0x80, 0x0, 0x4c, 0x9b, 0x44,
- 0x90, 0x1b, 0x48, 0x0, 0xc4, 0x80, 0xc,
-
- /* U+69 "i" */
- 0x37, 0x0, 0x48, 0x48, 0x48, 0x48,
-
- /* U+6A "j" */
- 0x3, 0x70, 0x0, 0x3, 0x80, 0x38, 0x3, 0x80,
- 0x38, 0x6b, 0x40,
-
- /* U+6B "k" */
- 0x48, 0x0, 0x4, 0x80, 0x0, 0x48, 0xa, 0x44,
- 0x9c, 0x30, 0x4d, 0x6a, 0x4, 0x80, 0x77,
-
- /* U+6C "l" */
- 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
-
- /* U+6D "m" */
- 0x4c, 0x9b, 0x89, 0xb4, 0x49, 0x3, 0xb0, 0xb,
- 0x48, 0x2, 0xa0, 0xc, 0x48, 0x2, 0xa0, 0xc,
-
- /* U+6E "n" */
- 0x4c, 0x9b, 0x44, 0x90, 0x1b, 0x48, 0x0, 0xc4,
- 0x80, 0xc,
-
- /* U+6F "o" */
- 0x1a, 0xaa, 0x18, 0x40, 0x3a, 0x84, 0x3, 0xa1,
- 0xaa, 0xa1,
-
- /* U+70 "p" */
- 0x4c, 0xab, 0x50, 0x4a, 0x0, 0xc0, 0x4a, 0x0,
- 0xc0, 0x4c, 0xaa, 0x50, 0x48, 0x0, 0x0,
-
- /* U+71 "q" */
- 0x1a, 0xa9, 0xb9, 0x40, 0x3b, 0x94, 0x3, 0xb1,
- 0xaa, 0x9b, 0x0, 0x0, 0xb0,
-
- /* U+72 "r" */
- 0x4b, 0xa0, 0x4a, 0x0, 0x48, 0x0, 0x48, 0x0,
-
- /* U+73 "s" */
- 0x5b, 0x95, 0x87, 0x30, 0x3, 0x79, 0x7a, 0xa6,
-
- /* U+74 "t" */
- 0x29, 0x0, 0x9d, 0x70, 0x29, 0x0, 0x29, 0x0,
- 0xb, 0x90,
-
- /* U+75 "u" */
- 0x57, 0x1, 0xb5, 0x70, 0x1b, 0x48, 0x3, 0xb0,
- 0xa9, 0x9b,
-
- /* U+76 "v" */
- 0xb, 0x0, 0x84, 0x5, 0x70, 0xb0, 0x0, 0xb7,
- 0x50, 0x0, 0x6d, 0x0,
-
- /* U+77 "w" */
- 0xb0, 0xe, 0x20, 0xa0, 0x55, 0x59, 0x82, 0x80,
- 0xa, 0xa0, 0xa8, 0x20, 0x9, 0x80, 0x6b, 0x0,
-
- /* U+78 "x" */
- 0x67, 0x1b, 0x0, 0x9b, 0x10, 0xa, 0xb2, 0x7,
- 0x51, 0xb0,
-
- /* U+79 "y" */
- 0xb, 0x10, 0x83, 0x3, 0x81, 0xa0, 0x0, 0xaa,
- 0x30, 0x0, 0x4a, 0x0, 0xa, 0xb2, 0x0,
-
- /* U+7A "z" */
- 0x59, 0xbb, 0x1, 0xb1, 0xb, 0x20, 0x9c, 0x98,
-
- /* U+7B "{" */
- 0xa, 0x60, 0xc0, 0xc, 0x5, 0xb0, 0xc, 0x0,
- 0xc0, 0xa, 0x60,
-
- /* U+7C "|" */
- 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28,
-
- /* U+7D "}" */
- 0x97, 0x0, 0xb0, 0xb, 0x0, 0xd3, 0xb, 0x0,
- 0xb0, 0x97, 0x0,
-
- /* U+7E "~" */
- 0x29, 0x35, 0x15, 0x6, 0x80,
-
- /* U+B0 "°" */
- 0x26, 0x47, 0x7, 0x27, 0x50,
-
- /* U+2022 "•" */
- 0x0, 0x5d, 0x2,
-
- /* U+F001 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x26, 0xbe,
- 0x0, 0x8d, 0xff, 0xff, 0x0, 0xff, 0xe9, 0x5f,
- 0x0, 0xf3, 0x0, 0xf, 0x0, 0xf0, 0x0, 0xf,
- 0x0, 0xf0, 0xa, 0xff, 0xaf, 0xf0, 0xa, 0xfa,
- 0xaf, 0xa0, 0x0, 0x0,
-
- /* U+F008 "" */
- 0xbd, 0xcc, 0xce, 0xab, 0x8b, 0x0, 0x7, 0x58,
- 0xcd, 0x66, 0x6a, 0xac, 0xcd, 0x66, 0x6a, 0xac,
- 0x8b, 0x0, 0x7, 0x58, 0xbd, 0xcc, 0xce, 0xab,
-
- /* U+F00B "" */
- 0x34, 0x14, 0x44, 0x43, 0xff, 0x7f, 0xff, 0xff,
- 0xab, 0x4b, 0xbb, 0xba, 0xbc, 0x5c, 0xcc, 0xcb,
- 0xff, 0x7f, 0xff, 0xff, 0x67, 0x17, 0x88, 0x86,
- 0xff, 0x7f, 0xff, 0xff, 0xab, 0x4b, 0xbb, 0xba,
-
- /* U+F00C "" */
- 0x0, 0x0, 0x0, 0x9a, 0x0, 0x0, 0x9, 0xfa,
- 0xa9, 0x0, 0x9f, 0xa0, 0xaf, 0x99, 0xfa, 0x0,
- 0xa, 0xff, 0xa0, 0x0, 0x0, 0x99, 0x0, 0x0,
-
- /* U+F00D "" */
- 0x63, 0x0, 0x82, 0xcf, 0x4a, 0xf4, 0x1d, 0xff,
- 0x60, 0xa, 0xff, 0x30, 0xaf, 0x7d, 0xf3, 0xa6,
- 0x1, 0xb3,
-
- /* U+F011 "" */
- 0x0, 0xc, 0x51, 0x0, 0x1d, 0x7d, 0x6e, 0x70,
- 0x8d, 0xd, 0x65, 0xf1, 0xc7, 0xd, 0x60, 0xe6,
- 0xd7, 0x6, 0x20, 0xe6, 0x9d, 0x0, 0x4, 0xf2,
- 0x1e, 0xc7, 0x8f, 0x80, 0x1, 0x9d, 0xc6, 0x0,
-
- /* U+F013 "" */
- 0x0, 0xc, 0xc0, 0x0, 0x18, 0x8f, 0xf8, 0x81,
- 0x8f, 0xfe, 0xef, 0xf8, 0x2f, 0xe0, 0xe, 0xf2,
- 0x2f, 0xe0, 0xe, 0xf2, 0x8f, 0xfe, 0xef, 0xf8,
- 0x18, 0x8f, 0xf8, 0x81, 0x0, 0xc, 0xc0, 0x0,
-
- /* U+F015 "" */
- 0x0, 0x0, 0x30, 0x22, 0x0, 0x0, 0xaf, 0xaa,
- 0xa0, 0x1, 0xda, 0x6a, 0xfa, 0x3, 0xe8, 0xbf,
- 0xb8, 0xe3, 0xb6, 0xdf, 0xff, 0xd6, 0xb0, 0x8f,
- 0xfb, 0xff, 0x80, 0x8, 0xfc, 0xc, 0xf8, 0x0,
- 0x5b, 0x80, 0x8b, 0x50,
-
- /* U+F019 "" */
- 0x0, 0xf, 0xf0, 0x0, 0x0, 0xf, 0xf0, 0x0,
- 0x0, 0xf, 0xf0, 0x0, 0x7, 0xff, 0xff, 0x70,
- 0x0, 0x9f, 0xf9, 0x0, 0x78, 0x7a, 0xa7, 0x87,
- 0xff, 0xfb, 0xbf, 0xff, 0xff, 0xff, 0xfb, 0xbf,
-
- /* U+F01C "" */
- 0x5, 0xff, 0xff, 0xf5, 0x1, 0xe3, 0x0, 0x3,
- 0xe1, 0xa8, 0x0, 0x0, 0x8, 0xaf, 0xff, 0x60,
- 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff,
- 0xff, 0xff, 0xfd,
-
- /* U+F021 "" */
- 0x0, 0x0, 0x0, 0x3, 0x2, 0xbf, 0xfb, 0x3f,
- 0x2e, 0x91, 0x18, 0xff, 0x9a, 0x0, 0x6c, 0xff,
- 0x31, 0x0, 0x24, 0x44, 0x44, 0x42, 0x0, 0x13,
- 0xff, 0xc6, 0x0, 0xb9, 0xfe, 0xa5, 0x5b, 0xd1,
- 0xf2, 0x8c, 0xc8, 0x10, 0x30, 0x0, 0x0, 0x0,
-
- /* U+F026 "" */
- 0x0, 0x9, 0x34, 0xcf, 0xff, 0xff, 0xff, 0xff,
- 0xab, 0xff, 0x0, 0x4f, 0x0, 0x1,
-
- /* U+F027 "" */
- 0x0, 0x9, 0x0, 0x34, 0xcf, 0x1, 0xff, 0xff,
- 0x1b, 0xff, 0xff, 0x1b, 0xbb, 0xff, 0x1, 0x0,
- 0x4f, 0x0, 0x0, 0x1, 0x0,
-
- /* U+F028 "" */
- 0x0, 0x0, 0x0, 0x54, 0x0, 0x0, 0x90, 0x23,
- 0xb3, 0x34, 0xcf, 0x2, 0xc3, 0xbf, 0xff, 0xf1,
- 0xb5, 0x6c, 0xff, 0xff, 0x1b, 0x56, 0xca, 0xbf,
- 0xf0, 0x2c, 0x3a, 0x0, 0x4f, 0x2, 0x3b, 0x30,
- 0x0, 0x10, 0x5, 0x40,
-
- /* U+F03E "" */
- 0xdf, 0xff, 0xff, 0xfd, 0xf0, 0x7f, 0xff, 0xff,
- 0xf8, 0xcf, 0xb1, 0xbf, 0xfb, 0x5b, 0x0, 0xf,
- 0xf0, 0x0, 0x0, 0xf, 0xdf, 0xff, 0xff, 0xfd,
-
- /* U+F048 "" */
- 0x40, 0x0, 0x2f, 0x20, 0x8f, 0xf2, 0x9f, 0xff,
- 0xcf, 0xff, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xf2,
- 0x2e, 0xfb, 0x10, 0x19,
-
- /* U+F04B "" */
- 0x0, 0x0, 0x0, 0xd, 0xa1, 0x0, 0x0, 0xff,
- 0xf7, 0x0, 0xf, 0xff, 0xfd, 0x40, 0xff, 0xff,
- 0xff, 0xaf, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xd4,
- 0xf, 0xff, 0x70, 0x0, 0xda, 0x10, 0x0, 0x0,
- 0x0, 0x0, 0x0,
-
- /* U+F04C "" */
- 0x9b, 0x90, 0x9b, 0x9f, 0xff, 0xf, 0xff, 0xff,
- 0xf0, 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0xf0,
- 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0xf0, 0xff,
- 0xf2, 0x42, 0x2, 0x42,
-
- /* U+F04D "" */
- 0x24, 0x44, 0x44, 0x2f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xbb, 0xbb, 0xb8,
-
- /* U+F051 "" */
- 0x20, 0x0, 0x4f, 0x80, 0x2f, 0xff, 0x92, 0xff,
- 0xff, 0xcf, 0xff, 0xff, 0xff, 0xfe, 0x5f, 0xfd,
- 0x22, 0xf9, 0x10, 0x1b,
-
- /* U+F052 "" */
- 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x8f, 0x80,
- 0x0, 0x0, 0x7f, 0xff, 0x70, 0x0, 0x5f, 0xff,
- 0xff, 0x50, 0xe, 0xff, 0xff, 0xfe, 0x0, 0x58,
- 0x88, 0x88, 0x50, 0xf, 0xff, 0xff, 0xff, 0x0,
- 0xab, 0xbb, 0xbb, 0xa0,
-
- /* U+F053 "" */
- 0x0, 0x6, 0x20, 0x7, 0xf4, 0x7, 0xf5, 0x5,
- 0xf6, 0x0, 0x1e, 0xb0, 0x0, 0x2e, 0xb0, 0x0,
- 0x2e, 0x60, 0x0, 0x10,
-
- /* U+F054 "" */
- 0x26, 0x0, 0x4, 0xf7, 0x0, 0x5, 0xf7, 0x0,
- 0x6, 0xf5, 0x0, 0xbe, 0x10, 0xbe, 0x20, 0x6e,
- 0x20, 0x0, 0x10, 0x0,
-
- /* U+F067 "" */
- 0x0, 0x4, 0x0, 0x0, 0x3, 0xf3, 0x0, 0x0,
- 0x4f, 0x40, 0x7, 0x8a, 0xfa, 0x87, 0xef, 0xff,
- 0xff, 0xe0, 0x4, 0xf4, 0x0, 0x0, 0x4f, 0x40,
- 0x0, 0x1, 0xb1, 0x0,
-
- /* U+F068 "" */
- 0x78, 0x88, 0x88, 0x7e, 0xff, 0xff, 0xfe,
-
- /* U+F06E "" */
- 0x0, 0x8c, 0xcc, 0x80, 0x1, 0xdd, 0x16, 0x3d,
- 0xd1, 0xcf, 0x55, 0xed, 0x5f, 0xcb, 0xf5, 0xdf,
- 0xd5, 0xfc, 0x1d, 0xd3, 0x73, 0xdd, 0x10, 0x8,
- 0xdc, 0xc8, 0x10,
-
- /* U+F070 "" */
- 0x1d, 0x30, 0x0, 0x0, 0x0, 0x0, 0x5e, 0x8c,
- 0xcc, 0xa2, 0x0, 0x0, 0x2d, 0xb4, 0x49, 0xf4,
- 0x0, 0x7a, 0x1a, 0xff, 0x3f, 0xe1, 0x7, 0xfa,
- 0x6, 0xf7, 0xff, 0x10, 0xa, 0xf3, 0x3, 0xef,
- 0x40, 0x0, 0x6, 0xcc, 0x71, 0xbb, 0x10, 0x0,
- 0x0, 0x0, 0x0, 0x89,
-
- /* U+F071 "" */
- 0x0, 0x0, 0x3e, 0x30, 0x0, 0x0, 0x0, 0xc,
- 0xfc, 0x0, 0x0, 0x0, 0x6, 0xfc, 0xf6, 0x0,
- 0x0, 0x0, 0xed, 0xd, 0xe0, 0x0, 0x0, 0x8f,
- 0xe0, 0xef, 0x80, 0x0, 0x2f, 0xff, 0x6f, 0xff,
- 0x20, 0xb, 0xff, 0xe2, 0xef, 0xfa, 0x0, 0xdf,
- 0xff, 0xff, 0xff, 0xd0,
-
- /* U+F074 "" */
- 0x0, 0x0, 0x0, 0x20, 0x44, 0x0, 0x4, 0xf5,
- 0xef, 0xb1, 0xcf, 0xfd, 0x1, 0x8c, 0xd1, 0xc1,
- 0x1, 0xdc, 0x81, 0xc1, 0xef, 0xc1, 0xbf, 0xfd,
- 0x44, 0x0, 0x4, 0xf5, 0x0, 0x0, 0x0, 0x20,
-
- /* U+F077 "" */
- 0x0, 0x0, 0x0, 0x0, 0x4, 0xe4, 0x0, 0x4,
- 0xfc, 0xf4, 0x4, 0xf8, 0x8, 0xf4, 0xb8, 0x0,
- 0x8, 0xb0, 0x0, 0x0, 0x0,
-
- /* U+F078 "" */
- 0x0, 0x0, 0x0, 0xb, 0x80, 0x0, 0x8b, 0x4f,
- 0x80, 0x8f, 0x40, 0x4f, 0xcf, 0x40, 0x0, 0x4e,
- 0x40, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F079 "" */
- 0x0, 0x94, 0x14, 0x44, 0x40, 0x0, 0xbf, 0xf8,
- 0xbb, 0xbf, 0x10, 0x8, 0xb7, 0x60, 0x0, 0xe1,
- 0x0, 0xb, 0x40, 0x0, 0x1e, 0x20, 0x0, 0xb7,
- 0x44, 0x5e, 0xfd, 0x50, 0x7, 0xbb, 0xb8, 0x5f,
- 0x80, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0,
-
- /* U+F07B "" */
- 0xdf, 0xfb, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfd,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xfd,
-
- /* U+F093 "" */
- 0x0, 0x9, 0x90, 0x0, 0x0, 0x9f, 0xf9, 0x0,
- 0x7, 0xff, 0xff, 0x70, 0x0, 0xf, 0xf0, 0x0,
- 0x0, 0xf, 0xf0, 0x0, 0x78, 0x4f, 0xf4, 0x87,
- 0xff, 0xe8, 0x8e, 0xff, 0xff, 0xff, 0xfb, 0xbf,
-
- /* U+F095 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7,
- 0xea, 0x0, 0x0, 0x0, 0xef, 0xe0, 0x0, 0x0,
- 0xc, 0xfc, 0x0, 0x0, 0x0, 0x4f, 0x70, 0x0,
- 0x0, 0x1d, 0xe0, 0x7, 0xdc, 0x4d, 0xf3, 0x0,
- 0xef, 0xff, 0xe3, 0x0, 0xa, 0xec, 0x70, 0x0,
- 0x0,
-
- /* U+F0C4 "" */
- 0x3, 0x0, 0x0, 0x0, 0xcd, 0xc0, 0x2d, 0xc0,
- 0xe7, 0xf2, 0xee, 0x20, 0x4b, 0xff, 0xe2, 0x0,
- 0x4, 0xff, 0xa0, 0x0, 0xcd, 0xf9, 0xf9, 0x0,
- 0xe7, 0xe0, 0x7f, 0x90, 0x4a, 0x40, 0x4, 0x50,
-
- /* U+F0C5 "" */
- 0x0, 0xff, 0xf7, 0x47, 0x4f, 0xff, 0x47, 0xf8,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xf8, 0xff,
- 0xff, 0xff, 0x8f, 0xff, 0xff, 0xfb, 0x78, 0x88,
- 0x7f, 0xff, 0xff, 0x0,
-
- /* U+F0C7 "" */
- 0x24, 0x44, 0x41, 0xf, 0xbb, 0xbb, 0xe2, 0xf0,
- 0x0, 0xf, 0xdf, 0x44, 0x44, 0xff, 0xff, 0xfc,
- 0xff, 0xff, 0xf9, 0x9, 0xff, 0xff, 0xd5, 0xdf,
- 0xf8, 0xbb, 0xbb, 0xb8,
-
- /* U+F0E7 "" */
- 0x7, 0xff, 0x60, 0x0, 0xaf, 0xf2, 0x0, 0xc,
- 0xff, 0x87, 0x0, 0xef, 0xff, 0xb0, 0x7, 0x8e,
- 0xf2, 0x0, 0x0, 0xf8, 0x0, 0x0, 0x3e, 0x0,
- 0x0, 0x6, 0x50, 0x0,
-
- /* U+F0EA "" */
- 0x79, 0xb9, 0x70, 0xf, 0xfc, 0xff, 0x0, 0xff,
- 0x68, 0x83, 0xf, 0xf8, 0xff, 0x8b, 0xff, 0x8f,
- 0xf8, 0x8f, 0xf8, 0xff, 0xff, 0x78, 0x8f, 0xff,
- 0xf0, 0x7, 0xff, 0xff,
-
- /* U+F0F3 "" */
- 0x0, 0xd, 0x0, 0x0, 0x4e, 0xfe, 0x30, 0xd,
- 0xff, 0xfd, 0x0, 0xff, 0xff, 0xf0, 0x3f, 0xff,
- 0xff, 0x3b, 0xff, 0xff, 0xfb, 0x78, 0x88, 0x88,
- 0x60, 0x4, 0xf4, 0x0,
-
- /* U+F11C "" */
- 0xdf, 0xff, 0xff, 0xff, 0xdf, 0x18, 0x81, 0x88,
- 0x1f, 0xfe, 0xaa, 0xca, 0xae, 0xff, 0xea, 0xac,
- 0xaa, 0xef, 0xf1, 0x80, 0x0, 0x81, 0xfd, 0xff,
- 0xff, 0xff, 0xfd,
-
- /* U+F124 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x4b, 0xc0, 0x0, 0x0, 0x5c, 0xff, 0xb0, 0x0,
- 0x6e, 0xff, 0xff, 0x40, 0xd, 0xff, 0xff, 0xfc,
- 0x0, 0x6, 0x88, 0xcf, 0xf5, 0x0, 0x0, 0x0,
- 0x8f, 0xe0, 0x0, 0x0, 0x0, 0x8f, 0x60, 0x0,
- 0x0, 0x0, 0x5d, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0,
-
- /* U+F15B "" */
- 0xff, 0xf8, 0xb0, 0xff, 0xf8, 0xfb, 0xff, 0xfc,
- 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-
- /* U+F1EB "" */
- 0x0, 0x4, 0x77, 0x40, 0x0, 0x9, 0xff, 0xcc,
- 0xff, 0x90, 0xcd, 0x40, 0x0, 0x4, 0xdc, 0x20,
- 0x4b, 0xff, 0xb4, 0x2, 0x1, 0xfa, 0x55, 0xaf,
- 0x10, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0,
- 0xee, 0x0, 0x0, 0x0, 0x0, 0x87, 0x0, 0x0,
-
- /* U+F240 "" */
- 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb,
- 0xbb, 0xda, 0xf7, 0xee, 0xee, 0xee, 0x5f, 0xf8,
- 0xff, 0xff, 0xff, 0x2f, 0xf5, 0x66, 0x66, 0x66,
- 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3,
-
- /* U+F241 "" */
- 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb,
- 0xbb, 0xda, 0xf7, 0xee, 0xee, 0x70, 0x5f, 0xf8,
- 0xff, 0xff, 0x80, 0x2f, 0xf5, 0x66, 0x66, 0x54,
- 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3,
-
- /* U+F242 "" */
- 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb,
- 0xbb, 0xda, 0xf7, 0xee, 0xe0, 0x0, 0x5f, 0xf8,
- 0xff, 0xf0, 0x0, 0x2f, 0xf5, 0x66, 0x64, 0x44,
- 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3,
-
- /* U+F243 "" */
- 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb,
- 0xbb, 0xda, 0xf7, 0xe7, 0x0, 0x0, 0x5f, 0xf8,
- 0xf8, 0x0, 0x0, 0x2f, 0xf5, 0x65, 0x44, 0x44,
- 0xab, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3,
-
- /* U+F244 "" */
- 0x24, 0x44, 0x44, 0x44, 0x40, 0xfb, 0xbb, 0xbb,
- 0xbb, 0xd8, 0xf0, 0x0, 0x0, 0x0, 0x5f, 0xf0,
- 0x0, 0x0, 0x0, 0x2f, 0xf4, 0x44, 0x44, 0x44,
- 0xad, 0x8b, 0xbb, 0xbb, 0xbb, 0xb3,
-
- /* U+F287 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7,
- 0xd8, 0x0, 0x0, 0x0, 0x7, 0x36, 0x40, 0x0,
- 0x9, 0xb1, 0x91, 0x11, 0x17, 0x20, 0xef, 0x88,
- 0xd8, 0x88, 0xd9, 0x2, 0x20, 0x6, 0x48, 0x70,
- 0x0, 0x0, 0x0, 0x6, 0xec, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
-
- /* U+F293 "" */
- 0x6, 0xdd, 0xc3, 0x4, 0xff, 0x3e, 0xd0, 0x9c,
- 0xb5, 0x5f, 0x2b, 0xf7, 0x1a, 0xf4, 0xbf, 0x81,
- 0xbf, 0x39, 0xc9, 0x64, 0xf2, 0x4f, 0xf3, 0xde,
- 0x0, 0x6d, 0xed, 0x30,
-
- /* U+F2ED "" */
- 0x78, 0xdf, 0xd8, 0x77, 0x88, 0x88, 0x87, 0x8f,
- 0xff, 0xff, 0x88, 0xcc, 0x8c, 0xc8, 0x8c, 0xc8,
- 0xcc, 0x88, 0xcc, 0x8c, 0xc8, 0x8c, 0xc8, 0xcc,
- 0x85, 0xff, 0xff, 0xf5,
-
- /* U+F304 "" */
- 0x0, 0x0, 0x0, 0x7e, 0x30, 0x0, 0x0, 0x4b,
- 0xfe, 0x0, 0x0, 0x8f, 0x9b, 0x70, 0x0, 0x8f,
- 0xff, 0x40, 0x0, 0x8f, 0xff, 0x80, 0x0, 0x7f,
- 0xff, 0x80, 0x0, 0xe, 0xff, 0x80, 0x0, 0x0,
- 0xee, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0,
-
- /* U+F55A "" */
- 0x0, 0xaf, 0xff, 0xff, 0xfc, 0xb, 0xff, 0x9c,
- 0xc9, 0xff, 0xaf, 0xff, 0xc1, 0x1c, 0xff, 0xaf,
- 0xff, 0xc1, 0x1c, 0xff, 0xb, 0xff, 0x9c, 0xc9,
- 0xff, 0x0, 0xaf, 0xff, 0xff, 0xfc,
-
- /* U+F7C2 "" */
- 0x7, 0xff, 0xfe, 0x17, 0xb6, 0x27, 0xc3, 0xfe,
- 0xb9, 0xbe, 0x3f, 0xff, 0xff, 0xf3, 0xff, 0xff,
- 0xff, 0x3f, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff,
- 0x3c, 0xff, 0xff, 0xe1,
-
- /* U+F8A2 "" */
- 0x0, 0x0, 0x0, 0x3, 0x0, 0x23, 0x0, 0x2,
- 0xf0, 0x2e, 0x92, 0x22, 0x5f, 0xd, 0xff, 0xff,
- 0xff, 0xf0, 0x2e, 0x92, 0x22, 0x21, 0x0, 0x23,
- 0x0, 0x0, 0x0
-};
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 34, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 34, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5, .adv_w = 50, .box_w = 3, .box_h = 3, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 10, .adv_w = 90, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 25, .adv_w = 79, .box_w = 5, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 43, .adv_w = 108, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 61, .adv_w = 88, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 79, .adv_w = 27, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 82, .adv_w = 43, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 93, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 100, .adv_w = 51, .box_w = 4, .box_h = 3, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 106, .adv_w = 74, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 116, .adv_w = 29, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 119, .adv_w = 49, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 121, .adv_w = 29, .box_w = 2, .box_h = 2, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 123, .adv_w = 45, .box_w = 5, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 141, .adv_w = 85, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 154, .adv_w = 47, .box_w = 3, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 162, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 175, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 188, .adv_w = 86, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 203, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 216, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 229, .adv_w = 77, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 242, .adv_w = 82, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 255, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 268, .adv_w = 29, .box_w = 2, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 272, .adv_w = 29, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 278, .adv_w = 74, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 291, .adv_w = 74, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 299, .adv_w = 74, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 312, .adv_w = 73, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 325, .adv_w = 132, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 349, .adv_w = 94, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 367, .adv_w = 97, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 382, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 397, .adv_w = 106, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 415, .adv_w = 86, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 428, .adv_w = 81, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 441, .adv_w = 99, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 456, .adv_w = 104, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 471, .adv_w = 40, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 476, .adv_w = 66, .box_w = 5, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 489, .adv_w = 92, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 504, .adv_w = 76, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 517, .adv_w = 122, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 535, .adv_w = 104, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 550, .adv_w = 108, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 568, .adv_w = 92, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 583, .adv_w = 108, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 604, .adv_w = 93, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 619, .adv_w = 79, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 632, .adv_w = 75, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 645, .adv_w = 101, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 660, .adv_w = 91, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 678, .adv_w = 144, .box_w = 9, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 701, .adv_w = 86, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 716, .adv_w = 83, .box_w = 7, .box_h = 5, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 734, .adv_w = 84, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 749, .adv_w = 43, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 760, .adv_w = 45, .box_w = 5, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 778, .adv_w = 43, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 785, .adv_w = 75, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 793, .adv_w = 64, .box_w = 4, .box_h = 1, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 795, .adv_w = 77, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = 5},
- {.bitmap_index = 797, .adv_w = 77, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 807, .adv_w = 87, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 825, .adv_w = 73, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 835, .adv_w = 87, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 850, .adv_w = 78, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 860, .adv_w = 45, .box_w = 4, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 872, .adv_w = 88, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 885, .adv_w = 87, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 900, .adv_w = 36, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 906, .adv_w = 36, .box_w = 3, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 917, .adv_w = 79, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 932, .adv_w = 36, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 938, .adv_w = 135, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 954, .adv_w = 87, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 964, .adv_w = 81, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 974, .adv_w = 87, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 989, .adv_w = 87, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1002, .adv_w = 52, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1010, .adv_w = 64, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1018, .adv_w = 53, .box_w = 4, .box_h = 5, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1028, .adv_w = 87, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1038, .adv_w = 72, .box_w = 6, .box_h = 4, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 1050, .adv_w = 115, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1066, .adv_w = 71, .box_w = 5, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1076, .adv_w = 72, .box_w = 6, .box_h = 5, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1091, .adv_w = 67, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1099, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1110, .adv_w = 38, .box_w = 2, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1117, .adv_w = 45, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1128, .adv_w = 74, .box_w = 5, .box_h = 2, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 1133, .adv_w = 54, .box_w = 3, .box_h = 3, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 1138, .adv_w = 40, .box_w = 2, .box_h = 3, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 1141, .adv_w = 128, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1177, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1201, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1233, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1257, .adv_w = 88, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1275, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1307, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1339, .adv_w = 144, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1375, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1407, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1434, .adv_w = 128, .box_w = 8, .box_h = 10, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1474, .adv_w = 64, .box_w = 4, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1488, .adv_w = 96, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1509, .adv_w = 144, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1545, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1569, .adv_w = 112, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 1589, .adv_w = 112, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1624, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1652, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1680, .adv_w = 112, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 1700, .adv_w = 112, .box_w = 9, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1736, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1756, .adv_w = 80, .box_w = 5, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1776, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1804, .adv_w = 112, .box_w = 7, .box_h = 2, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 1811, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1838, .adv_w = 160, .box_w = 11, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1882, .adv_w = 144, .box_w = 11, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1926, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1958, .adv_w = 112, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1979, .adv_w = 112, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2000, .adv_w = 160, .box_w = 11, .box_h = 7, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 2039, .adv_w = 128, .box_w = 8, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2063, .adv_w = 128, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2095, .adv_w = 128, .box_w = 9, .box_h = 9, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 2136, .adv_w = 112, .box_w = 8, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2168, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2196, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2224, .adv_w = 80, .box_w = 7, .box_h = 8, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 2252, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2280, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2308, .adv_w = 144, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2335, .adv_w = 128, .box_w = 10, .box_h = 10, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 2385, .adv_w = 96, .box_w = 6, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2409, .adv_w = 160, .box_w = 10, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2449, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2479, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2509, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2539, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2569, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2599, .adv_w = 160, .box_w = 11, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2643, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2671, .adv_w = 112, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2699, .adv_w = 128, .box_w = 9, .box_h = 9, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 2740, .adv_w = 160, .box_w = 10, .box_h = 6, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2770, .adv_w = 96, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2798, .adv_w = 129, .box_w = 9, .box_h = 6, .ofs_x = 0, .ofs_y = 0}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x1f72, 0xef51, 0xef58, 0xef5b, 0xef5c, 0xef5d, 0xef61,
- 0xef63, 0xef65, 0xef69, 0xef6c, 0xef71, 0xef76, 0xef77, 0xef78,
- 0xef8e, 0xef98, 0xef9b, 0xef9c, 0xef9d, 0xefa1, 0xefa2, 0xefa3,
- 0xefa4, 0xefb7, 0xefb8, 0xefbe, 0xefc0, 0xefc1, 0xefc4, 0xefc7,
- 0xefc8, 0xefc9, 0xefcb, 0xefe3, 0xefe5, 0xf014, 0xf015, 0xf017,
- 0xf037, 0xf03a, 0xf043, 0xf06c, 0xf074, 0xf0ab, 0xf13b, 0xf190,
- 0xf191, 0xf192, 0xf193, 0xf194, 0xf1d7, 0xf1e3, 0xf23d, 0xf254,
- 0xf4aa, 0xf712, 0xf7f2
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 176, .range_length = 63475, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 59, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 0, 1, 2, 0, 3, 4, 5,
- 2, 6, 7, 8, 9, 10, 9, 10,
- 11, 12, 0, 13, 14, 15, 16, 17,
- 18, 19, 12, 20, 20, 0, 0, 0,
- 21, 22, 23, 24, 25, 22, 26, 27,
- 28, 29, 29, 30, 31, 32, 29, 29,
- 22, 33, 34, 35, 3, 36, 30, 37,
- 37, 38, 39, 40, 41, 42, 43, 0,
- 44, 0, 45, 46, 47, 48, 49, 50,
- 51, 45, 52, 52, 53, 48, 45, 45,
- 46, 46, 54, 55, 56, 57, 51, 58,
- 58, 59, 58, 60, 41, 0, 0, 9,
- 61, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 0, 1, 2, 0, 3, 4, 5,
- 2, 6, 7, 8, 9, 10, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 12,
- 18, 19, 20, 21, 21, 0, 0, 0,
- 22, 23, 24, 25, 23, 25, 25, 25,
- 23, 25, 25, 26, 25, 25, 25, 25,
- 23, 25, 23, 25, 3, 27, 28, 29,
- 29, 30, 31, 32, 33, 34, 35, 0,
- 36, 0, 37, 38, 39, 39, 39, 0,
- 39, 38, 40, 41, 38, 38, 42, 42,
- 39, 42, 39, 42, 43, 44, 45, 46,
- 46, 47, 46, 48, 0, 0, 35, 9,
- 49, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0
-};
-
-/*Kern values between classes*/
-static const int8_t kern_class_values[] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 0, 3, -3, 0, 0,
- 0, 0, -7, -8, 1, 6, 3, 2,
- -5, 1, 6, 0, 5, 1, 4, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 8, 1, -1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 3, 0, -4, 0, 0, 0, 0,
- 0, -3, 2, 3, 0, 0, -1, 0,
- -1, 1, 0, -1, 0, -1, -1, -3,
- 0, 0, 0, 0, -1, 0, 0, -2,
- -2, 0, 0, -1, 0, -3, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- -1, 0, -2, 0, -3, 0, -15, 0,
- 0, -3, 0, 3, 4, 0, 0, -3,
- 1, 1, 4, 3, -2, 3, 0, 0,
- -7, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -3, -2, -6, 0, -5,
- -1, 0, 0, 0, 0, 0, 5, 0,
- -4, -1, 0, 0, 0, -2, 0, 0,
- -1, -9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -10, -1, 5,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 4,
- 0, 1, 0, 0, -3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5, 1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1,
- 3, 1, 4, -1, 0, 0, 3, -1,
- -4, -18, 1, 3, 3, 0, -2, 0,
- 5, 0, 4, 0, 4, 0, -12, 0,
- -2, 4, 0, 4, -1, 3, 1, 0,
- 0, 0, -1, 0, 0, -2, 10, 0,
- 10, 0, 4, 0, 5, 2, 2, 4,
- 0, 0, 0, -5, 0, 0, 0, 0,
- 0, -1, 0, 1, -2, -2, -3, 1,
- 0, -1, 0, 0, 0, -5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -7, 0, -8, 0, 0, 0,
- 0, -1, 0, 13, -2, -2, 1, 1,
- -1, 0, -2, 1, 0, 0, -7, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -12, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -8, 0, 8, 0, 0, -5, 0,
- 4, 0, -9, -12, -9, -3, 4, 0,
- 0, -9, 0, 2, -3, 0, -2, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 3, 4, -16, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 0, 1, 0, 0, 0,
- 0, 0, 1, 1, -2, -3, 0, 0,
- 0, -1, 0, 0, -1, 0, 0, 0,
- -3, 0, -1, 0, -3, -3, 0, -3,
- -4, -4, -2, 0, -3, 0, -3, 0,
- 0, 0, 0, -1, 0, 0, 1, 0,
- 1, -1, 0, 0, 0, 0, 0, 1,
- -1, 0, 0, 0, -1, 1, 1, 0,
- 0, 0, 0, -2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, -1, 0,
- -2, 0, -2, 0, 0, -1, 0, 4,
- 0, 0, -1, 0, 0, 0, 0, 0,
- 0, 0, -1, -1, 0, 0, -1, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -1, -1, 0, -1, -2, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- 0, -1, -1, -1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -1, 0, 0,
- 0, 0, -1, -2, 0, -2, 0, -4,
- -1, -4, 3, 0, 0, -3, 1, 3,
- 3, 0, -3, 0, -2, 0, 0, -6,
- 1, -1, 1, -7, 1, 0, 0, 0,
- -7, 0, -7, -1, -11, -1, 0, -6,
- 0, 3, 4, 0, 2, 0, 0, 0,
- 0, 0, 0, -2, -2, 0, -4, 0,
- 0, 0, -1, 0, 0, 0, -1, 0,
- 0, 0, 0, 0, -1, -1, 0, -1,
- -2, 0, 0, 0, 0, 0, 0, 0,
- -1, -1, 0, -1, -2, -1, 0, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, -1, 0, -2,
- 0, -1, 0, -3, 1, 0, 0, -2,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 0, -1, 0, 0, 0, 0, 0, 1,
- 0, 0, -1, 0, -1, -1, -2, 0,
- 0, 0, 0, 0, 0, 0, 1, 0,
- -1, 0, 0, 0, 0, -1, -2, 0,
- -2, 0, 4, -1, 0, -4, 0, 0,
- 3, -6, -7, -5, -3, 1, 0, -1,
- -8, -2, 0, -2, 0, -3, 2, -2,
- -8, 0, -3, 0, 0, 1, 0, 1,
- -1, 0, 1, 0, -4, -5, 0, -6,
- -3, -3, -3, -4, -2, -3, 0, -2,
- -3, 1, 0, 0, 0, -1, 0, 0,
- 0, 1, 0, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- 0, -1, 0, 0, -1, 0, -2, -3,
- -3, 0, 0, -4, 0, 0, 0, 0,
- 0, 0, -1, 0, 0, 0, 0, 1,
- -1, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 6, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, 0, 0, 0,
- -2, 0, 0, 0, 0, -6, -4, 0,
- 0, 0, -2, -6, 0, 0, -1, 1,
- 0, -3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, -2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, -2, 0,
- 0, 0, 0, 2, 0, 1, -3, -3,
- 0, -1, -1, -2, 0, 0, 0, 0,
- 0, 0, -4, 0, -1, 0, -2, -1,
- 0, -3, -3, -4, -1, 0, -3, 0,
- -4, 0, 0, 0, 0, 10, 0, 0,
- 1, 0, 0, -2, 0, 1, 0, -6,
- 0, 0, 0, 0, 0, -12, -2, 4,
- 4, -1, -5, 0, 1, -2, 0, -6,
- -1, -2, 1, -9, -1, 2, 0, 2,
- -4, -2, -5, -4, -5, 0, 0, -8,
- 0, 7, 0, 0, -1, 0, 0, 0,
- -1, -1, -1, -3, -4, 0, -12, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, 0, -1, -1, -2, 0, 0,
- -3, 0, -1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -3, 0, 0, 3,
- 0, 2, 0, -3, 1, -1, 0, -3,
- -1, 0, -2, -1, -1, 0, -2, -2,
- 0, 0, -1, 0, -1, -2, -2, 0,
- 0, -1, 0, 1, -1, 0, -3, 0,
- 0, 0, -3, 0, -2, 0, -2, -2,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, -3, 1, 0, -2, 0, -1, -2,
- -4, -1, -1, -1, 0, -1, -2, 0,
- 0, 0, 0, 0, 0, -1, -1, -1,
- 0, 0, 0, 0, 2, -1, 0, -1,
- 0, 0, 0, -1, -2, -1, -1, -2,
- -1, 0, 1, 5, 0, 0, -3, 0,
- -1, 3, 0, -1, -5, -2, 2, 0,
- 0, -6, -2, 1, -2, 1, 0, -1,
- -1, -4, 0, -2, 1, 0, 0, -2,
- 0, 0, 0, 1, 1, -3, -2, 0,
- -2, -1, -2, -1, -1, 0, -2, 1,
- -2, -2, 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -1, -1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, -2,
- 0, 0, -1, -1, 0, 0, 0, 0,
- -1, 0, 0, 0, 0, -1, 0, 0,
- 0, 0, 0, -1, 0, 0, 0, 0,
- -2, 0, -3, 0, 0, 0, -4, 0,
- 1, -3, 3, 0, -1, -6, 0, 0,
- -3, -1, 0, -5, -3, -4, 0, 0,
- -6, -1, -5, -5, -6, 0, -3, 0,
- 1, 9, -2, 0, -3, -1, 0, -1,
- -2, -3, -2, -5, -5, -3, -1, 0,
- 0, -1, 0, 0, 0, 0, -9, -1,
- 4, 3, -3, -5, 0, 0, -4, 0,
- -6, -1, -1, 3, -12, -2, 0, 0,
- 0, -8, -2, -7, -1, -9, 0, 0,
- -9, 0, 8, 0, 0, -1, 0, 0,
- 0, 0, -1, -1, -5, -1, 0, -8,
- 0, 0, 0, 0, -4, 0, -1, 0,
- 0, -4, -6, 0, 0, -1, -2, -4,
- -1, 0, -1, 0, 0, 0, 0, -6,
- -1, -4, -4, -1, -2, -3, -1, -2,
- 0, -3, -1, -4, -2, 0, -2, -2,
- -1, -2, 0, 1, 0, -1, -4, 0,
- 3, 0, -2, 0, 0, 0, 0, 2,
- 0, 1, -3, 5, 0, -1, -1, -2,
- 0, 0, 0, 0, 0, 0, -4, 0,
- -1, 0, -2, -1, 0, -3, -3, -4,
- -1, 0, -3, 1, 5, 0, 0, 0,
- 0, 10, 0, 0, 1, 0, 0, -2,
- 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, -3, 0, 0, 0, 0, 0, -1,
- 0, 0, 0, -1, -1, 0, 0, -3,
- -1, 0, 0, -3, 0, 2, -1, 0,
- 0, 0, 0, 0, 0, 1, 0, 0,
- 0, 0, 2, 3, 1, -1, 0, -4,
- -2, 0, 4, -4, -4, -3, -3, 5,
- 2, 1, -11, -1, 3, -1, 0, -1,
- 1, -1, -4, 0, -1, 1, -2, -1,
- -4, -1, 0, 0, 4, 3, 0, -4,
- 0, -7, -2, 4, -2, -5, 0, -2,
- -4, -4, -1, 5, 1, 0, -2, 0,
- -3, 0, 1, 4, -3, -5, -5, -3,
- 4, 0, 0, -9, -1, 1, -2, -1,
- -3, 0, -3, -5, -2, -2, -1, 0,
- 0, -3, -3, -1, 0, 4, 3, -1,
- -7, 0, -7, -2, 0, -4, -7, 0,
- -4, -2, -4, -4, 3, 0, 0, -2,
- 0, -3, -1, 0, -1, -2, 0, 2,
- -4, 1, 0, 0, -7, 0, -1, -3,
- -2, -1, -4, -3, -4, -3, 0, -4,
- -1, -3, -2, -4, -1, 0, 0, 0,
- 6, -2, 0, -4, -1, 0, -1, -3,
- -3, -3, -4, -5, -2, -3, 3, 0,
- -2, 0, -6, -2, 1, 3, -4, -5,
- -3, -4, 4, -1, 1, -12, -2, 3,
- -3, -2, -5, 0, -4, -5, -2, -1,
- -1, -1, -3, -4, 0, 0, 0, 4,
- 4, -1, -8, 0, -8, -3, 3, -5,
- -9, -3, -4, -5, -6, -4, 3, 0,
- 0, 0, 0, -2, 0, 0, 1, -2,
- 3, 1, -2, 3, 0, 0, -4, 0,
- 0, 0, 0, 0, 0, -1, 0, 0,
- 0, 0, 0, 0, -1, 0, 0, 0,
- 0, 1, 4, 0, 0, -2, 0, 0,
- 0, 0, -1, -1, -2, 0, 0, 0,
- 0, 1, 0, 0, 0, 0, 1, 0,
- -1, 0, 5, 0, 2, 0, 0, -2,
- 0, 3, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 4, 0, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -8, 0, -1, 2, 0, 4,
- 0, 0, 13, 2, -3, -3, 1, 1,
- -1, 0, -6, 0, 0, 6, -8, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -9, 5, 18, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, 0, -2,
- -1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, 0, -3, 0,
- 0, 0, 0, 0, 1, 17, -3, -1,
- 4, 3, -3, 1, 0, 0, 1, 1,
- -2, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -17, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -4,
- 0, 0, 0, -3, 0, 0, 0, 0,
- -3, -1, 0, 0, 0, -3, 0, -2,
- 0, -6, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -9, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, 0, 0, -2, 0, -2, 0,
- -3, 0, 0, 0, -2, 1, -2, 0,
- 0, -3, -1, -3, 0, 0, -3, 0,
- -1, 0, -6, 0, -1, 0, 0, -10,
- -2, -5, -1, -5, 0, 0, -9, 0,
- -3, -1, 0, 0, 0, 0, 0, 0,
- 0, 0, -2, -2, -1, -2, 0, 0,
- 0, 0, -3, 0, -3, 2, -1, 3,
- 0, -1, -3, -1, -2, -2, 0, -2,
- -1, -1, 1, -3, 0, 0, 0, 0,
- -11, -1, -2, 0, -3, 0, -1, -6,
- -1, 0, 0, -1, -1, 0, 0, 0,
- 0, 1, 0, -1, -2, -1, 2, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0, 0, 0,
- 0, -3, 0, -1, 0, 0, 0, -3,
- 1, 0, 0, 0, -3, -1, -3, 0,
- 0, -4, 0, -1, 0, -6, 0, 0,
- 0, 0, -12, 0, -3, -5, -6, 0,
- 0, -9, 0, -1, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, -1, -2, -1,
- -2, 0, 0, 0, 2, -2, 0, 4,
- 6, -1, -1, -4, 2, 6, 2, 3,
- -3, 2, 5, 2, 4, 3, 3, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 8, 6, -2, -1, 0, -1,
- 10, 6, 10, 0, 0, 0, 1, 0,
- 0, 5, 0, 0, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -1, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, -11, -2, -1, -5,
- -6, 0, 0, -9, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, -11, -2, -1,
- -5, -6, 0, 0, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, 0, 0, 0, -3, 1, 0, -1,
- 1, 2, 1, -4, 0, 0, -1, 1,
- 0, 1, 0, 0, 0, 0, -3, 0,
- -1, -1, -3, 0, -1, -5, 0, 8,
- -1, 0, -3, -1, 0, -1, -2, 0,
- -1, -4, -3, -2, 0, 0, 0, -2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -1, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0, 0, -11,
- -2, -1, -5, -6, 0, 0, -9, 0,
- 0, 0, 0, 0, 0, 6, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -2, 0, -4, -2, -1, 4, -1, -1,
- -5, 0, -1, 0, -1, -3, 0, 3,
- 0, 1, 0, 1, -3, -5, -2, 0,
- -5, -2, -3, -5, -5, 0, -2, -3,
- -2, -2, -1, -1, -2, -1, 0, -1,
- 0, 2, 0, 2, -1, 0, 4, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -1, -1, -1, 0, 0,
- -3, 0, -1, 0, -2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -1, -1, 0, -2,
- 0, 0, 0, 0, -1, 0, 0, -2,
- -1, 1, 0, -2, -2, -1, 0, -4,
- -1, -3, -1, -2, 0, -2, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -9, 0, 4, 0, 0, -2, 0,
- 0, 0, 0, -2, 0, -1, 0, 0,
- -1, 0, 0, -1, 0, -3, 0, 0,
- 5, -2, -4, -4, 1, 1, 1, 0,
- -4, 1, 2, 1, 4, 1, 4, -1,
- -3, 0, 0, -5, 0, 0, -4, -3,
- 0, 0, -3, 0, -2, -2, 0, -2,
- 0, -2, 0, -1, 2, 0, -1, -4,
- -1, 5, 0, 0, -1, 0, -3, 0,
- 0, 2, -3, 0, 1, -1, 1, 0,
- 0, -4, 0, -1, 0, 0, -1, 1,
- -1, 0, 0, 0, -5, -2, -3, 0,
- -4, 0, 0, -6, 0, 5, -1, 0,
- -2, 0, 1, 0, -1, 0, -1, -4,
- 0, -1, 1, 0, 0, 0, 0, -1,
- 0, 0, 1, -2, 0, 0, 0, -2,
- -1, 0, -2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -8, 0, 3, 0,
- 0, -1, 0, 0, 0, 0, 0, 0,
- -1, -1, 0, 0, 0, 3, 0, 3,
- 0, 0, 0, 0, 0, -8, -7, 0,
- 6, 4, 2, -5, 1, 5, 0, 5,
- 0, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 7, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0
-};
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 61,
- .right_class_cnt = 49,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 0
-};
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t font_2 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 10, /*The maximum line height required by the font*/
- .base_line = 2, /*Baseline measured from the bottom of the line*/
-#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
- .subpx = LV_FONT_SUBPX_NONE,
-#endif
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if FONT_2*/
-#endif
diff --git a/lib/lvgl/tests/src/test_fonts/font_2.fnt b/lib/lvgl/tests/src/test_fonts/font_2.fnt
deleted file mode 100644
index 3b648e9..0000000
Binary files a/lib/lvgl/tests/src/test_fonts/font_2.fnt and /dev/null differ
diff --git a/lib/lvgl/tests/src/test_fonts/font_3.c b/lib/lvgl/tests/src/test_fonts/font_3.c
deleted file mode 100644
index 1f03794..0000000
--- a/lib/lvgl/tests/src/test_fonts/font_3.c
+++ /dev/null
@@ -1,948 +0,0 @@
-#if LV_BUILD_TEST
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 20 px
- * Bpp: 4
- * Opts: --bpp 4 --size 20 --font ../RobotoMono-Regular.ttf -r 0x20-0x7f --format lvgl -o ..\generated_fonts/font_3.c
- ******************************************************************************/
-
-#ifndef FONT_3
-#define FONT_3 1
-#endif
-
-#if FONT_3
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0x1f, 0xb0, 0xf, 0xfe, 0x69, 0x10, 0x76, 0x40,
- 0x30, 0x81, 0x76, 0x98, 0xb0,
-
- /* U+22 "\"" */
- 0x8e, 0x0, 0x7b, 0x0, 0x7c, 0x60, 0x11, 0x80,
- 0x80, 0x43, 0xca, 0x0, 0x37,
-
- /* U+23 "#" */
- 0x0, 0xc5, 0xe6, 0x7, 0xe6, 0x1, 0xc8, 0x6,
- 0xa, 0x6, 0x1, 0xde, 0x40, 0xf, 0x30, 0xf,
- 0x2a, 0x0, 0x15, 0x40, 0x15, 0x7f, 0x8d, 0xbf,
- 0xc6, 0xde, 0xe1, 0xd2, 0xe0, 0xf2, 0xe0, 0xf2,
- 0x80, 0x8d, 0x81, 0x2d, 0xa1, 0x2c, 0x60, 0x11,
- 0x88, 0x80, 0x84, 0x40, 0x1d, 0xc4, 0x0, 0xd2,
- 0x0, 0xc2, 0x25, 0x61, 0x13, 0x30, 0x40, 0xd,
- 0xdc, 0x35, 0xee, 0x1a, 0xf6, 0x3, 0xdd, 0x4,
- 0x5c, 0x84, 0xdf, 0x80, 0xa0, 0x1, 0x90, 0xc1,
- 0x90, 0xc0, 0x2d, 0x21, 0xd, 0x20, 0xf, 0x1b,
- 0x80, 0x11, 0x0, 0x18,
-
- /* U+24 "$" */
- 0x0, 0xcb, 0xe2, 0x1, 0xff, 0xc4, 0x78, 0xb,
- 0x40, 0xd, 0xb0, 0x64, 0xb6, 0xe0, 0x8, 0x27,
- 0xed, 0xd0, 0xc0, 0x82, 0x4, 0x0, 0xa, 0x41,
- 0xc0, 0x40, 0x38, 0xc8, 0x0, 0xe0, 0xe0, 0x12,
- 0x6b, 0x5, 0x84, 0x5a, 0x0, 0x70, 0xe9, 0xa5,
- 0xea, 0x80, 0x62, 0xcc, 0x29, 0x54, 0x80, 0x71,
- 0xd6, 0x93, 0x21, 0x29, 0x0, 0x45, 0x21, 0xaf,
- 0x4a, 0x1, 0x9c, 0xd, 0x2, 0x44, 0x2, 0xa0,
- 0xd1, 0x71, 0xf8, 0x86, 0x31, 0x38, 0x44, 0x9b,
- 0xb8, 0x97, 0x0, 0x26, 0xd6, 0x1e, 0xa1, 0x0,
- 0xe1, 0x0, 0xe0,
-
- /* U+25 "%" */
- 0x7, 0xee, 0x40, 0x7, 0xc9, 0x10, 0xb7, 0x50,
- 0xf, 0x61, 0x32, 0xa7, 0x80, 0xf1, 0x80, 0x42,
- 0x1, 0xd2, 0x66, 0x0, 0x69, 0x98, 0x97, 0x45,
- 0xe0, 0x2, 0x55, 0x66, 0xab, 0xc1, 0x28, 0x6,
- 0xae, 0xe5, 0x8b, 0x48, 0x7, 0x84, 0x41, 0x6,
- 0x80, 0x1f, 0x89, 0xa0, 0x3, 0xfa, 0x11, 0x13,
- 0xdc, 0x70, 0xc, 0x6b, 0xc, 0xca, 0x88, 0x20,
- 0x5, 0x8, 0x78, 0xa8, 0xc5, 0x80, 0x13, 0x40,
- 0x7, 0xfb, 0x4c, 0x31, 0x51, 0x8b, 0x0, 0x3c,
- 0xcc, 0xa8, 0x82, 0x0,
-
- /* U+26 "&" */
- 0x0, 0x26, 0x7e, 0xb0, 0x7, 0x15, 0x9b, 0xc,
- 0xa8, 0x6, 0xa0, 0xa9, 0xc1, 0xe0, 0xc, 0x40,
- 0xe0, 0x13, 0x80, 0x63, 0x7, 0x6, 0x1b, 0x0,
- 0xd4, 0x12, 0xf2, 0xae, 0x1, 0x8d, 0x8e, 0x1a,
- 0x80, 0x38, 0x90, 0x1, 0x40, 0x1c, 0x38, 0x50,
- 0x1a, 0x20, 0xbc, 0x70, 0x32, 0xf2, 0x34, 0x1a,
- 0x22, 0x40, 0x60, 0x65, 0x47, 0x51, 0x23, 0x10,
- 0xa, 0x8a, 0xa, 0x41, 0x5, 0x0, 0x2a, 0x0,
- 0x30, 0x40, 0x5d, 0x45, 0xc0, 0x84, 0x1, 0x6a,
- 0xa3, 0xb4, 0x71, 0xb2, 0x0,
-
- /* U+27 "'" */
- 0x2f, 0x50, 0xe, 0x10, 0x3, 0x81, 0x88,
-
- /* U+28 "(" */
- 0x0, 0xe1, 0x0, 0xd9, 0x20, 0x15, 0x8c, 0x80,
- 0x1d, 0x38, 0x40, 0x10, 0xa6, 0x0, 0x70, 0x90,
- 0xa, 0xc4, 0xc0, 0x2, 0x68, 0x1, 0x28, 0x68,
- 0x4, 0x40, 0x20, 0x10, 0x81, 0x80, 0x70, 0x80,
- 0x42, 0x2, 0x1, 0x18, 0x18, 0x4, 0xe1, 0xe0,
- 0x11, 0xa, 0x80, 0x67, 0x31, 0x0, 0xac, 0x24,
- 0x2, 0x25, 0x60, 0xd, 0x61, 0x40, 0x10, 0xea,
- 0xb8, 0x4, 0x7a, 0x80,
-
- /* U+29 ")" */
- 0x20, 0xe, 0xe9, 0x0, 0xde, 0xd0, 0x1, 0x1c,
- 0x39, 0x80, 0x4e, 0x5e, 0x1, 0xa8, 0xcc, 0x1,
- 0x28, 0x50, 0x4, 0x42, 0x80, 0x19, 0x48, 0x40,
- 0x21, 0x2, 0x0, 0x8c, 0x1c, 0x2, 0x10, 0xe,
- 0x10, 0x70, 0x8, 0xc0, 0x80, 0x27, 0x11, 0x0,
- 0x44, 0x80, 0x12, 0x87, 0x80, 0x5c, 0x2a, 0x0,
- 0x34, 0x80, 0xb, 0x8d, 0x80, 0x14, 0x1a, 0x1,
- 0x7e, 0x8, 0x4,
-
- /* U+2A "*" */
- 0x0, 0xd3, 0xe2, 0x1, 0xf0, 0x80, 0x80, 0x61,
- 0x0, 0x78, 0x6, 0x12, 0xeb, 0x41, 0x10, 0x36,
- 0xc0, 0xaa, 0xae, 0x47, 0xe4, 0xc0, 0xeb, 0xb0,
- 0x0, 0xdb, 0xd2, 0x1, 0x50, 0xab, 0x98, 0x6,
- 0x66, 0x45, 0x8d, 0x0, 0x43, 0x24, 0xc3, 0x8,
- 0xe0, 0x1, 0xbe, 0x0, 0x3b, 0xc0,
-
- /* U+2B "+" */
- 0x0, 0xd1, 0x0, 0xf, 0xca, 0xc0, 0x1f, 0xfd,
- 0x6d, 0xff, 0x88, 0x7f, 0xee, 0x62, 0x28, 0x0,
- 0x45, 0xaf, 0x76, 0x21, 0xdd, 0xb0, 0x3, 0xff,
- 0xa4,
-
- /* U+2C "," */
- 0xa, 0xf4, 0x1, 0x0, 0x9c, 0x18, 0x8, 0x49,
- 0x46, 0x1, 0x69, 0x80,
-
- /* U+2D "-" */
- 0x78, 0x8f, 0x25, 0x3b, 0xfb, 0x40,
-
- /* U+2E "." */
- 0x8, 0xc3, 0x17, 0x39, 0x14, 0xf,
-
- /* U+2F "/" */
- 0x0, 0xf6, 0x68, 0x7, 0x88, 0xe8, 0x3, 0xd4,
- 0xc, 0x1, 0xe6, 0x41, 0x0, 0xe4, 0x1e, 0x0,
- 0xf7, 0x2, 0x80, 0x79, 0x58, 0x3, 0xcc, 0x14,
- 0x1, 0xed, 0x23, 0x0, 0xe1, 0x4a, 0x0, 0xf3,
- 0x2, 0x80, 0x7a, 0x90, 0x80, 0x38, 0xcb, 0x40,
- 0x3d, 0x40, 0xc0, 0x1e, 0x65, 0x0, 0xf2, 0x87,
- 0x0, 0x78,
-
- /* U+30 "0" */
- 0x0, 0x25, 0xff, 0xb1, 0x0, 0x25, 0xb5, 0x66,
- 0x15, 0xa8, 0x2, 0xc7, 0xe6, 0x5e, 0x34, 0x8,
- 0x32, 0x20, 0x1, 0x90, 0x53, 0x2, 0x0, 0xc2,
- 0x1b, 0xe0, 0xc0, 0x14, 0x48, 0x8, 0x80, 0x21,
- 0xb7, 0x50, 0xe, 0x3c, 0x4b, 0x80, 0xd, 0x58,
- 0x1a, 0x80, 0x10, 0x83, 0x2e, 0x90, 0x8, 0x3,
- 0xc1, 0xe8, 0x3, 0x84, 0xc3, 0xc0, 0x32, 0x86,
- 0xa0, 0xc8, 0x80, 0x56, 0xa, 0x16, 0x3f, 0x32,
- 0xe2, 0x90, 0x2, 0xda, 0xb3, 0xa, 0xd8, 0x0,
-
- /* U+31 "1" */
- 0x0, 0xc4, 0x80, 0x6, 0xcd, 0xc9, 0xf9, 0x30,
- 0x3, 0x25, 0xd8, 0x1, 0xd6, 0x8e, 0x0, 0x10,
- 0xf, 0xff, 0x78,
-
- /* U+32 "2" */
- 0x0, 0xc, 0xf7, 0xf4, 0x0, 0x62, 0xf6, 0x56,
- 0x27, 0xd0, 0xa, 0x46, 0xed, 0x38, 0xa4, 0xe0,
- 0x4, 0x34, 0x0, 0xa0, 0x30, 0x5, 0xe4, 0x3,
- 0x18, 0x4, 0x30, 0xa0, 0x19, 0x3, 0x0, 0x3f,
- 0x40, 0x30, 0x7, 0xd2, 0x52, 0x20, 0x1e, 0x76,
- 0x56, 0x0, 0xf2, 0x41, 0xd0, 0x7, 0x8e, 0xcb,
- 0x40, 0x3c, 0x3a, 0x3e, 0x20, 0x1e, 0xc1, 0xd2,
- 0x0, 0xf5, 0x91, 0xa3, 0xbf, 0x18, 0x28, 0x1c,
- 0x47, 0x94,
-
- /* U+33 "3" */
- 0x0, 0xc, 0xf7, 0xf4, 0x0, 0x43, 0xec, 0xae,
- 0xaf, 0xa0, 0xb, 0x1a, 0xb8, 0xb7, 0x26, 0x4,
- 0x15, 0x0, 0xa8, 0x30, 0x3b, 0x80, 0x1f, 0xfc,
- 0x2b, 0xf, 0x0, 0x85, 0xe7, 0x59, 0xd4, 0x2,
- 0x38, 0x62, 0x1c, 0x0, 0xc5, 0xfe, 0xb3, 0xb4,
- 0x0, 0xf2, 0x78, 0x78, 0x8, 0x80, 0x31, 0xa,
- 0x87, 0x60, 0x7, 0x9, 0x81, 0x92, 0x0, 0x4c,
- 0x8, 0x1c, 0x17, 0x68, 0xb9, 0x28, 0x2, 0xe6,
- 0x57, 0x57, 0xd1,
-
- /* U+34 "4" */
- 0x0, 0xf1, 0xff, 0x80, 0x3f, 0x78, 0x7, 0xf3,
- 0x18, 0x7, 0xe1, 0x94, 0x30, 0xf, 0xac, 0x28,
- 0x3, 0xe4, 0x58, 0x10, 0xf, 0xa4, 0x9c, 0x3,
- 0xe7, 0x29, 0x0, 0xf8, 0xa1, 0x50, 0x3, 0xe9,
- 0xb, 0x0, 0xf8, 0xd0, 0x3b, 0xfe, 0x30, 0xff,
- 0xc, 0x47, 0x84, 0x1e, 0x9, 0xdf, 0xc4, 0x10,
- 0xe0, 0x1f, 0xfc, 0xa0,
-
- /* U+35 "5" */
- 0x0, 0x7f, 0xfc, 0xa0, 0x20, 0x26, 0x7c, 0x20,
- 0x60, 0xd9, 0x9c, 0x80, 0xc1, 0xc0, 0x1f, 0x8,
- 0x18, 0x7, 0xc4, 0x7, 0x15, 0x6, 0x1, 0x78,
- 0x4b, 0xab, 0xe3, 0x80, 0x38, 0xa7, 0xb9, 0x21,
- 0x4, 0xd, 0xac, 0x22, 0x68, 0xa, 0x0, 0xf9,
- 0x40, 0xc0, 0x3e, 0x30, 0x0, 0xfd, 0x80, 0x62,
- 0x2, 0x13, 0x43, 0x0, 0xa0, 0x30, 0x38, 0x32,
- 0xa7, 0x51, 0xa, 0x5, 0xaa, 0x8c, 0xf, 0x60,
-
- /* U+36 "6" */
- 0x0, 0x86, 0x37, 0xd4, 0x3, 0x27, 0x39, 0xa3,
- 0x0, 0x45, 0x61, 0x5d, 0x66, 0x1, 0x48, 0x52,
- 0x80, 0x70, 0xa1, 0xa8, 0x7, 0x90, 0x2c, 0x59,
- 0xd4, 0x2, 0x20, 0xde, 0x98, 0xad, 0x10, 0xe0,
- 0x58, 0xee, 0x31, 0x50, 0x5, 0xe, 0x22, 0x92,
- 0x41, 0x0, 0x20, 0x6, 0x50, 0x51, 0x6, 0x0,
- 0xde, 0x3, 0x81, 0xa0, 0x1b, 0x41, 0x90, 0x9c,
- 0x80, 0x4, 0xa2, 0x61, 0xc1, 0xb5, 0x4d, 0xa,
- 0x0, 0x1e, 0x22, 0xa9, 0x31, 0x0,
-
- /* U+37 "7" */
- 0xef, 0xff, 0xd6, 0xec, 0xde, 0x40, 0x39, 0x9f,
- 0x88, 0x24, 0x3, 0xc2, 0xca, 0x20, 0x1e, 0x60,
- 0x90, 0xf, 0xa4, 0x8c, 0x3, 0xca, 0x36, 0x1,
- 0xf4, 0x8b, 0x0, 0x78, 0xcc, 0xc0, 0x1f, 0x48,
- 0x50, 0x7, 0x85, 0x50, 0x80, 0x3d, 0x21, 0xe0,
- 0x1f, 0x31, 0x20, 0x7, 0x98, 0x68, 0x3, 0xeb,
- 0x6, 0x0, 0xe0,
-
- /* U+38 "8" */
- 0x0, 0x15, 0x77, 0xea, 0x80, 0x43, 0xaa, 0x8c,
- 0x15, 0x20, 0xb, 0xa, 0xa4, 0xe9, 0x31, 0x2,
- 0x2, 0x80, 0x54, 0x8, 0x6, 0x1, 0xf1, 0x82,
- 0x2, 0x80, 0x54, 0x8, 0x12, 0x75, 0x49, 0xd2,
- 0xa1, 0x0, 0x50, 0x2b, 0x11, 0xa0, 0x1, 0xe5,
- 0x77, 0xe8, 0xb0, 0x42, 0xa, 0x88, 0x16, 0xc9,
- 0x8c, 0x10, 0x3, 0x20, 0x60, 0x0, 0xc0, 0x31,
- 0x80, 0xc, 0x54, 0x80, 0x2b, 0xd, 0xa, 0xd,
- 0xa8, 0xc6, 0x36, 0x4, 0xc4, 0x57, 0x17, 0xc0,
-
- /* U+39 "9" */
- 0x0, 0x26, 0x7f, 0x51, 0x0, 0x4d, 0x64, 0xca,
- 0xac, 0x10, 0x4, 0x8f, 0xcd, 0xc8, 0xd8, 0x28,
- 0x48, 0x80, 0x18, 0x94, 0x34, 0xc, 0x3, 0x28,
- 0x27, 0x80, 0x7b, 0x80, 0x48, 0xc, 0x3, 0x70,
- 0x1a, 0x4, 0x88, 0x0, 0xdc, 0xc, 0x5c, 0x7e,
- 0x6b, 0x4, 0x4, 0x22, 0x4d, 0x9e, 0x1c, 0x18,
- 0x0, 0xdb, 0xfa, 0xea, 0x24, 0x1, 0xe3, 0x33,
- 0x80, 0x79, 0x34, 0x60, 0x2, 0x5b, 0xeb, 0xd,
- 0x10, 0xb, 0x54, 0x9f, 0xcc, 0x0,
-
- /* U+3A ":" */
- 0x5f, 0xb0, 0xf0, 0x42, 0x93, 0x62, 0x3c, 0x90,
- 0xf, 0xfe, 0x29, 0xe4, 0x4, 0x9b, 0x97, 0x81,
- 0x90,
-
- /* U+3B ";" */
- 0x6, 0xfa, 0x0, 0x68, 0x28, 0x3, 0xcd, 0xc0,
- 0x9, 0x90, 0x1, 0xff, 0xcf, 0x4a, 0x60, 0x1,
- 0x2f, 0x0, 0x4, 0x3, 0x70, 0x60, 0x1, 0x9,
- 0x0, 0xf, 0xc0, 0x0,
-
- /* U+3C "<" */
- 0x0, 0xf9, 0x2c, 0x3, 0x9b, 0x6d, 0x40, 0x2,
- 0xfd, 0x26, 0xd8, 0x33, 0xd0, 0x55, 0xd2, 0x48,
- 0xc3, 0x78, 0xa0, 0x12, 0x28, 0xdd, 0x20, 0x4,
- 0x35, 0xac, 0xb7, 0xae, 0x20, 0x2, 0x9e, 0x83,
- 0x8f, 0x0, 0xc2, 0xfd, 0x24, 0x1, 0xf3, 0x60,
-
- /* U+3D "=" */
- 0x39, 0x9f, 0xc6, 0xec, 0xdf, 0x95, 0x3f, 0xff,
- 0x30, 0x7, 0xf8, 0xa6, 0x7f, 0x1b, 0x37, 0xf2,
- 0x80,
-
- /* U+3E ">" */
- 0x3a, 0x30, 0xf, 0x9d, 0x73, 0xa, 0x1, 0xc9,
- 0x8c, 0x75, 0xae, 0x1, 0x8e, 0x7e, 0x9a, 0x3e,
- 0x44, 0x3, 0x2d, 0xe1, 0x32, 0x0, 0x65, 0xbc,
- 0x25, 0x40, 0x28, 0xea, 0x57, 0xea, 0x13, 0xd7,
- 0x39, 0xe8, 0x10, 0x3, 0xa5, 0xeb, 0x0, 0x72,
- 0x5a, 0x0, 0x7c,
-
- /* U+3F "?" */
- 0x0, 0x1d, 0xf7, 0xea, 0x80, 0x4b, 0x88, 0xaa,
- 0x3a, 0x80, 0x5, 0x86, 0xdd, 0x78, 0xb8, 0x89,
- 0xe0, 0x80, 0x2, 0xe0, 0x43, 0x2e, 0x1, 0x8c,
- 0x4, 0x3, 0xc4, 0xa4, 0x40, 0xf, 0x70, 0x48,
- 0x7, 0xb0, 0xe1, 0x0, 0x3a, 0x4d, 0xdc, 0x1,
- 0xe7, 0x18, 0x0, 0xf8, 0x9c, 0x3, 0xf6, 0x48,
- 0x7, 0xe1, 0x10, 0x7, 0xc3, 0xde, 0x1, 0xf8,
- 0x48, 0x3, 0x0,
-
- /* U+40 "@" */
- 0x0, 0xd1, 0xbf, 0xae, 0x1, 0xc3, 0xab, 0x76,
- 0xa9, 0xb0, 0xd, 0x4d, 0xac, 0x8f, 0xea, 0xc0,
- 0x4, 0x5b, 0x9, 0xfd, 0x3b, 0xb0, 0x3, 0xe4,
- 0x25, 0x2d, 0x95, 0x44, 0x20, 0x8a, 0x2d, 0xc8,
- 0x2, 0x4, 0x43, 0x2, 0x41, 0x30, 0x72, 0x1,
- 0x77, 0x8, 0x12, 0x80, 0x5, 0xc0, 0x21, 0x30,
- 0xe2, 0x0, 0x10, 0x80, 0xb0, 0x98, 0x0, 0xc0,
- 0x40, 0xc4, 0xc9, 0x44, 0x5e, 0x88, 0xa0, 0x29,
- 0x40, 0x12, 0x67, 0xb, 0x26, 0xc5, 0xb0, 0x5,
- 0xc9, 0xf7, 0x26, 0x5d, 0xa2, 0x0, 0x64, 0xd8,
- 0x44, 0x3a, 0x80, 0x75, 0x4a, 0x55, 0xd9, 0xc0,
- 0x20,
-
- /* U+41 "A" */
- 0x0, 0xec, 0xf0, 0xf, 0xe1, 0x30, 0x50, 0xf,
- 0xce, 0x0, 0xf0, 0xf, 0xda, 0x8, 0x80, 0xf,
- 0xc8, 0xba, 0x26, 0x1, 0xe4, 0xc, 0x70, 0xb0,
- 0xf, 0x68, 0x38, 0x92, 0x80, 0x79, 0xcc, 0x41,
- 0x48, 0x80, 0x18, 0xc6, 0xc0, 0x16, 0xa, 0x1,
- 0xac, 0x32, 0x66, 0xc, 0x0, 0xca, 0x8, 0xcc,
- 0x50, 0x41, 0x0, 0x11, 0x1b, 0xff, 0x50, 0x20,
- 0x1, 0x43, 0x40, 0x32, 0x7, 0x80, 0x30, 0x10,
- 0x3, 0x9, 0xa0, 0xa, 0x20, 0x3, 0xc8, 0x28,
-
- /* U+42 "B" */
- 0x4f, 0xfd, 0xd8, 0xa0, 0x18, 0xd9, 0x88, 0x55,
- 0x40, 0xa, 0xe6, 0x55, 0xc6, 0xa8, 0x1, 0xf4,
- 0x86, 0x0, 0x7c, 0x61, 0xe0, 0x1e, 0x1b, 0x5,
- 0x0, 0x5c, 0x42, 0x7c, 0xa8, 0x80, 0x6, 0xee,
- 0x61, 0x36, 0x0, 0xa3, 0xfe, 0xb1, 0xc3, 0x0,
- 0xf2, 0x70, 0x40, 0x7, 0xc6, 0xa, 0x1, 0xf0,
- 0x81, 0x80, 0x7d, 0x0, 0xa0, 0xb, 0x88, 0x4e,
- 0xb1, 0xc0, 0x0, 0xdd, 0xcc, 0x11, 0x80,
-
- /* U+43 "C" */
- 0x0, 0x15, 0xff, 0xb1, 0x80, 0x24, 0xd5, 0x53,
- 0x14, 0xc8, 0x1, 0x43, 0xf5, 0x3c, 0x6c, 0x6c,
- 0x30, 0x20, 0x17, 0x84, 0xe8, 0x38, 0x6, 0x35,
- 0x36, 0x11, 0x0, 0x75, 0x49, 0x18, 0x7, 0xff,
- 0x40, 0x8c, 0x3, 0xf3, 0x8, 0x80, 0x3a, 0x63,
- 0x41, 0xc0, 0x31, 0xb1, 0x30, 0xc0, 0x80, 0x50,
- 0x12, 0x14, 0x3f, 0x32, 0xd4, 0x73, 0x4, 0xc5,
- 0x76, 0x19, 0x80,
-
- /* U+44 "D" */
- 0x7f, 0xfb, 0xb1, 0x80, 0x3c, 0xae, 0xe1, 0x9d,
- 0x10, 0xd, 0xf1, 0x3b, 0x25, 0x80, 0x1f, 0x99,
- 0x84, 0xc0, 0x1f, 0xa0, 0x34, 0x3, 0xf0, 0x92,
- 0x0, 0x7f, 0x8, 0x7, 0xf9, 0xc0, 0x40, 0x3f,
- 0x38, 0x8, 0x7, 0xe1, 0x0, 0xfe, 0x12, 0x40,
- 0xf, 0xd0, 0x1a, 0x1, 0xf3, 0xb1, 0xb0, 0x5,
- 0xf1, 0x3b, 0x5, 0xa0, 0x19, 0x5d, 0xc3, 0x3a,
- 0x20, 0x0,
-
- /* U+45 "E" */
- 0x3f, 0xff, 0xcc, 0x0, 0x26, 0x6f, 0x28, 0x1,
- 0x26, 0x7c, 0x60, 0x1f, 0xfd, 0xe6, 0xff, 0xe8,
- 0x0, 0x89, 0xdf, 0xb0, 0x2, 0x48, 0x8e, 0x40,
- 0xf, 0xfe, 0xaa, 0x44, 0x79, 0x0, 0x4, 0xef,
- 0xec,
-
- /* U+46 "F" */
- 0x2f, 0xff, 0xd2, 0x0, 0x26, 0x6f, 0x60, 0x1,
- 0xe6, 0x7c, 0xa0, 0x1f, 0xfd, 0xe5, 0xff, 0xe9,
- 0x0, 0x89, 0xdf, 0xb0, 0x2, 0x78, 0x8e, 0x50,
- 0xf, 0xff, 0x38,
-
- /* U+47 "G" */
- 0x0, 0x8a, 0xff, 0xd8, 0xa0, 0x19, 0x35, 0x10,
- 0xa5, 0x52, 0x1, 0x50, 0xed, 0xd7, 0x1b, 0x20,
- 0x38, 0xc1, 0x0, 0x5e, 0x1e, 0x18, 0xe, 0x1,
- 0x8e, 0x78, 0x14, 0x44, 0x1, 0xcc, 0xa0, 0x24,
- 0x1, 0xff, 0xc2, 0x68, 0x89, 0xc0, 0x3d, 0xae,
- 0xf4, 0x80, 0x90, 0x5, 0x7f, 0xe2, 0x0, 0x28,
- 0x88, 0x3, 0xf6, 0x84, 0x80, 0x7e, 0x62, 0x74,
- 0x0, 0x88, 0x80, 0x17, 0x8d, 0xda, 0x6f, 0x42,
- 0x80, 0x5, 0xec, 0xac, 0xc7, 0xd4,
-
- /* U+48 "H" */
- 0x9f, 0x10, 0xc, 0x3f, 0x20, 0x1f, 0xff, 0x2e,
- 0xff, 0xdc, 0x1, 0x99, 0xdf, 0x30, 0x6, 0x88,
- 0xf0, 0x7, 0xff, 0xa0,
-
- /* U+49 "I" */
- 0x4f, 0xff, 0xc8, 0xcd, 0x80, 0xc, 0xd8, 0xa6,
- 0x60, 0x19, 0x98, 0x80, 0x3f, 0xff, 0xe0, 0x1f,
- 0xfc, 0xd2, 0x99, 0x80, 0x66, 0x62, 0x66, 0xc0,
- 0x6, 0x6c,
-
- /* U+4A "J" */
- 0x0, 0xfd, 0x3e, 0x60, 0x1f, 0xff, 0xf0, 0xf,
- 0xfe, 0x6b, 0xb0, 0x7, 0x18, 0x5, 0x52, 0x1,
- 0xce, 0x6, 0x14, 0x12, 0x1, 0x39, 0x28, 0x1,
- 0xcd, 0xb6, 0x72, 0xa, 0xc0, 0x2c, 0x80, 0x62,
- 0x6c, 0x10,
-
- /* U+4B "K" */
- 0x4f, 0x80, 0xc, 0x9f, 0xa0, 0x1f, 0x15, 0x7,
- 0x80, 0x7d, 0xc3, 0x44, 0x1, 0xe9, 0x36, 0x50,
- 0xf, 0x2b, 0x14, 0x80, 0x78, 0xa8, 0x3c, 0x3,
- 0xc3, 0xc1, 0x4, 0x1, 0xe6, 0x30, 0xa0, 0xf,
- 0xc8, 0xa5, 0x0, 0x1e, 0x2a, 0xb1, 0x72, 0x0,
- 0xe5, 0x11, 0x40, 0x70, 0x7, 0xe6, 0x33, 0x30,
- 0x7, 0xee, 0x8, 0x10, 0xf, 0x89, 0xc6, 0xc0,
- 0x3f, 0x41, 0x2a, 0x0,
-
- /* U+4C "L" */
- 0xf, 0xb0, 0xf, 0xff, 0xf8, 0x7, 0xff, 0xa9,
- 0x62, 0x3c, 0xc0, 0x1, 0x77, 0xf6, 0x0,
-
- /* U+4D "M" */
- 0x8f, 0xd0, 0xd, 0x5f, 0x60, 0x2, 0x20, 0x4,
- 0xa0, 0x1c, 0xa0, 0x5, 0x0, 0xe2, 0xb0, 0x7,
- 0x88, 0x80, 0x24, 0x31, 0x5, 0x60, 0xd, 0xa0,
- 0xea, 0x16, 0x1, 0x98, 0xb7, 0xc4, 0xc4, 0x3,
- 0x2a, 0x2b, 0x80, 0x7a, 0xc0, 0x1a, 0x1, 0xc2,
- 0x62, 0x24, 0x0, 0xf9, 0x98, 0x1, 0xfa, 0x20,
- 0x1, 0xff, 0xd6,
-
- /* U+4E "N" */
- 0x9f, 0x70, 0xc, 0x7f, 0x20, 0x9, 0x0, 0xfe,
- 0x17, 0x0, 0xfe, 0x90, 0xf, 0xca, 0x2e, 0x1,
- 0xf7, 0xc, 0x80, 0x7c, 0xf0, 0x2c, 0x1, 0xf3,
- 0xc, 0x0, 0x7e, 0x81, 0x60, 0xf, 0x98, 0x61,
- 0xc0, 0x3e, 0x91, 0xe0, 0xf, 0x9c, 0x54, 0x3,
- 0xf4, 0x80, 0x7f, 0x38, 0x80, 0x7f, 0x48, 0x0,
-
- /* U+4F "O" */
- 0x0, 0x1d, 0xff, 0xac, 0x80, 0x24, 0xc4, 0x33,
- 0x26, 0x98, 0x2, 0x87, 0x73, 0x20, 0xd0, 0x61,
- 0x92, 0x0, 0x1c, 0xb, 0x60, 0x30, 0x6, 0x60,
- 0xc7, 0x11, 0x0, 0x61, 0x13, 0x91, 0x80, 0x78,
- 0xcc, 0x2, 0x1, 0xf0, 0x80, 0x80, 0x7c, 0x24,
- 0x60, 0x1e, 0x33, 0x38, 0x88, 0x3, 0x8, 0x9f,
- 0x1, 0x80, 0x33, 0x6, 0x30, 0xc1, 0x80, 0xa,
- 0x45, 0x82, 0x83, 0x2e, 0xda, 0x34, 0x0, 0x4d,
- 0x44, 0xd8, 0x80,
-
- /* U+50 "P" */
- 0x2f, 0xfe, 0xe9, 0x10, 0xc, 0x4e, 0xf2, 0xb7,
- 0x90, 0x4, 0xf1, 0x15, 0xc8, 0xc8, 0x7, 0xe6,
- 0x24, 0x10, 0xf, 0xce, 0x6, 0x1, 0xf9, 0x80,
- 0xc0, 0x3e, 0x53, 0x41, 0x0, 0x3c, 0x45, 0x74,
- 0x32, 0x1, 0x13, 0xbc, 0xad, 0xe4, 0x1, 0x2f,
- 0xfd, 0xd2, 0x20, 0x1f, 0xfe, 0xd0,
-
- /* U+51 "Q" */
- 0x0, 0x8e, 0xff, 0xd6, 0x60, 0x1c, 0x98, 0x86,
- 0x64, 0xc4, 0x0, 0x86, 0xc7, 0x73, 0x1a, 0x36,
- 0x20, 0x6, 0x8, 0x20, 0x1, 0x58, 0x30, 0x2,
- 0xc1, 0x80, 0x32, 0x85, 0x80, 0xc, 0x80, 0x3c,
- 0x46, 0x1, 0x30, 0x7, 0x98, 0x0, 0x20, 0x1f,
- 0xe1, 0x10, 0x7, 0xf8, 0x40, 0xc, 0x1, 0xe6,
- 0x0, 0x8c, 0x80, 0x3c, 0x46, 0x0, 0xb0, 0x50,
- 0xc, 0xa1, 0x60, 0x6, 0xb, 0x20, 0x1, 0x58,
- 0x30, 0x0, 0x6c, 0x76, 0xed, 0xa3, 0x42, 0x1,
- 0x26, 0x22, 0x42, 0x1a, 0x1, 0xc7, 0x7f, 0xf1,
- 0xbd, 0x0, 0x7e, 0x1c, 0x47, 0x10, 0xf, 0xeb,
- 0xd1,
-
- /* U+52 "R" */
- 0x3f, 0xfe, 0xc6, 0x0, 0xe3, 0x77, 0x31, 0x4d,
- 0x0, 0x64, 0x88, 0x4f, 0x1a, 0xa8, 0x3, 0xf7,
- 0x87, 0x80, 0x7e, 0x20, 0x10, 0xf, 0xc4, 0x2,
- 0x1, 0xfb, 0xc3, 0x80, 0x24, 0x88, 0x4f, 0x1b,
- 0x20, 0x4, 0x6e, 0xe6, 0x19, 0x90, 0x6, 0x7f,
- 0xf5, 0x7, 0x0, 0x7e, 0x51, 0x71, 0x0, 0xfd,
- 0x0, 0xc0, 0x1f, 0x98, 0x64, 0x3, 0xfa, 0x45,
- 0xc0, 0x3f, 0x30, 0x48, 0x0,
-
- /* U+53 "S" */
- 0x0, 0x1d, 0xf7, 0xe2, 0x80, 0x65, 0xc4, 0x55,
- 0x15, 0x58, 0x0, 0x68, 0x76, 0xeb, 0x91, 0xe,
- 0x8, 0xc, 0x40, 0x14, 0x85, 0x0, 0x42, 0x1,
- 0x8a, 0x6c, 0x10, 0x19, 0x40, 0x33, 0x30, 0x6,
- 0xc2, 0xb1, 0x84, 0x3, 0x93, 0x50, 0xe7, 0xa0,
- 0x3, 0x8a, 0xfa, 0x5, 0xf4, 0x3, 0xc2, 0xfc,
- 0xa5, 0x40, 0xac, 0x1, 0xd4, 0xa, 0x1d, 0x28,
- 0x1, 0xfb, 0xc2, 0x44, 0x2, 0x70, 0x40, 0x47,
- 0x2e, 0xa9, 0xc8, 0x19, 0x0, 0x45, 0xa2, 0x18,
- 0x63, 0xc8, 0x0,
-
- /* U+54 "T" */
- 0x3f, 0xff, 0xf2, 0xb, 0x36, 0x0, 0x33, 0x71,
- 0x4c, 0xe2, 0x19, 0x9c, 0x40, 0x1f, 0xff, 0xf0,
- 0xf, 0xff, 0xc8,
-
- /* U+55 "U" */
- 0xaf, 0x10, 0xc, 0x5f, 0x20, 0x1f, 0xfc, 0x73,
- 0x0, 0xff, 0xef, 0x18, 0x7, 0xff, 0x3c, 0xc0,
- 0x40, 0x30, 0x81, 0xf8, 0x20, 0x6, 0x40, 0xf7,
- 0x9, 0x20, 0x1, 0x48, 0x38, 0xd0, 0xed, 0x53,
- 0x46, 0x84, 0x17, 0x11, 0x54, 0x98, 0xa0,
-
- /* U+56 "V" */
- 0x2f, 0xc0, 0xf, 0x6f, 0x89, 0x10, 0xc0, 0x38,
- 0x48, 0xc4, 0x10, 0x14, 0x3, 0x38, 0x58, 0x3,
- 0x43, 0x0, 0x36, 0x2, 0x0, 0x10, 0x1c, 0x3,
- 0x20, 0x98, 0x4, 0xa2, 0x40, 0x3, 0x17, 0x0,
- 0xde, 0x8, 0x0, 0xb0, 0xd0, 0xc, 0x81, 0xa0,
- 0x4, 0x4, 0x0, 0xc2, 0x68, 0x2, 0x68, 0x1,
- 0xeb, 0x4, 0x40, 0x68, 0x7, 0x94, 0x33, 0xc1,
- 0xc0, 0x3c, 0x44, 0x54, 0x31, 0x0, 0xf9, 0x8,
- 0x50, 0x3, 0xf6, 0x80, 0x2c, 0x3, 0xf2, 0x0,
- 0x98, 0x6,
-
- /* U+57 "W" */
- 0x3f, 0x70, 0x5, 0xf8, 0x0, 0xfd, 0xc8, 0x38,
- 0x0, 0xa0, 0x40, 0xc0, 0x42, 0x6, 0x2, 0x20,
- 0x70, 0x30, 0x10, 0x16, 0x2, 0x0, 0x68, 0x70,
- 0x30, 0x11, 0x1, 0x40, 0xc8, 0x4, 0x8, 0x18,
- 0x43, 0xc9, 0x5c, 0x8, 0x40, 0x4, 0x2, 0x4f,
- 0xe4, 0xc, 0x40, 0xe, 0x3, 0x52, 0x20, 0x11,
- 0xb0, 0x0, 0x81, 0xc7, 0x54, 0x1c, 0x48, 0x0,
- 0xe1, 0x80, 0xc2, 0x2c, 0xf, 0x0, 0x10, 0x38,
- 0x18, 0x13, 0x81, 0x0, 0x4, 0x4, 0x80, 0xa,
- 0x20, 0xc0, 0x11, 0x3, 0x0, 0x38, 0x0, 0x40,
- 0x13, 0x1, 0x80, 0xc, 0x0, 0x20, 0x11, 0x7,
- 0x0, 0x14, 0x8, 0x0,
-
- /* U+58 "X" */
- 0xc, 0xf5, 0x0, 0xc3, 0xfe, 0x10, 0xf0, 0x80,
- 0xd, 0x61, 0x2, 0x6, 0xa4, 0xc0, 0x2, 0x51,
- 0x70, 0xa, 0x2, 0x0, 0x12, 0x16, 0x1, 0x89,
- 0xc5, 0xcd, 0xd, 0x40, 0x3a, 0x46, 0x7c, 0x3c,
- 0x3, 0xc3, 0x2, 0x68, 0x60, 0x1f, 0x38, 0x3,
- 0x80, 0x3f, 0x48, 0x2, 0x40, 0x3e, 0x17, 0x26,
- 0x35, 0x0, 0xf5, 0x84, 0x40, 0x20, 0x3, 0x8d,
- 0x49, 0x45, 0xc9, 0x80, 0x37, 0x84, 0x80, 0x24,
- 0x20, 0x40, 0xa, 0x66, 0x40, 0x0, 0xb8, 0xc8,
- 0x2, 0x3, 0xc0, 0x34, 0xb, 0x90,
-
- /* U+59 "Y" */
- 0x2f, 0xd0, 0xe, 0x1f, 0xe0, 0x24, 0x25, 0x0,
- 0xd2, 0x12, 0x0, 0x80, 0x90, 0xc, 0xc0, 0xc0,
- 0x3, 0x3c, 0x0, 0x61, 0x71, 0x0, 0xa0, 0x24,
- 0x1, 0x61, 0x20, 0x19, 0x9, 0x45, 0x49, 0x84,
- 0x3, 0xa0, 0x26, 0x41, 0x60, 0x1e, 0x52, 0x73,
- 0x52, 0x0, 0xfa, 0xc0, 0x12, 0x1, 0xf9, 0x80,
- 0xcc, 0x1, 0xff, 0xd6, 0x70, 0xf, 0xfe, 0x88,
-
- /* U+5A "Z" */
- 0xcf, 0xff, 0xc9, 0x6c, 0xde, 0x0, 0x33, 0xcc,
- 0xf6, 0x2, 0x90, 0x7, 0xac, 0x2c, 0x3, 0xd0,
- 0x30, 0x20, 0x1c, 0x4e, 0x4e, 0x1, 0xe9, 0x9,
- 0x0, 0xf2, 0x21, 0x50, 0x3, 0xd2, 0x16, 0x1,
- 0xe7, 0x28, 0x10, 0xe, 0x18, 0x27, 0x0, 0xf5,
- 0x84, 0x0, 0x79, 0x15, 0x14, 0x3, 0xd0, 0x0,
- 0x88, 0xf2, 0x8, 0x23, 0xbf, 0xb0,
-
- /* U+5B "[" */
- 0x68, 0x88, 0x2d, 0xde, 0x0, 0x17, 0xf8, 0x3,
- 0xff, 0xfe, 0x0, 0x28, 0x80, 0x4, 0xee, 0x0,
-
- /* U+5C "\\" */
- 0x9f, 0x10, 0xe, 0xa0, 0x60, 0xe, 0x32, 0xa0,
- 0xf, 0x51, 0x18, 0x7, 0x30, 0x58, 0x7, 0xa,
- 0x30, 0x7, 0xb8, 0x50, 0x3, 0x94, 0x78, 0x3,
- 0xce, 0xa2, 0x1, 0xd4, 0xe, 0x1, 0xc6, 0x54,
- 0x1, 0xea, 0x32, 0x0, 0xe6, 0xa, 0x0, 0xe1,
- 0x46, 0x0, 0xf7, 0xa, 0x0, 0x72, 0x87, 0x0,
-
- /* U+5D "]" */
- 0x8, 0x89, 0x81, 0xde, 0xb0, 0xff, 0x10, 0x7,
- 0xff, 0xfc, 0x1, 0x10, 0x20, 0x3, 0xb8, 0x0,
-
- /* U+5E "^" */
- 0x0, 0xb7, 0x40, 0x1c, 0x64, 0x43, 0x0, 0xd4,
- 0x0, 0xa0, 0xc, 0xca, 0xa6, 0x0, 0x98, 0x3b,
- 0x80, 0xa0, 0xa, 0x14, 0x40, 0xc8, 0x11, 0xb0,
- 0x1, 0x8c, 0xa8, 0x28, 0x1, 0x41, 0x40,
-
- /* U+5F "_" */
- 0x37, 0x7f, 0xc6, 0x91, 0x1f, 0x90,
-
- /* U+60 "`" */
- 0x57, 0x30, 0x4a, 0xe0, 0x1f, 0x39,
-
- /* U+61 "a" */
- 0x0, 0x26, 0x7f, 0x62, 0x80, 0x4d, 0x62, 0xee,
- 0x3a, 0x60, 0x19, 0x2d, 0x89, 0xd0, 0x90, 0x4,
- 0x48, 0x4, 0x48, 0x4, 0x2e, 0x80, 0x18, 0x40,
- 0x21, 0x9d, 0xff, 0x94, 0x2, 0xc6, 0x4a, 0xbc,
- 0x40, 0x3, 0x14, 0x4a, 0xa1, 0x88, 0x7, 0xe1,
- 0x70, 0x3, 0x8c, 0x4b, 0xcf, 0x90, 0x8, 0xb1,
- 0x5e, 0x16, 0x1c, 0x14,
-
- /* U+62 "b" */
- 0x4f, 0x80, 0xf, 0xfe, 0xe3, 0xef, 0xeb, 0x0,
- 0x67, 0x87, 0x53, 0x97, 0x0, 0x87, 0x6a, 0x98,
- 0x30, 0x20, 0x6, 0x20, 0x1, 0x48, 0x38, 0x7,
- 0xc8, 0x1e, 0x1, 0xf0, 0x81, 0x80, 0x7c, 0x20,
- 0x60, 0x1f, 0x28, 0x78, 0x1, 0x40, 0x35, 0x83,
- 0x80, 0xb, 0x5d, 0xb0, 0xa0, 0x40, 0x10, 0xb3,
- 0x21, 0x97, 0x0,
-
- /* U+63 "c" */
- 0x0, 0x1d, 0xf7, 0xea, 0x80, 0x49, 0x88, 0xec,
- 0x15, 0x20, 0xa, 0xc, 0x99, 0x6a, 0x31, 0xa8,
- 0xb9, 0x80, 0x5e, 0x4b, 0xa1, 0x80, 0x19, 0x35,
- 0x84, 0x1c, 0x3, 0xe1, 0x7, 0x0, 0xfb, 0x43,
- 0x0, 0x31, 0x42, 0x28, 0xb9, 0x0, 0x50, 0xee,
- 0xa, 0xd, 0x98, 0xd5, 0x73, 0x4, 0xc4, 0x77,
- 0xd, 0xc0, 0x0,
-
- /* U+64 "d" */
- 0x0, 0xfa, 0x3d, 0x0, 0x3f, 0xfa, 0x8b, 0xbf,
- 0xce, 0x1, 0x9a, 0x89, 0x52, 0x1c, 0x0, 0x32,
- 0x3b, 0x54, 0xd1, 0x0, 0x38, 0x31, 0x0, 0x9,
- 0x80, 0x1e, 0x18, 0x1, 0xf1, 0x83, 0x80, 0x7c,
- 0x60, 0xe0, 0x1f, 0x78, 0x60, 0x7, 0xce, 0xc,
- 0x40, 0x1, 0x50, 0x0, 0xc8, 0xed, 0x53, 0xc8,
- 0x2, 0x6a, 0x25, 0x46, 0x80, 0x0,
-
- /* U+65 "e" */
- 0x0, 0x15, 0x77, 0xe2, 0x80, 0x47, 0xaa, 0x8e,
- 0x55, 0x0, 0xd, 0x1d, 0xa8, 0xe3, 0x72, 0x61,
- 0x92, 0x0, 0xa4, 0x17, 0xc3, 0x26, 0x77, 0x87,
- 0x18, 0x23, 0x36, 0x50, 0x30, 0x6, 0x7f, 0xfa,
- 0xb4, 0x2c, 0x3, 0xe6, 0x7, 0x40, 0x8, 0xac,
- 0x86, 0xc2, 0xea, 0x2b, 0x54, 0xc1, 0x35, 0x51,
- 0xde, 0xf1,
-
- /* U+66 "f" */
- 0x0, 0xe2, 0x68, 0x74, 0x0, 0xe7, 0xd9, 0x78,
- 0xb0, 0xc, 0x70, 0x57, 0xfe, 0xd0, 0xd, 0x61,
- 0x8, 0x0, 0x20, 0xc, 0x20, 0xc0, 0x1d, 0x1f,
- 0xe6, 0xc, 0xff, 0x90, 0x2e, 0x64, 0x60, 0xf3,
- 0x32, 0x81, 0xb3, 0x14, 0x2d, 0x9a, 0x10, 0xf,
- 0xff, 0xf8, 0x7, 0xff, 0x8,
-
- /* U+67 "g" */
- 0x0, 0x36, 0xff, 0x43, 0xfa, 0x3, 0xc8, 0x44,
- 0xa4, 0x0, 0x6, 0x7, 0x1d, 0xd8, 0x60, 0x7,
- 0x9, 0x10, 0x9, 0x0, 0x1e, 0x6, 0x1, 0xfc,
- 0xe0, 0x1f, 0xce, 0x1, 0xf7, 0x86, 0x0, 0x7c,
- 0xe0, 0xc4, 0x0, 0x16, 0x0, 0xc, 0x8e, 0xd5,
- 0x3c, 0x40, 0x26, 0xa2, 0x57, 0x67, 0x0, 0xcb,
- 0xbf, 0xb0, 0x40, 0xc1, 0xa, 0x1, 0x12, 0x91,
- 0x0, 0xea, 0xe2, 0xb4, 0x24, 0x1, 0x72, 0xee,
- 0x54, 0xc4, 0x0,
-
- /* U+68 "h" */
- 0x4f, 0x70, 0xf, 0xfe, 0xe1, 0xdf, 0xf4, 0x88,
- 0x5, 0x78, 0xc, 0x6d, 0xa0, 0x11, 0x6d, 0xce,
- 0x91, 0x98, 0x0, 0xc4, 0x1, 0x50, 0x28, 0x3,
- 0xc0, 0x30, 0x80, 0x7f, 0x18, 0x7, 0xff, 0xa0,
-
- /* U+69 "i" */
- 0x0, 0xcd, 0xe8, 0x1, 0xf7, 0x1, 0x0, 0x7d,
- 0x1c, 0xc0, 0x1f, 0x84, 0x3, 0xbf, 0xf9, 0x80,
- 0x33, 0x34, 0x60, 0x1e, 0x99, 0xa8, 0x3, 0xff,
- 0xed, 0x33, 0x50, 0x54, 0xc9, 0xc1, 0x9a, 0x30,
- 0x36, 0x65, 0x0,
-
- /* U+6A "j" */
- 0x0, 0xd3, 0xc4, 0x1, 0x8c, 0x44, 0x1, 0xab,
- 0x8c, 0x3, 0x84, 0x7, 0xff, 0x8c, 0x59, 0xa2,
- 0x0, 0xa6, 0x65, 0x0, 0xff, 0xf9, 0x10, 0x7,
- 0xa, 0x81, 0xc4, 0x27, 0xc2, 0x1, 0x5d, 0x8a,
- 0x9c, 0x0,
-
- /* U+6B "k" */
- 0x4f, 0x80, 0xf, 0xff, 0x1a, 0xfe, 0x88, 0x7,
- 0x92, 0x8b, 0x4, 0x3, 0x92, 0xc7, 0xc4, 0x3,
- 0x8e, 0xc7, 0x8, 0x3, 0x8b, 0x42, 0xc8, 0x3,
- 0xca, 0x21, 0x20, 0x1f, 0xad, 0x4e, 0x40, 0x3c,
- 0xe9, 0x64, 0xca, 0x1, 0xf0, 0xf0, 0x51, 0x0,
- 0x7c, 0x72, 0x1e, 0x1, 0xf9, 0x94, 0xa8, 0x0,
-
- /* U+6C "l" */
- 0xf, 0xfe, 0x60, 0xc, 0xcd, 0x18, 0x7, 0xa6,
- 0x6a, 0x0, 0xff, 0xff, 0x80, 0x7f, 0xf4, 0xe6,
- 0x6a, 0xa, 0x99, 0x38, 0x33, 0x46, 0x6, 0xcc,
- 0xa0,
-
- /* U+6D "m" */
- 0x1f, 0x9b, 0xfd, 0x5b, 0xfd, 0x30, 0x9, 0xb1,
- 0xca, 0x8a, 0xb, 0x80, 0x25, 0x78, 0x11, 0x4b,
- 0xa9, 0x0, 0x46, 0x0, 0x33, 0x0, 0xc, 0x4,
- 0x3, 0xff, 0xfe, 0x1, 0xfc,
-
- /* U+6E "n" */
- 0x4f, 0x54, 0xcf, 0xd9, 0x10, 0xb, 0xad, 0x98,
- 0xd, 0xa0, 0x12, 0xed, 0x4e, 0x99, 0x88, 0x0,
- 0xc4, 0x1, 0x58, 0x38, 0x3, 0xc0, 0x30, 0x81,
- 0x80, 0x7f, 0xfc, 0x0,
-
- /* U+6F "o" */
- 0x0, 0x25, 0xff, 0xad, 0x0, 0x26, 0xb5, 0x66,
- 0x2d, 0xb0, 0x14, 0x97, 0xcc, 0xbc, 0xa4, 0xa8,
- 0x2c, 0x40, 0x3, 0x61, 0x46, 0xe, 0x1, 0x90,
- 0xd, 0xc0, 0x40, 0x31, 0x3, 0xb8, 0x4, 0x3,
- 0x8, 0x39, 0x82, 0x0, 0x64, 0x3, 0xa0, 0x81,
- 0x0, 0xc, 0x5, 0x14, 0x97, 0xcc, 0xbc, 0xa4,
- 0x81, 0xac, 0x99, 0x85, 0x6c, 0x0,
-
- /* U+70 "p" */
- 0x4f, 0x67, 0xdf, 0xd6, 0x0, 0xd1, 0x2e, 0xa5,
- 0x2e, 0x1, 0x1f, 0xd5, 0x30, 0x20, 0x40, 0xa,
- 0x20, 0x3, 0x70, 0x70, 0x7, 0x80, 0x6c, 0xe,
- 0x0, 0xf9, 0xc0, 0x40, 0x3e, 0x70, 0x10, 0xf,
- 0xb0, 0x34, 0x1, 0x60, 0x11, 0x30, 0x20, 0x0,
- 0xf6, 0x65, 0xa3, 0x2, 0x0, 0x75, 0x76, 0x29,
- 0x70, 0xb, 0xe3, 0xbf, 0x58, 0x3, 0xff, 0xa8,
-
- /* U+71 "q" */
- 0x0, 0x2e, 0xff, 0x4c, 0x7a, 0x3, 0xd0, 0x4c,
- 0x2b, 0x80, 0x6, 0x7, 0x19, 0x98, 0x80, 0x7,
- 0x9, 0x10, 0x8, 0xc0, 0x1e, 0x6, 0x1, 0xfc,
- 0xe0, 0x1f, 0xce, 0x1, 0xf7, 0x86, 0x0, 0x7c,
- 0xe0, 0xc4, 0x0, 0x15, 0x0, 0xc, 0xe, 0x4c,
- 0xbc, 0x80, 0x27, 0xa3, 0x67, 0x67, 0x0, 0xcb,
- 0xbf, 0xd0, 0x1, 0xff, 0xd5,
-
- /* U+72 "r" */
- 0xcf, 0x6, 0xdf, 0xe5, 0x0, 0x4c, 0x88, 0x82,
- 0x20, 0x3, 0xdf, 0xef, 0xa0, 0x2, 0xd0, 0x3,
- 0xca, 0x1, 0xff, 0xe9,
-
- /* U+73 "s" */
- 0x0, 0x1d, 0xf7, 0xeb, 0x80, 0x49, 0x8a, 0xec,
- 0x11, 0x60, 0x9, 0xf, 0x99, 0x6a, 0x24, 0x1,
- 0x8, 0x5, 0x34, 0xc1, 0x61, 0xce, 0x60, 0x4a,
- 0x40, 0xd6, 0xb1, 0x9f, 0x44, 0x1, 0x25, 0xfd,
- 0xb2, 0xe0, 0x93, 0xa0, 0x1, 0x26, 0x42, 0xc7,
- 0x12, 0x20, 0x10, 0x80, 0x8a, 0xb, 0xe6, 0x2e,
- 0x9, 0x81, 0xe9, 0x59, 0xd9, 0xf0, 0x0,
-
- /* U+74 "t" */
- 0x0, 0x99, 0xc0, 0x3f, 0x5c, 0x0, 0x7f, 0xf0,
- 0xe7, 0xfc, 0x41, 0xff, 0x83, 0x66, 0x42, 0x13,
- 0x38, 0x11, 0x98, 0x60, 0xcd, 0x80, 0x3f, 0xfd,
- 0x4c, 0x8, 0x1, 0xf7, 0x5, 0xd4, 0xd9, 0x80,
- 0x4b, 0x44, 0xac, 0xe0,
-
- /* U+75 "u" */
- 0x3f, 0x80, 0xd, 0x1e, 0x80, 0x1f, 0xfe, 0x81,
- 0x0, 0xf8, 0x40, 0x3f, 0x88, 0x1c, 0x3, 0x28,
- 0x4, 0xe3, 0x6c, 0xfa, 0x60, 0x14, 0x41, 0x66,
- 0xae, 0x0, 0x0,
-
- /* U+76 "v" */
- 0xd, 0xf0, 0xe, 0x1f, 0xc0, 0xa0, 0x50, 0xc,
- 0xe1, 0x40, 0xc1, 0xc0, 0x1a, 0x81, 0x80, 0x55,
- 0x4, 0x0, 0x26, 0xc0, 0x17, 0x3, 0x0, 0x18,
- 0x28, 0x2, 0x42, 0xa0, 0x5, 0x11, 0x80, 0x6a,
- 0x22, 0xd4, 0x1, 0xcc, 0x15, 0x40, 0x60, 0xe,
- 0x14, 0x65, 0x50, 0x80, 0x7b, 0xc4, 0xb8, 0x3,
- 0xe4, 0x11, 0x20, 0x4,
-
- /* U+77 "w" */
- 0x6f, 0x20, 0x5, 0x58, 0x5, 0xf0, 0xa0, 0xe0,
- 0x4, 0x40, 0x0, 0xc3, 0x4c, 0x34, 0x8, 0x40,
- 0xc1, 0x41, 0x0, 0x88, 0xe, 0x24, 0x81, 0xc2,
- 0x20, 0x47, 0xc, 0x57, 0xc0, 0x35, 0x0, 0x79,
- 0x2, 0x66, 0x14, 0x14, 0xc0, 0xa, 0x8, 0x48,
- 0x81, 0x31, 0xc0, 0x1, 0x87, 0x1, 0x90, 0xd0,
- 0x28, 0x4, 0x6a, 0x80, 0x4, 0x71, 0x10, 0x4,
- 0xa1, 0x80, 0xc, 0x15, 0x0, 0xde, 0x6, 0x0,
- 0x40, 0xc0, 0x0,
-
- /* U+78 "x" */
- 0x7f, 0x90, 0xc, 0xff, 0x40, 0xe8, 0xca, 0x0,
- 0x38, 0x2a, 0x0, 0x50, 0xd8, 0x87, 0x7, 0x0,
- 0x43, 0x43, 0x52, 0x50, 0x60, 0x19, 0x1d, 0x19,
- 0x1c, 0x3, 0xd2, 0x0, 0xf0, 0xf, 0xac, 0x1,
- 0x20, 0x1e, 0x65, 0x54, 0x94, 0x80, 0x62, 0x91,
- 0xa6, 0x46, 0x40, 0xb, 0x83, 0x40, 0x14, 0x34,
- 0x21, 0x6, 0xe6, 0x0, 0x1b, 0x1a, 0x0,
-
- /* U+79 "y" */
- 0x1f, 0xe0, 0xf, 0x77, 0x88, 0x94, 0x54, 0x3,
- 0x28, 0xa8, 0x84, 0x87, 0x0, 0x6e, 0x9, 0x0,
- 0x19, 0x90, 0x80, 0x2, 0x86, 0x60, 0xa, 0x42,
- 0xc0, 0xc, 0x12, 0x1, 0x94, 0x98, 0x1, 0x22,
- 0xa0, 0x1d, 0x60, 0xc8, 0x32, 0x1, 0xe6, 0x1b,
- 0xe0, 0x60, 0xf, 0x98, 0x95, 0x84, 0x3, 0xe9,
- 0x0, 0x58, 0x7, 0xe1, 0x12, 0x10, 0x7, 0xe7,
- 0x1f, 0x0, 0xfc, 0x50, 0x48, 0x1, 0xe3, 0xac,
- 0xe, 0x0, 0xf9, 0x54, 0x76, 0x60, 0x1e,
-
- /* U+7A "z" */
- 0x5f, 0xff, 0xc6, 0xef, 0xe5, 0x0, 0x11, 0x22,
- 0x39, 0xc2, 0x84, 0x3, 0xa8, 0x9d, 0x40, 0x39,
- 0x94, 0xe0, 0x3, 0x8e, 0x47, 0x40, 0x38, 0x74,
- 0x34, 0x40, 0x3a, 0x86, 0x4c, 0x3, 0xa1, 0x15,
- 0x80, 0x39, 0x1c, 0x9, 0xdf, 0x90, 0x80, 0xf,
- 0x11, 0xda,
-
- /* U+7B "{" */
- 0x0, 0xc9, 0x92, 0x1, 0x1d, 0xb5, 0x80, 0x50,
- 0x14, 0x40, 0x12, 0x20, 0x3, 0x8, 0x7, 0xe1,
- 0x0, 0xc6, 0x1, 0xe4, 0xd, 0x0, 0x13, 0x41,
- 0x30, 0x3, 0xe4, 0xf0, 0x40, 0x12, 0xc5, 0x40,
- 0x12, 0x4c, 0x22, 0x80, 0x64, 0xc, 0x0, 0xc4,
- 0x6, 0x1, 0xe1, 0x0, 0xc2, 0xe, 0x1, 0xc6,
- 0x60, 0xe, 0x80, 0x90, 0xc, 0x94, 0xd4, 0x1,
- 0x97, 0xec,
-
- /* U+7C "|" */
- 0xbb, 0x0, 0x7f, 0xf6, 0x0,
-
- /* U+7D "}" */
- 0xac, 0x30, 0xd, 0xf, 0x86, 0x1, 0x15, 0x4,
- 0x80, 0x61, 0x24, 0x0, 0xe1, 0x10, 0x7, 0xff,
- 0x1, 0xc0, 0x40, 0x31, 0x82, 0x80, 0x69, 0x1a,
- 0x52, 0x0, 0xe, 0x5, 0x48, 0x5, 0xc2, 0xfe,
- 0x0, 0x73, 0x98, 0x40, 0x6, 0x3, 0x80, 0x67,
- 0x1, 0x0, 0xff, 0x84, 0x40, 0x18, 0x49, 0x40,
- 0x35, 0x4, 0x0, 0x58, 0xb6, 0x60, 0x16, 0xf2,
- 0x0, 0x60,
-
- /* U+7E "~" */
- 0x3, 0xdf, 0xd5, 0x0, 0xcc, 0x63, 0xa6, 0xa7,
- 0x52, 0x0, 0x29, 0x57, 0x1f, 0xae, 0x56, 0xea,
- 0xc1, 0x64, 0xa1, 0x0, 0x54, 0x9a, 0x96, 0x0
-};
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 192, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 192, .box_w = 3, .box_h = 15, .ofs_x = 4, .ofs_y = 0},
- {.bitmap_index = 13, .adv_w = 192, .box_w = 6, .box_h = 5, .ofs_x = 3, .ofs_y = 10},
- {.bitmap_index = 26, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 110, .adv_w = 192, .box_w = 10, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 193, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 269, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 346, .adv_w = 192, .box_w = 3, .box_h = 5, .ofs_x = 4, .ofs_y = 10},
- {.bitmap_index = 353, .adv_w = 192, .box_w = 6, .box_h = 22, .ofs_x = 3, .ofs_y = -5},
- {.bitmap_index = 413, .adv_w = 192, .box_w = 6, .box_h = 22, .ofs_x = 3, .ofs_y = -5},
- {.bitmap_index = 472, .adv_w = 192, .box_w = 10, .box_h = 10, .ofs_x = 1, .ofs_y = 5},
- {.bitmap_index = 518, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 543, .adv_w = 192, .box_w = 4, .box_h = 6, .ofs_x = 3, .ofs_y = -4},
- {.bitmap_index = 555, .adv_w = 192, .box_w = 8, .box_h = 2, .ofs_x = 2, .ofs_y = 6},
- {.bitmap_index = 561, .adv_w = 192, .box_w = 4, .box_h = 3, .ofs_x = 4, .ofs_y = 0},
- {.bitmap_index = 567, .adv_w = 192, .box_w = 9, .box_h = 16, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 617, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 689, .adv_w = 192, .box_w = 6, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 708, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 774, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 841, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 893, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 957, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1027, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1078, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1150, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1220, .adv_w = 192, .box_w = 4, .box_h = 11, .ofs_x = 5, .ofs_y = 0},
- {.bitmap_index = 1237, .adv_w = 192, .box_w = 5, .box_h = 15, .ofs_x = 4, .ofs_y = -4},
- {.bitmap_index = 1265, .adv_w = 192, .box_w = 9, .box_h = 10, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 1305, .adv_w = 192, .box_w = 10, .box_h = 6, .ofs_x = 1, .ofs_y = 4},
- {.bitmap_index = 1322, .adv_w = 192, .box_w = 10, .box_h = 10, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 1365, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1424, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1513, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1585, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1648, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1707, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1765, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1798, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1825, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1895, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1915, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1941, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1975, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2035, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2050, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2101, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2149, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2216, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2262, .adv_w = 192, .box_w = 12, .box_h = 18, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2351, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2412, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2487, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2506, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2545, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2619, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2711, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2789, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2845, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2899, .adv_w = 192, .box_w = 5, .box_h = 20, .ofs_x = 4, .ofs_y = -3},
- {.bitmap_index = 2915, .adv_w = 192, .box_w = 8, .box_h = 16, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 2963, .adv_w = 192, .box_w = 5, .box_h = 20, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 2979, .adv_w = 192, .box_w = 8, .box_h = 8, .ofs_x = 2, .ofs_y = 7},
- {.bitmap_index = 3010, .adv_w = 192, .box_w = 10, .box_h = 2, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 3016, .adv_w = 192, .box_w = 4, .box_h = 3, .ofs_x = 4, .ofs_y = 12},
- {.bitmap_index = 3022, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3074, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3125, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3176, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3230, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3280, .adv_w = 192, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3325, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 3392, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3424, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3459, .adv_w = 192, .box_w = 7, .box_h = 19, .ofs_x = 2, .ofs_y = -4},
- {.bitmap_index = 3493, .adv_w = 192, .box_w = 11, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3541, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3566, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3595, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3623, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3677, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 3733, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 3786, .adv_w = 192, .box_w = 8, .box_h = 11, .ofs_x = 3, .ofs_y = 0},
- {.bitmap_index = 3806, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3861, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3897, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3924, .adv_w = 192, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3976, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4043, .adv_w = 192, .box_w = 11, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4098, .adv_w = 192, .box_w = 12, .box_h = 15, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 4169, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4211, .adv_w = 192, .box_w = 7, .box_h = 20, .ofs_x = 3, .ofs_y = -4},
- {.bitmap_index = 4269, .adv_w = 192, .box_w = 2, .box_h = 19, .ofs_x = 5, .ofs_y = -4},
- {.bitmap_index = 4274, .adv_w = 192, .box_w = 7, .box_h = 20, .ofs_x = 3, .ofs_y = -4},
- {.bitmap_index = 4332, .adv_w = 192, .box_w = 12, .box_h = 4, .ofs_x = 0, .ofs_y = 4}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- }
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = NULL,
- .kern_scale = 0,
- .cmap_num = 1,
- .bpp = 4,
- .kern_classes = 0,
- .bitmap_format = 1
-};
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t font_3 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 22, /*The maximum line height required by the font*/
- .base_line = 5, /*Baseline measured from the bottom of the line*/
-#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
- .subpx = LV_FONT_SUBPX_NONE,
-#endif
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if FONT_3*/
-#endif
diff --git a/lib/lvgl/tests/src/test_fonts/font_3.fnt b/lib/lvgl/tests/src/test_fonts/font_3.fnt
deleted file mode 100644
index 43c074d..0000000
Binary files a/lib/lvgl/tests/src/test_fonts/font_3.fnt and /dev/null differ
diff --git a/lib/lvgl/tests/unity/generate_test_runner.rb b/lib/lvgl/tests/unity/generate_test_runner.rb
deleted file mode 100644
index d1d8f91..0000000
--- a/lib/lvgl/tests/unity/generate_test_runner.rb
+++ /dev/null
@@ -1,511 +0,0 @@
-# ==========================================
-# Unity Project - A Test Framework for C
-# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
-# [Released under MIT License. Please refer to license.txt for details]
-# ==========================================
-
-class UnityTestRunnerGenerator
- def initialize(options = nil)
- @options = UnityTestRunnerGenerator.default_options
- case options
- when NilClass
- @options
- when String
- @options.merge!(UnityTestRunnerGenerator.grab_config(options))
- when Hash
- # Check if some of these have been specified
- @options[:has_setup] = !options[:setup_name].nil?
- @options[:has_teardown] = !options[:teardown_name].nil?
- @options[:has_suite_setup] = !options[:suite_setup].nil?
- @options[:has_suite_teardown] = !options[:suite_teardown].nil?
- @options.merge!(options)
- else
- raise 'If you specify arguments, it should be a filename or a hash of options'
- end
- require_relative 'type_sanitizer'
- end
-
- def self.default_options
- {
- includes: [],
- defines: [],
- plugins: [],
- framework: :unity,
- test_prefix: 'test|spec|should',
- mock_prefix: 'Mock',
- mock_suffix: '',
- setup_name: 'setUp',
- teardown_name: 'tearDown',
- test_reset_name: 'resetTest',
- test_verify_name: 'verifyTest',
- main_name: 'main', # set to :auto to automatically generate each time
- main_export_decl: '',
- cmdline_args: false,
- omit_begin_end: false,
- use_param_tests: false,
- include_extensions: '(?:hpp|hh|H|h)',
- source_extensions: '(?:cpp|cc|ino|C|c)'
- }
- end
-
- def self.grab_config(config_file)
- options = default_options
- unless config_file.nil? || config_file.empty?
- require 'yaml'
- yaml_guts = YAML.load_file(config_file)
- options.merge!(yaml_guts[:unity] || yaml_guts[:cmock])
- raise "No :unity or :cmock section found in #{config_file}" unless options
- end
- options
- end
-
- def run(input_file, output_file, options = nil)
- @options.merge!(options) unless options.nil?
-
- # pull required data from source file
- source = File.read(input_file)
- source = source.force_encoding('ISO-8859-1').encode('utf-8', replace: nil)
- tests = find_tests(source)
- headers = find_includes(source)
- testfile_includes = (headers[:local] + headers[:system])
- used_mocks = find_mocks(testfile_includes)
- testfile_includes = (testfile_includes - used_mocks)
- testfile_includes.delete_if { |inc| inc =~ /(unity|cmock)/ }
- find_setup_and_teardown(source)
-
- # build runner file
- generate(input_file, output_file, tests, used_mocks, testfile_includes)
-
- # determine which files were used to return them
- all_files_used = [input_file, output_file]
- all_files_used += testfile_includes.map { |filename| filename + '.c' } unless testfile_includes.empty?
- all_files_used += @options[:includes] unless @options[:includes].empty?
- all_files_used += headers[:linkonly] unless headers[:linkonly].empty?
- all_files_used.uniq
- end
-
- def generate(input_file, output_file, tests, used_mocks, testfile_includes)
- File.open(output_file, 'w') do |output|
- create_header(output, used_mocks, testfile_includes)
- create_externs(output, tests, used_mocks)
- create_mock_management(output, used_mocks)
- create_setup(output)
- create_teardown(output)
- create_suite_setup(output)
- create_suite_teardown(output)
- create_reset(output)
- create_run_test(output) unless tests.empty?
- create_args_wrappers(output, tests)
- create_main(output, input_file, tests, used_mocks)
- end
-
- return unless @options[:header_file] && !@options[:header_file].empty?
-
- File.open(@options[:header_file], 'w') do |output|
- create_h_file(output, @options[:header_file], tests, testfile_includes, used_mocks)
- end
- end
-
- def find_tests(source)
- tests_and_line_numbers = []
-
- # contains characters which will be substituted from within strings, doing
- # this prevents these characters from interfering with scrubbers
- # @ is not a valid C character, so there should be no clashes with files genuinely containing these markers
- substring_subs = { '{' => '@co@', '}' => '@cc@', ';' => '@ss@', '/' => '@fs@' }
- substring_re = Regexp.union(substring_subs.keys)
- substring_unsubs = substring_subs.invert # the inverse map will be used to fix the strings afterwords
- substring_unsubs['@quote@'] = '\\"'
- substring_unsubs['@apos@'] = '\\\''
- substring_unre = Regexp.union(substring_unsubs.keys)
- source_scrubbed = source.clone
- source_scrubbed = source_scrubbed.gsub(/\\"/, '@quote@') # hide escaped quotes to allow capture of the full string/char
- source_scrubbed = source_scrubbed.gsub(/\\'/, '@apos@') # hide escaped apostrophes to allow capture of the full string/char
- source_scrubbed = source_scrubbed.gsub(/("[^"\n]*")|('[^'\n]*')/) { |s| s.gsub(substring_re, substring_subs) } # temporarily hide problematic characters within strings
- source_scrubbed = source_scrubbed.gsub(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
- source_scrubbed = source_scrubbed.gsub(/\/\*.*?\*\//m, '') # remove block comments
- source_scrubbed = source_scrubbed.gsub(/\/\/.*$/, '') # remove line comments (all that remain)
- lines = source_scrubbed.split(/(^\s*\#.*$) | (;|\{|\}) /x) # Treat preprocessor directives as a logical line. Match ;, {, and } as end of lines
- .map { |line| line.gsub(substring_unre, substring_unsubs) } # unhide the problematic characters previously removed
-
- lines.each_with_index do |line, _index|
- # find tests
- next unless line =~ /^((?:\s*(?:TEST_CASE|TEST_RANGE)\s*\(.*?\)\s*)*)\s*void\s+((?:#{@options[:test_prefix]}).*)\s*\(\s*(.*)\s*\)/m
-
- arguments = Regexp.last_match(1)
- name = Regexp.last_match(2)
- call = Regexp.last_match(3)
- params = Regexp.last_match(4)
- args = nil
-
- if @options[:use_param_tests] && !arguments.empty?
- args = []
- arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) { |a| args << a[0] }
-
- arguments.scan(/\s*TEST_RANGE\s*\((.*)\)\s*$/).flatten.each do |range_str|
- args += range_str.scan(/\[\s*(-?\d+.?\d*),\s*(-?\d+.?\d*),\s*(-?\d+.?\d*)\s*\]/).map do |arg_values_str|
- arg_values_str.map do |arg_value_str|
- arg_value_str.include?('.') ? arg_value_str.to_f : arg_value_str.to_i
- end
- end.map do |arg_values|
- (arg_values[0]..arg_values[1]).step(arg_values[2]).to_a
- end.reduce do |result, arg_range_expanded|
- result.product(arg_range_expanded)
- end.map do |arg_combinations|
- arg_combinations.flatten.join(', ')
- end
- end
- end
-
- tests_and_line_numbers << { test: name, args: args, call: call, params: params, line_number: 0 }
- end
-
- tests_and_line_numbers.uniq! { |v| v[:test] }
-
- # determine line numbers and create tests to run
- source_lines = source.split("\n")
- source_index = 0
- tests_and_line_numbers.size.times do |i|
- source_lines[source_index..-1].each_with_index do |line, index|
- next unless line =~ /\s+#{tests_and_line_numbers[i][:test]}(?:\s|\()/
-
- source_index += index
- tests_and_line_numbers[i][:line_number] = source_index + 1
- break
- end
- end
-
- tests_and_line_numbers
- end
-
- def find_includes(source)
- # remove comments (block and line, in three steps to ensure correct precedence)
- source.gsub!(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
- source.gsub!(/\/\*.*?\*\//m, '') # remove block comments
- source.gsub!(/\/\/.*$/, '') # remove line comments (all that remain)
-
- # parse out includes
- includes = {
- local: source.scan(/^\s*#include\s+\"\s*(.+\.#{@options[:include_extensions]})\s*\"/).flatten,
- system: source.scan(/^\s*#include\s+<\s*(.+)\s*>/).flatten.map { |inc| "<#{inc}>" },
- linkonly: source.scan(/^TEST_FILE\(\s*\"\s*(.+\.#{@options[:source_extensions]})\s*\"/).flatten
- }
- includes
- end
-
- def find_mocks(includes)
- mock_headers = []
- includes.each do |include_path|
- include_file = File.basename(include_path)
- mock_headers << include_path if include_file =~ /^#{@options[:mock_prefix]}.*#{@options[:mock_suffix]}\.h$/i
- end
- mock_headers
- end
-
- def find_setup_and_teardown(source)
- @options[:has_setup] = source =~ /void\s+#{@options[:setup_name]}\s*\(/
- @options[:has_teardown] = source =~ /void\s+#{@options[:teardown_name]}\s*\(/
- @options[:has_suite_setup] ||= (source =~ /void\s+suiteSetUp\s*\(/)
- @options[:has_suite_teardown] ||= (source =~ /int\s+suiteTearDown\s*\(int\s+([a-zA-Z0-9_])+\s*\)/)
- end
-
- def create_header(output, mocks, testfile_includes = [])
- output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
- output.puts("\n/*=======Automagically Detected Files To Include=====*/")
- output.puts("#include \"#{@options[:framework]}.h\"")
- output.puts('#include "cmock.h"') unless mocks.empty?
- if @options[:defines] && !@options[:defines].empty?
- @options[:defines].each { |d| output.puts("#ifndef #{d}\n#define #{d}\n#endif /* #{d} */") }
- end
- if @options[:header_file] && !@options[:header_file].empty?
- output.puts("#include \"#{File.basename(@options[:header_file])}\"")
- else
- @options[:includes].flatten.uniq.compact.each do |inc|
- output.puts("#include #{inc.include?('<') ? inc : "\"#{inc}\""}")
- end
- testfile_includes.each do |inc|
- output.puts("#include #{inc.include?('<') ? inc : "\"#{inc}\""}")
- end
- end
- mocks.each do |mock|
- output.puts("#include \"#{mock}\"")
- end
- output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
-
- return unless @options[:enforce_strict_ordering]
-
- output.puts('')
- output.puts('int GlobalExpectCount;')
- output.puts('int GlobalVerifyOrder;')
- output.puts('char* GlobalOrderError;')
- end
-
- def create_externs(output, tests, _mocks)
- output.puts("\n/*=======External Functions This Runner Calls=====*/")
- output.puts("extern void #{@options[:setup_name]}(void);")
- output.puts("extern void #{@options[:teardown_name]}(void);")
- output.puts("\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif") if @options[:externc]
- tests.each do |test|
- output.puts("extern void #{test[:test]}(#{test[:call] || 'void'});")
- end
- output.puts("#ifdef __cplusplus\n}\n#endif") if @options[:externc]
- output.puts('')
- end
-
- def create_mock_management(output, mock_headers)
- output.puts("\n/*=======Mock Management=====*/")
- output.puts('static void CMock_Init(void)')
- output.puts('{')
-
- if @options[:enforce_strict_ordering]
- output.puts(' GlobalExpectCount = 0;')
- output.puts(' GlobalVerifyOrder = 0;')
- output.puts(' GlobalOrderError = NULL;')
- end
-
- mocks = mock_headers.map { |mock| File.basename(mock, '.*') }
- mocks.each do |mock|
- mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
- output.puts(" #{mock_clean}_Init();")
- end
- output.puts("}\n")
-
- output.puts('static void CMock_Verify(void)')
- output.puts('{')
- mocks.each do |mock|
- mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
- output.puts(" #{mock_clean}_Verify();")
- end
- output.puts("}\n")
-
- output.puts('static void CMock_Destroy(void)')
- output.puts('{')
- mocks.each do |mock|
- mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
- output.puts(" #{mock_clean}_Destroy();")
- end
- output.puts("}\n")
- end
-
- def create_setup(output)
- return if @options[:has_setup]
-
- output.puts("\n/*=======Setup (stub)=====*/")
- output.puts("void #{@options[:setup_name]}(void) {}")
- end
-
- def create_teardown(output)
- return if @options[:has_teardown]
-
- output.puts("\n/*=======Teardown (stub)=====*/")
- output.puts("void #{@options[:teardown_name]}(void) {}")
- end
-
- def create_suite_setup(output)
- return if @options[:suite_setup].nil?
-
- output.puts("\n/*=======Suite Setup=====*/")
- output.puts('void suiteSetUp(void)')
- output.puts('{')
- output.puts(@options[:suite_setup])
- output.puts('}')
- end
-
- def create_suite_teardown(output)
- return if @options[:suite_teardown].nil?
-
- output.puts("\n/*=======Suite Teardown=====*/")
- output.puts('int suiteTearDown(int num_failures)')
- output.puts('{')
- output.puts(@options[:suite_teardown])
- output.puts('}')
- end
-
- def create_reset(output)
- output.puts("\n/*=======Test Reset Options=====*/")
- output.puts("void #{@options[:test_reset_name]}(void);")
- output.puts("void #{@options[:test_reset_name]}(void)")
- output.puts('{')
- output.puts(" #{@options[:teardown_name]}();")
- output.puts(' CMock_Verify();')
- output.puts(' CMock_Destroy();')
- output.puts(' CMock_Init();')
- output.puts(" #{@options[:setup_name]}();")
- output.puts('}')
- output.puts("void #{@options[:test_verify_name]}(void);")
- output.puts("void #{@options[:test_verify_name]}(void)")
- output.puts('{')
- output.puts(' CMock_Verify();')
- output.puts('}')
- end
-
- def create_run_test(output)
- require 'erb'
- template = ERB.new(File.read(File.join(__dir__, 'run_test.erb')), nil, '<>')
- output.puts("\n" + template.result(binding))
- end
-
- def create_args_wrappers(output, tests)
- return unless @options[:use_param_tests]
-
- output.puts("\n/*=======Parameterized Test Wrappers=====*/")
- tests.each do |test|
- next if test[:args].nil? || test[:args].empty?
-
- test[:args].each.with_index(1) do |args, idx|
- output.puts("static void runner_args#{idx}_#{test[:test]}(void)")
- output.puts('{')
- output.puts(" #{test[:test]}(#{args});")
- output.puts("}\n")
- end
- end
- end
-
- def create_main(output, filename, tests, used_mocks)
- output.puts("\n/*=======MAIN=====*/")
- main_name = @options[:main_name].to_sym == :auto ? "main_#{filename.gsub('.c', '')}" : (@options[:main_name]).to_s
- if @options[:cmdline_args]
- if main_name != 'main'
- output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv);")
- end
- output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv)")
- output.puts('{')
- output.puts(' int parse_status = UnityParseOptions(argc, argv);')
- output.puts(' if (parse_status != 0)')
- output.puts(' {')
- output.puts(' if (parse_status < 0)')
- output.puts(' {')
- output.puts(" UnityPrint(\"#{filename.gsub('.c', '')}.\");")
- output.puts(' UNITY_PRINT_EOL();')
- tests.each do |test|
- if (!@options[:use_param_tests]) || test[:args].nil? || test[:args].empty?
- output.puts(" UnityPrint(\" #{test[:test]}\");")
- output.puts(' UNITY_PRINT_EOL();')
- else
- test[:args].each do |args|
- output.puts(" UnityPrint(\" #{test[:test]}(#{args})\");")
- output.puts(' UNITY_PRINT_EOL();')
- end
- end
- end
- output.puts(' return 0;')
- output.puts(' }')
- output.puts(' return parse_status;')
- output.puts(' }')
- else
- main_return = @options[:omit_begin_end] ? 'void' : 'int'
- if main_name != 'main'
- output.puts("#{@options[:main_export_decl]} #{main_return} #{main_name}(void);")
- end
- output.puts("#{main_return} #{main_name}(void)")
- output.puts('{')
- end
- output.puts(' suiteSetUp();') if @options[:has_suite_setup]
- if @options[:omit_begin_end]
- output.puts(" UnitySetTestFile(\"#{filename.gsub(/\\/, '\\\\\\')}\");")
- else
- output.puts(" UnityBegin(\"#{filename.gsub(/\\/, '\\\\\\')}\");")
- end
- tests.each do |test|
- if (!@options[:use_param_tests]) || test[:args].nil? || test[:args].empty?
- output.puts(" run_test(#{test[:test]}, \"#{test[:test]}\", #{test[:line_number]});")
- else
- test[:args].each.with_index(1) do |args, idx|
- wrapper = "runner_args#{idx}_#{test[:test]}"
- testname = "#{test[:test]}(#{args})".dump
- output.puts(" run_test(#{wrapper}, #{testname}, #{test[:line_number]});")
- end
- end
- end
- output.puts
- output.puts(' CMock_Guts_MemFreeFinal();') unless used_mocks.empty?
- if @options[:has_suite_teardown]
- if @options[:omit_begin_end]
- output.puts(' (void) suite_teardown(0);')
- else
- output.puts(' return suiteTearDown(UnityEnd());')
- end
- else
- output.puts(' return UnityEnd();') unless @options[:omit_begin_end]
- end
- output.puts('}')
- end
-
- def create_h_file(output, filename, tests, testfile_includes, used_mocks)
- filename = File.basename(filename).gsub(/[-\/\\\.\,\s]/, '_').upcase
- output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
- output.puts("#ifndef _#{filename}")
- output.puts("#define _#{filename}\n\n")
- output.puts("#include \"#{@options[:framework]}.h\"")
- output.puts('#include "cmock.h"') unless used_mocks.empty?
- @options[:includes].flatten.uniq.compact.each do |inc|
- output.puts("#include #{inc.include?('<') ? inc : "\"#{inc}\""}")
- end
- testfile_includes.each do |inc|
- output.puts("#include #{inc.include?('<') ? inc : "\"#{inc}\""}")
- end
- output.puts "\n"
- tests.each do |test|
- if test[:params].nil? || test[:params].empty?
- output.puts("void #{test[:test]}(void);")
- else
- output.puts("void #{test[:test]}(#{test[:params]});")
- end
- end
- output.puts("#endif\n\n")
- end
-end
-
-if $0 == __FILE__
- options = { includes: [] }
-
- # parse out all the options first (these will all be removed as we go)
- ARGV.reject! do |arg|
- case arg
- when '-cexception'
- options[:plugins] = [:cexception]
- true
- when /\.*\.ya?ml$/
- options = UnityTestRunnerGenerator.grab_config(arg)
- true
- when /--(\w+)=\"?(.*)\"?/
- options[Regexp.last_match(1).to_sym] = Regexp.last_match(2)
- true
- when /\.*\.(?:hpp|hh|H|h)$/
- options[:includes] << arg
- true
- else false
- end
- end
-
- # make sure there is at least one parameter left (the input file)
- unless ARGV[0]
- puts ["\nusage: ruby #{__FILE__} (files) (options) input_test_file (output)",
- "\n input_test_file - this is the C file you want to create a runner for",
- ' output - this is the name of the runner file to generate',
- ' defaults to (input_test_file)_Runner',
- ' files:',
- ' *.yml / *.yaml - loads configuration from here in :unity or :cmock',
- ' *.h - header files are added as #includes in runner',
- ' options:',
- ' -cexception - include cexception support',
- ' -externc - add extern "C" for cpp support',
- ' --setup_name="" - redefine setUp func name to something else',
- ' --teardown_name="" - redefine tearDown func name to something else',
- ' --main_name="" - redefine main func name to something else',
- ' --test_prefix="" - redefine test prefix from default test|spec|should',
- ' --test_reset_name="" - redefine resetTest func name to something else',
- ' --test_verify_name="" - redefine verifyTest func name to something else',
- ' --suite_setup="" - code to execute for setup of entire suite',
- ' --suite_teardown="" - code to execute for teardown of entire suite',
- ' --use_param_tests=1 - enable parameterized tests (disabled by default)',
- ' --omit_begin_end=1 - omit calls to UnityBegin and UnityEnd (disabled by default)',
- ' --header_file="" - path/name of test header file to generate too'].join("\n")
- exit 1
- end
-
- # create the default test runner name if not specified
- ARGV[1] = ARGV[0].gsub('.c', '_Runner.c') unless ARGV[1]
-
- UnityTestRunnerGenerator.new(options).run(ARGV[0], ARGV[1])
-end
diff --git a/lib/lvgl/tests/unity/run_test.erb b/lib/lvgl/tests/unity/run_test.erb
deleted file mode 100644
index f91b566..0000000
--- a/lib/lvgl/tests/unity/run_test.erb
+++ /dev/null
@@ -1,37 +0,0 @@
-/*=======Test Runner Used To Run Each Test=====*/
-static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num)
-{
- Unity.CurrentTestName = name;
- Unity.CurrentTestLineNumber = line_num;
-#ifdef UNITY_USE_COMMAND_LINE_ARGS
- if (!UnityTestMatches())
- return;
-#endif
- Unity.NumberOfTests++;
- UNITY_CLR_DETAILS();
- UNITY_EXEC_TIME_START();
- CMock_Init();
- if (TEST_PROTECT())
- {
-<% if @options[:plugins].include?(:cexception) %>
- CEXCEPTION_T e;
- Try {
- <%= @options[:setup_name] %>();
- func();
- } Catch(e) {
- TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!");
- }
-<% else %>
- <%= @options[:setup_name] %>();
- func();
-<% end %>
- }
- if (TEST_PROTECT())
- {
- <%= @options[:teardown_name] %>();
- CMock_Verify();
- }
- CMock_Destroy();
- UNITY_EXEC_TIME_STOP();
- UnityConcludeTest();
-}
diff --git a/lib/lvgl/tests/unity/type_sanitizer.rb b/lib/lvgl/tests/unity/type_sanitizer.rb
deleted file mode 100644
index dafb882..0000000
--- a/lib/lvgl/tests/unity/type_sanitizer.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module TypeSanitizer
- def self.sanitize_c_identifier(unsanitized)
- # convert filename to valid C identifier by replacing invalid chars with '_'
- unsanitized.gsub(/[-\/\\\.\,\s]/, '_')
- end
-end
diff --git a/lib/lvgl/tests/unity/unity.c b/lib/lvgl/tests/unity/unity.c
deleted file mode 100644
index efc9c57..0000000
--- a/lib/lvgl/tests/unity/unity.c
+++ /dev/null
@@ -1,2113 +0,0 @@
-/* =========================================================================
- Unity Project - A Test Framework for C
- Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams
- [Released under MIT License. Please refer to license.txt for details]
-============================================================================ */
-#if LV_BUILD_TEST
-#define UNITY_INCLUDE_PRINT_FORMATTED 1
-#include "unity.h"
-#include
-
-#ifdef AVR
-#include
-#else
-#define PROGMEM
-#endif
-
-/* If omitted from header, declare overrideable prototypes here so they're ready for use */
-#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
-void UNITY_OUTPUT_CHAR(int);
-#endif
-
-/* Helpful macros for us to use here in Assert functions */
-#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; UNITY_OUTPUT_FLUSH(); TEST_ABORT(); }
-#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; UNITY_OUTPUT_FLUSH(); TEST_ABORT(); }
-#define RETURN_IF_FAIL_OR_IGNORE if (Unity.CurrentTestFailed || Unity.CurrentTestIgnored) TEST_ABORT()
-
-struct UNITY_STORAGE_T Unity;
-
-#ifdef UNITY_OUTPUT_COLOR
-const char PROGMEM UnityStrOk[] = "\033[42mOK\033[00m";
-const char PROGMEM UnityStrPass[] = "\033[42mPASS\033[00m";
-const char PROGMEM UnityStrFail[] = "\033[41mFAIL\033[00m";
-const char PROGMEM UnityStrIgnore[] = "\033[43mIGNORE\033[00m";
-#else
-const char PROGMEM UnityStrOk[] = "OK";
-const char PROGMEM UnityStrPass[] = "PASS";
-const char PROGMEM UnityStrFail[] = "FAIL";
-const char PROGMEM UnityStrIgnore[] = "IGNORE";
-#endif
-static const char PROGMEM UnityStrNull[] = "NULL";
-static const char PROGMEM UnityStrSpacer[] = ". ";
-static const char PROGMEM UnityStrExpected[] = " Expected ";
-static const char PROGMEM UnityStrWas[] = " Was ";
-static const char PROGMEM UnityStrGt[] = " to be greater than ";
-static const char PROGMEM UnityStrLt[] = " to be less than ";
-static const char PROGMEM UnityStrOrEqual[] = "or equal to ";
-static const char PROGMEM UnityStrNotEqual[] = " to be not equal to ";
-static const char PROGMEM UnityStrElement[] = " Element ";
-static const char PROGMEM UnityStrByte[] = " Byte ";
-static const char PROGMEM UnityStrMemory[] = " Memory Mismatch.";
-static const char PROGMEM UnityStrDelta[] = " Values Not Within Delta ";
-static const char PROGMEM UnityStrPointless[] = " You Asked Me To Compare Nothing, Which Was Pointless.";
-static const char PROGMEM UnityStrNullPointerForExpected[] = " Expected pointer to be NULL";
-static const char PROGMEM UnityStrNullPointerForActual[] = " Actual pointer was NULL";
-#ifndef UNITY_EXCLUDE_FLOAT
-static const char PROGMEM UnityStrNot[] = "Not ";
-static const char PROGMEM UnityStrInf[] = "Infinity";
-static const char PROGMEM UnityStrNegInf[] = "Negative Infinity";
-static const char PROGMEM UnityStrNaN[] = "NaN";
-static const char PROGMEM UnityStrDet[] = "Determinate";
-static const char PROGMEM UnityStrInvalidFloatTrait[] = "Invalid Float Trait";
-#endif
-const char PROGMEM UnityStrErrShorthand[] = "Unity Shorthand Support Disabled";
-const char PROGMEM UnityStrErrFloat[] = "Unity Floating Point Disabled";
-const char PROGMEM UnityStrErrDouble[] = "Unity Double Precision Disabled";
-const char PROGMEM UnityStrErr64[] = "Unity 64-bit Support Disabled";
-static const char PROGMEM UnityStrBreaker[] = "-----------------------";
-static const char PROGMEM UnityStrResultsTests[] = " Tests ";
-static const char PROGMEM UnityStrResultsFailures[] = " Failures ";
-static const char PROGMEM UnityStrResultsIgnored[] = " Ignored ";
-#ifndef UNITY_EXCLUDE_DETAILS
-static const char PROGMEM UnityStrDetail1Name[] = UNITY_DETAIL1_NAME " ";
-static const char PROGMEM UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " ";
-#endif
-/*-----------------------------------------------
- * Pretty Printers & Test Result Output Handlers
- *-----------------------------------------------*/
-
-/*-----------------------------------------------*/
-/* Local helper function to print characters. */
-static void UnityPrintChar(const char* pch)
-{
- /* printable characters plus CR & LF are printed */
- if ((*pch <= 126) && (*pch >= 32))
- {
- UNITY_OUTPUT_CHAR(*pch);
- }
- /* write escaped carriage returns */
- else if (*pch == 13)
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('r');
- }
- /* write escaped line feeds */
- else if (*pch == 10)
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('n');
- }
- /* unprintable characters are shown as codes */
- else
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((UNITY_UINT)*pch, 2);
- }
-}
-
-/*-----------------------------------------------*/
-/* Local helper function to print ANSI escape strings e.g. "\033[42m". */
-#ifdef UNITY_OUTPUT_COLOR
-static UNITY_UINT UnityPrintAnsiEscapeString(const char* string)
-{
- const char* pch = string;
- UNITY_UINT count = 0;
-
- while (*pch && (*pch != 'm'))
- {
- UNITY_OUTPUT_CHAR(*pch);
- pch++;
- count++;
- }
- UNITY_OUTPUT_CHAR('m');
- count++;
-
- return count;
-}
-#endif
-
-/*-----------------------------------------------*/
-void UnityPrint(const char* string)
-{
- const char* pch = string;
-
- if (pch != NULL)
- {
- while (*pch)
- {
-#ifdef UNITY_OUTPUT_COLOR
- /* print ANSI escape code */
- if ((*pch == 27) && (*(pch + 1) == '['))
- {
- pch += UnityPrintAnsiEscapeString(pch);
- continue;
- }
-#endif
- UnityPrintChar(pch);
- pch++;
- }
- }
-}
-/*-----------------------------------------------*/
-void UnityPrintLen(const char* string, const UNITY_UINT32 length)
-{
- const char* pch = string;
-
- if (pch != NULL)
- {
- while (*pch && ((UNITY_UINT32)(pch - string) < length))
- {
- /* printable characters plus CR & LF are printed */
- if ((*pch <= 126) && (*pch >= 32))
- {
- UNITY_OUTPUT_CHAR(*pch);
- }
- /* write escaped carriage returns */
- else if (*pch == 13)
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('r');
- }
- /* write escaped line feeds */
- else if (*pch == 10)
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('n');
- }
- /* unprintable characters are shown as codes */
- else
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((UNITY_UINT)*pch, 2);
- }
- pch++;
- }
- }
-}
-
-/*-----------------------------------------------*/
-void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style)
-{
- if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
- {
- if (style == UNITY_DISPLAY_STYLE_CHAR)
- {
- /* printable characters plus CR & LF are printed */
- UNITY_OUTPUT_CHAR('\'');
- if ((number <= 126) && (number >= 32))
- {
- UNITY_OUTPUT_CHAR((int)number);
- }
- /* write escaped carriage returns */
- else if (number == 13)
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('r');
- }
- /* write escaped line feeds */
- else if (number == 10)
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('n');
- }
- /* unprintable characters are shown as codes */
- else
- {
- UNITY_OUTPUT_CHAR('\\');
- UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((UNITY_UINT)number, 2);
- }
- UNITY_OUTPUT_CHAR('\'');
- }
- else
- {
- UnityPrintNumber(number);
- }
- }
- else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
- {
- UnityPrintNumberUnsigned((UNITY_UINT)number);
- }
- else
- {
- UNITY_OUTPUT_CHAR('0');
- UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((UNITY_UINT)number, (char)((style & 0xF) * 2));
- }
-}
-
-/*-----------------------------------------------*/
-void UnityPrintNumber(const UNITY_INT number_to_print)
-{
- UNITY_UINT number = (UNITY_UINT)number_to_print;
-
- if (number_to_print < 0)
- {
- /* A negative number, including MIN negative */
- UNITY_OUTPUT_CHAR('-');
- number = (~number) + 1;
- }
- UnityPrintNumberUnsigned(number);
-}
-
-/*-----------------------------------------------
- * basically do an itoa using as little ram as possible */
-void UnityPrintNumberUnsigned(const UNITY_UINT number)
-{
- UNITY_UINT divisor = 1;
-
- /* figure out initial divisor */
- while (number / divisor > 9)
- {
- divisor *= 10;
- }
-
- /* now mod and print, then divide divisor */
- do
- {
- UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10)));
- divisor /= 10;
- } while (divisor > 0);
-}
-
-/*-----------------------------------------------*/
-void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
-{
- int nibble;
- char nibbles = nibbles_to_print;
-
- if ((unsigned)nibbles > UNITY_MAX_NIBBLES)
- {
- nibbles = UNITY_MAX_NIBBLES;
- }
-
- while (nibbles > 0)
- {
- nibbles--;
- nibble = (int)(number >> (nibbles * 4)) & 0x0F;
- if (nibble <= 9)
- {
- UNITY_OUTPUT_CHAR((char)('0' + nibble));
- }
- else
- {
- UNITY_OUTPUT_CHAR((char)('A' - 10 + nibble));
- }
- }
-}
-
-/*-----------------------------------------------*/
-void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number)
-{
- UNITY_UINT current_bit = (UNITY_UINT)1 << (UNITY_INT_WIDTH - 1);
- UNITY_INT32 i;
-
- for (i = 0; i < UNITY_INT_WIDTH; i++)
- {
- if (current_bit & mask)
- {
- if (current_bit & number)
- {
- UNITY_OUTPUT_CHAR('1');
- }
- else
- {
- UNITY_OUTPUT_CHAR('0');
- }
- }
- else
- {
- UNITY_OUTPUT_CHAR('X');
- }
- current_bit = current_bit >> 1;
- }
-}
-
-/*-----------------------------------------------*/
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
-/*
- * This function prints a floating-point value in a format similar to
- * printf("%.7g") on a single-precision machine or printf("%.9g") on a
- * double-precision machine. The 7th digit won't always be totally correct
- * in single-precision operation (for that level of accuracy, a more
- * complicated algorithm would be needed).
- */
-void UnityPrintFloat(const UNITY_DOUBLE input_number)
-{
-#ifdef UNITY_INCLUDE_DOUBLE
- static const int sig_digits = 9;
- static const UNITY_INT32 min_scaled = 100000000;
- static const UNITY_INT32 max_scaled = 1000000000;
-#else
- static const int sig_digits = 7;
- static const UNITY_INT32 min_scaled = 1000000;
- static const UNITY_INT32 max_scaled = 10000000;
-#endif
-
- UNITY_DOUBLE number = input_number;
-
- /* print minus sign (does not handle negative zero) */
- if (number < 0.0f)
- {
- UNITY_OUTPUT_CHAR('-');
- number = -number;
- }
-
- /* handle zero, NaN, and +/- infinity */
- if (number == 0.0f)
- {
- UnityPrint("0");
- }
- else if (isnan(number))
- {
- UnityPrint("nan");
- }
- else if (isinf(number))
- {
- UnityPrint("inf");
- }
- else
- {
- UNITY_INT32 n_int = 0, n;
- int exponent = 0;
- int decimals, digits;
- char buf[16] = {0};
-
- /*
- * Scale up or down by powers of 10. To minimize rounding error,
- * start with a factor/divisor of 10^10, which is the largest
- * power of 10 that can be represented exactly. Finally, compute
- * (exactly) the remaining power of 10 and perform one more
- * multiplication or division.
- */
- if (number < 1.0f)
- {
- UNITY_DOUBLE factor = 1.0f;
-
- while (number < (UNITY_DOUBLE)max_scaled / 1e10f) { number *= 1e10f; exponent -= 10; }
- while (number * factor < (UNITY_DOUBLE)min_scaled) { factor *= 10.0f; exponent--; }
-
- number *= factor;
- }
- else if (number > (UNITY_DOUBLE)max_scaled)
- {
- UNITY_DOUBLE divisor = 1.0f;
-
- while (number > (UNITY_DOUBLE)min_scaled * 1e10f) { number /= 1e10f; exponent += 10; }
- while (number / divisor > (UNITY_DOUBLE)max_scaled) { divisor *= 10.0f; exponent++; }
-
- number /= divisor;
- }
- else
- {
- /*
- * In this range, we can split off the integer part before
- * doing any multiplications. This reduces rounding error by
- * freeing up significant bits in the fractional part.
- */
- UNITY_DOUBLE factor = 1.0f;
- n_int = (UNITY_INT32)number;
- number -= (UNITY_DOUBLE)n_int;
-
- while (n_int < min_scaled) { n_int *= 10; factor *= 10.0f; exponent--; }
-
- number *= factor;
- }
-
- /* round to nearest integer */
- n = ((UNITY_INT32)(number + number) + 1) / 2;
-
-#ifndef UNITY_ROUND_TIES_AWAY_FROM_ZERO
- /* round to even if exactly between two integers */
- if ((n & 1) && (((UNITY_DOUBLE)n - number) == 0.5f))
- n--;
-#endif
-
- n += n_int;
-
- if (n >= max_scaled)
- {
- n = min_scaled;
- exponent++;
- }
-
- /* determine where to place decimal point */
- decimals = ((exponent <= 0) && (exponent >= -(sig_digits + 3))) ? (-exponent) : (sig_digits - 1);
- exponent += decimals;
-
- /* truncate trailing zeroes after decimal point */
- while ((decimals > 0) && ((n % 10) == 0))
- {
- n /= 10;
- decimals--;
- }
-
- /* build up buffer in reverse order */
- digits = 0;
- while ((n != 0) || (digits < (decimals + 1)))
- {
- buf[digits++] = (char)('0' + n % 10);
- n /= 10;
- }
- while (digits > 0)
- {
- if (digits == decimals) { UNITY_OUTPUT_CHAR('.'); }
- UNITY_OUTPUT_CHAR(buf[--digits]);
- }
-
- /* print exponent if needed */
- if (exponent != 0)
- {
- UNITY_OUTPUT_CHAR('e');
-
- if (exponent < 0)
- {
- UNITY_OUTPUT_CHAR('-');
- exponent = -exponent;
- }
- else
- {
- UNITY_OUTPUT_CHAR('+');
- }
-
- digits = 0;
- while ((exponent != 0) || (digits < 2))
- {
- buf[digits++] = (char)('0' + exponent % 10);
- exponent /= 10;
- }
- while (digits > 0)
- {
- UNITY_OUTPUT_CHAR(buf[--digits]);
- }
- }
- }
-}
-#endif /* ! UNITY_EXCLUDE_FLOAT_PRINT */
-
-/*-----------------------------------------------*/
-static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
-{
-#ifdef UNITY_OUTPUT_FOR_ECLIPSE
- UNITY_OUTPUT_CHAR('(');
- UnityPrint(file);
- UNITY_OUTPUT_CHAR(':');
- UnityPrintNumber((UNITY_INT)line);
- UNITY_OUTPUT_CHAR(')');
- UNITY_OUTPUT_CHAR(' ');
- UnityPrint(Unity.CurrentTestName);
- UNITY_OUTPUT_CHAR(':');
-#else
-#ifdef UNITY_OUTPUT_FOR_IAR_WORKBENCH
- UnityPrint("');
- UnityPrint(Unity.CurrentTestName);
- UnityPrint(" ");
-#else
-#ifdef UNITY_OUTPUT_FOR_QT_CREATOR
- UnityPrint("file://");
- UnityPrint(file);
- UNITY_OUTPUT_CHAR(':');
- UnityPrintNumber((UNITY_INT)line);
- UNITY_OUTPUT_CHAR(' ');
- UnityPrint(Unity.CurrentTestName);
- UNITY_OUTPUT_CHAR(':');
-#else
- UnityPrint(file);
- UNITY_OUTPUT_CHAR(':');
- UnityPrintNumber((UNITY_INT)line);
- UNITY_OUTPUT_CHAR(':');
- UnityPrint(Unity.CurrentTestName);
- UNITY_OUTPUT_CHAR(':');
-#endif
-#endif
-#endif
-}
-
-/*-----------------------------------------------*/
-static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
-{
- UnityTestResultsBegin(Unity.TestFile, line);
- UnityPrint(UnityStrFail);
- UNITY_OUTPUT_CHAR(':');
-}
-
-/*-----------------------------------------------*/
-void UnityConcludeTest(void)
-{
- if (Unity.CurrentTestIgnored)
- {
- Unity.TestIgnores++;
- }
- else if (!Unity.CurrentTestFailed)
- {
- UnityTestResultsBegin(Unity.TestFile, Unity.CurrentTestLineNumber);
- UnityPrint(UnityStrPass);
- }
- else
- {
- Unity.TestFailures++;
- }
-
- Unity.CurrentTestFailed = 0;
- Unity.CurrentTestIgnored = 0;
- UNITY_PRINT_EXEC_TIME();
- UNITY_PRINT_EOL();
- UNITY_FLUSH_CALL();
-}
-
-/*-----------------------------------------------*/
-static void UnityAddMsgIfSpecified(const char* msg)
-{
- if (msg)
- {
- UnityPrint(UnityStrSpacer);
-
-#ifdef UNITY_PRINT_TEST_CONTEXT
- UNITY_PRINT_TEST_CONTEXT();
-#endif
-#ifndef UNITY_EXCLUDE_DETAILS
- if (Unity.CurrentDetail1)
- {
- UnityPrint(UnityStrDetail1Name);
- UnityPrint(Unity.CurrentDetail1);
- if (Unity.CurrentDetail2)
- {
- UnityPrint(UnityStrDetail2Name);
- UnityPrint(Unity.CurrentDetail2);
- }
- UnityPrint(UnityStrSpacer);
- }
-#endif
- UnityPrint(msg);
- }
-}
-
-/*-----------------------------------------------*/
-static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
-{
- UnityPrint(UnityStrExpected);
- if (expected != NULL)
- {
- UNITY_OUTPUT_CHAR('\'');
- UnityPrint(expected);
- UNITY_OUTPUT_CHAR('\'');
- }
- else
- {
- UnityPrint(UnityStrNull);
- }
- UnityPrint(UnityStrWas);
- if (actual != NULL)
- {
- UNITY_OUTPUT_CHAR('\'');
- UnityPrint(actual);
- UNITY_OUTPUT_CHAR('\'');
- }
- else
- {
- UnityPrint(UnityStrNull);
- }
-}
-
-/*-----------------------------------------------*/
-static void UnityPrintExpectedAndActualStringsLen(const char* expected,
- const char* actual,
- const UNITY_UINT32 length)
-{
- UnityPrint(UnityStrExpected);
- if (expected != NULL)
- {
- UNITY_OUTPUT_CHAR('\'');
- UnityPrintLen(expected, length);
- UNITY_OUTPUT_CHAR('\'');
- }
- else
- {
- UnityPrint(UnityStrNull);
- }
- UnityPrint(UnityStrWas);
- if (actual != NULL)
- {
- UNITY_OUTPUT_CHAR('\'');
- UnityPrintLen(actual, length);
- UNITY_OUTPUT_CHAR('\'');
- }
- else
- {
- UnityPrint(UnityStrNull);
- }
-}
-
-/*-----------------------------------------------
- * Assertion & Control Helpers
- *-----------------------------------------------*/
-
-/*-----------------------------------------------*/
-static int UnityIsOneArrayNull(UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_LINE_TYPE lineNumber,
- const char* msg)
-{
- /* Both are NULL or same pointer */
- if (expected == actual) { return 0; }
-
- /* print and return true if just expected is NULL */
- if (expected == NULL)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrNullPointerForExpected);
- UnityAddMsgIfSpecified(msg);
- return 1;
- }
-
- /* print and return true if just actual is NULL */
- if (actual == NULL)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrNullPointerForActual);
- UnityAddMsgIfSpecified(msg);
- return 1;
- }
-
- return 0; /* return false if neither is NULL */
-}
-
-/*-----------------------------------------------
- * Assertion Functions
- *-----------------------------------------------*/
-
-/*-----------------------------------------------*/
-void UnityAssertBits(const UNITY_INT mask,
- const UNITY_INT expected,
- const UNITY_INT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
- if ((mask & expected) != (mask & actual))
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrExpected);
- UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)expected);
- UnityPrint(UnityStrWas);
- UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)actual);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualNumber(const UNITY_INT expected,
- const UNITY_INT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
- if (expected != actual)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(expected, style);
- UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(actual, style);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertGreaterOrLessOrEqualNumber(const UNITY_INT threshold,
- const UNITY_INT actual,
- const UNITY_COMPARISON_T compare,
- const char *msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style)
-{
- int failed = 0;
- RETURN_IF_FAIL_OR_IGNORE;
-
- if ((threshold == actual) && (compare & UNITY_EQUAL_TO)) { return; }
- if ((threshold == actual)) { failed = 1; }
-
- if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
- {
- if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
- if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
- }
- else /* UINT or HEX */
- {
- if (((UNITY_UINT)actual > (UNITY_UINT)threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
- if (((UNITY_UINT)actual < (UNITY_UINT)threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
- }
-
- if (failed)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(actual, style);
- if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); }
- if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); }
- if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); }
- if (compare == UNITY_NOT_EQUAL) { UnityPrint(UnityStrNotEqual); }
- UnityPrintNumberByStyle(threshold, style);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-#define UnityPrintPointlessAndBail() \
-{ \
- UnityTestResultsFailBegin(lineNumber); \
- UnityPrint(UnityStrPointless); \
- UnityAddMsgIfSpecified(msg); \
- UNITY_FAIL_AND_BAIL; }
-
-/*-----------------------------------------------*/
-void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style,
- const UNITY_FLAGS_T flags)
-{
- UNITY_UINT32 elements = num_elements;
- unsigned int length = style & 0xF;
- unsigned int increment = 0;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- if (num_elements == 0)
- {
- UnityPrintPointlessAndBail();
- }
-
- if (expected == actual)
- {
- return; /* Both are NULL or same pointer */
- }
-
- if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
- {
- UNITY_FAIL_AND_BAIL;
- }
-
- while ((elements > 0) && (elements--))
- {
- UNITY_INT expect_val;
- UNITY_INT actual_val;
-
- switch (length)
- {
- case 1:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
- increment = sizeof(UNITY_INT8);
- break;
-
- case 2:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
- increment = sizeof(UNITY_INT16);
- break;
-
-#ifdef UNITY_SUPPORT_64
- case 8:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
- increment = sizeof(UNITY_INT64);
- break;
-#endif
-
- default: /* default is length 4 bytes */
- case 4:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
- increment = sizeof(UNITY_INT32);
- length = 4;
- break;
- }
-
- if (expect_val != actual_val)
- {
- if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8)))
- { /* For UINT, remove sign extension (padding 1's) from signed type casts above */
- UNITY_INT mask = 1;
- mask = (mask << 8 * length) - 1;
- expect_val &= mask;
- actual_val &= mask;
- }
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrElement);
- UnityPrintNumberUnsigned(num_elements - elements - 1);
- UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(expect_val, style);
- UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(actual_val, style);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
- /* Walk through array by incrementing the pointers */
- if (flags == UNITY_ARRAY_TO_ARRAY)
- {
- expected = (UNITY_INTERNAL_PTR)((const char*)expected + increment);
- }
- actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
- }
-}
-
-/*-----------------------------------------------*/
-#ifndef UNITY_EXCLUDE_FLOAT
-/* Wrap this define in a function with variable types as float or double */
-#define UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff) \
- if (isinf(expected) && isinf(actual) && (((expected) < 0) == ((actual) < 0))) return 1; \
- if (UNITY_NAN_CHECK) return 1; \
- (diff) = (actual) - (expected); \
- if ((diff) < 0) (diff) = -(diff); \
- if ((delta) < 0) (delta) = -(delta); \
- return !(isnan(diff) || isinf(diff) || ((diff) > (delta)))
- /* This first part of this condition will catch any NaN or Infinite values */
-#ifndef UNITY_NAN_NOT_EQUAL_NAN
- #define UNITY_NAN_CHECK isnan(expected) && isnan(actual)
-#else
- #define UNITY_NAN_CHECK 0
-#endif
-
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
- #define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
- { \
- UnityPrint(UnityStrExpected); \
- UnityPrintFloat(expected); \
- UnityPrint(UnityStrWas); \
- UnityPrintFloat(actual); }
-#else
- #define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
- UnityPrint(UnityStrDelta)
-#endif /* UNITY_EXCLUDE_FLOAT_PRINT */
-
-/*-----------------------------------------------*/
-static int UnityFloatsWithin(UNITY_FLOAT delta, UNITY_FLOAT expected, UNITY_FLOAT actual)
-{
- UNITY_FLOAT diff;
- UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* expected,
- UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags)
-{
- UNITY_UINT32 elements = num_elements;
- UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_expected = expected;
- UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_actual = actual;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- if (elements == 0)
- {
- UnityPrintPointlessAndBail();
- }
-
- if (expected == actual)
- {
- return; /* Both are NULL or same pointer */
- }
-
- if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
- {
- UNITY_FAIL_AND_BAIL;
- }
-
- while (elements--)
- {
- if (!UnityFloatsWithin(*ptr_expected * UNITY_FLOAT_PRECISION, *ptr_expected, *ptr_actual))
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrElement);
- UnityPrintNumberUnsigned(num_elements - elements - 1);
- UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)*ptr_expected, (UNITY_DOUBLE)*ptr_actual);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
- if (flags == UNITY_ARRAY_TO_ARRAY)
- {
- ptr_expected++;
- }
- ptr_actual++;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
- const UNITY_FLOAT expected,
- const UNITY_FLOAT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
-
- if (!UnityFloatsWithin(delta, expected, actual))
- {
- UnityTestResultsFailBegin(lineNumber);
- UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLOAT_TRAIT_T style)
-{
- const char* trait_names[] = {UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet};
- UNITY_INT should_be_trait = ((UNITY_INT)style & 1);
- UNITY_INT is_trait = !should_be_trait;
- UNITY_INT trait_index = (UNITY_INT)(style >> 1);
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- switch (style)
- {
- case UNITY_FLOAT_IS_INF:
- case UNITY_FLOAT_IS_NOT_INF:
- is_trait = isinf(actual) && (actual > 0);
- break;
- case UNITY_FLOAT_IS_NEG_INF:
- case UNITY_FLOAT_IS_NOT_NEG_INF:
- is_trait = isinf(actual) && (actual < 0);
- break;
-
- case UNITY_FLOAT_IS_NAN:
- case UNITY_FLOAT_IS_NOT_NAN:
- is_trait = isnan(actual) ? 1 : 0;
- break;
-
- case UNITY_FLOAT_IS_DET: /* A determinate number is non infinite and not NaN. */
- case UNITY_FLOAT_IS_NOT_DET:
- is_trait = !isinf(actual) && !isnan(actual);
- break;
-
- default: /* including UNITY_FLOAT_INVALID_TRAIT */
- trait_index = 0;
- trait_names[0] = UnityStrInvalidFloatTrait;
- break;
- }
-
- if (is_trait != should_be_trait)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrExpected);
- if (!should_be_trait)
- {
- UnityPrint(UnityStrNot);
- }
- UnityPrint(trait_names[trait_index]);
- UnityPrint(UnityStrWas);
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
- UnityPrintFloat((UNITY_DOUBLE)actual);
-#else
- if (should_be_trait)
- {
- UnityPrint(UnityStrNot);
- }
- UnityPrint(trait_names[trait_index]);
-#endif
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-#endif /* not UNITY_EXCLUDE_FLOAT */
-
-/*-----------------------------------------------*/
-#ifndef UNITY_EXCLUDE_DOUBLE
-static int UnityDoublesWithin(UNITY_DOUBLE delta, UNITY_DOUBLE expected, UNITY_DOUBLE actual)
-{
- UNITY_DOUBLE diff;
- UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* expected,
- UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags)
-{
- UNITY_UINT32 elements = num_elements;
- UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_expected = expected;
- UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_actual = actual;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- if (elements == 0)
- {
- UnityPrintPointlessAndBail();
- }
-
- if (expected == actual)
- {
- return; /* Both are NULL or same pointer */
- }
-
- if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
- {
- UNITY_FAIL_AND_BAIL;
- }
-
- while (elements--)
- {
- if (!UnityDoublesWithin(*ptr_expected * UNITY_DOUBLE_PRECISION, *ptr_expected, *ptr_actual))
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrElement);
- UnityPrintNumberUnsigned(num_elements - elements - 1);
- UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(*ptr_expected, *ptr_actual);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
- if (flags == UNITY_ARRAY_TO_ARRAY)
- {
- ptr_expected++;
- }
- ptr_actual++;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
- const UNITY_DOUBLE expected,
- const UNITY_DOUBLE actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
- if (!UnityDoublesWithin(delta, expected, actual))
- {
- UnityTestResultsFailBegin(lineNumber);
- UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLOAT_TRAIT_T style)
-{
- const char* trait_names[] = {UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet};
- UNITY_INT should_be_trait = ((UNITY_INT)style & 1);
- UNITY_INT is_trait = !should_be_trait;
- UNITY_INT trait_index = (UNITY_INT)(style >> 1);
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- switch (style)
- {
- case UNITY_FLOAT_IS_INF:
- case UNITY_FLOAT_IS_NOT_INF:
- is_trait = isinf(actual) && (actual > 0);
- break;
- case UNITY_FLOAT_IS_NEG_INF:
- case UNITY_FLOAT_IS_NOT_NEG_INF:
- is_trait = isinf(actual) && (actual < 0);
- break;
-
- case UNITY_FLOAT_IS_NAN:
- case UNITY_FLOAT_IS_NOT_NAN:
- is_trait = isnan(actual) ? 1 : 0;
- break;
-
- case UNITY_FLOAT_IS_DET: /* A determinate number is non infinite and not NaN. */
- case UNITY_FLOAT_IS_NOT_DET:
- is_trait = !isinf(actual) && !isnan(actual);
- break;
-
- default: /* including UNITY_FLOAT_INVALID_TRAIT */
- trait_index = 0;
- trait_names[0] = UnityStrInvalidFloatTrait;
- break;
- }
-
- if (is_trait != should_be_trait)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrExpected);
- if (!should_be_trait)
- {
- UnityPrint(UnityStrNot);
- }
- UnityPrint(trait_names[trait_index]);
- UnityPrint(UnityStrWas);
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
- UnityPrintFloat(actual);
-#else
- if (should_be_trait)
- {
- UnityPrint(UnityStrNot);
- }
- UnityPrint(trait_names[trait_index]);
-#endif
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-#endif /* not UNITY_EXCLUDE_DOUBLE */
-
-/*-----------------------------------------------*/
-void UnityAssertNumbersWithin(const UNITY_UINT delta,
- const UNITY_INT expected,
- const UNITY_INT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
- if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
- {
- if (actual > expected)
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
- }
- else
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
- }
- }
- else
- {
- if ((UNITY_UINT)actual > (UNITY_UINT)expected)
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
- }
- else
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
- }
- }
-
- if (Unity.CurrentTestFailed)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrDelta);
- UnityPrintNumberByStyle((UNITY_INT)delta, style);
- UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(expected, style);
- UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(actual, style);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
- UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style,
- const UNITY_FLAGS_T flags)
-{
- UNITY_UINT32 elements = num_elements;
- unsigned int length = style & 0xF;
- unsigned int increment = 0;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- if (num_elements == 0)
- {
- UnityPrintPointlessAndBail();
- }
-
- if (expected == actual)
- {
- return; /* Both are NULL or same pointer */
- }
-
- if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
- {
- UNITY_FAIL_AND_BAIL;
- }
-
- while ((elements > 0) && (elements--))
- {
- UNITY_INT expect_val;
- UNITY_INT actual_val;
-
- switch (length)
- {
- case 1:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
- increment = sizeof(UNITY_INT8);
- break;
-
- case 2:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
- increment = sizeof(UNITY_INT16);
- break;
-
-#ifdef UNITY_SUPPORT_64
- case 8:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
- increment = sizeof(UNITY_INT64);
- break;
-#endif
-
- default: /* default is length 4 bytes */
- case 4:
- expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
- actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
- increment = sizeof(UNITY_INT32);
- length = 4;
- break;
- }
-
- if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
- {
- if (actual_val > expect_val)
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)actual_val - (UNITY_UINT)expect_val) > delta);
- }
- else
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)expect_val - (UNITY_UINT)actual_val) > delta);
- }
- }
- else
- {
- if ((UNITY_UINT)actual_val > (UNITY_UINT)expect_val)
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)actual_val - (UNITY_UINT)expect_val) > delta);
- }
- else
- {
- Unity.CurrentTestFailed = (((UNITY_UINT)expect_val - (UNITY_UINT)actual_val) > delta);
- }
- }
-
- if (Unity.CurrentTestFailed)
- {
- if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8)))
- { /* For UINT, remove sign extension (padding 1's) from signed type casts above */
- UNITY_INT mask = 1;
- mask = (mask << 8 * length) - 1;
- expect_val &= mask;
- actual_val &= mask;
- }
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrDelta);
- UnityPrintNumberByStyle((UNITY_INT)delta, style);
- UnityPrint(UnityStrElement);
- UnityPrintNumberUnsigned(num_elements - elements - 1);
- UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(expect_val, style);
- UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(actual_val, style);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
- /* Walk through array by incrementing the pointers */
- if (flags == UNITY_ARRAY_TO_ARRAY)
- {
- expected = (UNITY_INTERNAL_PTR)((const char*)expected + increment);
- }
- actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualString(const char* expected,
- const char* actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber)
-{
- UNITY_UINT32 i;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- /* if both pointers not null compare the strings */
- if (expected && actual)
- {
- for (i = 0; expected[i] || actual[i]; i++)
- {
- if (expected[i] != actual[i])
- {
- Unity.CurrentTestFailed = 1;
- break;
- }
- }
- }
- else
- { /* handle case of one pointers being null (if both null, test should pass) */
- if (expected != actual)
- {
- Unity.CurrentTestFailed = 1;
- }
- }
-
- if (Unity.CurrentTestFailed)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrintExpectedAndActualStrings(expected, actual);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualStringLen(const char* expected,
- const char* actual,
- const UNITY_UINT32 length,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber)
-{
- UNITY_UINT32 i;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- /* if both pointers not null compare the strings */
- if (expected && actual)
- {
- for (i = 0; (i < length) && (expected[i] || actual[i]); i++)
- {
- if (expected[i] != actual[i])
- {
- Unity.CurrentTestFailed = 1;
- break;
- }
- }
- }
- else
- { /* handle case of one pointers being null (if both null, test should pass) */
- if (expected != actual)
- {
- Unity.CurrentTestFailed = 1;
- }
- }
-
- if (Unity.CurrentTestFailed)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrintExpectedAndActualStringsLen(expected, actual, length);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
- const char** actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags)
-{
- UNITY_UINT32 i = 0;
- UNITY_UINT32 j = 0;
- const char* expd = NULL;
- const char* act = NULL;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- /* if no elements, it's an error */
- if (num_elements == 0)
- {
- UnityPrintPointlessAndBail();
- }
-
- if ((const void*)expected == (const void*)actual)
- {
- return; /* Both are NULL or same pointer */
- }
-
- if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
- {
- UNITY_FAIL_AND_BAIL;
- }
-
- if (flags != UNITY_ARRAY_TO_ARRAY)
- {
- expd = (const char*)expected;
- }
-
- do
- {
- act = actual[j];
- if (flags == UNITY_ARRAY_TO_ARRAY)
- {
- expd = ((const char* const*)expected)[j];
- }
-
- /* if both pointers not null compare the strings */
- if (expd && act)
- {
- for (i = 0; expd[i] || act[i]; i++)
- {
- if (expd[i] != act[i])
- {
- Unity.CurrentTestFailed = 1;
- break;
- }
- }
- }
- else
- { /* handle case of one pointers being null (if both null, test should pass) */
- if (expd != act)
- {
- Unity.CurrentTestFailed = 1;
- }
- }
-
- if (Unity.CurrentTestFailed)
- {
- UnityTestResultsFailBegin(lineNumber);
- if (num_elements > 1)
- {
- UnityPrint(UnityStrElement);
- UnityPrintNumberUnsigned(j);
- }
- UnityPrintExpectedAndActualStrings(expd, act);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
- } while (++j < num_elements);
-}
-
-/*-----------------------------------------------*/
-void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_UINT32 length,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags)
-{
- UNITY_PTR_ATTRIBUTE const unsigned char* ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
- UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
- UNITY_UINT32 elements = num_elements;
- UNITY_UINT32 bytes;
-
- RETURN_IF_FAIL_OR_IGNORE;
-
- if ((elements == 0) || (length == 0))
- {
- UnityPrintPointlessAndBail();
- }
-
- if (expected == actual)
- {
- return; /* Both are NULL or same pointer */
- }
-
- if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
- {
- UNITY_FAIL_AND_BAIL;
- }
-
- while (elements--)
- {
- bytes = length;
- while (bytes--)
- {
- if (*ptr_exp != *ptr_act)
- {
- UnityTestResultsFailBegin(lineNumber);
- UnityPrint(UnityStrMemory);
- if (num_elements > 1)
- {
- UnityPrint(UnityStrElement);
- UnityPrintNumberUnsigned(num_elements - elements - 1);
- }
- UnityPrint(UnityStrByte);
- UnityPrintNumberUnsigned(length - bytes - 1);
- UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8);
- UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
- UnityAddMsgIfSpecified(msg);
- UNITY_FAIL_AND_BAIL;
- }
- ptr_exp++;
- ptr_act++;
- }
- if (flags == UNITY_ARRAY_TO_VAL)
- {
- ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
- }
- }
-}
-
-/*-----------------------------------------------*/
-
-static union
-{
- UNITY_INT8 i8;
- UNITY_INT16 i16;
- UNITY_INT32 i32;
-#ifdef UNITY_SUPPORT_64
- UNITY_INT64 i64;
-#endif
-#ifndef UNITY_EXCLUDE_FLOAT
- float f;
-#endif
-#ifndef UNITY_EXCLUDE_DOUBLE
- double d;
-#endif
-} UnityQuickCompare;
-
-UNITY_INTERNAL_PTR UnityNumToPtr(const UNITY_INT num, const UNITY_UINT8 size)
-{
- switch(size)
- {
- case 1:
- UnityQuickCompare.i8 = (UNITY_INT8)num;
- return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i8);
-
- case 2:
- UnityQuickCompare.i16 = (UNITY_INT16)num;
- return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i16);
-
-#ifdef UNITY_SUPPORT_64
- case 8:
- UnityQuickCompare.i64 = (UNITY_INT64)num;
- return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i64);
-#endif
-
- default: /* 4 bytes */
- UnityQuickCompare.i32 = (UNITY_INT32)num;
- return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i32);
- }
-}
-
-#ifndef UNITY_EXCLUDE_FLOAT
-/*-----------------------------------------------*/
-UNITY_INTERNAL_PTR UnityFloatToPtr(const float num)
-{
- UnityQuickCompare.f = num;
- return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.f);
-}
-#endif
-
-#ifndef UNITY_EXCLUDE_DOUBLE
-/*-----------------------------------------------*/
-UNITY_INTERNAL_PTR UnityDoubleToPtr(const double num)
-{
- UnityQuickCompare.d = num;
- return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.d);
-}
-#endif
-
-/*-----------------------------------------------
- * printf helper function
- *-----------------------------------------------*/
-#ifdef UNITY_INCLUDE_PRINT_FORMATTED
-static void UnityPrintFVA(const char* format, va_list va)
-{
- const char* pch = format;
- if (pch != NULL)
- {
- while (*pch)
- {
- /* format identification character */
- if (*pch == '%')
- {
- pch++;
-
- if (pch != NULL)
- {
- switch (*pch)
- {
- case 'd':
- case 'i':
- {
- const int number = va_arg(va, int);
- UnityPrintNumber((UNITY_INT)number);
- break;
- }
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
- case 'f':
- case 'g':
- {
- const double number = va_arg(va, double);
- UnityPrintFloat((UNITY_DOUBLE)number);
- break;
- }
-#endif
- case 'u':
- {
- const unsigned int number = va_arg(va, unsigned int);
- UnityPrintNumberUnsigned((UNITY_UINT)number);
- break;
- }
- case 'b':
- {
- const unsigned int number = va_arg(va, unsigned int);
- const UNITY_UINT mask = (UNITY_UINT)0 - (UNITY_UINT)1;
- UNITY_OUTPUT_CHAR('0');
- UNITY_OUTPUT_CHAR('b');
- UnityPrintMask(mask, (UNITY_UINT)number);
- break;
- }
- case 'x':
- case 'X':
- case 'p':
- {
- const unsigned int number = va_arg(va, unsigned int);
- UNITY_OUTPUT_CHAR('0');
- UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((UNITY_UINT)number, 8);
- break;
- }
- case 'c':
- {
- const int ch = va_arg(va, int);
- UnityPrintChar((const char *)&ch);
- break;
- }
- case 's':
- {
- const char * string = va_arg(va, const char *);
- UnityPrint(string);
- break;
- }
- case '%':
- {
- UnityPrintChar(pch);
- break;
- }
- default:
- {
- /* print the unknown format character */
- UNITY_OUTPUT_CHAR('%');
- UnityPrintChar(pch);
- break;
- }
- }
- }
- }
-#ifdef UNITY_OUTPUT_COLOR
- /* print ANSI escape code */
- else if ((*pch == 27) && (*(pch + 1) == '['))
- {
- pch += UnityPrintAnsiEscapeString(pch);
- continue;
- }
-#endif
- else if (*pch == '\n')
- {
- UNITY_PRINT_EOL();
- }
- else
- {
- UnityPrintChar(pch);
- }
-
- pch++;
- }
- }
-}
-
-void UnityPrintF(const UNITY_LINE_TYPE line, const char* format, ...)
-{
- UnityTestResultsBegin(Unity.TestFile, line);
- UnityPrint("INFO");
- if(format != NULL)
- {
- UnityPrint(": ");
- va_list va;
- va_start(va, format);
- UnityPrintFVA(format, va);
- va_end(va);
- }
- UNITY_PRINT_EOL();
-}
-#endif /* ! UNITY_INCLUDE_PRINT_FORMATTED */
-
-
-/*-----------------------------------------------
- * Control Functions
- *-----------------------------------------------*/
-
-/*-----------------------------------------------*/
-void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
- UnityTestResultsBegin(Unity.TestFile, line);
- UnityPrint(UnityStrFail);
- if (msg != NULL)
- {
- UNITY_OUTPUT_CHAR(':');
-
-#ifdef UNITY_PRINT_TEST_CONTEXT
- UNITY_PRINT_TEST_CONTEXT();
-#endif
-#ifndef UNITY_EXCLUDE_DETAILS
- if (Unity.CurrentDetail1)
- {
- UnityPrint(UnityStrDetail1Name);
- UnityPrint(Unity.CurrentDetail1);
- if (Unity.CurrentDetail2)
- {
- UnityPrint(UnityStrDetail2Name);
- UnityPrint(Unity.CurrentDetail2);
- }
- UnityPrint(UnityStrSpacer);
- }
-#endif
- if (msg[0] != ' ')
- {
- UNITY_OUTPUT_CHAR(' ');
- }
- UnityPrint(msg);
- }
-
- UNITY_FAIL_AND_BAIL;
-}
-
-/*-----------------------------------------------*/
-void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
-{
- RETURN_IF_FAIL_OR_IGNORE;
-
- UnityTestResultsBegin(Unity.TestFile, line);
- UnityPrint(UnityStrIgnore);
- if (msg != NULL)
- {
- UNITY_OUTPUT_CHAR(':');
- UNITY_OUTPUT_CHAR(' ');
- UnityPrint(msg);
- }
- UNITY_IGNORE_AND_BAIL;
-}
-
-/*-----------------------------------------------*/
-void UnityMessage(const char* msg, const UNITY_LINE_TYPE line)
-{
- UnityTestResultsBegin(Unity.TestFile, line);
- UnityPrint("INFO");
- if (msg != NULL)
- {
- UNITY_OUTPUT_CHAR(':');
- UNITY_OUTPUT_CHAR(' ');
- UnityPrint(msg);
- }
- UNITY_PRINT_EOL();
-}
-
-/*-----------------------------------------------*/
-/* If we have not defined our own test runner, then include our default test runner to make life easier */
-#ifndef UNITY_SKIP_DEFAULT_RUNNER
-void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum)
-{
- Unity.CurrentTestName = FuncName;
- Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)FuncLineNum;
- Unity.NumberOfTests++;
- UNITY_CLR_DETAILS();
- UNITY_EXEC_TIME_START();
- if (TEST_PROTECT())
- {
- setUp();
- Func();
- }
- if (TEST_PROTECT())
- {
- tearDown();
- }
- UNITY_EXEC_TIME_STOP();
- UnityConcludeTest();
-}
-#endif
-
-/*-----------------------------------------------*/
-void UnitySetTestFile(const char* filename)
-{
- Unity.TestFile = filename;
-}
-
-/*-----------------------------------------------*/
-void UnityBegin(const char* filename)
-{
- Unity.TestFile = filename;
- Unity.CurrentTestName = NULL;
- Unity.CurrentTestLineNumber = 0;
- Unity.NumberOfTests = 0;
- Unity.TestFailures = 0;
- Unity.TestIgnores = 0;
- Unity.CurrentTestFailed = 0;
- Unity.CurrentTestIgnored = 0;
-
- UNITY_CLR_DETAILS();
- UNITY_OUTPUT_START();
-}
-
-/*-----------------------------------------------*/
-int UnityEnd(void)
-{
- UNITY_PRINT_EOL();
- UnityPrint(UnityStrBreaker);
- UNITY_PRINT_EOL();
- UnityPrintNumber((UNITY_INT)(Unity.NumberOfTests));
- UnityPrint(UnityStrResultsTests);
- UnityPrintNumber((UNITY_INT)(Unity.TestFailures));
- UnityPrint(UnityStrResultsFailures);
- UnityPrintNumber((UNITY_INT)(Unity.TestIgnores));
- UnityPrint(UnityStrResultsIgnored);
- UNITY_PRINT_EOL();
- if (Unity.TestFailures == 0U)
- {
- UnityPrint(UnityStrOk);
- }
- else
- {
- UnityPrint(UnityStrFail);
-#ifdef UNITY_DIFFERENTIATE_FINAL_FAIL
- UNITY_OUTPUT_CHAR('E'); UNITY_OUTPUT_CHAR('D');
-#endif
- }
- UNITY_PRINT_EOL();
- UNITY_FLUSH_CALL();
- UNITY_OUTPUT_COMPLETE();
- return (int)(Unity.TestFailures);
-}
-
-/*-----------------------------------------------
- * Command Line Argument Support
- *-----------------------------------------------*/
-#ifdef UNITY_USE_COMMAND_LINE_ARGS
-
-char* UnityOptionIncludeNamed = NULL;
-char* UnityOptionExcludeNamed = NULL;
-int UnityVerbosity = 1;
-
-/*-----------------------------------------------*/
-int UnityParseOptions(int argc, char** argv)
-{
- int i;
- UnityOptionIncludeNamed = NULL;
- UnityOptionExcludeNamed = NULL;
-
- for (i = 1; i < argc; i++)
- {
- if (argv[i][0] == '-')
- {
- switch (argv[i][1])
- {
- case 'l': /* list tests */
- return -1;
- case 'n': /* include tests with name including this string */
- case 'f': /* an alias for -n */
- if (argv[i][2] == '=')
- {
- UnityOptionIncludeNamed = &argv[i][3];
- }
- else if (++i < argc)
- {
- UnityOptionIncludeNamed = argv[i];
- }
- else
- {
- UnityPrint("ERROR: No Test String to Include Matches For");
- UNITY_PRINT_EOL();
- return 1;
- }
- break;
- case 'q': /* quiet */
- UnityVerbosity = 0;
- break;
- case 'v': /* verbose */
- UnityVerbosity = 2;
- break;
- case 'x': /* exclude tests with name including this string */
- if (argv[i][2] == '=')
- {
- UnityOptionExcludeNamed = &argv[i][3];
- }
- else if (++i < argc)
- {
- UnityOptionExcludeNamed = argv[i];
- }
- else
- {
- UnityPrint("ERROR: No Test String to Exclude Matches For");
- UNITY_PRINT_EOL();
- return 1;
- }
- break;
- default:
- UnityPrint("ERROR: Unknown Option ");
- UNITY_OUTPUT_CHAR(argv[i][1]);
- UNITY_PRINT_EOL();
- return 1;
- }
- }
- }
-
- return 0;
-}
-
-/*-----------------------------------------------*/
-int IsStringInBiggerString(const char* longstring, const char* shortstring)
-{
- const char* lptr = longstring;
- const char* sptr = shortstring;
- const char* lnext = lptr;
-
- if (*sptr == '*')
- {
- return 1;
- }
-
- while (*lptr)
- {
- lnext = lptr + 1;
-
- /* If they current bytes match, go on to the next bytes */
- while (*lptr && *sptr && (*lptr == *sptr))
- {
- lptr++;
- sptr++;
-
- /* We're done if we match the entire string or up to a wildcard */
- if (*sptr == '*')
- return 1;
- if (*sptr == ',')
- return 1;
- if (*sptr == '"')
- return 1;
- if (*sptr == '\'')
- return 1;
- if (*sptr == ':')
- return 2;
- if (*sptr == 0)
- return 1;
- }
-
- /* Otherwise we start in the long pointer 1 character further and try again */
- lptr = lnext;
- sptr = shortstring;
- }
-
- return 0;
-}
-
-/*-----------------------------------------------*/
-int UnityStringArgumentMatches(const char* str)
-{
- int retval;
- const char* ptr1;
- const char* ptr2;
- const char* ptrf;
-
- /* Go through the options and get the substrings for matching one at a time */
- ptr1 = str;
- while (ptr1[0] != 0)
- {
- if ((ptr1[0] == '"') || (ptr1[0] == '\''))
- {
- ptr1++;
- }
-
- /* look for the start of the next partial */
- ptr2 = ptr1;
- ptrf = 0;
- do
- {
- ptr2++;
- if ((ptr2[0] == ':') && (ptr2[1] != 0) && (ptr2[0] != '\'') && (ptr2[0] != '"') && (ptr2[0] != ','))
- {
- ptrf = &ptr2[1];
- }
- } while ((ptr2[0] != 0) && (ptr2[0] != '\'') && (ptr2[0] != '"') && (ptr2[0] != ','));
-
- while ((ptr2[0] != 0) && ((ptr2[0] == ':') || (ptr2[0] == '\'') || (ptr2[0] == '"') || (ptr2[0] == ',')))
- {
- ptr2++;
- }
-
- /* done if complete filename match */
- retval = IsStringInBiggerString(Unity.TestFile, ptr1);
- if (retval == 1)
- {
- return retval;
- }
-
- /* done if testname match after filename partial match */
- if ((retval == 2) && (ptrf != 0))
- {
- if (IsStringInBiggerString(Unity.CurrentTestName, ptrf))
- {
- return 1;
- }
- }
-
- /* done if complete testname match */
- if (IsStringInBiggerString(Unity.CurrentTestName, ptr1) == 1)
- {
- return 1;
- }
-
- ptr1 = ptr2;
- }
-
- /* we couldn't find a match for any substrings */
- return 0;
-}
-
-/*-----------------------------------------------*/
-int UnityTestMatches(void)
-{
- /* Check if this test name matches the included test pattern */
- int retval;
- if (UnityOptionIncludeNamed)
- {
- retval = UnityStringArgumentMatches(UnityOptionIncludeNamed);
- }
- else
- {
- retval = 1;
- }
-
- /* Check if this test name matches the excluded test pattern */
- if (UnityOptionExcludeNamed)
- {
- if (UnityStringArgumentMatches(UnityOptionExcludeNamed))
- {
- retval = 0;
- }
- }
-
- return retval;
-}
-
-#endif /* UNITY_USE_COMMAND_LINE_ARGS */
-/*-----------------------------------------------*/
-#endif /*LV_BUILD_TEST*/
-
diff --git a/lib/lvgl/tests/unity/unity.h b/lib/lvgl/tests/unity/unity.h
deleted file mode 100644
index bf8ecea..0000000
--- a/lib/lvgl/tests/unity/unity.h
+++ /dev/null
@@ -1,668 +0,0 @@
-/* ==========================================
- Unity Project - A Test Framework for C
- Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams
- [Released under MIT License. Please refer to license.txt for details]
-========================================== */
-#if LV_BUILD_TEST
-#define UNITY_INCLUDE_PRINT_FORMATTED 1
-
-#ifndef UNITY_FRAMEWORK_H
-#define UNITY_FRAMEWORK_H
-#define UNITY
-
-#define UNITY_VERSION_MAJOR 2
-#define UNITY_VERSION_MINOR 5
-#define UNITY_VERSION_BUILD 2
-#define UNITY_VERSION ((UNITY_VERSION_MAJOR << 16) | (UNITY_VERSION_MINOR << 8) | UNITY_VERSION_BUILD)
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include "unity_internals.h"
-
-/*-------------------------------------------------------
- * Test Setup / Teardown
- *-------------------------------------------------------*/
-
-/* These functions are intended to be called before and after each test.
- * If using unity directly, these will need to be provided for each test
- * executable built. If you are using the test runner generator and/or
- * Ceedling, these are optional. */
-void setUp(void);
-void tearDown(void);
-
-/* These functions are intended to be called at the beginning and end of an
- * entire test suite. suiteTearDown() is passed the number of tests that
- * failed, and its return value becomes the exit code of main(). If using
- * Unity directly, you're in charge of calling these if they are desired.
- * If using Ceedling or the test runner generator, these will be called
- * automatically if they exist. */
-void suiteSetUp(void);
-int suiteTearDown(int num_failures);
-
-/*-------------------------------------------------------
- * Test Reset and Verify
- *-------------------------------------------------------*/
-
-/* These functions are intended to be called before during tests in order
- * to support complex test loops, etc. Both are NOT built into Unity. Instead
- * the test runner generator will create them. resetTest will run teardown and
- * setup again, verifying any end-of-test needs between. verifyTest will only
- * run the verification. */
-void resetTest(void);
-void verifyTest(void);
-
-/*-------------------------------------------------------
- * Configuration Options
- *-------------------------------------------------------
- * All options described below should be passed as a compiler flag to all files using Unity. If you must add #defines, place them BEFORE the #include above.
-
- * Integers/longs/pointers
- * - Unity attempts to automatically discover your integer sizes
- * - define UNITY_EXCLUDE_STDINT_H to stop attempting to look in
- * - define UNITY_EXCLUDE_LIMITS_H to stop attempting to look in
- * - If you cannot use the automatic methods above, you can force Unity by using these options:
- * - define UNITY_SUPPORT_64
- * - set UNITY_INT_WIDTH
- * - set UNITY_LONG_WIDTH
- * - set UNITY_POINTER_WIDTH
-
- * Floats
- * - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
- * - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
- * - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
- * - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
- * - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
- * - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
- * - define UNITY_DOUBLE_TYPE to specify something other than double
- * - define UNITY_EXCLUDE_FLOAT_PRINT to trim binary size, won't print floating point values in errors
-
- * Output
- * - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired
- * - define UNITY_DIFFERENTIATE_FINAL_FAIL to print FAILED (vs. FAIL) at test end summary - for automated search for failure
-
- * Optimization
- * - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge
- * - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
-
- * Test Cases
- * - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
-
- * Parameterized Tests
- * - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing
-
- * Tests with Arguments
- * - you'll want to define UNITY_USE_COMMAND_LINE_ARGS if you have the test runner passing arguments to Unity
-
- *-------------------------------------------------------
- * Basic Fail and Ignore
- *-------------------------------------------------------*/
-
-#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, (message))
-#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
-#define TEST_IGNORE_MESSAGE(message) UNITY_TEST_IGNORE(__LINE__, (message))
-#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
-#define TEST_MESSAGE(message) UnityMessage((message), __LINE__)
-#define TEST_ONLY()
-#ifdef UNITY_INCLUDE_PRINT_FORMATTED
-#define TEST_PRINTF(message, ...) UnityPrintF(__LINE__, (message), __VA_ARGS__)
-#endif
-
-/* It is not necessary for you to call PASS. A PASS condition is assumed if nothing fails.
- * This method allows you to abort a test immediately with a PASS state, ignoring the remainder of the test. */
-#define TEST_PASS() TEST_ABORT()
-#define TEST_PASS_MESSAGE(message) do { UnityMessage((message), __LINE__); TEST_ABORT(); } while(0)
-
-/* This macro does nothing, but it is useful for build tools (like Ceedling) to make use of this to figure out
- * which files should be linked to in order to perform a test. Use it like TEST_FILE("sandwiches.c") */
-#define TEST_FILE(a)
-
-/*-------------------------------------------------------
- * Test Asserts (simple)
- *-------------------------------------------------------*/
-
-/* Boolean */
-#define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE")
-#define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE")
-#define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE")
-#define TEST_ASSERT_FALSE(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expected FALSE Was TRUE")
-#define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL")
-#define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
-#define TEST_ASSERT_EMPTY(pointer) UNITY_TEST_ASSERT_EMPTY( (pointer), __LINE__, " Expected Empty")
-#define TEST_ASSERT_NOT_EMPTY(pointer) UNITY_TEST_ASSERT_NOT_EMPTY((pointer), __LINE__, " Expected Non-Empty")
-
-/* Integers (of all sizes) */
-#define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_size_t(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX8(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX16(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX32(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX64(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_CHAR(expected, actual) UNITY_TEST_ASSERT_EQUAL_CHAR((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_BITS(mask, expected, actual) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_BITS_HIGH(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT)(-1), (actual), __LINE__, NULL)
-#define TEST_ASSERT_BITS_LOW(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT)(0), (actual), __LINE__, NULL)
-#define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((UNITY_UINT)1 << (bit)), (UNITY_UINT)(-1), (actual), __LINE__, NULL)
-#define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((UNITY_UINT)1 << (bit)), (UNITY_UINT)(0), (actual), __LINE__, NULL)
-
-/* Integer Not Equal To (of all sizes) */
-#define TEST_ASSERT_NOT_EQUAL_INT(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_size_t(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual) UNITY_TEST_ASSERT_NOT_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
-
-/* Integer Greater Than/ Less Than (of all sizes) */
-#define TEST_ASSERT_GREATER_THAN(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_INT(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_INT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_INT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_INT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_INT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_INT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_UINT(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_size_t(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_HEX64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual) UNITY_TEST_ASSERT_GREATER_THAN_CHAR((threshold), (actual), __LINE__, NULL)
-
-#define TEST_ASSERT_LESS_THAN(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_INT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_INT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_INT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_INT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_INT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_INT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_UINT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_UINT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_UINT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_UINT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_UINT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_size_t(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_HEX8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_HEX16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_HEX32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_HEX64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_HEX64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_THAN_CHAR(threshold, actual) UNITY_TEST_ASSERT_SMALLER_THAN_CHAR((threshold), (actual), __LINE__, NULL)
-
-#define TEST_ASSERT_GREATER_OR_EQUAL(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_size_t(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
-
-#define TEST_ASSERT_LESS_OR_EQUAL(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_INT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_INT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_INT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_INT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_INT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_size_t(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX8(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX16(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX32(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX64(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
-#define TEST_ASSERT_LESS_OR_EQUAL_CHAR(threshold, actual) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
-
-/* Integer Ranges (of all sizes) */
-#define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_INT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_INT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_INT32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_INT64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_UINT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_UINT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_UINT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_UINT32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_UINT64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_size_t_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_HEX_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_HEX8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_HEX16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_CHAR_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_CHAR_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-
-/* Integer Array Ranges (of all sizes) */
-#define TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_INT16_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_INT32_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_UINT_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_UINT8_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_UINT16_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_UINT32_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_size_t_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_HEX_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-#define TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, num_elements) UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, NULL)
-
-
-/* Structs and Strings */
-#define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, NULL)
-
-/* Arrays */
-#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_size_t_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_CHAR_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-
-/* Arrays Compared To Single Value */
-#define TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_INT8(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT8((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_INT16(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT16((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT32((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_INT64((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_UINT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_UINT8(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT8((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_UINT16(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT16((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_UINT32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT32((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT64((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_size_t(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_HEX(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_HEX8(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX8((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX16((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_CHAR((expected), (actual), (num_elements), __LINE__, NULL)
-
-/* Floating Point (If Enabled) */
-#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_NEG_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NAN((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_NOT_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, NULL)
-#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
-
-/* Double (If Enabled) */
-#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements) UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_NEG_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NAN((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_NOT_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, NULL)
-#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
-
-/* Shorthand */
-#ifdef UNITY_SHORTHAND_AS_OLD
-#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
-#endif
-#ifdef UNITY_SHORTHAND_AS_INT
-#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#endif
-#ifdef UNITY_SHORTHAND_AS_MEM
-#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_MEMORY((&expected), (&actual), sizeof(expected), __LINE__, NULL)
-#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#endif
-#ifdef UNITY_SHORTHAND_AS_RAW
-#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) == (actual)), __LINE__, " Expected Equal")
-#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
-#endif
-#ifdef UNITY_SHORTHAND_AS_NONE
-#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#endif
-
-/*-------------------------------------------------------
- * Test Asserts (with additional messages)
- *-------------------------------------------------------*/
-
-/* Boolean */
-#define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
-#define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
-#define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message))
-#define TEST_ASSERT_FALSE_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message))
-#define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, (message))
-#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, (message))
-#define TEST_ASSERT_EMPTY_MESSAGE(pointer, message) UNITY_TEST_ASSERT_EMPTY( (pointer), __LINE__, (message))
-#define TEST_ASSERT_NOT_EMPTY_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_EMPTY((pointer), __LINE__, (message))
-
-/* Integers (of all sizes) */
-#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_size_t_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_BITS_MESSAGE(mask, expected, actual, message) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_BITS_HIGH_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(-1), (actual), __LINE__, (message))
-#define TEST_ASSERT_BITS_LOW_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(0), (actual), __LINE__, (message))
-#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(-1), (actual), __LINE__, (message))
-#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(0), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_CHAR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_CHAR((expected), (actual), __LINE__, (message))
-
-/* Integer Not Equal To (of all sizes) */
-#define TEST_ASSERT_NOT_EQUAL_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_INT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_NOT_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
-
-
-/* Integer Greater Than/ Less Than (of all sizes) */
-#define TEST_ASSERT_GREATER_THAN_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_INT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_HEX64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_THAN_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_THAN_CHAR((threshold), (actual), __LINE__, (message))
-
-#define TEST_ASSERT_LESS_THAN_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_INT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_HEX64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_THAN_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_THAN_CHAR((threshold), (actual), __LINE__, (message))
-
-#define TEST_ASSERT_GREATER_OR_EQUAL_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_GREATER_OR_EQUAL_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
-
-#define TEST_ASSERT_LESS_OR_EQUAL_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_INT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_INT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_INT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_INT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_INT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_UINT64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_size_t_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX8_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX16_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX32_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_HEX64_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
-#define TEST_ASSERT_LESS_OR_EQUAL_CHAR_MESSAGE(threshold, actual, message) UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
-
-/* Integer Ranges (of all sizes) */
-#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_INT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_INT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_INT32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT32_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_INT64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT64_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_UINT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_UINT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT8_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_UINT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT16_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_UINT32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT32_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_UINT64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT64_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_size_t_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_HEX_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_HEX8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX8_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_HEX16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX16_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_CHAR_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_CHAR_WITHIN((delta), (expected), (actual), __LINE__, (message))
-
-/* Integer Array Ranges (of all sizes) */
-#define TEST_ASSERT_INT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_INT8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_INT16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_INT32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_INT64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_UINT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_UINT8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_UINT16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_UINT32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_UINT64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_size_t_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_HEX_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_HEX8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_HEX16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_HEX32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_HEX64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-#define TEST_ASSERT_CHAR_ARRAY_WITHIN_MESSAGE(delta, expected, actual, num_elements, message) UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN((delta), (expected), (actual), num_elements, __LINE__, (message))
-
-
-/* Structs and Strings */
-#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, (message))
-
-/* Arrays */
-#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_INT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_UINT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_size_t_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_HEX64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_PTR_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_CHAR_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-
-/* Arrays Compared To Single Value*/
-#define TEST_ASSERT_EACH_EQUAL_INT_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_INT8_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT8((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_INT16_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT16((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_INT32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT32((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_INT64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_INT64((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_UINT_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_UINT8_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT8((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_UINT16_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT16((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_UINT32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT32((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_UINT64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT64((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_size_t_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_HEX_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_HEX8_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX8((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_HEX16_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX16((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_HEX32_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_HEX64_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_PTR_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_STRING_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_MEMORY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_CHAR_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_CHAR((expected), (actual), (num_elements), __LINE__, (message))
-
-/* Floating Point (If Enabled) */
-#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_FLOAT_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NAN((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_NOT_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_NOT_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, (message))
-#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, (message))
-
-/* Double (If Enabled) */
-#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_EACH_EQUAL_DOUBLE_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NAN((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_NOT_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, (message))
-#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, (message))
-
-/* Shorthand */
-#ifdef UNITY_SHORTHAND_AS_OLD
-#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
-#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, (message))
-#endif
-#ifdef UNITY_SHORTHAND_AS_INT
-#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
-#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#endif
-#ifdef UNITY_SHORTHAND_AS_MEM
-#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((&expected), (&actual), sizeof(expected), __LINE__, message)
-#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#endif
-#ifdef UNITY_SHORTHAND_AS_RAW
-#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) == (actual)), __LINE__, message)
-#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, message)
-#endif
-#ifdef UNITY_SHORTHAND_AS_NONE
-#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
-#endif
-
-/* end of UNITY_FRAMEWORK_H */
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-
-#include "unity_support.h"
-
-#endif /*LV_BUILD_TEST*/
diff --git a/lib/lvgl/tests/unity/unity_internals.h b/lib/lvgl/tests/unity/unity_internals.h
deleted file mode 100644
index 46eb1dd..0000000
--- a/lib/lvgl/tests/unity/unity_internals.h
+++ /dev/null
@@ -1,1042 +0,0 @@
-/* ==========================================
- Unity Project - A Test Framework for C
- Copyright (c) 2007-21 Mike Karlesky, Mark VanderVoord, Greg Williams
- [Released under MIT License. Please refer to license.txt for details]
-========================================== */
-#if LV_BUILD_TEST
-
-#ifndef UNITY_INTERNALS_H
-#define UNITY_INTERNALS_H
-
-#ifdef UNITY_INCLUDE_CONFIG_H
-#include "unity_config.h"
-#endif
-
-#ifndef UNITY_EXCLUDE_SETJMP_H
-#include
-#endif
-
-#ifndef UNITY_EXCLUDE_MATH_H
-#include
-#endif
-
-#ifndef UNITY_EXCLUDE_STDDEF_H
-#include
-#endif
-
-#ifdef UNITY_INCLUDE_PRINT_FORMATTED
-#include
-#endif
-
-/* Unity Attempts to Auto-Detect Integer Types
- * Attempt 1: UINT_MAX, ULONG_MAX in , or default to 32 bits
- * Attempt 2: UINTPTR_MAX in , or default to same size as long
- * The user may override any of these derived constants:
- * UNITY_INT_WIDTH, UNITY_LONG_WIDTH, UNITY_POINTER_WIDTH */
-#ifndef UNITY_EXCLUDE_STDINT_H
-#include
-#endif
-
-#ifndef UNITY_EXCLUDE_LIMITS_H
-#include
-#endif
-
-#if defined(__GNUC__) || defined(__clang__)
- #define UNITY_FUNCTION_ATTR(a) __attribute__((a))
-#else
- #define UNITY_FUNCTION_ATTR(a) /* ignore */
-#endif
-
-/*-------------------------------------------------------
- * Guess Widths If Not Specified
- *-------------------------------------------------------*/
-
-/* Determine the size of an int, if not already specified.
- * We cannot use sizeof(int), because it is not yet defined
- * at this stage in the translation of the C program.
- * Also sizeof(int) does return the size in addressable units on all platforms,
- * which may not necessarily be the size in bytes.
- * Therefore, infer it from UINT_MAX if possible. */
-#ifndef UNITY_INT_WIDTH
- #ifdef UINT_MAX
- #if (UINT_MAX == 0xFFFF)
- #define UNITY_INT_WIDTH (16)
- #elif (UINT_MAX == 0xFFFFFFFF)
- #define UNITY_INT_WIDTH (32)
- #elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
- #define UNITY_INT_WIDTH (64)
- #endif
- #else /* Set to default */
- #define UNITY_INT_WIDTH (32)
- #endif /* UINT_MAX */
-#endif
-
-/* Determine the size of a long, if not already specified. */
-#ifndef UNITY_LONG_WIDTH
- #ifdef ULONG_MAX
- #if (ULONG_MAX == 0xFFFF)
- #define UNITY_LONG_WIDTH (16)
- #elif (ULONG_MAX == 0xFFFFFFFF)
- #define UNITY_LONG_WIDTH (32)
- #elif (ULONG_MAX == 0xFFFFFFFFFFFFFFFF)
- #define UNITY_LONG_WIDTH (64)
- #endif
- #else /* Set to default */
- #define UNITY_LONG_WIDTH (32)
- #endif /* ULONG_MAX */
-#endif
-
-/* Determine the size of a pointer, if not already specified. */
-#ifndef UNITY_POINTER_WIDTH
- #ifdef UINTPTR_MAX
- #if (UINTPTR_MAX <= 0xFFFF)
- #define UNITY_POINTER_WIDTH (16)
- #elif (UINTPTR_MAX <= 0xFFFFFFFF)
- #define UNITY_POINTER_WIDTH (32)
- #elif (UINTPTR_MAX <= 0xFFFFFFFFFFFFFFFF)
- #define UNITY_POINTER_WIDTH (64)
- #endif
- #else /* Set to default */
- #define UNITY_POINTER_WIDTH UNITY_LONG_WIDTH
- #endif /* UINTPTR_MAX */
-#endif
-
-/*-------------------------------------------------------
- * Int Support (Define types based on detected sizes)
- *-------------------------------------------------------*/
-
-#if (UNITY_INT_WIDTH == 32)
- typedef unsigned char UNITY_UINT8;
- typedef unsigned short UNITY_UINT16;
- typedef unsigned int UNITY_UINT32;
- typedef signed char UNITY_INT8;
- typedef signed short UNITY_INT16;
- typedef signed int UNITY_INT32;
-#elif (UNITY_INT_WIDTH == 16)
- typedef unsigned char UNITY_UINT8;
- typedef unsigned int UNITY_UINT16;
- typedef unsigned long UNITY_UINT32;
- typedef signed char UNITY_INT8;
- typedef signed int UNITY_INT16;
- typedef signed long UNITY_INT32;
-#else
- #error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
-#endif
-
-/*-------------------------------------------------------
- * 64-bit Support
- *-------------------------------------------------------*/
-
-/* Auto-detect 64 Bit Support */
-#ifndef UNITY_SUPPORT_64
- #if UNITY_LONG_WIDTH == 64 || UNITY_POINTER_WIDTH == 64
- #define UNITY_SUPPORT_64
- #endif
-#endif
-
-/* 64-Bit Support Dependent Configuration */
-#ifndef UNITY_SUPPORT_64
- /* No 64-bit Support */
- typedef UNITY_UINT32 UNITY_UINT;
- typedef UNITY_INT32 UNITY_INT;
- #define UNITY_MAX_NIBBLES (8) /* Maximum number of nibbles in a UNITY_(U)INT */
-#else
- /* 64-bit Support */
- #if (UNITY_LONG_WIDTH == 32)
- typedef unsigned long long UNITY_UINT64;
- typedef signed long long UNITY_INT64;
- #elif (UNITY_LONG_WIDTH == 64)
- typedef unsigned long UNITY_UINT64;
- typedef signed long UNITY_INT64;
- #else
- #error Invalid UNITY_LONG_WIDTH specified! (32 or 64 are supported)
- #endif
- typedef UNITY_UINT64 UNITY_UINT;
- typedef UNITY_INT64 UNITY_INT;
- #define UNITY_MAX_NIBBLES (16) /* Maximum number of nibbles in a UNITY_(U)INT */
-#endif
-
-/*-------------------------------------------------------
- * Pointer Support
- *-------------------------------------------------------*/
-
-#if (UNITY_POINTER_WIDTH == 32)
- #define UNITY_PTR_TO_INT UNITY_INT32
- #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
-#elif (UNITY_POINTER_WIDTH == 64)
- #define UNITY_PTR_TO_INT UNITY_INT64
- #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
-#elif (UNITY_POINTER_WIDTH == 16)
- #define UNITY_PTR_TO_INT UNITY_INT16
- #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
-#else
- #error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
-#endif
-
-#ifndef UNITY_PTR_ATTRIBUTE
- #define UNITY_PTR_ATTRIBUTE
-#endif
-
-#ifndef UNITY_INTERNAL_PTR
- #define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void*
-#endif
-
-/*-------------------------------------------------------
- * Float Support
- *-------------------------------------------------------*/
-
-#ifdef UNITY_EXCLUDE_FLOAT
-
-/* No Floating Point Support */
-#ifndef UNITY_EXCLUDE_DOUBLE
-#define UNITY_EXCLUDE_DOUBLE /* Remove double when excluding float support */
-#endif
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
-#define UNITY_EXCLUDE_FLOAT_PRINT
-#endif
-
-#else
-
-/* Floating Point Support */
-#ifndef UNITY_FLOAT_PRECISION
-#define UNITY_FLOAT_PRECISION (0.00001f)
-#endif
-#ifndef UNITY_FLOAT_TYPE
-#define UNITY_FLOAT_TYPE float
-#endif
-typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
-
-/* isinf & isnan macros should be provided by math.h */
-#ifndef isinf
-/* The value of Inf - Inf is NaN */
-#define isinf(n) (isnan((n) - (n)) && !isnan(n))
-#endif
-
-#ifndef isnan
-/* NaN is the only floating point value that does NOT equal itself.
- * Therefore if n != n, then it is NaN. */
-#define isnan(n) ((n != n) ? 1 : 0)
-#endif
-
-#endif
-
-/*-------------------------------------------------------
- * Double Float Support
- *-------------------------------------------------------*/
-
-/* unlike float, we DON'T include by default */
-#if defined(UNITY_EXCLUDE_DOUBLE) || !defined(UNITY_INCLUDE_DOUBLE)
-
- /* No Floating Point Support */
- #ifndef UNITY_EXCLUDE_DOUBLE
- #define UNITY_EXCLUDE_DOUBLE
- #else
- #undef UNITY_INCLUDE_DOUBLE
- #endif
-
- #ifndef UNITY_EXCLUDE_FLOAT
- #ifndef UNITY_DOUBLE_TYPE
- #define UNITY_DOUBLE_TYPE double
- #endif
- typedef UNITY_FLOAT UNITY_DOUBLE;
- /* For parameter in UnityPrintFloat(UNITY_DOUBLE), which aliases to double or float */
- #endif
-
-#else
-
- /* Double Floating Point Support */
- #ifndef UNITY_DOUBLE_PRECISION
- #define UNITY_DOUBLE_PRECISION (1e-12)
- #endif
-
- #ifndef UNITY_DOUBLE_TYPE
- #define UNITY_DOUBLE_TYPE double
- #endif
- typedef UNITY_DOUBLE_TYPE UNITY_DOUBLE;
-
-#endif
-
-/*-------------------------------------------------------
- * Output Method: stdout (DEFAULT)
- *-------------------------------------------------------*/
-#ifndef UNITY_OUTPUT_CHAR
- /* Default to using putchar, which is defined in stdio.h */
- #include
- #define UNITY_OUTPUT_CHAR(a) (void)putchar(a)
-#else
- /* If defined as something else, make sure we declare it here so it's ready for use */
- #ifdef UNITY_OUTPUT_CHAR_HEADER_DECLARATION
- extern void UNITY_OUTPUT_CHAR_HEADER_DECLARATION;
- #endif
-#endif
-
-#ifndef UNITY_OUTPUT_FLUSH
- #ifdef UNITY_USE_FLUSH_STDOUT
- /* We want to use the stdout flush utility */
- #include
- #define UNITY_OUTPUT_FLUSH() (void)fflush(stdout)
- #else
- /* We've specified nothing, therefore flush should just be ignored */
- #define UNITY_OUTPUT_FLUSH()
- #endif
-#else
- /* If defined as something else, make sure we declare it here so it's ready for use */
- #ifdef UNITY_OUTPUT_FLUSH_HEADER_DECLARATION
- extern void UNITY_OUTPUT_FLUSH_HEADER_DECLARATION;
- #endif
-#endif
-
-#ifndef UNITY_OUTPUT_FLUSH
-#define UNITY_FLUSH_CALL()
-#else
-#define UNITY_FLUSH_CALL() UNITY_OUTPUT_FLUSH()
-#endif
-
-#ifndef UNITY_PRINT_EOL
-#define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
-#endif
-
-#ifndef UNITY_OUTPUT_START
-#define UNITY_OUTPUT_START()
-#endif
-
-#ifndef UNITY_OUTPUT_COMPLETE
-#define UNITY_OUTPUT_COMPLETE()
-#endif
-
-#ifdef UNITY_INCLUDE_EXEC_TIME
- #if !defined(UNITY_EXEC_TIME_START) && \
- !defined(UNITY_EXEC_TIME_STOP) && \
- !defined(UNITY_PRINT_EXEC_TIME) && \
- !defined(UNITY_TIME_TYPE)
- /* If none any of these macros are defined then try to provide a default implementation */
-
- #if defined(UNITY_CLOCK_MS)
- /* This is a simple way to get a default implementation on platforms that support getting a millisecond counter */
- #define UNITY_TIME_TYPE UNITY_UINT
- #define UNITY_EXEC_TIME_START() Unity.CurrentTestStartTime = UNITY_CLOCK_MS()
- #define UNITY_EXEC_TIME_STOP() Unity.CurrentTestStopTime = UNITY_CLOCK_MS()
- #define UNITY_PRINT_EXEC_TIME() { \
- UNITY_UINT execTimeMs = (Unity.CurrentTestStopTime - Unity.CurrentTestStartTime); \
- UnityPrint(" ("); \
- UnityPrintNumberUnsigned(execTimeMs); \
- UnityPrint(" ms)"); \
- }
- #elif defined(_WIN32)
- #include
- #define UNITY_TIME_TYPE clock_t
- #define UNITY_GET_TIME(t) t = (clock_t)((clock() * 1000) / CLOCKS_PER_SEC)
- #define UNITY_EXEC_TIME_START() UNITY_GET_TIME(Unity.CurrentTestStartTime)
- #define UNITY_EXEC_TIME_STOP() UNITY_GET_TIME(Unity.CurrentTestStopTime)
- #define UNITY_PRINT_EXEC_TIME() { \
- UNITY_UINT execTimeMs = (Unity.CurrentTestStopTime - Unity.CurrentTestStartTime); \
- UnityPrint(" ("); \
- UnityPrintNumberUnsigned(execTimeMs); \
- UnityPrint(" ms)"); \
- }
- #elif defined(__unix__) || defined(__APPLE__)
- #include
- #define UNITY_TIME_TYPE struct timespec
- #define UNITY_GET_TIME(t) clock_gettime(CLOCK_MONOTONIC, &t)
- #define UNITY_EXEC_TIME_START() UNITY_GET_TIME(Unity.CurrentTestStartTime)
- #define UNITY_EXEC_TIME_STOP() UNITY_GET_TIME(Unity.CurrentTestStopTime)
- #define UNITY_PRINT_EXEC_TIME() { \
- UNITY_UINT execTimeMs = ((Unity.CurrentTestStopTime.tv_sec - Unity.CurrentTestStartTime.tv_sec) * 1000L); \
- execTimeMs += ((Unity.CurrentTestStopTime.tv_nsec - Unity.CurrentTestStartTime.tv_nsec) / 1000000L); \
- UnityPrint(" ("); \
- UnityPrintNumberUnsigned(execTimeMs); \
- UnityPrint(" ms)"); \
- }
- #endif
- #endif
-#endif
-
-#ifndef UNITY_EXEC_TIME_START
-#define UNITY_EXEC_TIME_START() do{}while(0)
-#endif
-
-#ifndef UNITY_EXEC_TIME_STOP
-#define UNITY_EXEC_TIME_STOP() do{}while(0)
-#endif
-
-#ifndef UNITY_TIME_TYPE
-#define UNITY_TIME_TYPE UNITY_UINT
-#endif
-
-#ifndef UNITY_PRINT_EXEC_TIME
-#define UNITY_PRINT_EXEC_TIME() do{}while(0)
-#endif
-
-/*-------------------------------------------------------
- * Footprint
- *-------------------------------------------------------*/
-
-#ifndef UNITY_LINE_TYPE
-#define UNITY_LINE_TYPE UNITY_UINT
-#endif
-
-#ifndef UNITY_COUNTER_TYPE
-#define UNITY_COUNTER_TYPE UNITY_UINT
-#endif
-
-/*-------------------------------------------------------
- * Internal Structs Needed
- *-------------------------------------------------------*/
-
-typedef void (*UnityTestFunction)(void);
-
-#define UNITY_DISPLAY_RANGE_INT (0x10)
-#define UNITY_DISPLAY_RANGE_UINT (0x20)
-#define UNITY_DISPLAY_RANGE_HEX (0x40)
-#define UNITY_DISPLAY_RANGE_CHAR (0x80)
-
-typedef enum
-{
- UNITY_DISPLAY_STYLE_INT = (UNITY_INT_WIDTH / 8) + UNITY_DISPLAY_RANGE_INT,
- UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
- UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
- UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
-#ifdef UNITY_SUPPORT_64
- UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
-#endif
-
- UNITY_DISPLAY_STYLE_UINT = (UNITY_INT_WIDTH / 8) + UNITY_DISPLAY_RANGE_UINT,
- UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
- UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
- UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
-#ifdef UNITY_SUPPORT_64
- UNITY_DISPLAY_STYLE_UINT64 = 8 + UNITY_DISPLAY_RANGE_UINT,
-#endif
-
- UNITY_DISPLAY_STYLE_HEX8 = 1 + UNITY_DISPLAY_RANGE_HEX,
- UNITY_DISPLAY_STYLE_HEX16 = 2 + UNITY_DISPLAY_RANGE_HEX,
- UNITY_DISPLAY_STYLE_HEX32 = 4 + UNITY_DISPLAY_RANGE_HEX,
-#ifdef UNITY_SUPPORT_64
- UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
-#endif
-
- UNITY_DISPLAY_STYLE_CHAR = 1 + UNITY_DISPLAY_RANGE_CHAR + UNITY_DISPLAY_RANGE_INT,
-
- UNITY_DISPLAY_STYLE_UNKNOWN
-} UNITY_DISPLAY_STYLE_T;
-
-typedef enum
-{
- UNITY_WITHIN = 0x0,
- UNITY_EQUAL_TO = 0x1,
- UNITY_GREATER_THAN = 0x2,
- UNITY_GREATER_OR_EQUAL = 0x2 + UNITY_EQUAL_TO,
- UNITY_SMALLER_THAN = 0x4,
- UNITY_SMALLER_OR_EQUAL = 0x4 + UNITY_EQUAL_TO,
- UNITY_NOT_EQUAL = 0x0,
- UNITY_UNKNOWN
-} UNITY_COMPARISON_T;
-
-#ifndef UNITY_EXCLUDE_FLOAT
-typedef enum UNITY_FLOAT_TRAIT
-{
- UNITY_FLOAT_IS_NOT_INF = 0,
- UNITY_FLOAT_IS_INF,
- UNITY_FLOAT_IS_NOT_NEG_INF,
- UNITY_FLOAT_IS_NEG_INF,
- UNITY_FLOAT_IS_NOT_NAN,
- UNITY_FLOAT_IS_NAN,
- UNITY_FLOAT_IS_NOT_DET,
- UNITY_FLOAT_IS_DET,
- UNITY_FLOAT_INVALID_TRAIT
-} UNITY_FLOAT_TRAIT_T;
-#endif
-
-typedef enum
-{
- UNITY_ARRAY_TO_VAL = 0,
- UNITY_ARRAY_TO_ARRAY,
- UNITY_ARRAY_UNKNOWN
-} UNITY_FLAGS_T;
-
-struct UNITY_STORAGE_T
-{
- const char* TestFile;
- const char* CurrentTestName;
-#ifndef UNITY_EXCLUDE_DETAILS
- const char* CurrentDetail1;
- const char* CurrentDetail2;
-#endif
- UNITY_LINE_TYPE CurrentTestLineNumber;
- UNITY_COUNTER_TYPE NumberOfTests;
- UNITY_COUNTER_TYPE TestFailures;
- UNITY_COUNTER_TYPE TestIgnores;
- UNITY_COUNTER_TYPE CurrentTestFailed;
- UNITY_COUNTER_TYPE CurrentTestIgnored;
-#ifdef UNITY_INCLUDE_EXEC_TIME
- UNITY_TIME_TYPE CurrentTestStartTime;
- UNITY_TIME_TYPE CurrentTestStopTime;
-#endif
-#ifndef UNITY_EXCLUDE_SETJMP_H
- jmp_buf AbortFrame;
-#endif
-};
-
-extern struct UNITY_STORAGE_T Unity;
-
-/*-------------------------------------------------------
- * Test Suite Management
- *-------------------------------------------------------*/
-
-void UnityBegin(const char* filename);
-int UnityEnd(void);
-void UnitySetTestFile(const char* filename);
-void UnityConcludeTest(void);
-
-#ifndef RUN_TEST
-void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
-#else
-#define UNITY_SKIP_DEFAULT_RUNNER
-#endif
-
-/*-------------------------------------------------------
- * Details Support
- *-------------------------------------------------------*/
-
-#ifdef UNITY_EXCLUDE_DETAILS
-#define UNITY_CLR_DETAILS()
-#define UNITY_SET_DETAIL(d1)
-#define UNITY_SET_DETAILS(d1,d2)
-#else
-#define UNITY_CLR_DETAILS() { Unity.CurrentDetail1 = 0; Unity.CurrentDetail2 = 0; }
-#define UNITY_SET_DETAIL(d1) { Unity.CurrentDetail1 = (d1); Unity.CurrentDetail2 = 0; }
-#define UNITY_SET_DETAILS(d1,d2) { Unity.CurrentDetail1 = (d1); Unity.CurrentDetail2 = (d2); }
-
-#ifndef UNITY_DETAIL1_NAME
-#define UNITY_DETAIL1_NAME "Function"
-#endif
-
-#ifndef UNITY_DETAIL2_NAME
-#define UNITY_DETAIL2_NAME "Argument"
-#endif
-#endif
-
-#ifdef UNITY_PRINT_TEST_CONTEXT
-void UNITY_PRINT_TEST_CONTEXT(void);
-#endif
-
-/*-------------------------------------------------------
- * Test Output
- *-------------------------------------------------------*/
-
-void UnityPrint(const char* string);
-
-#ifdef UNITY_INCLUDE_PRINT_FORMATTED
-void UnityPrintF(const UNITY_LINE_TYPE line, const char* format, ...);
-#endif
-
-void UnityPrintLen(const char* string, const UNITY_UINT32 length);
-void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number);
-void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style);
-void UnityPrintNumber(const UNITY_INT number_to_print);
-void UnityPrintNumberUnsigned(const UNITY_UINT number);
-void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print);
-
-#ifndef UNITY_EXCLUDE_FLOAT_PRINT
-void UnityPrintFloat(const UNITY_DOUBLE input_number);
-#endif
-
-/*-------------------------------------------------------
- * Test Assertion Functions
- *-------------------------------------------------------
- * Use the macros below this section instead of calling
- * these directly. The macros have a consistent naming
- * convention and will pull in file and line information
- * for you. */
-
-void UnityAssertEqualNumber(const UNITY_INT expected,
- const UNITY_INT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style);
-
-void UnityAssertGreaterOrLessOrEqualNumber(const UNITY_INT threshold,
- const UNITY_INT actual,
- const UNITY_COMPARISON_T compare,
- const char *msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style);
-
-void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style,
- const UNITY_FLAGS_T flags);
-
-void UnityAssertBits(const UNITY_INT mask,
- const UNITY_INT expected,
- const UNITY_INT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber);
-
-void UnityAssertEqualString(const char* expected,
- const char* actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber);
-
-void UnityAssertEqualStringLen(const char* expected,
- const char* actual,
- const UNITY_UINT32 length,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber);
-
-void UnityAssertEqualStringArray( UNITY_INTERNAL_PTR expected,
- const char** actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags);
-
-void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_UINT32 length,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags);
-
-void UnityAssertNumbersWithin(const UNITY_UINT delta,
- const UNITY_INT expected,
- const UNITY_INT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style);
-
-void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
- UNITY_INTERNAL_PTR expected,
- UNITY_INTERNAL_PTR actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_DISPLAY_STYLE_T style,
- const UNITY_FLAGS_T flags);
-
-#ifndef UNITY_EXCLUDE_SETJMP_H
-void UnityFail(const char* message, const UNITY_LINE_TYPE line) UNITY_FUNCTION_ATTR(noreturn);
-void UnityIgnore(const char* message, const UNITY_LINE_TYPE line) UNITY_FUNCTION_ATTR(noreturn);
-#else
-void UnityFail(const char* message, const UNITY_LINE_TYPE line);
-void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
-#endif
-
-void UnityMessage(const char* message, const UNITY_LINE_TYPE line);
-
-#ifndef UNITY_EXCLUDE_FLOAT
-void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
- const UNITY_FLOAT expected,
- const UNITY_FLOAT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber);
-
-void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* expected,
- UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags);
-
-void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLOAT_TRAIT_T style);
-#endif
-
-#ifndef UNITY_EXCLUDE_DOUBLE
-void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
- const UNITY_DOUBLE expected,
- const UNITY_DOUBLE actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber);
-
-void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* expected,
- UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* actual,
- const UNITY_UINT32 num_elements,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLAGS_T flags);
-
-void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
- const char* msg,
- const UNITY_LINE_TYPE lineNumber,
- const UNITY_FLOAT_TRAIT_T style);
-#endif
-
-/*-------------------------------------------------------
- * Helpers
- *-------------------------------------------------------*/
-
-UNITY_INTERNAL_PTR UnityNumToPtr(const UNITY_INT num, const UNITY_UINT8 size);
-#ifndef UNITY_EXCLUDE_FLOAT
-UNITY_INTERNAL_PTR UnityFloatToPtr(const float num);
-#endif
-#ifndef UNITY_EXCLUDE_DOUBLE
-UNITY_INTERNAL_PTR UnityDoubleToPtr(const double num);
-#endif
-
-/*-------------------------------------------------------
- * Error Strings We Might Need
- *-------------------------------------------------------*/
-
-extern const char UnityStrOk[];
-extern const char UnityStrPass[];
-extern const char UnityStrFail[];
-extern const char UnityStrIgnore[];
-
-extern const char UnityStrErrFloat[];
-extern const char UnityStrErrDouble[];
-extern const char UnityStrErr64[];
-extern const char UnityStrErrShorthand[];
-
-/*-------------------------------------------------------
- * Test Running Macros
- *-------------------------------------------------------*/
-
-#ifndef UNITY_EXCLUDE_SETJMP_H
-#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
-#define TEST_ABORT() longjmp(Unity.AbortFrame, 1)
-#else
-#define TEST_PROTECT() 1
-#define TEST_ABORT() return
-#endif
-
-/* This tricky series of macros gives us an optional line argument to treat it as RUN_TEST(func, num=__LINE__) */
-#ifndef RUN_TEST
-#ifdef __STDC_VERSION__
-#if __STDC_VERSION__ >= 199901L
-#define UNITY_SUPPORT_VARIADIC_MACROS
-#endif
-#endif
-#ifdef UNITY_SUPPORT_VARIADIC_MACROS
-#define RUN_TEST(...) RUN_TEST_AT_LINE(__VA_ARGS__, __LINE__, throwaway)
-#define RUN_TEST_AT_LINE(func, line, ...) UnityDefaultTestRun(func, #func, line)
-#endif
-#endif
-
-/* If we can't do the tricky version, we'll just have to require them to always include the line number */
-#ifndef RUN_TEST
-#ifdef CMOCK
-#define RUN_TEST(func, num) UnityDefaultTestRun(func, #func, num)
-#else
-#define RUN_TEST(func) UnityDefaultTestRun(func, #func, __LINE__)
-#endif
-#endif
-
-#define TEST_LINE_NUM (Unity.CurrentTestLineNumber)
-#define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
-#define UNITY_NEW_TEST(a) \
- Unity.CurrentTestName = (a); \
- Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)(__LINE__); \
- Unity.NumberOfTests++;
-
-#ifndef UNITY_BEGIN
-#define UNITY_BEGIN() UnityBegin(__FILE__)
-#endif
-
-#ifndef UNITY_END
-#define UNITY_END() UnityEnd()
-#endif
-
-#ifndef UNITY_SHORTHAND_AS_INT
-#ifndef UNITY_SHORTHAND_AS_MEM
-#ifndef UNITY_SHORTHAND_AS_NONE
-#ifndef UNITY_SHORTHAND_AS_RAW
-#define UNITY_SHORTHAND_AS_OLD
-#endif
-#endif
-#endif
-#endif
-
-/*-----------------------------------------------
- * Command Line Argument Support
- *-----------------------------------------------*/
-
-#ifdef UNITY_USE_COMMAND_LINE_ARGS
-int UnityParseOptions(int argc, char** argv);
-int UnityTestMatches(void);
-#endif
-
-/*-------------------------------------------------------
- * Basic Fail and Ignore
- *-------------------------------------------------------*/
-
-#define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)(line))
-#define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)(line))
-
-/*-------------------------------------------------------
- * Test Asserts
- *-------------------------------------------------------*/
-
-#define UNITY_TEST_ASSERT(condition, line, message) do {if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message));}} while(0)
-#define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message))
-#define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)(line), (message))
-#define UNITY_TEST_ASSERT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) == 0), (UNITY_LINE_TYPE)(line), (message))
-#define UNITY_TEST_ASSERT_NOT_EMPTY(pointer, line, message) UNITY_TEST_ASSERT(((pointer[0]) != 0), (UNITY_LINE_TYPE)(line), (message))
-
-#define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_EQUAL_INT16(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT16)(expected), (UNITY_INT)(UNITY_INT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_EQUAL_INT32(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT32)(expected), (UNITY_INT)(UNITY_INT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_EQUAL_UINT(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT8 )(expected), (UNITY_INT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_EQUAL_HEX8(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_EQUAL_HEX16(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT16)(expected), (UNITY_INT)(UNITY_INT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_EQUAL_HEX32(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT32)(expected), (UNITY_INT)(UNITY_INT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_EQUAL_CHAR(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(expected), (UNITY_INT)(UNITY_INT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-#define UNITY_TEST_ASSERT_BITS(mask, expected, actual, line, message) UnityAssertBits((UNITY_INT)(mask), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line))
-
-#define UNITY_TEST_ASSERT_NOT_EQUAL_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-
-#define UNITY_TEST_ASSERT_GREATER_THAN_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_GREATER_THAN_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_GREATER_THAN_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_GREATER_THAN_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_GREATER_THAN_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-
-#define UNITY_TEST_ASSERT_SMALLER_THAN_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 )(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 ) (threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16) (threshold), (UNITY_INT)(UNITY_INT16) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32) (threshold), (UNITY_INT)(UNITY_INT32) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 ) (threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT) (threshold), (UNITY_INT) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT8 )(threshold), (UNITY_INT)(UNITY_UINT8 )(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(UNITY_INT8 )(threshold), (UNITY_INT)(UNITY_INT8 ) (actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-
-#define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin( (delta), (UNITY_INT) (expected), (UNITY_INT) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
-#define UNITY_TEST_ASSERT_INT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_INT8 ) (expected), (UNITY_INT)(UNITY_INT8 ) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
-#define UNITY_TEST_ASSERT_INT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_INT16) (expected), (UNITY_INT)(UNITY_INT16) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
-#define UNITY_TEST_ASSERT_INT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_INT32) (expected), (UNITY_INT)(UNITY_INT32) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
-#define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin( (delta), (UNITY_INT) (expected), (UNITY_INT) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
-#define UNITY_TEST_ASSERT_UINT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
-#define UNITY_TEST_ASSERT_UINT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
-#define UNITY_TEST_ASSERT_UINT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
-#define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
-#define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
-#define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
-#define UNITY_TEST_ASSERT_CHAR_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT8 )(delta), (UNITY_INT)(UNITY_INT8 ) (expected), (UNITY_INT)(UNITY_INT8 ) (actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
-
-#define UNITY_TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin( (delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin( (delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin( (UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT8 )(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_ARRAY)
-
-
-#define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualNumber((UNITY_PTR_TO_INT)(expected), (UNITY_PTR_TO_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
-#define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)(line))
-#define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, message) UnityAssertEqualStringLen((const char*)(expected), (const char*)(actual), (UNITY_UINT32)(len), (message), (UNITY_LINE_TYPE)(line))
-#define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), 1, (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
-
-#define UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((UNITY_INTERNAL_PTR)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_ARRAY)
-
-#define UNITY_TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT) (expected), (UNITY_INT_WIDTH / 8)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_INT8(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT8 )(expected), 1), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_INT16(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT16 )(expected), 2), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT32 )(expected), 4), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT) (expected), (UNITY_INT_WIDTH / 8)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT8(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_UINT8 )(expected), 1), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT16(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_UINT16)(expected), 2), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT32(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_UINT32)(expected), 4), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX8(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT8 )(expected), 1), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT16 )(expected), 2), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT32 )(expected), 4), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_PTR_TO_INT) (expected), (UNITY_POINTER_WIDTH / 8)), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((UNITY_INTERNAL_PTR)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT8 )(expected), 1), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_VAL)
-
-#ifdef UNITY_SUPPORT_64
-#define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_UINT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements, line, message) UnityAssertEqualIntArray(UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_GREATER_THAN_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64(threshold, actual, line, message) UnityAssertGreaterOrLessOrEqualNumber((UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
-#define UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UnityAssertNumbersArrayWithin((UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY)
-#else
-#define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_GREATER_THAN_INT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_INT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64(threshold, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#define UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
-#endif
-
-#ifdef UNITY_EXCLUDE_FLOAT
-#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
-#else
-#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsWithin((UNITY_FLOAT)(delta), (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line))
-#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((UNITY_FLOAT)(expected) * (UNITY_FLOAT)UNITY_FLOAT_PRECISION, (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (UNITY_LINE_TYPE)(line), (message))
-#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualFloatArray((UNITY_FLOAT*)(expected), (UNITY_FLOAT*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements, line, message) UnityAssertEqualFloatArray(UnityFloatToPtr(expected), (UNITY_FLOAT*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_INF)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NEG_INF)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NAN)
-#define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_DET)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_INF)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NEG_INF)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NAN)
-#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
-#endif
-
-#ifdef UNITY_EXCLUDE_DOUBLE
-#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
-#else
-#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesWithin((UNITY_DOUBLE)(delta), (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line))
-#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((UNITY_DOUBLE)(expected) * (UNITY_DOUBLE)UNITY_DOUBLE_PRECISION, (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), (UNITY_LINE_TYPE)(line), (message))
-#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualDoubleArray((UNITY_DOUBLE*)(expected), (UNITY_DOUBLE*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
-#define UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements, line, message) UnityAssertEqualDoubleArray(UnityDoubleToPtr(expected), (UNITY_DOUBLE*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_INF)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NEG_INF)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NAN)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_DET)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_INF)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NEG_INF)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NAN)
-#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
-#endif
-
-/* End of UNITY_INTERNALS_H */
-#endif
-
-#endif /*LV_BUILD_TEST*/
diff --git a/lib/lvgl/tests/unity/unity_support.c b/lib/lvgl/tests/unity/unity_support.c
deleted file mode 100644
index 6906bd2..0000000
--- a/lib/lvgl/tests/unity/unity_support.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * @file lv_test_assert.c
- *
- * Copyright 2002-2010 Guillaume Cottenceau.
- *
- * This software may be freely redistributed under the terms
- * of the X11 license.
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#if LV_BUILD_TEST
-#include "../lvgl.h"
-
-#include
-#include
-#include
-#include
-#include
-#include "unity.h"
-#define PNG_DEBUG 3
-#include
-
-/*********************
- * DEFINES
- *********************/
-//#define REF_IMGS_PATH "lvgl/tests/lv_test_ref_imgs/"
-#define REF_IMGS_PATH "ref_imgs/"
-
-/**********************
- * TYPEDEFS
- **********************/
-typedef struct {
- int width, height;
- png_byte color_type;
- png_byte bit_depth;
-
- png_structp png_ptr;
- png_infop info_ptr;
- int number_of_passes;
- png_bytep * row_pointers;
-}png_img_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static int read_png_file(png_img_t * p, const char* file_name);
-static void png_release(png_img_t * p);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-bool lv_test_assert_img_eq(const char * fn_ref)
-{
- char fn_ref_full[512];
- sprintf(fn_ref_full, "%s%s", REF_IMGS_PATH, fn_ref);
-
- png_img_t p;
- int res = read_png_file(&p, fn_ref_full);
- if(res < 0) return false;
- uint8_t * screen_buf;
-
- lv_obj_invalidate(lv_scr_act());
- lv_refr_now(NULL);
-
- extern lv_color_t test_fb[];
-
- screen_buf = (uint8_t *)test_fb;
-
- uint8_t * ptr_act = NULL;
- const png_byte* ptr_ref = NULL;
-
- bool err = false;
- int x, y, i_buf = 0;
- for (y = 0; y < p.height; y++) {
- png_byte* row = p.row_pointers[y];
-
- for (x = 0; x < p.width; x++) {
- ptr_ref = &(row[x*3]);
- ptr_act = &(screen_buf[i_buf*4]);
-
- uint32_t ref_px = 0;
- uint32_t act_px = 0;
- memcpy(&ref_px, ptr_ref, 3);
- memcpy(&act_px, ptr_act, 3);
- //printf("0xFF%06x, ", act_px);
-
- uint8_t act_swap[3] = {ptr_act[2], ptr_act[1], ptr_act[0]};
-
- if(memcmp(act_swap, ptr_ref, 3) != 0) {
- err = true;
- break;
- }
- i_buf++;
- }
- if(err) break;
- }
-
- if(err) {
- uint32_t ref_px = 0;
- uint32_t act_px = 0;
- memcpy(&ref_px, ptr_ref, 3);
- memcpy(&act_px, ptr_act, 3);
-
- FILE * f = fopen("../test_screenshot_error.h", "w");
-
- fprintf(f, "//Diff in %s at (%d;%d), %x instead of %x)\n\n", fn_ref, x, y, act_px, ref_px);
- fprintf(f, "static const uint32_t test_screenshot_error_data[] = {\n");
-
- i_buf = 0;
- for (y = 0; y < 480; y++) {
- fprintf(f, "\n");
- for (x = 0; x < 800; x++) {
- ptr_act = &(screen_buf[i_buf * 4]);
- act_px = 0;
- memcpy(&act_px, ptr_act, 3);
- fprintf(f, "0xFF%06X, ", act_px);
- i_buf++;
- }
- }
- fprintf(f, "};\n\n");
-
- fprintf(f, "static lv_img_dsc_t test_screenshot_error_dsc = { \n"
- " .header.w = 800,\n"
- " .header.h = 480,\n"
- " .header.always_zero = 0,\n"
- " .header.cf = LV_IMG_CF_TRUE_COLOR,\n"
- " .data_size = 800 * 480 * 4,\n"
- " .data = test_screenshot_error_data};\n\n"
- "static inline void test_screenshot_error_show(void)\n"
- "{\n"
- " lv_obj_t * img = lv_img_create(lv_scr_act());\n"
- " lv_img_set_src(img, &test_screenshot_error_dsc);\n"
- "}\n");
-
- fclose(f);
-
- }
-
-
- png_release(&p);
-
- return !err;
-
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static int read_png_file(png_img_t * p, const char* file_name)
-{
- char header[8]; // 8 is the maximum size that can be checked
-
- /*open file and test for it being a png*/
- FILE *fp = fopen(file_name, "rb");
- if (!fp) {
- TEST_PRINTF("%s", "PNG file %s could not be opened for reading");
- return -1;
- }
-
- size_t rcnt = fread(header, 1, 8, fp);
- if (rcnt != 8 || png_sig_cmp((png_const_bytep)header, 0, 8)) {
- TEST_PRINTF("%s is not recognized as a PNG file", file_name);
- return -1;
- }
-
- /*initialize stuff*/
- p->png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-
- if (!p->png_ptr) {
- TEST_PRINTF("%s", "png_create_read_struct failed");
- return -1;
- }
-
- p->info_ptr = png_create_info_struct(p->png_ptr);
- if (!p->info_ptr) {
- TEST_PRINTF("%s", "png_create_info_struct failed");
- return -1;
- }
- if (setjmp(png_jmpbuf(p->png_ptr))) {
- TEST_PRINTF("%s", "Error during init_io");
- return -1;
- }
- png_init_io(p->png_ptr, fp);
- png_set_sig_bytes(p->png_ptr, 8);
-
- png_read_info(p->png_ptr, p->info_ptr);
-
- p->width = png_get_image_width(p->png_ptr, p->info_ptr);
- p->height = png_get_image_height(p->png_ptr, p->info_ptr);
- p->color_type = png_get_color_type(p->png_ptr, p->info_ptr);
- p->bit_depth = png_get_bit_depth(p->png_ptr, p->info_ptr);
-
- p->number_of_passes = png_set_interlace_handling(p->png_ptr);
- png_read_update_info(p->png_ptr, p->info_ptr);
-
- /*read file*/
- if (setjmp(png_jmpbuf(p->png_ptr))) {
- TEST_PRINTF("%s", "Error during read_image");
- return -1;
- }
- p->row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * p->height);
-
- int y;
- for (y=0; yheight; y++)
- p->row_pointers[y] = (png_byte*) malloc(png_get_rowbytes(p->png_ptr,p->info_ptr));
-
- png_read_image(p->png_ptr, p->row_pointers);
-
- fclose(fp);
- return 0;
-}
-
-static void png_release(png_img_t * p)
-{
- int y;
- for (y=0; yheight; y++) free(p->row_pointers[y]);
-
- free(p->row_pointers);
-
- png_destroy_read_struct(&p->png_ptr, &p->info_ptr, NULL);
-}
-
-
-#endif
diff --git a/lib/lvgl/tests/unity/unity_support.h b/lib/lvgl/tests/unity/unity_support.h
deleted file mode 100644
index 0d30cee..0000000
--- a/lib/lvgl/tests/unity/unity_support.h
+++ /dev/null
@@ -1,42 +0,0 @@
-
-#ifndef LV_UNITY_SUPPORT_H
-#define LV_UNITY_SUPPORT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-#include "../../lvgl.h"
-
-bool lv_test_assert_img_eq(const char * fn_ref);
-
-
-#if LV_COLOR_DEPTH != 32
-# define TEST_ASSERT_EQUAL_SCREENSHOT(path) TEST_IGNORE_MESSAGE("Requires LV_COLOR_DEPTH 32");
-# define TEST_ASSERT_EQUAL_SCREENSHOT_MESSAGE(path, msg) TEST_PRINTF(msg); TEST_IGNORE_MESSAGE("Requires LV_COLOR_DEPTH 32");
-#else
-
-# define TEST_ASSERT_EQUAL_SCREENSHOT(path) if(LV_HOR_RES != 800 || LV_VER_RES != 480) { \
- TEST_IGNORE_MESSAGE("Requires 800x480 resolution"); \
- } else { \
- TEST_ASSERT(lv_test_assert_img_eq(path)); \
- }
-
-# define TEST_ASSERT_EQUAL_SCREENSHOT_MESSAGE(path, msg) if(LV_HOR_RES != 800 || LV_VER_RES != 480) { \
- TEST_PRINTF(msg); \
- TEST_IGNORE_MESSAGE("Requires 800x480 resolution"); \
- } else { \
- TEST_ASSERT_MESSAGE(lv_test_assert_img_eq(path), msg); \
- }
-#endif
-
-# define TEST_ASSERT_EQUAL_COLOR(c1, c2) TEST_ASSERT_EQUAL_UINT32(c1.full, c2.full)
-# define TEST_ASSERT_EQUAL_COLOR_MESSAGE(c1, c2, msg) TEST_ASSERT_EQUAL_UINT32_MESSAGE(c1.full, c2.full, msg)
-
-#ifdef __cplusplus
-} /*extern "C"*/
-#endif
-
-#endif /*LV_UNITY_SUPPORT_H*/
-