a

Revision:
3:e0ddd1dfa2cc
Parent:
2:8950b0f31d73
--- a/INA226.hpp	Sat Nov 24 18:37:00 2012 +0000
+++ b/INA226.hpp	Sat Jul 31 06:25:47 2021 +0000
@@ -22,8 +22,8 @@
          * @param i2c_ instance of I2C.
          * @param addr_ I2C slave address.
          * @param freq_ I2C frequency.
-         */
-        INA226(I2C &i2c_,int addr_ = 0x80,int freq_ = 100000);
+         */     //GNDGND(G-G):0x80, Vs+Vs+(1-1):0x8A, SDASDA(D-D):0x94, SCLSCL(C-C):0x9E, GNDVs+(G-1):0x82
+        INA226(I2C &i2c_,int addr_ = 0x80,int freq_ = 100000);  //0x94= ?, 0x8A=VsVs_11, 0x80=GNDGND_GG
         /**
          * Check INA226 exist.
          *
@@ -67,8 +67,10 @@
          * @param val write value;
          * @return 0:Read OK / !0:Read NG
          */
-        int setCurrentCalibration(unsigned short val = 0x0A00);
-
+        int setCurrentCalibration(unsigned short val = 0x1AAA);
+        //int setConfigResister(unsigned short config = 0x6600 | 0x01C0 | 0x0038 | 0x0007);  //0x456F=>0b 0100 010 101 101 111(datasheet pp21-23確認)
+        int setConfigResister(unsigned short config = 0x456F);
+        
     private:
         I2C &i2c;
         int i2c_addr;