Demo NFC
Dependencies: NDefLib X_NUCLEO_NFC01A1 mbed
Fork of HelloWorld_NFC01A1 by
Revision 6:44204e733f96, committed 2016-01-14
- Comitter:
- giovannivisentini
- Date:
- Thu Jan 14 07:55:10 2016 +0000
- Parent:
- 5:664721225857
- Child:
- 7:435297dd022d
- Commit message:
- update documentation
Changed in this revision
--- a/NDefLib.lib Mon Jan 11 13:20:01 2016 +0000 +++ b/NDefLib.lib Thu Jan 14 07:55:10 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/giovannivisentini/code/NDefLib/#eaf42739791e +http://developer.mbed.org/users/giovannivisentini/code/NDefLib/#ed4d9b8d1410
--- a/X_NUCLEO_NFC01A1.lib Mon Jan 11 13:20:01 2016 +0000 +++ b/X_NUCLEO_NFC01A1.lib Thu Jan 14 07:55:10 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/giovannivisentini/code/X_NUCLEO_NFC01A1/#5e637c71cbb3 +http://developer.mbed.org/users/giovannivisentini/code/X_NUCLEO_NFC01A1/#9f2e2e68d695
--- a/main.cpp Mon Jan 11 13:20:01 2016 +0000
+++ b/main.cpp Thu Jan 14 07:55:10 2016 +0000
@@ -2,11 +2,13 @@
******************************************************************************
* @file main.cpp
* @author ST Central Labs
+ * @version V1.0.0
* @date 21 Dic 2015
- * @brief This demo write an ndef message with an url inside
+ * @brief This demo writes an ndef message with an url inside.
******************************************************************************
+ * @attention
*
- * COPYRIGHT(c) 2015 STMicroelectronics
+ * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -40,18 +42,19 @@
#include "NDefLib/RecordType/RecordURI.h"
/**
- * write a Ndef linking the st.com site
+ * Write a Ndef URI message linking to st.com site.
*/
int main(void){
Serial pc(SERIAL_TX, SERIAL_RX);
- //use dafault board pin
+ //use default board pinout
I2C i2cChannel(X_NUCLEO_NFC01A1::DEFAULT_SDA_PIN,X_NUCLEO_NFC01A1::DEFAULT_SDL_PIN);
X_NUCLEO_NFC01A1 *nfcNucleo = X_NUCLEO_NFC01A1::Instance(i2cChannel);
- //create the wrapper for use the NdefLib
+ //retrieve the NdefLib interface
NDefLib::NDefNfcTag& tag =nfcNucleo->getM24SR().getNDefTag();
pc.printf("System Init done: !\n\r");
+
//open the i2c session with the nfc chip
if(tag.openSession()){
pc.printf("Session open\n\r");
