Example application for the X-Nucleo-NFC01A1 Dynamic NFC Tag board.
Dependencies: NDefLib X_NUCLEO_NFC01A1 mbed
Fork of HelloWorld_NFC01A1 by
X-NUCLEO-NFC01A1 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-NFC01A1 Dynamic NFC Tag Expansion Board based on M24SR.
Example Application
This is just a simple "hello world" style program for the X-NUCLEO-NFC01A1 Dynamic NFC Tag Expansion Board. The program writes a URI link to the M24SR dynamic tag using the synchronous programming model. The URI can then be retrieved from an NFC enabled smartphone/tablet.
A more complex example providing asynchronous access to the tag is also available.
Diff: main.cpp
- Revision:
- 4:4145a2db3349
- Parent:
- 1:eff1b8998438
- Child:
- 6:44204e733f96
diff -r 54859272193c -r 4145a2db3349 main.cpp --- a/main.cpp Tue Dec 22 08:40:33 2015 +0000 +++ b/main.cpp Tue Dec 22 15:34:40 2015 +0000 @@ -1,7 +1,8 @@ /** ****************************************************************************** * @file main.cpp - * @date 21/12/2015 + * @author ST Central Labs + * @date 21 Dic 2015 * @brief This demo write an ndef message with an url inside ****************************************************************************** * @@ -35,7 +36,7 @@ #include "mbed.h" #include "X_NUCLEO_NFC01A1.h" -#include "Type4NfcTagM24SR.h" +#include "NDefLib/NDefNfcTag.h" #include "NDefLib/RecordType/RecordURI.h" /** @@ -49,7 +50,7 @@ X_NUCLEO_NFC01A1 *nfcNucleo = X_NUCLEO_NFC01A1::Instance(i2cChannel); //create the wrapper for use the NdefLib - Type4NfcTagM24SR tag(nfcNucleo->getM24SR()); + NDefLib::NDefNfcTag& tag =nfcNucleo->getM24SR().getNDefTag(); pc.printf("System Init done: !\n\r"); //open the i2c session with the nfc chip if(tag.openSession()){