iv_measure.c 553 B

1234567891011121314151617181920
  1. #include "iv_measure.h"
  2. #include "bsp/ml5238.h"
  3. #include "bsp/cs1180.h"
  4. /* measure the current & voltage for battery pack by using
  5. * ms5238 & cs1180(only used when bms is in small current loading)
  6. */
  7. /* this is the inited gain set to the ms5238, but the really gain is calibrated
  8. * by measure_system_calibrate
  9. */
  10. #define IMON_INITED_GAIN 10
  11. static float imon_gain = IMON_INITED_GAIN;
  12. /*calibrate when startup && temperature is changed more than 5? degree
  13. * calibrate the ms5238's IMON output voltage gain
  14. */
  15. int measure_system_calibrate(void){
  16. }