mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +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
|
:cpp:expr:`lv_draw_dma2d_transfer_complete_interrupt_handler` whenever the DMA2D
|
||||||
"transfer complete" global interrupt is received.
|
"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
|
.. admonition:: Further Reading
|
||||||
|
|
||||||
You may be interested in enabling the :ref:`Nema GFX renderer <stm32_nema_gfx>`
|
You may be interested in enabling the :ref:`Nema GFX renderer <nema_gfx>`
|
||||||
if your STM32 has a GPU which is supported by Nema GFX.
|
if your STM32 has a NeoChrom GPU.
|
||||||
|
|
||||||
`lv_port_riverdi_stm32u5 <https://github.com/lvgl/lv_port_riverdi_stm32u5>`__
|
`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.
|
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
|
NemaGFX is a high-level graphics API supported
|
||||||
STM32U5 feature a 2.5D GPU which can natively draw most
|
by many embedded 2.5D GPUs. LVGL can use it to
|
||||||
LVGL primitives.
|
natively render LVGL graphics.
|
||||||
|
|
||||||
Get Started with the Riverdi STM32U5 5-inch Display
|
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
|
and not yet working in
|
||||||
`lv_port_riverdi_stm32u5 <https://github.com/lvgl/lv_port_riverdi_stm32u5>`__
|
`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
|
NemaGFX requires a simple HAL implementation to allocate memory and optionally
|
||||||
required by Nema to allocate memory and lock resources (in this implementation,
|
lock resources. You may use a custom HAL implementation for your platform or use one of the
|
||||||
no locking is done). It may conflict with existing definitions
|
provided implementations by setting :c:macro:`LV_USE_NEMA_HAL` to a value other than
|
||||||
if you have an existing Nema HAL implementation. You may
|
:c:macro:`LV_NEMA_HAL_CUSTOM`.
|
||||||
simply be able to remove yours.
|
|
||||||
|
|
||||||
TSC Images
|
TSC Images
|
||||||
**********
|
**********
|
||||||
|
@ -210,11 +210,16 @@
|
|||||||
#define LV_USE_NEMA_GFX 0
|
#define LV_USE_NEMA_GFX 0
|
||||||
|
|
||||||
#if LV_USE_NEMA_GFX
|
#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*/
|
/*Enable Vector Graphics Operations. Available only if NemaVG library is present*/
|
||||||
#define LV_USE_NEMA_VG 0
|
#define LV_USE_NEMA_VG 0
|
||||||
|
|
||||||
#if LV_USE_NEMA_VG
|
#if LV_USE_NEMA_VG
|
||||||
/*Define application's resolution used for VG related buffer allocation */
|
/*Define application's resolution used for VG related buffer allocation */
|
||||||
#define LV_NEMA_GFX_MAX_RESX 800
|
#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_HELIUM 2
|
||||||
#define LV_DRAW_SW_ASM_CUSTOM 255
|
#define LV_DRAW_SW_ASM_CUSTOM 255
|
||||||
|
|
||||||
|
#define LV_NEMA_HAL_CUSTOM 0
|
||||||
|
#define LV_NEMA_HAL_STM32 1
|
||||||
|
|
||||||
/** Handle special Kconfig options. */
|
/** Handle special Kconfig options. */
|
||||||
#ifndef LV_KCONFIG_IGNORE
|
#ifndef LV_KCONFIG_IGNORE
|
||||||
#include "lv_conf_kconfig.h"
|
#include "lv_conf_kconfig.h"
|
||||||
|
@ -12,18 +12,19 @@
|
|||||||
#include "../../lv_conf_internal.h"
|
#include "../../lv_conf_internal.h"
|
||||||
#if LV_USE_NEMA_GFX
|
#if LV_USE_NEMA_GFX
|
||||||
|
|
||||||
|
#if LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32
|
||||||
|
|
||||||
#include "../../misc/lv_types.h"
|
#include "../../misc/lv_types.h"
|
||||||
#include "../../misc/lv_assert.h"
|
#include "../../misc/lv_assert.h"
|
||||||
#include "../../stdlib/lv_string.h"
|
#include "../../stdlib/lv_string.h"
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <nema_sys_defs.h>
|
#include <nema_sys_defs.h>
|
||||||
#include <nema_core.h>
|
#include <nema_core.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include LV_NEMA_GFX_HAL_INCLUDE
|
#include LV_NEMA_STM32_HAL_INCLUDE
|
||||||
|
|
||||||
#include <cmsis_os2.h>
|
#include <cmsis_os2.h>
|
||||||
|
|
||||||
@ -63,7 +64,6 @@ extern GPU2D_HandleTypeDef hgpu2d;
|
|||||||
* STATIC VARIABLES
|
* STATIC VARIABLES
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
LOCATION_PRAGMA_NOLOAD("Nemagfx_Memory_Pool_Buffer")
|
|
||||||
static uint8_t nemagfx_pool_mem[NEMAGFX_MEM_POOL_SIZE]; /* NemaGFX memory pool */
|
static uint8_t nemagfx_pool_mem[NEMAGFX_MEM_POOL_SIZE]; /* NemaGFX memory pool */
|
||||||
|
|
||||||
static nema_ringbuffer_t ring_buffer_str;
|
static nema_ringbuffer_t ring_buffer_str;
|
||||||
@ -260,4 +260,6 @@ void platform_invalidate_cache(void)
|
|||||||
* STATIC FUNCTIONS
|
* STATIC FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
|
#endif /* LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32 */
|
||||||
|
|
||||||
#endif /* LV_USE_NEMA_GFX */
|
#endif /* LV_USE_NEMA_GFX */
|
@ -29,6 +29,9 @@
|
|||||||
#define LV_DRAW_SW_ASM_HELIUM 2
|
#define LV_DRAW_SW_ASM_HELIUM 2
|
||||||
#define LV_DRAW_SW_ASM_CUSTOM 255
|
#define LV_DRAW_SW_ASM_CUSTOM 255
|
||||||
|
|
||||||
|
#define LV_NEMA_HAL_CUSTOM 0
|
||||||
|
#define LV_NEMA_HAL_STM32 1
|
||||||
|
|
||||||
/** Handle special Kconfig options. */
|
/** Handle special Kconfig options. */
|
||||||
#ifndef LV_KCONFIG_IGNORE
|
#ifndef LV_KCONFIG_IGNORE
|
||||||
#include "lv_conf_kconfig.h"
|
#include "lv_conf_kconfig.h"
|
||||||
@ -593,11 +596,23 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_NEMA_GFX
|
#if LV_USE_NEMA_GFX
|
||||||
#ifndef LV_NEMA_GFX_HAL_INCLUDE
|
/** Select which NemaGFX HAL to use. Possible options:
|
||||||
#ifdef CONFIG_LV_NEMA_GFX_HAL_INCLUDE
|
* - LV_NEMA_HAL_CUSTOM
|
||||||
#define LV_NEMA_GFX_HAL_INCLUDE CONFIG_LV_NEMA_GFX_HAL_INCLUDE
|
* - 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
|
#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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -609,7 +624,6 @@
|
|||||||
#define LV_USE_NEMA_VG 0
|
#define LV_USE_NEMA_VG 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_NEMA_VG
|
#if LV_USE_NEMA_VG
|
||||||
/*Define application's resolution used for VG related buffer allocation */
|
/*Define application's resolution used for VG related buffer allocation */
|
||||||
#ifndef LV_NEMA_GFX_MAX_RESX
|
#ifndef LV_NEMA_GFX_MAX_RESX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user