[FL-2674] Show error popup when NFC chip is not init/disconnected (#1722)

* Show error popup when NFC chip is not init/disconnected
* Move to dialogs for the error message
* Fix a memory leak and wrap the hal check
* F7: update api_symbols.csv, add furi_hal_nfc_is_init

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Astra
2022-09-19 15:46:56 +03:00
committed by GitHub
parent ed385594a3
commit 3d3c422751
5 changed files with 37 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,1.3,,
Version,+,1.4,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -1096,6 +1096,7 @@ Function,+,furi_hal_nfc_field_off,void,
Function,+,furi_hal_nfc_field_on,void,
Function,-,furi_hal_nfc_init,void,
Function,+,furi_hal_nfc_is_busy,_Bool,
Function,+,furi_hal_nfc_is_init,_Bool,
Function,+,furi_hal_nfc_listen,_Bool,"uint8_t*, uint8_t, uint8_t*, uint8_t, _Bool, uint32_t"
Function,+,furi_hal_nfc_listen_rx,_Bool,"FuriHalNfcTxRxContext*, uint32_t"
Function,+,furi_hal_nfc_listen_sleep,void,
1 entry status name type params
2 Version + 1.3 1.4
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1096 Function + furi_hal_nfc_field_on void
1097 Function - furi_hal_nfc_init void
1098 Function + furi_hal_nfc_is_busy _Bool
1099 Function + furi_hal_nfc_is_init _Bool
1100 Function + furi_hal_nfc_listen _Bool uint8_t*, uint8_t, uint8_t*, uint8_t, _Bool, uint32_t
1101 Function + furi_hal_nfc_listen_rx _Bool FuriHalNfcTxRxContext*, uint32_t
1102 Function + furi_hal_nfc_listen_sleep void

View File

@@ -39,6 +39,10 @@ bool furi_hal_nfc_is_busy() {
return rfalNfcGetState() != RFAL_NFC_STATE_IDLE;
}
bool furi_hal_nfc_is_init() {
return rfalNfcGetState() != RFAL_NFC_STATE_NOTINIT;
}
void furi_hal_nfc_field_on() {
furi_hal_nfc_exit_sleep();
st25r3916TxRxOn();