This application provides a set of demos with X-NUCLEO-NFC01A1 expansion board.
Dependencies: NDefLib X_NUCLEO_NFC01A1 mbed
Fork of X-MBED-NFC1 by
This application provides a set of demos with X-NUCLEO-NFC01A1 expansion board.
The available demos are:
- SAMPLE_WRITE_URL: write a tag with the ST home page URL
- SAMPLE_COUNT_CLICK: create a custom tag to count and report the user button clicks.
- SAMPLE_WRITE_AND_CHANGE_ALL: write a tag with all the supported records and update the tag contents when the user button is pressed.
- SAMPLE_LOCK_TAG_CONTENT: use the M24SR component API to set the NFC tag as read-only.
To enable the different demos comment/uncomment the SAMPLE_* macros provided in main.cpp .
Diff: Interfaces/Nfc_class.h
- Revision:
- 0:674813bd5ec9
- Child:
- 1:6d202b62ed68
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Interfaces/Nfc_class.h Thu Nov 19 08:50:18 2015 +0000
@@ -0,0 +1,108 @@
+/**
+ ******************************************************************************
+ * @file Nfc_class.h
+ * @author AST / EST
+ * @version V0.0.1
+ * @date 13-April-2015
+ * @brief This file contains the abstract class describing the interface of a
+ * nfc component.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>© 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.
+ *
+ ******************************************************************************
+ */
+
+
+/* Generated with Stm32CubeTOO -----------------------------------------------*/
+
+
+/* Revision ------------------------------------------------------------------*/
+/*
+ Repository: http://svn.x-nucleodev.codex.cro.st.com/svnroot/X-NucleoDev
+ Branch/Trunk/Tag: trunk
+ Based on: X-CUBE-MEMS1/trunk/Drivers/BSP/Components/Common/nfc.h
+ Revision: 385
+*/
+
+
+/* Define to prevent from recursive inclusion --------------------------------*/
+
+#ifndef __NFC_CLASS_H
+#define __NFC_CLASS_H
+
+
+/* Includes ------------------------------------------------------------------*/
+
+#include "Component_class.h"
+
+
+/* Classes ------------------------------------------------------------------*/
+
+/** An abstract class for Nfc components.
+ */
+class Nfc : public Component
+{
+public:
+ /* ACTION 1 --------------------------------------------------------------*
+ * Declare here the interface's methods. *
+ * They should be: *
+ * + Methods with the same name of the C component's virtual table *
+ * (and extended virtual table, if any)'s functions, provided that *
+ * the component's driver implements them (i.e.: the corresponding *
+ * pointer to function is not "0"). *
+ * *
+ * Example: *
+ * virtual int GetValue(float *pfData) = 0; *
+ *------------------------------------------------------------------------*/
+ virtual NFC_StatusTypeDef GetSession(void) = 0;
+ virtual NFC_StatusTypeDef KillSession(void) = 0;
+ virtual NFC_StatusTypeDef Deselect(void) = 0;
+ virtual NFC_StatusTypeDef SelectApplication(void) = 0;
+ virtual NFC_StatusTypeDef SelectCCfile(void) = 0;
+ virtual NFC_StatusTypeDef SelectNDEFfile(uint16_t NDEFfileId) = 0;
+ virtual NFC_StatusTypeDef SelectSystemfile(void) = 0;
+ virtual NFC_StatusTypeDef ReadBinary(uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) = 0;
+ virtual NFC_StatusTypeDef UpdateBinary(uint16_t Offset, uint8_t NbByteToWrite, uint8_t *pDataToWrite) = 0;
+ virtual NFC_StatusTypeDef Verify(uint16_t uPwdId, uint8_t NbPwdByte, uint8_t *pPwd) = 0;
+ virtual NFC_StatusTypeDef ChangeReferenceData(uint16_t uPwdId, uint8_t *pPwd) = 0;
+ virtual NFC_StatusTypeDef EnableVerificationRequirement(uint16_t uReadOrWrite) = 0;
+ virtual NFC_StatusTypeDef DisableVerificationRequirement(uint16_t uReadOrWrite) = 0;
+ virtual NFC_StatusTypeDef STReadBinary(uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead) = 0;
+ virtual NFC_StatusTypeDef EnablePermanentState(uint16_t uReadOrWrite) = 0;
+ virtual NFC_StatusTypeDef DisablePermanentState(uint16_t uReadOrWrite) = 0;
+ virtual NFC_StatusTypeDef StateControl(uint8_t uSetOrReset) = 0;
+ virtual NFC_StatusTypeDef ManageI2CGPO(uint8_t GPO_I2Cconfig) = 0;
+ virtual NFC_StatusTypeDef ManageRFGPO(uint8_t GPO_RFconfig) = 0;
+ virtual NFC_StatusTypeDef RFConfig(uint8_t OnOffChoice) = 0;
+
+ virtual ~Nfc(){};
+};
+
+#endif /* __NFC_CLASS_H */
+
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
+
