class IMU nucleo

Dependents:   Coupe-Robotique-FIP-Main

Fork of IMU_FIP by Robotique FIP

Committer:
quentin9696
Date:
Thu May 21 11:21:58 2015 +0000
Revision:
5:e2e603447679
Parent:
0:528e23a13fb7

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
quentin9696 0:528e23a13fb7 1 /**
quentin9696 0:528e23a13fb7 2 ******************************************************************************
quentin9696 0:528e23a13fb7 3 * @file x_cube_mems.h
quentin9696 0:528e23a13fb7 4 * @author AST / EST
quentin9696 0:528e23a13fb7 5 * @version V0.0.1
quentin9696 0:528e23a13fb7 6 * @date 01-December-2014
quentin9696 0:528e23a13fb7 7 * @brief Header file for class X_CUBE_MEMS representing an MEMS expansion board
quentin9696 0:528e23a13fb7 8 ******************************************************************************
quentin9696 0:528e23a13fb7 9 * @attention
quentin9696 0:528e23a13fb7 10 *
quentin9696 0:528e23a13fb7 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
quentin9696 0:528e23a13fb7 12 *
quentin9696 0:528e23a13fb7 13 * Redistribution and use in source and binary forms, with or without modification,
quentin9696 0:528e23a13fb7 14 * are permitted provided that the following conditions are met:
quentin9696 0:528e23a13fb7 15 * 1. Redistributions of source code must retain the above copyright notice,
quentin9696 0:528e23a13fb7 16 * this list of conditions and the following disclaimer.
quentin9696 0:528e23a13fb7 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
quentin9696 0:528e23a13fb7 18 * this list of conditions and the following disclaimer in the documentation
quentin9696 0:528e23a13fb7 19 * and/or other materials provided with the distribution.
quentin9696 0:528e23a13fb7 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
quentin9696 0:528e23a13fb7 21 * may be used to endorse or promote products derived from this software
quentin9696 0:528e23a13fb7 22 * without specific prior written permission.
quentin9696 0:528e23a13fb7 23 *
quentin9696 0:528e23a13fb7 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
quentin9696 0:528e23a13fb7 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
quentin9696 0:528e23a13fb7 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
quentin9696 0:528e23a13fb7 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
quentin9696 0:528e23a13fb7 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
quentin9696 0:528e23a13fb7 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
quentin9696 0:528e23a13fb7 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
quentin9696 0:528e23a13fb7 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
quentin9696 0:528e23a13fb7 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
quentin9696 0:528e23a13fb7 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
quentin9696 0:528e23a13fb7 34 *
quentin9696 0:528e23a13fb7 35 ******************************************************************************
quentin9696 0:528e23a13fb7 36 */
quentin9696 0:528e23a13fb7 37
quentin9696 0:528e23a13fb7 38
quentin9696 0:528e23a13fb7 39 #ifndef __X_CUBE_MEMS_H
quentin9696 0:528e23a13fb7 40 #define __X_CUBE_MEMS_H
quentin9696 0:528e23a13fb7 41
quentin9696 0:528e23a13fb7 42 /* Includes ------------------------------------------------------------------*/
quentin9696 0:528e23a13fb7 43 #include "mbed.h"
quentin9696 0:528e23a13fb7 44
quentin9696 0:528e23a13fb7 45 #include "x_cube_mems_i2c.h"
quentin9696 0:528e23a13fb7 46 #include "Components/HTS221/hts221.h"
quentin9696 0:528e23a13fb7 47 #include "Components/LPS25H/lps25h.h"
quentin9696 0:528e23a13fb7 48 #include "Components/LIS3MDL/lis3mdl.h"
quentin9696 0:528e23a13fb7 49 #include "Components/LSM6DS0/lsm6ds0.h"
quentin9696 0:528e23a13fb7 50
quentin9696 0:528e23a13fb7 51 /* Classes -------------------------------------------------------------------*/
quentin9696 0:528e23a13fb7 52 /** Class X_CUBE_MEMS represents the MEMS Sensor expansion board X-NUCLEO-IKS01A1
quentin9696 0:528e23a13fb7 53 *
quentin9696 0:528e23a13fb7 54 * The expansion board has the following IPs:\n
quentin9696 0:528e23a13fb7 55 * - HTS221 Relative Humidity and Temperature Sensor
quentin9696 0:528e23a13fb7 56 * - LIS3MDL 3-Axis Magnetometer
quentin9696 0:528e23a13fb7 57 * - LPS25H MEMS Pressure Sensor
quentin9696 0:528e23a13fb7 58 * - LSM6DS0 3D Acceleromenter and 3D Gyroscope
quentin9696 0:528e23a13fb7 59 * *
quentin9696 0:528e23a13fb7 60 * @code
quentin9696 0:528e23a13fb7 61 * // MEMS Sensors expansion board singleton instance
quentin9696 0:528e23a13fb7 62 * static X_CUBE_MEMS *mems_expansion_board = X_CUBE_MEMS::Instance();
quentin9696 0:528e23a13fb7 63 * @endcode
quentin9696 0:528e23a13fb7 64 */
quentin9696 0:528e23a13fb7 65 class X_CUBE_MEMS
quentin9696 0:528e23a13fb7 66 {
quentin9696 0:528e23a13fb7 67 protected:
quentin9696 0:528e23a13fb7 68 X_CUBE_MEMS(void);
quentin9696 0:528e23a13fb7 69
quentin9696 0:528e23a13fb7 70 public:
quentin9696 0:528e23a13fb7 71 static X_CUBE_MEMS* Instance(void);
quentin9696 0:528e23a13fb7 72
quentin9696 0:528e23a13fb7 73 DevI2C dev_i2c;
quentin9696 0:528e23a13fb7 74 HTS221 hts221;
quentin9696 0:528e23a13fb7 75 LPS25H lps25h;
quentin9696 0:528e23a13fb7 76 LIS3MDL lis3mdl;
quentin9696 0:528e23a13fb7 77 LSM6DS0 lsm6ds0;
quentin9696 0:528e23a13fb7 78
quentin9696 0:528e23a13fb7 79 private:
quentin9696 0:528e23a13fb7 80 static X_CUBE_MEMS *_instance;
quentin9696 0:528e23a13fb7 81 };
quentin9696 0:528e23a13fb7 82
quentin9696 0:528e23a13fb7 83 #endif /* __X_CUBE_MEMS_H */