HeptaBattery library

Dependencies:   PowerControl

Dependents:   HEPTA_EPS

Revision:
4:65dc53760aa0
Parent:
3:16fd450bcf16
Child:
5:15a6a4425889
--- a/HeptaBattery.cpp	Wed Aug 23 10:40:53 2017 +0000
+++ b/HeptaBattery.cpp	Mon Sep 04 16:27:30 2017 +0000
@@ -12,9 +12,8 @@
     *bt = (_bat.read()*1.431*3.3);//バッテリー電圧読み出し
 }
 
-void HeptaBattery::fast_charge()
+void HeptaBattery::shut_down_regulator()
 {
-    //Peripheral_PowerDown(0x7DFEDFEE);怪しい
     _bat_ct = 0;
 }
 
@@ -39,23 +38,20 @@
     //4.2以上
     if(Bat>=4.2) {
         _bat_ct = 1;
-        //Peripheral_PowerUp(0xFDFF6FF7);
         LPC_SC->CCLKCFG = 2;
         SystemCoreClockUpdate();
-    } 
+    }
     //3.7 < Voltage < 4.1
     else if(Bat<=4.1 && Bat>=3.7) {
-        //Peripheral_PowerUp(0xFDFF6FF7);
-         LPC_SC->CCLKCFG = 2;
-         SystemCoreClockUpdate();
         _bat_ct = 1;
+        LPC_SC->CCLKCFG = 2;
+        SystemCoreClockUpdate();
     }
     //3.5V以下
     else if(Bat<=3.5) {
-        //Peripheral_PowerDown(0x7D7E6DF1);
+        _bat_ct = 0;
         LPC_SC->CCLKCFG = 5;
         SystemCoreClockUpdate();
-        _bat_ct = 0;
     }
 
 }
\ No newline at end of file