mbed OS 5 example application using X-NUCLEO-NFC02A1
Dependencies: NDefLib X_NUCLEO_NFC02A1
Fork of HelloWorld_NFC02A1 by
Diff: main.cpp
- Revision:
- 9:0bd2f0c13d3d
- Parent:
- 8:9bdd16ebccfb
- Child:
- 11:d0665d9c28a6
diff -r 9bdd16ebccfb -r 0bd2f0c13d3d main.cpp
--- a/main.cpp Fri Sep 30 11:46:24 2016 +0000
+++ b/main.cpp Mon Oct 03 11:58:00 2016 +0000
@@ -43,8 +43,6 @@
#include "NDefLib/NDefNfcTag.h"
#include "NDefLib/RecordType/RecordURI.h"
-#if 0
-/*----------------------------------------------------------------------------*/
static volatile bool buttonPress=false; // true when the user press the message
static void setButtonPress(){
@@ -83,8 +81,6 @@
printf("Error open read Session\n\r");
}
}
-/*----------------------------------------------------------------------------*/
-#endif
/**
* Write a Ndef URI message linking to st.com site.
@@ -145,9 +141,8 @@
}
else
printf("Error opening the session\n\r");
-
-#if 0
-/*----------------------------------------------------------------------------*/
+
+#if defined(TARGET_STM)
/* enable the button */
InterruptIn mybutton(USER_BUTTON);
@@ -163,9 +158,9 @@
buttonPress=false;
}
}
-/*----------------------------------------------------------------------------*/
+#else
+ readAndPrintNfcTag(tag);
#endif
-
}
