mbed OS 5 example application using X-NUCLEO-NFC02A1

Dependencies:   NDefLib X_NUCLEO_NFC02A1

Fork of HelloWorld_NFC02A1 by ST

Revision:
1:11ae12d41082
Parent:
0:892175366555
--- a/X_NUCLEO_NFC02A1/m24lr/m24lr.cpp	Wed Jul 27 09:25:33 2016 +0000
+++ b/X_NUCLEO_NFC02A1/m24lr/m24lr.cpp	Tue Aug 30 09:18:50 2016 +0000
@@ -1,3 +1,42 @@
+/**
+  ******************************************************************************
+  * @file       m24lr.cpp
+  * @author     AMG Central Lab
+  * @version    V1.0.0
+  * @date       30 Aug 2016
+  * @brief      M24LR driver file.
+  ******************************************************************************
+  * @attention
+  *
+  * <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:
+  *   1. Redistributions of source code must retain the above copyright notice,
+  *      this list of conditions and the following disclaimer.
+  *   2. Redistributions in binary form must reproduce the above copyright notice,
+  *      this list of conditions and the following disclaimer in the documentation
+  *      and/or other materials provided with the distribution.
+  *   3. Neither the name of STMicroelectronics nor the names of its contributors
+  *      may be used to endorse or promote products derived from this software
+  *      without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  *
+  ******************************************************************************
+  */
+
+
+
 #include "m24lr.h"
 
 uint8_t M24LR::NfctagInitialized = 0; 
@@ -31,13 +70,13 @@
   {
     
     /* M24LR Init */
-    if( i2c_Init() != NFCTAG_OK )
+   if( i2c_Init() != NFCTAG_OK )
     {
       return NFCTAG_ERROR;
     }
     
     /* Check M24LR driver ID */
-    i2c_ReadID(&nfctag_id);
+   i2c_ReadID(&nfctag_id);
     if( (nfctag_id == I_AM_M24LR04) || (nfctag_id == I_AM_M24LR16) || (nfctag_id == I_AM_M24LR64) )
     {
       NfctagInitialized = 1;