ST / X_NUCLEO_NFC01A1

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:
21:ccc4f3fed4b3
Child:
24:9f98eafa2d39
--- a/m24sr/m24sr_class.h	Fri Jan 29 15:06:30 2016 +0000
+++ b/m24sr/m24sr_class.h	Mon Feb 01 15:32:40 2016 +0000
@@ -71,16 +71,10 @@
 	static const uint8_t DEFAULT_PASSWORD[16];
 
 	/**
-	 * Default gpo status
+	 * Default gpo status -> the gpo will remain high
 	 */
 	static const NFC_GPO_MGMT DEFAULT_GPO_STATUS=HIGH_IMPEDANCE;
 
-
-	class Callback : public Nfc::Callback{
-		public:
-
-	};
-
 	/*** Constructor and Destructor Methods ***/
 
 	/**
@@ -143,7 +137,7 @@
 	}
 
 	virtual NFC_StatusTypeDef ForceGetSession(void) {
-		return (NFC_StatusTypeDef) M24SR_KillSession();
+		return (NFC_StatusTypeDef) M24SR_ForceSession();
 	}
 
 	virtual NFC_StatusTypeDef Deselect(void) {
@@ -267,7 +261,9 @@
 	NFC_StatusTypeDef M24SR_Init(M24SR_InitTypeDef *);
 	NFC_StatusTypeDef M24SR_ReadID(uint8_t *nfc_id);
 	NFC_StatusTypeDef M24SR_GetSession(void);
-	NFC_StatusTypeDef M24SR_KillSession(void);
+	NFC_StatusTypeDef M24SR_ForceSession(void);
+
+
 
 	NFC_StatusTypeDef M24SR_Deselect(void);
 	NFC_StatusTypeDef M24SR_ReceiveDeselect(void);
@@ -405,7 +401,7 @@
 	NDefNfcTagM24SR NDefTagUtil;
 
 	/**
-	 * command that the component can accept
+	 * Command that the component can accept
 	 */
 	typedef enum{
 		NONE,                            //!< NONE
@@ -427,7 +423,8 @@
 	}M24SR_command_t;
 
 	/**
-	 * parameter used for invoke the command
+	 * User parameter used invoke the command, it is used for remember the data between a
+	 * command and a rensponse
 	 */
 	typedef struct{
 		uint8_t *data; //!< data
@@ -436,7 +433,7 @@
 	}M24SR_command_data_t;
 
 	/**
-	 * communication mode used by this device
+	 * Communication mode used by this device
 	 */
 	typedef enum{
 		SYNC,//!< SYNC wait the command response before return
@@ -444,20 +441,23 @@
 	}M24SR_communication_t;
 
 	/**
-	 * type of communication that we are using
+	 * Type of communication that we are using
 	 */
 	M24SR_communication_t mCommunicationType;
 
 	/**
-	 * the class is wait the answer of this command
+	 * The class is wait the answer of this command
 	 */
 	M24SR_command_t mLastCommandSend;
 
 	/**
-	 * parameter used for invoke the last command
+	 * Parameter used for invoke the last command
 	 */
 	M24SR_command_data_t mLastCommandData;
 
+	/**
+	 * Interrupt object fired when the gpo status change
+	 */
 	InterruptIn mGpoEventInterrupt;
 private: