bq25896.h 831 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 charging */
  11. void bq25896_enable_charging();
  12. /** Disable charging */
  13. void bq25896_disable_charging();
  14. /** Enable otg */
  15. void bq25896_enable_otg();
  16. /** Disable otg */
  17. void bq25896_disable_otg();
  18. /** Is otg enabled */
  19. bool bq25896_is_otg_enabled();
  20. /** Get VBUS Voltage in mV */
  21. uint16_t bq25896_get_vbus_voltage();
  22. /** Get VSYS Voltage in mV */
  23. uint16_t bq25896_get_vsys_voltage();
  24. /** Get VBAT Voltage in mV */
  25. uint16_t bq25896_get_vbat_voltage();
  26. /** Get VBAT current in mA */
  27. uint16_t bq25896_get_vbat_current();
  28. /** Get NTC voltage in mpct of REGN */
  29. uint32_t bq25896_get_ntc_mpct();