mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-23 01:33:59 +08:00
chore(NemaGFX): add missing header, correct the docs, provided HAL is optional (#7174)
This commit is contained in:
parent
9d80bfa780
commit
17d0169e50
@ -292,4 +292,4 @@ If ``LV_USE_DRAW_DMA2D_INTERRUPT`` is enabled then you are required to call
|
||||
:cpp:expr:`lv_draw_dma2d_transfer_complete_interrupt_handler` whenever the DMA2D
|
||||
"transfer complete" global interrupt is received.
|
||||
|
||||
If your STM device has a Nema GPU, you can use the :ref:`Nema GFX renderer <stm32_nema_gfx>` instead.
|
||||
If your STM device has a NeoChrom GPU, you can use the :ref:`Nema GFX renderer <nema_gfx>` instead.
|
||||
|
@ -95,8 +95,8 @@ See the :ref:`DMA2D support <dma2d>`.
|
||||
|
||||
.. admonition:: Further Reading
|
||||
|
||||
You may be interested in enabling the :ref:`Nema GFX renderer <stm32_nema_gfx>`
|
||||
if your STM32 has a GPU which is supported by Nema GFX.
|
||||
You may be interested in enabling the :ref:`Nema GFX renderer <nema_gfx>`
|
||||
if your STM32 has a NeoChrom GPU.
|
||||
|
||||
`lv_port_riverdi_stm32u5 <https://github.com/lvgl/lv_port_riverdi_stm32u5>`__
|
||||
is a way to quick way to get started with LTDC on LVGL.
|
||||
|
@ -1,12 +1,12 @@
|
||||
.. _stm32_nema_gfx:
|
||||
.. _nema_gfx:
|
||||
|
||||
===================================
|
||||
NemaGFX Acceleration (AKA NeoChrom)
|
||||
===================================
|
||||
====================
|
||||
NemaGFX Acceleration
|
||||
====================
|
||||
|
||||
Some of the more powerful STM32 MCUs such as the
|
||||
STM32U5 feature a 2.5D GPU which can natively draw most
|
||||
LVGL primitives.
|
||||
NemaGFX is a high-level graphics API supported
|
||||
by many embedded 2.5D GPUs. LVGL can use it to
|
||||
natively render LVGL graphics.
|
||||
|
||||
Get Started with the Riverdi STM32U5 5-inch Display
|
||||
***************************************************
|
||||
@ -48,11 +48,10 @@ At the time of writing, :c:macro:`LV_USE_OS` support is experimental
|
||||
and not yet working in
|
||||
`lv_port_riverdi_stm32u5 <https://github.com/lvgl/lv_port_riverdi_stm32u5>`__
|
||||
|
||||
"src/draw/nema_gfx/lv_draw_nema_gfx_hal.c" implements the HAL functionality
|
||||
required by Nema to allocate memory and lock resources (in this implementation,
|
||||
no locking is done). It may conflict with existing definitions
|
||||
if you have an existing Nema HAL implementation. You may
|
||||
simply be able to remove yours.
|
||||
NemaGFX requires a simple HAL implementation to allocate memory and optionally
|
||||
lock resources. You may use a custom HAL implementation for your platform or use one of the
|
||||
provided implementations by setting :c:macro:`LV_USE_NEMA_HAL` to a value other than
|
||||
:c:macro:`LV_NEMA_HAL_CUSTOM`.
|
||||
|
||||
TSC Images
|
||||
**********
|
||||
|
@ -210,11 +210,16 @@
|
||||
#define LV_USE_NEMA_GFX 0
|
||||
|
||||
#if LV_USE_NEMA_GFX
|
||||
#define LV_NEMA_GFX_HAL_INCLUDE <stm32u5xx_hal.h>
|
||||
/** Select which NemaGFX HAL to use. Possible options:
|
||||
* - LV_NEMA_HAL_CUSTOM
|
||||
* - LV_NEMA_HAL_STM32 */
|
||||
#define LV_USE_NEMA_HAL LV_NEMA_HAL_CUSTOM
|
||||
#if LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32
|
||||
#define LV_NEMA_STM32_HAL_INCLUDE <stm32u5xx_hal.h>
|
||||
#endif
|
||||
|
||||
/*Enable Vector Graphics Operations. Available only if NemaVG library is present*/
|
||||
#define LV_USE_NEMA_VG 0
|
||||
|
||||
#if LV_USE_NEMA_VG
|
||||
/*Define application's resolution used for VG related buffer allocation */
|
||||
#define LV_NEMA_GFX_MAX_RESX 800
|
||||
|
@ -51,6 +51,9 @@ fout.write(
|
||||
#define LV_DRAW_SW_ASM_HELIUM 2
|
||||
#define LV_DRAW_SW_ASM_CUSTOM 255
|
||||
|
||||
#define LV_NEMA_HAL_CUSTOM 0
|
||||
#define LV_NEMA_HAL_STM32 1
|
||||
|
||||
/** Handle special Kconfig options. */
|
||||
#ifndef LV_KCONFIG_IGNORE
|
||||
#include "lv_conf_kconfig.h"
|
||||
|
@ -12,18 +12,19 @@
|
||||
#include "../../lv_conf_internal.h"
|
||||
#if LV_USE_NEMA_GFX
|
||||
|
||||
#if LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32
|
||||
|
||||
#include "../../misc/lv_types.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../stdlib/lv_string.h"
|
||||
|
||||
#include "config.h"
|
||||
#include <nema_sys_defs.h>
|
||||
#include <nema_core.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include LV_NEMA_GFX_HAL_INCLUDE
|
||||
#include LV_NEMA_STM32_HAL_INCLUDE
|
||||
|
||||
#include <cmsis_os2.h>
|
||||
|
||||
@ -63,7 +64,6 @@ extern GPU2D_HandleTypeDef hgpu2d;
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
LOCATION_PRAGMA_NOLOAD("Nemagfx_Memory_Pool_Buffer")
|
||||
static uint8_t nemagfx_pool_mem[NEMAGFX_MEM_POOL_SIZE]; /* NemaGFX memory pool */
|
||||
|
||||
static nema_ringbuffer_t ring_buffer_str;
|
||||
@ -260,4 +260,6 @@ void platform_invalidate_cache(void)
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
||||
#endif /* LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32 */
|
||||
|
||||
#endif /* LV_USE_NEMA_GFX */
|
@ -29,6 +29,9 @@
|
||||
#define LV_DRAW_SW_ASM_HELIUM 2
|
||||
#define LV_DRAW_SW_ASM_CUSTOM 255
|
||||
|
||||
#define LV_NEMA_HAL_CUSTOM 0
|
||||
#define LV_NEMA_HAL_STM32 1
|
||||
|
||||
/** Handle special Kconfig options. */
|
||||
#ifndef LV_KCONFIG_IGNORE
|
||||
#include "lv_conf_kconfig.h"
|
||||
@ -593,11 +596,23 @@
|
||||
#endif
|
||||
|
||||
#if LV_USE_NEMA_GFX
|
||||
#ifndef LV_NEMA_GFX_HAL_INCLUDE
|
||||
#ifdef CONFIG_LV_NEMA_GFX_HAL_INCLUDE
|
||||
#define LV_NEMA_GFX_HAL_INCLUDE CONFIG_LV_NEMA_GFX_HAL_INCLUDE
|
||||
/** Select which NemaGFX HAL to use. Possible options:
|
||||
* - LV_NEMA_HAL_CUSTOM
|
||||
* - LV_NEMA_HAL_STM32 */
|
||||
#ifndef LV_USE_NEMA_HAL
|
||||
#ifdef CONFIG_LV_USE_NEMA_HAL
|
||||
#define LV_USE_NEMA_HAL CONFIG_LV_USE_NEMA_HAL
|
||||
#else
|
||||
#define LV_NEMA_GFX_HAL_INCLUDE <stm32u5xx_hal.h>
|
||||
#define LV_USE_NEMA_HAL LV_NEMA_HAL_CUSTOM
|
||||
#endif
|
||||
#endif
|
||||
#if LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32
|
||||
#ifndef LV_NEMA_STM32_HAL_INCLUDE
|
||||
#ifdef CONFIG_LV_NEMA_STM32_HAL_INCLUDE
|
||||
#define LV_NEMA_STM32_HAL_INCLUDE CONFIG_LV_NEMA_STM32_HAL_INCLUDE
|
||||
#else
|
||||
#define LV_NEMA_STM32_HAL_INCLUDE <stm32u5xx_hal.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -609,7 +624,6 @@
|
||||
#define LV_USE_NEMA_VG 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LV_USE_NEMA_VG
|
||||
/*Define application's resolution used for VG related buffer allocation */
|
||||
#ifndef LV_NEMA_GFX_MAX_RESX
|
||||
|
Loading…
Reference in New Issue
Block a user