From 876ff6b62f543517b4b72c4c7d08ba7548d0d9d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=AD=99=E6=98=A5=E9=98=B3?= Date: Sun, 28 Dec 2025 17:04:28 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8Dbutton=5Fporting=20add=5Fveto?= =?utf8?q?=20=E5=87=BD=E6=95=B0=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../brandy/porting/button/button_porting.c | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/code/sdk/drivers/chips/brandy/porting/button/button_porting.c b/code/sdk/drivers/chips/brandy/porting/button/button_porting.c index 8cf61c474..93988b1ed 100644 --- a/code/sdk/drivers/chips/brandy/porting/button/button_porting.c +++ b/code/sdk/drivers/chips/brandy/porting/button/button_porting.c @@ -301,61 +301,61 @@ static errcode_t porting_button_pmu_pwr_cfg(pin_t pin) return ERRCODE_SUCC; } -static void porting_button_add_veto(uint8_t id) -{ - if(id==0) - { - uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON); - if(cnt==0) - { - uapi_pm_add_sleep_veto(PM_ID_BUTTON); - printf("PM_ID_BUTTON:%d\r\n",id); - } - else - { - printf(" porting_button_add_veto:%d\r\n",cnt); - } - } - else - { +// static void porting_button_add_veto(uint8_t id) +// { +// if(id==0) +// { +// uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON); +// if(cnt==0) +// { +// uapi_pm_add_sleep_veto(PM_ID_BUTTON); +// printf("PM_ID_BUTTON:%d\r\n",id); +// } +// else +// { +// printf(" porting_button_add_veto:%d\r\n",cnt); +// } +// } +// else +// { - uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO); - if(cnt==0) - { - uapi_pm_add_sleep_veto(PM_ID_BUTTON_GPIO); - printf("PM_ID_BUTTON:%d\r\n",id); - } - else - { - printf(" porting_button_add_veto:%d\r\n",cnt); - } - } -} - -static void porting_button_remove_veto(uint8_t id) -{ - if(id==0) - { - uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON); - for (int i = 0; i < cnt; i++) - { - uapi_pm_remove_sleep_veto(PM_ID_BUTTON); - } - printf("porting_button_remove_veto:%d\r\n",id); - } - else - { - uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO); - for (int i = 0; i < cnt; i++) - { - uapi_pm_remove_sleep_veto(PM_ID_BUTTON_GPIO); - } - printf("porting_button_remove_veto:%d\r\n",id); - } -} +// uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO); +// if(cnt==0) +// { +// uapi_pm_add_sleep_veto(PM_ID_BUTTON_GPIO); +// printf("PM_ID_BUTTON:%d\r\n",id); +// } +// else +// { +// printf(" porting_button_add_veto:%d\r\n",cnt); +// } +// } +// } + +// static void porting_button_remove_veto(uint8_t id) +// { +// if(id==0) +// { +// uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON); +// for (int i = 0; i < cnt; i++) +// { +// uapi_pm_remove_sleep_veto(PM_ID_BUTTON); +// } +// printf("porting_button_remove_veto:%d\r\n",id); +// } +// else +// { +// uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO); +// for (int i = 0; i < cnt; i++) +// { +// uapi_pm_remove_sleep_veto(PM_ID_BUTTON_GPIO); +// } +// printf("porting_button_remove_veto:%d\r\n",id); +// } +// } /*porting_button_add_veto和porting_button_remove_veto为补丁合入*/ -#if 0 +#if 1 static void porting_button_add_veto(void) { if (g_button_vetoed == 0) { -- 2.17.1