Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgornekich <n.gorbadey@gmail.com>2021-09-30 23:03:28 +0300
committerGitHub <noreply@github.com>2021-09-30 23:03:28 +0300
commit638f2763088cefd40a3e279d4db36bd64f418b1d (patch)
treee55697628e14644dfbe55f4cd6b368715d61f89f /firmware
parent7a89791b2ba41df526df35b625c625adaeef083d (diff)
[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>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/targets/f6/furi-hal/furi-hal-power.c4
-rw-r--r--firmware/targets/f7/furi-hal/furi-hal-power.c4
-rw-r--r--firmware/targets/furi-hal-include/furi-hal-power.h3
3 files changed, 11 insertions, 0 deletions
diff --git a/firmware/targets/f6/furi-hal/furi-hal-power.c b/firmware/targets/f6/furi-hal/furi-hal-power.c
index 4dd0127f..afc430ab 100644
--- a/firmware/targets/f6/furi-hal/furi-hal-power.c
+++ b/firmware/targets/f6/furi-hal/furi-hal-power.c
@@ -180,6 +180,10 @@ void furi_hal_power_disable_otg() {
bq25896_disable_otg();
}
+bool furi_hal_power_is_otg_enabled() {
+ return bq25896_is_otg_enabled();
+}
+
uint32_t furi_hal_power_get_battery_remaining_capacity() {
return bq27220_get_remaining_capacity();
}
diff --git a/firmware/targets/f7/furi-hal/furi-hal-power.c b/firmware/targets/f7/furi-hal/furi-hal-power.c
index 4dd0127f..afc430ab 100644
--- a/firmware/targets/f7/furi-hal/furi-hal-power.c
+++ b/firmware/targets/f7/furi-hal/furi-hal-power.c
@@ -180,6 +180,10 @@ void furi_hal_power_disable_otg() {
bq25896_disable_otg();
}
+bool furi_hal_power_is_otg_enabled() {
+ return bq25896_is_otg_enabled();
+}
+
uint32_t furi_hal_power_get_battery_remaining_capacity() {
return bq27220_get_remaining_capacity();
}
diff --git a/firmware/targets/furi-hal-include/furi-hal-power.h b/firmware/targets/furi-hal-include/furi-hal-power.h
index aeb6c201..3514e8d6 100644
--- a/firmware/targets/furi-hal-include/furi-hal-power.h
+++ b/firmware/targets/furi-hal-include/furi-hal-power.h
@@ -69,6 +69,9 @@ void furi_hal_power_enable_otg();
/** OTG disable */
void furi_hal_power_disable_otg();
+/** Get OTG status */
+bool furi_hal_power_is_otg_enabled();
+
/** Get remaining battery battery capacity in mAh */
uint32_t furi_hal_power_get_battery_remaining_capacity();