/\*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\_USER
/\*1: Print the log with 'printf'; \*0: User need to register a callback with `lv\_log\_register\_print\_cb()`\*/ #define LV\_LOG\_PRINTF 1
/\*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
/\*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. "stm32f769xx.h" or "stm32f429xx.h"\*/ #define LV\_GPU\_DMA2D\_CMSIS\_INCLUDE #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
/\* Private includes ----------------------------------------------------------\*/ /\* USER CODE BEGIN Includes \*/ #include "lcd/ili9325\_fsmc.h" #include "lvgl.h" #include "xpt2046/xpt2046\_touch.h" #include "lvgl\_port/disp\_driver.h" #include "lvgl\_port/touch\_driver.h" #include <stdio.h> #include "ui\_main.h" /\* USER CODE END Includes \*/
void StartDefaultTask(void \*argument) { /\* USER CODE BEGIN StartDefaultTask \*/ printf("lvgl render task started\r\n"); /\* Infinite loop \*/ for (;;) { lv\_task\_handler(); osDelay(5);
/\* Private includes ----------------------------------------------------------\*/ /\* USER CODE BEGIN Includes \*/ #ifdef LV\_LVGL\_H\_INCLUDE\_SIMPLE #include "lvgl.h" #else #include "lvgl/lvgl.h" #endif #include "xpt2046/xpt2046\_touch.h" /\* USER CODE END Includes \*/
/\*\* \* @brief This function handles TIM1 update interrupt. \*/ void TIM1\_UP\_IRQHandler(void) { /\* USER CODE BEGIN TIM1\_UP\_IRQn 0 \*/
/\* USER CODE END TIM1\_UP\_IRQn 0 \*/ HAL\_TIM\_IRQHandler(&htim1); /\* USER CODE BEGIN TIM1\_UP\_IRQn 1 \*/ lv\_tick\_inc(1); /\* USER CODE END TIM1\_UP\_IRQn 1 \*/ }
/\* Private includes ----------------------------------------------------------\*/ /\* USER CODE BEGIN Includes \*/ #include "lcd/ili9325\_fsmc.h" #include "lcd/fonts.h" #include "xpt2046/xpt2046\_touch.h" #include <stdio.h> #include <stdbool.h>
/\* Init scheduler \*/ osKernelInitialize(); /\* Call init function for freertos objects (in freertos.c) \*/ MX\_FREERTOS\_Init();
/\* Start scheduler \*/ osKernelStart();
/\* We should never get here as control is now taken by the scheduler \*/ /\* Infinite loop \*/ /\* USER CODE BEGIN WHILE \*/ while (1) { /\* USER CODE END WHILE \*/