mbed OS 5 example application using X-NUCLEO-NFC02A1
Dependencies: NDefLib X_NUCLEO_NFC02A1
Fork of HelloWorld_NFC02A1 by
Revision 9:0bd2f0c13d3d, committed 2016-10-03
- Comitter:
- giovannivisentini
- Date:
- Mon Oct 03 11:58:00 2016 +0000
- Parent:
- 8:9bdd16ebccfb
- Child:
- 10:64a38017f5c8
- Commit message:
- update libs and enable tag reading
Changed in this revision
| X_NUCLEO_NFC02A1.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/X_NUCLEO_NFC02A1.lib Fri Sep 30 11:46:24 2016 +0000 +++ b/X_NUCLEO_NFC02A1.lib Mon Oct 03 11:58:00 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/rosarium/code/X_NUCLEO_NFC02A1/#0287f5476fe0 +http://developer.mbed.org/users/rosarium/code/X_NUCLEO_NFC02A1/#900640bf1cff
--- 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
-
}
