mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.
Dependents: HelloWorld_IKA01A1
Fork of X_NUCLEO_IKA01A1 by
Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.
Components/Interfaces/InstrumentationAmp.h@22:ff8d071bf79e, 2017-05-09 (annotated)
- Committer:
- Davidroid
- Date:
- Tue May 09 11:49:16 2017 +0000
- Revision:
- 22:ff8d071bf79e
- Parent:
- Components/Interfaces/Instrumentation_amp_class.h@18:25dbc718084c
Aligned to ARM mbed coding style.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hemddabral | 2:19d1dcef0c0e | 1 | /** |
hemddabral | 2:19d1dcef0c0e | 2 | ****************************************************************************** |
Davidroid | 22:ff8d071bf79e | 3 | * @file InstrumentationAmp.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 | * instrumentation_amp component. |
hemddabral | 2:19d1dcef0c0e | 9 | ****************************************************************************** |
hemddabral | 2:19d1dcef0c0e | 10 | * @attention |
hemddabral | 2:19d1dcef0c0e | 11 | * |
hemddabral | 2:19d1dcef0c0e | 12 | * <h2><center>© 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 | 18:25dbc718084c | 37 | */ |
hemddabral | 18:25dbc718084c | 38 | |
hemddabral | 18:25dbc718084c | 39 | |
hemddabral | 2:19d1dcef0c0e | 40 | /* Generated with STM32CubeTOO -----------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 41 | |
hemddabral | 2:19d1dcef0c0e | 42 | |
hemddabral | 2:19d1dcef0c0e | 43 | /* Revision ------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 44 | /* |
hemddabral | 2:19d1dcef0c0e | 45 | Repository: http://svn.x-nucleodev.codex.cro.st.com/svnroot/X-NucleoDev |
hemddabral | 2:19d1dcef0c0e | 46 | Branch/Trunk/Tag: trunk |
hemddabral | 2:19d1dcef0c0e | 47 | Based on: X-CUBE-IKA01A1/trunk/Drivers/BSP/Components/Common/instrumentation_amp.h |
hemddabral | 2:19d1dcef0c0e | 48 | Revision: 385 |
hemddabral | 2:19d1dcef0c0e | 49 | */ |
hemddabral | 2:19d1dcef0c0e | 50 | |
hemddabral | 2:19d1dcef0c0e | 51 | |
hemddabral | 2:19d1dcef0c0e | 52 | /* Define to prevent recursive inclusion -------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 53 | |
hemddabral | 2:19d1dcef0c0e | 54 | #ifndef __INSTRUMENTATION_AMP_CLASS_H |
hemddabral | 2:19d1dcef0c0e | 55 | #define __INSTRUMENTATION_AMP_CLASS_H |
hemddabral | 2:19d1dcef0c0e | 56 | |
hemddabral | 2:19d1dcef0c0e | 57 | |
hemddabral | 2:19d1dcef0c0e | 58 | /* Includes ------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 59 | |
Davidroid | 22:ff8d071bf79e | 60 | #include <Component.h> |
hemddabral | 2:19d1dcef0c0e | 61 | |
hemddabral | 2:19d1dcef0c0e | 62 | |
hemddabral | 2:19d1dcef0c0e | 63 | /* Classes ------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 64 | |
Davidroid | 22:ff8d071bf79e | 65 | /** An abstract class for InstrumentationAmp components. |
hemddabral | 2:19d1dcef0c0e | 66 | */ |
Davidroid | 22:ff8d071bf79e | 67 | class InstrumentationAmp : public Component |
hemddabral | 2:19d1dcef0c0e | 68 | { |
hemddabral | 2:19d1dcef0c0e | 69 | public: |
hemddabral | 2:19d1dcef0c0e | 70 | /* ACTION 1 --------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 71 | * Declare here the interface's methods. * |
hemddabral | 2:19d1dcef0c0e | 72 | * They should be: * |
hemddabral | 2:19d1dcef0c0e | 73 | * + Methods with the same name of the C component's virtual table * |
hemddabral | 2:19d1dcef0c0e | 74 | * (and extended virtual table, if any)'s functions, provided that * |
hemddabral | 2:19d1dcef0c0e | 75 | * the component's driver implements them (i.e.: the corresponding * |
hemddabral | 2:19d1dcef0c0e | 76 | * pointer to function is not "0"). * |
hemddabral | 2:19d1dcef0c0e | 77 | * * |
hemddabral | 2:19d1dcef0c0e | 78 | * Example: * |
Davidroid | 22:ff8d071bf79e | 79 | * virtual int get_value(float *f) = 0; * |
hemddabral | 18:25dbc718084c | 80 | *------------------------------------------------------------------------*/ |
hemddabral | 18:25dbc718084c | 81 | |
hemddabral | 18:25dbc718084c | 82 | /** |
hemddabral | 18:25dbc718084c | 83 | * @brief abstract method to obtain the amplified differential voltage in instrumentation Amplifier configuration |
hemddabral | 18:25dbc718084c | 84 | * @retval amplified differential voltage in instrumentation Amplifier configuration |
hemddabral | 18:25dbc718084c | 85 | */ |
Davidroid | 22:ff8d071bf79e | 86 | virtual unsigned int get_voltage(void) = 0; |
hemddabral | 18:25dbc718084c | 87 | |
hemddabral | 18:25dbc718084c | 88 | /** |
hemddabral | 18:25dbc718084c | 89 | * @brief abstract method to obtain the current consumed by the application in Current sensing configuration |
hemddabral | 18:25dbc718084c | 90 | * @retval current consumed by the application in Current sensing configuration |
hemddabral | 18:25dbc718084c | 91 | */ |
Davidroid | 22:ff8d071bf79e | 92 | virtual unsigned int get_current(void) = 0; |
Davidroid | 22:ff8d071bf79e | 93 | |
Davidroid | 22:ff8d071bf79e | 94 | /** |
Davidroid | 22:ff8d071bf79e | 95 | * @brief Destructor. |
Davidroid | 22:ff8d071bf79e | 96 | */ |
Davidroid | 22:ff8d071bf79e | 97 | virtual ~InstrumentationAmp() {}; |
hemddabral | 2:19d1dcef0c0e | 98 | }; |
hemddabral | 2:19d1dcef0c0e | 99 | |
hemddabral | 2:19d1dcef0c0e | 100 | #endif /* __INSTRUMENTATION_AMP_CLASS_H */ |
hemddabral | 2:19d1dcef0c0e | 101 | |
hemddabral | 2:19d1dcef0c0e | 102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
hemddabral | 2:19d1dcef0c0e | 103 |