unleashed-firmware/lib/drivers/bq25896.h
gornekich 638f276308
[FL-1884] GPIO application (#732)
* gpio: rename gpio application
* bq25896: add reading OTG config
* furi-hal-power: add is_otg_enabled API
* gpio: introduce new GPIO app, add OTG enable / disable
* variable-item-list: add enter callback
* gpio: add output test view and scene
* gpio app: fix GpioItemTester -> GpioItemTest

Co-authored-by: あく <alleteam@gmail.com>
2021-09-30 23:03:28 +03:00

37 lines
717 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
/** Initialize Driver */
void bq25896_init();
/** Send device into shipping mode */
void bq25896_poweroff();
/** Is currently charging */
bool bq25896_is_charging();
/** Enable otg */
void bq25896_enable_otg();
/** Disable otg */
void bq25896_disable_otg();
/** Is otg enabled */
bool bq25896_is_otg_enabled();
/** Get VBUS Voltage in mV */
uint16_t bq25896_get_vbus_voltage();
/** Get VSYS Voltage in mV */
uint16_t bq25896_get_vsys_voltage();
/** Get VBAT Voltage in mV */
uint16_t bq25896_get_vbat_voltage();
/** Get VBAT current in mA */
uint16_t bq25896_get_vbat_current();
/** Get NTC voltage in mpct of REGN */
uint32_t bq25896_get_ntc_mpct();