Skip to content

Commit 4089341

Browse files
Astraskotopeshedger
authored
[FL-3603] Update RFID detector for the new NFC stack (#49)
Co-authored-by: あく <[email protected]> Co-authored-by: hedger <[email protected]>
1 parent 3be8245 commit 4089341

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nfc_rfid_detector/nfc_rfid_detector_app_i.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void nfc_rfid_detector_app_field_presence_start(NfcRfidDetectorApp* app) {
1111
furi_hal_rfid_field_detect_start();
1212

1313
// start the field presence nfc detection
14-
furi_hal_nfc_exit_sleep();
14+
furi_hal_nfc_acquire();
1515
furi_hal_nfc_field_detect_start();
1616
}
1717

@@ -22,14 +22,17 @@ void nfc_rfid_detector_app_field_presence_stop(NfcRfidDetectorApp* app) {
2222
furi_hal_rfid_field_detect_stop();
2323

2424
// stop the field presence nfc detection
25-
furi_hal_nfc_start_sleep();
25+
furi_hal_nfc_field_detect_stop();
26+
furi_hal_nfc_release();
2627
}
2728

2829
bool nfc_rfid_detector_app_field_presence_is_nfc(NfcRfidDetectorApp* app) {
2930
furi_assert(app);
3031

3132
// check if the field presence is nfc
32-
return furi_hal_nfc_field_is_present();
33+
bool is_present = furi_hal_nfc_field_is_present();
34+
35+
return is_present;
3336
}
3437

3538
bool nfc_rfid_detector_app_field_presence_is_rfid(NfcRfidDetectorApp* app, uint32_t* frequency) {

0 commit comments

Comments
 (0)