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