OSDN Git Service

[Schematic][General] Adjust reset button and power button.
[openi2cradio/OpenI2CRadio.git] / power.c
diff --git a/power.c b/power.c
index 6cc322b..eb6fc38 100644 (file)
--- a/power.c
+++ b/power.c
@@ -102,11 +102,11 @@ unsigned char chk_powerbutton(void)
 {
     unsigned char count = 0;
     char i;
-    for(i = 0; i < 16; i++) {  // 2*16=64ms.
+    for(i = 0; i < 32; i++) {  // 10*32=320ms.
         if(PORTBbits.RB4 == 0) count++;
         _POWER_DELAY();
     }
-    if(count > 12) {
+    if(count > 15) {
         return 0xff; // Pressed
     }
     return 0; // Not pressed