From: 孙春阳 Date: Sun, 28 Dec 2025 09:04:28 +0000 (+0800) Subject: 修复button_porting add_veto 函数参数错误 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F2987%2Fhead;p=mirrors%2FFD230.git 修复button_porting add_veto 函数参数错误 --- 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) {