Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IKS01A1 by
Components/lsm6ds0/lsm6ds0_platform.h@3:088aa5839e0d, 2015-04-13 (annotated)
- Committer:
- Wolfgang Betz
- Date:
- Mon Apr 13 14:44:02 2015 +0200
- Revision:
- 3:088aa5839e0d
Provide first skeleton for abstract classes
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Wolfgang Betz |
3:088aa5839e0d | 1 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 2 | ****************************************************************************** |
| Wolfgang Betz |
3:088aa5839e0d | 3 | * @file lsm6ds0.h |
| Wolfgang Betz |
3:088aa5839e0d | 4 | * @author MEMS Application Team |
| Wolfgang Betz |
3:088aa5839e0d | 5 | * @version V1.0.0 |
| Wolfgang Betz |
3:088aa5839e0d | 6 | * @date 30-July-2014 |
| Wolfgang Betz |
3:088aa5839e0d | 7 | * @brief This file contains definitions for the lsm6ds0.c |
| Wolfgang Betz |
3:088aa5839e0d | 8 | * firmware driver. |
| Wolfgang Betz |
3:088aa5839e0d | 9 | ****************************************************************************** |
| Wolfgang Betz |
3:088aa5839e0d | 10 | * @attention |
| Wolfgang Betz |
3:088aa5839e0d | 11 | * |
| Wolfgang Betz |
3:088aa5839e0d | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
| Wolfgang Betz |
3:088aa5839e0d | 13 | * |
| Wolfgang Betz |
3:088aa5839e0d | 14 | * Redistribution and use in source and binary forms, with or without modification, |
| Wolfgang Betz |
3:088aa5839e0d | 15 | * are permitted provided that the following conditions are met: |
| Wolfgang Betz |
3:088aa5839e0d | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
| Wolfgang Betz |
3:088aa5839e0d | 17 | * this list of conditions and the following disclaimer. |
| Wolfgang Betz |
3:088aa5839e0d | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| Wolfgang Betz |
3:088aa5839e0d | 19 | * this list of conditions and the following disclaimer in the documentation |
| Wolfgang Betz |
3:088aa5839e0d | 20 | * and/or other materials provided with the distribution. |
| Wolfgang Betz |
3:088aa5839e0d | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| Wolfgang Betz |
3:088aa5839e0d | 22 | * may be used to endorse or promote products derived from this software |
| Wolfgang Betz |
3:088aa5839e0d | 23 | * without specific prior written permission. |
| Wolfgang Betz |
3:088aa5839e0d | 24 | * |
| Wolfgang Betz |
3:088aa5839e0d | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| Wolfgang Betz |
3:088aa5839e0d | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| Wolfgang Betz |
3:088aa5839e0d | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| Wolfgang Betz |
3:088aa5839e0d | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| Wolfgang Betz |
3:088aa5839e0d | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| Wolfgang Betz |
3:088aa5839e0d | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| Wolfgang Betz |
3:088aa5839e0d | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| Wolfgang Betz |
3:088aa5839e0d | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| Wolfgang Betz |
3:088aa5839e0d | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| Wolfgang Betz |
3:088aa5839e0d | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| Wolfgang Betz |
3:088aa5839e0d | 35 | * |
| Wolfgang Betz |
3:088aa5839e0d | 36 | ****************************************************************************** |
| Wolfgang Betz |
3:088aa5839e0d | 37 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 38 | |
| Wolfgang Betz |
3:088aa5839e0d | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| Wolfgang Betz |
3:088aa5839e0d | 40 | #ifndef __LSM6DS0_PLATFORM_H |
| Wolfgang Betz |
3:088aa5839e0d | 41 | #define __LSM6DS0_PLATFORM_H |
| Wolfgang Betz |
3:088aa5839e0d | 42 | |
| Wolfgang Betz |
3:088aa5839e0d | 43 | |
| Wolfgang Betz |
3:088aa5839e0d | 44 | /******************************************************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 45 | /*********** START ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/ |
| Wolfgang Betz |
3:088aa5839e0d | 46 | /******************************************************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 47 | |
| Wolfgang Betz |
3:088aa5839e0d | 48 | |
| Wolfgang Betz |
3:088aa5839e0d | 49 | /***************************************** COMMON REGISTERS ********************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 50 | |
| Wolfgang Betz |
3:088aa5839e0d | 51 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 52 | * @brief Interrupt config register |
| Wolfgang Betz |
3:088aa5839e0d | 53 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 54 | * Read/write |
| Wolfgang Betz |
3:088aa5839e0d | 55 | * Default value: 0x00 |
| Wolfgang Betz |
3:088aa5839e0d | 56 | * [7] INT_IG_G: Gyroscope interrupt enable on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 57 | * [6] INT_IG_XL: Accelerometer interrupt generator on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 58 | * [5] INT_FSS5: FSS5 interrupt enable on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 59 | * [4] INT_OVR: Overrun interrupt on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 60 | * [3] INT_FTH: Gyroscope interrupt enable on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 61 | * [2] INT_BOOT: Accelerometer interrupt generator on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 62 | * [1] INT_DRDY_G: FSS5 interrupt enable on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 63 | * [0] INT_DRDY_XL: Overrun interrupt on INT pin |
| Wolfgang Betz |
3:088aa5839e0d | 64 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 65 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 66 | #define LSM6DS0_XG_INT_CTRL 0x0C |
| Wolfgang Betz |
3:088aa5839e0d | 67 | |
| Wolfgang Betz |
3:088aa5839e0d | 68 | |
| Wolfgang Betz |
3:088aa5839e0d | 69 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 70 | * @brief Device identifier register. |
| Wolfgang Betz |
3:088aa5839e0d | 71 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 72 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 73 | * Default value: |
| Wolfgang Betz |
3:088aa5839e0d | 74 | * [7:0] This read-only register contains the device identifier |
| Wolfgang Betz |
3:088aa5839e0d | 75 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 76 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 77 | #define LSM6DS0_XG_WHO_AM_I_ADDR 0x0F |
| Wolfgang Betz |
3:088aa5839e0d | 78 | |
| Wolfgang Betz |
3:088aa5839e0d | 79 | |
| Wolfgang Betz |
3:088aa5839e0d | 80 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 81 | * @brief Control Register 4 |
| Wolfgang Betz |
3:088aa5839e0d | 82 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 83 | * Read/write |
| Wolfgang Betz |
3:088aa5839e0d | 84 | * Default value: 0x38 |
| Wolfgang Betz |
3:088aa5839e0d | 85 | * [5] Zen_G: Gyroscopes Z-axis output enable |
| Wolfgang Betz |
3:088aa5839e0d | 86 | * [4] Yen_G: Gyroscopes Y-axis output enable |
| Wolfgang Betz |
3:088aa5839e0d | 87 | * [3] Xen_G: Gyroscopes X-axis output enable |
| Wolfgang Betz |
3:088aa5839e0d | 88 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 89 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 90 | #define LSM6DS0_XG_CTRL_REG4 0x1E |
| Wolfgang Betz |
3:088aa5839e0d | 91 | |
| Wolfgang Betz |
3:088aa5839e0d | 92 | |
| Wolfgang Betz |
3:088aa5839e0d | 93 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 94 | * @brief Control Register 10 |
| Wolfgang Betz |
3:088aa5839e0d | 95 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 96 | * Read/write |
| Wolfgang Betz |
3:088aa5839e0d | 97 | * Default value: 0x00 |
| Wolfgang Betz |
3:088aa5839e0d | 98 | * [2] ST_G: Gyro selftest disable (0) / enable (1) |
| Wolfgang Betz |
3:088aa5839e0d | 99 | * [0] ST_XL: Accel selftest disable (0) / enable (1) |
| Wolfgang Betz |
3:088aa5839e0d | 100 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 101 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 102 | #define LSM6DS0_XG_CTRL_REG10 0x24 |
| Wolfgang Betz |
3:088aa5839e0d | 103 | |
| Wolfgang Betz |
3:088aa5839e0d | 104 | |
| Wolfgang Betz |
3:088aa5839e0d | 105 | /***************************************** GYROSCOPE REGISTERS ********************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 106 | |
| Wolfgang Betz |
3:088aa5839e0d | 107 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 108 | * @brief Angular rate sensor Control Register 1 |
| Wolfgang Betz |
3:088aa5839e0d | 109 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 110 | * Read/write |
| Wolfgang Betz |
3:088aa5839e0d | 111 | * Default value: 0x00 |
| Wolfgang Betz |
3:088aa5839e0d | 112 | * [7:5] ODR_G2-0: Gyroscope output data rate selection |
| Wolfgang Betz |
3:088aa5839e0d | 113 | * [4:3] FS_G1-0: Gyroscope full-scale selection |
| Wolfgang Betz |
3:088aa5839e0d | 114 | * [2] This bit must be set to 0 for the correct operation of the device |
| Wolfgang Betz |
3:088aa5839e0d | 115 | * [1:0] BW_G1-0: Gyroscope bandwidth selection |
| Wolfgang Betz |
3:088aa5839e0d | 116 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 117 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 118 | #define LSM6DS0_XG_CTRL_REG1_G 0x10 |
| Wolfgang Betz |
3:088aa5839e0d | 119 | |
| Wolfgang Betz |
3:088aa5839e0d | 120 | |
| Wolfgang Betz |
3:088aa5839e0d | 121 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 122 | * @brief Gyroscope data (LSB) |
| Wolfgang Betz |
3:088aa5839e0d | 123 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 124 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 125 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 126 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 127 | #define LSM6DS0_XG_OUT_X_L_G 0x18 |
| Wolfgang Betz |
3:088aa5839e0d | 128 | |
| Wolfgang Betz |
3:088aa5839e0d | 129 | |
| Wolfgang Betz |
3:088aa5839e0d | 130 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 131 | * @brief Gyroscope data (MSB) |
| Wolfgang Betz |
3:088aa5839e0d | 132 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 133 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 134 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 135 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 136 | #define LSM6DS0_XG_OUT_X_H_G 0x19 |
| Wolfgang Betz |
3:088aa5839e0d | 137 | |
| Wolfgang Betz |
3:088aa5839e0d | 138 | |
| Wolfgang Betz |
3:088aa5839e0d | 139 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 140 | * @brief Gyroscope data (LSB) |
| Wolfgang Betz |
3:088aa5839e0d | 141 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 142 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 143 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 144 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 145 | #define LSM6DS0_XG_OUT_Y_L_G 0x1A |
| Wolfgang Betz |
3:088aa5839e0d | 146 | |
| Wolfgang Betz |
3:088aa5839e0d | 147 | |
| Wolfgang Betz |
3:088aa5839e0d | 148 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 149 | * @brief Gyroscope data (MSB) |
| Wolfgang Betz |
3:088aa5839e0d | 150 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 151 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 152 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 153 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 154 | #define LSM6DS0_XG_OUT_Y_H_G 0x1B |
| Wolfgang Betz |
3:088aa5839e0d | 155 | |
| Wolfgang Betz |
3:088aa5839e0d | 156 | |
| Wolfgang Betz |
3:088aa5839e0d | 157 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 158 | * @brief Gyroscope data (LSB) |
| Wolfgang Betz |
3:088aa5839e0d | 159 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 160 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 161 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 162 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 163 | #define LSM6DS0_XG_OUT_Z_L_G 0x1C |
| Wolfgang Betz |
3:088aa5839e0d | 164 | |
| Wolfgang Betz |
3:088aa5839e0d | 165 | |
| Wolfgang Betz |
3:088aa5839e0d | 166 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 167 | * @brief Gyroscope data (MSB) |
| Wolfgang Betz |
3:088aa5839e0d | 168 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 169 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 170 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 171 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 172 | #define LSM6DS0_XG_OUT_Z_H_G 0x1D |
| Wolfgang Betz |
3:088aa5839e0d | 173 | |
| Wolfgang Betz |
3:088aa5839e0d | 174 | |
| Wolfgang Betz |
3:088aa5839e0d | 175 | |
| Wolfgang Betz |
3:088aa5839e0d | 176 | /*************************************** ACCELEROMETER REGISTERS *******************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 177 | |
| Wolfgang Betz |
3:088aa5839e0d | 178 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 179 | * @brief Linear acceleration sensor Control Register 6 |
| Wolfgang Betz |
3:088aa5839e0d | 180 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 181 | * Read/write |
| Wolfgang Betz |
3:088aa5839e0d | 182 | * Default value: 0x00 |
| Wolfgang Betz |
3:088aa5839e0d | 183 | * [7:5] ODR_XL2-0: Accelerometer Output data rate and power mode selection |
| Wolfgang Betz |
3:088aa5839e0d | 184 | * [4:3] FS1_XL-FS0_XL: Accelerometer full-scale selection |
| Wolfgang Betz |
3:088aa5839e0d | 185 | * [2] BW_SCAL_ODR: Bandwidth selection |
| Wolfgang Betz |
3:088aa5839e0d | 186 | * [1:0] BW_XL1-0: Anti-aliasing filter bandwidth selection |
| Wolfgang Betz |
3:088aa5839e0d | 187 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 188 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 189 | #define LSM6DS0_XG_CTRL_REG6_XL 0x20 |
| Wolfgang Betz |
3:088aa5839e0d | 190 | |
| Wolfgang Betz |
3:088aa5839e0d | 191 | |
| Wolfgang Betz |
3:088aa5839e0d | 192 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 193 | * @brief Linear acceleration sensor Control Register 5 |
| Wolfgang Betz |
3:088aa5839e0d | 194 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 195 | * Read/write |
| Wolfgang Betz |
3:088aa5839e0d | 196 | * Default value: 0x38 |
| Wolfgang Betz |
3:088aa5839e0d | 197 | * [7:6] DEC1-0: Decimation of acceleration data on OUT REG and FIFO |
| Wolfgang Betz |
3:088aa5839e0d | 198 | * [5] Zen_XL: Accelerometers Z-axis output enable |
| Wolfgang Betz |
3:088aa5839e0d | 199 | * [4] Yen_XL: Accelerometers Y-axis output enable |
| Wolfgang Betz |
3:088aa5839e0d | 200 | * [3] Xen_XL: Accelerometers X-axis output enable |
| Wolfgang Betz |
3:088aa5839e0d | 201 | * [2:0] These bits must be set to 0 for the correct operation of the device |
| Wolfgang Betz |
3:088aa5839e0d | 202 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 203 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 204 | #define LSM6DS0_XG_CTRL_REG5_XL 0x1F |
| Wolfgang Betz |
3:088aa5839e0d | 205 | |
| Wolfgang Betz |
3:088aa5839e0d | 206 | |
| Wolfgang Betz |
3:088aa5839e0d | 207 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 208 | * @brief Accelerometer data (LSB) |
| Wolfgang Betz |
3:088aa5839e0d | 209 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 210 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 211 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 212 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 213 | #define LSM6DS0_XG_OUT_X_L_XL 0x28 |
| Wolfgang Betz |
3:088aa5839e0d | 214 | |
| Wolfgang Betz |
3:088aa5839e0d | 215 | |
| Wolfgang Betz |
3:088aa5839e0d | 216 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 217 | * @brief Accelerometer data (MSB) |
| Wolfgang Betz |
3:088aa5839e0d | 218 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 219 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 220 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 221 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 222 | #define LSM6DS0_XG_OUT_X_H_XL 0x29 |
| Wolfgang Betz |
3:088aa5839e0d | 223 | |
| Wolfgang Betz |
3:088aa5839e0d | 224 | |
| Wolfgang Betz |
3:088aa5839e0d | 225 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 226 | * @brief Accelerometer data (LSB) |
| Wolfgang Betz |
3:088aa5839e0d | 227 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 228 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 229 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 230 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 231 | #define LSM6DS0_XG_OUT_Y_L_XL 0x2A |
| Wolfgang Betz |
3:088aa5839e0d | 232 | |
| Wolfgang Betz |
3:088aa5839e0d | 233 | |
| Wolfgang Betz |
3:088aa5839e0d | 234 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 235 | * @brief Accelerometer data (MSB) |
| Wolfgang Betz |
3:088aa5839e0d | 236 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 237 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 238 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 239 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 240 | #define LSM6DS0_XG_OUT_Y_H_XL 0x2B |
| Wolfgang Betz |
3:088aa5839e0d | 241 | |
| Wolfgang Betz |
3:088aa5839e0d | 242 | |
| Wolfgang Betz |
3:088aa5839e0d | 243 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 244 | * @brief Accelerometer data (LSB) |
| Wolfgang Betz |
3:088aa5839e0d | 245 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 246 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 247 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 248 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 249 | #define LSM6DS0_XG_OUT_Z_L_XL 0x2C |
| Wolfgang Betz |
3:088aa5839e0d | 250 | |
| Wolfgang Betz |
3:088aa5839e0d | 251 | |
| Wolfgang Betz |
3:088aa5839e0d | 252 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 253 | * @brief Accelerometer data (MSB) |
| Wolfgang Betz |
3:088aa5839e0d | 254 | * \code |
| Wolfgang Betz |
3:088aa5839e0d | 255 | * Read |
| Wolfgang Betz |
3:088aa5839e0d | 256 | * \endcode |
| Wolfgang Betz |
3:088aa5839e0d | 257 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 258 | #define LSM6DS0_XG_OUT_Z_H_XL 0x2D |
| Wolfgang Betz |
3:088aa5839e0d | 259 | |
| Wolfgang Betz |
3:088aa5839e0d | 260 | /******************************************************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 261 | /************* END ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/ |
| Wolfgang Betz |
3:088aa5839e0d | 262 | /******************************************************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 263 | |
| Wolfgang Betz |
3:088aa5839e0d | 264 | |
| Wolfgang Betz |
3:088aa5839e0d | 265 | |
| Wolfgang Betz |
3:088aa5839e0d | 266 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 267 | * @brief Device Address |
| Wolfgang Betz |
3:088aa5839e0d | 268 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 269 | |
| Wolfgang Betz |
3:088aa5839e0d | 270 | #define LSM6DS0_XG_MEMS_ADDRESS 0xD6 // SAD[0] = 1 |
| Wolfgang Betz |
3:088aa5839e0d | 271 | |
| Wolfgang Betz |
3:088aa5839e0d | 272 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 273 | * @brief Device Identifier. Default value of the WHO_AM_I register. |
| Wolfgang Betz |
3:088aa5839e0d | 274 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 275 | #define I_AM_LSM6DS0_XG ((uint8_t)0x68) |
| Wolfgang Betz |
3:088aa5839e0d | 276 | |
| Wolfgang Betz |
3:088aa5839e0d | 277 | |
| Wolfgang Betz |
3:088aa5839e0d | 278 | |
| Wolfgang Betz |
3:088aa5839e0d | 279 | /************************************** GYROSCOPE REGISTERS VALUE *******************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 280 | |
| Wolfgang Betz |
3:088aa5839e0d | 281 | |
| Wolfgang Betz |
3:088aa5839e0d | 282 | /** @defgroup LSM6DS0_XG Gyroscope Output Data Rate selection CTRL_REG1_G |
| Wolfgang Betz |
3:088aa5839e0d | 283 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 284 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 285 | #define LSM6DS0_G_ODR_PD ((uint8_t)0x00) /*!< Output Data Rate: Power-down*/ |
| Wolfgang Betz |
3:088aa5839e0d | 286 | #define LSM6DS0_G_ODR_14_9HZ ((uint8_t)0x20) /*!< Output Data Rate: 14.9 Hz, cutoff 5Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 287 | #define LSM6DS0_G_ODR_59_5HZ ((uint8_t)0x40) /*!< Output Data Rate: 59.5 Hz, cutoff 19Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 288 | #define LSM6DS0_G_ODR_119HZ ((uint8_t)0x60) /*!< Output Data Rate: 119 Hz, cutoff 38Hz*/ |
| Wolfgang Betz |
3:088aa5839e0d | 289 | #define LSM6DS0_G_ODR_238HZ ((uint8_t)0x80) /*!< Output Data Rate: 238 Hz, cutoff 76Hz*/ |
| Wolfgang Betz |
3:088aa5839e0d | 290 | #define LSM6DS0_G_ODR_476HZ ((uint8_t)0xA0) /*!< Output Data Rate: 476 Hz, cutoff 100Hz*/ |
| Wolfgang Betz |
3:088aa5839e0d | 291 | #define LSM6DS0_G_ODR_952HZ ((uint8_t)0xC0) /*!< Output Data Rate: 952 Hz, cutoff 100Hz*/ |
| Wolfgang Betz |
3:088aa5839e0d | 292 | |
| Wolfgang Betz |
3:088aa5839e0d | 293 | #define LSM6DS0_G_ODR_MASK ((uint8_t)0xE0) |
| Wolfgang Betz |
3:088aa5839e0d | 294 | |
| Wolfgang Betz |
3:088aa5839e0d | 295 | |
| Wolfgang Betz |
3:088aa5839e0d | 296 | |
| Wolfgang Betz |
3:088aa5839e0d | 297 | /** @defgroup LSM6DS0_XG Gyroscope Bandwidth selection CTRL_REG1_G |
| Wolfgang Betz |
3:088aa5839e0d | 298 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 299 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 300 | #define LSM6DS0_G_BW_00 ((uint8_t)0x00) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down |
| Wolfgang Betz |
3:088aa5839e0d | 301 | - cutoff = n.a. when ODR = 14.9 |
| Wolfgang Betz |
3:088aa5839e0d | 302 | - cutoff = 16 when ODR = 59.5 |
| Wolfgang Betz |
3:088aa5839e0d | 303 | - cutoff = 14 when ODR = 119 |
| Wolfgang Betz |
3:088aa5839e0d | 304 | - cutoff = 14 when ODR = 238 |
| Wolfgang Betz |
3:088aa5839e0d | 305 | - cutoff = 21 when ODR = 476 |
| Wolfgang Betz |
3:088aa5839e0d | 306 | - cutoff = 33 when ODR = 952 */ |
| Wolfgang Betz |
3:088aa5839e0d | 307 | #define LSM6DS0_G_BW_01 ((uint8_t)0x01) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down |
| Wolfgang Betz |
3:088aa5839e0d | 308 | - cutoff = n.a. when ODR = 14.9 |
| Wolfgang Betz |
3:088aa5839e0d | 309 | - cutoff = 16 when ODR = 59.5 |
| Wolfgang Betz |
3:088aa5839e0d | 310 | - cutoff = 31 when ODR = 119 |
| Wolfgang Betz |
3:088aa5839e0d | 311 | - cutoff = 29 when ODR = 238 |
| Wolfgang Betz |
3:088aa5839e0d | 312 | - cutoff = 28 when ODR = 476 |
| Wolfgang Betz |
3:088aa5839e0d | 313 | - cutoff = 40 when ODR = 952 */ |
| Wolfgang Betz |
3:088aa5839e0d | 314 | #define LSM6DS0_G_BW_10 ((uint8_t)0x02) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down |
| Wolfgang Betz |
3:088aa5839e0d | 315 | - cutoff = n.a. when ODR = 14.9 |
| Wolfgang Betz |
3:088aa5839e0d | 316 | - cutoff = 16 when ODR = 59.5 |
| Wolfgang Betz |
3:088aa5839e0d | 317 | - cutoff = 31 when ODR = 119 |
| Wolfgang Betz |
3:088aa5839e0d | 318 | - cutoff = 63 when ODR = 238 |
| Wolfgang Betz |
3:088aa5839e0d | 319 | - cutoff = 57 when ODR = 476 |
| Wolfgang Betz |
3:088aa5839e0d | 320 | - cutoff = 58 when ODR = 952 */ |
| Wolfgang Betz |
3:088aa5839e0d | 321 | #define LSM6DS0_G_BW_11 ((uint8_t)0x03) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down |
| Wolfgang Betz |
3:088aa5839e0d | 322 | - cutoff = n.a. when ODR = 14.9 |
| Wolfgang Betz |
3:088aa5839e0d | 323 | - cutoff = 16 when ODR = 59.5 |
| Wolfgang Betz |
3:088aa5839e0d | 324 | - cutoff = 31 when ODR = 119 |
| Wolfgang Betz |
3:088aa5839e0d | 325 | - cutoff = 78 when ODR = 238 |
| Wolfgang Betz |
3:088aa5839e0d | 326 | - cutoff = 100 when ODR = 476 |
| Wolfgang Betz |
3:088aa5839e0d | 327 | - cutoff = 100 when ODR = 952 */ |
| Wolfgang Betz |
3:088aa5839e0d | 328 | |
| Wolfgang Betz |
3:088aa5839e0d | 329 | #define LSM6DS0_G_BW_MASK ((uint8_t)0x03) |
| Wolfgang Betz |
3:088aa5839e0d | 330 | |
| Wolfgang Betz |
3:088aa5839e0d | 331 | |
| Wolfgang Betz |
3:088aa5839e0d | 332 | /** @defgroup LSM6DS0_XG Gyroscope Full scale selection CTRL_REG1_G |
| Wolfgang Betz |
3:088aa5839e0d | 333 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 334 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 335 | #define LSM6DS0_G_FS_245 ((uint8_t)0x00) /*!< Full scale: 245 dps*/ |
| Wolfgang Betz |
3:088aa5839e0d | 336 | #define LSM6DS0_G_FS_500 ((uint8_t)0x08) /*!< Full scale: 500 dps */ |
| Wolfgang Betz |
3:088aa5839e0d | 337 | #define LSM6DS0_G_FS_2000 ((uint8_t)0x18) /*!< Full scale: 2000 dps */ |
| Wolfgang Betz |
3:088aa5839e0d | 338 | |
| Wolfgang Betz |
3:088aa5839e0d | 339 | #define LSM6DS0_G_FS_MASK ((uint8_t)0x18) |
| Wolfgang Betz |
3:088aa5839e0d | 340 | |
| Wolfgang Betz |
3:088aa5839e0d | 341 | |
| Wolfgang Betz |
3:088aa5839e0d | 342 | /** @defgroup LSM6DS0_XG Gyroscopes Z-axis output enable selection CTRL_REG4 |
| Wolfgang Betz |
3:088aa5839e0d | 343 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 344 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 345 | #define LSM6DS0_G_ZEN_DISABLE ((uint8_t)0x00) /*!< Gyroscopes Z-axis output enable: disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 346 | #define LSM6DS0_G_ZEN_ENABLE ((uint8_t)0x20) /*!< Gyroscopes Z-axis output enable: enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 347 | |
| Wolfgang Betz |
3:088aa5839e0d | 348 | #define LSM6DS0_G_ZEN_MASK ((uint8_t)0x20) |
| Wolfgang Betz |
3:088aa5839e0d | 349 | |
| Wolfgang Betz |
3:088aa5839e0d | 350 | |
| Wolfgang Betz |
3:088aa5839e0d | 351 | /** @defgroup LSM6DS0_XG Gyroscopes Y-axis output enable selection CTRL_REG4 |
| Wolfgang Betz |
3:088aa5839e0d | 352 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 353 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 354 | #define LSM6DS0_G_YEN_DISABLE ((uint8_t)0x00) /*!< Gyroscopes Y-axis output enable: disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 355 | #define LSM6DS0_G_YEN_ENABLE ((uint8_t)0x10) /*!< Gyroscopes Y-axis output enable: enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 356 | |
| Wolfgang Betz |
3:088aa5839e0d | 357 | #define LSM6DS0_G_YEN_MASK ((uint8_t)0x10) |
| Wolfgang Betz |
3:088aa5839e0d | 358 | |
| Wolfgang Betz |
3:088aa5839e0d | 359 | |
| Wolfgang Betz |
3:088aa5839e0d | 360 | /** @defgroup LSM6DS0_XG Gyroscopes X-axis output enable selection CTRL_REG4 |
| Wolfgang Betz |
3:088aa5839e0d | 361 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 362 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 363 | #define LSM6DS0_G_XEN_DISABLE ((uint8_t)0x00) /*!< Gyroscopes X-axis output enable: disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 364 | #define LSM6DS0_G_XEN_ENABLE ((uint8_t)0x08) /*!< Gyroscopes X-axis output enable: enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 365 | |
| Wolfgang Betz |
3:088aa5839e0d | 366 | #define LSM6DS0_G_XEN_MASK ((uint8_t)0x08) |
| Wolfgang Betz |
3:088aa5839e0d | 367 | |
| Wolfgang Betz |
3:088aa5839e0d | 368 | |
| Wolfgang Betz |
3:088aa5839e0d | 369 | /** @defgroup LSM6DS0 Gyro selftest en/dis - LSM6DS0_XG_CTRL_REG10 |
| Wolfgang Betz |
3:088aa5839e0d | 370 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 371 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 372 | #define LSM6DS0_G_ST_DISABLE ((uint8_t)0x00) /*!< Gyro selftest disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 373 | #define LSM6DS0_G_ST_ENABLE ((uint8_t)0x04) /*!< Gyro selftest enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 374 | |
| Wolfgang Betz |
3:088aa5839e0d | 375 | #define LSM6DS0_G_ST_MASK ((uint8_t)0x04) |
| Wolfgang Betz |
3:088aa5839e0d | 376 | |
| Wolfgang Betz |
3:088aa5839e0d | 377 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 378 | * @} |
| Wolfgang Betz |
3:088aa5839e0d | 379 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 380 | |
| Wolfgang Betz |
3:088aa5839e0d | 381 | |
| Wolfgang Betz |
3:088aa5839e0d | 382 | /************************************ ACCELEROMETER REGISTERS VALUE *****************************************/ |
| Wolfgang Betz |
3:088aa5839e0d | 383 | |
| Wolfgang Betz |
3:088aa5839e0d | 384 | /** @defgroup LSM6DS0_XG Accelerometer Output Data Rate selection CTRL_REG6_XL |
| Wolfgang Betz |
3:088aa5839e0d | 385 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 386 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 387 | #define LSM6DS0_XL_ODR_PD ((uint8_t)0x00) /*!< Output Data Rate: Power-down*/ |
| Wolfgang Betz |
3:088aa5839e0d | 388 | #define LSM6DS0_XL_ODR_10HZ ((uint8_t)0x20) /*!< Output Data Rate: 10 Hz*/ |
| Wolfgang Betz |
3:088aa5839e0d | 389 | #define LSM6DS0_XL_ODR_50HZ ((uint8_t)0x40) /*!< Output Data Rate: 50 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 390 | #define LSM6DS0_XL_ODR_119HZ ((uint8_t)0x60) /*!< Output Data Rate: 119 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 391 | #define LSM6DS0_XL_ODR_238HZ ((uint8_t)0x80) /*!< Output Data Rate: 238 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 392 | #define LSM6DS0_XL_ODR_476HZ ((uint8_t)0xA0) /*!< Output Data Rate: 476 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 393 | #define LSM6DS0_XL_ODR_952HZ ((uint8_t)0xC0) /*!< Output Data Rate: 952 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 394 | |
| Wolfgang Betz |
3:088aa5839e0d | 395 | #define LSM6DS0_XL_ODR_MASK ((uint8_t)0xE0) |
| Wolfgang Betz |
3:088aa5839e0d | 396 | |
| Wolfgang Betz |
3:088aa5839e0d | 397 | |
| Wolfgang Betz |
3:088aa5839e0d | 398 | /** @defgroup LSM6DS0_XG Accelerometer Full scale selection CTRL_REG6_XL |
| Wolfgang Betz |
3:088aa5839e0d | 399 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 400 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 401 | #define LSM6DS0_XL_FS_2G ((uint8_t)0x00) /*!< Full scale: +- 2g */ |
| Wolfgang Betz |
3:088aa5839e0d | 402 | #define LSM6DS0_XL_FS_4G ((uint8_t)0x10) /*!< Full scale: +- 4g */ |
| Wolfgang Betz |
3:088aa5839e0d | 403 | #define LSM6DS0_XL_FS_8G ((uint8_t)0x18) /*!< Full scale: +- 8g */ |
| Wolfgang Betz |
3:088aa5839e0d | 404 | |
| Wolfgang Betz |
3:088aa5839e0d | 405 | #define LSM6DS0_XL_FS_MASK ((uint8_t)0x18) |
| Wolfgang Betz |
3:088aa5839e0d | 406 | |
| Wolfgang Betz |
3:088aa5839e0d | 407 | |
| Wolfgang Betz |
3:088aa5839e0d | 408 | /** @defgroup LSM6DS0_XG Accelerometer Bandwidth selection CTRL_REG6_XL |
| Wolfgang Betz |
3:088aa5839e0d | 409 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 410 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 411 | #define LSM6DS0_XL_BW_SCAL_ODR ((uint8_t)0x00) /*!< Bandwidth selection: determined by ODR: |
| Wolfgang Betz |
3:088aa5839e0d | 412 | - BW = 408Hz when ODR = 952Hz, 50Hz, 10Hz |
| Wolfgang Betz |
3:088aa5839e0d | 413 | - BW = 211Hz when ODR = 476Hz |
| Wolfgang Betz |
3:088aa5839e0d | 414 | - BW = 105Hz when ODR = 238Hz |
| Wolfgang Betz |
3:088aa5839e0d | 415 | - BW = 50Hz when ODR = 119Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 416 | #define LSM6DS0_XL_BW_SCAL_BW ((uint8_t)0x04) /*!< Bandwidth selection: selected according to Anti aliasing filter bandwidth */ |
| Wolfgang Betz |
3:088aa5839e0d | 417 | |
| Wolfgang Betz |
3:088aa5839e0d | 418 | #define LSM6DS0_XL_BW_SCAL_MASK ((uint8_t)0x04) |
| Wolfgang Betz |
3:088aa5839e0d | 419 | |
| Wolfgang Betz |
3:088aa5839e0d | 420 | |
| Wolfgang Betz |
3:088aa5839e0d | 421 | /** @defgroup LSM6DS0_XG Accelerometer Anti aliasing filter bandwidth selection CTRL_REG6_XL |
| Wolfgang Betz |
3:088aa5839e0d | 422 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 423 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 424 | #define LSM6DS0_XL_BW_408HZ ((uint8_t)0x00) /*!< Anti-aliasing filter bandwidht: 408 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 425 | #define LSM6DS0_XL_BW_211HZ ((uint8_t)0x01) /*!< Anti-aliasing filter bandwidht: 211 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 426 | #define LSM6DS0_XL_BW_105HZ ((uint8_t)0x02) /*!< Anti-aliasing filter bandwidht: 105 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 427 | #define LSM6DS0_XL_BW_50HZ ((uint8_t)0x03) /*!< Anti-aliasing filter bandwidht: 50 Hz */ |
| Wolfgang Betz |
3:088aa5839e0d | 428 | |
| Wolfgang Betz |
3:088aa5839e0d | 429 | #define LSM6DS0_XL_BW_MASK ((uint8_t)0x03) |
| Wolfgang Betz |
3:088aa5839e0d | 430 | |
| Wolfgang Betz |
3:088aa5839e0d | 431 | |
| Wolfgang Betz |
3:088aa5839e0d | 432 | /** @defgroup LSM6DS0_XG Accelerometer Decimation of acceleration data selection CTRL_REG5_XL |
| Wolfgang Betz |
3:088aa5839e0d | 433 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 434 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 435 | #define LSM6DS0_XL_DEC_NO ((uint8_t)0x00) /*!< Decimation of acceleration data: no decimation */ |
| Wolfgang Betz |
3:088aa5839e0d | 436 | #define LSM6DS0_XL_DEC_EVERY_2S ((uint8_t)0x40) /*!< Decimation of acceleration data: update every 2 samples */ |
| Wolfgang Betz |
3:088aa5839e0d | 437 | #define LSM6DS0_XL_DEC_EVERY_4S ((uint8_t)0x80) /*!< Decimation of acceleration data: update every 4 samples */ |
| Wolfgang Betz |
3:088aa5839e0d | 438 | #define LSM6DS0_XL_DEC_EVERY_8S ((uint8_t)0xC0) /*!< Decimation of acceleration data: update every 8 samples */ |
| Wolfgang Betz |
3:088aa5839e0d | 439 | |
| Wolfgang Betz |
3:088aa5839e0d | 440 | #define LSM6DS0_XL_DEC_MASK ((uint8_t)0xC0) |
| Wolfgang Betz |
3:088aa5839e0d | 441 | |
| Wolfgang Betz |
3:088aa5839e0d | 442 | |
| Wolfgang Betz |
3:088aa5839e0d | 443 | /** @defgroup LSM6DS0_XG Accelerometers Z-axis output enable selection CTRL_REG5_XL |
| Wolfgang Betz |
3:088aa5839e0d | 444 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 445 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 446 | #define LSM6DS0_XL_ZEN_DISABLE ((uint8_t)0x00) /*!< Accelerometers Z-axis output enable: disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 447 | #define LSM6DS0_XL_ZEN_ENABLE ((uint8_t)0x20) /*!< Accelerometers Z-axis output enable: enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 448 | |
| Wolfgang Betz |
3:088aa5839e0d | 449 | #define LSM6DS0_XL_ZEN_MASK ((uint8_t)0x20) |
| Wolfgang Betz |
3:088aa5839e0d | 450 | |
| Wolfgang Betz |
3:088aa5839e0d | 451 | |
| Wolfgang Betz |
3:088aa5839e0d | 452 | /** @defgroup LSM6DS0_XG Accelerometers Y-axis output enable selection CTRL_REG5_XL |
| Wolfgang Betz |
3:088aa5839e0d | 453 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 454 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 455 | #define LSM6DS0_XL_YEN_DISABLE ((uint8_t)0x00) /*!< Accelerometers Y-axis output enable: disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 456 | #define LSM6DS0_XL_YEN_ENABLE ((uint8_t)0x10) /*!< Accelerometers Y-axis output enable: enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 457 | |
| Wolfgang Betz |
3:088aa5839e0d | 458 | #define LSM6DS0_XL_YEN_MASK ((uint8_t)0x10) |
| Wolfgang Betz |
3:088aa5839e0d | 459 | |
| Wolfgang Betz |
3:088aa5839e0d | 460 | |
| Wolfgang Betz |
3:088aa5839e0d | 461 | /** @defgroup LSM6DS0_XG Accelerometers X-axis output enable selection CTRL_REG5_XL |
| Wolfgang Betz |
3:088aa5839e0d | 462 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 463 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 464 | #define LSM6DS0_XL_XEN_DISABLE ((uint8_t)0x00) /*!< Accelerometers X-axis output enable: disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 465 | #define LSM6DS0_XL_XEN_ENABLE ((uint8_t)0x08) /*!< Accelerometers X-axis output enable: enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 466 | |
| Wolfgang Betz |
3:088aa5839e0d | 467 | #define LSM6DS0_XL_XEN_MASK ((uint8_t)0x08) |
| Wolfgang Betz |
3:088aa5839e0d | 468 | |
| Wolfgang Betz |
3:088aa5839e0d | 469 | /** |
| Wolfgang Betz |
3:088aa5839e0d | 470 | * @} |
| Wolfgang Betz |
3:088aa5839e0d | 471 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 472 | |
| Wolfgang Betz |
3:088aa5839e0d | 473 | |
| Wolfgang Betz |
3:088aa5839e0d | 474 | /** @defgroup LSM6DS0 Accel selftest en/dis - LSM6DS0_XG_CTRL_REG10 |
| Wolfgang Betz |
3:088aa5839e0d | 475 | * @{ |
| Wolfgang Betz |
3:088aa5839e0d | 476 | */ |
| Wolfgang Betz |
3:088aa5839e0d | 477 | #define LSM6DS0_XL_ST_DISABLE ((uint8_t)0x00) /*!< Accel selftest disable */ |
| Wolfgang Betz |
3:088aa5839e0d | 478 | #define LSM6DS0_XL_ST_ENABLE ((uint8_t)0x01) /*!< Accel selftest enable */ |
| Wolfgang Betz |
3:088aa5839e0d | 479 | |
| Wolfgang Betz |
3:088aa5839e0d | 480 | #define LSM6DS0_XL_ST_MASK ((uint8_t)0x01) |
| Wolfgang Betz |
3:088aa5839e0d | 481 | |
| Wolfgang Betz |
3:088aa5839e0d | 482 | |
| Wolfgang Betz |
3:088aa5839e0d | 483 | #endif /* __LSM6DS0_PLATFORM_H */ |
| Wolfgang Betz |
3:088aa5839e0d | 484 | |
| Wolfgang Betz |
3:088aa5839e0d | 485 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
| Wolfgang Betz |
3:088aa5839e0d | 486 |
