Ver código fonte

Merge nfc_rfid_detector from https://github.com/flipperdevices/flipperzero-good-faps

Willy-JL 2 anos atrás
pai
commit
adde9b68df
1 arquivos alterados com 6 adições e 3 exclusões
  1. 6 3
      nfc_rfid_detector/nfc_rfid_detector_app_i.c

+ 6 - 3
nfc_rfid_detector/nfc_rfid_detector_app_i.c

@@ -11,7 +11,7 @@ void nfc_rfid_detector_app_field_presence_start(NfcRfidDetectorApp* app) {
     furi_hal_rfid_field_detect_start();
     furi_hal_rfid_field_detect_start();
 
 
     // start the field presence nfc detection
     // start the field presence nfc detection
-    furi_hal_nfc_exit_sleep();
+    furi_hal_nfc_acquire();
     furi_hal_nfc_field_detect_start();
     furi_hal_nfc_field_detect_start();
 }
 }
 
 
@@ -22,14 +22,17 @@ void nfc_rfid_detector_app_field_presence_stop(NfcRfidDetectorApp* app) {
     furi_hal_rfid_field_detect_stop();
     furi_hal_rfid_field_detect_stop();
 
 
     // stop the field presence nfc detection
     // 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) {
 bool nfc_rfid_detector_app_field_presence_is_nfc(NfcRfidDetectorApp* app) {
     furi_assert(app);
     furi_assert(app);
 
 
     // check if the field presence is nfc
     // 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) {
 bool nfc_rfid_detector_app_field_presence_is_rfid(NfcRfidDetectorApp* app, uint32_t* frequency) {