软件包修改

This commit is contained in:
sc committed 2025-12-07 14:37:00 +08:00
1 parent 425aec3576
commit 2fd0bf135d
27 files changed
+1367 -1090

No files matched your search

+48 -3
View File
@@ -7,11 +7,56 @@
* Date Author Notes
* 2025-11-25 Administrator the first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include "lvgl.h"
#define DBG_TAG "gui"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>
#define LCD_BL_PIN GET_PIN(D,12)
#define LCD_RST_PIN GET_PIN(D,11)
void lv_user_gui_init(void)
{
lv_obj_t *label = lv_label_create(lv_scr_act());
lv_label_set_text(label, "Hello LVGL on RT-Thread!");
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
// rt_pin_mode(LCD_BL_PIN, PIN_MODE_OUTPUT);
// rt_pin_write( LCD_BL_PIN, PIN_HIGH);
// rt_pin_mIN, ode(LCD_RST_PIN, PIN_MODE_OUTPUT);
// rt_pin_write( LCD_RST_PPIN_LOW);
// 检查 LTDC 是否全局使能
if (LTDC->GCR & LTDC_GCR_LTDCEN)
{
LOG_D("LTDC is ENABLED");
}
else
{
LOG_E("LTDC is NOT enabled!");
}
// 检查图层 0 是否使能
if (LTDC_Layer1->CR & LTDC_LxCR_LEN)
{
LOG_D("Layer 0 is ENABLED");
}
else
{
LOG_E("Layer 0 is NOT enabled!");
}
if (__HAL_RCC_LTDC_IS_CLK_ENABLED())
{
LOG_D("LTDC clock is enabled");
}
else
{
LOG_E("LTDC clock is DISABLED! <-- This is likely the root cause");
}
// lv_obj_t *label = lv_label_create(lv_scr_act());
// lv_label_set_text(label, "Hello LVGL on RT-Thread!");
// lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
}
//INIT_APP_EXPORT(lv_user_gui_init);
+2 -2
View File
@@ -17,12 +17,12 @@
*********************/
#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 800
#define MY_DISP_HOR_RES 1024
#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 480
#define MY_DISP_VER_RES 600
#endif
/**********************