Suppressed conflicting destructor function.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: D7A_1x_TRAINING D7_MLX_AND_BAT D7A_1x_demo_sensors_v3
Fork of X_NUCLEO_IKS01A1 by
x_nucleo_iks01a1.h@0:0feaa2a2d9ff, 2015-04-13 (annotated)
- Committer:
- Wolfgang Betz
- Date:
- Mon Apr 13 11:21:57 2015 +0200
- Revision:
- 0:0feaa2a2d9ff
- Child:
- 3:088aa5839e0d
Added new peripheral X_NUCLEO_IKS01A1 (MEMS Inertial & Environmental Nucleo Expansion)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wolfgang Betz |
0:0feaa2a2d9ff | 1 | /** |
Wolfgang Betz |
0:0feaa2a2d9ff | 2 | ****************************************************************************** |
Wolfgang Betz |
0:0feaa2a2d9ff | 3 | * @file x_nucleo_iks01a1.h |
Wolfgang Betz |
0:0feaa2a2d9ff | 4 | * @author AST / EST |
Wolfgang Betz |
0:0feaa2a2d9ff | 5 | * @version V0.0.1 |
Wolfgang Betz |
0:0feaa2a2d9ff | 6 | * @date 13-April-2015 |
Wolfgang Betz |
0:0feaa2a2d9ff | 7 | * @brief Header file for class X_NUCLEO_IKS01A1 representing an X-NUCLEO-IKS01A1 |
Wolfgang Betz |
0:0feaa2a2d9ff | 8 | * expansion board |
Wolfgang Betz |
0:0feaa2a2d9ff | 9 | ****************************************************************************** |
Wolfgang Betz |
0:0feaa2a2d9ff | 10 | * @attention |
Wolfgang Betz |
0:0feaa2a2d9ff | 11 | * |
Wolfgang Betz |
0:0feaa2a2d9ff | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Wolfgang Betz |
0:0feaa2a2d9ff | 13 | * |
Wolfgang Betz |
0:0feaa2a2d9ff | 14 | * Redistribution and use in source and binary forms, with or without modification, |
Wolfgang Betz |
0:0feaa2a2d9ff | 15 | * are permitted provided that the following conditions are met: |
Wolfgang Betz |
0:0feaa2a2d9ff | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
Wolfgang Betz |
0:0feaa2a2d9ff | 17 | * this list of conditions and the following disclaimer. |
Wolfgang Betz |
0:0feaa2a2d9ff | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Wolfgang Betz |
0:0feaa2a2d9ff | 19 | * this list of conditions and the following disclaimer in the documentation |
Wolfgang Betz |
0:0feaa2a2d9ff | 20 | * and/or other materials provided with the distribution. |
Wolfgang Betz |
0:0feaa2a2d9ff | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Wolfgang Betz |
0:0feaa2a2d9ff | 22 | * may be used to endorse or promote products derived from this software |
Wolfgang Betz |
0:0feaa2a2d9ff | 23 | * without specific prior written permission. |
Wolfgang Betz |
0:0feaa2a2d9ff | 24 | * |
Wolfgang Betz |
0:0feaa2a2d9ff | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Wolfgang Betz |
0:0feaa2a2d9ff | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Wolfgang Betz |
0:0feaa2a2d9ff | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Wolfgang Betz |
0:0feaa2a2d9ff | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Wolfgang Betz |
0:0feaa2a2d9ff | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Wolfgang Betz |
0:0feaa2a2d9ff | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Wolfgang Betz |
0:0feaa2a2d9ff | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Wolfgang Betz |
0:0feaa2a2d9ff | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Wolfgang Betz |
0:0feaa2a2d9ff | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Wolfgang Betz |
0:0feaa2a2d9ff | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Wolfgang Betz |
0:0feaa2a2d9ff | 35 | * |
Wolfgang Betz |
0:0feaa2a2d9ff | 36 | ****************************************************************************** |
Wolfgang Betz |
0:0feaa2a2d9ff | 37 | */ |
Wolfgang Betz |
0:0feaa2a2d9ff | 38 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 39 | /* Define to prevent from recursive inclusion --------------------------------*/ |
Wolfgang Betz |
0:0feaa2a2d9ff | 40 | #ifndef __X_NUCLEO_IKS01A1_H |
Wolfgang Betz |
0:0feaa2a2d9ff | 41 | #define __X_NUCLEO_IKS01A1_H |
Wolfgang Betz |
0:0feaa2a2d9ff | 42 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 43 | /* Includes ------------------------------------------------------------------*/ |
Wolfgang Betz |
0:0feaa2a2d9ff | 44 | #include "mbed.h" |
Wolfgang Betz |
0:0feaa2a2d9ff | 45 | #include "x_nucleo_iks01a1_targets.h" |
Wolfgang Betz |
0:0feaa2a2d9ff | 46 | #include "DevI2C.h" |
Wolfgang Betz |
0:0feaa2a2d9ff | 47 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 48 | /* Classes -------------------------------------------------------------------*/ |
Wolfgang Betz |
0:0feaa2a2d9ff | 49 | /** Class X_NUCLEO_IKS01A1 is intended to represent the <TODO> |
Wolfgang Betz |
0:0feaa2a2d9ff | 50 | * expansion board with the same name. |
Wolfgang Betz |
0:0feaa2a2d9ff | 51 | * |
Wolfgang Betz |
0:0feaa2a2d9ff | 52 | * The expansion board is featuring basically <TODO> IPs:\n |
Wolfgang Betz |
0:0feaa2a2d9ff | 53 | * -# <TODO>\n |
Wolfgang Betz |
0:0feaa2a2d9ff | 54 | * |
Wolfgang Betz |
0:0feaa2a2d9ff | 55 | * It is intentionally implemented as a singleton because only one |
Wolfgang Betz |
0:0feaa2a2d9ff | 56 | * X_NUCLEO_IKS01A1 at a time might be deployed in a HW component stack.\n |
Wolfgang Betz |
0:0feaa2a2d9ff | 57 | * In order to get the singleton instance you have to call class method `Instance()`, |
Wolfgang Betz |
0:0feaa2a2d9ff | 58 | * e.g.: |
Wolfgang Betz |
0:0feaa2a2d9ff | 59 | * @code |
Wolfgang Betz |
0:0feaa2a2d9ff | 60 | * // Battery expansion board singleton instance |
Wolfgang Betz |
0:0feaa2a2d9ff | 61 | * static X_NUCLEO_IKS01A1 *<TODO>_expansion_board = X_NUCLEO_IKS01A1::Instance(); |
Wolfgang Betz |
0:0feaa2a2d9ff | 62 | * @endcode |
Wolfgang Betz |
0:0feaa2a2d9ff | 63 | */ |
Wolfgang Betz |
0:0feaa2a2d9ff | 64 | class X_NUCLEO_IKS01A1 |
Wolfgang Betz |
0:0feaa2a2d9ff | 65 | { |
Wolfgang Betz |
0:0feaa2a2d9ff | 66 | protected: |
Wolfgang Betz |
0:0feaa2a2d9ff | 67 | X_NUCLEO_IKS01A1(DevI2C *ext_i2c); |
Wolfgang Betz |
0:0feaa2a2d9ff | 68 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 69 | public: |
Wolfgang Betz |
0:0feaa2a2d9ff | 70 | static X_NUCLEO_IKS01A1* Instance(DevI2C *ext_i2c = NULL); |
Wolfgang Betz |
0:0feaa2a2d9ff | 71 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 72 | DevI2C *dev_i2c; |
Wolfgang Betz |
0:0feaa2a2d9ff | 73 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 74 | private: |
Wolfgang Betz |
0:0feaa2a2d9ff | 75 | static X_NUCLEO_IKS01A1 *_instance; |
Wolfgang Betz |
0:0feaa2a2d9ff | 76 | }; |
Wolfgang Betz |
0:0feaa2a2d9ff | 77 | |
Wolfgang Betz |
0:0feaa2a2d9ff | 78 | #endif /* __X_NUCLEO_IKS01A1_H */ |