bq25896.h 717 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. /** Initialize Driver */
  5. void bq25896_init();
  6. /** Send device into shipping mode */
  7. void bq25896_poweroff();
  8. /** Is currently charging */
  9. bool bq25896_is_charging();
  10. /** Enable otg */
  11. void bq25896_enable_otg();
  12. /** Disable otg */
  13. void bq25896_disable_otg();
  14. /** Is otg enabled */
  15. bool bq25896_is_otg_enabled();
  16. /** Get VBUS Voltage in mV */
  17. uint16_t bq25896_get_vbus_voltage();
  18. /** Get VSYS Voltage in mV */
  19. uint16_t bq25896_get_vsys_voltage();
  20. /** Get VBAT Voltage in mV */
  21. uint16_t bq25896_get_vbat_voltage();
  22. /** Get VBAT current in mA */
  23. uint16_t bq25896_get_vbat_current();
  24. /** Get NTC voltage in mpct of REGN */
  25. uint32_t bq25896_get_ntc_mpct();