0

Dependencies:   mbed NDefLib X_NUCLEO_NFC01A1

Dependents:   Projekt KPG Program_KPG_2019

Files at this revision

API Documentation at this revision

Comitter:
giovannivisentini
Date:
Fri Jan 15 10:37:23 2016 +0000
Parent:
6:44204e733f96
Child:
8:1eca669a412b
Commit message:
remove Serial object

Changed in this revision

NDefLib.lib Show annotated file Show diff for this revision Revisions of this file
X_NUCLEO_NFC01A1.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/NDefLib.lib	Thu Jan 14 07:55:10 2016 +0000
+++ b/NDefLib.lib	Fri Jan 15 10:37:23 2016 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/giovannivisentini/code/NDefLib/#ed4d9b8d1410
+http://developer.mbed.org/users/giovannivisentini/code/NDefLib/#dbf3a61d70b3
--- a/X_NUCLEO_NFC01A1.lib	Thu Jan 14 07:55:10 2016 +0000
+++ b/X_NUCLEO_NFC01A1.lib	Fri Jan 15 10:37:23 2016 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/giovannivisentini/code/X_NUCLEO_NFC01A1/#9f2e2e68d695
+http://developer.mbed.org/users/giovannivisentini/code/X_NUCLEO_NFC01A1/#7e3d436b19ee
--- a/main.cpp	Thu Jan 14 07:55:10 2016 +0000
+++ b/main.cpp	Fri Jan 15 10:37:23 2016 +0000
@@ -2,7 +2,7 @@
   ******************************************************************************
   * @file       main.cpp
   * @author     ST Central Labs
-  * @version V1.0.0
+  * @version    V1.0.0
   * @date       21 Dic 2015
   * @brief      This demo writes an ndef message with an url inside.
   ******************************************************************************
@@ -45,7 +45,6 @@
  * Write a Ndef URI message linking to st.com site.
  */
 int main(void){
-    Serial pc(SERIAL_TX, SERIAL_RX);
     
     //use default board pinout
     I2C i2cChannel(X_NUCLEO_NFC01A1::DEFAULT_SDA_PIN,X_NUCLEO_NFC01A1::DEFAULT_SDL_PIN);
@@ -53,11 +52,11 @@
     
     //retrieve the NdefLib interface
     NDefLib::NDefNfcTag& tag =nfcNucleo->getM24SR().getNDefTag();
-    pc.printf("System Init done: !\n\r");
+    printf("System Init done: !\n\r");
     
     //open the i2c session with the nfc chip
     if(tag.openSession()){
-        pc.printf("Session open\n\r");
+        printf("Session open\n\r");
         nfcNucleo->getLed1()=1;
         
         //create the NDef message and record
@@ -67,20 +66,20 @@
 
         //write the tag
         if(tag.write(msg)){
-            pc.printf("Tag writed \n\r");
+            printf("Tag writed \n\r");
             nfcNucleo->getLed2()=1;
         }else{
-            pc.printf("Error writing \n\r");
+            printf("Error writing \n\r");
         }//if-else
 
         //close the i2c session
         if(tag.closeSession()){
-           pc.printf("Session closed\n\r");
+           printf("Session closed\n\r");
            nfcNucleo->getLed3()=1;
         }else{
-            pc.printf("Error Closing the session\n\r");
+           printf("Error Closing the session\n\r");
         }//if-else
             
     }else
-        pc.printf("Error open Session\n\r");
+        printf("Error open Session\n\r");
 }