esp加入
This commit is contained in:
@@ -14,10 +14,13 @@
|
||||
#define INA226_NUM 2
|
||||
|
||||
#define INA226_ALT_PIN {P15_2, P15_3}
|
||||
#define INA226_ADDR {0x40, 0x45}
|
||||
#define INA226_ADDR {0x45, 0x40}
|
||||
#define INA226_DEF_MODE {0x44, 0x4F}
|
||||
#define INA226_DEF_CAL {0x0D, 0x1B}
|
||||
|
||||
#define INA226_VOT_FIX_K {0.998996f, 0.998996f}
|
||||
#define INA226_AMP_FIX_K {1.158f, 1.137f}
|
||||
|
||||
|
||||
#define INA226_READ_TIME_MS 1
|
||||
|
||||
@@ -77,8 +80,9 @@ typedef struct
|
||||
|
||||
extern INA226_t ina226[INA226_NUM];
|
||||
|
||||
void INA226_Init(void);
|
||||
void INA226_Single_Init(INA226_t *ina226, uint8 addr, uint8 mode[2], float max_current_A, float rshunt_mOhm, float amp_fix_k, float vot_fix_k);
|
||||
void INA226_Read(INA226_t *ina226);
|
||||
|
||||
void INA226_Single_Read(INA226_t *ina226);
|
||||
void INA226_Read(void);
|
||||
|
||||
#endif /* CODE_INA226_H_ */
|
||||
|
||||
Reference in New Issue
Block a user