api_charge.h 978 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _API_CHARGE_H
  2. #define _API_CHARGE_H
  3. typedef struct {
  4. u8 chag_sta : 3, //充电状态
  5. dcin_reset : 1, //DC插入复位
  6. leakage : 3, //漏电电流档
  7. inbox_voltage : 1; //充电仓维持电压
  8. u8 const_curr; //恒流充电电流
  9. u8 trick_curr; //涓流充电电流
  10. u8 stop_curr; //充电截止电流
  11. u8 stop_volt; //充电截止电压
  12. u8 trick_curr_en : 1; //是否使能涓流充电
  13. u8 trick_stop_volt : 1; //涓流充电截止电压
  14. u8 ldo_en : 1; //充电是否使用LDO mode
  15. u8 volt_follow_en : 1; //充电是否使用电压跟随模式
  16. u8 volt_follow_diff; //恒压差充电差值
  17. u8 bled_on_pr;
  18. volatile u16 stop_time;
  19. void (*charge_sta_func)(u8 sta);
  20. } charge_cfg_t;
  21. void charge_stop(u8 mode);
  22. void charge_init_do(charge_cfg_t *p);
  23. #endif // _API_CHARGE_H