Complete mbed library/workspace for HelloWorld_NFC02A1

Dependencies:   NDefLib X_NUCLEO_NFC02A1 mbed

Fork of HelloWorld_NFC02A1 by ST Expansion SW Team

X-NUCLEO-NFC02A1 Dynamic NFC Tag Expansion Board Firmware Package

Introduction

This firmware package includes Components Device Drivers, Board Support Package and example applications for STMicroelectronics X-NUCLEO-NFC02A1 Dynamic NFC Tag Expansion Board based on M24LR.

Example Application

This is just a simple "hello world" style program for the X-NUCLEO-NFC02A1 Dynamic NFC Tag Expansion Board. The program writes a URI link to the M24LR dynamic tag using the synchronous programming model. It then reads back the URI from the tag to display it on terminal. The URI can also be retrieved from an NFC enabled smartphone/tablet.

Files at this revision

API Documentation at this revision

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
-
 }