Example application for the STMicroelectronics X-NUCLEO-NFC05A1

Dependencies:   RFAL ST25R3911 BSP05

X-NUCLEO-NFC05A1 NFC Card Reader Expansion Board Firmware Package

Introduction

This firmware package includes Components Device Drivers, Board Support Package and example applications for STMicroelectronics X-NUCLEO-NFC05A1 NFC Card Reader Expansion Board based on the ST25R3911B.

Example Application

This program gives the user the possibility to read the URI information written on the expansion board. The LEDs will blink for few seconds to indicate that the board is initializing. As soon as it finishes, the device is ready to communicate with external NFC devices. LED6 will blink until an NFC device is close to it and ready to read the URI value.

Tested Platforms

This firmware has been tested on STM32 NUCLEO-F401RE

Committer:
DiegoOstuni
Date:
Thu Nov 14 14:57:00 2019 +0000
Revision:
3:9a152c93d7a2
Parent:
1:86504e1ac6b1
Example application for the STMicroelectronics X-NUCLEO-NFC05A1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DiegoOstuni 1:86504e1ac6b1 1 #ifndef _X_NUCLEO_NFC05_H_
DiegoOstuni 1:86504e1ac6b1 2 #define _X_NUCLEO_NFC05_H_
DiegoOstuni 1:86504e1ac6b1 3
DiegoOstuni 1:86504e1ac6b1 4 #include "ST25R3911.h"
DiegoOstuni 1:86504e1ac6b1 5 #include "mbed.h"
DiegoOstuni 1:86504e1ac6b1 6
DiegoOstuni 1:86504e1ac6b1 7
DiegoOstuni 1:86504e1ac6b1 8 using namespace std;
DiegoOstuni 1:86504e1ac6b1 9
DiegoOstuni 1:86504e1ac6b1 10
DiegoOstuni 1:86504e1ac6b1 11
DiegoOstuni 1:86504e1ac6b1 12 /* Class of the NFC05A1
DiegoOstuni 1:86504e1ac6b1 13 *
DiegoOstuni 1:86504e1ac6b1 14 * begin: It initializes the device in order to start the communication with it
DiegoOstuni 1:86504e1ac6b1 15 * writeURI: Method that implements the write of an URI through I2C communication
DiegoOstuni 1:86504e1ac6b1 16 * readURI: Reading of an URI coming from an NFC tag
DiegoOstuni 1:86504e1ac6b1 17 * writeWiFi: Write the WiFi in the NFC tag
DiegoOstuni 1:86504e1ac6b1 18 * readWiFi: Read the WiFi coming from another device that writes on the NFC tag
DiegoOstuni 1:86504e1ac6b1 19 * ledON: It lights one of the three LED based on input PIN
DiegoOstuni 1:86504e1ac6b1 20 * ledOFF: It lights off one of the three LED based on input PIN
DiegoOstuni 1:86504e1ac6b1 21 *
DiegoOstuni 1:86504e1ac6b1 22 */
DiegoOstuni 1:86504e1ac6b1 23 class X_Nucleo_NFC05 {
DiegoOstuni 1:86504e1ac6b1 24 public:
DiegoOstuni 1:86504e1ac6b1 25 X_Nucleo_NFC05(SPI *spiChannel, DigitalOut *led_1);
DiegoOstuni 1:86504e1ac6b1 26 void begin(SPI *spiChannel);
DiegoOstuni 1:86504e1ac6b1 27 void ledOn(DigitalOut *led);
DiegoOstuni 1:86504e1ac6b1 28 void ledOff(DigitalOut *led);
DiegoOstuni 1:86504e1ac6b1 29 void spiInitMain(SPI_HandleTypeDef hspi1, SPI_InitTypeDef Init);
DiegoOstuni 1:86504e1ac6b1 30 private:
DiegoOstuni 1:86504e1ac6b1 31 DigitalOut *mled_1;
DiegoOstuni 1:86504e1ac6b1 32 DigitalOut *mled_2;
DiegoOstuni 1:86504e1ac6b1 33 DigitalOut *mled_3;
DiegoOstuni 1:86504e1ac6b1 34 SPI *mspiChannel;
DiegoOstuni 1:86504e1ac6b1 35 SPI_HandleTypeDef hspi1;
DiegoOstuni 1:86504e1ac6b1 36 };
DiegoOstuni 1:86504e1ac6b1 37
DiegoOstuni 1:86504e1ac6b1 38 //do we need it
DiegoOstuni 1:86504e1ac6b1 39 extern X_Nucleo_NFC05 X_Nucleo_Nfc05;
DiegoOstuni 1:86504e1ac6b1 40
DiegoOstuni 1:86504e1ac6b1 41 #endif