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:
9:9f2e2e68d695
Parent:
7:19fc04b8fec6
Child:
19:0b65a5813059
--- a/X_NUCLEO_NFC01A1.h	Mon Jan 11 13:06:23 2016 +0000
+++ b/X_NUCLEO_NFC01A1.h	Thu Jan 14 07:54:59 2016 +0000
@@ -2,12 +2,14 @@
   ******************************************************************************
   * @file       X_NUCLEO_NFC01A1.h
   * @author  	ST Central Labs
+  * @version 	V1.0.0
   * @date       05 Nov 2015
-  * @brief      singleton class that controls all the electronics inside the 
-  * 			X_NUCLEO_NFC01A1 expansion board
+  * @brief      Singleton class that controls all the electronics inside the 
+  * 			X_NUCLEO_NFC01A1 expansion board.
   ******************************************************************************
+  * @attention
   *
-  * COPYRIGHT(c) 2015 STMicroelectronics
+  * <h2><center>&copy; 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:
@@ -43,28 +45,28 @@
 #include "m24sr/m24sr_class.h"
 
 /**
- * singleton class that controls all the electronics inside the X_NUCLEO_NFC01A1 expansion board
+ * Singleton class that controls all the electronics inside the X_NUCLEO_NFC01A1 expansion board.
  */
 class X_NUCLEO_NFC01A1 {
 
 private:
 	/**
-	 * ponter to the singleton instance, NULL if we did't build one
+	 * Ponter to the singleton instance, NULL if not allocated.
 	 */
 	static X_NUCLEO_NFC01A1 *mInstance;
 	/**
-	 * i2c address of the m24sr chip
+	 * I2C address of the M24SR chip.
 	 */
 	static const uint8_t M24SR_ADDR;
 
 	/**
 	 * constructor
-	 * @param devI2C i2c channel used for communicate with the board
-	 * @param gpoName pin of the gpio pin of the M24SR chip
-	 * @param RFDisableName pin for disable the rf antenna
-	 * @param led1Name pin for control the led1 status
-	 * @param led2Name pin for control the led1 status
-	 * @param led3Name pin for control the led1 status
+	 * @param devI2C I2C channel used to communicate with the board.
+	 * @param gpoName Name of the gpio pin of the M24SR chip.
+	 * @param RFDisableName Pin that controls the rf antenna status.
+	 * @param led1Name Pin to control the led1 status.
+	 * @param led2Name Pin to control the led1 status.
+	 * @param led3Name Pin to control the led1 status.
 	 */
 	X_NUCLEO_NFC01A1(I2C &devI2C, const PinName &gpoName,
  			const PinName &RFDisableName, const PinName &led1Name,
@@ -73,22 +75,22 @@
 				mNfcLed1(led1Name),mNfcLed2(led2Name),mNfcLed3(led3Name){}
 
 public:
-	static const PinName DEFAULT_SDA_PIN; //!< default pin used for the M24SR SDA signal
-	static const PinName DEFAULT_SDL_PIN; //!< default pin used for the M24SR SDL signal
-	static const PinName DEFAULT_GPO_PIN; //!< default pin used for the M24SR GPO signal
-	static const PinName DEFAULT_RF_DISABLE_PIN; //!< default pin used for M24SR RF_DISABLE signal
-	static const PinName DEFAULT_LED1_PIN; //!< default pin for controll the led 1
-	static const PinName DEFAULT_LED2_PIN; //!< default pin for controll the led 2
-	static const PinName DEFAULT_LED3_PIN; //!< default pin for controll the led 3
+	static const PinName DEFAULT_SDA_PIN; //!< Default pin used for the M24SR SDA signal.
+	static const PinName DEFAULT_SDL_PIN; //!< Default pin used for the M24SR SDL signal.
+	static const PinName DEFAULT_GPO_PIN; //!< Default pin used for the M24SR GPO signal.
+	static const PinName DEFAULT_RF_DISABLE_PIN; //!< Default pin used for M24SR RF_DISABLE signal.
+	static const PinName DEFAULT_LED1_PIN; //!< Default pin to controll the led 1.
+	static const PinName DEFAULT_LED2_PIN; //!< Default pin to controll the led 2.
+	static const PinName DEFAULT_LED3_PIN; //!< Default pin to controll the led 3.
 
     /**
-	 * create or return an instance of X_NUCLEO_NFC01A1
-	 * @param devI2C i2c channel used for communicate with the board
-	 * @param gpoName pin of the gpio pin of the M24SR chip
-	 * @param RFDisableName pin for disable the rf antenna
-	 * @param led1Name pin for control the led1 status
-	 * @param led2Name pin for control the led1 status
-	 * @param led3Name pin for control the led1 status
+	 * Create or return an instance of X_NUCLEO_NFC01A1.
+	 * @param devI2C I2C channel used to communicate with the board.
+	 * @param gpoName Name of the gpio pin of the M24SR chip.
+	 * @param RFDisableName Pin that controls the rf antenna status.
+	 * @param led1Name Pin to control the led1 status.
+	 * @param led2Name Pin to control the led1 status.
+	 * @param led3Name Pin to control the led1 status.
 	 */
 	static X_NUCLEO_NFC01A1* Instance(I2C &devI2C,
 			const PinName &gpoName = DEFAULT_GPO_PIN,
@@ -98,28 +100,28 @@
  			const PinName &led3Name = DEFAULT_LED3_PIN);
 
 	/**
-	 * @return board led1
+	 * @return board led1.
 	 */
 	DigitalOut& getLed1() {
 		return mNfcLed1;
 	}
 
 	/**
-	 * @return board led2
+	 * @return board led2.
 	 */
 	DigitalOut& getLed2() {
 		return mNfcLed2;
 	}
 
 	/**
-	 * @return board led3
+	 * @return board led3.
 	 */
 	DigitalOut& getLed3() {
 		return mNfcLed3;
 	}
 
 	/**
-	 * @return NFC Chip
+	 * @return NFC Chip.
 	 */
 	M24SR& getM24SR() {
 		return mM24SR;