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:
23:d07138541feb
Parent:
19:0b65a5813059
Child:
24:9f98eafa2d39
--- a/m24sr/NDefNfcTagM24SR.h	Fri Jan 29 15:06:30 2016 +0000
+++ b/m24sr/NDefNfcTagM24SR.h	Mon Feb 01 15:32:40 2016 +0000
@@ -115,6 +115,7 @@
 		class OpenSessionCallBack: public Nfc::Callback{
 			public:
 				OpenSessionCallBack(NDefNfcTagM24SR &sender);
+
 				virtual void onSessionOpen(Nfc *nfc,NFC_StatusTypeDef status);
 				virtual void onSelectedApplication(Nfc *nfc,NFC_StatusTypeDef status);
 				virtual void onSelectedCCFile(Nfc *nfc,NFC_StatusTypeDef status);
@@ -123,12 +124,24 @@
 				virtual void onSelectedNDEFFile(Nfc *nfc,NFC_StatusTypeDef status);
 
 			private:
+				/**
+				 * Object that send the open session callback
+				 */
 				NDefNfcTagM24SR &mSender;
+
+				/**
+				 * number of trials done for open the session
+				 */
 				uint32_t mNTrials;
+
+				/**
+				 * buffer where read the CC file
+				 */
 				uint8_t CCFile[15];
 		};
 
 		OpenSessionCallBack mOpenSessionCallback;
+		friend class OpenSessionCallBack;
 
 		/**
 		 * Class containing the callback needed to close a session
@@ -148,10 +161,15 @@
 					}//if-else
 				}
 			private:
+
+				/**
+				 * Object that send the open session callback
+				 */
 				NDefNfcTagM24SR &mSender;
 		};
 
 		CloseSessionCallBack mCloseSessionCallback;
+		friend class OpenSessionCallBack;
 
 		/**
 		 * Class containing the callback needed to write a buffer
@@ -173,10 +191,10 @@
 
 				/**
 				 * Set the buffer to write and the function to call when finish
-				 * @param buffer buffer to write
-				 * @param nByte number of bytes to write
-				 * @param callback function to call when the write ends
-				 * @param param parameter to pass to the callback function
+				 * @param buffer Buffer to write.
+				 * @param nByte Number of bytes to write.
+				 * @param callback Function to call when the write ends.
+				 * @param param Parameter to pass to the callback function.
 				 */
 				void setTask(const uint8_t *buffer,uint16_t nByte,
 						byteOperationCallback_t callback,CallbackStatus_t *param){
@@ -192,6 +210,7 @@
 
 
 			private:
+
 				/** buffer to write */
 				const uint8_t *mByteToWrite;
 				/** length of the buffer */
@@ -209,6 +228,7 @@
 		};
 
 		WriteByteCallback mWriteByteCallback;
+		friend class WriteByteCallback;
 
 		/**
 		 * Class containing the callback needed to read a buffer
@@ -282,6 +302,7 @@
 		};
 
 		ReadByteCallback mReadByteCallback;
+		friend class ReadByteCallback;
 
 
 };