Firmware library for the X-NUCLEO-NFC01A1 Dynamic NFC Tag board.

Dependencies:   M24SR

Dependents:   NFC M2M_2016_STM32 MyongjiElec_capstone1 IDW01M1_Cloud_IBM ... more

Fork of X_NUCLEO_NFC01A1 by ST Expansion SW Team

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.

Firmware Library

Class X_NUCLEO_NFC01A1 is intended to represent the Dynamic NFC Tag Expansion Board with the same name.
It provides an API to access to the M24SR component and to the three onboard LEDs.
It is intentionally implemented as a singleton because only one X_NUCLEO_NFC01A1 at a time might be deployed in a HW component stack.
The library also provides an implementation of the NDEF library API for M24SR, providing an simple way to read/write NDEF formatted messages from/to the M24SR dynamic NFC tag.

Example applications

1. Hello World
2. Asynchronous Hello World

Revision:
3:fa914de381ae
Parent:
1:15d4a123ef6b
Child:
6:96389fb79676
--- a/X_NUCLEO_NFC01A1.cpp	Mon Dec 21 10:17:35 2015 +0000
+++ b/X_NUCLEO_NFC01A1.cpp	Mon Dec 21 13:00:48 2015 +0000
@@ -40,18 +40,19 @@
 const PinName  X_NUCLEO_NFC01A1::DEFAULT_SDL_PIN=D15;
 
 
-
-const PinName X_NUCLEO_NFC01A1::GPO_PIN=D12;
-const PinName X_NUCLEO_NFC01A1::RF_DISABLE_PIN=D11;
-const PinName X_NUCLEO_NFC01A1::LED1_PIN=D5;
-const PinName X_NUCLEO_NFC01A1::LED2_PIN=D4;
-const PinName X_NUCLEO_NFC01A1::LED3_PIN=D2;
+const PinName X_NUCLEO_NFC01A1::DEFAULT_GPO_PIN=D12;
+const PinName X_NUCLEO_NFC01A1::DEFAULT_RF_DISABLE_PIN=D11;
+const PinName X_NUCLEO_NFC01A1::DEFAULT_LED1_PIN=D5;
+const PinName X_NUCLEO_NFC01A1::DEFAULT_LED2_PIN=D4;
+const PinName X_NUCLEO_NFC01A1::DEFAULT_LED3_PIN=D2;
 
 X_NUCLEO_NFC01A1 *X_NUCLEO_NFC01A1::mInstance = NULL;
 
-X_NUCLEO_NFC01A1* X_NUCLEO_NFC01A1::Instance(I2C &devI2C) {
+X_NUCLEO_NFC01A1* X_NUCLEO_NFC01A1::Instance(I2C &devI2C,const PinName &gpoName,
+			const PinName &RFDisableName, const PinName &led1Name,
+			const PinName &led2Name, const PinName &led3Name) {
 	if (mInstance == NULL) { // the first time
-		mInstance = new X_NUCLEO_NFC01A1(devI2C);
+		mInstance = new X_NUCLEO_NFC01A1(devI2C,gpoName,RFDisableName,led1Name,led2Name,led3Name);
 		if (mInstance != NULL) { //allocation ok
 			const int status = mInstance->mM24SR.Init(NULL);
 			if (status != NFC_SUCCESS) { //initialization failed