[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>
This commit is contained in:
gornekich
2021-09-30 23:03:28 +03:00
committed by GitHub
parent 7a89791b2b
commit 638f276308
22 changed files with 574 additions and 155 deletions

View File

@@ -101,6 +101,11 @@ void bq25896_disable_otg() {
bq25896_write_reg(0x03, (uint8_t*)&bq25896_regs.r03);
}
bool bq25896_is_otg_enabled() {
bq25896_read_reg(0x03, (uint8_t*)&bq25896_regs.r03);
return bq25896_regs.r03.OTG_CONFIG;
}
uint16_t bq25896_get_vbus_voltage() {
bq25896_read_reg(0x11, (uint8_t*)&bq25896_regs.r11);
if(bq25896_regs.r11.VBUS_GD) {

View File

@@ -18,6 +18,9 @@ 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();