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 Apr 13 06:21:46 2016 +0000
Revision:
21:8d0624950dd1
Parent:
18:25dbc718084c
updated TSZ124 class, and simplified method names in WindComp and PhotoSensor configurations.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hemddabral 16:2f9443aedbe8 1 /**
hemddabral 16:2f9443aedbe8 2 ******************************************************************************
hemddabral 16:2f9443aedbe8 3 * @file PHOTO_SENSOR_class.h
hemddabral 16:2f9443aedbe8 4 * @author AST
hemddabral 16:2f9443aedbe8 5 * @version V1.0.0
hemddabral 16:2f9443aedbe8 6 * @date April 13th, 2015
hemddabral 16:2f9443aedbe8 7 * @brief This file contains the abstract class describing the interface of a
hemddabral 16:2f9443aedbe8 8 * PHOTO_SENSOR component.
hemddabral 16:2f9443aedbe8 9 ******************************************************************************
hemddabral 16:2f9443aedbe8 10 * @attention
hemddabral 16:2f9443aedbe8 11 *
hemddabral 16:2f9443aedbe8 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
hemddabral 16:2f9443aedbe8 13 *
hemddabral 16:2f9443aedbe8 14 * Redistribution and use in source and binary forms, with or without modification,
hemddabral 16:2f9443aedbe8 15 * are permitted provided that the following conditions are met:
hemddabral 16:2f9443aedbe8 16 * 1. Redistributions of source code must retain the above copyright notice,
hemddabral 16:2f9443aedbe8 17 * this list of conditions and the following disclaimer.
hemddabral 16:2f9443aedbe8 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
hemddabral 16:2f9443aedbe8 19 * this list of conditions and the following disclaimer in the documentation
hemddabral 16:2f9443aedbe8 20 * and/or other materials provided with the distribution.
hemddabral 16:2f9443aedbe8 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
hemddabral 16:2f9443aedbe8 22 * may be used to endorse or promote products derived from this software
hemddabral 16:2f9443aedbe8 23 * without specific prior written permission.
hemddabral 16:2f9443aedbe8 24 *
hemddabral 16:2f9443aedbe8 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
hemddabral 16:2f9443aedbe8 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
hemddabral 16:2f9443aedbe8 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
hemddabral 16:2f9443aedbe8 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
hemddabral 16:2f9443aedbe8 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
hemddabral 16:2f9443aedbe8 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
hemddabral 16:2f9443aedbe8 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
hemddabral 16:2f9443aedbe8 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
hemddabral 16:2f9443aedbe8 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
hemddabral 16:2f9443aedbe8 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hemddabral 16:2f9443aedbe8 35 *
hemddabral 16:2f9443aedbe8 36 ******************************************************************************
hemddabral 16:2f9443aedbe8 37 */
hemddabral 16:2f9443aedbe8 38
hemddabral 16:2f9443aedbe8 39
hemddabral 16:2f9443aedbe8 40 /* Generated with STM32CubeTOO -----------------------------------------------*/
hemddabral 16:2f9443aedbe8 41
hemddabral 16:2f9443aedbe8 42
hemddabral 16:2f9443aedbe8 43 /* Revision ------------------------------------------------------------------*/
hemddabral 16:2f9443aedbe8 44 /*
hemddabral 16:2f9443aedbe8 45 Repository: http://svn.x-nucleodev.codex.cro.st.com/svnroot/X-NucleoDev
hemddabral 16:2f9443aedbe8 46 Branch/Trunk/Tag: trunk
hemddabral 16:2f9443aedbe8 47 Based on: X-CUBE-IKA01A1/trunk/Drivers/BSP/Components/Common/PHOTO_SENSOR.h
hemddabral 16:2f9443aedbe8 48 Revision: 385
hemddabral 16:2f9443aedbe8 49 */
hemddabral 16:2f9443aedbe8 50
hemddabral 16:2f9443aedbe8 51
hemddabral 16:2f9443aedbe8 52 /* Define to prevent recursive inclusion -------------------------------------*/
hemddabral 16:2f9443aedbe8 53
hemddabral 16:2f9443aedbe8 54 #ifndef __PHOTO_SENSOR_CLASS_H
hemddabral 16:2f9443aedbe8 55 #define __PHOTO_SENSOR_CLASS_H
hemddabral 16:2f9443aedbe8 56
hemddabral 16:2f9443aedbe8 57
hemddabral 16:2f9443aedbe8 58 /* Includes ------------------------------------------------------------------*/
hemddabral 16:2f9443aedbe8 59
hemddabral 16:2f9443aedbe8 60 #include <Component_class.h>
hemddabral 16:2f9443aedbe8 61
hemddabral 16:2f9443aedbe8 62
hemddabral 16:2f9443aedbe8 63 /* Classes ------------------------------------------------------------------*/
hemddabral 16:2f9443aedbe8 64
hemddabral 16:2f9443aedbe8 65 /** An abstract class for photo sensor components.
hemddabral 16:2f9443aedbe8 66 */
hemddabral 16:2f9443aedbe8 67 class PhotoSensor : public Component
hemddabral 16:2f9443aedbe8 68 {
hemddabral 16:2f9443aedbe8 69 public:
hemddabral 16:2f9443aedbe8 70 /* ACTION 1 --------------------------------------------------------------*
hemddabral 16:2f9443aedbe8 71 * Declare here the interface's methods. *
hemddabral 16:2f9443aedbe8 72 * They should be: *
hemddabral 16:2f9443aedbe8 73 * + Methods with the same name of the C component's virtual table *
hemddabral 16:2f9443aedbe8 74 * (and extended virtual table, if any)'s functions, provided that *
hemddabral 16:2f9443aedbe8 75 * the component's driver implements them (i.e.: the corresponding *
hemddabral 16:2f9443aedbe8 76 * pointer to function is not "0"). *
hemddabral 16:2f9443aedbe8 77 * *
hemddabral 16:2f9443aedbe8 78 * Example: *
hemddabral 16:2f9443aedbe8 79 * virtual int GetValue(float *f) = 0; *
hemddabral 16:2f9443aedbe8 80 *------------------------------------------------------------------------*/
hemddabral 18:25dbc718084c 81
hemddabral 18:25dbc718084c 82 /**
hemddabral 18:25dbc718084c 83 * @brief abstract method for obtaining the output voltage detected by photo sensor
hemddabral 18:25dbc718084c 84 * @param pin AnalogIn pin to use for detecting the voltage
hemddabral 18:25dbc718084c 85 * @retval voltage detected by photo sensor
hemddabral 18:25dbc718084c 86 */
hemddabral 21:8d0624950dd1 87 virtual unsigned int GetVoltage(void) = 0;
hemddabral 16:2f9443aedbe8 88 };
hemddabral 16:2f9443aedbe8 89
hemddabral 16:2f9443aedbe8 90 #endif /* __PHOTO_SENSOR_CLASS_H */
hemddabral 16:2f9443aedbe8 91
hemddabral 16:2f9443aedbe8 92 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/