修复button_porting add_veto 函数参数错误 2987/1 2987/head 2988/target/1
author孙春阳 <snickersun@163.com>
Sun, 28 Dec 2025 09:04:28 +0000 (17:04 +0800)
committer孙春阳 <snickersun@163.com>
Sun, 28 Dec 2025 09:04:28 +0000 (17:04 +0800)
code/sdk/drivers/chips/brandy/porting/button/button_porting.c

index 8cf61c4..93988b1 100644 (file)
@@ -301,61 +301,61 @@ static errcode_t porting_button_pmu_pwr_cfg(pin_t pin)
     return ERRCODE_SUCC;\r
 }\r
 \r
-static void porting_button_add_veto(uint8_t id)\r
-{\r
-    if(id==0)\r
-    {\r
-        uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON);\r
-        if(cnt==0)\r
-        {\r
-            uapi_pm_add_sleep_veto(PM_ID_BUTTON);\r
-            printf("PM_ID_BUTTON:%d\r\n",id);\r
-        }\r
-        else\r
-        {\r
-            printf(" porting_button_add_veto:%d\r\n",cnt);\r
-        }        \r
-    }\r
-    else\r
-    {\r
+// static void porting_button_add_veto(uint8_t id)\r
+// {\r
+//     if(id==0)\r
+//     {\r
+//         uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON);\r
+//         if(cnt==0)\r
+//         {\r
+//             uapi_pm_add_sleep_veto(PM_ID_BUTTON);\r
+//             printf("PM_ID_BUTTON:%d\r\n",id);\r
+//         }\r
+//         else\r
+//         {\r
+//             printf(" porting_button_add_veto:%d\r\n",cnt);\r
+//         }        \r
+//     }\r
+//     else\r
+//     {\r
         \r
-        uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO);\r
-        if(cnt==0)\r
-        {\r
-            uapi_pm_add_sleep_veto(PM_ID_BUTTON_GPIO);\r
-            printf("PM_ID_BUTTON:%d\r\n",id);\r
-        }\r
-        else\r
-        {\r
-            printf(" porting_button_add_veto:%d\r\n",cnt);\r
-        }\r
-    }    \r
-}\r
-\r
-static void porting_button_remove_veto(uint8_t id)\r
-{\r
-    if(id==0)\r
-    {\r
-        uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON);\r
-        for (int i = 0; i < cnt; i++)\r
-        {\r
-            uapi_pm_remove_sleep_veto(PM_ID_BUTTON);\r
-        }\r
-        printf("porting_button_remove_veto:%d\r\n",id);\r
-    }\r
-    else\r
-    {\r
-        uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO);\r
-        for (int i = 0; i < cnt; i++)\r
-        {\r
-            uapi_pm_remove_sleep_veto(PM_ID_BUTTON_GPIO);\r
-        }\r
-        printf("porting_button_remove_veto:%d\r\n",id);\r
-    }\r
-}\r
+//         uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO);\r
+//         if(cnt==0)\r
+//         {\r
+//             uapi_pm_add_sleep_veto(PM_ID_BUTTON_GPIO);\r
+//             printf("PM_ID_BUTTON:%d\r\n",id);\r
+//         }\r
+//         else\r
+//         {\r
+//             printf(" porting_button_add_veto:%d\r\n",cnt);\r
+//         }\r
+//     }    \r
+// }\r
+\r
+// static void porting_button_remove_veto(uint8_t id)\r
+// {\r
+//     if(id==0)\r
+//     {\r
+//         uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON);\r
+//         for (int i = 0; i < cnt; i++)\r
+//         {\r
+//             uapi_pm_remove_sleep_veto(PM_ID_BUTTON);\r
+//         }\r
+//         printf("porting_button_remove_veto:%d\r\n",id);\r
+//     }\r
+//     else\r
+//     {\r
+//         uint8_t cnt = pm_veto_get_id_cnt(PM_ID_BUTTON_GPIO);\r
+//         for (int i = 0; i < cnt; i++)\r
+//         {\r
+//             uapi_pm_remove_sleep_veto(PM_ID_BUTTON_GPIO);\r
+//         }\r
+//         printf("porting_button_remove_veto:%d\r\n",id);\r
+//     }\r
+// }\r
 \r
 /*porting_button_add_veto和porting_button_remove_veto为补丁合入*/\r
-#if 0\r
+#if 1\r
 static void porting_button_add_veto(void)\r
 {\r
     if (g_button_vetoed == 0) {\r