Multitech mDot/UDK support.

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_IKS01A1 by ST

Committer:
Wolfgang Betz
Date:
Mon Jun 08 15:36:36 2015 +0200
Revision:
44:d757094f6229
Add LSM6DS3 component

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 44:d757094f6229 1 /**
Wolfgang Betz 44:d757094f6229 2 ******************************************************************************
Wolfgang Betz 44:d757094f6229 3 * @file lsm6ds3.h
Wolfgang Betz 44:d757094f6229 4 * @author MEMS Application Team
Wolfgang Betz 44:d757094f6229 5 * @version V1.2.0
Wolfgang Betz 44:d757094f6229 6 * @date 28-May-2015
Wolfgang Betz 44:d757094f6229 7 * @brief This file contains definitions for the lsm6ds3.c firmware driver
Wolfgang Betz 44:d757094f6229 8 ******************************************************************************
Wolfgang Betz 44:d757094f6229 9 * @attention
Wolfgang Betz 44:d757094f6229 10 *
Wolfgang Betz 44:d757094f6229 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Wolfgang Betz 44:d757094f6229 12 *
Wolfgang Betz 44:d757094f6229 13 * Redistribution and use in source and binary forms, with or without modification,
Wolfgang Betz 44:d757094f6229 14 * are permitted provided that the following conditions are met:
Wolfgang Betz 44:d757094f6229 15 * 1. Redistributions of source code must retain the above copyright notice,
Wolfgang Betz 44:d757094f6229 16 * this list of conditions and the following disclaimer.
Wolfgang Betz 44:d757094f6229 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Wolfgang Betz 44:d757094f6229 18 * this list of conditions and the following disclaimer in the documentation
Wolfgang Betz 44:d757094f6229 19 * and/or other materials provided with the distribution.
Wolfgang Betz 44:d757094f6229 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Wolfgang Betz 44:d757094f6229 21 * may be used to endorse or promote products derived from this software
Wolfgang Betz 44:d757094f6229 22 * without specific prior written permission.
Wolfgang Betz 44:d757094f6229 23 *
Wolfgang Betz 44:d757094f6229 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Wolfgang Betz 44:d757094f6229 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Wolfgang Betz 44:d757094f6229 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Wolfgang Betz 44:d757094f6229 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Wolfgang Betz 44:d757094f6229 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Wolfgang Betz 44:d757094f6229 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Wolfgang Betz 44:d757094f6229 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Wolfgang Betz 44:d757094f6229 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Wolfgang Betz 44:d757094f6229 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Wolfgang Betz 44:d757094f6229 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wolfgang Betz 44:d757094f6229 34 *
Wolfgang Betz 44:d757094f6229 35 ******************************************************************************
Wolfgang Betz 44:d757094f6229 36 */
Wolfgang Betz 44:d757094f6229 37
Wolfgang Betz 44:d757094f6229 38 /* Define to prevent recursive inclusion -------------------------------------*/
Wolfgang Betz 44:d757094f6229 39 #ifndef __LSM6DS3_H
Wolfgang Betz 44:d757094f6229 40 #define __LSM6DS3_H
Wolfgang Betz 44:d757094f6229 41
Wolfgang Betz 44:d757094f6229 42 #ifdef __cplusplus
Wolfgang Betz 44:d757094f6229 43 extern "C" {
Wolfgang Betz 44:d757094f6229 44 #endif
Wolfgang Betz 44:d757094f6229 45
Wolfgang Betz 44:d757094f6229 46 /* Includes ------------------------------------------------------------------*/
Wolfgang Betz 44:d757094f6229 47 #include "imu_6axes.h"
Wolfgang Betz 44:d757094f6229 48
Wolfgang Betz 44:d757094f6229 49 /** @addtogroup BSP
Wolfgang Betz 44:d757094f6229 50 * @{
Wolfgang Betz 44:d757094f6229 51 */
Wolfgang Betz 44:d757094f6229 52
Wolfgang Betz 44:d757094f6229 53 /** @addtogroup Components
Wolfgang Betz 44:d757094f6229 54 * @{
Wolfgang Betz 44:d757094f6229 55 */
Wolfgang Betz 44:d757094f6229 56
Wolfgang Betz 44:d757094f6229 57 /** @addtogroup LSM6DS3
Wolfgang Betz 44:d757094f6229 58 * @{
Wolfgang Betz 44:d757094f6229 59 */
Wolfgang Betz 44:d757094f6229 60
Wolfgang Betz 44:d757094f6229 61 /** @addtogroup LSM6DS3_Exported_Defines LSM6DS3_Exported_Defines
Wolfgang Betz 44:d757094f6229 62 * @{
Wolfgang Betz 44:d757094f6229 63 */
Wolfgang Betz 44:d757094f6229 64 #ifndef NULL
Wolfgang Betz 44:d757094f6229 65 #define NULL (void *) 0
Wolfgang Betz 44:d757094f6229 66 #endif
Wolfgang Betz 44:d757094f6229 67
Wolfgang Betz 44:d757094f6229 68 /******************************************************************************/
Wolfgang Betz 44:d757094f6229 69 /*********** START ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/
Wolfgang Betz 44:d757094f6229 70 /******************************************************************************/
Wolfgang Betz 44:d757094f6229 71
Wolfgang Betz 44:d757094f6229 72
Wolfgang Betz 44:d757094f6229 73 /***************************************** COMMON REGISTERS ********************************************/
Wolfgang Betz 44:d757094f6229 74
Wolfgang Betz 44:d757094f6229 75 /**
Wolfgang Betz 44:d757094f6229 76 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 77 * \code
Wolfgang Betz 44:d757094f6229 78 * Read/write
Wolfgang Betz 44:d757094f6229 79 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 80 * [7] FUNC_CFG_EN: Enable access to the embedded functions configuration registers (1) from address 02h to 32h. Default value: 0.
Wolfgang Betz 44:d757094f6229 81 * [6:0] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 82 * \endcode
Wolfgang Betz 44:d757094f6229 83 */
Wolfgang Betz 44:d757094f6229 84 #define LSM6DS3_XG_FUNC_CFG_ACCESS 0x01
Wolfgang Betz 44:d757094f6229 85
Wolfgang Betz 44:d757094f6229 86 /**
Wolfgang Betz 44:d757094f6229 87 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 88 * \code
Wolfgang Betz 44:d757094f6229 89 * Read/write
Wolfgang Betz 44:d757094f6229 90 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 91 * [7:0] TPH_[7:0]: Sensor SyncronizationTime Frame with the step of 500ms and full range of 5s. Default: 0000 0000
Wolfgang Betz 44:d757094f6229 92 * \endcode
Wolfgang Betz 44:d757094f6229 93 */
Wolfgang Betz 44:d757094f6229 94 #define LSM6DS3_XG_SENSOR_SYNC_TIME_FRAME 0x04
Wolfgang Betz 44:d757094f6229 95
Wolfgang Betz 44:d757094f6229 96 /**
Wolfgang Betz 44:d757094f6229 97 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 98 * \code
Wolfgang Betz 44:d757094f6229 99 * Read/write
Wolfgang Betz 44:d757094f6229 100 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 101 * [7:2] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 102 * [1] HP_RST: Gyro digital HP filter reset. Default: 0
Wolfgang Betz 44:d757094f6229 103 * [1] SENSOR_SYNC_ENHP_RST: Enable sensor synchronization feature. Default 0
Wolfgang Betz 44:d757094f6229 104 * \endcode
Wolfgang Betz 44:d757094f6229 105 */
Wolfgang Betz 44:d757094f6229 106 #define LSM6DS3_XG_SENSOR_SYNC_ENABLE 0x05
Wolfgang Betz 44:d757094f6229 107
Wolfgang Betz 44:d757094f6229 108
Wolfgang Betz 44:d757094f6229 109 /**
Wolfgang Betz 44:d757094f6229 110 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 111 * \code
Wolfgang Betz 44:d757094f6229 112 * Read/write
Wolfgang Betz 44:d757094f6229 113 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 114 * [7:0] FTH_7-0 FIFO threshold level setting - watermark flag is toggled when the number of bytes written to FIFO is greater or equal to threshold level.
Wolfgang Betz 44:d757094f6229 115 * \endcode
Wolfgang Betz 44:d757094f6229 116 */
Wolfgang Betz 44:d757094f6229 117 #define LSM6DS3_XG_FIFO_CTRL1 0x06
Wolfgang Betz 44:d757094f6229 118
Wolfgang Betz 44:d757094f6229 119 /**
Wolfgang Betz 44:d757094f6229 120 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 121 * \code
Wolfgang Betz 44:d757094f6229 122 * Read/write
Wolfgang Betz 44:d757094f6229 123 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 124 * [7] TIMER_PEDO_FIFO_EN: Enable Pedometer step counter and time stamp as 4th sensor FIFO data. Default: 0 disabled
Wolfgang Betz 44:d757094f6229 125 * [6] TIMER_PEDO_FIFO_DRDY : Pedometer FIFO write mode. Default: 0 disabled
Wolfgang Betz 44:d757094f6229 126 * [5:4] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 127 * [3:0] FTH_[11:8] FIFO threshold level setting(1). Default value: 0000
Wolfgang Betz 44:d757094f6229 128 * \endcode
Wolfgang Betz 44:d757094f6229 129 */
Wolfgang Betz 44:d757094f6229 130 #define LSM6DS3_XG_FIFO_CTRL2 0x07
Wolfgang Betz 44:d757094f6229 131
Wolfgang Betz 44:d757094f6229 132 /**
Wolfgang Betz 44:d757094f6229 133 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 134 * \code
Wolfgang Betz 44:d757094f6229 135 * Read/write
Wolfgang Betz 44:d757094f6229 136 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 137 * [7:6] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 138 * [5:3] DEC_FIFO_GYRO[2:0]: Gyro FIFO decimation setting. Default value: 000
Wolfgang Betz 44:d757094f6229 139 * [2:0] DEC_FIFO_XL[2:0]: XL FIFO decimation setting. Default value: 000
Wolfgang Betz 44:d757094f6229 140 * \endcode
Wolfgang Betz 44:d757094f6229 141 */
Wolfgang Betz 44:d757094f6229 142 #define LSM6DS3_XG_FIFO_CTRL3 0x08
Wolfgang Betz 44:d757094f6229 143
Wolfgang Betz 44:d757094f6229 144 /**
Wolfgang Betz 44:d757094f6229 145 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 146 * \code
Wolfgang Betz 44:d757094f6229 147 * Read/write
Wolfgang Betz 44:d757094f6229 148 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 149 * [7] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 150 * [6] ONLY_HIGH_DATA :8 bit data storing in FIFO. Default: 0
Wolfgang Betz 44:d757094f6229 151 * [5:3] DEC_SLV1_FIFO[2:0] Second external sensor FIFO decimation setting. Default: 000
Wolfgang Betz 44:d757094f6229 152 * [2:0] DEC_SLV1_FIFO[2:0] First external sensor FIFO decimation setting. Default: 000
Wolfgang Betz 44:d757094f6229 153 * \endcode
Wolfgang Betz 44:d757094f6229 154 */
Wolfgang Betz 44:d757094f6229 155 #define LSM6DS3_XG_FIFO_CTRL4 0x09
Wolfgang Betz 44:d757094f6229 156
Wolfgang Betz 44:d757094f6229 157
Wolfgang Betz 44:d757094f6229 158 /**
Wolfgang Betz 44:d757094f6229 159 * @brief FIFO control register
Wolfgang Betz 44:d757094f6229 160 * \code
Wolfgang Betz 44:d757094f6229 161 * Read/write
Wolfgang Betz 44:d757094f6229 162 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 163 * [7] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 164 * [6:3] ODR_FIFO_[3:0]: FIFO ODR selection. Default: 0000
Wolfgang Betz 44:d757094f6229 165 * [2:0] FIFO_MODE_[2:0] : FIFO mode selection bits. Default value: 000
Wolfgang Betz 44:d757094f6229 166 * \endcode
Wolfgang Betz 44:d757094f6229 167 */
Wolfgang Betz 44:d757094f6229 168 #define LSM6DS3_XG_FIFO_CTRL5 0x0A
Wolfgang Betz 44:d757094f6229 169
Wolfgang Betz 44:d757094f6229 170
Wolfgang Betz 44:d757094f6229 171 /**
Wolfgang Betz 44:d757094f6229 172 * @brief Angular rate sensor sign and orientation register
Wolfgang Betz 44:d757094f6229 173 * \code
Wolfgang Betz 44:d757094f6229 174 * Read/write
Wolfgang Betz 44:d757094f6229 175 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 176 * [7:6] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 177 * [5] SignX_G: Pitch axis (X) Angular rate sign. Default value: 0
Wolfgang Betz 44:d757094f6229 178 * [5] SignY_G: Roll axis (Y) Angular rate sign. Default value: 0
Wolfgang Betz 44:d757094f6229 179 * [5] SignZ_G: Pitch axis (Z) Angular rate sign. Default value: 0
Wolfgang Betz 44:d757094f6229 180 * [2:0] Orient[2:0] : Directional user orientation selection. Default Value: 000
Wolfgang Betz 44:d757094f6229 181 * \endcode
Wolfgang Betz 44:d757094f6229 182 */
Wolfgang Betz 44:d757094f6229 183 #define LSM6DS3_XG_ORIENT_CFG_G 0x0B
Wolfgang Betz 44:d757094f6229 184
Wolfgang Betz 44:d757094f6229 185 /**
Wolfgang Betz 44:d757094f6229 186 * @brief INT1 pad control registrer
Wolfgang Betz 44:d757094f6229 187 * \code
Wolfgang Betz 44:d757094f6229 188 * Read/write
Wolfgang Betz 44:d757094f6229 189 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 190 * [7] INT1_PEDO: Pedometer step recognition interrupt enable on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 191 * [6] INT1_SIGN_MOT: Significant motion interrupt enable on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 192 * [5] INT1_FULL_FLAG: Full flag Interrupt Enable on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 193 * [4] INT1_OVR: Overrun Interrupt on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 194 * [3] INT1_FTH: FIFO threshold interrupt on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 195 * [2] INT1_BOOT: Overrun Interrupt on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 196 * [1] INT1_DRDY_G: Gyroscope Data Ready on INT1 pad. Default value: 0.
Wolfgang Betz 44:d757094f6229 197 * [0] INT1_DRDY_XL: Accelerometer Data Ready on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 198 * \endcode
Wolfgang Betz 44:d757094f6229 199 */
Wolfgang Betz 44:d757094f6229 200 #define LSM6DS3_XG_INT1_CTRL 0x0D
Wolfgang Betz 44:d757094f6229 201
Wolfgang Betz 44:d757094f6229 202
Wolfgang Betz 44:d757094f6229 203 //new, done
Wolfgang Betz 44:d757094f6229 204 /**
Wolfgang Betz 44:d757094f6229 205 * @brief INT2 pad control registrer
Wolfgang Betz 44:d757094f6229 206 * \code
Wolfgang Betz 44:d757094f6229 207 * Read/write
Wolfgang Betz 44:d757094f6229 208 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 209 * [7] INT2_PEDO: Pedometer step recognition interrupt enable on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 210 * [6] INT2_SIGN_MOT: Significant motion interrupt enable on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 211 * [5] INT2_FULL_FLAG: Full flag Interrupt Enable on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 212 * [4] INT2_OVR: Overrun Interrupt on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 213 * [3] INT2_FTH: FIFO threshold interrupt on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 214 * [2] INT2_BOOT: Overrun Interrupt on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 215 * [1] INT2_DRDY_G: Gyroscope Data Ready on INT1 pad. Default value: 0.
Wolfgang Betz 44:d757094f6229 216 * [0] INT2_DRDY_XL: Accelerometer Data Ready on INT1 pad. Default value: 0
Wolfgang Betz 44:d757094f6229 217 * \endcode
Wolfgang Betz 44:d757094f6229 218 */
Wolfgang Betz 44:d757094f6229 219 #define LSM6DS3_XG_INT2_CTRL 0x0E
Wolfgang Betz 44:d757094f6229 220
Wolfgang Betz 44:d757094f6229 221
Wolfgang Betz 44:d757094f6229 222 /**
Wolfgang Betz 44:d757094f6229 223 * @brief Device identifier register.
Wolfgang Betz 44:d757094f6229 224 * \code
Wolfgang Betz 44:d757094f6229 225 * Read
Wolfgang Betz 44:d757094f6229 226 * Default value:69
Wolfgang Betz 44:d757094f6229 227 * [7:0] This read-only register contains the device identifier
Wolfgang Betz 44:d757094f6229 228 * \endcode
Wolfgang Betz 44:d757094f6229 229 */
Wolfgang Betz 44:d757094f6229 230 #define LSM6DS3_XG_WHO_AM_I_ADDR 0x0F
Wolfgang Betz 44:d757094f6229 231
Wolfgang Betz 44:d757094f6229 232
Wolfgang Betz 44:d757094f6229 233 /**
Wolfgang Betz 44:d757094f6229 234 * @brief Control Register 3
Wolfgang Betz 44:d757094f6229 235 * \code
Wolfgang Betz 44:d757094f6229 236 * Read/write
Wolfgang Betz 44:d757094f6229 237 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 238 * [7] BOOT: Reboot memory content. Default value: 0
Wolfgang Betz 44:d757094f6229 239 * [6] BDU: Block Data Update. Default value: 0
Wolfgang Betz 44:d757094f6229 240 * [5] H_LACTIVE: Interrupt activation level. Default value: 0
Wolfgang Betz 44:d757094f6229 241 * [4] PP_OD: Push-pull/Open Drain selection on INT pad. Default value: 0
Wolfgang Betz 44:d757094f6229 242 * [3] SIM: SPI Serial Interface Mode selection. Default value: 0
Wolfgang Betz 44:d757094f6229 243 * [2] IF_INC: Register address automatically incremented during a multiple byte access with a serial interface (I2C or SPI). Default value: 0
Wolfgang Betz 44:d757094f6229 244 * [1] BLE: Big/Little Endian Data Selection. Default value: 0
Wolfgang Betz 44:d757094f6229 245 * [0] SW_RESET: Software Reset. Default value: 0
Wolfgang Betz 44:d757094f6229 246 * \endcode
Wolfgang Betz 44:d757094f6229 247 */
Wolfgang Betz 44:d757094f6229 248 #define LSM6DS3_XG_CTRL3_C 0x12
Wolfgang Betz 44:d757094f6229 249
Wolfgang Betz 44:d757094f6229 250 /**
Wolfgang Betz 44:d757094f6229 251 * @brief Control Register 4
Wolfgang Betz 44:d757094f6229 252 * \code
Wolfgang Betz 44:d757094f6229 253 * Read/write
Wolfgang Betz 44:d757094f6229 254 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 255 * [7] BW_SCAL_ODR: Accelerometer bandwidth selection. Default value: 0
Wolfgang Betz 44:d757094f6229 256 * [6] SLEEP_G: Gyroscope sleep mode enable. Default value: 0
Wolfgang Betz 44:d757094f6229 257 * [5] INT2_on_INT1: All interrupt signals available on INT1 pad enable. Default value: 0
Wolfgang Betz 44:d757094f6229 258 * [4] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 259 * [3] DRDY_MASK: Configuration 1(3) Data Available Enable bit. Default Value: 0
Wolfgang Betz 44:d757094f6229 260 * [2] I2C_disable Disable I2C interface. Default value: 0
Wolfgang Betz 44:d757094f6229 261 * [1] MODE3_EN Enable auxiliary SPI interface (Mode3, refer to Table 1.). Default value: 0
Wolfgang Betz 44:d757094f6229 262 * [0] STOP_ON_FTH Enable FIFO threshold level use. Default value: 0.
Wolfgang Betz 44:d757094f6229 263
Wolfgang Betz 44:d757094f6229 264 * \endcode
Wolfgang Betz 44:d757094f6229 265 */
Wolfgang Betz 44:d757094f6229 266 #define LSM6DS3_XG_CTRL4_C 0x13
Wolfgang Betz 44:d757094f6229 267
Wolfgang Betz 44:d757094f6229 268 /**
Wolfgang Betz 44:d757094f6229 269 * @brief Control Register 4
Wolfgang Betz 44:d757094f6229 270 * \code
Wolfgang Betz 44:d757094f6229 271 * Read/write
Wolfgang Betz 44:d757094f6229 272 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 273 * [7:4] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 274 * [3:2] ST_G[1:0]: Angular rate sensor Self Test Enable. Default value: 00
Wolfgang Betz 44:d757094f6229 275 * [1:0] ST_XL[1:0]: Linear acceleration sensor Self Test Enable. Default value: 00
Wolfgang Betz 44:d757094f6229 276 * \endcode
Wolfgang Betz 44:d757094f6229 277 */
Wolfgang Betz 44:d757094f6229 278 #define LSM6DS3_XG_CTRL5_C 0x14
Wolfgang Betz 44:d757094f6229 279
Wolfgang Betz 44:d757094f6229 280
Wolfgang Betz 44:d757094f6229 281 /**
Wolfgang Betz 44:d757094f6229 282 * @brief Control Register 10
Wolfgang Betz 44:d757094f6229 283 * \code
Wolfgang Betz 44:d757094f6229 284 * Read/write
Wolfgang Betz 44:d757094f6229 285 * Default value: 0x38
Wolfgang Betz 44:d757094f6229 286 * [7:6] These bits must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 287 * [5] Zen_G: Gyroscope�s Z-axis output enable. Default value: 1
Wolfgang Betz 44:d757094f6229 288 * [4] Yen_G: Gyroscope�s Y-axis output enable. Default value: 1
Wolfgang Betz 44:d757094f6229 289 * [3] Xen_G: Gyroscope�s X-axis output enable. Default value: 1
Wolfgang Betz 44:d757094f6229 290 * [2] FUNC_EN: Enable embedded functionalities (pedometer, tilt and significant motion) . Default value: 0
Wolfgang Betz 44:d757094f6229 291 * [1] PEDO_RST_STEP: Reset pedometer step counter . Default value: 0
Wolfgang Betz 44:d757094f6229 292 * [0] SIGN_MOTION_EN: Enable significant motion function. For a correct functionality of significant motion function, TILT_EN bit in FUNC_SRC (53h) register must be set to 1 . Default value: 1
Wolfgang Betz 44:d757094f6229 293 * \endcode
Wolfgang Betz 44:d757094f6229 294 */
Wolfgang Betz 44:d757094f6229 295 #define LSM6DS3_XG_CTRL10_C 0x19
Wolfgang Betz 44:d757094f6229 296
Wolfgang Betz 44:d757094f6229 297
Wolfgang Betz 44:d757094f6229 298 /**
Wolfgang Betz 44:d757094f6229 299 * @brief Sensor hub Master config Register
Wolfgang Betz 44:d757094f6229 300 * \code
Wolfgang Betz 44:d757094f6229 301 * Read/write
Wolfgang Betz 44:d757094f6229 302 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 303 * [7] DRDY_ON_INT1:Manage the DRDY signal on INT1 pad. Default: 0
Wolfgang Betz 44:d757094f6229 304 * [6] DATA_VALID_SEL_FIFO: Selection of FIFO data-valid signal. Default value: 0
Wolfgang Betz 44:d757094f6229 305 * [5] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 306 * [4] START_CONFIG: Sensor Hub trigger signal selection. Default value: 0
Wolfgang Betz 44:d757094f6229 307 * [3] PULL_UP_EN: Auxiliary I2C pull-up. Default value: 0
Wolfgang Betz 44:d757094f6229 308 * [2] PASS_THROUGH_MODE: I2C interface pass-through. Default value: 0
Wolfgang Betz 44:d757094f6229 309 * [1] IRON_EN:Enable soft iron correction algorithm for magnetometer. Default value: 0.
Wolfgang Betz 44:d757094f6229 310 * [0] MASTER_ON: Sensor Hub I2C master enable. Default: 0
Wolfgang Betz 44:d757094f6229 311 * \endcode
Wolfgang Betz 44:d757094f6229 312 */
Wolfgang Betz 44:d757094f6229 313 #define LSM6DS3_XG_MASTER_CONFIG 0x1A
Wolfgang Betz 44:d757094f6229 314
Wolfgang Betz 44:d757094f6229 315
Wolfgang Betz 44:d757094f6229 316 /**
Wolfgang Betz 44:d757094f6229 317 * @brief Wake up interrupt source register
Wolfgang Betz 44:d757094f6229 318 * \code
Wolfgang Betz 44:d757094f6229 319 * Read
Wolfgang Betz 44:d757094f6229 320 * Default value: output
Wolfgang Betz 44:d757094f6229 321 * [7:6] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 322 * [5] FF_IA: Free fall event detection status. Default: 0
Wolfgang Betz 44:d757094f6229 323 * [4] SLEEP_STATE_IA: Sleep event status. Default value: 0
Wolfgang Betz 44:d757094f6229 324 * [3] WU_IA: Wake up event detection status. Default
Wolfgang Betz 44:d757094f6229 325 * [2] X_WU: detection status on X axis. Default value: 0
Wolfgang Betz 44:d757094f6229 326 * [1] Y_WU: detection status on Y axis. Default value: 0
Wolfgang Betz 44:d757094f6229 327 * [0] Z_WU: detection status on Z axis. Default value: 0
Wolfgang Betz 44:d757094f6229 328 * \endcode
Wolfgang Betz 44:d757094f6229 329 */
Wolfgang Betz 44:d757094f6229 330 #define LSM6DS3_XG_WAKE_UP_SRC 0x1B
Wolfgang Betz 44:d757094f6229 331
Wolfgang Betz 44:d757094f6229 332 /**
Wolfgang Betz 44:d757094f6229 333 * @brief Tap source register
Wolfgang Betz 44:d757094f6229 334 * \code
Wolfgang Betz 44:d757094f6229 335 * Read
Wolfgang Betz 44:d757094f6229 336 * Default value: output
Wolfgang Betz 44:d757094f6229 337 * [7] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 338 * [6] TAP_IA: Tap event detection status. Default: 0
Wolfgang Betz 44:d757094f6229 339 * [5] SINGLE_TAP: Single tap event status. Default value: 0
Wolfgang Betz 44:d757094f6229 340 * [4] DOUBLE_TAP: Double tap event detection status. Default value: 0
Wolfgang Betz 44:d757094f6229 341 * [3] TAP_SIGN: Sign of acceleration detected by tap event. Default: 0
Wolfgang Betz 44:d757094f6229 342 * [2] X_TAP: Tap event detection status on X axis. Default value: 0
Wolfgang Betz 44:d757094f6229 343 * [1] Y_TAP: Tap event detection status on Y axis. Default value: 0
Wolfgang Betz 44:d757094f6229 344 * [0] Z_TAP: Tap event detection status on Z axis. Default value: 0
Wolfgang Betz 44:d757094f6229 345 * \endcode
Wolfgang Betz 44:d757094f6229 346 */
Wolfgang Betz 44:d757094f6229 347 #define LSM6DS3_XG_TAP_SRC 0x1C
Wolfgang Betz 44:d757094f6229 348
Wolfgang Betz 44:d757094f6229 349 /**
Wolfgang Betz 44:d757094f6229 350 * @brief Portrait, landscape face-up and face-down source register
Wolfgang Betz 44:d757094f6229 351 * \code
Wolfgang Betz 44:d757094f6229 352 * Read
Wolfgang Betz 44:d757094f6229 353 * Default value: output
Wolfgang Betz 44:d757094f6229 354 * [7] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 355 * [6] D6D_IA: Interrupt active for change position portrait, landscape, face-up, face-down. Default value: 0
Wolfgang Betz 44:d757094f6229 356 * [5] ZH: Z-axis high event (over-threshold). Default value: 0
Wolfgang Betz 44:d757094f6229 357 * [4] ZL: Z-axis low event (under-threshold). Default value: 0
Wolfgang Betz 44:d757094f6229 358 * [5] YH: Y-axis high event (over-threshold). Default value: 0
Wolfgang Betz 44:d757094f6229 359 * [4] YL: Y-axis low event (under-threshold). Default value: 0
Wolfgang Betz 44:d757094f6229 360 * [5] X_H: X-axis high event (over-threshold). Default value: 0
Wolfgang Betz 44:d757094f6229 361 * [4] X_L: X-axis low event (under-threshold). Default value: 0
Wolfgang Betz 44:d757094f6229 362 * \endcode
Wolfgang Betz 44:d757094f6229 363 */
Wolfgang Betz 44:d757094f6229 364 #define LSM6DS3_XG_D6D_SRC 0x1D
Wolfgang Betz 44:d757094f6229 365
Wolfgang Betz 44:d757094f6229 366 /**
Wolfgang Betz 44:d757094f6229 367 * @brief Status register
Wolfgang Betz 44:d757094f6229 368 * \code
Wolfgang Betz 44:d757094f6229 369 * Read
Wolfgang Betz 44:d757094f6229 370 * Default value: output
Wolfgang Betz 44:d757094f6229 371 * [7:4] No meaning set
Wolfgang Betz 44:d757094f6229 372 * [3] EV_BOOT: Boot running flag signal. Default value: 0
Wolfgang Betz 44:d757094f6229 373 * [2] No meaning set
Wolfgang Betz 44:d757094f6229 374 * [1] GDA: Gyroscope new data avaialble. Default value: 0
Wolfgang Betz 44:d757094f6229 375 * [0] XLDA: Accelerometer new data avaialble. Default value: 0
Wolfgang Betz 44:d757094f6229 376 * \endcode
Wolfgang Betz 44:d757094f6229 377 */
Wolfgang Betz 44:d757094f6229 378 #define LSM6DS3_XG_STATUS_REG 0x1E
Wolfgang Betz 44:d757094f6229 379
Wolfgang Betz 44:d757094f6229 380 /**
Wolfgang Betz 44:d757094f6229 381 * @brief FIFO status control register
Wolfgang Betz 44:d757094f6229 382 * \code
Wolfgang Betz 44:d757094f6229 383 * Read
Wolfgang Betz 44:d757094f6229 384 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 385 * [7:0] DIFF_FIFO_[7:0]: Number of unread words (16 bit axes) stored in FIFO . For a complete number of unread samples, consider DIFF_FIFO [11:8] in FIFO_STATUS2 (3Bh)
Wolfgang Betz 44:d757094f6229 386 * \endcode
Wolfgang Betz 44:d757094f6229 387 */
Wolfgang Betz 44:d757094f6229 388 #define LSM6DS3_XG_FIFO_STATUS1 0x3A
Wolfgang Betz 44:d757094f6229 389
Wolfgang Betz 44:d757094f6229 390 /**
Wolfgang Betz 44:d757094f6229 391 * @brief FIFO status control register (r). For a proper reading of the register it is suggested to set BDU bit in CTRL3_C (12h) to 0.
Wolfgang Betz 44:d757094f6229 392 * \code
Wolfgang Betz 44:d757094f6229 393 * Read
Wolfgang Betz 44:d757094f6229 394 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 395 * [7] FTH FIFO watermark status. Deafult value: 0
Wolfgang Betz 44:d757094f6229 396 * [6] OVER_RUN: FIFO overrun status. Default value: 0
Wolfgang Betz 44:d757094f6229 397 * [5] FIFO_FULL: FIFO full status. Default value: 0
Wolfgang Betz 44:d757094f6229 398 * [5] FIFO_EMPTY: FIFO empty bit. Default value: 0; 0: FIFO contains data; 1: FIFO is empty
Wolfgang Betz 44:d757094f6229 399 * [3:0] DIFF_FIFO_[11:8] Number of unread words (16 bit axes) stored in FIFO : For a complete number of unread samples, consider DIFF_FIFO [11:8] in FIFO_STATUS1 (3Ah)
Wolfgang Betz 44:d757094f6229 400 * \endcode
Wolfgang Betz 44:d757094f6229 401 */
Wolfgang Betz 44:d757094f6229 402 #define LSM6DS3_XG_FIFO_STATUS2 0x3B
Wolfgang Betz 44:d757094f6229 403
Wolfgang Betz 44:d757094f6229 404 /**
Wolfgang Betz 44:d757094f6229 405 * @brief FIFO status control register (r). For a proper reading of the register it is suggested to set BDU bit in CTRL3_C (12h) to 0
Wolfgang Betz 44:d757094f6229 406 * \code
Wolfgang Betz 44:d757094f6229 407 * Read
Wolfgang Betz 44:d757094f6229 408 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 409 * [7:0] FIFO_PATTERN_[7:0] : Word of recursive pattern read at the next reading
Wolfgang Betz 44:d757094f6229 410 * \endcode
Wolfgang Betz 44:d757094f6229 411 */
Wolfgang Betz 44:d757094f6229 412 #define LSM6DS3_XG_FIFO_STATUS3 0x3C
Wolfgang Betz 44:d757094f6229 413
Wolfgang Betz 44:d757094f6229 414 /**
Wolfgang Betz 44:d757094f6229 415 * @brief FIFO status control register (r). For a proper reading of the register it is suggested to set BDU bit in CTRL3_C (12h) to 0
Wolfgang Betz 44:d757094f6229 416 * \code
Wolfgang Betz 44:d757094f6229 417 * Read
Wolfgang Betz 44:d757094f6229 418 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 419 * [1:0] FIFO_PATTERN_[9:8] : Word of recursive pattern read at the next reading
Wolfgang Betz 44:d757094f6229 420 * \endcode
Wolfgang Betz 44:d757094f6229 421 */
Wolfgang Betz 44:d757094f6229 422 #define LSM6DS3_XG_FIFO_STATUS4 0x3D
Wolfgang Betz 44:d757094f6229 423
Wolfgang Betz 44:d757094f6229 424 /**
Wolfgang Betz 44:d757094f6229 425 * @brief FIFO status control register (r). For a proper reading of the register it is suggested to set BDU bit in CTRL3_C (12h) to 0.
Wolfgang Betz 44:d757094f6229 426 * \code
Wolfgang Betz 44:d757094f6229 427 * Read
Wolfgang Betz 44:d757094f6229 428 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 429 * [4:0] FIFO_PATTERN_[9:8] : Word of recursive pattern read at the next reading
Wolfgang Betz 44:d757094f6229 430 * \endcode
Wolfgang Betz 44:d757094f6229 431 */
Wolfgang Betz 44:d757094f6229 432 #define LSM6DS3_XG_FIFO_STATUS4 0x3D
Wolfgang Betz 44:d757094f6229 433
Wolfgang Betz 44:d757094f6229 434 /**
Wolfgang Betz 44:d757094f6229 435 * @brief FIFO data output register (r). For a proper reading of the register it is suggested to set BDU bit in CTRL3_C (12h) to 0.
Wolfgang Betz 44:d757094f6229 436 * \code
Wolfgang Betz 44:d757094f6229 437 * Read
Wolfgang Betz 44:d757094f6229 438 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 439 * [7:0] DATA_OUT_FIFO_L_[7:0]: FIFO data output (First byte)
Wolfgang Betz 44:d757094f6229 440 * \endcode
Wolfgang Betz 44:d757094f6229 441 */
Wolfgang Betz 44:d757094f6229 442 #define LSM6DS3_XG_FIFO_DATA_OUT_L 0x3E
Wolfgang Betz 44:d757094f6229 443
Wolfgang Betz 44:d757094f6229 444 /**
Wolfgang Betz 44:d757094f6229 445 * @brief FIFO data output register (r). For a proper reading of the register it is suggested to set BDU bit in CTRL3_C (12h) to 0.
Wolfgang Betz 44:d757094f6229 446 * \code
Wolfgang Betz 44:d757094f6229 447 * Read
Wolfgang Betz 44:d757094f6229 448 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 449 * [7:0] DATA_OUT_FIFO_H_[7:0]: FIFO data output (second byte)
Wolfgang Betz 44:d757094f6229 450 * \endcode
Wolfgang Betz 44:d757094f6229 451 */
Wolfgang Betz 44:d757094f6229 452 #define LSM6DS3_XG_FIFO_DATA_OUT_H 0x3F
Wolfgang Betz 44:d757094f6229 453
Wolfgang Betz 44:d757094f6229 454 /**
Wolfgang Betz 44:d757094f6229 455 * @brief Time stamp first byte data output register (r). The value is expressed as 24 bit and the bit resolution is defined by setting value in WAKE_UP_DUR (5Ch).
Wolfgang Betz 44:d757094f6229 456 * \code
Wolfgang Betz 44:d757094f6229 457 * Read
Wolfgang Betz 44:d757094f6229 458 * Default value: output
Wolfgang Betz 44:d757094f6229 459 * [7:0] TIMESTAMP0_[7:0]: FIFO first byte data output
Wolfgang Betz 44:d757094f6229 460 * \endcode
Wolfgang Betz 44:d757094f6229 461 */
Wolfgang Betz 44:d757094f6229 462 #define LSM6DS3_XG_TIMESTAMP0_REG 0x40
Wolfgang Betz 44:d757094f6229 463
Wolfgang Betz 44:d757094f6229 464 /**
Wolfgang Betz 44:d757094f6229 465 * @brief Time stamp second byte data output register (r). The value is expressed as 24 bit and the bit resolution is defined by setting value in WAKE_UP_DUR (5Ch).
Wolfgang Betz 44:d757094f6229 466 * \code
Wolfgang Betz 44:d757094f6229 467 * Read
Wolfgang Betz 44:d757094f6229 468 * Default value: output
Wolfgang Betz 44:d757094f6229 469 * [7:0] TIMESTAMP1_[7:0]: FIFO second byte data output
Wolfgang Betz 44:d757094f6229 470 * \endcode
Wolfgang Betz 44:d757094f6229 471 */
Wolfgang Betz 44:d757094f6229 472 #define LSM6DS3_XG_TIMESTAMP1_REG 0x41
Wolfgang Betz 44:d757094f6229 473
Wolfgang Betz 44:d757094f6229 474 /**
Wolfgang Betz 44:d757094f6229 475 * @brief Time stamp third byte data output register (r). The value is expressed as 24 bit and the bit resolution is defined by setting value in WAKE_UP_DUR (5Ch).
Wolfgang Betz 44:d757094f6229 476 * \code
Wolfgang Betz 44:d757094f6229 477 * Read
Wolfgang Betz 44:d757094f6229 478 * Default value: output
Wolfgang Betz 44:d757094f6229 479 * [7:0] TIMESTAMP2_[7:0]: FIFO third byte data output
Wolfgang Betz 44:d757094f6229 480 * \endcode
Wolfgang Betz 44:d757094f6229 481 */
Wolfgang Betz 44:d757094f6229 482 #define LSM6DS3_XG_TIMESTAMP2_REG 0x42
Wolfgang Betz 44:d757094f6229 483
Wolfgang Betz 44:d757094f6229 484 /**
Wolfgang Betz 44:d757094f6229 485 * @brief Step counter output register (r).
Wolfgang Betz 44:d757094f6229 486 * \code
Wolfgang Betz 44:d757094f6229 487 * Read
Wolfgang Betz 44:d757094f6229 488 * Default value: output
Wolfgang Betz 44:d757094f6229 489 * [7:0] STEP_COUNTER_L_[7:0]: Step counter output (LSbyte)
Wolfgang Betz 44:d757094f6229 490 * \endcode
Wolfgang Betz 44:d757094f6229 491 */
Wolfgang Betz 44:d757094f6229 492 #define LSM6DS3_XG_STEP_COUNTER_L 0x4B
Wolfgang Betz 44:d757094f6229 493
Wolfgang Betz 44:d757094f6229 494 /**
Wolfgang Betz 44:d757094f6229 495 * @brief Step counter output register (r).
Wolfgang Betz 44:d757094f6229 496 * \code
Wolfgang Betz 44:d757094f6229 497 * Read
Wolfgang Betz 44:d757094f6229 498 * Default value: output
Wolfgang Betz 44:d757094f6229 499 * [7:0] STEP_COUNTER_H_[7:0]: Step counter output (MSbyte)
Wolfgang Betz 44:d757094f6229 500 * \endcode
Wolfgang Betz 44:d757094f6229 501 */
Wolfgang Betz 44:d757094f6229 502 #define LSM6DS3_XG_STEP_COUNTER_H 0x4C
Wolfgang Betz 44:d757094f6229 503
Wolfgang Betz 44:d757094f6229 504 /**
Wolfgang Betz 44:d757094f6229 505 * @brief Significant motion, tilt, step detector, soft iron and sensor hub interrupt source register
Wolfgang Betz 44:d757094f6229 506 * \code
Wolfgang Betz 44:d757094f6229 507 * Read
Wolfgang Betz 44:d757094f6229 508 * Default value: output
Wolfgang Betz 44:d757094f6229 509 * [7] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 510 * [6] SIGN_MOTION_IA: Significant motion event detection status. Default value: 0
Wolfgang Betz 44:d757094f6229 511 * [5] TILT_IA: Tilt event detection status. Default value: 0
Wolfgang Betz 44:d757094f6229 512 * [5] STEP_DETECTED: Step detector event detection status. Default value: 0
Wolfgang Betz 44:d757094f6229 513 * [3:2] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 514 * [1] SI_END_OP:Soft iron calculation status. Default value: 0
Wolfgang Betz 44:d757094f6229 515 * [0] SENSORHUB_END_OP:Senso hub communication status. Default value: 0
Wolfgang Betz 44:d757094f6229 516 * \endcode
Wolfgang Betz 44:d757094f6229 517 */
Wolfgang Betz 44:d757094f6229 518 #define LSM6DS3_XG_FUNC_SRC 0x53
Wolfgang Betz 44:d757094f6229 519
Wolfgang Betz 44:d757094f6229 520 /**
Wolfgang Betz 44:d757094f6229 521 * @brief Time stamp, pedometer, tilt, filtering, and tap recognition functions configuration register
Wolfgang Betz 44:d757094f6229 522 * \code
Wolfgang Betz 44:d757094f6229 523 * Read/write
Wolfgang Betz 44:d757094f6229 524 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 525 * [7] TIMER_EN: Time stamp count enable, output data are collected in TIMESTAMP0_REG (40h), TIMESTAMP1_REG (41h), TIMESTAMP2_REG (42h) register. Default: 0
Wolfgang Betz 44:d757094f6229 526 * [6] PEDO_EN: Pedometer algorithm enable(1). Default value: 0
Wolfgang Betz 44:d757094f6229 527 * [5] TILT_EN: Tilt calculation enable.(2) Default value: 0
Wolfgang Betz 44:d757094f6229 528 * [4] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 529 * [3] TAP_X_EN: Enable X direction in tap recognition. Default value: 0
Wolfgang Betz 44:d757094f6229 530 * [2] TAP_Y_EN: Enable Z direction in tap recognition. Default value: 0
Wolfgang Betz 44:d757094f6229 531 * [1] TAP_Z_EN: Enable Z direction in tap recognition. Default value: 0
Wolfgang Betz 44:d757094f6229 532 * [0] LIR: Relatch of the time stamp, pedometer, tilt, filtering, and tap recognition functions routed to PINs.
Wolfgang Betz 44:d757094f6229 533 * \endcode
Wolfgang Betz 44:d757094f6229 534 */
Wolfgang Betz 44:d757094f6229 535 #define LSM6DS3_XG_TAP_CFG 0x58
Wolfgang Betz 44:d757094f6229 536
Wolfgang Betz 44:d757094f6229 537 /**
Wolfgang Betz 44:d757094f6229 538 * @brief Portrait/landscape position and tap function threshold register
Wolfgang Betz 44:d757094f6229 539 * \code
Wolfgang Betz 44:d757094f6229 540 * Read/write
Wolfgang Betz 44:d757094f6229 541 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 542 * [7] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 543 * [6:5] SIXD_THS[1:0]: Threshold for D6D function. Default value: 00
Wolfgang Betz 44:d757094f6229 544 * [4:0] TAP_THS[4:0]: Threshold for tap recognition. Default value: 0000
Wolfgang Betz 44:d757094f6229 545 * \endcode
Wolfgang Betz 44:d757094f6229 546 */
Wolfgang Betz 44:d757094f6229 547 #define LSM6DS3_XG_TAP_THS_6D 0x59
Wolfgang Betz 44:d757094f6229 548
Wolfgang Betz 44:d757094f6229 549 /**
Wolfgang Betz 44:d757094f6229 550 * @brief Tap recognition function setting register (r/w)
Wolfgang Betz 44:d757094f6229 551 * \code
Wolfgang Betz 44:d757094f6229 552 * Read/write
Wolfgang Betz 44:d757094f6229 553 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 554 * [7:4] DUR[3:0]: Duration of maximum time gap for double tap recognition. Default: 0000
Wolfgang Betz 44:d757094f6229 555 * [3:2] QUIET[1:0]: Expected quiet time after a tap detection. Default value: 00
Wolfgang Betz 44:d757094f6229 556 * [1:0] SHOCK[1:0]: Maximum duration of over-threshold event. Default value: 00
Wolfgang Betz 44:d757094f6229 557 * \endcode
Wolfgang Betz 44:d757094f6229 558 */
Wolfgang Betz 44:d757094f6229 559 #define LSM6DS3_XG_INT_DUR2 0x5A
Wolfgang Betz 44:d757094f6229 560
Wolfgang Betz 44:d757094f6229 561 /**
Wolfgang Betz 44:d757094f6229 562 * @brief Tap recognition function setting register
Wolfgang Betz 44:d757094f6229 563 * \code
Wolfgang Betz 44:d757094f6229 564 * Read/write
Wolfgang Betz 44:d757094f6229 565 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 566 * [7] SINGLE_DOUBLE_TAP: Single/double tap event detection. Default: 0
Wolfgang Betz 44:d757094f6229 567 * [6] INACTIVITY: Inactivity event enable. Default value: 0
Wolfgang Betz 44:d757094f6229 568 * [5:0] WK_THS[5:0]:Threshold for wake-up. Default value: 0000
Wolfgang Betz 44:d757094f6229 569 * \endcode
Wolfgang Betz 44:d757094f6229 570 */
Wolfgang Betz 44:d757094f6229 571 #define LSM6DS3_XG_WAKE_UP_THS 0x5B
Wolfgang Betz 44:d757094f6229 572
Wolfgang Betz 44:d757094f6229 573 /**
Wolfgang Betz 44:d757094f6229 574 * @brief Free-fall, wake-up, time stamp and sleep mode functions duration setting register (r/w).
Wolfgang Betz 44:d757094f6229 575 * \code
Wolfgang Betz 44:d757094f6229 576 * Read/write
Wolfgang Betz 44:d757094f6229 577 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 578 * [7] FF_DUR5:Free fall duration event. Default: 0
Wolfgang Betz 44:d757094f6229 579 * [6:5] WAKE_DUR[1:0]: Wake up duration event. Default: 00
Wolfgang Betz 44:d757094f6229 580 * [4] TIMER_HR: Time stamp register resolution setting(1). Default value: 0
Wolfgang Betz 44:d757094f6229 581 * [3:0] SLEEP_DUR[3:0] : Duration to go in sleep mode. Default value: 0000
Wolfgang Betz 44:d757094f6229 582 * \endcode
Wolfgang Betz 44:d757094f6229 583 */
Wolfgang Betz 44:d757094f6229 584 #define LSM6DS3_XG_WAKE_UP_DUR 0x5C
Wolfgang Betz 44:d757094f6229 585
Wolfgang Betz 44:d757094f6229 586 /**
Wolfgang Betz 44:d757094f6229 587 * @brief Free-fall function duration setting register
Wolfgang Betz 44:d757094f6229 588 * \code
Wolfgang Betz 44:d757094f6229 589 * Read/write
Wolfgang Betz 44:d757094f6229 590 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 591 * [7:3] FF_DUR[4:0]: Free fall duration event. Default: 0. For the complete configuration of the free fall duration, refer to FF_DUR5 in WAKE_UP_DUR (5Ch) configuration
Wolfgang Betz 44:d757094f6229 592 * [2:0] FF_THS[2:0]: Free fall threshold setting. Default: 000.
Wolfgang Betz 44:d757094f6229 593 * \endcode
Wolfgang Betz 44:d757094f6229 594 */
Wolfgang Betz 44:d757094f6229 595 #define LSM6DS3_XG_WAKE_FREE_FALL 0x5D
Wolfgang Betz 44:d757094f6229 596
Wolfgang Betz 44:d757094f6229 597 /**
Wolfgang Betz 44:d757094f6229 598 * @brief Functions routing on INT1 register
Wolfgang Betz 44:d757094f6229 599 * \code
Wolfgang Betz 44:d757094f6229 600 * Read/write
Wolfgang Betz 44:d757094f6229 601 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 602 * [7] INT1_INACT_STATE: Routing on INT1 of inactivity mode. Default: 0
Wolfgang Betz 44:d757094f6229 603 * [6] INT1_SINGLE_TAP: Single tap recognition routing on INT1. Default: 0
Wolfgang Betz 44:d757094f6229 604 * [5] INT1_WU: Routing of wake-up event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 605 * [4] INT1_FF: Routing of free-fall event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 606 * [3] INT1_TAP: Routing of tap event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 607 * [2] INT1_6D: Routing of 6D event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 608 * [1] INT1_TILT: Routing of tilt event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 609 * [0] INT1_TIMER: Routing of end counter event of timer on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 610 * \endcode
Wolfgang Betz 44:d757094f6229 611 */
Wolfgang Betz 44:d757094f6229 612 #define LSM6DS3_XG_MD1_CFG 0x5E
Wolfgang Betz 44:d757094f6229 613
Wolfgang Betz 44:d757094f6229 614 /**
Wolfgang Betz 44:d757094f6229 615 * @brief Functions routing on INT2 register
Wolfgang Betz 44:d757094f6229 616 * \code
Wolfgang Betz 44:d757094f6229 617 * Read/write
Wolfgang Betz 44:d757094f6229 618 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 619 * [7] INT2_INACT_STATE: Routing on INT1 of inactivity mode. Default: 0
Wolfgang Betz 44:d757094f6229 620 * [6] INT2_SINGLE_TAP: Single tap recognition routing on INT1. Default: 0
Wolfgang Betz 44:d757094f6229 621 * [5] INT2_WU: Routing of wake-up event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 622 * [4] INT2_FF: Routing of free-fall event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 623 * [3] INT2_TAP: Routing of tap event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 624 * [2] INT2_6D: Routing of 6D event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 625 * [1] INT2_TILT: Routing of tilt event on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 626 * [0] INT2_TIMER: Routing of end counter event of timer on INT1. Default value: 0
Wolfgang Betz 44:d757094f6229 627 * \endcode
Wolfgang Betz 44:d757094f6229 628 */
Wolfgang Betz 44:d757094f6229 629 #define LSM6DS3_XG_MD2_CFG 0x5F
Wolfgang Betz 44:d757094f6229 630
Wolfgang Betz 44:d757094f6229 631 /***************************************** SENSORHUB REGISTERS ********************************************/
Wolfgang Betz 44:d757094f6229 632
Wolfgang Betz 44:d757094f6229 633 /**
Wolfgang Betz 44:d757094f6229 634 * @brief SENSORHUB REGISTER 1 : SLV0 first external sensor, first axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 635 * \code
Wolfgang Betz 44:d757094f6229 636 * Read
Wolfgang Betz 44:d757094f6229 637 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 638 * [7:0] SHUB1[7:0]: SLV0 first external sensor, first byte of the first axis.
Wolfgang Betz 44:d757094f6229 639 * \endcode
Wolfgang Betz 44:d757094f6229 640 */
Wolfgang Betz 44:d757094f6229 641 #define LSM6DS3_XG_SENSORHUB1_REG 0x2E
Wolfgang Betz 44:d757094f6229 642
Wolfgang Betz 44:d757094f6229 643 /**
Wolfgang Betz 44:d757094f6229 644 * @brief SENSORHUB REGISTER 2 : SLV0 first external sensor, first axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 645 * \code
Wolfgang Betz 44:d757094f6229 646 * Read
Wolfgang Betz 44:d757094f6229 647 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 648 * [7:0] SHUB2[7:0]: SLV0 first external sensor, second byte of the first axis.
Wolfgang Betz 44:d757094f6229 649 * \endcode
Wolfgang Betz 44:d757094f6229 650 */
Wolfgang Betz 44:d757094f6229 651 #define LSM6DS3_XG_SENSORHUB2_REG 0x2F
Wolfgang Betz 44:d757094f6229 652
Wolfgang Betz 44:d757094f6229 653 /**
Wolfgang Betz 44:d757094f6229 654 * @brief SENSORHUB REGISTER 3 : SLV0 first external sensor, second axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 655 * \code
Wolfgang Betz 44:d757094f6229 656 * Read
Wolfgang Betz 44:d757094f6229 657 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 658 * [7:0] SHUB3[7:0]: SLV0 first external sensor, first byte of the second axis.
Wolfgang Betz 44:d757094f6229 659 * \endcode
Wolfgang Betz 44:d757094f6229 660 */
Wolfgang Betz 44:d757094f6229 661 #define LSM6DS3_XG_SENSORHUB3_REG 0x30
Wolfgang Betz 44:d757094f6229 662
Wolfgang Betz 44:d757094f6229 663 /**
Wolfgang Betz 44:d757094f6229 664 * @brief SENSORHUB REGISTER 4 : SLV0 first external sensor, second axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 665 * \code
Wolfgang Betz 44:d757094f6229 666 * Read
Wolfgang Betz 44:d757094f6229 667 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 668 * [7:0] SHUB4[7:0]: SLV0 first external sensor, second byte of the second axis.
Wolfgang Betz 44:d757094f6229 669 * \endcode
Wolfgang Betz 44:d757094f6229 670 */
Wolfgang Betz 44:d757094f6229 671 #define LSM6DS3_XG_SENSORHUB4_REG 0x31
Wolfgang Betz 44:d757094f6229 672
Wolfgang Betz 44:d757094f6229 673 /**
Wolfgang Betz 44:d757094f6229 674 * @brief SENSORHUB REGISTER 5 : SLV0 first external sensor, third axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 675 * \code
Wolfgang Betz 44:d757094f6229 676 * Read
Wolfgang Betz 44:d757094f6229 677 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 678 * [7:0] SHUB5[7:0]: SLV0 first external sensor, second byte of the second axis.
Wolfgang Betz 44:d757094f6229 679 * \endcode
Wolfgang Betz 44:d757094f6229 680 */
Wolfgang Betz 44:d757094f6229 681 #define LSM6DS3_XG_SENSORHUB5_REG 0x32
Wolfgang Betz 44:d757094f6229 682
Wolfgang Betz 44:d757094f6229 683 /**
Wolfgang Betz 44:d757094f6229 684 * @brief SENSORHUB REGISTER 6 : SLV0 first external sensor, third axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 685 * \code
Wolfgang Betz 44:d757094f6229 686 * Read
Wolfgang Betz 44:d757094f6229 687 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 688 * [7:0] SHUB6[7:0]: SLV0 first external sensor, second byte of the third axis
Wolfgang Betz 44:d757094f6229 689 * \endcode
Wolfgang Betz 44:d757094f6229 690 */
Wolfgang Betz 44:d757094f6229 691 #define LSM6DS3_XG_SENSORHUB6_REG 0x33
Wolfgang Betz 44:d757094f6229 692
Wolfgang Betz 44:d757094f6229 693 /**
Wolfgang Betz 44:d757094f6229 694 * @brief SENSORHUB REGISTER 7 : SLV1 second external sensor, first axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 695 * \code
Wolfgang Betz 44:d757094f6229 696 * Read
Wolfgang Betz 44:d757094f6229 697 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 698 * [7:0] SHUB7[7:0]: SLV1 second external sensor, first byte of the first axis.
Wolfgang Betz 44:d757094f6229 699 * \endcode
Wolfgang Betz 44:d757094f6229 700 */
Wolfgang Betz 44:d757094f6229 701 #define LSM6DS3_XG_SENSORHUB7_REG 0x34
Wolfgang Betz 44:d757094f6229 702
Wolfgang Betz 44:d757094f6229 703 /**
Wolfgang Betz 44:d757094f6229 704 * @brief SENSORHUB REGISTER 8 : SLV1 second external sensor, first axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 705 * \code
Wolfgang Betz 44:d757094f6229 706 * Read
Wolfgang Betz 44:d757094f6229 707 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 708 * [7:0] SHUB8[7:0]: SLV1 second external sensor, second byte of the first axis.
Wolfgang Betz 44:d757094f6229 709 * \endcode
Wolfgang Betz 44:d757094f6229 710 */
Wolfgang Betz 44:d757094f6229 711 #define LSM6DS3_XG_SENSORHUB8_REG 0x35
Wolfgang Betz 44:d757094f6229 712
Wolfgang Betz 44:d757094f6229 713 /**
Wolfgang Betz 44:d757094f6229 714 * @brief SENSORHUB REGISTER 9 : SLV1 second external sensor,, second axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 715 * \code
Wolfgang Betz 44:d757094f6229 716 * Read
Wolfgang Betz 44:d757094f6229 717 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 718 * [7:0] SHUB9[7:0]: SLV1 second external sensor, first byte of the second axis.
Wolfgang Betz 44:d757094f6229 719 * \endcode
Wolfgang Betz 44:d757094f6229 720 */
Wolfgang Betz 44:d757094f6229 721 #define LSM6DS3_XG_SENSORHUB9_REG 0x36
Wolfgang Betz 44:d757094f6229 722
Wolfgang Betz 44:d757094f6229 723 /**
Wolfgang Betz 44:d757094f6229 724 * @brief SLV1 second external sensor, second axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 725 * \code
Wolfgang Betz 44:d757094f6229 726 * Read
Wolfgang Betz 44:d757094f6229 727 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 728 * [7:0] SHUB10[7:0]: SLV1 second external sensor, second byte of the second axis.
Wolfgang Betz 44:d757094f6229 729 * \endcode
Wolfgang Betz 44:d757094f6229 730 */
Wolfgang Betz 44:d757094f6229 731 #define LSM6DS3_XG_SENSORHUB10_REG 0x37
Wolfgang Betz 44:d757094f6229 732
Wolfgang Betz 44:d757094f6229 733 /**
Wolfgang Betz 44:d757094f6229 734 * @brief SLV1 second external sensor, third axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 735 * \code
Wolfgang Betz 44:d757094f6229 736 * Read
Wolfgang Betz 44:d757094f6229 737 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 738 * [7:0] SHUB11[7:0]: SLV1 second external sensor, first byte of the third axis.
Wolfgang Betz 44:d757094f6229 739 * \endcode
Wolfgang Betz 44:d757094f6229 740 */
Wolfgang Betz 44:d757094f6229 741 #define LSM6DS3_XG_SENSORHUB11_REG 0x38
Wolfgang Betz 44:d757094f6229 742
Wolfgang Betz 44:d757094f6229 743 /**
Wolfgang Betz 44:d757094f6229 744 * @brief SLV1 second external sensor, third axis output register (r). The value is expressed as 16bit word in two�s complement
Wolfgang Betz 44:d757094f6229 745 * \code
Wolfgang Betz 44:d757094f6229 746 * Read
Wolfgang Betz 44:d757094f6229 747 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 748 * [7:0] SHUB12[7:0]: SLV1 second external sensor, second byte of the third axis.
Wolfgang Betz 44:d757094f6229 749 * \endcode
Wolfgang Betz 44:d757094f6229 750 */
Wolfgang Betz 44:d757094f6229 751 #define LSM6DS3_XG_SENSORHUB12_REG 0x39
Wolfgang Betz 44:d757094f6229 752
Wolfgang Betz 44:d757094f6229 753
Wolfgang Betz 44:d757094f6229 754
Wolfgang Betz 44:d757094f6229 755
Wolfgang Betz 44:d757094f6229 756 /***************************************** GYROSCOPE REGISTERS ********************************************/
Wolfgang Betz 44:d757094f6229 757
Wolfgang Betz 44:d757094f6229 758 /**
Wolfgang Betz 44:d757094f6229 759 * @brief Angular rate sensor Control Register 2
Wolfgang Betz 44:d757094f6229 760 * \code
Wolfgang Betz 44:d757094f6229 761 * Read/write
Wolfgang Betz 44:d757094f6229 762 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 763 * [7:4] ODR_G[3:0]: Gyroscope output data rate selection
Wolfgang Betz 44:d757094f6229 764 * [3:2] FS_G[1-0]: Gyroscope full-scale selection
Wolfgang Betz 44:d757094f6229 765 * [1] FS_125: Gyroscope full-scale at 125 dps
Wolfgang Betz 44:d757094f6229 766 * [0] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 767 * \endcode
Wolfgang Betz 44:d757094f6229 768 */
Wolfgang Betz 44:d757094f6229 769 #define LSM6DS3_XG_CTRL2_G 0x11
Wolfgang Betz 44:d757094f6229 770
Wolfgang Betz 44:d757094f6229 771
Wolfgang Betz 44:d757094f6229 772 /**
Wolfgang Betz 44:d757094f6229 773 * @brief Angular rate sensor Control Register 6
Wolfgang Betz 44:d757094f6229 774 * \code
Wolfgang Betz 44:d757094f6229 775 * Read/write
Wolfgang Betz 44:d757094f6229 776 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 777 * [7] TRIG_EN: Data edge sensitive trigger Enable. Default value: 0
Wolfgang Betz 44:d757094f6229 778 * [6] LVLen: Data level sensitive trigger Enable. Default value: 0
Wolfgang Betz 44:d757094f6229 779 * [5] LVL2en: Level sensitive latched Enable. Default value: 0
Wolfgang Betz 44:d757094f6229 780 * [4] XL_H_MODE: High Performance operating mode disable for accelerometer(1). Default value: 0
Wolfgang Betz 44:d757094f6229 781 * [3:0] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 782 * \endcode
Wolfgang Betz 44:d757094f6229 783 */
Wolfgang Betz 44:d757094f6229 784 #define LSM6DS3_XG_CTRL6_G 0x15
Wolfgang Betz 44:d757094f6229 785
Wolfgang Betz 44:d757094f6229 786
Wolfgang Betz 44:d757094f6229 787 /**
Wolfgang Betz 44:d757094f6229 788 * @brief Angular rate sensor Control Register 7
Wolfgang Betz 44:d757094f6229 789 * \code
Wolfgang Betz 44:d757094f6229 790 * Read/write
Wolfgang Betz 44:d757094f6229 791 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 792 * [7] G_H_MODE: High Performance operating mode disable for Gyroscope(1) . Default: 0
Wolfgang Betz 44:d757094f6229 793 * [6] HP_EN: High Pass filter Enable. Default Value: 0
Wolfgang Betz 44:d757094f6229 794 * [5:4] HPCF_G[1:0]: Gyroscope High Pass filter Cut Off frequency selection. Default value: 00
Wolfgang Betz 44:d757094f6229 795 * [3:0] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 796 * \endcode
Wolfgang Betz 44:d757094f6229 797 */
Wolfgang Betz 44:d757094f6229 798 #define LSM6DS3_XG_CTRL7_G 0x16
Wolfgang Betz 44:d757094f6229 799
Wolfgang Betz 44:d757094f6229 800 /**
Wolfgang Betz 44:d757094f6229 801 * @brief Gyroscope data (LSB)
Wolfgang Betz 44:d757094f6229 802 * \code
Wolfgang Betz 44:d757094f6229 803 * Read
Wolfgang Betz 44:d757094f6229 804 * \endcode
Wolfgang Betz 44:d757094f6229 805 */
Wolfgang Betz 44:d757094f6229 806 #define LSM6DS3_XG_OUT_X_L_G 0x22
Wolfgang Betz 44:d757094f6229 807
Wolfgang Betz 44:d757094f6229 808
Wolfgang Betz 44:d757094f6229 809 /**
Wolfgang Betz 44:d757094f6229 810 * @brief Gyroscope data (MSB)
Wolfgang Betz 44:d757094f6229 811 * \code
Wolfgang Betz 44:d757094f6229 812 * Read
Wolfgang Betz 44:d757094f6229 813 * \endcode
Wolfgang Betz 44:d757094f6229 814 */
Wolfgang Betz 44:d757094f6229 815 #define LSM6DS3_XG_OUT_X_H_G 0x23
Wolfgang Betz 44:d757094f6229 816
Wolfgang Betz 44:d757094f6229 817
Wolfgang Betz 44:d757094f6229 818 /**
Wolfgang Betz 44:d757094f6229 819 * @brief Gyroscope data (LSB)
Wolfgang Betz 44:d757094f6229 820 * \code
Wolfgang Betz 44:d757094f6229 821 * Read
Wolfgang Betz 44:d757094f6229 822 * \endcode
Wolfgang Betz 44:d757094f6229 823 */
Wolfgang Betz 44:d757094f6229 824 #define LSM6DS3_XG_OUT_Y_L_G 0x24
Wolfgang Betz 44:d757094f6229 825
Wolfgang Betz 44:d757094f6229 826
Wolfgang Betz 44:d757094f6229 827 /**
Wolfgang Betz 44:d757094f6229 828 * @brief Gyroscope data (MSB)
Wolfgang Betz 44:d757094f6229 829 * \code
Wolfgang Betz 44:d757094f6229 830 * Read
Wolfgang Betz 44:d757094f6229 831 * \endcode
Wolfgang Betz 44:d757094f6229 832 */
Wolfgang Betz 44:d757094f6229 833 #define LSM6DS3_XG_OUT_Y_H_G 0x25
Wolfgang Betz 44:d757094f6229 834
Wolfgang Betz 44:d757094f6229 835
Wolfgang Betz 44:d757094f6229 836 /**
Wolfgang Betz 44:d757094f6229 837 * @brief Gyroscope data (LSB)
Wolfgang Betz 44:d757094f6229 838 * \code
Wolfgang Betz 44:d757094f6229 839 * Read
Wolfgang Betz 44:d757094f6229 840 * \endcode
Wolfgang Betz 44:d757094f6229 841 */
Wolfgang Betz 44:d757094f6229 842 #define LSM6DS3_XG_OUT_Z_L_G 0x26
Wolfgang Betz 44:d757094f6229 843
Wolfgang Betz 44:d757094f6229 844
Wolfgang Betz 44:d757094f6229 845 /**
Wolfgang Betz 44:d757094f6229 846 * @brief Gyroscope data (MSB)
Wolfgang Betz 44:d757094f6229 847 * \code
Wolfgang Betz 44:d757094f6229 848 * Read
Wolfgang Betz 44:d757094f6229 849 * \endcode
Wolfgang Betz 44:d757094f6229 850 */
Wolfgang Betz 44:d757094f6229 851 #define LSM6DS3_XG_OUT_Z_H_G 0x27
Wolfgang Betz 44:d757094f6229 852
Wolfgang Betz 44:d757094f6229 853
Wolfgang Betz 44:d757094f6229 854
Wolfgang Betz 44:d757094f6229 855 /*************************************** ACCELEROMETER REGISTERS *******************************************/
Wolfgang Betz 44:d757094f6229 856
Wolfgang Betz 44:d757094f6229 857 /**
Wolfgang Betz 44:d757094f6229 858 * @brief Linear acceleration sensor Control Register 1
Wolfgang Betz 44:d757094f6229 859 * \code
Wolfgang Betz 44:d757094f6229 860 * Read/write
Wolfgang Betz 44:d757094f6229 861 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 862 * [7:4] ODR_XL3-0: Accelerometer Output data rate and power mode selection
Wolfgang Betz 44:d757094f6229 863 * [3:2] FS_XL1-0: Accelerometer full-scale selection
Wolfgang Betz 44:d757094f6229 864 * [1:0] BW_XL1-0: Anti-aliasing filter bandwidth selection
Wolfgang Betz 44:d757094f6229 865 * \endcode
Wolfgang Betz 44:d757094f6229 866 */
Wolfgang Betz 44:d757094f6229 867 #define LSM6DS3_XG_CTRL1_XL 0x10
Wolfgang Betz 44:d757094f6229 868
Wolfgang Betz 44:d757094f6229 869 /**
Wolfgang Betz 44:d757094f6229 870 * @brief XL sensor Control Register 8
Wolfgang Betz 44:d757094f6229 871 * \code
Wolfgang Betz 44:d757094f6229 872 * Read/write
Wolfgang Betz 44:d757094f6229 873 * Default value: 0x00
Wolfgang Betz 44:d757094f6229 874 * [7:3] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 875 * [2] SLOPE_FDS: Enable HP filter on output registers and FIFO. Default value: 0
Wolfgang Betz 44:d757094f6229 876 * [1:0] This bit must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 877 * \endcode
Wolfgang Betz 44:d757094f6229 878 */
Wolfgang Betz 44:d757094f6229 879 #define LSM6DS3_XG_CTRL8_XL 0x17
Wolfgang Betz 44:d757094f6229 880
Wolfgang Betz 44:d757094f6229 881 /**
Wolfgang Betz 44:d757094f6229 882 * @brief Linear acceleration sensor Control Register 9
Wolfgang Betz 44:d757094f6229 883 * \code
Wolfgang Betz 44:d757094f6229 884 * Read/write
Wolfgang Betz 44:d757094f6229 885 * Default value: 0x38
Wolfgang Betz 44:d757094f6229 886 * [7:6] These bits must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 887 * [5] Zen_XL: Accelerometers�s Z-axis output enable
Wolfgang Betz 44:d757094f6229 888 * [4] Yen_XL: Accelerometers�s Y-axis output enable
Wolfgang Betz 44:d757094f6229 889 * [3] Xen_XL: Accelerometers�s X-axis output enable
Wolfgang Betz 44:d757094f6229 890 * [2:0] These bits must be set to �0� for the correct operation of the device
Wolfgang Betz 44:d757094f6229 891 * \endcode
Wolfgang Betz 44:d757094f6229 892 */
Wolfgang Betz 44:d757094f6229 893 #define LSM6DS3_XG_CTRL9_XL 0x18
Wolfgang Betz 44:d757094f6229 894
Wolfgang Betz 44:d757094f6229 895
Wolfgang Betz 44:d757094f6229 896 /**
Wolfgang Betz 44:d757094f6229 897 * @brief Accelerometer data (LSB)
Wolfgang Betz 44:d757094f6229 898 * \code
Wolfgang Betz 44:d757094f6229 899 * Read
Wolfgang Betz 44:d757094f6229 900 * \endcode
Wolfgang Betz 44:d757094f6229 901 */
Wolfgang Betz 44:d757094f6229 902 #define LSM6DS3_XG_OUT_X_L_XL 0x28
Wolfgang Betz 44:d757094f6229 903
Wolfgang Betz 44:d757094f6229 904
Wolfgang Betz 44:d757094f6229 905 /**
Wolfgang Betz 44:d757094f6229 906 * @brief Accelerometer data (MSB)
Wolfgang Betz 44:d757094f6229 907 * \code
Wolfgang Betz 44:d757094f6229 908 * Read
Wolfgang Betz 44:d757094f6229 909 * \endcode
Wolfgang Betz 44:d757094f6229 910 */
Wolfgang Betz 44:d757094f6229 911 #define LSM6DS3_XG_OUT_X_H_XL 0x29
Wolfgang Betz 44:d757094f6229 912
Wolfgang Betz 44:d757094f6229 913
Wolfgang Betz 44:d757094f6229 914 /**
Wolfgang Betz 44:d757094f6229 915 * @brief Accelerometer data (LSB)
Wolfgang Betz 44:d757094f6229 916 * \code
Wolfgang Betz 44:d757094f6229 917 * Read
Wolfgang Betz 44:d757094f6229 918 * \endcode
Wolfgang Betz 44:d757094f6229 919 */
Wolfgang Betz 44:d757094f6229 920 #define LSM6DS3_XG_OUT_Y_L_XL 0x2A
Wolfgang Betz 44:d757094f6229 921
Wolfgang Betz 44:d757094f6229 922
Wolfgang Betz 44:d757094f6229 923 /**
Wolfgang Betz 44:d757094f6229 924 * @brief Accelerometer data (MSB)
Wolfgang Betz 44:d757094f6229 925 * \code
Wolfgang Betz 44:d757094f6229 926 * Read
Wolfgang Betz 44:d757094f6229 927 * \endcode
Wolfgang Betz 44:d757094f6229 928 */
Wolfgang Betz 44:d757094f6229 929 #define LSM6DS3_XG_OUT_Y_H_XL 0x2B
Wolfgang Betz 44:d757094f6229 930
Wolfgang Betz 44:d757094f6229 931
Wolfgang Betz 44:d757094f6229 932 /**
Wolfgang Betz 44:d757094f6229 933 * @brief Accelerometer data (LSB)
Wolfgang Betz 44:d757094f6229 934 * \code
Wolfgang Betz 44:d757094f6229 935 * Read
Wolfgang Betz 44:d757094f6229 936 * \endcode
Wolfgang Betz 44:d757094f6229 937 */
Wolfgang Betz 44:d757094f6229 938 #define LSM6DS3_XG_OUT_Z_L_XL 0x2C
Wolfgang Betz 44:d757094f6229 939
Wolfgang Betz 44:d757094f6229 940
Wolfgang Betz 44:d757094f6229 941 /**
Wolfgang Betz 44:d757094f6229 942 * @brief Accelerometer data (MSB)
Wolfgang Betz 44:d757094f6229 943 * \code
Wolfgang Betz 44:d757094f6229 944 * Read
Wolfgang Betz 44:d757094f6229 945 * \endcode
Wolfgang Betz 44:d757094f6229 946 */
Wolfgang Betz 44:d757094f6229 947 #define LSM6DS3_XG_OUT_Z_H_XL 0x2D
Wolfgang Betz 44:d757094f6229 948
Wolfgang Betz 44:d757094f6229 949 /******************************************************************************/
Wolfgang Betz 44:d757094f6229 950 /************* END ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/
Wolfgang Betz 44:d757094f6229 951 /******************************************************************************/
Wolfgang Betz 44:d757094f6229 952
Wolfgang Betz 44:d757094f6229 953
Wolfgang Betz 44:d757094f6229 954 /************************************** COMMON REGISTERS VALUE *******************************************/
Wolfgang Betz 44:d757094f6229 955
Wolfgang Betz 44:d757094f6229 956 /**
Wolfgang Betz 44:d757094f6229 957 * @brief Device Address
Wolfgang Betz 44:d757094f6229 958 */
Wolfgang Betz 44:d757094f6229 959 #define LSM6DS3_ADDRESS_LOW 0xD4 // SAD[0] = 0
Wolfgang Betz 44:d757094f6229 960 #define LSM6DS3_ADDRESS_HIGH 0xD6 // SAD[0] = 1
Wolfgang Betz 44:d757094f6229 961 #define LSM6DS3_XG_MEMS_ADDRESS LSM6DS3_ADDRESS_LOW // SAD[0] = 0
Wolfgang Betz 44:d757094f6229 962
Wolfgang Betz 44:d757094f6229 963
Wolfgang Betz 44:d757094f6229 964 /**
Wolfgang Betz 44:d757094f6229 965 * @brief Device Identifier. Default value of the WHO_AM_I register.
Wolfgang Betz 44:d757094f6229 966 */
Wolfgang Betz 44:d757094f6229 967 #define I_AM_LSM6DS3_XG ((uint8_t)0x69)
Wolfgang Betz 44:d757094f6229 968
Wolfgang Betz 44:d757094f6229 969
Wolfgang Betz 44:d757094f6229 970 /**
Wolfgang Betz 44:d757094f6229 971 * @brief Register address automatically incremented during a multiple byte
Wolfgang Betz 44:d757094f6229 972 * access with a serial interface (I2C or SPI). Default value of the
Wolfgang Betz 44:d757094f6229 973 * LSM6DS3_XG_CTRL3_C register.
Wolfgang Betz 44:d757094f6229 974 */
Wolfgang Betz 44:d757094f6229 975 #define LSM6DS3_XG_IF_INC ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 976
Wolfgang Betz 44:d757094f6229 977 #define LSM6DS3_XG_IF_INC_MASK ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 978
Wolfgang Betz 44:d757094f6229 979 /** @defgroup LSM6DS3_XG_FIFO_Output_Data_Rate_Selection_FIFO_CTRL5 LSM6DS3_XG_FIFO_Output_Data_Rate_Selection_FIFO_CTRL5
Wolfgang Betz 44:d757094f6229 980 * @{
Wolfgang Betz 44:d757094f6229 981 */
Wolfgang Betz 44:d757094f6229 982 #define LSM6DS3_XG_FIFO_ODR_NA ((uint8_t)0x00) /*!< FIFO ODR NA */
Wolfgang Betz 44:d757094f6229 983 #define LSM6DS3_XG_FIFO_ODR_10HZ ((uint8_t)0x08) /*!< FIFO ODR 10Hz */
Wolfgang Betz 44:d757094f6229 984 #define LSM6DS3_XG_FIFO_ODR_25HZ ((uint8_t)0x10) /*!< FIFO ODR 25Hz */
Wolfgang Betz 44:d757094f6229 985 #define LSM6DS3_XG_FIFO_ODR_50HZ ((uint8_t)0x18) /*!< FIFO ODR 50Hz */
Wolfgang Betz 44:d757094f6229 986 #define LSM6DS3_XG_FIFO_ODR_100HZ ((uint8_t)0x20) /*!< FIFO ODR 100Hz */
Wolfgang Betz 44:d757094f6229 987 #define LSM6DS3_XG_FIFO_ODR_200HZ ((uint8_t)0x28) /*!< FIFO ODR 200Hz */
Wolfgang Betz 44:d757094f6229 988 #define LSM6DS3_XG_FIFO_ODR_400HZ ((uint8_t)0x30) /*!< FIFO ODR 400Hz */
Wolfgang Betz 44:d757094f6229 989 #define LSM6DS3_XG_FIFO_ODR_800HZ ((uint8_t)0x38) /*!< FIFO ODR 800Hz */
Wolfgang Betz 44:d757094f6229 990 #define LSM6DS3_XG_FIFO_ODR_1600HZ ((uint8_t)0x40) /*!< FIFO ODR 1600Hz */
Wolfgang Betz 44:d757094f6229 991 #define LSM6DS3_XG_FIFO_ODR_3300HZ ((uint8_t)0x48) /*!< FIFO ODR 3300Hz */
Wolfgang Betz 44:d757094f6229 992 #define LSM6DS3_XG_FIFO_ODR_6600HZ ((uint8_t)0x50) /*!< FIFO ODR 6600Hz */
Wolfgang Betz 44:d757094f6229 993
Wolfgang Betz 44:d757094f6229 994 #define LSM6DS3_XG_FIFO_ODR_MASK ((uint8_t)0x78)
Wolfgang Betz 44:d757094f6229 995 /**
Wolfgang Betz 44:d757094f6229 996 * @}
Wolfgang Betz 44:d757094f6229 997 */
Wolfgang Betz 44:d757094f6229 998
Wolfgang Betz 44:d757094f6229 999 /** @defgroup LSM6DS3_XG_FIFO_Mode_Selection_FIFO_CTRL5 LSM6DS3_XG_FIFO_Mode_Selection_FIFO_CTRL5
Wolfgang Betz 44:d757094f6229 1000 * @{
Wolfgang Betz 44:d757094f6229 1001 */
Wolfgang Betz 44:d757094f6229 1002 #define LSM6DS3_XG_FIFO_MODE_BYPASS ((uint8_t)0x00) /*!< BYPASS Mode. FIFO turned off */
Wolfgang Betz 44:d757094f6229 1003 #define LSM6DS3_XG_FIFO_MODE_FIFO ((uint8_t)0x01) /*!< FIFO Mode. Stop collecting data when FIFO is full */
Wolfgang Betz 44:d757094f6229 1004 #define LSM6DS3_XG_FIFO_MODE_CONTINUOUS_THEN_FIFO ((uint8_t)0x03) /*!< CONTINUOUS mode until trigger is deasserted, then FIFO mode */
Wolfgang Betz 44:d757094f6229 1005 #define LSM6DS3_XG_FIFO_MODE_BYPASS_THEN_CONTINUOUS ((uint8_t)0x04) /*!< BYPASS mode until trigger is deasserted, then CONTINUOUS mode */
Wolfgang Betz 44:d757094f6229 1006 #define LSM6DS3_XG_FIFO_MODE_CONTINUOUS_OVERWRITE ((uint8_t)0x05) /*!< CONTINUOUS mode. If the FIFO is full the new sample overwrite the older one */
Wolfgang Betz 44:d757094f6229 1007
Wolfgang Betz 44:d757094f6229 1008 #define LSM6DS3_XG_FIFO_MODE_MASK ((uint8_t)0x07)
Wolfgang Betz 44:d757094f6229 1009 /**
Wolfgang Betz 44:d757094f6229 1010 * @}
Wolfgang Betz 44:d757094f6229 1011 */
Wolfgang Betz 44:d757094f6229 1012
Wolfgang Betz 44:d757094f6229 1013
Wolfgang Betz 44:d757094f6229 1014 /************************************** GYROSCOPE REGISTERS VALUE *******************************************/
Wolfgang Betz 44:d757094f6229 1015
Wolfgang Betz 44:d757094f6229 1016
Wolfgang Betz 44:d757094f6229 1017 /** @addtogroup LSM6DS3_XG_Gyroscope_Output_Data_Rate_Selection_CTRL_REG1_G LSM6DS3_XG_Gyroscope_Output_Data_Rate_Selection_CTRL_REG1_G
Wolfgang Betz 44:d757094f6229 1018 * @{
Wolfgang Betz 44:d757094f6229 1019 */
Wolfgang Betz 44:d757094f6229 1020 #define LSM6DS3_G_ODR_PD ((uint8_t)0x00) /*!< Output Data Rate: Power-down*/
Wolfgang Betz 44:d757094f6229 1021 #define LSM6DS3_G_ODR_13HZ ((uint8_t)0x10) /*!< Output Data Rate: 13 Hz*/
Wolfgang Betz 44:d757094f6229 1022 #define LSM6DS3_G_ODR_26HZ ((uint8_t)0x20) /*!< Output Data Rate: 26 Hz*/
Wolfgang Betz 44:d757094f6229 1023 #define LSM6DS3_G_ODR_52HZ ((uint8_t)0x30) /*!< Output Data Rate: 52 Hz */
Wolfgang Betz 44:d757094f6229 1024 #define LSM6DS3_G_ODR_104HZ ((uint8_t)0x40) /*!< Output Data Rate: 104 Hz */
Wolfgang Betz 44:d757094f6229 1025 #define LSM6DS3_G_ODR_208HZ ((uint8_t)0x50) /*!< Output Data Rate: 208 Hz */
Wolfgang Betz 44:d757094f6229 1026 #define LSM6DS3_G_ODR_416HZ ((uint8_t)0x60) /*!< Output Data Rate: 416 Hz */
Wolfgang Betz 44:d757094f6229 1027 #define LSM6DS3_G_ODR_833HZ ((uint8_t)0x70) /*!< Output Data Rate: 833 Hz */
Wolfgang Betz 44:d757094f6229 1028 #define LSM6DS3_G_ODR_1660HZ ((uint8_t)0x80) /*!< Output Data Rate: 1.66 kHz */
Wolfgang Betz 44:d757094f6229 1029
Wolfgang Betz 44:d757094f6229 1030 #define LSM6DS3_G_ODR_MASK ((uint8_t)0xF0)
Wolfgang Betz 44:d757094f6229 1031
Wolfgang Betz 44:d757094f6229 1032 /**
Wolfgang Betz 44:d757094f6229 1033 * @}
Wolfgang Betz 44:d757094f6229 1034 */
Wolfgang Betz 44:d757094f6229 1035
Wolfgang Betz 44:d757094f6229 1036
Wolfgang Betz 44:d757094f6229 1037 /** @addtogroup LSM6DS3_XG_Gyroscope_Full_Scale_Selection_CTRL2_G LSM6DS3_XG_Gyroscope_Full_Scale_Selection_CTRL2_G
Wolfgang Betz 44:d757094f6229 1038 * @{
Wolfgang Betz 44:d757094f6229 1039 */
Wolfgang Betz 44:d757094f6229 1040 #define LSM6DS3_G_FS_125_DISABLE ((uint8_t)0x00) /*!< Full scale: 125 dps enable: disable */
Wolfgang Betz 44:d757094f6229 1041 #define LSM6DS3_G_FS_125_ENABLE ((uint8_t)0x02) /*!< Full scale: 125 dps enable: enable */
Wolfgang Betz 44:d757094f6229 1042
Wolfgang Betz 44:d757094f6229 1043 #define LSM6DS3_G_FS_125_MASK ((uint8_t)0x02)
Wolfgang Betz 44:d757094f6229 1044
Wolfgang Betz 44:d757094f6229 1045 #define LSM6DS3_G_FS_245 ((uint8_t)0x00) /*!< Full scale: 245 dps*/
Wolfgang Betz 44:d757094f6229 1046 #define LSM6DS3_G_FS_500 ((uint8_t)0x04) /*!< Full scale: 500 dps */
Wolfgang Betz 44:d757094f6229 1047 #define LSM6DS3_G_FS_1000 ((uint8_t)0x08) /*!< Full scale: 1000 dps */
Wolfgang Betz 44:d757094f6229 1048 #define LSM6DS3_G_FS_2000 ((uint8_t)0x0C) /*!< Full scale: 2000 dps */
Wolfgang Betz 44:d757094f6229 1049
Wolfgang Betz 44:d757094f6229 1050 #define LSM6DS3_G_FS_MASK ((uint8_t)0x0C)
Wolfgang Betz 44:d757094f6229 1051
Wolfgang Betz 44:d757094f6229 1052 /**
Wolfgang Betz 44:d757094f6229 1053 * @}
Wolfgang Betz 44:d757094f6229 1054 */
Wolfgang Betz 44:d757094f6229 1055
Wolfgang Betz 44:d757094f6229 1056
Wolfgang Betz 44:d757094f6229 1057 /** @addtogroup LSM6DS3_XG_Gyroscope_Z_Axis_Output_Enable_Selection_CTRL10_C LSM6DS3_XG_Gyroscope_Z_Axis_Output_Enable_Selection_CTRL10_C
Wolfgang Betz 44:d757094f6229 1058 * @{
Wolfgang Betz 44:d757094f6229 1059 */
Wolfgang Betz 44:d757094f6229 1060 #define LSM6DS3_G_ZEN_DISABLE ((uint8_t)0x00) /*!< Gyroscope�s Z-axis output enable: disable */
Wolfgang Betz 44:d757094f6229 1061 #define LSM6DS3_G_ZEN_ENABLE ((uint8_t)0x20) /*!< Gyroscope�s Z-axis output enable: enable */
Wolfgang Betz 44:d757094f6229 1062
Wolfgang Betz 44:d757094f6229 1063 #define LSM6DS3_G_ZEN_MASK ((uint8_t)0x20)
Wolfgang Betz 44:d757094f6229 1064
Wolfgang Betz 44:d757094f6229 1065 /**
Wolfgang Betz 44:d757094f6229 1066 * @}
Wolfgang Betz 44:d757094f6229 1067 */
Wolfgang Betz 44:d757094f6229 1068
Wolfgang Betz 44:d757094f6229 1069
Wolfgang Betz 44:d757094f6229 1070 /** @addtogroup LSM6DS3_XG_Gyroscope_Y_Axis_Output_Enable_Selection_CTRL10_C LSM6DS3_XG_Gyroscope_Y_Axis_Output_Enable_Selection_CTRL10_C
Wolfgang Betz 44:d757094f6229 1071 * @{
Wolfgang Betz 44:d757094f6229 1072 */
Wolfgang Betz 44:d757094f6229 1073 #define LSM6DS3_G_YEN_DISABLE ((uint8_t)0x00) /*!< Gyroscope�s Y-axis output enable: disable */
Wolfgang Betz 44:d757094f6229 1074 #define LSM6DS3_G_YEN_ENABLE ((uint8_t)0x10) /*!< Gyroscope�s Y-axis output enable: enable */
Wolfgang Betz 44:d757094f6229 1075
Wolfgang Betz 44:d757094f6229 1076 #define LSM6DS3_G_YEN_MASK ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1077
Wolfgang Betz 44:d757094f6229 1078 /**
Wolfgang Betz 44:d757094f6229 1079 * @}
Wolfgang Betz 44:d757094f6229 1080 */
Wolfgang Betz 44:d757094f6229 1081
Wolfgang Betz 44:d757094f6229 1082
Wolfgang Betz 44:d757094f6229 1083 /** @addtogroup LSM6DS3_XG_Gyroscope_X_Axis_Output_Enable_Selection_CTRL10_C LSM6DS3_XG_Gyroscope_X_Axis_Output_Enable_Selection_CTRL10_C
Wolfgang Betz 44:d757094f6229 1084 * @{
Wolfgang Betz 44:d757094f6229 1085 */
Wolfgang Betz 44:d757094f6229 1086 #define LSM6DS3_G_XEN_DISABLE ((uint8_t)0x00) /*!< Gyroscope�s X-axis output enable: disable */
Wolfgang Betz 44:d757094f6229 1087 #define LSM6DS3_G_XEN_ENABLE ((uint8_t)0x08) /*!< Gyroscope�s X-axis output enable: enable */
Wolfgang Betz 44:d757094f6229 1088
Wolfgang Betz 44:d757094f6229 1089 #define LSM6DS3_G_XEN_MASK ((uint8_t)0x08)
Wolfgang Betz 44:d757094f6229 1090
Wolfgang Betz 44:d757094f6229 1091 /**
Wolfgang Betz 44:d757094f6229 1092 * @}
Wolfgang Betz 44:d757094f6229 1093 */
Wolfgang Betz 44:d757094f6229 1094
Wolfgang Betz 44:d757094f6229 1095
Wolfgang Betz 44:d757094f6229 1096 /************************************ ACCELEROMETER REGISTERS VALUE *****************************************/
Wolfgang Betz 44:d757094f6229 1097
Wolfgang Betz 44:d757094f6229 1098 /** @addtogroup LSM6DS3_XG_Accelerometer_Output_Data_Rate_Selection_CTRL1_XL LSM6DS3_XG_Accelerometer_Output_Data_Rate_Selection_CTRL1_XL
Wolfgang Betz 44:d757094f6229 1099 * @{
Wolfgang Betz 44:d757094f6229 1100 */
Wolfgang Betz 44:d757094f6229 1101 #define LSM6DS3_XL_ODR_PD ((uint8_t)0x00) /*!< Output Data Rate: Power-down*/
Wolfgang Betz 44:d757094f6229 1102 #define LSM6DS3_XL_ODR_13HZ ((uint8_t)0x10) /*!< Output Data Rate: 13 Hz*/
Wolfgang Betz 44:d757094f6229 1103 #define LSM6DS3_XL_ODR_26HZ ((uint8_t)0x20) /*!< Output Data Rate: 26 Hz*/
Wolfgang Betz 44:d757094f6229 1104 #define LSM6DS3_XL_ODR_52HZ ((uint8_t)0x30) /*!< Output Data Rate: 52 Hz */
Wolfgang Betz 44:d757094f6229 1105 #define LSM6DS3_XL_ODR_104HZ ((uint8_t)0x40) /*!< Output Data Rate: 104 Hz */
Wolfgang Betz 44:d757094f6229 1106 #define LSM6DS3_XL_ODR_208HZ ((uint8_t)0x50) /*!< Output Data Rate: 208 Hz */
Wolfgang Betz 44:d757094f6229 1107 #define LSM6DS3_XL_ODR_416HZ ((uint8_t)0x60) /*!< Output Data Rate: 416 Hz */
Wolfgang Betz 44:d757094f6229 1108 #define LSM6DS3_XL_ODR_833HZ ((uint8_t)0x70) /*!< Output Data Rate: 833 Hz */
Wolfgang Betz 44:d757094f6229 1109 #define LSM6DS3_XL_ODR_1660HZ ((uint8_t)0x80) /*!< Output Data Rate: 1.66 kHz */
Wolfgang Betz 44:d757094f6229 1110 #define LSM6DS3_XL_ODR_3330HZ ((uint8_t)0x90) /*!< Output Data Rate: 3.33 kHz */
Wolfgang Betz 44:d757094f6229 1111 #define LSM6DS3_XL_ODR_6660HZ ((uint8_t)0xA0) /*!< Output Data Rate: 6.66 kHz */
Wolfgang Betz 44:d757094f6229 1112
Wolfgang Betz 44:d757094f6229 1113 #define LSM6DS3_XL_ODR_MASK ((uint8_t)0xF0)
Wolfgang Betz 44:d757094f6229 1114
Wolfgang Betz 44:d757094f6229 1115 /**
Wolfgang Betz 44:d757094f6229 1116 * @}
Wolfgang Betz 44:d757094f6229 1117 */
Wolfgang Betz 44:d757094f6229 1118
Wolfgang Betz 44:d757094f6229 1119
Wolfgang Betz 44:d757094f6229 1120 /** @addtogroup LSM6DS3_XG_Accelerometer_Full_Scale_Selection_CTRL1_XL LSM6DS3_XG_Accelerometer_Full_Scale_Selection_CTRL1_XL
Wolfgang Betz 44:d757094f6229 1121 * @{
Wolfgang Betz 44:d757094f6229 1122 */
Wolfgang Betz 44:d757094f6229 1123 #define LSM6DS3_XL_FS_2G ((uint8_t)0x00) /*!< Full scale: +- 2g */
Wolfgang Betz 44:d757094f6229 1124 #define LSM6DS3_XL_FS_4G ((uint8_t)0x08) /*!< Full scale: +- 4g */
Wolfgang Betz 44:d757094f6229 1125 #define LSM6DS3_XL_FS_8G ((uint8_t)0x0C) /*!< Full scale: +- 8g */
Wolfgang Betz 44:d757094f6229 1126 #define LSM6DS3_XL_FS_16G ((uint8_t)0x04) /*!< Full scale: +- 16g */
Wolfgang Betz 44:d757094f6229 1127
Wolfgang Betz 44:d757094f6229 1128 #define LSM6DS3_XL_FS_MASK ((uint8_t)0x0C)
Wolfgang Betz 44:d757094f6229 1129
Wolfgang Betz 44:d757094f6229 1130 /**
Wolfgang Betz 44:d757094f6229 1131 * @}
Wolfgang Betz 44:d757094f6229 1132 */
Wolfgang Betz 44:d757094f6229 1133
Wolfgang Betz 44:d757094f6229 1134
Wolfgang Betz 44:d757094f6229 1135 /** @addtogroup LSM6DS3_XG_Accelerometer_Anti_Aliasing_Filter_Bandwidth_Selection_CTRL1_XL LSM6DS3_XG_Accelerometer_Anti_Aliasing_Filter_Bandwidth_Selection_CTRL1_XL
Wolfgang Betz 44:d757094f6229 1136 * @{
Wolfgang Betz 44:d757094f6229 1137 */
Wolfgang Betz 44:d757094f6229 1138 #define LSM6DS3_XL_BW_400HZ ((uint8_t)0x00) /*!< Anti-aliasing filter bandwidht: 400 Hz */
Wolfgang Betz 44:d757094f6229 1139 #define LSM6DS3_XL_BW_200HZ ((uint8_t)0x01) /*!< Anti-aliasing filter bandwidht: 200 Hz */
Wolfgang Betz 44:d757094f6229 1140 #define LSM6DS3_XL_BW_100HZ ((uint8_t)0x02) /*!< Anti-aliasing filter bandwidht: 100 Hz */
Wolfgang Betz 44:d757094f6229 1141 #define LSM6DS3_XL_BW_50HZ ((uint8_t)0x03) /*!< Anti-aliasing filter bandwidht: 50 Hz */
Wolfgang Betz 44:d757094f6229 1142
Wolfgang Betz 44:d757094f6229 1143 #define LSM6DS3_XL_BW_MASK ((uint8_t)0x03)
Wolfgang Betz 44:d757094f6229 1144
Wolfgang Betz 44:d757094f6229 1145 /**
Wolfgang Betz 44:d757094f6229 1146 * @}
Wolfgang Betz 44:d757094f6229 1147 */
Wolfgang Betz 44:d757094f6229 1148
Wolfgang Betz 44:d757094f6229 1149
Wolfgang Betz 44:d757094f6229 1150 /** @addtogroup LSM6DS3_XG_Accelerometer_Z_Axis_Output_Enable_Selection_CTRL9_XL LSM6DS3_XG_Accelerometer_Z_Axis_Output_Enable_Selection_CTRL9_XL
Wolfgang Betz 44:d757094f6229 1151 * @{
Wolfgang Betz 44:d757094f6229 1152 */
Wolfgang Betz 44:d757094f6229 1153 #define LSM6DS3_XL_ZEN_DISABLE ((uint8_t)0x00) /*!< Accelerometer�s Z-axis output enable: disable */
Wolfgang Betz 44:d757094f6229 1154 #define LSM6DS3_XL_ZEN_ENABLE ((uint8_t)0x20) /*!< Accelerometer�s Z-axis output enable: enable */
Wolfgang Betz 44:d757094f6229 1155
Wolfgang Betz 44:d757094f6229 1156 #define LSM6DS3_XL_ZEN_MASK ((uint8_t)0x20)
Wolfgang Betz 44:d757094f6229 1157
Wolfgang Betz 44:d757094f6229 1158 /**
Wolfgang Betz 44:d757094f6229 1159 * @}
Wolfgang Betz 44:d757094f6229 1160 */
Wolfgang Betz 44:d757094f6229 1161
Wolfgang Betz 44:d757094f6229 1162
Wolfgang Betz 44:d757094f6229 1163 /** @addtogroup LSM6DS3_XG_Accelerometer_Y_Axis_Output_Enable_Selection_CTRL9_XL LSM6DS3_XG_Accelerometer_Y_Axis_Output_Enable_Selection_CTRL9_XL
Wolfgang Betz 44:d757094f6229 1164 * @{
Wolfgang Betz 44:d757094f6229 1165 */
Wolfgang Betz 44:d757094f6229 1166 #define LSM6DS3_XL_YEN_DISABLE ((uint8_t)0x00) /*!< Accelerometer�s Y-axis output enable: disable */
Wolfgang Betz 44:d757094f6229 1167 #define LSM6DS3_XL_YEN_ENABLE ((uint8_t)0x10) /*!< Accelerometer�s Y-axis output enable: enable */
Wolfgang Betz 44:d757094f6229 1168
Wolfgang Betz 44:d757094f6229 1169 #define LSM6DS3_XL_YEN_MASK ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1170
Wolfgang Betz 44:d757094f6229 1171 /**
Wolfgang Betz 44:d757094f6229 1172 * @}
Wolfgang Betz 44:d757094f6229 1173 */
Wolfgang Betz 44:d757094f6229 1174
Wolfgang Betz 44:d757094f6229 1175
Wolfgang Betz 44:d757094f6229 1176 /** @addtogroup LSM6DS3_XG_Accelerometer_X_Axis_Output_Enable_Selection_CTRL9_XL LSM6DS3_XG_Accelerometer_X_Axis_Output_Enable_Selection_CTRL9_XL
Wolfgang Betz 44:d757094f6229 1177 * @{
Wolfgang Betz 44:d757094f6229 1178 */
Wolfgang Betz 44:d757094f6229 1179 #define LSM6DS3_XL_XEN_DISABLE ((uint8_t)0x00) /*!< Accelerometer�s X-axis output enable: disable */
Wolfgang Betz 44:d757094f6229 1180 #define LSM6DS3_XL_XEN_ENABLE ((uint8_t)0x08) /*!< Accelerometer�s X-axis output enable: enable */
Wolfgang Betz 44:d757094f6229 1181
Wolfgang Betz 44:d757094f6229 1182 #define LSM6DS3_XL_XEN_MASK ((uint8_t)0x08)
Wolfgang Betz 44:d757094f6229 1183
Wolfgang Betz 44:d757094f6229 1184 /**
Wolfgang Betz 44:d757094f6229 1185 * @}
Wolfgang Betz 44:d757094f6229 1186 */
Wolfgang Betz 44:d757094f6229 1187
Wolfgang Betz 44:d757094f6229 1188 /** @addtogroup LSM6DS3_XG_Accelerometer_FF_DUR5_Selection_WAKE_UP_DUR LSM6DS3_XG_Accelerometer_FF_DUR5_Selection_WAKE_UP_DUR
Wolfgang Betz 44:d757094f6229 1189 * @{
Wolfgang Betz 44:d757094f6229 1190 */
Wolfgang Betz 44:d757094f6229 1191 #define LSM6DS3_XG_WAKE_UP_DUR_FF_DUR5_DEFAULT ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1192
Wolfgang Betz 44:d757094f6229 1193 #define LSM6DS3_XG_WAKE_UP_DUR_FF_DUR5_MASK ((uint8_t)0x80)
Wolfgang Betz 44:d757094f6229 1194 /**
Wolfgang Betz 44:d757094f6229 1195 * @}
Wolfgang Betz 44:d757094f6229 1196 */
Wolfgang Betz 44:d757094f6229 1197
Wolfgang Betz 44:d757094f6229 1198 /** @addtogroup LSM6DS3_XG_Accelerometer_WAKE_DUR_Selection_WAKE_UP_DUR LSM6DS3_XG_Accelerometer_WAKE_DUR_Selection_WAKE_UP_DUR
Wolfgang Betz 44:d757094f6229 1199 * @{
Wolfgang Betz 44:d757094f6229 1200 */
Wolfgang Betz 44:d757094f6229 1201 #define LSM6DS3_XG_WAKE_UP_DUR_WAKE_DUR_DEFAULT ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1202
Wolfgang Betz 44:d757094f6229 1203 #define LSM6DS3_XG_WAKE_UP_DUR_WAKE_DUR_MASK ((uint8_t)0x60)
Wolfgang Betz 44:d757094f6229 1204 /**
Wolfgang Betz 44:d757094f6229 1205 * @}
Wolfgang Betz 44:d757094f6229 1206 */
Wolfgang Betz 44:d757094f6229 1207
Wolfgang Betz 44:d757094f6229 1208 /** @addtogroup LSM6DS3_XG_Accelerometer_TIMER_HR_Selection_WAKE_UP_DUR LSM6DS3_XG_Accelerometer_TIMER_HR_Selection_WAKE_UP_DUR
Wolfgang Betz 44:d757094f6229 1209 * @{
Wolfgang Betz 44:d757094f6229 1210 */
Wolfgang Betz 44:d757094f6229 1211 #define LSM6DS3_XG_WAKE_UP_DUR_TIMER_HR_DEFAULT ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1212
Wolfgang Betz 44:d757094f6229 1213 #define LSM6DS3_XG_WAKE_UP_DUR_TIMER_HR_MASK ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1214 /**
Wolfgang Betz 44:d757094f6229 1215 * @}
Wolfgang Betz 44:d757094f6229 1216 */
Wolfgang Betz 44:d757094f6229 1217
Wolfgang Betz 44:d757094f6229 1218 /** @addtogroup LSM6DS3_XG_Accelerometer_SLEEP_DUR_Selection_WAKE_UP_DUR LSM6DS3_XG_Accelerometer_SLEEP_DUR_Selection_WAKE_UP_DUR
Wolfgang Betz 44:d757094f6229 1219 * @{
Wolfgang Betz 44:d757094f6229 1220 */
Wolfgang Betz 44:d757094f6229 1221 #define LSM6DS3_XG_WAKE_UP_DUR_SLEEP_DUR_DEFAULT ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1222
Wolfgang Betz 44:d757094f6229 1223 #define LSM6DS3_XG_WAKE_UP_DUR_SLEEP_DUR_MASK ((uint8_t)0x0F)
Wolfgang Betz 44:d757094f6229 1224 /**
Wolfgang Betz 44:d757094f6229 1225 * @}
Wolfgang Betz 44:d757094f6229 1226 */
Wolfgang Betz 44:d757094f6229 1227
Wolfgang Betz 44:d757094f6229 1228 /** @addtogroup LSM6DS3_XG_Accelerometer_FF_DUR_Selection_FREE_FALL LSM6DS3_XG_Accelerometer_FF_DUR_Selection_FREE_FALL
Wolfgang Betz 44:d757094f6229 1229 * @{
Wolfgang Betz 44:d757094f6229 1230 */
Wolfgang Betz 44:d757094f6229 1231 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_DUR_DEFAULT ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1232 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_DUR_TYPICAL ((uint8_t)0x30)
Wolfgang Betz 44:d757094f6229 1233
Wolfgang Betz 44:d757094f6229 1234 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_DUR_MASK ((uint8_t)0xF8)
Wolfgang Betz 44:d757094f6229 1235 /**
Wolfgang Betz 44:d757094f6229 1236 * @}
Wolfgang Betz 44:d757094f6229 1237 */
Wolfgang Betz 44:d757094f6229 1238
Wolfgang Betz 44:d757094f6229 1239 /** @addtogroup LSM6DS3_XG_Accelerometer_FF_THS_Selection_FREE_FALL LSM6DS3_XG_Accelerometer_FF_THS_Selection_FREE_FALL
Wolfgang Betz 44:d757094f6229 1240 * @{
Wolfgang Betz 44:d757094f6229 1241 */
Wolfgang Betz 44:d757094f6229 1242 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_156MG ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1243 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_219MG ((uint8_t)0x01)
Wolfgang Betz 44:d757094f6229 1244 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_250MG ((uint8_t)0x02)
Wolfgang Betz 44:d757094f6229 1245 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_312MG ((uint8_t)0x03)
Wolfgang Betz 44:d757094f6229 1246 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_344MG ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 1247 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_406MG ((uint8_t)0x05)
Wolfgang Betz 44:d757094f6229 1248 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_469MG ((uint8_t)0x06)
Wolfgang Betz 44:d757094f6229 1249 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_500MG ((uint8_t)0x07)
Wolfgang Betz 44:d757094f6229 1250
Wolfgang Betz 44:d757094f6229 1251 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_MASK ((uint8_t)0x07)
Wolfgang Betz 44:d757094f6229 1252
Wolfgang Betz 44:d757094f6229 1253 /**
Wolfgang Betz 44:d757094f6229 1254 * @}
Wolfgang Betz 44:d757094f6229 1255 */
Wolfgang Betz 44:d757094f6229 1256
Wolfgang Betz 44:d757094f6229 1257
Wolfgang Betz 44:d757094f6229 1258 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_INACT_STATE_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_INACT_STATE_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1259 * @{
Wolfgang Betz 44:d757094f6229 1260 */
Wolfgang Betz 44:d757094f6229 1261 #define LSM6DS3_XG_MD1_CFG_INT1_INACT_STATE_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1262 #define LSM6DS3_XG_MD1_CFG_INT1_INACT_STATE_ENABLE ((uint8_t)0x80)
Wolfgang Betz 44:d757094f6229 1263
Wolfgang Betz 44:d757094f6229 1264 #define LSM6DS3_XG_MD1_CFG_INT1_INACT_STATE_MASK ((uint8_t)0x80)
Wolfgang Betz 44:d757094f6229 1265 /**
Wolfgang Betz 44:d757094f6229 1266 * @}
Wolfgang Betz 44:d757094f6229 1267 */
Wolfgang Betz 44:d757094f6229 1268
Wolfgang Betz 44:d757094f6229 1269 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_SINGLE_TAP_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_SINGLE_TAP_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1270 * @{
Wolfgang Betz 44:d757094f6229 1271 */
Wolfgang Betz 44:d757094f6229 1272 #define LSM6DS3_XG_MD1_CFG_INT1_SINGLE_TAP_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1273 #define LSM6DS3_XG_MD1_CFG_INT1_SINGLE_TAP_ENABLE ((uint8_t)0x40)
Wolfgang Betz 44:d757094f6229 1274
Wolfgang Betz 44:d757094f6229 1275 #define LSM6DS3_XG_MD1_CFG_INT1_SINGLE_TAP_MASK ((uint8_t)0x40)
Wolfgang Betz 44:d757094f6229 1276 /**
Wolfgang Betz 44:d757094f6229 1277 * @}
Wolfgang Betz 44:d757094f6229 1278 */
Wolfgang Betz 44:d757094f6229 1279
Wolfgang Betz 44:d757094f6229 1280 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_WU_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_WU_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1281 * @{
Wolfgang Betz 44:d757094f6229 1282 */
Wolfgang Betz 44:d757094f6229 1283 #define LSM6DS3_XG_MD1_CFG_INT1_WU_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1284 #define LSM6DS3_XG_MD1_CFG_INT1_WU_ENABLE ((uint8_t)0x20)
Wolfgang Betz 44:d757094f6229 1285
Wolfgang Betz 44:d757094f6229 1286 #define LSM6DS3_XG_MD1_CFG_INT1_WU_MASK ((uint8_t)0x20)
Wolfgang Betz 44:d757094f6229 1287 /**
Wolfgang Betz 44:d757094f6229 1288 * @}
Wolfgang Betz 44:d757094f6229 1289 */
Wolfgang Betz 44:d757094f6229 1290
Wolfgang Betz 44:d757094f6229 1291 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_FF_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_FF_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1292 * @{
Wolfgang Betz 44:d757094f6229 1293 */
Wolfgang Betz 44:d757094f6229 1294 #define LSM6DS3_XG_MD1_CFG_INT1_FF_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1295 #define LSM6DS3_XG_MD1_CFG_INT1_FF_ENABLE ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1296
Wolfgang Betz 44:d757094f6229 1297 #define LSM6DS3_XG_MD1_CFG_INT1_FF_MASK ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1298 /**
Wolfgang Betz 44:d757094f6229 1299 * @}
Wolfgang Betz 44:d757094f6229 1300 */
Wolfgang Betz 44:d757094f6229 1301
Wolfgang Betz 44:d757094f6229 1302 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_DOUBLE_TAP_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_DOUBLE_TAP_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1303 * @{
Wolfgang Betz 44:d757094f6229 1304 */
Wolfgang Betz 44:d757094f6229 1305 #define LSM6DS3_XG_MD1_CFG_INT1_DOUBLE_TAP_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1306 #define LSM6DS3_XG_MD1_CFG_INT1_DOUBLE_TAP_ENABLE ((uint8_t)0x08)
Wolfgang Betz 44:d757094f6229 1307
Wolfgang Betz 44:d757094f6229 1308 #define LSM6DS3_XG_MD1_CFG_INT1_DOUBLE_TAP_MASK ((uint8_t)0x08)
Wolfgang Betz 44:d757094f6229 1309 /**
Wolfgang Betz 44:d757094f6229 1310 * @}
Wolfgang Betz 44:d757094f6229 1311 */
Wolfgang Betz 44:d757094f6229 1312
Wolfgang Betz 44:d757094f6229 1313 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_6D_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_6D_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1314 * @{
Wolfgang Betz 44:d757094f6229 1315 */
Wolfgang Betz 44:d757094f6229 1316 #define LSM6DS3_XG_MD1_CFG_INT1_6D_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1317 #define LSM6DS3_XG_MD1_CFG_INT1_6D_ENABLE ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 1318
Wolfgang Betz 44:d757094f6229 1319 #define LSM6DS3_XG_MD1_CFG_INT1_6D_MASK ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 1320 /**
Wolfgang Betz 44:d757094f6229 1321 * @}
Wolfgang Betz 44:d757094f6229 1322 */
Wolfgang Betz 44:d757094f6229 1323
Wolfgang Betz 44:d757094f6229 1324 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_TILT_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_TILT_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1325 * @{
Wolfgang Betz 44:d757094f6229 1326 */
Wolfgang Betz 44:d757094f6229 1327 #define LSM6DS3_XG_MD1_CFG_INT1_TILT_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1328 #define LSM6DS3_XG_MD1_CFG_INT1_TILT_ENABLE ((uint8_t)0x02)
Wolfgang Betz 44:d757094f6229 1329
Wolfgang Betz 44:d757094f6229 1330 #define LSM6DS3_XG_MD1_CFG_INT1_TILT_MASK ((uint8_t)0x02)
Wolfgang Betz 44:d757094f6229 1331 /**
Wolfgang Betz 44:d757094f6229 1332 * @}
Wolfgang Betz 44:d757094f6229 1333 */
Wolfgang Betz 44:d757094f6229 1334
Wolfgang Betz 44:d757094f6229 1335 /** @addtogroup LSM6DS3_XG_Accelerometer_INT1_TIMER_Selection_MD1_CFG LSM6DS3_XG_Accelerometer_INT1_TIMER_Selection_MD1_CFG
Wolfgang Betz 44:d757094f6229 1336 * @{
Wolfgang Betz 44:d757094f6229 1337 */
Wolfgang Betz 44:d757094f6229 1338 #define LSM6DS3_XG_MD1_CFG_INT1_TIMER_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1339 #define LSM6DS3_XG_MD1_CFG_INT1_TIMER_ENABLE ((uint8_t)0x01)
Wolfgang Betz 44:d757094f6229 1340
Wolfgang Betz 44:d757094f6229 1341 #define LSM6DS3_XG_MD1_CFG_INT1_TIMER_MASK ((uint8_t)0x01)
Wolfgang Betz 44:d757094f6229 1342
Wolfgang Betz 44:d757094f6229 1343 /**
Wolfgang Betz 44:d757094f6229 1344 * @}
Wolfgang Betz 44:d757094f6229 1345 */
Wolfgang Betz 44:d757094f6229 1346
Wolfgang Betz 44:d757094f6229 1347 /** @addtogroup LSM6DS3_XG_Accelerometer_FF_IA_Enable_WAKE_UP_SRC LSM6DS3_XG_Accelerometer_FF_IA_Enable_WAKE_UP_SRC
Wolfgang Betz 44:d757094f6229 1348 * @{
Wolfgang Betz 44:d757094f6229 1349 */
Wolfgang Betz 44:d757094f6229 1350 #define LSM6DS3_XG_WAKE_UP_SRC_FF_IA_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1351 #define LSM6DS3_XG_WAKE_UP_SRC_FF_IA_ENABLE ((uint8_t)0x20)
Wolfgang Betz 44:d757094f6229 1352
Wolfgang Betz 44:d757094f6229 1353 #define LSM6DS3_XG_WAKE_UP_SRC_FF_IA_MASK ((uint8_t)0x20)
Wolfgang Betz 44:d757094f6229 1354 /**
Wolfgang Betz 44:d757094f6229 1355 * @}
Wolfgang Betz 44:d757094f6229 1356 */
Wolfgang Betz 44:d757094f6229 1357
Wolfgang Betz 44:d757094f6229 1358 /** @addtogroup LSM6DS3_XG_Accelerometer_SLEEP_STATE_IA_Enable_WAKE_UP_SRC LSM6DS3_XG_Accelerometer_SLEEP_STATE_IA_Enable_WAKE_UP_SRC
Wolfgang Betz 44:d757094f6229 1359 * @{
Wolfgang Betz 44:d757094f6229 1360 */
Wolfgang Betz 44:d757094f6229 1361 #define LSM6DS3_XG_WAKE_UP_SRC_SLEEP_STATE_IA_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1362 #define LSM6DS3_XG_WAKE_UP_SRC_SLEEP_STATE_IA_ENABLE ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1363
Wolfgang Betz 44:d757094f6229 1364 #define LSM6DS3_XG_WAKE_UP_SRC_SLEEP_STATE_IA_MASK ((uint8_t)0x10)
Wolfgang Betz 44:d757094f6229 1365 /**
Wolfgang Betz 44:d757094f6229 1366 * @}
Wolfgang Betz 44:d757094f6229 1367 */
Wolfgang Betz 44:d757094f6229 1368
Wolfgang Betz 44:d757094f6229 1369 /** @addtogroup LSM6DS3_XG_Accelerometer_WU_IA_Enable_WAKE_UP_SRC LSM6DS3_XG_Accelerometer_WU_IA_Enable_WAKE_UP_SRC
Wolfgang Betz 44:d757094f6229 1370 * @{
Wolfgang Betz 44:d757094f6229 1371 */
Wolfgang Betz 44:d757094f6229 1372 #define LSM6DS3_XG_WAKE_UP_SRC_WU_IA_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1373 #define LSM6DS3_XG_WAKE_UP_SRC_WU_IA_ENABLE ((uint8_t)0x08)
Wolfgang Betz 44:d757094f6229 1374
Wolfgang Betz 44:d757094f6229 1375 #define LSM6DS3_XG_WAKE_UP_SRC_WU_IA_MASK ((uint8_t)0x08)
Wolfgang Betz 44:d757094f6229 1376 /**
Wolfgang Betz 44:d757094f6229 1377 * @}
Wolfgang Betz 44:d757094f6229 1378 */
Wolfgang Betz 44:d757094f6229 1379
Wolfgang Betz 44:d757094f6229 1380 /** @addtogroup LSM6DS3_XG_Accelerometer_X_WU_Enable_WAKE_UP_SRC LSM6DS3_XG_Accelerometer_X_WU_Enable_WAKE_UP_SRC
Wolfgang Betz 44:d757094f6229 1381 * @{
Wolfgang Betz 44:d757094f6229 1382 */
Wolfgang Betz 44:d757094f6229 1383 #define LSM6DS3_XG_WAKE_UP_SRC_X_WU_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1384 #define LSM6DS3_XG_WAKE_UP_SRC_X_WU_ENABLE ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 1385
Wolfgang Betz 44:d757094f6229 1386 #define LSM6DS3_XG_WAKE_UP_SRC_X_WU_MASK ((uint8_t)0x04)
Wolfgang Betz 44:d757094f6229 1387 /**
Wolfgang Betz 44:d757094f6229 1388 * @}
Wolfgang Betz 44:d757094f6229 1389 */
Wolfgang Betz 44:d757094f6229 1390
Wolfgang Betz 44:d757094f6229 1391 /** @addtogroup LSM6DS3_XG_Accelerometer_Y_WU_Enable_WAKE_UP_SRC LSM6DS3_XG_Accelerometer_Y_WU_Enable_WAKE_UP_SRC
Wolfgang Betz 44:d757094f6229 1392 * @{
Wolfgang Betz 44:d757094f6229 1393 */
Wolfgang Betz 44:d757094f6229 1394 #define LSM6DS3_XG_WAKE_UP_SRC_Y_WU_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1395 #define LSM6DS3_XG_WAKE_UP_SRC_Y_WU_ENABLE ((uint8_t)0x02)
Wolfgang Betz 44:d757094f6229 1396
Wolfgang Betz 44:d757094f6229 1397
Wolfgang Betz 44:d757094f6229 1398 #define LSM6DS3_XG_WAKE_UP_SRC_Y_WU_MASK ((uint8_t)0x02)
Wolfgang Betz 44:d757094f6229 1399 /**
Wolfgang Betz 44:d757094f6229 1400 * @}
Wolfgang Betz 44:d757094f6229 1401 */
Wolfgang Betz 44:d757094f6229 1402
Wolfgang Betz 44:d757094f6229 1403 /** @addtogroup LSM6DS3_XG_Accelerometer_Z_WU_Enable_WAKE_UP_SRC LSM6DS3_XG_Accelerometer_Z_WU_Enable_WAKE_UP_SRC
Wolfgang Betz 44:d757094f6229 1404 * @{
Wolfgang Betz 44:d757094f6229 1405 */
Wolfgang Betz 44:d757094f6229 1406 #define LSM6DS3_XG_WAKE_UP_SRC_Z_WU_DISABLE ((uint8_t)0x00)
Wolfgang Betz 44:d757094f6229 1407 #define LSM6DS3_XG_WAKE_UP_SRC_Z_WU_ENABLE ((uint8_t)0x01)
Wolfgang Betz 44:d757094f6229 1408
Wolfgang Betz 44:d757094f6229 1409 #define LSM6DS3_XG_WAKE_UP_SRC_Z_WU_MASK ((uint8_t)0x01)
Wolfgang Betz 44:d757094f6229 1410 /**
Wolfgang Betz 44:d757094f6229 1411 * @}
Wolfgang Betz 44:d757094f6229 1412 */
Wolfgang Betz 44:d757094f6229 1413
Wolfgang Betz 44:d757094f6229 1414 /**
Wolfgang Betz 44:d757094f6229 1415 * @}
Wolfgang Betz 44:d757094f6229 1416 */
Wolfgang Betz 44:d757094f6229 1417
Wolfgang Betz 44:d757094f6229 1418 /** @addtogroup LSM6DS3_Imported_Functions LSM6DS3_Imported_Functions
Wolfgang Betz 44:d757094f6229 1419 * @{
Wolfgang Betz 44:d757094f6229 1420 */
Wolfgang Betz 44:d757094f6229 1421
Wolfgang Betz 44:d757094f6229 1422 /* Six axes sensor IO functions */
Wolfgang Betz 44:d757094f6229 1423 extern IMU_6AXES_StatusTypeDef LSM6DS3_IO_Init( void );
Wolfgang Betz 44:d757094f6229 1424 extern IMU_6AXES_StatusTypeDef LSM6DS3_IO_Write( uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr,
Wolfgang Betz 44:d757094f6229 1425 uint16_t NumByteToWrite );
Wolfgang Betz 44:d757094f6229 1426 extern IMU_6AXES_StatusTypeDef LSM6DS3_IO_Read( uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr,
Wolfgang Betz 44:d757094f6229 1427 uint16_t NumByteToRead );
Wolfgang Betz 44:d757094f6229 1428 extern void LSM6DS3_IO_ITConfig( void );
Wolfgang Betz 44:d757094f6229 1429
Wolfgang Betz 44:d757094f6229 1430 /**
Wolfgang Betz 44:d757094f6229 1431 * @}
Wolfgang Betz 44:d757094f6229 1432 */
Wolfgang Betz 44:d757094f6229 1433
Wolfgang Betz 44:d757094f6229 1434 /** @addtogroup LSM6DS3_Exported_Types LSM6DS3_Exported_Types
Wolfgang Betz 44:d757094f6229 1435 * @{
Wolfgang Betz 44:d757094f6229 1436 */
Wolfgang Betz 44:d757094f6229 1437 /**
Wolfgang Betz 44:d757094f6229 1438 * @brief LSM6DS3 driver extended internal structure definition
Wolfgang Betz 44:d757094f6229 1439 */
Wolfgang Betz 44:d757094f6229 1440 typedef struct
Wolfgang Betz 44:d757094f6229 1441 {
Wolfgang Betz 44:d757094f6229 1442 IMU_6AXES_StatusTypeDef (*Enable_Free_Fall_Detection) (void);
Wolfgang Betz 44:d757094f6229 1443 IMU_6AXES_StatusTypeDef (*Disable_Free_Fall_Detection) (void);
Wolfgang Betz 44:d757094f6229 1444 IMU_6AXES_StatusTypeDef (*Get_Status_Free_Fall_Detection) (uint8_t *);
Wolfgang Betz 44:d757094f6229 1445 } LSM6DS3_DrvExtTypeDef;
Wolfgang Betz 44:d757094f6229 1446
Wolfgang Betz 44:d757094f6229 1447 /**
Wolfgang Betz 44:d757094f6229 1448 * @}
Wolfgang Betz 44:d757094f6229 1449 */
Wolfgang Betz 44:d757094f6229 1450
Wolfgang Betz 44:d757094f6229 1451 /** @addtogroup LSM6DS3_Exported_Variables LSM6DS3_Exported_Variables
Wolfgang Betz 44:d757094f6229 1452 * @{
Wolfgang Betz 44:d757094f6229 1453 */
Wolfgang Betz 44:d757094f6229 1454
Wolfgang Betz 44:d757094f6229 1455 /* Six axes sensor driver structure */
Wolfgang Betz 44:d757094f6229 1456 extern IMU_6AXES_DrvTypeDef LSM6DS3Drv;
Wolfgang Betz 44:d757094f6229 1457 extern IMU_6AXES_DrvExtTypeDef LSM6DS3Drv_ext;
Wolfgang Betz 44:d757094f6229 1458
Wolfgang Betz 44:d757094f6229 1459 /**
Wolfgang Betz 44:d757094f6229 1460 * @}
Wolfgang Betz 44:d757094f6229 1461 */
Wolfgang Betz 44:d757094f6229 1462
Wolfgang Betz 44:d757094f6229 1463 /**
Wolfgang Betz 44:d757094f6229 1464 * @}
Wolfgang Betz 44:d757094f6229 1465 */
Wolfgang Betz 44:d757094f6229 1466
Wolfgang Betz 44:d757094f6229 1467 /**
Wolfgang Betz 44:d757094f6229 1468 * @}
Wolfgang Betz 44:d757094f6229 1469 */
Wolfgang Betz 44:d757094f6229 1470
Wolfgang Betz 44:d757094f6229 1471 /**
Wolfgang Betz 44:d757094f6229 1472 * @}
Wolfgang Betz 44:d757094f6229 1473 */
Wolfgang Betz 44:d757094f6229 1474
Wolfgang Betz 44:d757094f6229 1475 #ifdef __cplusplus
Wolfgang Betz 44:d757094f6229 1476 }
Wolfgang Betz 44:d757094f6229 1477 #endif
Wolfgang Betz 44:d757094f6229 1478
Wolfgang Betz 44:d757094f6229 1479 #endif /* __LSM6DS3_H */
Wolfgang Betz 44:d757094f6229 1480
Wolfgang Betz 44:d757094f6229 1481 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/