Multitech mDot/UDK support.

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_IKS01A1 by ST

Committer:
Wolfgang Betz
Date:
Wed Apr 15 12:10:42 2015 +0200
Revision:
5:8bab0f419849
Child:
24:92cc9c6e4b2b
Added component LIS3MDL

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 5:8bab0f419849 1 /**
Wolfgang Betz 5:8bab0f419849 2 ******************************************************************************
Wolfgang Betz 5:8bab0f419849 3 * @file imu_6axes.h
Wolfgang Betz 5:8bab0f419849 4 * @author MEMS Application Team
Wolfgang Betz 5:8bab0f419849 5 * @version V1.2.0
Wolfgang Betz 5:8bab0f419849 6 * @date 28-January-2015
Wolfgang Betz 5:8bab0f419849 7 * @brief This header file contains the functions prototypes for the
Wolfgang Betz 5:8bab0f419849 8 * accelerometer and gyroscope driver.
Wolfgang Betz 5:8bab0f419849 9 ******************************************************************************
Wolfgang Betz 5:8bab0f419849 10 * @attention
Wolfgang Betz 5:8bab0f419849 11 *
Wolfgang Betz 5:8bab0f419849 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Wolfgang Betz 5:8bab0f419849 13 *
Wolfgang Betz 5:8bab0f419849 14 * Redistribution and use in source and binary forms, with or without modification,
Wolfgang Betz 5:8bab0f419849 15 * are permitted provided that the following conditions are met:
Wolfgang Betz 5:8bab0f419849 16 * 1. Redistributions of source code must retain the above copyright notice,
Wolfgang Betz 5:8bab0f419849 17 * this list of conditions and the following disclaimer.
Wolfgang Betz 5:8bab0f419849 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Wolfgang Betz 5:8bab0f419849 19 * this list of conditions and the following disclaimer in the documentation
Wolfgang Betz 5:8bab0f419849 20 * and/or other materials provided with the distribution.
Wolfgang Betz 5:8bab0f419849 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Wolfgang Betz 5:8bab0f419849 22 * may be used to endorse or promote products derived from this software
Wolfgang Betz 5:8bab0f419849 23 * without specific prior written permission.
Wolfgang Betz 5:8bab0f419849 24 *
Wolfgang Betz 5:8bab0f419849 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Wolfgang Betz 5:8bab0f419849 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Wolfgang Betz 5:8bab0f419849 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Wolfgang Betz 5:8bab0f419849 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Wolfgang Betz 5:8bab0f419849 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Wolfgang Betz 5:8bab0f419849 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Wolfgang Betz 5:8bab0f419849 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Wolfgang Betz 5:8bab0f419849 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Wolfgang Betz 5:8bab0f419849 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Wolfgang Betz 5:8bab0f419849 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wolfgang Betz 5:8bab0f419849 35 *
Wolfgang Betz 5:8bab0f419849 36 ******************************************************************************
Wolfgang Betz 5:8bab0f419849 37 */
Wolfgang Betz 5:8bab0f419849 38
Wolfgang Betz 5:8bab0f419849 39
Wolfgang Betz 5:8bab0f419849 40 /* Define to prevent recursive inclusion -------------------------------------*/
Wolfgang Betz 5:8bab0f419849 41 #ifndef __IMU_6AXES_H
Wolfgang Betz 5:8bab0f419849 42 #define __IMU_6AXES_H
Wolfgang Betz 5:8bab0f419849 43
Wolfgang Betz 5:8bab0f419849 44 #ifdef __cplusplus
Wolfgang Betz 5:8bab0f419849 45 extern "C" {
Wolfgang Betz 5:8bab0f419849 46 #endif
Wolfgang Betz 5:8bab0f419849 47
Wolfgang Betz 5:8bab0f419849 48 /* Includes ------------------------------------------------------------------*/
Wolfgang Betz 5:8bab0f419849 49 #include <stdint.h>
Wolfgang Betz 5:8bab0f419849 50
Wolfgang Betz 5:8bab0f419849 51 /** @addtogroup BSP
Wolfgang Betz 5:8bab0f419849 52 * @{
Wolfgang Betz 5:8bab0f419849 53 */
Wolfgang Betz 5:8bab0f419849 54
Wolfgang Betz 5:8bab0f419849 55 /** @addtogroup Components
Wolfgang Betz 5:8bab0f419849 56 * @{
Wolfgang Betz 5:8bab0f419849 57 */
Wolfgang Betz 5:8bab0f419849 58
Wolfgang Betz 5:8bab0f419849 59 /** @addtogroup IMU_6AXES
Wolfgang Betz 5:8bab0f419849 60 * @{
Wolfgang Betz 5:8bab0f419849 61 */
Wolfgang Betz 5:8bab0f419849 62
Wolfgang Betz 5:8bab0f419849 63 /** @defgroup IMU_6AXES_Exported_Types
Wolfgang Betz 5:8bab0f419849 64 * @{
Wolfgang Betz 5:8bab0f419849 65 */
Wolfgang Betz 5:8bab0f419849 66
Wolfgang Betz 5:8bab0f419849 67 /**
Wolfgang Betz 5:8bab0f419849 68 * @brief IMU_6AXES init structure definition
Wolfgang Betz 5:8bab0f419849 69 */
Wolfgang Betz 5:8bab0f419849 70 typedef struct
Wolfgang Betz 5:8bab0f419849 71 {
Wolfgang Betz 5:8bab0f419849 72 uint8_t G_OutputDataRate;
Wolfgang Betz 5:8bab0f419849 73 uint8_t G_FullScale;
Wolfgang Betz 5:8bab0f419849 74 uint8_t G_X_Axis;
Wolfgang Betz 5:8bab0f419849 75 uint8_t G_Y_Axis;
Wolfgang Betz 5:8bab0f419849 76 uint8_t G_Z_Axis;
Wolfgang Betz 5:8bab0f419849 77 uint8_t X_OutputDataRate;
Wolfgang Betz 5:8bab0f419849 78 uint8_t X_FullScale;
Wolfgang Betz 5:8bab0f419849 79 uint8_t X_X_Axis;
Wolfgang Betz 5:8bab0f419849 80 uint8_t X_Y_Axis;
Wolfgang Betz 5:8bab0f419849 81 uint8_t X_Z_Axis;
Wolfgang Betz 5:8bab0f419849 82 }IMU_6AXES_InitTypeDef;
Wolfgang Betz 5:8bab0f419849 83
Wolfgang Betz 5:8bab0f419849 84 /**
Wolfgang Betz 5:8bab0f419849 85 * @brief IMU_6AXES status enumerator definition
Wolfgang Betz 5:8bab0f419849 86 */
Wolfgang Betz 5:8bab0f419849 87 typedef enum {
Wolfgang Betz 5:8bab0f419849 88 IMU_6AXES_OK = 0,
Wolfgang Betz 5:8bab0f419849 89 IMU_6AXES_ERROR = 1,
Wolfgang Betz 5:8bab0f419849 90 IMU_6AXES_TIMEOUT = 2,
Wolfgang Betz 5:8bab0f419849 91 IMU_6AXES_NOT_IMPLEMENTED = 3
Wolfgang Betz 5:8bab0f419849 92 } IMU_6AXES_StatusTypeDef;
Wolfgang Betz 5:8bab0f419849 93
Wolfgang Betz 5:8bab0f419849 94 /**
Wolfgang Betz 5:8bab0f419849 95 * @brief IMU_6AXES component id enumerator definition
Wolfgang Betz 5:8bab0f419849 96 */
Wolfgang Betz 5:8bab0f419849 97 typedef enum {
Wolfgang Betz 5:8bab0f419849 98 IMU_6AXES_NONE_COMPONENT = 0,
Wolfgang Betz 5:8bab0f419849 99 IMU_6AXES_LSM6DS0_COMPONENT = 1,
Wolfgang Betz 5:8bab0f419849 100 IMU_6AXES_LSM6DS3_DIL24_COMPONENT = 2
Wolfgang Betz 5:8bab0f419849 101 } IMU_6AXES_ComponentTypeDef;
Wolfgang Betz 5:8bab0f419849 102
Wolfgang Betz 5:8bab0f419849 103 /**
Wolfgang Betz 5:8bab0f419849 104 * @brief IMU_6AXES driver extended structure definition
Wolfgang Betz 5:8bab0f419849 105 */
Wolfgang Betz 5:8bab0f419849 106 typedef struct {
Wolfgang Betz 5:8bab0f419849 107 IMU_6AXES_ComponentTypeDef id; /* This id must be unique for each component belonging to this class that wants to extend common class */
Wolfgang Betz 5:8bab0f419849 108 void *pData; /* This pointer is specific for each component */
Wolfgang Betz 5:8bab0f419849 109 }IMU_6AXES_DrvExtTypeDef;
Wolfgang Betz 5:8bab0f419849 110
Wolfgang Betz 5:8bab0f419849 111 /**
Wolfgang Betz 5:8bab0f419849 112 * @brief IMU_6AXES driver structure definition
Wolfgang Betz 5:8bab0f419849 113 */
Wolfgang Betz 5:8bab0f419849 114 typedef struct {
Wolfgang Betz 5:8bab0f419849 115 IMU_6AXES_StatusTypeDef (*Init)(IMU_6AXES_InitTypeDef *);
Wolfgang Betz 5:8bab0f419849 116 IMU_6AXES_StatusTypeDef (*Read_XG_ID)(uint8_t *);
Wolfgang Betz 5:8bab0f419849 117 IMU_6AXES_StatusTypeDef (*Get_X_Axes)(int32_t *);
Wolfgang Betz 5:8bab0f419849 118 IMU_6AXES_StatusTypeDef (*Get_G_Axes)(int32_t *);
Wolfgang Betz 5:8bab0f419849 119 IMU_6AXES_StatusTypeDef (*Get_X_Sensitivity) (float *);
Wolfgang Betz 5:8bab0f419849 120 IMU_6AXES_StatusTypeDef (*Get_G_Sensitivity) (float *);
Wolfgang Betz 5:8bab0f419849 121 IMU_6AXES_DrvExtTypeDef *extData;
Wolfgang Betz 5:8bab0f419849 122 }IMU_6AXES_DrvTypeDef;
Wolfgang Betz 5:8bab0f419849 123
Wolfgang Betz 5:8bab0f419849 124 /**
Wolfgang Betz 5:8bab0f419849 125 * @}
Wolfgang Betz 5:8bab0f419849 126 */
Wolfgang Betz 5:8bab0f419849 127
Wolfgang Betz 5:8bab0f419849 128 /**
Wolfgang Betz 5:8bab0f419849 129 * @}
Wolfgang Betz 5:8bab0f419849 130 */
Wolfgang Betz 5:8bab0f419849 131
Wolfgang Betz 5:8bab0f419849 132 /**
Wolfgang Betz 5:8bab0f419849 133 * @}
Wolfgang Betz 5:8bab0f419849 134 */
Wolfgang Betz 5:8bab0f419849 135
Wolfgang Betz 5:8bab0f419849 136 /**
Wolfgang Betz 5:8bab0f419849 137 * @}
Wolfgang Betz 5:8bab0f419849 138 */
Wolfgang Betz 5:8bab0f419849 139
Wolfgang Betz 5:8bab0f419849 140 #ifdef __cplusplus
Wolfgang Betz 5:8bab0f419849 141 }
Wolfgang Betz 5:8bab0f419849 142 #endif
Wolfgang Betz 5:8bab0f419849 143
Wolfgang Betz 5:8bab0f419849 144 #endif /* __IMU_6AXES_H */
Wolfgang Betz 5:8bab0f419849 145
Wolfgang Betz 5:8bab0f419849 146 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/