Furi_Power: fix furi_hal_power_enable_otg (#2842)

* Furi_Power: fix furi_hal_power_enable_otg
* SubGhz: fix error output connected USB
* Furi_Hal: fix target F18
* Fix api_symbols.csv version for F7

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Skorpionm
2023-07-06 01:48:02 +09:00
committed by GitHub
co-authored by Aleksandr Kutuzov
parent f3ae09cc16
commit 906cca8f24
8 changed files with 55 additions and 20 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,32.0,,
Version,+,33.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -1030,12 +1030,13 @@ Function,+,furi_hal_mpu_protect_no_access,void,"FuriHalMpuRegion, uint32_t, Furi
Function,+,furi_hal_mpu_protect_read_only,void,"FuriHalMpuRegion, uint32_t, FuriHalMPURegionSize"
Function,-,furi_hal_os_init,void,
Function,+,furi_hal_os_tick,void,
Function,+,furi_hal_power_check_otg_fault,_Bool,
Function,+,furi_hal_power_check_otg_status,void,
Function,+,furi_hal_power_debug_get,void,"PropertyValueCallback, void*"
Function,+,furi_hal_power_disable_external_3_3v,void,
Function,+,furi_hal_power_disable_otg,void,
Function,+,furi_hal_power_enable_external_3_3v,void,
Function,+,furi_hal_power_enable_otg,void,
Function,+,furi_hal_power_enable_otg,_Bool,
Function,+,furi_hal_power_gauge_is_ok,_Bool,
Function,+,furi_hal_power_get_bat_health_pct,uint8_t,
Function,+,furi_hal_power_get_battery_charge_voltage_limit,float,
1 entry status name type params
2 Version + 32.0 33.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1030 Function + furi_hal_mpu_protect_read_only void FuriHalMpuRegion, uint32_t, FuriHalMPURegionSize
1031 Function - furi_hal_os_init void
1032 Function + furi_hal_os_tick void
1033 Function + furi_hal_power_check_otg_fault _Bool
1034 Function + furi_hal_power_check_otg_status void
1035 Function + furi_hal_power_debug_get void PropertyValueCallback, void*
1036 Function + furi_hal_power_disable_external_3_3v void
1037 Function + furi_hal_power_disable_otg void
1038 Function + furi_hal_power_enable_external_3_3v void
1039 Function + furi_hal_power_enable_otg void _Bool
1040 Function + furi_hal_power_gauge_is_ok _Bool
1041 Function + furi_hal_power_get_bat_health_pct uint8_t
1042 Function + furi_hal_power_get_battery_charge_voltage_limit float
+3 -2
View File
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,32.0,,
Version,+,33.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -1235,12 +1235,13 @@ Function,+,furi_hal_nfc_tx_rx,_Bool,"FuriHalNfcTxRxContext*, uint16_t"
Function,+,furi_hal_nfc_tx_rx_full,_Bool,FuriHalNfcTxRxContext*
Function,-,furi_hal_os_init,void,
Function,+,furi_hal_os_tick,void,
Function,+,furi_hal_power_check_otg_fault,_Bool,
Function,+,furi_hal_power_check_otg_status,void,
Function,+,furi_hal_power_debug_get,void,"PropertyValueCallback, void*"
Function,+,furi_hal_power_disable_external_3_3v,void,
Function,+,furi_hal_power_disable_otg,void,
Function,+,furi_hal_power_enable_external_3_3v,void,
Function,+,furi_hal_power_enable_otg,void,
Function,+,furi_hal_power_enable_otg,_Bool,
Function,+,furi_hal_power_gauge_is_ok,_Bool,
Function,+,furi_hal_power_get_bat_health_pct,uint8_t,
Function,+,furi_hal_power_get_battery_charge_voltage_limit,float,
1 entry status name type params
2 Version + 32.0 33.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1235 Function + furi_hal_nfc_tx_rx_full _Bool FuriHalNfcTxRxContext*
1236 Function - furi_hal_os_init void
1237 Function + furi_hal_os_tick void
1238 Function + furi_hal_power_check_otg_fault _Bool
1239 Function + furi_hal_power_check_otg_status void
1240 Function + furi_hal_power_debug_get void PropertyValueCallback, void*
1241 Function + furi_hal_power_disable_external_3_3v void
1242 Function + furi_hal_power_disable_otg void
1243 Function + furi_hal_power_enable_external_3_3v void
1244 Function + furi_hal_power_enable_otg void _Bool
1245 Function + furi_hal_power_gauge_is_ok _Bool
1246 Function + furi_hal_power_get_bat_health_pct uint8_t
1247 Function + furi_hal_power_get_battery_charge_voltage_limit float
+13 -1
View File
@@ -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))
@@ -99,12 +99,16 @@ void furi_hal_power_reset();
/** OTG enable
*/
void furi_hal_power_enable_otg();
bool furi_hal_power_enable_otg();
/** OTG disable
*/
void furi_hal_power_disable_otg();
/** Check OTG status fault
*/
bool furi_hal_power_check_otg_fault();
/** Check OTG status and disable it if falt happened
*/
void furi_hal_power_check_otg_status();