mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.

Dependents:   HelloWorld_IKA01A1

Fork of X_NUCLEO_IKA01A1 by ST Expansion SW Team

Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.

Committer:
hemddabral
Date:
Wed Mar 02 12:58:02 2016 +0000
Revision:
2:19d1dcef0c0e
First draft version using STM32COO utility

Who changed what in which revision?

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