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
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
Diff: X_NUCLEO_NFC01A1.h
- Revision:
- 7:19fc04b8fec6
- Parent:
- 6:96389fb79676
- Child:
- 9:9f2e2e68d695
--- a/X_NUCLEO_NFC01A1.h Tue Dec 22 15:34:24 2015 +0000
+++ b/X_NUCLEO_NFC01A1.h Mon Jan 11 12:37:28 2016 +0000
@@ -73,14 +73,23 @@
mNfcLed1(led1Name),mNfcLed2(led2Name),mNfcLed3(led3Name){}
public:
- static const PinName DEFAULT_SDA_PIN;
- static const PinName DEFAULT_SDL_PIN;
- static const PinName DEFAULT_GPO_PIN;
- static const PinName DEFAULT_RF_DISABLE_PIN;
- static const PinName DEFAULT_LED1_PIN;
- static const PinName DEFAULT_LED2_PIN;
- static const PinName DEFAULT_LED3_PIN;
+ 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
+ /**
+ * 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
+ */
static X_NUCLEO_NFC01A1* Instance(I2C &devI2C,
const PinName &gpoName = DEFAULT_GPO_PIN,
const PinName &RFDisableName = DEFAULT_RF_DISABLE_PIN,

X-NUCLEO-NFC01A1 Dynamic NFC Tag