2020-12-02 10:47:13 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Initialize Driver */
|
2020-12-02 10:47:13 +00:00
|
|
|
void bq25896_init();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Send device into shipping mode */
|
2020-12-02 10:47:13 +00:00
|
|
|
void bq25896_poweroff();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Is currently charging */
|
2020-12-02 10:47:13 +00:00
|
|
|
bool bq25896_is_charging();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Enable otg */
|
2020-12-02 10:47:13 +00:00
|
|
|
void bq25896_enable_otg();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Disable otg */
|
2020-12-02 10:47:13 +00:00
|
|
|
void bq25896_disable_otg();
|
|
|
|
|
2021-09-30 20:03:28 +00:00
|
|
|
/** Is otg enabled */
|
|
|
|
bool bq25896_is_otg_enabled();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get VBUS Voltage in mV */
|
2020-12-02 10:47:13 +00:00
|
|
|
uint16_t bq25896_get_vbus_voltage();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get VSYS Voltage in mV */
|
2020-12-02 10:47:13 +00:00
|
|
|
uint16_t bq25896_get_vsys_voltage();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get VBAT Voltage in mV */
|
2020-12-02 10:47:13 +00:00
|
|
|
uint16_t bq25896_get_vbat_voltage();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get VBAT current in mA */
|
2020-12-02 10:47:13 +00:00
|
|
|
uint16_t bq25896_get_vbat_current();
|
|
|
|
|
2021-03-24 09:35:33 +00:00
|
|
|
/** Get NTC voltage in mpct of REGN */
|
2020-12-02 10:47:13 +00:00
|
|
|
uint32_t bq25896_get_ntc_mpct();
|