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 ST Expansion SW Team

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

Committer:
giovannivisentini
Date:
Mon Jan 11 13:06:23 2016 +0000
Revision:
8:5e637c71cbb3
Parent:
0:969a2be49f41
update comments 2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
giovannivisentini 0:969a2be49f41 1 /**
giovannivisentini 0:969a2be49f41 2 ******************************************************************************
giovannivisentini 0:969a2be49f41 3 * @file Component_class.h
giovannivisentini 0:969a2be49f41 4 * @author AST / EST
giovannivisentini 0:969a2be49f41 5 * @version V0.0.1
giovannivisentini 0:969a2be49f41 6 * @date 13-April-2015
giovannivisentini 0:969a2be49f41 7 * @brief This file contains the abstract class describing the interface of a
giovannivisentini 0:969a2be49f41 8 * generic component.
giovannivisentini 0:969a2be49f41 9 ******************************************************************************
giovannivisentini 0:969a2be49f41 10 * @attention
giovannivisentini 0:969a2be49f41 11 *
giovannivisentini 0:969a2be49f41 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
giovannivisentini 0:969a2be49f41 13 *
giovannivisentini 0:969a2be49f41 14 * Redistribution and use in source and binary forms, with or without modification,
giovannivisentini 0:969a2be49f41 15 * are permitted provided that the following conditions are met:
giovannivisentini 0:969a2be49f41 16 * 1. Redistributions of source code must retain the above copyright notice,
giovannivisentini 0:969a2be49f41 17 * this list of conditions and the following disclaimer.
giovannivisentini 0:969a2be49f41 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
giovannivisentini 0:969a2be49f41 19 * this list of conditions and the following disclaimer in the documentation
giovannivisentini 0:969a2be49f41 20 * and/or other materials provided with the distribution.
giovannivisentini 0:969a2be49f41 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
giovannivisentini 0:969a2be49f41 22 * may be used to endorse or promote products derived from this software
giovannivisentini 0:969a2be49f41 23 * without specific prior written permission.
giovannivisentini 0:969a2be49f41 24 *
giovannivisentini 0:969a2be49f41 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
giovannivisentini 0:969a2be49f41 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
giovannivisentini 0:969a2be49f41 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
giovannivisentini 0:969a2be49f41 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
giovannivisentini 0:969a2be49f41 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
giovannivisentini 0:969a2be49f41 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
giovannivisentini 0:969a2be49f41 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
giovannivisentini 0:969a2be49f41 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
giovannivisentini 0:969a2be49f41 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
giovannivisentini 0:969a2be49f41 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
giovannivisentini 0:969a2be49f41 35 *
giovannivisentini 0:969a2be49f41 36 ******************************************************************************
giovannivisentini 0:969a2be49f41 37 */
giovannivisentini 0:969a2be49f41 38
giovannivisentini 0:969a2be49f41 39
giovannivisentini 0:969a2be49f41 40 /* Define to prevent from recursive inclusion --------------------------------*/
giovannivisentini 0:969a2be49f41 41
giovannivisentini 0:969a2be49f41 42 #ifndef __COMPONENT_CLASS_H
giovannivisentini 0:969a2be49f41 43 #define __COMPONENT_CLASS_H
giovannivisentini 0:969a2be49f41 44
giovannivisentini 0:969a2be49f41 45
giovannivisentini 0:969a2be49f41 46 /* Includes ------------------------------------------------------------------*/
giovannivisentini 0:969a2be49f41 47
giovannivisentini 0:969a2be49f41 48 #include <stdint.h>
giovannivisentini 0:969a2be49f41 49
giovannivisentini 0:969a2be49f41 50
giovannivisentini 0:969a2be49f41 51 /* Classes ------------------------------------------------------------------*/
giovannivisentini 0:969a2be49f41 52
giovannivisentini 0:969a2be49f41 53 /** An abstract class for Generic components.
giovannivisentini 0:969a2be49f41 54 */
giovannivisentini 0:969a2be49f41 55 class Component
giovannivisentini 0:969a2be49f41 56 {
giovannivisentini 0:969a2be49f41 57 public:
giovannivisentini 8:5e637c71cbb3 58 /**
giovannivisentini 8:5e637c71cbb3 59 * @brief Initializing the component.
giovannivisentini 8:5e637c71cbb3 60 * @param init pointer to device specific initalization structure.
giovannivisentini 8:5e637c71cbb3 61 * @retval "0" in case of success, an error code otherwise.
giovannivisentini 8:5e637c71cbb3 62 */
giovannivisentini 8:5e637c71cbb3 63 virtual int Init(void *init) = 0;
giovannivisentini 0:969a2be49f41 64
giovannivisentini 8:5e637c71cbb3 65 /**
giovannivisentini 8:5e637c71cbb3 66 * @brief Getting the ID of the component.
giovannivisentini 8:5e637c71cbb3 67 * @param[out] id pointer to an allocated variable to store the ID into.
giovannivisentini 8:5e637c71cbb3 68 * @retval "0" in case of success, an error code otherwise.
giovannivisentini 8:5e637c71cbb3 69 */
giovannivisentini 8:5e637c71cbb3 70 virtual int ReadID(uint8_t *id) = 0;
giovannivisentini 0:969a2be49f41 71 };
giovannivisentini 0:969a2be49f41 72
giovannivisentini 0:969a2be49f41 73 #endif /* __COMPONENT_CLASS_H */
giovannivisentini 0:969a2be49f41 74
giovannivisentini 0:969a2be49f41 75 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/