Loading...
Searching...
No Matches
bq25896.h
1#pragma once
2
3#include "bq25896_reg.h"
4
5#include <stdbool.h>
6#include <stdint.h>
7#include <furi_hal_i2c.h>
8
10bool bq25896_init(FuriHalI2cBusHandle* handle);
11
13void bq25896_set_boost_lim(FuriHalI2cBusHandle* handle, BoostLim boost_lim);
14
16void bq25896_poweroff(FuriHalI2cBusHandle* handle);
17
19ChrgStat bq25896_get_charge_status(FuriHalI2cBusHandle* handle);
20
22bool bq25896_is_charging(FuriHalI2cBusHandle* handle);
23
25bool bq25896_is_charging_done(FuriHalI2cBusHandle* handle);
26
28void bq25896_enable_charging(FuriHalI2cBusHandle* handle);
29
31void bq25896_disable_charging(FuriHalI2cBusHandle* handle);
32
34void bq25896_enable_otg(FuriHalI2cBusHandle* handle);
35
37void bq25896_disable_otg(FuriHalI2cBusHandle* handle);
38
40bool bq25896_is_otg_enabled(FuriHalI2cBusHandle* handle);
41
43uint16_t bq25896_get_vreg_voltage(FuriHalI2cBusHandle* handle);
44
49void bq25896_set_vreg_voltage(FuriHalI2cBusHandle* handle, uint16_t vreg_voltage);
50
52bool bq25896_check_otg_fault(FuriHalI2cBusHandle* handle);
53
55uint16_t bq25896_get_vbus_voltage(FuriHalI2cBusHandle* handle);
56
58uint16_t bq25896_get_vsys_voltage(FuriHalI2cBusHandle* handle);
59
61uint16_t bq25896_get_vbat_voltage(FuriHalI2cBusHandle* handle);
62
64uint16_t bq25896_get_vbat_current(FuriHalI2cBusHandle* handle);
65
67uint32_t bq25896_get_ntc_mpct(FuriHalI2cBusHandle* handle);
I2C HAL API.
FuriHal i2c handle.
Definition furi_hal_i2c_types.h:44