mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 17:38:36 -07:00
Merge branch 'ofw-dev' into dev
This commit is contained in:
@@ -284,10 +284,15 @@ void furi_hal_power_reset() {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void furi_hal_power_enable_otg() {
|
||||
bool furi_hal_power_enable_otg() {
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
|
||||
bq25896_set_boost_lim(&furi_hal_i2c_handle_power, BoostLim_2150);
|
||||
bq25896_enable_otg(&furi_hal_i2c_handle_power);
|
||||
furi_delay_ms(30);
|
||||
bool ret = bq25896_is_otg_enabled(&furi_hal_i2c_handle_power);
|
||||
bq25896_set_boost_lim(&furi_hal_i2c_handle_power, BoostLim_1400);
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void furi_hal_power_disable_otg() {
|
||||
@@ -317,6 +322,13 @@ void furi_hal_power_set_battery_charge_voltage_limit(float voltage) {
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
}
|
||||
|
||||
bool furi_hal_power_check_otg_fault() {
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
|
||||
bool ret = bq25896_check_otg_fault(&furi_hal_i2c_handle_power);
|
||||
furi_hal_i2c_release(&furi_hal_i2c_handle_power);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void furi_hal_power_check_otg_status() {
|
||||
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
|
||||
if(bq25896_check_otg_fault(&furi_hal_i2c_handle_power))
|
||||
|
||||
Reference in New Issue
Block a user