浏览代码

:bug: 修复 EPV 的 POWERKEY 失效

Mizore 8 月之前
父节点
当前提交
198b6c0577
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      script/main.lua

+ 2 - 2
script/main.lua

@@ -30,7 +30,7 @@ log.info("main", "fskv.init", fskv.init())
 
 -- POWERKEY
 local rtos_bsp = rtos.bsp()
-local pin_table = { ["EC618"] = 35, ["EC718P"] = 46 }
+local pin_table = { ["EC618"] = 35, ["EC718P"] = 46, ["EC718PV"] = 46 }
 local powerkey_pin = pin_table[rtos_bsp]
 
 if powerkey_pin then
@@ -58,7 +58,7 @@ if powerkey_pin then
             log.debug("EVENT.POWERKEY_SHORT_PRESS", duration)
             sys.publish("POWERKEY_SHORT_PRESS", duration)
         end
-    end, gpio.PULLUP)
+    end, gpio.PULLUP, gpio.FALLING)
 end
 
 -- 加载模块