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/tsu104/tsu104_class.h@12:ac16b9a1cad6, 2016-04-07 (annotated)
- Committer:
- hemddabral
- Date:
- Thu Apr 07 04:15:34 2016 +0000
- Revision:
- 12:ac16b9a1cad6
- Parent:
- 6:5dd31859cea3
- Child:
- 13:9cecc8d66cc1
removed compile time warning for Nucleo F401RE
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hemddabral | 2:19d1dcef0c0e | 1 | /** |
hemddabral | 2:19d1dcef0c0e | 2 | ****************************************************************************** |
hemddabral | 2:19d1dcef0c0e | 3 | * @file tsu104_class.h |
hemddabral | 2:19d1dcef0c0e | 4 | * @author Central Labs |
hemddabral | 2:19d1dcef0c0e | 5 | * @version 1.0.0 |
hemddabral | 2:19d1dcef0c0e | 6 | * @date 11-February-2016 |
hemddabral | 2:19d1dcef0c0e | 7 | * @brief Portable architecture for TSU104 |
hemddabral | 2:19d1dcef0c0e | 8 | ****************************************************************************** |
hemddabral | 2:19d1dcef0c0e | 9 | * @attention |
hemddabral | 2:19d1dcef0c0e | 10 | * |
hemddabral | 2:19d1dcef0c0e | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
hemddabral | 2:19d1dcef0c0e | 12 | * |
hemddabral | 2:19d1dcef0c0e | 13 | * Redistribution and use in source and binary forms, with or without modification, |
hemddabral | 2:19d1dcef0c0e | 14 | * are permitted provided that the following conditions are met: |
hemddabral | 2:19d1dcef0c0e | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
hemddabral | 2:19d1dcef0c0e | 16 | * this list of conditions and the following disclaimer. |
hemddabral | 2:19d1dcef0c0e | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
hemddabral | 2:19d1dcef0c0e | 18 | * this list of conditions and the following disclaimer in the documentation |
hemddabral | 2:19d1dcef0c0e | 19 | * and/or other materials provided with the distribution. |
hemddabral | 2:19d1dcef0c0e | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
hemddabral | 2:19d1dcef0c0e | 21 | * may be used to endorse or promote products derived from this software |
hemddabral | 2:19d1dcef0c0e | 22 | * without specific prior written permission. |
hemddabral | 2:19d1dcef0c0e | 23 | * |
hemddabral | 2:19d1dcef0c0e | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
hemddabral | 2:19d1dcef0c0e | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
hemddabral | 2:19d1dcef0c0e | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
hemddabral | 2:19d1dcef0c0e | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
hemddabral | 2:19d1dcef0c0e | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
hemddabral | 2:19d1dcef0c0e | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
hemddabral | 2:19d1dcef0c0e | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
hemddabral | 2:19d1dcef0c0e | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
hemddabral | 2:19d1dcef0c0e | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
hemddabral | 2:19d1dcef0c0e | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
hemddabral | 2:19d1dcef0c0e | 34 | * |
hemddabral | 2:19d1dcef0c0e | 35 | ****************************************************************************** |
hemddabral | 2:19d1dcef0c0e | 36 | */ |
hemddabral | 2:19d1dcef0c0e | 37 | |
hemddabral | 2:19d1dcef0c0e | 38 | |
hemddabral | 2:19d1dcef0c0e | 39 | /* Generated with STM32CubeTOO -----------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 40 | |
hemddabral | 2:19d1dcef0c0e | 41 | |
hemddabral | 2:19d1dcef0c0e | 42 | /* Revision ------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 43 | /* |
hemddabral | 2:19d1dcef0c0e | 44 | Repository: http://svn.x-nucleodev.codex.cro.st.com/svnroot/X-NucleoDev |
hemddabral | 2:19d1dcef0c0e | 45 | Branch/Trunk/Tag: trunk |
hemddabral | 2:19d1dcef0c0e | 46 | Based on: X-CUBE-IKA01A1/trunk/Drivers/BSP/Components/tsu104/tsu104.h |
hemddabral | 2:19d1dcef0c0e | 47 | Revision: 402 |
hemddabral | 2:19d1dcef0c0e | 48 | */ |
hemddabral | 2:19d1dcef0c0e | 49 | |
hemddabral | 2:19d1dcef0c0e | 50 | |
hemddabral | 2:19d1dcef0c0e | 51 | /* Define to prevent recursive inclusion -------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 52 | |
hemddabral | 2:19d1dcef0c0e | 53 | #ifndef __TSU104_CLASS_H |
hemddabral | 2:19d1dcef0c0e | 54 | #define __TSU104_CLASS_H |
hemddabral | 2:19d1dcef0c0e | 55 | |
hemddabral | 2:19d1dcef0c0e | 56 | |
hemddabral | 2:19d1dcef0c0e | 57 | /* Includes ------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 58 | |
hemddabral | 2:19d1dcef0c0e | 59 | /* ACTION 1 ------------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 60 | * Include here platform specific header files. * |
hemddabral | 2:19d1dcef0c0e | 61 | *----------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 62 | #include "mbed.h" |
hemddabral | 2:19d1dcef0c0e | 63 | /* ACTION 2 ------------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 64 | * Include here component specific header files. * |
hemddabral | 2:19d1dcef0c0e | 65 | *----------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 66 | #include "tsu104.h" |
hemddabral | 2:19d1dcef0c0e | 67 | /* ACTION 3 ------------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 68 | * Include here interface specific header files. * |
hemddabral | 2:19d1dcef0c0e | 69 | * * |
hemddabral | 2:19d1dcef0c0e | 70 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 71 | * #include "../Interfaces/Humidity_class.h" * |
hemddabral | 2:19d1dcef0c0e | 72 | * #include "../Interfaces/Temperature_class.h" * |
hemddabral | 2:19d1dcef0c0e | 73 | *----------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 74 | #include "../Interfaces/Windcomp_class.h" |
hemddabral | 2:19d1dcef0c0e | 75 | |
hemddabral | 2:19d1dcef0c0e | 76 | |
hemddabral | 2:19d1dcef0c0e | 77 | /* Classes -------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 78 | |
hemddabral | 2:19d1dcef0c0e | 79 | /** |
hemddabral | 2:19d1dcef0c0e | 80 | * @brief Class representing a TSU104 component. |
hemddabral | 2:19d1dcef0c0e | 81 | */ |
hemddabral | 2:19d1dcef0c0e | 82 | class TSU104 : public Windcomp |
hemddabral | 2:19d1dcef0c0e | 83 | { |
hemddabral | 2:19d1dcef0c0e | 84 | public: |
hemddabral | 2:19d1dcef0c0e | 85 | |
hemddabral | 2:19d1dcef0c0e | 86 | /*** Constructor and Destructor Methods ***/ |
hemddabral | 2:19d1dcef0c0e | 87 | |
hemddabral | 2:19d1dcef0c0e | 88 | /** |
hemddabral | 2:19d1dcef0c0e | 89 | * @brief Constructor. |
hemddabral | 2:19d1dcef0c0e | 90 | */ |
hemddabral | 2:19d1dcef0c0e | 91 | TSU104(void) : Windcomp() |
hemddabral | 2:19d1dcef0c0e | 92 | { |
hemddabral | 2:19d1dcef0c0e | 93 | /* ACTION 4 ----------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 94 | * Initialize here the component's member variables, one variable per * |
hemddabral | 2:19d1dcef0c0e | 95 | * line. * |
hemddabral | 2:19d1dcef0c0e | 96 | * * |
hemddabral | 2:19d1dcef0c0e | 97 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 98 | * measure = 0; * |
hemddabral | 2:19d1dcef0c0e | 99 | * instance_id = number_of_instances++; * |
hemddabral | 2:19d1dcef0c0e | 100 | *--------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 101 | } |
hemddabral | 2:19d1dcef0c0e | 102 | |
hemddabral | 2:19d1dcef0c0e | 103 | /** |
hemddabral | 2:19d1dcef0c0e | 104 | * @brief Destructor. |
hemddabral | 2:19d1dcef0c0e | 105 | */ |
hemddabral | 2:19d1dcef0c0e | 106 | virtual ~TSU104(void) {} |
hemddabral | 2:19d1dcef0c0e | 107 | |
hemddabral | 2:19d1dcef0c0e | 108 | |
hemddabral | 2:19d1dcef0c0e | 109 | /*** Public Component Related Methods ***/ |
hemddabral | 2:19d1dcef0c0e | 110 | |
hemddabral | 2:19d1dcef0c0e | 111 | /* ACTION 5 --------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 112 | * Implement here the component's public methods, as wrappers of the C * |
hemddabral | 2:19d1dcef0c0e | 113 | * component's functions. * |
hemddabral | 2:19d1dcef0c0e | 114 | * They should be: * |
hemddabral | 2:19d1dcef0c0e | 115 | * + Methods with the same name of the C component's virtual table's * |
hemddabral | 2:19d1dcef0c0e | 116 | * functions (1); * |
hemddabral | 2:19d1dcef0c0e | 117 | * + Methods with the same name of the C component's extended virtual * |
hemddabral | 2:19d1dcef0c0e | 118 | * table's functions, if any (2). * |
hemddabral | 2:19d1dcef0c0e | 119 | * * |
hemddabral | 2:19d1dcef0c0e | 120 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 121 | * virtual int GetValue(float *f) //(1) * |
hemddabral | 2:19d1dcef0c0e | 122 | * { * |
hemddabral | 2:19d1dcef0c0e | 123 | * return COMPONENT_GetValue(float *f); * |
hemddabral | 2:19d1dcef0c0e | 124 | * } * |
hemddabral | 2:19d1dcef0c0e | 125 | * * |
hemddabral | 2:19d1dcef0c0e | 126 | * virtual int EnableFeature(void) //(2) * |
hemddabral | 2:19d1dcef0c0e | 127 | * { * |
hemddabral | 2:19d1dcef0c0e | 128 | * return COMPONENT_EnableFeature(); * |
hemddabral | 2:19d1dcef0c0e | 129 | * } * |
hemddabral | 2:19d1dcef0c0e | 130 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 131 | virtual int Init(void *init = NULL) |
hemddabral | 2:19d1dcef0c0e | 132 | { |
hemddabral | 2:19d1dcef0c0e | 133 | return (int) TSU104_Init((void *) init); |
hemddabral | 2:19d1dcef0c0e | 134 | } |
hemddabral | 2:19d1dcef0c0e | 135 | |
hemddabral | 2:19d1dcef0c0e | 136 | virtual int ReadID(uint8_t *id = NULL) |
hemddabral | 2:19d1dcef0c0e | 137 | { |
hemddabral | 2:19d1dcef0c0e | 138 | return (int) TSU104_ReadID((uint8_t *) id); |
hemddabral | 2:19d1dcef0c0e | 139 | } |
hemddabral | 2:19d1dcef0c0e | 140 | |
hemddabral | 2:19d1dcef0c0e | 141 | virtual unsigned int TSU104_WindComp_Get_D2(void) |
hemddabral | 2:19d1dcef0c0e | 142 | { |
hemddabral | 2:19d1dcef0c0e | 143 | DigitalIn windowsCompD2(D2); |
hemddabral | 2:19d1dcef0c0e | 144 | return windowsCompD2.read(); |
hemddabral | 2:19d1dcef0c0e | 145 | } |
hemddabral | 2:19d1dcef0c0e | 146 | |
hemddabral | 2:19d1dcef0c0e | 147 | virtual unsigned int TSU104_WindComp_Get_D4(void) |
hemddabral | 2:19d1dcef0c0e | 148 | { |
hemddabral | 2:19d1dcef0c0e | 149 | DigitalIn windowsCompD4(D4); |
hemddabral | 2:19d1dcef0c0e | 150 | return windowsCompD4.read(); |
hemddabral | 2:19d1dcef0c0e | 151 | } |
hemddabral | 2:19d1dcef0c0e | 152 | |
hemddabral | 6:5dd31859cea3 | 153 | virtual unsigned int TSU104_PhotoSensor_GetVoltage(PinName pin) |
hemddabral | 2:19d1dcef0c0e | 154 | { |
hemddabral | 6:5dd31859cea3 | 155 | AnalogIn photoSensor(pin); |
hemddabral | 12:ac16b9a1cad6 | 156 | double voltage = photoSensor.read(); |
hemddabral | 2:19d1dcef0c0e | 157 | voltage = voltage*3.3*1000.0; // voltage in mV |
hemddabral | 2:19d1dcef0c0e | 158 | return voltage; |
hemddabral | 2:19d1dcef0c0e | 159 | } |
hemddabral | 2:19d1dcef0c0e | 160 | |
hemddabral | 2:19d1dcef0c0e | 161 | |
hemddabral | 2:19d1dcef0c0e | 162 | /*** Public Interrupt Related Methods ***/ |
hemddabral | 2:19d1dcef0c0e | 163 | |
hemddabral | 2:19d1dcef0c0e | 164 | /* ACTION 6 --------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 165 | * Implement here interrupt related methods, if any. * |
hemddabral | 2:19d1dcef0c0e | 166 | * Note that interrupt handling is platform dependent, e.g.: * |
hemddabral | 2:19d1dcef0c0e | 167 | * + mbed: * |
hemddabral | 2:19d1dcef0c0e | 168 | * InterruptIn feature_irq(pin); //Interrupt object. * |
hemddabral | 2:19d1dcef0c0e | 169 | * feature_irq.fall(callback); //Attach a callback. * |
hemddabral | 2:19d1dcef0c0e | 170 | * feature_irq.mode(PullNone); //Set interrupt mode. * |
hemddabral | 2:19d1dcef0c0e | 171 | * feature_irq.enable_irq(); //Enable interrupt. * |
hemddabral | 2:19d1dcef0c0e | 172 | * feature_irq.disable_irq(); //Disable interrupt. * |
hemddabral | 2:19d1dcef0c0e | 173 | * + Arduino: * |
hemddabral | 2:19d1dcef0c0e | 174 | * attachInterrupt(pin, callback, RISING); //Attach a callback. * |
hemddabral | 2:19d1dcef0c0e | 175 | * detachInterrupt(pin); //Detach a callback. * |
hemddabral | 2:19d1dcef0c0e | 176 | * * |
hemddabral | 2:19d1dcef0c0e | 177 | * Example (mbed): * |
hemddabral | 2:19d1dcef0c0e | 178 | * void AttachFeatureIRQ(void (*fptr) (void)) * |
hemddabral | 2:19d1dcef0c0e | 179 | * { * |
hemddabral | 2:19d1dcef0c0e | 180 | * feature_irq.fall(fptr); * |
hemddabral | 2:19d1dcef0c0e | 181 | * } * |
hemddabral | 2:19d1dcef0c0e | 182 | * * |
hemddabral | 2:19d1dcef0c0e | 183 | * void EnableFeatureIRQ(void) * |
hemddabral | 2:19d1dcef0c0e | 184 | * { * |
hemddabral | 2:19d1dcef0c0e | 185 | * feature_irq.enable_irq(); * |
hemddabral | 2:19d1dcef0c0e | 186 | * } * |
hemddabral | 2:19d1dcef0c0e | 187 | * * |
hemddabral | 2:19d1dcef0c0e | 188 | * void DisableFeatureIRQ(void) * |
hemddabral | 2:19d1dcef0c0e | 189 | * { * |
hemddabral | 2:19d1dcef0c0e | 190 | * feature_irq.disable_irq(); * |
hemddabral | 2:19d1dcef0c0e | 191 | * } * |
hemddabral | 2:19d1dcef0c0e | 192 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 193 | |
hemddabral | 2:19d1dcef0c0e | 194 | |
hemddabral | 2:19d1dcef0c0e | 195 | protected: |
hemddabral | 2:19d1dcef0c0e | 196 | |
hemddabral | 2:19d1dcef0c0e | 197 | /*** Protected Component Related Methods ***/ |
hemddabral | 2:19d1dcef0c0e | 198 | |
hemddabral | 2:19d1dcef0c0e | 199 | /* ACTION 7 --------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 200 | * Declare here the component's specific methods. * |
hemddabral | 2:19d1dcef0c0e | 201 | * They should be: * |
hemddabral | 2:19d1dcef0c0e | 202 | * + Methods with the same name of the C component's virtual table's * |
hemddabral | 2:19d1dcef0c0e | 203 | * functions (1); * |
hemddabral | 2:19d1dcef0c0e | 204 | * + Methods with the same name of the C component's extended virtual * |
hemddabral | 2:19d1dcef0c0e | 205 | * table's functions, if any (2); * |
hemddabral | 2:19d1dcef0c0e | 206 | * + Helper methods, if any, like functions declared in the component's * |
hemddabral | 2:19d1dcef0c0e | 207 | * source files but not pointed by the component's virtual table (3). * |
hemddabral | 2:19d1dcef0c0e | 208 | * * |
hemddabral | 2:19d1dcef0c0e | 209 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 210 | * Status_t COMPONENT_GetValue(float *f); //(1) * |
hemddabral | 2:19d1dcef0c0e | 211 | * Status_t COMPONENT_EnableFeature(void); //(2) * |
hemddabral | 2:19d1dcef0c0e | 212 | * Status_t COMPONENT_ComputeAverage(void); //(3) * |
hemddabral | 2:19d1dcef0c0e | 213 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 214 | /* TSU104's generic functions. */ |
hemddabral | 2:19d1dcef0c0e | 215 | Status_t TSU104_Init(void *init); |
hemddabral | 2:19d1dcef0c0e | 216 | Status_t TSU104_ReadID(void *id); |
hemddabral | 2:19d1dcef0c0e | 217 | |
hemddabral | 2:19d1dcef0c0e | 218 | /* TSU104's interrupts related functions. */ |
hemddabral | 2:19d1dcef0c0e | 219 | Status_t TSU104_ConfigIT(void* a); |
hemddabral | 2:19d1dcef0c0e | 220 | |
hemddabral | 2:19d1dcef0c0e | 221 | |
hemddabral | 2:19d1dcef0c0e | 222 | /*** Component's I/O Methods ***/ |
hemddabral | 2:19d1dcef0c0e | 223 | |
hemddabral | 2:19d1dcef0c0e | 224 | /* ACTION 8 --------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 225 | * Implement here other I/O methods beyond those already implemented * |
hemddabral | 2:19d1dcef0c0e | 226 | * above, which are declared extern within the component's header file. * |
hemddabral | 2:19d1dcef0c0e | 227 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 228 | unsigned int TSU104_Read_Pin_D2() |
hemddabral | 2:19d1dcef0c0e | 229 | { |
hemddabral | 2:19d1dcef0c0e | 230 | /* TO BE IMPLEMENTED BY USING TARGET PLATFORM'S APIs. */ |
hemddabral | 2:19d1dcef0c0e | 231 | return (unsigned int) 0; |
hemddabral | 2:19d1dcef0c0e | 232 | } |
hemddabral | 2:19d1dcef0c0e | 233 | |
hemddabral | 2:19d1dcef0c0e | 234 | unsigned int TSU104_Read_Pin_D4() |
hemddabral | 2:19d1dcef0c0e | 235 | { |
hemddabral | 2:19d1dcef0c0e | 236 | /* TO BE IMPLEMENTED BY USING TARGET PLATFORM'S APIs. */ |
hemddabral | 2:19d1dcef0c0e | 237 | return (unsigned int) 0; |
hemddabral | 2:19d1dcef0c0e | 238 | } |
hemddabral | 2:19d1dcef0c0e | 239 | |
hemddabral | 2:19d1dcef0c0e | 240 | unsigned int TSU104_Read_Pin_A4() |
hemddabral | 2:19d1dcef0c0e | 241 | { |
hemddabral | 2:19d1dcef0c0e | 242 | /* TO BE IMPLEMENTED BY USING TARGET PLATFORM'S APIs. */ |
hemddabral | 2:19d1dcef0c0e | 243 | return (unsigned int) 0; |
hemddabral | 2:19d1dcef0c0e | 244 | } |
hemddabral | 2:19d1dcef0c0e | 245 | |
hemddabral | 2:19d1dcef0c0e | 246 | |
hemddabral | 2:19d1dcef0c0e | 247 | /*** Component's Instance Variables ***/ |
hemddabral | 2:19d1dcef0c0e | 248 | |
hemddabral | 2:19d1dcef0c0e | 249 | /* ACTION 9 --------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 250 | * Declare here interrupt related variables, if needed. * |
hemddabral | 2:19d1dcef0c0e | 251 | * Note that interrupt handling is platform dependent, see * |
hemddabral | 2:19d1dcef0c0e | 252 | * "Interrupt Related Methods" above. * |
hemddabral | 2:19d1dcef0c0e | 253 | * * |
hemddabral | 2:19d1dcef0c0e | 254 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 255 | * + mbed: * |
hemddabral | 2:19d1dcef0c0e | 256 | * InterruptIn feature_irq; * |
hemddabral | 2:19d1dcef0c0e | 257 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 258 | |
hemddabral | 2:19d1dcef0c0e | 259 | /* ACTION 10 -------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 260 | * Declare here other pin related variables, if needed. * |
hemddabral | 2:19d1dcef0c0e | 261 | * * |
hemddabral | 2:19d1dcef0c0e | 262 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 263 | * + mbed: * |
hemddabral | 2:19d1dcef0c0e | 264 | * DigitalOut standby_reset; * |
hemddabral | 2:19d1dcef0c0e | 265 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 266 | |
hemddabral | 2:19d1dcef0c0e | 267 | /* ACTION 11 -------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 268 | * Declare here communication related variables, if needed. * |
hemddabral | 2:19d1dcef0c0e | 269 | * * |
hemddabral | 2:19d1dcef0c0e | 270 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 271 | * + mbed: * |
hemddabral | 2:19d1dcef0c0e | 272 | * DigitalOut address; * |
hemddabral | 2:19d1dcef0c0e | 273 | * DevI2C &dev_i2c; * |
hemddabral | 2:19d1dcef0c0e | 274 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 275 | |
hemddabral | 2:19d1dcef0c0e | 276 | /* ACTION 12 -------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 277 | * Declare here identity related variables, if needed. * |
hemddabral | 2:19d1dcef0c0e | 278 | * Note that there should be only a unique identifier for each component, * |
hemddabral | 2:19d1dcef0c0e | 279 | * which should be the "who_am_i" parameter. * |
hemddabral | 2:19d1dcef0c0e | 280 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 281 | /* Identity */ |
hemddabral | 2:19d1dcef0c0e | 282 | uint8_t who_am_i; |
hemddabral | 2:19d1dcef0c0e | 283 | |
hemddabral | 2:19d1dcef0c0e | 284 | /* ACTION 13 -------------------------------------------------------------* |
hemddabral | 2:19d1dcef0c0e | 285 | * Declare here the component's static and non-static data, one variable * |
hemddabral | 2:19d1dcef0c0e | 286 | * per line. * |
hemddabral | 2:19d1dcef0c0e | 287 | * * |
hemddabral | 2:19d1dcef0c0e | 288 | * Example: * |
hemddabral | 2:19d1dcef0c0e | 289 | * float measure; * |
hemddabral | 2:19d1dcef0c0e | 290 | * int instance_id; * |
hemddabral | 2:19d1dcef0c0e | 291 | * static int number_of_instances; * |
hemddabral | 2:19d1dcef0c0e | 292 | *------------------------------------------------------------------------*/ |
hemddabral | 2:19d1dcef0c0e | 293 | }; |
hemddabral | 2:19d1dcef0c0e | 294 | |
hemddabral | 2:19d1dcef0c0e | 295 | #endif /* __TSU104_CLASS_H */ |
hemddabral | 2:19d1dcef0c0e | 296 | |
hemddabral | 2:19d1dcef0c0e | 297 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |