mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 13:28:36 -07:00
Merge branch 'fz-dev' into dev
This commit is contained in:
@@ -24,13 +24,29 @@ FuriEventFlag* event = NULL;
|
||||
#define FURI_HAL_NFC_UID_INCOMPLETE (0x04)
|
||||
|
||||
void furi_hal_nfc_init() {
|
||||
furi_assert(!event);
|
||||
event = furi_event_flag_alloc();
|
||||
|
||||
ReturnCode ret = rfalNfcInitialize();
|
||||
if(ret == ERR_NONE) {
|
||||
furi_hal_nfc_start_sleep();
|
||||
event = furi_event_flag_alloc();
|
||||
FURI_LOG_I(TAG, "Init OK");
|
||||
} else {
|
||||
FURI_LOG_W(TAG, "Initialization failed, RFAL returned: %d", ret);
|
||||
FURI_LOG_W(TAG, "Init Failed, RFAL returned: %d", ret);
|
||||
}
|
||||
}
|
||||
|
||||
void furi_hal_nfc_deinit() {
|
||||
ReturnCode ret = rfalDeinitialize();
|
||||
if(ret == ERR_NONE) {
|
||||
FURI_LOG_I(TAG, "Deinit OK");
|
||||
} else {
|
||||
FURI_LOG_W(TAG, "Deinit Failed, RFAL returned: %d", ret);
|
||||
}
|
||||
|
||||
if(event) {
|
||||
furi_event_flag_free(event);
|
||||
event = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,10 @@ typedef struct {
|
||||
*/
|
||||
void furi_hal_nfc_init();
|
||||
|
||||
/** Deinit nfc
|
||||
*/
|
||||
void furi_hal_nfc_deinit();
|
||||
|
||||
/** Check if nfc worker is busy
|
||||
*
|
||||
* @return true if busy
|
||||
|
||||
Reference in New Issue
Block a user