Example application for the STMicroelectronics X-NUCLEO-NFC05A1

Dependencies:   RFAL ST25R3911 BSP05

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers x_nucleo_nfc05.h Source File

x_nucleo_nfc05.h

00001 #ifndef _X_NUCLEO_NFC05_H_
00002 #define _X_NUCLEO_NFC05_H_
00003 
00004 #include "ST25R3911.h"
00005 #include "mbed.h"
00006 
00007 
00008 using namespace std;
00009 
00010 
00011 
00012 /* Class of the NFC05A1
00013  *
00014  * begin: It initializes the device in order to start the communication with it
00015  * writeURI: Method that implements the write of an URI through I2C communication
00016  * readURI: Reading of an URI coming from an NFC tag
00017  * writeWiFi: Write the WiFi in the NFC tag
00018  * readWiFi: Read the WiFi coming from another device that writes on the NFC tag
00019  * ledON: It lights one of the three LED based on input PIN
00020  * ledOFF: It lights off one of the three LED based on input PIN
00021  *
00022  */
00023 class X_Nucleo_NFC05 {
00024     public:
00025     X_Nucleo_NFC05(SPI *spiChannel, DigitalOut *led_1);
00026     void begin(SPI *spiChannel);
00027     void ledOn(DigitalOut *led);
00028     void ledOff(DigitalOut *led);
00029     void spiInitMain(SPI_HandleTypeDef hspi1, SPI_InitTypeDef Init);
00030     private:
00031     DigitalOut *mled_1;
00032     DigitalOut *mled_2;
00033     DigitalOut *mled_3;
00034     SPI *mspiChannel;
00035     SPI_HandleTypeDef hspi1;
00036 };
00037 
00038 //do we need it
00039 extern X_Nucleo_NFC05 X_Nucleo_Nfc05;
00040 
00041 #endif