mbed OS 5 example application using X-NUCLEO-NFC02A1

Dependencies:   NDefLib X_NUCLEO_NFC02A1

Fork of HelloWorld_NFC02A1 by ST

Committer:
rosarium
Date:
Tue Aug 30 09:18:50 2016 +0000
Revision:
1:11ae12d41082
NDefLib middle-ware library ported on HelloWorld_NFC02A1. Now NFC02A1 using the same middle-ware library as NFC01A1.

Who changed what in which revision?

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