From 1cec3aaa95faca8dc780ee06f793b6a119f8394c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=90=83=E6=B2=B9=E7=82=B8=E9=B8=A1?= <1425962791@qq.com> Date: Tue, 2 Dec 2025 19:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=9B=E5=8C=96=E6=8C=89=E9=94=AE=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=87=BD=E6=95=B0=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Power_Pico/User/GUI/common/lv_lib_pm.c | 4 ++-- Power_Pico/User/GUI/common/lv_lib_pm.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Power_Pico/User/GUI/common/lv_lib_pm.c b/Power_Pico/User/GUI/common/lv_lib_pm.c index 2c7e585..57f790c 100644 --- a/Power_Pico/User/GUI/common/lv_lib_pm.c +++ b/Power_Pico/User/GUI/common/lv_lib_pm.c @@ -107,10 +107,10 @@ Page_t* lv_lib_pm_get_current_page(void) { * 处理按键事件,调用当前页面的按键事件处理函数 * @param key_id 按键ID */ -void lv_lib_pm_handle_key_event(uint8_t key_id) { +void lv_lib_pm_handle_key_event(void* key_event) { Page_t* current_page = lv_lib_pm_get_current_page(); if (current_page && current_page->key_event_handler) { - current_page->key_event_handler(key_id); // 调用当前页面的按键事件处理函数 + current_page->key_event_handler(key_event); // 调用当前页面的按键事件处理函数 } else { LV_LOG_WARN("No key event handler for current page\n"); } diff --git a/Power_Pico/User/GUI/common/lv_lib_pm.h b/Power_Pico/User/GUI/common/lv_lib_pm.h index 2e4f796..244f200 100644 --- a/Power_Pico/User/GUI/common/lv_lib_pm.h +++ b/Power_Pico/User/GUI/common/lv_lib_pm.h @@ -11,7 +11,7 @@ typedef struct { void (*init)(void); void (*deinit)(void); lv_obj_t** page_obj; // 指向页面对象指针的指针 - void (*key_event_handler)(uint8_t key_id); // 按键事件处理函数 + void (*key_event_handler)(void* key_event); // 按键事件处理函数 const char* name; // 可选:用于调试 } Page_t; @@ -33,6 +33,6 @@ void lv_lib_pm_next(void); void lv_lib_pm_prev(void); void lv_lib_pm_goto(uint8_t index); Page_t* lv_lib_pm_get_current_page(void); -void lv_lib_pm_handle_key_event(uint8_t key_id); +void lv_lib_pm_handle_key_event(void* key_event); #endif // PAGE_MANAGER_H