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: HC_SR04_Ultrasonic_Library Servo mbed
Fork of FIP_REV1 by
lsm6ds0.h
00001 /** 00002 ****************************************************************************** 00003 * @file lsm6ds0.h 00004 * @author MEMS Application Team 00005 * @version V1.0.0 00006 * @date 30-July-2014 00007 * @brief This file contains definitions for the lsm6ds0.c 00008 * firmware driver. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> 00013 * 00014 * Redistribution and use in source and binary forms, with or without modification, 00015 * are permitted provided that the following conditions are met: 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright notice, 00019 * this list of conditions and the following disclaimer in the documentation 00020 * and/or other materials provided with the distribution. 00021 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00022 * may be used to endorse or promote products derived from this software 00023 * without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00026 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00028 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00029 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00031 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00033 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00034 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 ****************************************************************************** 00037 */ 00038 00039 /* Define to prevent recursive inclusion -------------------------------------*/ 00040 #ifndef __LSM6DS0_H 00041 #define __LSM6DS0_H 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 /* Includes ------------------------------------------------------------------*/ 00048 #include "imu_6axes.h" 00049 00050 /** @addtogroup BSP 00051 * @{ 00052 */ 00053 00054 /** @addtogroup LSM6DS0 00055 * @{ 00056 */ 00057 00058 /** @defgroup LSM6DS0_Exported_Constants 00059 * @{ 00060 */ 00061 00062 00063 00064 /******************************************************************************/ 00065 /*********** START ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/ 00066 /******************************************************************************/ 00067 00068 00069 /***************************************** COMMON REGISTERS ********************************************/ 00070 00071 /** 00072 * @brief Interrupt config register 00073 * \code 00074 * Read/write 00075 * Default value: 0x00 00076 * [7] INT_IG_G: Gyroscope interrupt enable on INT pin 00077 * [6] INT_IG_XL: Accelerometer interrupt generator on INT pin 00078 * [5] INT_FSS5: FSS5 interrupt enable on INT pin 00079 * [4] INT_OVR: Overrun interrupt on INT pin 00080 * [3] INT_FTH: Gyroscope interrupt enable on INT pin 00081 * [2] INT_BOOT: Accelerometer interrupt generator on INT pin 00082 * [1] INT_DRDY_G: FSS5 interrupt enable on INT pin 00083 * [0] INT_DRDY_XL: Overrun interrupt on INT pin 00084 * \endcode 00085 */ 00086 #define LSM6DS0_XG_INT_CTRL 0x0C 00087 00088 00089 /** 00090 * @brief Device identifier register. 00091 * \code 00092 * Read 00093 * Default value: 00094 * [7:0] This read-only register contains the device identifier 00095 * \endcode 00096 */ 00097 #define LSM6DS0_XG_WHO_AM_I_ADDR 0x0F 00098 00099 00100 /** 00101 * @brief Control Register 4 00102 * \code 00103 * Read/write 00104 * Default value: 0x38 00105 * [5] Zen_G: Gyroscope�s Z-axis output enable 00106 * [4] Yen_G: Gyroscope�s Y-axis output enable 00107 * [3] Xen_G: Gyroscope�s X-axis output enable 00108 * \endcode 00109 */ 00110 #define LSM6DS0_XG_CTRL_REG4 0x1E 00111 00112 00113 /** 00114 * @brief Control Register 10 00115 * \code 00116 * Read/write 00117 * Default value: 0x00 00118 * [2] ST_G: Gyro selftest disable (0) / enable (1) 00119 * [0] ST_XL: Accel selftest disable (0) / enable (1) 00120 * \endcode 00121 */ 00122 #define LSM6DS0_XG_CTRL_REG10 0x24 00123 00124 00125 /***************************************** GYROSCOPE REGISTERS ********************************************/ 00126 00127 /** 00128 * @brief Angular rate sensor Control Register 1 00129 * \code 00130 * Read/write 00131 * Default value: 0x00 00132 * [7:5] ODR_G2-0: Gyroscope output data rate selection 00133 * [4:3] FS_G1-0: Gyroscope full-scale selection 00134 * [2] This bit must be set to �0� for the correct operation of the device 00135 * [1:0] BW_G1-0: Gyroscope bandwidth selection 00136 * \endcode 00137 */ 00138 #define LSM6DS0_XG_CTRL_REG1_G 0x10 00139 00140 00141 /** 00142 * @brief Gyroscope data (LSB) 00143 * \code 00144 * Read 00145 * \endcode 00146 */ 00147 #define LSM6DS0_XG_OUT_X_L_G 0x18 00148 00149 00150 /** 00151 * @brief Gyroscope data (MSB) 00152 * \code 00153 * Read 00154 * \endcode 00155 */ 00156 #define LSM6DS0_XG_OUT_X_H_G 0x19 00157 00158 00159 /** 00160 * @brief Gyroscope data (LSB) 00161 * \code 00162 * Read 00163 * \endcode 00164 */ 00165 #define LSM6DS0_XG_OUT_Y_L_G 0x1A 00166 00167 00168 /** 00169 * @brief Gyroscope data (MSB) 00170 * \code 00171 * Read 00172 * \endcode 00173 */ 00174 #define LSM6DS0_XG_OUT_Y_H_G 0x1B 00175 00176 00177 /** 00178 * @brief Gyroscope data (LSB) 00179 * \code 00180 * Read 00181 * \endcode 00182 */ 00183 #define LSM6DS0_XG_OUT_Z_L_G 0x1C 00184 00185 00186 /** 00187 * @brief Gyroscope data (MSB) 00188 * \code 00189 * Read 00190 * \endcode 00191 */ 00192 #define LSM6DS0_XG_OUT_Z_H_G 0x1D 00193 00194 00195 00196 /*************************************** ACCELEROMETER REGISTERS *******************************************/ 00197 00198 /** 00199 * @brief Linear acceleration sensor Control Register 6 00200 * \code 00201 * Read/write 00202 * Default value: 0x00 00203 * [7:5] ODR_XL2-0: Accelerometer Output data rate and power mode selection 00204 * [4:3] FS1_XL-FS0_XL: Accelerometer full-scale selection 00205 * [2] BW_SCAL_ODR: Bandwidth selection 00206 * [1:0] BW_XL1-0: Anti-aliasing filter bandwidth selection 00207 * \endcode 00208 */ 00209 #define LSM6DS0_XG_CTRL_REG6_XL 0x20 00210 00211 00212 /** 00213 * @brief Linear acceleration sensor Control Register 5 00214 * \code 00215 * Read/write 00216 * Default value: 0x38 00217 * [7:6] DEC1-0: Decimation of acceleration data on OUT REG and FIFO 00218 * [5] Zen_XL: Accelerometer�s Z-axis output enable 00219 * [4] Yen_XL: Accelerometer�s Y-axis output enable 00220 * [3] Xen_XL: Accelerometer�s X-axis output enable 00221 * [2:0] These bits must be set to �0� for the correct operation of the device 00222 * \endcode 00223 */ 00224 #define LSM6DS0_XG_CTRL_REG5_XL 0x1F 00225 00226 00227 /** 00228 * @brief Accelerometer data (LSB) 00229 * \code 00230 * Read 00231 * \endcode 00232 */ 00233 #define LSM6DS0_XG_OUT_X_L_XL 0x28 00234 00235 00236 /** 00237 * @brief Accelerometer data (MSB) 00238 * \code 00239 * Read 00240 * \endcode 00241 */ 00242 #define LSM6DS0_XG_OUT_X_H_XL 0x29 00243 00244 00245 /** 00246 * @brief Accelerometer data (LSB) 00247 * \code 00248 * Read 00249 * \endcode 00250 */ 00251 #define LSM6DS0_XG_OUT_Y_L_XL 0x2A 00252 00253 00254 /** 00255 * @brief Accelerometer data (MSB) 00256 * \code 00257 * Read 00258 * \endcode 00259 */ 00260 #define LSM6DS0_XG_OUT_Y_H_XL 0x2B 00261 00262 00263 /** 00264 * @brief Accelerometer data (LSB) 00265 * \code 00266 * Read 00267 * \endcode 00268 */ 00269 #define LSM6DS0_XG_OUT_Z_L_XL 0x2C 00270 00271 00272 /** 00273 * @brief Accelerometer data (MSB) 00274 * \code 00275 * Read 00276 * \endcode 00277 */ 00278 #define LSM6DS0_XG_OUT_Z_H_XL 0x2D 00279 00280 /******************************************************************************/ 00281 /************* END ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/ 00282 /******************************************************************************/ 00283 00284 00285 00286 /** 00287 * @brief Device Address 00288 */ 00289 #define LSM6DS0_XG_MEMS_ADDRESS 0xD4 // SAD[0] = 0 00290 //#define LSM6DS0_XG_MEMS_ADDRESS 0xD6 // SAD[0] = 1 00291 00292 /** 00293 * @brief Device Identifier. Default value of the WHO_AM_I register. 00294 */ 00295 #define I_AM_LSM6DS0_XG ((uint8_t)0x68) 00296 00297 00298 00299 /************************************** GYROSCOPE REGISTERS VALUE *******************************************/ 00300 00301 00302 /** @defgroup LSM6DS0_XG Gyroscope Output Data Rate selection CTRL_REG1_G 00303 * @{ 00304 */ 00305 #define LSM6DS0_G_ODR_PD ((uint8_t)0x00) /*!< Output Data Rate: Power-down*/ 00306 #define LSM6DS0_G_ODR_14_9HZ ((uint8_t)0x20) /*!< Output Data Rate: 14.9 Hz, cutoff 5Hz */ 00307 #define LSM6DS0_G_ODR_59_5HZ ((uint8_t)0x40) /*!< Output Data Rate: 59.5 Hz, cutoff 19Hz */ 00308 #define LSM6DS0_G_ODR_119HZ ((uint8_t)0x60) /*!< Output Data Rate: 119 Hz, cutoff 38Hz*/ 00309 #define LSM6DS0_G_ODR_238HZ ((uint8_t)0x80) /*!< Output Data Rate: 238 Hz, cutoff 76Hz*/ 00310 #define LSM6DS0_G_ODR_476HZ ((uint8_t)0xA0) /*!< Output Data Rate: 476 Hz, cutoff 100Hz*/ 00311 #define LSM6DS0_G_ODR_952HZ ((uint8_t)0xC0) /*!< Output Data Rate: 952 Hz, cutoff 100Hz*/ 00312 00313 #define LSM6DS0_G_ODR_MASK ((uint8_t)0xE0) 00314 00315 00316 00317 /** @defgroup LSM6DS0_XG Gyroscope Bandwidth selection CTRL_REG1_G 00318 * @{ 00319 */ 00320 #define LSM6DS0_G_BW_00 ((uint8_t)0x00) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down 00321 - cutoff = n.a. when ODR = 14.9 00322 - cutoff = 16 when ODR = 59.5 00323 - cutoff = 14 when ODR = 119 00324 - cutoff = 14 when ODR = 238 00325 - cutoff = 21 when ODR = 476 00326 - cutoff = 33 when ODR = 952 */ 00327 #define LSM6DS0_G_BW_01 ((uint8_t)0x01) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down 00328 - cutoff = n.a. when ODR = 14.9 00329 - cutoff = 16 when ODR = 59.5 00330 - cutoff = 31 when ODR = 119 00331 - cutoff = 29 when ODR = 238 00332 - cutoff = 28 when ODR = 476 00333 - cutoff = 40 when ODR = 952 */ 00334 #define LSM6DS0_G_BW_10 ((uint8_t)0x02) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down 00335 - cutoff = n.a. when ODR = 14.9 00336 - cutoff = 16 when ODR = 59.5 00337 - cutoff = 31 when ODR = 119 00338 - cutoff = 63 when ODR = 238 00339 - cutoff = 57 when ODR = 476 00340 - cutoff = 58 when ODR = 952 */ 00341 #define LSM6DS0_G_BW_11 ((uint8_t)0x03) /*!< Bandwidth selection: - cutoff = n.a. when ODR = Power-down 00342 - cutoff = n.a. when ODR = 14.9 00343 - cutoff = 16 when ODR = 59.5 00344 - cutoff = 31 when ODR = 119 00345 - cutoff = 78 when ODR = 238 00346 - cutoff = 100 when ODR = 476 00347 - cutoff = 100 when ODR = 952 */ 00348 00349 #define LSM6DS0_G_BW_MASK ((uint8_t)0x03) 00350 00351 00352 /** @defgroup LSM6DS0_XG Gyroscope Full scale selection CTRL_REG1_G 00353 * @{ 00354 */ 00355 #define LSM6DS0_G_FS_245 ((uint8_t)0x00) /*!< Full scale: 245 dps*/ 00356 #define LSM6DS0_G_FS_500 ((uint8_t)0x08) /*!< Full scale: 500 dps */ 00357 #define LSM6DS0_G_FS_2000 ((uint8_t)0x18) /*!< Full scale: 2000 dps */ 00358 00359 #define LSM6DS0_G_FS_MASK ((uint8_t)0x18) 00360 00361 00362 /** @defgroup LSM6DS0_XG Gyroscope�s Z-axis output enable selection CTRL_REG4 00363 * @{ 00364 */ 00365 #define LSM6DS0_G_ZEN_DISABLE ((uint8_t)0x00) /*!< Gyroscope�s Z-axis output enable: disable */ 00366 #define LSM6DS0_G_ZEN_ENABLE ((uint8_t)0x20) /*!< Gyroscope�s Z-axis output enable: enable */ 00367 00368 #define LSM6DS0_G_ZEN_MASK ((uint8_t)0x20) 00369 00370 00371 /** @defgroup LSM6DS0_XG Gyroscope�s Y-axis output enable selection CTRL_REG4 00372 * @{ 00373 */ 00374 #define LSM6DS0_G_YEN_DISABLE ((uint8_t)0x00) /*!< Gyroscope�s Y-axis output enable: disable */ 00375 #define LSM6DS0_G_YEN_ENABLE ((uint8_t)0x10) /*!< Gyroscope�s Y-axis output enable: enable */ 00376 00377 #define LSM6DS0_G_YEN_MASK ((uint8_t)0x10) 00378 00379 00380 /** @defgroup LSM6DS0_XG Gyroscope�s X-axis output enable selection CTRL_REG4 00381 * @{ 00382 */ 00383 #define LSM6DS0_G_XEN_DISABLE ((uint8_t)0x00) /*!< Gyroscope�s X-axis output enable: disable */ 00384 #define LSM6DS0_G_XEN_ENABLE ((uint8_t)0x08) /*!< Gyroscope�s X-axis output enable: enable */ 00385 00386 #define LSM6DS0_G_XEN_MASK ((uint8_t)0x08) 00387 00388 00389 /** @defgroup LSM6DS0 Gyro selftest en/dis - LSM6DS0_XG_CTRL_REG10 00390 * @{ 00391 */ 00392 #define LSM6DS0_G_ST_DISABLE ((uint8_t)0x00) /*!< Gyro selftest disable */ 00393 #define LSM6DS0_G_ST_ENABLE ((uint8_t)0x04) /*!< Gyro selftest enable */ 00394 00395 #define LSM6DS0_G_ST_MASK ((uint8_t)0x04) 00396 00397 /** 00398 * @} 00399 */ 00400 00401 00402 /************************************ ACCELEROMETER REGISTERS VALUE *****************************************/ 00403 00404 /** @defgroup LSM6DS0_XG Accelerometer Output Data Rate selection CTRL_REG6_XL 00405 * @{ 00406 */ 00407 #define LSM6DS0_XL_ODR_PD ((uint8_t)0x00) /*!< Output Data Rate: Power-down*/ 00408 #define LSM6DS0_XL_ODR_10HZ ((uint8_t)0x20) /*!< Output Data Rate: 10 Hz*/ 00409 #define LSM6DS0_XL_ODR_50HZ ((uint8_t)0x40) /*!< Output Data Rate: 50 Hz */ 00410 #define LSM6DS0_XL_ODR_119HZ ((uint8_t)0x60) /*!< Output Data Rate: 119 Hz */ 00411 #define LSM6DS0_XL_ODR_238HZ ((uint8_t)0x80) /*!< Output Data Rate: 238 Hz */ 00412 #define LSM6DS0_XL_ODR_476HZ ((uint8_t)0xA0) /*!< Output Data Rate: 476 Hz */ 00413 #define LSM6DS0_XL_ODR_952HZ ((uint8_t)0xC0) /*!< Output Data Rate: 952 Hz */ 00414 00415 #define LSM6DS0_XL_ODR_MASK ((uint8_t)0xE0) 00416 00417 00418 /** @defgroup LSM6DS0_XG Accelerometer Full scale selection CTRL_REG6_XL 00419 * @{ 00420 */ 00421 #define LSM6DS0_XL_FS_2G ((uint8_t)0x00) /*!< Full scale: +- 2g */ 00422 #define LSM6DS0_XL_FS_4G ((uint8_t)0x10) /*!< Full scale: +- 4g */ 00423 #define LSM6DS0_XL_FS_8G ((uint8_t)0x18) /*!< Full scale: +- 8g */ 00424 00425 #define LSM6DS0_XL_FS_MASK ((uint8_t)0x18) 00426 00427 00428 /** @defgroup LSM6DS0_XG Accelerometer Bandwidth selection CTRL_REG6_XL 00429 * @{ 00430 */ 00431 #define LSM6DS0_XL_BW_SCAL_ODR ((uint8_t)0x00) /*!< Bandwidth selection: determined by ODR: 00432 - BW = 408Hz when ODR = 952Hz, 50Hz, 10Hz 00433 - BW = 211Hz when ODR = 476Hz 00434 - BW = 105Hz when ODR = 238Hz 00435 - BW = 50Hz when ODR = 119Hz */ 00436 #define LSM6DS0_XL_BW_SCAL_BW ((uint8_t)0x04) /*!< Bandwidth selection: selected according to Anti aliasing filter bandwidth */ 00437 00438 #define LSM6DS0_XL_BW_SCAL_MASK ((uint8_t)0x04) 00439 00440 00441 /** @defgroup LSM6DS0_XG Accelerometer Anti aliasing filter bandwidth selection CTRL_REG6_XL 00442 * @{ 00443 */ 00444 #define LSM6DS0_XL_BW_408HZ ((uint8_t)0x00) /*!< Anti-aliasing filter bandwidht: 408 Hz */ 00445 #define LSM6DS0_XL_BW_211HZ ((uint8_t)0x01) /*!< Anti-aliasing filter bandwidht: 211 Hz */ 00446 #define LSM6DS0_XL_BW_105HZ ((uint8_t)0x02) /*!< Anti-aliasing filter bandwidht: 105 Hz */ 00447 #define LSM6DS0_XL_BW_50HZ ((uint8_t)0x03) /*!< Anti-aliasing filter bandwidht: 50 Hz */ 00448 00449 #define LSM6DS0_XL_BW_MASK ((uint8_t)0x03) 00450 00451 00452 /** @defgroup LSM6DS0_XG Accelerometer Decimation of acceleration data selection CTRL_REG5_XL 00453 * @{ 00454 */ 00455 #define LSM6DS0_XL_DEC_NO ((uint8_t)0x00) /*!< Decimation of acceleration data: no decimation */ 00456 #define LSM6DS0_XL_DEC_EVERY_2S ((uint8_t)0x40) /*!< Decimation of acceleration data: update every 2 samples */ 00457 #define LSM6DS0_XL_DEC_EVERY_4S ((uint8_t)0x80) /*!< Decimation of acceleration data: update every 4 samples */ 00458 #define LSM6DS0_XL_DEC_EVERY_8S ((uint8_t)0xC0) /*!< Decimation of acceleration data: update every 8 samples */ 00459 00460 #define LSM6DS0_XL_DEC_MASK ((uint8_t)0xC0) 00461 00462 00463 /** @defgroup LSM6DS0_XG Accelerometer�s Z-axis output enable selection CTRL_REG5_XL 00464 * @{ 00465 */ 00466 #define LSM6DS0_XL_ZEN_DISABLE ((uint8_t)0x00) /*!< Accelerometer�s Z-axis output enable: disable */ 00467 #define LSM6DS0_XL_ZEN_ENABLE ((uint8_t)0x20) /*!< Accelerometer�s Z-axis output enable: enable */ 00468 00469 #define LSM6DS0_XL_ZEN_MASK ((uint8_t)0x20) 00470 00471 00472 /** @defgroup LSM6DS0_XG Accelerometer�s Y-axis output enable selection CTRL_REG5_XL 00473 * @{ 00474 */ 00475 #define LSM6DS0_XL_YEN_DISABLE ((uint8_t)0x00) /*!< Accelerometer�s Y-axis output enable: disable */ 00476 #define LSM6DS0_XL_YEN_ENABLE ((uint8_t)0x10) /*!< Accelerometer�s Y-axis output enable: enable */ 00477 00478 #define LSM6DS0_XL_YEN_MASK ((uint8_t)0x10) 00479 00480 00481 /** @defgroup LSM6DS0_XG Accelerometer�s X-axis output enable selection CTRL_REG5_XL 00482 * @{ 00483 */ 00484 #define LSM6DS0_XL_XEN_DISABLE ((uint8_t)0x00) /*!< Accelerometer�s X-axis output enable: disable */ 00485 #define LSM6DS0_XL_XEN_ENABLE ((uint8_t)0x08) /*!< Accelerometer�s X-axis output enable: enable */ 00486 00487 #define LSM6DS0_XL_XEN_MASK ((uint8_t)0x08) 00488 00489 /** 00490 * @} 00491 */ 00492 00493 00494 /** @defgroup LSM6DS0 Accel selftest en/dis - LSM6DS0_XG_CTRL_REG10 00495 * @{ 00496 */ 00497 #define LSM6DS0_XL_ST_DISABLE ((uint8_t)0x00) /*!< Accel selftest disable */ 00498 #define LSM6DS0_XL_ST_ENABLE ((uint8_t)0x01) /*!< Accel selftest enable */ 00499 00500 #define LSM6DS0_XL_ST_MASK ((uint8_t)0x01) 00501 00502 /** 00503 * @} 00504 */ 00505 00506 00507 /** @defgroup LSM6DS0_Imported_Functions 00508 * @{ 00509 */ 00510 00511 /* Six axes sensor driver structure */ 00512 extern IMU_6AXES_DrvTypeDef LSM6DS0Drv; 00513 00514 /* Six axes sensor IO functions */ 00515 void IMU_6AXES_IO_Init(void); 00516 void IMU_6AXES_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t WriteAddr, 00517 uint16_t NumByteToWrite); 00518 void IMU_6AXES_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, 00519 uint8_t RegisterAddr, uint16_t NumByteToRead); 00520 00521 /** 00522 * @} 00523 */ 00524 00525 00526 00527 /** @defgroup LSM6DS0_Exported_Functions 00528 * @{ 00529 */ 00530 00531 /* Sensor Configuration Functions */ 00532 void LSM6DS0_Init(IMU_6AXES_InitTypeDef *LSM6DS0_Init); 00533 uint8_t LSM6DS0_Read_XG_ID(void); 00534 void LSM6DS0_X_GetAxes(int32_t *pData); 00535 void LSM6DS0_G_GetAxes(int32_t *pData); 00536 00537 /** 00538 * @} 00539 */ 00540 00541 /** 00542 * @} 00543 */ 00544 00545 /** 00546 * @} 00547 */ 00548 00549 #ifdef __cplusplus 00550 } 00551 #endif 00552 00553 #endif /* __LSM6DS0_H */ 00554 00555 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00556
Generated on Tue Jul 12 2022 21:42:00 by
