From bff9546c264d634c62ad7551f15d4cd8b22f3c3a Mon Sep 17 00:00:00 2001 From: Seb Fagard Date: Tue, 16 Mar 2021 16:42:01 +0100 Subject: [PATCH] fix(pxp): update RTOS macro for SDK 2.10 replace FSL_RTOS_FREE_RTOS by SDK_OS_FREE_RTOS in order to be aligned with MCU SDK 2.10. See MCUX-41577. Signed-off-by: Seb Fagard --- Kconfig | 2 +- lv_conf_template.h | 2 +- src/gpu/lv_gpu_nxp_pxp_osa.c | 16 ++++++++-------- src/lv_conf_internal.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Kconfig b/Kconfig index f509d9654..f0e629532 100644 --- a/Kconfig +++ b/Kconfig @@ -166,7 +166,7 @@ menu "LVGL configuration" 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 FSL_RTOS_FREE_RTOS has to be defined in order + 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 diff --git a/lv_conf_template.h b/lv_conf_template.h index 1aab61fa7..9db6e2f0a 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -122,7 +122,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ #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 FSL_RTOS_FREE_RTOS + * 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() */ diff --git a/src/gpu/lv_gpu_nxp_pxp_osa.c b/src/gpu/lv_gpu_nxp_pxp_osa.c index 5a16db864..d247f2b74 100644 --- a/src/gpu/lv_gpu_nxp_pxp_osa.c +++ b/src/gpu/lv_gpu_nxp_pxp_osa.c @@ -39,7 +39,7 @@ #include "lv_gpu_nxp_pxp.h" #include "fsl_pxp.h" -#if defined(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) #include "FreeRTOS.h" #include "semphr.h" #endif @@ -63,7 +63,7 @@ static void _lv_gpu_nxp_pxp_run(void); * STATIC VARIABLES **********************/ -#if defined(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) static SemaphoreHandle_t s_pxpIdle; #else static volatile bool s_pxpIdle; @@ -82,13 +82,13 @@ static void _lv_gpu_nxp_pxp_run(void); */ void PXP_IRQHandler(void) { -#if defined(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) BaseType_t taskAwake = pdFALSE; #endif if(kPXP_CompleteFlag & PXP_GetStatusFlags(LV_GPU_NXP_PXP_ID)) { PXP_ClearStatusFlags(LV_GPU_NXP_PXP_ID, kPXP_CompleteFlag); -#if defined(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) xSemaphoreGiveFromISR(s_pxpIdle, &taskAwake); portYIELD_FROM_ISR(taskAwake); #else @@ -107,7 +107,7 @@ void PXP_IRQHandler(void) */ static lv_res_t _lv_gpu_nxp_pxp_interrupt_init(void) { -#if defined(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) s_pxpIdle = xSemaphoreCreateBinary(); if(s_pxpIdle == NULL) { return LV_RES_INV; @@ -129,7 +129,7 @@ static lv_res_t _lv_gpu_nxp_pxp_interrupt_init(void) static void _lv_gpu_nxp_pxp_interrupt_deinit(void) { NVIC_DisableIRQ(LV_GPU_NXP_PXP_IRQ_ID); -#if defined(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) vSemaphoreDelete(s_pxpIdle); #endif } @@ -139,14 +139,14 @@ static void _lv_gpu_nxp_pxp_interrupt_deinit(void) */ static void _lv_gpu_nxp_pxp_run(void) { -#if !defined(FSL_RTOS_FREE_RTOS) +#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(FSL_RTOS_FREE_RTOS) +#if defined(SDK_OS_FREE_RTOS) if(xSemaphoreTake(s_pxpIdle, portMAX_DELAY) != pdTRUE) { LV_LOG_ERROR("xSemaphoreTake error. Task halted."); for(; ;) ; diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 8f8a58691..6abd8bdc6 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -307,7 +307,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ #endif #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 FSL_RTOS_FREE_RTOS + * 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() */