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:
Thu Jan 14 07:54:59 2016 +0000
Revision:
9:9f2e2e68d695
Parent:
0:969a2be49f41
update documentation 3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
giovannivisentini 9:9f2e2e68d695 1 /**
giovannivisentini 9:9f2e2e68d695 2 ******************************************************************************
giovannivisentini 9:9f2e2e68d695 3 * @file component.h
giovannivisentini 9:9f2e2e68d695 4 * @author AST
giovannivisentini 9:9f2e2e68d695 5 * @version V1.0.0
giovannivisentini 9:9f2e2e68d695 6 * @date 1 April 2015
giovannivisentini 9:9f2e2e68d695 7 * @brief Header file containing generic component definitions
giovannivisentini 9:9f2e2e68d695 8 * and I/O functions.
giovannivisentini 9:9f2e2e68d695 9 ******************************************************************************
giovannivisentini 9:9f2e2e68d695 10 * @attention
giovannivisentini 9:9f2e2e68d695 11 *
giovannivisentini 9:9f2e2e68d695 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
giovannivisentini 9:9f2e2e68d695 13 *
giovannivisentini 9:9f2e2e68d695 14 * Redistribution and use in source and binary forms, with or without modification,
giovannivisentini 9:9f2e2e68d695 15 * are permitted provided that the following conditions are met:
giovannivisentini 9:9f2e2e68d695 16 * 1. Redistributions of source code must retain the above copyright notice,
giovannivisentini 9:9f2e2e68d695 17 * this list of conditions and the following disclaimer.
giovannivisentini 9:9f2e2e68d695 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
giovannivisentini 9:9f2e2e68d695 19 * this list of conditions and the following disclaimer in the documentation
giovannivisentini 9:9f2e2e68d695 20 * and/or other materials provided with the distribution.
giovannivisentini 9:9f2e2e68d695 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
giovannivisentini 9:9f2e2e68d695 22 * may be used to endorse or promote products derived from this software
giovannivisentini 9:9f2e2e68d695 23 * without specific prior written permission.
giovannivisentini 9:9f2e2e68d695 24 *
giovannivisentini 9:9f2e2e68d695 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
giovannivisentini 9:9f2e2e68d695 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
giovannivisentini 9:9f2e2e68d695 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
giovannivisentini 9:9f2e2e68d695 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
giovannivisentini 9:9f2e2e68d695 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
giovannivisentini 9:9f2e2e68d695 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
giovannivisentini 9:9f2e2e68d695 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
giovannivisentini 9:9f2e2e68d695 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
giovannivisentini 9:9f2e2e68d695 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
giovannivisentini 9:9f2e2e68d695 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
giovannivisentini 9:9f2e2e68d695 35 *
giovannivisentini 9:9f2e2e68d695 36 ******************************************************************************
giovannivisentini 9:9f2e2e68d695 37 */
giovannivisentini 9:9f2e2e68d695 38
giovannivisentini 9:9f2e2e68d695 39
giovannivisentini 9:9f2e2e68d695 40 /* Prevent recursive inclusion -----------------------------------------------*/
giovannivisentini 9:9f2e2e68d695 41
giovannivisentini 9:9f2e2e68d695 42 #ifndef __COMPONENT_H__
giovannivisentini 9:9f2e2e68d695 43 #define __COMPONENT_H__
giovannivisentini 9:9f2e2e68d695 44
giovannivisentini 9:9f2e2e68d695 45
giovannivisentini 9:9f2e2e68d695 46 /* Types ---------------------------------------------------------------------*/
giovannivisentini 9:9f2e2e68d695 47
giovannivisentini 9:9f2e2e68d695 48 /**
giovannivisentini 9:9f2e2e68d695 49 * @brief Component's Context structure definition.
giovannivisentini 9:9f2e2e68d695 50 */
giovannivisentini 9:9f2e2e68d695 51 typedef struct
giovannivisentini 9:9f2e2e68d695 52 {
giovannivisentini 9:9f2e2e68d695 53 /* Identity. */
giovannivisentini 9:9f2e2e68d695 54 uint8_t who_am_i;
giovannivisentini 9:9f2e2e68d695 55
giovannivisentini 9:9f2e2e68d695 56 /* ACTION ----------------------------------------------------------------*/
giovannivisentini 9:9f2e2e68d695 57 /* There should be only a unique identifier for each component, which */
giovannivisentini 9:9f2e2e68d695 58 /* should be the "who_am_i" parameter, hence this parameter is optional. */
giovannivisentini 9:9f2e2e68d695 59 /* -----------------------------------------------------------------------*/
giovannivisentini 9:9f2e2e68d695 60 /* Type. */
giovannivisentini 9:9f2e2e68d695 61 uint8_t type;
giovannivisentini 9:9f2e2e68d695 62
giovannivisentini 9:9f2e2e68d695 63 /* Configuration. */
giovannivisentini 9:9f2e2e68d695 64 uint8_t address;
giovannivisentini 9:9f2e2e68d695 65
giovannivisentini 9:9f2e2e68d695 66 /* Pointer to the Data. */
giovannivisentini 9:9f2e2e68d695 67 void *pData;
giovannivisentini 9:9f2e2e68d695 68
giovannivisentini 9:9f2e2e68d695 69 /* Pointer to the Virtual Table. */
giovannivisentini 9:9f2e2e68d695 70 void *pVTable;
giovannivisentini 9:9f2e2e68d695 71
giovannivisentini 9:9f2e2e68d695 72 /* ACTION ----------------------------------------------------------------*/
giovannivisentini 9:9f2e2e68d695 73 /* There should be only a unique virtual table for each component, which */
giovannivisentini 9:9f2e2e68d695 74 /* should be the "pVTable" parameter, hence this parameter is optional. */
giovannivisentini 9:9f2e2e68d695 75 /* -----------------------------------------------------------------------*/
giovannivisentini 9:9f2e2e68d695 76 /* Pointer to the Extended Virtual Table. */
giovannivisentini 9:9f2e2e68d695 77 void *pExtVTable;
giovannivisentini 9:9f2e2e68d695 78 } DrvContextTypeDef;
giovannivisentini 9:9f2e2e68d695 79
giovannivisentini 9:9f2e2e68d695 80 /**
giovannivisentini 9:9f2e2e68d695 81 * @brief Component's Status enumerator definition.
giovannivisentini 9:9f2e2e68d695 82 */
giovannivisentini 9:9f2e2e68d695 83 typedef enum
giovannivisentini 9:9f2e2e68d695 84 {
giovannivisentini 9:9f2e2e68d695 85 COMPONENT_OK = 0,
giovannivisentini 9:9f2e2e68d695 86 COMPONENT_ERROR,
giovannivisentini 9:9f2e2e68d695 87 COMPONENT_TIMEOUT,
giovannivisentini 9:9f2e2e68d695 88 COMPONENT_NOT_IMPLEMENTED
giovannivisentini 9:9f2e2e68d695 89 } DrvStatusTypeDef;
giovannivisentini 9:9f2e2e68d695 90
giovannivisentini 0:969a2be49f41 91 #endif