Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3603] Update RFID detector for the new NFC stack #49

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nfc_rfid_detector/nfc_rfid_detector_app_i.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void nfc_rfid_detector_app_field_presence_start(NfcRfidDetectorApp* app) {
furi_hal_rfid_field_detect_start();

// start the field presence nfc detection
furi_hal_nfc_exit_sleep();
furi_hal_nfc_acquire();
furi_hal_nfc_field_detect_start();
}

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

// stop the field presence nfc detection
furi_hal_nfc_start_sleep();
furi_hal_nfc_field_detect_stop();
furi_hal_nfc_release();
}

bool nfc_rfid_detector_app_field_presence_is_nfc(NfcRfidDetectorApp* app) {
furi_assert(app);

// check if the field presence is nfc
return furi_hal_nfc_field_is_present();
bool is_present = furi_hal_nfc_field_is_present();

return is_present;
}

bool nfc_rfid_detector_app_field_presence_is_rfid(NfcRfidDetectorApp* app, uint32_t* frequency) {
Expand Down