Flipper Zero Firmware
Loading...
Searching...
No Matches
furi_hal_power.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <stdint.h>
9#include <stdbool.h>
10#include <core/string.h>
11#include <core/common_defines.h>
12#include <toolbox/property.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
19typedef enum {
20 FuriHalPowerICCharger,
21 FuriHalPowerICFuelGauge,
23
25void furi_hal_power_init(void);
26
37
43
49
55
61
67
70void furi_hal_power_sleep(void);
71
76uint8_t furi_hal_power_get_pct(void);
77
83
89
95
98
101void furi_hal_power_off(void);
102
105FURI_NORETURN void furi_hal_power_reset(void);
106
110
114
118
122
128
134
142
148
154
160
168
176
184
190
194
198
204
208
215void furi_hal_power_info_get(PropertyValueCallback callback, char sep, void* context);
216
222void furi_hal_power_debug_get(PropertyValueCallback callback, void* context);
223
224#ifdef __cplusplus
225}
226#endif
float furi_hal_power_get_battery_charge_voltage_limit(void)
Get battery charge voltage limit in V.
Definition furi_hal_power.c:371
bool furi_hal_power_enable_otg(void)
OTG enable.
Definition furi_hal_power.c:347
void furi_hal_power_init(void)
Initialize drivers.
Definition furi_hal_power.c:54
uint8_t furi_hal_power_get_bat_health_pct(void)
Get battery health state in percents.
Definition furi_hal_power.c:278
bool furi_hal_power_is_charging_done(void)
Get charge complete status.
Definition furi_hal_power.c:292
void furi_hal_power_debug_get(PropertyValueCallback callback, void *context)
Get power debug information.
Definition furi_hal_power.c:587
uint32_t furi_hal_power_get_battery_remaining_capacity(void)
Get remaining battery battery capacity in mAh.
Definition furi_hal_power.c:399
float furi_hal_power_get_battery_voltage(FuriHalPowerIC ic)
Get battery voltage in V.
Definition furi_hal_power.c:420
void furi_hal_power_disable_otg(void)
OTG disable.
Definition furi_hal_power.c:358
FURI_NORETURN void furi_hal_power_reset(void)
Reset device.
Definition furi_hal_power.c:343
bool furi_hal_power_is_charging(void)
Get charging status.
Definition furi_hal_power.c:285
void furi_hal_power_suppress_charge_exit(void)
Exit supress charge mode.
Definition furi_hal_power.c:501
bool furi_hal_power_is_shutdown_requested(void)
Check if gauge requests system shutdown.
Definition furi_hal_power.c:132
void furi_hal_power_info_get(PropertyValueCallback callback, char sep, void *context)
Get power information.
Definition furi_hal_power.c:514
void furi_hal_power_shutdown(void)
Switch MCU to SHUTDOWN.
Definition furi_hal_power.c:299
float furi_hal_power_get_battery_temperature(FuriHalPowerIC ic)
Get temperature in C.
Definition furi_hal_power.c:465
bool furi_hal_power_check_otg_fault(void)
Check OTG status fault.
Definition furi_hal_power.c:385
void furi_hal_power_enable_external_3_3v(void)
Enable 3.3v on external gpio and sd card.
Definition furi_hal_power.c:480
void furi_hal_power_insomnia_exit(void)
Exit insomnia mode Allow device to go to sleep.
Definition furi_hal_power.c:159
void furi_hal_power_set_battery_charge_voltage_limit(float voltage)
Set battery charge voltage limit in V.
Definition furi_hal_power.c:378
float furi_hal_power_get_usb_voltage(void)
Get USB voltage in V.
Definition furi_hal_power.c:473
void furi_hal_power_insomnia_enter(void)
Enter insomnia mode Prevents device from going to sleep.
Definition furi_hal_power.c:152
void furi_hal_power_disable_external_3_3v(void)
Disable 3.3v on external gpio and sd card.
Definition furi_hal_power.c:484
uint8_t furi_hal_power_get_pct(void)
Get predicted remaining battery capacity in percents.
Definition furi_hal_power.c:271
uint32_t furi_hal_power_get_battery_design_capacity(void)
Get battery capacity in mAh from battery profile.
Definition furi_hal_power.c:413
void furi_hal_power_off(void)
Poweroff device.
Definition furi_hal_power.c:331
FuriHalPowerIC
Power IC type.
Definition furi_hal_power.h:19
float furi_hal_power_get_battery_current(FuriHalPowerIC ic)
Get battery current in A.
Definition furi_hal_power.c:436
void furi_hal_power_sleep(void)
Go to sleep.
Definition furi_hal_power.c:263
uint16_t furi_hal_power_insomnia_level(void)
Get current insomnia level.
Definition furi_hal_power.c:148
bool furi_hal_power_gauge_is_ok(void)
Check if gauge is ok.
Definition furi_hal_power.c:110
void furi_hal_power_check_otg_status(void)
Check OTG status and disable it if falt happened.
Definition furi_hal_power.c:392
uint32_t furi_hal_power_get_battery_full_capacity(void)
Get full charge battery capacity in mAh.
Definition furi_hal_power.c:406
bool furi_hal_power_is_otg_enabled(void)
Get OTG status.
Definition furi_hal_power.c:364
void furi_hal_power_suppress_charge_enter(void)
Enter supress charge mode.
Definition furi_hal_power.c:488
bool furi_hal_power_sleep_available(void)
Check if sleep available.
Definition furi_hal_power.c:166
Furi string primitive.