HAHA

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Dependents:   b_NYP_humanoid a_NYP_humanoid_copy

Fork of LSM6DSL by ST

Committer:
mr_wang
Date:
Fri May 25 08:59:17 2018 +0000
Revision:
4:6bc17982bf8a
Parent:
0:704c89673b57
NYP_ADAD

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nikapov 0:704c89673b57 1 /**
nikapov 0:704c89673b57 2 ******************************************************************************
nikapov 0:704c89673b57 3 * @file LSM6DSL_acc_gyro_driver.h
nikapov 0:704c89673b57 4 * @author MEMS Application Team
nikapov 0:704c89673b57 5 * @version V1.5
nikapov 0:704c89673b57 6 * @date 17-May-2016
nikapov 0:704c89673b57 7 * @brief LSM6DSL header driver file
nikapov 0:704c89673b57 8 ******************************************************************************
nikapov 0:704c89673b57 9 * @attention
nikapov 0:704c89673b57 10 *
nikapov 0:704c89673b57 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
nikapov 0:704c89673b57 12 *
nikapov 0:704c89673b57 13 * Redistribution and use in source and binary forms, with or without modification,
nikapov 0:704c89673b57 14 * are permitted provided that the following conditions are met:
nikapov 0:704c89673b57 15 * 1. Redistributions of source code must retain the above copyright notice,
nikapov 0:704c89673b57 16 * this list of conditions and the following disclaimer.
nikapov 0:704c89673b57 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
nikapov 0:704c89673b57 18 * this list of conditions and the following disclaimer in the documentation
nikapov 0:704c89673b57 19 * and/or other materials provided with the distribution.
nikapov 0:704c89673b57 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
nikapov 0:704c89673b57 21 * may be used to endorse or promote products derived from this software
nikapov 0:704c89673b57 22 * without specific prior written permission.
nikapov 0:704c89673b57 23 *
nikapov 0:704c89673b57 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
nikapov 0:704c89673b57 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
nikapov 0:704c89673b57 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
nikapov 0:704c89673b57 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
nikapov 0:704c89673b57 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
nikapov 0:704c89673b57 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
nikapov 0:704c89673b57 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
nikapov 0:704c89673b57 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
nikapov 0:704c89673b57 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
nikapov 0:704c89673b57 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nikapov 0:704c89673b57 34 *
nikapov 0:704c89673b57 35 ******************************************************************************
nikapov 0:704c89673b57 36 */
nikapov 0:704c89673b57 37
nikapov 0:704c89673b57 38 /* Define to prevent recursive inclusion -------------------------------------*/
nikapov 0:704c89673b57 39 #ifndef __LSM6DSL_ACC_GYRO_DRIVER__H
nikapov 0:704c89673b57 40 #define __LSM6DSL_ACC_GYRO_DRIVER__H
nikapov 0:704c89673b57 41
nikapov 0:704c89673b57 42 /* Includes ------------------------------------------------------------------*/
nikapov 0:704c89673b57 43 #include <stdint.h>
nikapov 0:704c89673b57 44 /* Exported types ------------------------------------------------------------*/
nikapov 0:704c89673b57 45
nikapov 0:704c89673b57 46 #ifdef __cplusplus
nikapov 0:704c89673b57 47 extern "C" {
nikapov 0:704c89673b57 48 #endif
nikapov 0:704c89673b57 49
nikapov 0:704c89673b57 50 //these could change accordingly with the architecture
nikapov 0:704c89673b57 51
nikapov 0:704c89673b57 52 #ifndef __ARCHDEP__TYPES
nikapov 0:704c89673b57 53 #define __ARCHDEP__TYPES
nikapov 0:704c89673b57 54
nikapov 0:704c89673b57 55 typedef unsigned char u8_t;
nikapov 0:704c89673b57 56 typedef unsigned short int u16_t;
nikapov 0:704c89673b57 57 typedef unsigned int u32_t;
nikapov 0:704c89673b57 58 typedef int i32_t;
nikapov 0:704c89673b57 59 typedef short int i16_t;
nikapov 0:704c89673b57 60 typedef signed char i8_t;
nikapov 0:704c89673b57 61
nikapov 0:704c89673b57 62 #endif /*__ARCHDEP__TYPES*/
nikapov 0:704c89673b57 63
nikapov 0:704c89673b57 64 /* Exported common structure --------------------------------------------------------*/
nikapov 0:704c89673b57 65
nikapov 0:704c89673b57 66 #ifndef __SHARED__TYPES
nikapov 0:704c89673b57 67 #define __SHARED__TYPES
nikapov 0:704c89673b57 68
nikapov 0:704c89673b57 69 typedef union{
nikapov 0:704c89673b57 70 i16_t i16bit[3];
nikapov 0:704c89673b57 71 u8_t u8bit[6];
nikapov 0:704c89673b57 72 } Type3Axis16bit_U;
nikapov 0:704c89673b57 73
nikapov 0:704c89673b57 74 typedef union{
nikapov 0:704c89673b57 75 i16_t i16bit;
nikapov 0:704c89673b57 76 u8_t u8bit[2];
nikapov 0:704c89673b57 77 } Type1Axis16bit_U;
nikapov 0:704c89673b57 78
nikapov 0:704c89673b57 79 typedef union{
nikapov 0:704c89673b57 80 i32_t i32bit;
nikapov 0:704c89673b57 81 u8_t u8bit[4];
nikapov 0:704c89673b57 82 } Type1Axis32bit_U;
nikapov 0:704c89673b57 83
nikapov 0:704c89673b57 84 typedef enum {
nikapov 0:704c89673b57 85 MEMS_SUCCESS = 0x01,
nikapov 0:704c89673b57 86 MEMS_ERROR = 0x00
nikapov 0:704c89673b57 87 } mems_status_t;
nikapov 0:704c89673b57 88
nikapov 0:704c89673b57 89 #endif /*__SHARED__TYPES*/
nikapov 0:704c89673b57 90
nikapov 0:704c89673b57 91 /* Exported macro ------------------------------------------------------------*/
nikapov 0:704c89673b57 92
nikapov 0:704c89673b57 93 /* Exported constants --------------------------------------------------------*/
nikapov 0:704c89673b57 94
nikapov 0:704c89673b57 95 /************** I2C Address *****************/
nikapov 0:704c89673b57 96
nikapov 0:704c89673b57 97 #define LSM6DSL_ACC_GYRO_I2C_ADDRESS_LOW 0xD4 // SAD[0] = 0
nikapov 0:704c89673b57 98 #define LSM6DSL_ACC_GYRO_I2C_ADDRESS_HIGH 0xD6 // SAD[0] = 1
nikapov 0:704c89673b57 99
nikapov 0:704c89673b57 100 /************** Who am I *******************/
nikapov 0:704c89673b57 101
nikapov 0:704c89673b57 102 #define LSM6DSL_ACC_GYRO_WHO_AM_I 0x6A
nikapov 0:704c89673b57 103
nikapov 0:704c89673b57 104 /************** Device Register *******************/
nikapov 0:704c89673b57 105
nikapov 0:704c89673b57 106 #define LSM6DSL_ACC_GYRO_FUNC_CFG_ACCESS 0X01
nikapov 0:704c89673b57 107
nikapov 0:704c89673b57 108 #define LSM6DSL_ACC_GYRO_SENSOR_SYNC_TIME 0X04
nikapov 0:704c89673b57 109 #define LSM6DSL_ACC_GYRO_SENSOR_RES_RATIO 0X05
nikapov 0:704c89673b57 110
nikapov 0:704c89673b57 111 #define LSM6DSL_ACC_GYRO_FIFO_CTRL1 0X06
nikapov 0:704c89673b57 112 #define LSM6DSL_ACC_GYRO_FIFO_CTRL2 0X07
nikapov 0:704c89673b57 113 #define LSM6DSL_ACC_GYRO_FIFO_CTRL3 0X08
nikapov 0:704c89673b57 114 #define LSM6DSL_ACC_GYRO_FIFO_CTRL4 0X09
nikapov 0:704c89673b57 115 #define LSM6DSL_ACC_GYRO_FIFO_CTRL5 0X0A
nikapov 0:704c89673b57 116
nikapov 0:704c89673b57 117 #define LSM6DSL_ACC_GYRO_DRDY_PULSE_CFG_G 0X0B
nikapov 0:704c89673b57 118 #define LSM6DSL_ACC_GYRO_INT1_CTRL 0X0D
nikapov 0:704c89673b57 119 #define LSM6DSL_ACC_GYRO_INT2_CTRL 0X0E
nikapov 0:704c89673b57 120 #define LSM6DSL_ACC_GYRO_WHO_AM_I_REG 0X0F
nikapov 0:704c89673b57 121 #define LSM6DSL_ACC_GYRO_CTRL1_XL 0X10
nikapov 0:704c89673b57 122 #define LSM6DSL_ACC_GYRO_CTRL2_G 0X11
nikapov 0:704c89673b57 123 #define LSM6DSL_ACC_GYRO_CTRL3_C 0X12
nikapov 0:704c89673b57 124 #define LSM6DSL_ACC_GYRO_CTRL4_C 0X13
nikapov 0:704c89673b57 125 #define LSM6DSL_ACC_GYRO_CTRL5_C 0X14
nikapov 0:704c89673b57 126 #define LSM6DSL_ACC_GYRO_CTRL6_G 0X15
nikapov 0:704c89673b57 127 #define LSM6DSL_ACC_GYRO_CTRL7_G 0X16
nikapov 0:704c89673b57 128 #define LSM6DSL_ACC_GYRO_CTRL8_XL 0X17
nikapov 0:704c89673b57 129 #define LSM6DSL_ACC_GYRO_CTRL9_XL 0X18
nikapov 0:704c89673b57 130 #define LSM6DSL_ACC_GYRO_CTRL10_C 0X19
nikapov 0:704c89673b57 131
nikapov 0:704c89673b57 132 #define LSM6DSL_ACC_GYRO_MASTER_CONFIG 0X1A
nikapov 0:704c89673b57 133 #define LSM6DSL_ACC_GYRO_WAKE_UP_SRC 0X1B
nikapov 0:704c89673b57 134 #define LSM6DSL_ACC_GYRO_TAP_SRC 0X1C
nikapov 0:704c89673b57 135 #define LSM6DSL_ACC_GYRO_D6D_SRC 0X1D
nikapov 0:704c89673b57 136 #define LSM6DSL_ACC_GYRO_STATUS_REG 0X1E
nikapov 0:704c89673b57 137
nikapov 0:704c89673b57 138 #define LSM6DSL_ACC_GYRO_OUT_TEMP_L 0X20
nikapov 0:704c89673b57 139 #define LSM6DSL_ACC_GYRO_OUT_TEMP_H 0X21
nikapov 0:704c89673b57 140 #define LSM6DSL_ACC_GYRO_OUTX_L_G 0X22
nikapov 0:704c89673b57 141 #define LSM6DSL_ACC_GYRO_OUTX_H_G 0X23
nikapov 0:704c89673b57 142 #define LSM6DSL_ACC_GYRO_OUTY_L_G 0X24
nikapov 0:704c89673b57 143 #define LSM6DSL_ACC_GYRO_OUTY_H_G 0X25
nikapov 0:704c89673b57 144 #define LSM6DSL_ACC_GYRO_OUTZ_L_G 0X26
nikapov 0:704c89673b57 145 #define LSM6DSL_ACC_GYRO_OUTZ_H_G 0X27
nikapov 0:704c89673b57 146 #define LSM6DSL_ACC_GYRO_OUTX_L_XL 0X28
nikapov 0:704c89673b57 147 #define LSM6DSL_ACC_GYRO_OUTX_H_XL 0X29
nikapov 0:704c89673b57 148 #define LSM6DSL_ACC_GYRO_OUTY_L_XL 0X2A
nikapov 0:704c89673b57 149 #define LSM6DSL_ACC_GYRO_OUTY_H_XL 0X2B
nikapov 0:704c89673b57 150 #define LSM6DSL_ACC_GYRO_OUTZ_L_XL 0X2C
nikapov 0:704c89673b57 151 #define LSM6DSL_ACC_GYRO_OUTZ_H_XL 0X2D
nikapov 0:704c89673b57 152 #define LSM6DSL_ACC_GYRO_SENSORHUB1_REG 0X2E
nikapov 0:704c89673b57 153 #define LSM6DSL_ACC_GYRO_SENSORHUB2_REG 0X2F
nikapov 0:704c89673b57 154 #define LSM6DSL_ACC_GYRO_SENSORHUB3_REG 0X30
nikapov 0:704c89673b57 155 #define LSM6DSL_ACC_GYRO_SENSORHUB4_REG 0X31
nikapov 0:704c89673b57 156 #define LSM6DSL_ACC_GYRO_SENSORHUB5_REG 0X32
nikapov 0:704c89673b57 157 #define LSM6DSL_ACC_GYRO_SENSORHUB6_REG 0X33
nikapov 0:704c89673b57 158 #define LSM6DSL_ACC_GYRO_SENSORHUB7_REG 0X34
nikapov 0:704c89673b57 159 #define LSM6DSL_ACC_GYRO_SENSORHUB8_REG 0X35
nikapov 0:704c89673b57 160 #define LSM6DSL_ACC_GYRO_SENSORHUB9_REG 0X36
nikapov 0:704c89673b57 161 #define LSM6DSL_ACC_GYRO_SENSORHUB10_REG 0X37
nikapov 0:704c89673b57 162 #define LSM6DSL_ACC_GYRO_SENSORHUB11_REG 0X38
nikapov 0:704c89673b57 163 #define LSM6DSL_ACC_GYRO_SENSORHUB12_REG 0X39
nikapov 0:704c89673b57 164 #define LSM6DSL_ACC_GYRO_FIFO_STATUS1 0X3A
nikapov 0:704c89673b57 165 #define LSM6DSL_ACC_GYRO_FIFO_STATUS2 0X3B
nikapov 0:704c89673b57 166 #define LSM6DSL_ACC_GYRO_FIFO_STATUS3 0X3C
nikapov 0:704c89673b57 167 #define LSM6DSL_ACC_GYRO_FIFO_STATUS4 0X3D
nikapov 0:704c89673b57 168 #define LSM6DSL_ACC_GYRO_FIFO_DATA_OUT_L 0X3E
nikapov 0:704c89673b57 169 #define LSM6DSL_ACC_GYRO_FIFO_DATA_OUT_H 0X3F
nikapov 0:704c89673b57 170 #define LSM6DSL_ACC_GYRO_TIMESTAMP0_REG 0X40
nikapov 0:704c89673b57 171 #define LSM6DSL_ACC_GYRO_TIMESTAMP1_REG 0X41
nikapov 0:704c89673b57 172 #define LSM6DSL_ACC_GYRO_TIMESTAMP2_REG 0X42
nikapov 0:704c89673b57 173
nikapov 0:704c89673b57 174 #define LSM6DSL_ACC_GYRO_TIMESTAMP_L 0X49
nikapov 0:704c89673b57 175 #define LSM6DSL_ACC_GYRO_TIMESTAMP_H 0X4A
nikapov 0:704c89673b57 176
nikapov 0:704c89673b57 177 #define LSM6DSL_ACC_GYRO_STEP_COUNTER_L 0X4B
nikapov 0:704c89673b57 178 #define LSM6DSL_ACC_GYRO_STEP_COUNTER_H 0X4C
nikapov 0:704c89673b57 179
nikapov 0:704c89673b57 180 #define LSM6DSL_ACC_GYRO_SENSORHUB13_REG 0X4D
nikapov 0:704c89673b57 181 #define LSM6DSL_ACC_GYRO_SENSORHUB14_REG 0X4E
nikapov 0:704c89673b57 182 #define LSM6DSL_ACC_GYRO_SENSORHUB15_REG 0X4F
nikapov 0:704c89673b57 183 #define LSM6DSL_ACC_GYRO_SENSORHUB16_REG 0X50
nikapov 0:704c89673b57 184 #define LSM6DSL_ACC_GYRO_SENSORHUB17_REG 0X51
nikapov 0:704c89673b57 185 #define LSM6DSL_ACC_GYRO_SENSORHUB18_REG 0X52
nikapov 0:704c89673b57 186
nikapov 0:704c89673b57 187 #define LSM6DSL_ACC_GYRO_FUNC_SRC 0X53
nikapov 0:704c89673b57 188 #define LSM6DSL_ACC_GYRO_TAP_CFG1 0X58
nikapov 0:704c89673b57 189 #define LSM6DSL_ACC_GYRO_TAP_THS_6D 0X59
nikapov 0:704c89673b57 190 #define LSM6DSL_ACC_GYRO_INT_DUR2 0X5A
nikapov 0:704c89673b57 191 #define LSM6DSL_ACC_GYRO_WAKE_UP_THS 0X5B
nikapov 0:704c89673b57 192 #define LSM6DSL_ACC_GYRO_WAKE_UP_DUR 0X5C
nikapov 0:704c89673b57 193 #define LSM6DSL_ACC_GYRO_FREE_FALL 0X5D
nikapov 0:704c89673b57 194 #define LSM6DSL_ACC_GYRO_MD1_CFG 0X5E
nikapov 0:704c89673b57 195 #define LSM6DSL_ACC_GYRO_MD2_CFG 0X5F
nikapov 0:704c89673b57 196
nikapov 0:704c89673b57 197 #define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_X_L 0X66
nikapov 0:704c89673b57 198 #define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_X_H 0X67
nikapov 0:704c89673b57 199 #define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Y_L 0X68
nikapov 0:704c89673b57 200 #define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Y_H 0X69
nikapov 0:704c89673b57 201 #define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Z_L 0X6A
nikapov 0:704c89673b57 202 #define LSM6DSL_ACC_GYRO_OUT_MAG_RAW_Z_H 0X6B
nikapov 0:704c89673b57 203
nikapov 0:704c89673b57 204 #define LSM6DSL_ACC_GYRO_X_OFS_USR 0X73
nikapov 0:704c89673b57 205 #define LSM6DSL_ACC_GYRO_Y_OFS_USR 0X74
nikapov 0:704c89673b57 206 #define LSM6DSL_ACC_GYRO_Z_OFS_USR 0X75
nikapov 0:704c89673b57 207
nikapov 0:704c89673b57 208 /************** Embedded functions register mapping *******************/
nikapov 0:704c89673b57 209 #define LSM6DSL_ACC_GYRO_SLV0_ADD 0x02
nikapov 0:704c89673b57 210 #define LSM6DSL_ACC_GYRO_SLV0_SUBADD 0x03
nikapov 0:704c89673b57 211 #define LSM6DSL_ACC_GYRO_SLAVE0_CONFIG 0x04
nikapov 0:704c89673b57 212 #define LSM6DSL_ACC_GYRO_SLV1_ADD 0x05
nikapov 0:704c89673b57 213 #define LSM6DSL_ACC_GYRO_SLV1_SUBADD 0x06
nikapov 0:704c89673b57 214 #define LSM6DSL_ACC_GYRO_SLAVE1_CONFIG 0x07
nikapov 0:704c89673b57 215 #define LSM6DSL_ACC_GYRO_SLV2_ADD 0x08
nikapov 0:704c89673b57 216 #define LSM6DSL_ACC_GYRO_SLV2_SUBADD 0x09
nikapov 0:704c89673b57 217 #define LSM6DSL_ACC_GYRO_SLAVE2_CONFIG 0x0A
nikapov 0:704c89673b57 218 #define LSM6DSL_ACC_GYRO_SLV3_ADD 0x0B
nikapov 0:704c89673b57 219 #define LSM6DSL_ACC_GYRO_SLV3_SUBADD 0x0C
nikapov 0:704c89673b57 220 #define LSM6DSL_ACC_GYRO_SLAVE3_CONFIG 0x0D
nikapov 0:704c89673b57 221 #define LSM6DSL_ACC_GYRO_DATAWRITE_SRC_MODE_SUB_SLV0 0x0E
nikapov 0:704c89673b57 222 #define LSM6DSL_ACC_GYRO_CONFIG_PEDO_THS_MIN 0x0F
nikapov 0:704c89673b57 223
nikapov 0:704c89673b57 224 #define LSM6DSL_ACC_GYRO_SM_STEP_THS 0x13
nikapov 0:704c89673b57 225 #define LSM6DSL_ACC_GYRO_PEDO_DEB_REG 0x14
nikapov 0:704c89673b57 226 #define LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA 0x15
nikapov 0:704c89673b57 227
nikapov 0:704c89673b57 228 #define LSM6DSL_ACC_GYRO_MAG_SI_XX 0x24
nikapov 0:704c89673b57 229 #define LSM6DSL_ACC_GYRO_MAG_SI_XY 0x25
nikapov 0:704c89673b57 230 #define LSM6DSL_ACC_GYRO_MAG_SI_XZ 0x26
nikapov 0:704c89673b57 231 #define LSM6DSL_ACC_GYRO_MAG_SI_YX 0x27
nikapov 0:704c89673b57 232 #define LSM6DSL_ACC_GYRO_MAG_SI_YY 0x28
nikapov 0:704c89673b57 233 #define LSM6DSL_ACC_GYRO_MAG_SI_YZ 0x29
nikapov 0:704c89673b57 234 #define LSM6DSL_ACC_GYRO_MAG_SI_ZX 0x2A
nikapov 0:704c89673b57 235 #define LSM6DSL_ACC_GYRO_MAG_SI_ZY 0x2B
nikapov 0:704c89673b57 236 #define LSM6DSL_ACC_GYRO_MAG_SI_ZZ 0x2C
nikapov 0:704c89673b57 237 #define LSM6DSL_ACC_GYRO_MAG_OFFX_L 0x2D
nikapov 0:704c89673b57 238 #define LSM6DSL_ACC_GYRO_MAG_OFFX_H 0x2E
nikapov 0:704c89673b57 239 #define LSM6DSL_ACC_GYRO_MAG_OFFY_L 0x2F
nikapov 0:704c89673b57 240 #define LSM6DSL_ACC_GYRO_MAG_OFFY_H 0x30
nikapov 0:704c89673b57 241 #define LSM6DSL_ACC_GYRO_MAG_OFFZ_L 0x31
nikapov 0:704c89673b57 242 #define LSM6DSL_ACC_GYRO_MAG_OFFZ_H 0x32
nikapov 0:704c89673b57 243
nikapov 0:704c89673b57 244 /************** Generic Function *******************/
nikapov 0:704c89673b57 245
nikapov 0:704c89673b57 246 /*******************************************************************************
nikapov 0:704c89673b57 247 * Register : Generic - All
nikapov 0:704c89673b57 248 * Address : Generic - All
nikapov 0:704c89673b57 249 * Bit Group Name: None
nikapov 0:704c89673b57 250 * Permission : W
nikapov 0:704c89673b57 251 *******************************************************************************/
nikapov 0:704c89673b57 252 mems_status_t LSM6DSL_ACC_GYRO_write_reg( void *handle, u8_t Reg, u8_t *Bufp, u16_t len );
nikapov 0:704c89673b57 253
nikapov 0:704c89673b57 254 /*******************************************************************************
nikapov 0:704c89673b57 255 * Register : Generic - All
nikapov 0:704c89673b57 256 * Address : Generic - All
nikapov 0:704c89673b57 257 * Bit Group Name: None
nikapov 0:704c89673b57 258 * Permission : R
nikapov 0:704c89673b57 259 *******************************************************************************/
nikapov 0:704c89673b57 260 mems_status_t LSM6DSL_ACC_GYRO_read_reg( void *handle, u8_t Reg, u8_t *Bufp, u16_t len );
nikapov 0:704c89673b57 261
nikapov 0:704c89673b57 262 /**************** Base Function *******************/
nikapov 0:704c89673b57 263
nikapov 0:704c89673b57 264 /*******************************************************************************
nikapov 0:704c89673b57 265 * Register : WHO_AM_I
nikapov 0:704c89673b57 266 * Address : 0X0F
nikapov 0:704c89673b57 267 * Bit Group Name: WHO_AM_I_BIT
nikapov 0:704c89673b57 268 * Permission : RO
nikapov 0:704c89673b57 269 *******************************************************************************/
nikapov 0:704c89673b57 270 #define LSM6DSL_ACC_GYRO_WHO_AM_I_BIT_MASK 0xFF
nikapov 0:704c89673b57 271 #define LSM6DSL_ACC_GYRO_WHO_AM_I_BIT_POSITION 0
nikapov 0:704c89673b57 272 mems_status_t LSM6DSL_ACC_GYRO_R_WHO_AM_I(void *handle, u8_t *value);
nikapov 0:704c89673b57 273
nikapov 0:704c89673b57 274 /*******************************************************************************
nikapov 0:704c89673b57 275 * Register : CTRL3_C
nikapov 0:704c89673b57 276 * Address : 0X12
nikapov 0:704c89673b57 277 * Bit Group Name: BDU
nikapov 0:704c89673b57 278 * Permission : RW
nikapov 0:704c89673b57 279 *******************************************************************************/
nikapov 0:704c89673b57 280 typedef enum {
nikapov 0:704c89673b57 281 LSM6DSL_ACC_GYRO_BDU_CONTINUOS =0x00,
nikapov 0:704c89673b57 282 LSM6DSL_ACC_GYRO_BDU_BLOCK_UPDATE =0x40,
nikapov 0:704c89673b57 283 } LSM6DSL_ACC_GYRO_BDU_t;
nikapov 0:704c89673b57 284
nikapov 0:704c89673b57 285 #define LSM6DSL_ACC_GYRO_BDU_MASK 0x40
nikapov 0:704c89673b57 286 mems_status_t LSM6DSL_ACC_GYRO_W_BDU(void *handle, LSM6DSL_ACC_GYRO_BDU_t newValue);
nikapov 0:704c89673b57 287 mems_status_t LSM6DSL_ACC_GYRO_R_BDU(void *handle, LSM6DSL_ACC_GYRO_BDU_t *value);
nikapov 0:704c89673b57 288
nikapov 0:704c89673b57 289 /*******************************************************************************
nikapov 0:704c89673b57 290 * Register : CTRL1_XL
nikapov 0:704c89673b57 291 * Address : 0X10
nikapov 0:704c89673b57 292 * Bit Group Name: FS_XL
nikapov 0:704c89673b57 293 * Permission : RW
nikapov 0:704c89673b57 294 *******************************************************************************/
nikapov 0:704c89673b57 295 typedef enum {
nikapov 0:704c89673b57 296 LSM6DSL_ACC_GYRO_FS_XL_2g =0x00,
nikapov 0:704c89673b57 297 LSM6DSL_ACC_GYRO_FS_XL_16g =0x04,
nikapov 0:704c89673b57 298 LSM6DSL_ACC_GYRO_FS_XL_4g =0x08,
nikapov 0:704c89673b57 299 LSM6DSL_ACC_GYRO_FS_XL_8g =0x0C,
nikapov 0:704c89673b57 300 } LSM6DSL_ACC_GYRO_FS_XL_t;
nikapov 0:704c89673b57 301
nikapov 0:704c89673b57 302 #define LSM6DSL_ACC_GYRO_FS_XL_MASK 0x0C
nikapov 0:704c89673b57 303 mems_status_t LSM6DSL_ACC_GYRO_W_FS_XL(void *handle, LSM6DSL_ACC_GYRO_FS_XL_t newValue);
nikapov 0:704c89673b57 304 mems_status_t LSM6DSL_ACC_GYRO_R_FS_XL(void *handle, LSM6DSL_ACC_GYRO_FS_XL_t *value);
nikapov 0:704c89673b57 305
nikapov 0:704c89673b57 306 /*******************************************************************************
nikapov 0:704c89673b57 307 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 308 * Output Type : GetAccData
nikapov 0:704c89673b57 309 * Permission : RO
nikapov 0:704c89673b57 310 *******************************************************************************/
nikapov 0:704c89673b57 311 mems_status_t LSM6DSL_ACC_GYRO_GetRawAccData(void *handle, u8_t *buff);
nikapov 0:704c89673b57 312 mems_status_t LSM6DSL_ACC_Get_Acceleration(void *handle, int *buff, u8_t from_fifo);
nikapov 0:704c89673b57 313
nikapov 0:704c89673b57 314 /*******************************************************************************
nikapov 0:704c89673b57 315 * Register : CTRL1_XL
nikapov 0:704c89673b57 316 * Address : 0X10
nikapov 0:704c89673b57 317 * Bit Group Name: ODR_XL
nikapov 0:704c89673b57 318 * Permission : RW
nikapov 0:704c89673b57 319 *******************************************************************************/
nikapov 0:704c89673b57 320 typedef enum {
nikapov 0:704c89673b57 321 LSM6DSL_ACC_GYRO_ODR_XL_POWER_DOWN =0x00,
nikapov 0:704c89673b57 322 LSM6DSL_ACC_GYRO_ODR_XL_13Hz =0x10,
nikapov 0:704c89673b57 323 LSM6DSL_ACC_GYRO_ODR_XL_26Hz =0x20,
nikapov 0:704c89673b57 324 LSM6DSL_ACC_GYRO_ODR_XL_52Hz =0x30,
nikapov 0:704c89673b57 325 LSM6DSL_ACC_GYRO_ODR_XL_104Hz =0x40,
nikapov 0:704c89673b57 326 LSM6DSL_ACC_GYRO_ODR_XL_208Hz =0x50,
nikapov 0:704c89673b57 327 LSM6DSL_ACC_GYRO_ODR_XL_416Hz =0x60,
nikapov 0:704c89673b57 328 LSM6DSL_ACC_GYRO_ODR_XL_833Hz =0x70,
nikapov 0:704c89673b57 329 LSM6DSL_ACC_GYRO_ODR_XL_1660Hz =0x80,
nikapov 0:704c89673b57 330 LSM6DSL_ACC_GYRO_ODR_XL_3330Hz =0x90,
nikapov 0:704c89673b57 331 LSM6DSL_ACC_GYRO_ODR_XL_6660Hz =0xA0,
nikapov 0:704c89673b57 332 } LSM6DSL_ACC_GYRO_ODR_XL_t;
nikapov 0:704c89673b57 333
nikapov 0:704c89673b57 334 #define LSM6DSL_ACC_GYRO_ODR_XL_MASK 0xF0
nikapov 0:704c89673b57 335 mems_status_t LSM6DSL_ACC_GYRO_W_ODR_XL(void *handle, LSM6DSL_ACC_GYRO_ODR_XL_t newValue);
nikapov 0:704c89673b57 336 mems_status_t LSM6DSL_ACC_GYRO_R_ODR_XL(void *handle, LSM6DSL_ACC_GYRO_ODR_XL_t *value);
nikapov 0:704c89673b57 337 mems_status_t LSM6DSL_ACC_GYRO_translate_ODR_XL(LSM6DSL_ACC_GYRO_ODR_XL_t value, u16_t *odr_hz_val);
nikapov 0:704c89673b57 338
nikapov 0:704c89673b57 339 /*******************************************************************************
nikapov 0:704c89673b57 340 * Register : CTRL2_G
nikapov 0:704c89673b57 341 * Address : 0X11
nikapov 0:704c89673b57 342 * Bit Group Name: FS_G
nikapov 0:704c89673b57 343 * Permission : RW
nikapov 0:704c89673b57 344 *******************************************************************************/
nikapov 0:704c89673b57 345 typedef enum {
nikapov 0:704c89673b57 346 LSM6DSL_ACC_GYRO_FS_G_245dps =0x00,
nikapov 0:704c89673b57 347 LSM6DSL_ACC_GYRO_FS_G_500dps =0x04,
nikapov 0:704c89673b57 348 LSM6DSL_ACC_GYRO_FS_G_1000dps =0x08,
nikapov 0:704c89673b57 349 LSM6DSL_ACC_GYRO_FS_G_2000dps =0x0C,
nikapov 0:704c89673b57 350 } LSM6DSL_ACC_GYRO_FS_G_t;
nikapov 0:704c89673b57 351
nikapov 0:704c89673b57 352 #define LSM6DSL_ACC_GYRO_FS_G_MASK 0x0C
nikapov 0:704c89673b57 353 mems_status_t LSM6DSL_ACC_GYRO_W_FS_G(void *handle, LSM6DSL_ACC_GYRO_FS_G_t newValue);
nikapov 0:704c89673b57 354 mems_status_t LSM6DSL_ACC_GYRO_R_FS_G(void *handle, LSM6DSL_ACC_GYRO_FS_G_t *value);
nikapov 0:704c89673b57 355
nikapov 0:704c89673b57 356 /*******************************************************************************
nikapov 0:704c89673b57 357 * Register : CTRL2_G
nikapov 0:704c89673b57 358 * Address : 0X11
nikapov 0:704c89673b57 359 * Bit Group Name: ODR_G
nikapov 0:704c89673b57 360 * Permission : RW
nikapov 0:704c89673b57 361 *******************************************************************************/
nikapov 0:704c89673b57 362 typedef enum {
nikapov 0:704c89673b57 363 LSM6DSL_ACC_GYRO_ODR_G_POWER_DOWN =0x00,
nikapov 0:704c89673b57 364 LSM6DSL_ACC_GYRO_ODR_G_13Hz =0x10,
nikapov 0:704c89673b57 365 LSM6DSL_ACC_GYRO_ODR_G_26Hz =0x20,
nikapov 0:704c89673b57 366 LSM6DSL_ACC_GYRO_ODR_G_52Hz =0x30,
nikapov 0:704c89673b57 367 LSM6DSL_ACC_GYRO_ODR_G_104Hz =0x40,
nikapov 0:704c89673b57 368 LSM6DSL_ACC_GYRO_ODR_G_208Hz =0x50,
nikapov 0:704c89673b57 369 LSM6DSL_ACC_GYRO_ODR_G_416Hz =0x60,
nikapov 0:704c89673b57 370 LSM6DSL_ACC_GYRO_ODR_G_833Hz =0x70,
nikapov 0:704c89673b57 371 LSM6DSL_ACC_GYRO_ODR_G_1660Hz =0x80,
nikapov 0:704c89673b57 372 LSM6DSL_ACC_GYRO_ODR_G_3330Hz =0x90,
nikapov 0:704c89673b57 373 LSM6DSL_ACC_GYRO_ODR_G_6660Hz =0xA0,
nikapov 0:704c89673b57 374 } LSM6DSL_ACC_GYRO_ODR_G_t;
nikapov 0:704c89673b57 375
nikapov 0:704c89673b57 376 #define LSM6DSL_ACC_GYRO_ODR_G_MASK 0xF0
nikapov 0:704c89673b57 377 mems_status_t LSM6DSL_ACC_GYRO_W_ODR_G(void *handle, LSM6DSL_ACC_GYRO_ODR_G_t newValue);
nikapov 0:704c89673b57 378 mems_status_t LSM6DSL_ACC_GYRO_R_ODR_G(void *handle, LSM6DSL_ACC_GYRO_ODR_G_t *value);
nikapov 0:704c89673b57 379 mems_status_t LSM6DSL_ACC_GYRO_translate_ODR_G(LSM6DSL_ACC_GYRO_ODR_G_t value, u16_t *odr_hz_val);
nikapov 0:704c89673b57 380
nikapov 0:704c89673b57 381 /*******************************************************************************
nikapov 0:704c89673b57 382 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 383 * Output Type : GetGyroData
nikapov 0:704c89673b57 384 * Permission : RO
nikapov 0:704c89673b57 385 *******************************************************************************/
nikapov 0:704c89673b57 386 mems_status_t LSM6DSL_ACC_GYRO_GetRawGyroData(void *handle, u8_t *buff);
nikapov 0:704c89673b57 387 mems_status_t LSM6DSL_ACC_Get_AngularRate(void *handle, int *buff, u8_t from_fifo);
nikapov 0:704c89673b57 388
nikapov 0:704c89673b57 389 /*******************************************************************************
nikapov 0:704c89673b57 390 * Register : CTRL1_XL
nikapov 0:704c89673b57 391 * Address : 0X10
nikapov 0:704c89673b57 392 * Bit Group Name: BW_SEL
nikapov 0:704c89673b57 393 * Permission : RW
nikapov 0:704c89673b57 394 *******************************************************************************/
nikapov 0:704c89673b57 395 typedef enum {
nikapov 0:704c89673b57 396 LSM6DSL_ACC_GYRO_BW_SEL_ODR2 =0x00,
nikapov 0:704c89673b57 397 LSM6DSL_ACC_GYRO_BW_SEL_ODR4 =0x02,
nikapov 0:704c89673b57 398 } LSM6DSL_ACC_GYRO_BW_SEL_t;
nikapov 0:704c89673b57 399
nikapov 0:704c89673b57 400 #define LSM6DSL_ACC_GYRO_BW_SEL_MASK 0x02
nikapov 0:704c89673b57 401 mems_status_t LSM6DSL_ACC_GYRO_W_BW_SEL(void *handle, LSM6DSL_ACC_GYRO_BW_SEL_t newValue);
nikapov 0:704c89673b57 402 mems_status_t LSM6DSL_ACC_GYRO_R_BW_SEL(void *handle, LSM6DSL_ACC_GYRO_BW_SEL_t *value);
nikapov 0:704c89673b57 403
nikapov 0:704c89673b57 404 /*******************************************************************************
nikapov 0:704c89673b57 405 * Register : CTRL2_G
nikapov 0:704c89673b57 406 * Address : 0X11
nikapov 0:704c89673b57 407 * Bit Group Name: FS_125
nikapov 0:704c89673b57 408 * Permission : RW
nikapov 0:704c89673b57 409 *******************************************************************************/
nikapov 0:704c89673b57 410 typedef enum {
nikapov 0:704c89673b57 411 LSM6DSL_ACC_GYRO_FS_125_DISABLED =0x00,
nikapov 0:704c89673b57 412 LSM6DSL_ACC_GYRO_FS_125_ENABLED =0x02,
nikapov 0:704c89673b57 413 } LSM6DSL_ACC_GYRO_FS_125_t;
nikapov 0:704c89673b57 414
nikapov 0:704c89673b57 415 #define LSM6DSL_ACC_GYRO_FS_125_MASK 0x02
nikapov 0:704c89673b57 416 mems_status_t LSM6DSL_ACC_GYRO_W_FS_125(void *handle, LSM6DSL_ACC_GYRO_FS_125_t newValue);
nikapov 0:704c89673b57 417 mems_status_t LSM6DSL_ACC_GYRO_R_FS_125(void *handle, LSM6DSL_ACC_GYRO_FS_125_t *value);
nikapov 0:704c89673b57 418
nikapov 0:704c89673b57 419 /**************** Advanced Function *******************/
nikapov 0:704c89673b57 420
nikapov 0:704c89673b57 421 /*******************************************************************************
nikapov 0:704c89673b57 422 * Register : CTRL3_C
nikapov 0:704c89673b57 423 * Address : 0X12
nikapov 0:704c89673b57 424 * Bit Group Name: BLE
nikapov 0:704c89673b57 425 * Permission : RW
nikapov 0:704c89673b57 426 *******************************************************************************/
nikapov 0:704c89673b57 427 typedef enum {
nikapov 0:704c89673b57 428 LSM6DSL_ACC_GYRO_BLE_LSB =0x00,
nikapov 0:704c89673b57 429 LSM6DSL_ACC_GYRO_BLE_MSB =0x02,
nikapov 0:704c89673b57 430 } LSM6DSL_ACC_GYRO_BLE_t;
nikapov 0:704c89673b57 431
nikapov 0:704c89673b57 432 #define LSM6DSL_ACC_GYRO_BLE_MASK 0x02
nikapov 0:704c89673b57 433 mems_status_t LSM6DSL_ACC_GYRO_W_BLE(void *handle, LSM6DSL_ACC_GYRO_BLE_t newValue);
nikapov 0:704c89673b57 434 mems_status_t LSM6DSL_ACC_GYRO_R_BLE(void *handle, LSM6DSL_ACC_GYRO_BLE_t *value);
nikapov 0:704c89673b57 435
nikapov 0:704c89673b57 436 /*******************************************************************************
nikapov 0:704c89673b57 437 * Register : FUNC_CFG_ACCESS
nikapov 0:704c89673b57 438 * Address : 0X01
nikapov 0:704c89673b57 439 * Bit Group Name: EMB_ACC
nikapov 0:704c89673b57 440 * Permission : RW
nikapov 0:704c89673b57 441 *******************************************************************************/
nikapov 0:704c89673b57 442 typedef enum {
nikapov 0:704c89673b57 443 LSM6DSL_ACC_GYRO_EMBEDDED_ACCESS_DISABLED =0x00,
nikapov 0:704c89673b57 444 LSM6DSL_ACC_GYRO_EMBEDDED_ACCESS_ENABLED =0x80,
nikapov 0:704c89673b57 445 } LSM6DSL_ACC_GYRO_EMB_ACC_t;
nikapov 0:704c89673b57 446
nikapov 0:704c89673b57 447 #define LSM6DSL_ACC_GYRO_EMB_ACC_MASK 0x80
nikapov 0:704c89673b57 448 mems_status_t LSM6DSL_ACC_GYRO_W_EmbeddedAccess(void *handle, LSM6DSL_ACC_GYRO_EMB_ACC_t newValue);
nikapov 0:704c89673b57 449 mems_status_t LSM6DSL_ACC_GYRO_R_EmbeddedAccess(void *handle, LSM6DSL_ACC_GYRO_EMB_ACC_t *value);
nikapov 0:704c89673b57 450
nikapov 0:704c89673b57 451 /*******************************************************************************
nikapov 0:704c89673b57 452 * Register : SENSOR_SYNC_TIME
nikapov 0:704c89673b57 453 * Address : 0X04
nikapov 0:704c89673b57 454 * Bit Group Name: TPH
nikapov 0:704c89673b57 455 * Permission : RW
nikapov 0:704c89673b57 456 *******************************************************************************/
nikapov 0:704c89673b57 457 #define LSM6DSL_ACC_GYRO_TPH_MASK 0xFF
nikapov 0:704c89673b57 458 #define LSM6DSL_ACC_GYRO_TPH_POSITION 0
nikapov 0:704c89673b57 459 mems_status_t LSM6DSL_ACC_GYRO_W_Stamping_Time_Frame(void *handle, u8_t newValue);
nikapov 0:704c89673b57 460 mems_status_t LSM6DSL_ACC_GYRO_R_Stamping_Time_Frame(void *handle, u8_t *value);
nikapov 0:704c89673b57 461
nikapov 0:704c89673b57 462 /*******************************************************************************
nikapov 0:704c89673b57 463 * Register : SENSOR_SYNC_RES_RATIO
nikapov 0:704c89673b57 464 * Address : 0X05
nikapov 0:704c89673b57 465 * Bit Group Name: RR
nikapov 0:704c89673b57 466 * Permission : RW
nikapov 0:704c89673b57 467 *******************************************************************************/
nikapov 0:704c89673b57 468 typedef enum {
nikapov 0:704c89673b57 469 LSM6DSL_ACC_GYRO_TIM_RATIO_2_11 =0x00,
nikapov 0:704c89673b57 470 LSM6DSL_ACC_GYRO_TIM_RATIO_2_12 =0x01,
nikapov 0:704c89673b57 471 LSM6DSL_ACC_GYRO_TIM_RATIO_2_13 =0x02,
nikapov 0:704c89673b57 472 LSM6DSL_ACC_GYRO_TIM_RATIO_2_14 =0x03,
nikapov 0:704c89673b57 473 } LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_t;
nikapov 0:704c89673b57 474
nikapov 0:704c89673b57 475 #define LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_MASK 0x03
nikapov 0:704c89673b57 476 mems_status_t LSM6DSL_ACC_GYRO_W_SYNC_RES_RATIO(void *handle, LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_t newValue);
nikapov 0:704c89673b57 477 mems_status_t LSM6DSL_ACC_GYRO_R_SYNC_RES_RATIO(void *handle, LSM6DSL_ACC_GYRO_SYNC_RES_RATIO_t *value);
nikapov 0:704c89673b57 478
nikapov 0:704c89673b57 479
nikapov 0:704c89673b57 480 /*******************************************************************************
nikapov 0:704c89673b57 481 * Register : FIFO_CTRL1
nikapov 0:704c89673b57 482 * Address : 0X06
nikapov 0:704c89673b57 483 * Bit Group Name: WTM_FIFO
nikapov 0:704c89673b57 484 * Permission : RW
nikapov 0:704c89673b57 485 *******************************************************************************/
nikapov 0:704c89673b57 486 #define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL1_MASK 0xFF
nikapov 0:704c89673b57 487 #define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL1_POSITION 0
nikapov 0:704c89673b57 488 #define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL2_MASK 0x07
nikapov 0:704c89673b57 489 #define LSM6DSL_ACC_GYRO_WTM_FIFO_CTRL2_POSITION 0
nikapov 0:704c89673b57 490 mems_status_t LSM6DSL_ACC_GYRO_W_FIFO_Watermark(void *handle, u16_t newValue);
nikapov 0:704c89673b57 491 mems_status_t LSM6DSL_ACC_GYRO_R_FIFO_Watermark(void *handle, u16_t *value);
nikapov 0:704c89673b57 492
nikapov 0:704c89673b57 493 /*******************************************************************************
nikapov 0:704c89673b57 494 * Register : FIFO_CTRL2
nikapov 0:704c89673b57 495 * Address : 0X07
nikapov 0:704c89673b57 496 * Bit Group Name: FIFO_TEMP_EN
nikapov 0:704c89673b57 497 * Permission : RW
nikapov 0:704c89673b57 498 *******************************************************************************/
nikapov 0:704c89673b57 499 typedef enum {
nikapov 0:704c89673b57 500 LSM6DSL_ACC_GYRO_FIFO_TEMP_DISABLE =0x00,
nikapov 0:704c89673b57 501 LSM6DSL_ACC_GYRO_FIFO_TEMP_ENABLE =0x08,
nikapov 0:704c89673b57 502 } LSM6DSL_ACC_GYRO_FIFO_TEMP_t;
nikapov 0:704c89673b57 503
nikapov 0:704c89673b57 504 #define LSM6DSL_ACC_GYRO_FIFO_TEMP_MASK 0x08
nikapov 0:704c89673b57 505 mems_status_t LSM6DSL_ACC_GYRO_W_FIFO_TEMP(void *handle, LSM6DSL_ACC_GYRO_FIFO_TEMP_t newValue);
nikapov 0:704c89673b57 506 mems_status_t LSM6DSL_ACC_GYRO_R_FIFO_TEMP(void *handle, LSM6DSL_ACC_GYRO_FIFO_TEMP_t *value);
nikapov 0:704c89673b57 507
nikapov 0:704c89673b57 508
nikapov 0:704c89673b57 509 /*******************************************************************************
nikapov 0:704c89673b57 510 * Register : FIFO_CTRL2
nikapov 0:704c89673b57 511 * Address : 0X07
nikapov 0:704c89673b57 512 * Bit Group Name: TIM_PEDO_FIFO_DRDY
nikapov 0:704c89673b57 513 * Permission : RW
nikapov 0:704c89673b57 514 *******************************************************************************/
nikapov 0:704c89673b57 515 typedef enum {
nikapov 0:704c89673b57 516 LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_DISABLED =0x00,
nikapov 0:704c89673b57 517 LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_ENABLED =0x40,
nikapov 0:704c89673b57 518 } LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_t;
nikapov 0:704c89673b57 519
nikapov 0:704c89673b57 520 #define LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_MASK 0x40
nikapov 0:704c89673b57 521 mems_status_t LSM6DSL_ACC_GYRO_W_TIM_PEDO_FIFO_Write_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_t newValue);
nikapov 0:704c89673b57 522 mems_status_t LSM6DSL_ACC_GYRO_R_TIM_PEDO_FIFO_Write_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_DRDY_t *value);
nikapov 0:704c89673b57 523
nikapov 0:704c89673b57 524 /*******************************************************************************
nikapov 0:704c89673b57 525 * Register : FIFO_CTRL2
nikapov 0:704c89673b57 526 * Address : 0X07
nikapov 0:704c89673b57 527 * Bit Group Name: TIM_PEDO_FIFO_EN
nikapov 0:704c89673b57 528 * Permission : RW
nikapov 0:704c89673b57 529 *******************************************************************************/
nikapov 0:704c89673b57 530 typedef enum {
nikapov 0:704c89673b57 531 LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_DISABLED =0x00,
nikapov 0:704c89673b57 532 LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_ENABLED =0x80,
nikapov 0:704c89673b57 533 } LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_t;
nikapov 0:704c89673b57 534
nikapov 0:704c89673b57 535 #define LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_MASK 0x80
nikapov 0:704c89673b57 536 mems_status_t LSM6DSL_ACC_GYRO_W_TIM_PEDO_FIFO_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_t newValue);
nikapov 0:704c89673b57 537 mems_status_t LSM6DSL_ACC_GYRO_R_TIM_PEDO_FIFO_En(void *handle, LSM6DSL_ACC_GYRO_TIM_PEDO_FIFO_EN_t *value);
nikapov 0:704c89673b57 538
nikapov 0:704c89673b57 539 /*******************************************************************************
nikapov 0:704c89673b57 540 * Register : FIFO_CTRL3
nikapov 0:704c89673b57 541 * Address : 0X08
nikapov 0:704c89673b57 542 * Bit Group Name: DEC_FIFO_XL
nikapov 0:704c89673b57 543 * Permission : RW
nikapov 0:704c89673b57 544 *******************************************************************************/
nikapov 0:704c89673b57 545 typedef enum {
nikapov 0:704c89673b57 546 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DATA_NOT_IN_FIFO =0x00,
nikapov 0:704c89673b57 547 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_NO_DECIMATION =0x01,
nikapov 0:704c89673b57 548 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_2 =0x02,
nikapov 0:704c89673b57 549 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_3 =0x03,
nikapov 0:704c89673b57 550 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_4 =0x04,
nikapov 0:704c89673b57 551 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_8 =0x05,
nikapov 0:704c89673b57 552 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_16 =0x06,
nikapov 0:704c89673b57 553 LSM6DSL_ACC_GYRO_DEC_FIFO_XL_DECIMATION_BY_32 =0x07,
nikapov 0:704c89673b57 554 } LSM6DSL_ACC_GYRO_DEC_FIFO_XL_t;
nikapov 0:704c89673b57 555
nikapov 0:704c89673b57 556 #define LSM6DSL_ACC_GYRO_DEC_FIFO_XL_MASK 0x07
nikapov 0:704c89673b57 557 mems_status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_XL(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_XL_t newValue);
nikapov 0:704c89673b57 558 mems_status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_XL_val(void *handle, u16_t newValue);
nikapov 0:704c89673b57 559 mems_status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_XL(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_XL_t *value);
nikapov 0:704c89673b57 560
nikapov 0:704c89673b57 561 /*******************************************************************************
nikapov 0:704c89673b57 562 * Register : FIFO_CTRL3
nikapov 0:704c89673b57 563 * Address : 0X08
nikapov 0:704c89673b57 564 * Bit Group Name: DEC_FIFO_G
nikapov 0:704c89673b57 565 * Permission : RW
nikapov 0:704c89673b57 566 *******************************************************************************/
nikapov 0:704c89673b57 567 typedef enum {
nikapov 0:704c89673b57 568 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DATA_NOT_IN_FIFO =0x00,
nikapov 0:704c89673b57 569 LSM6DSL_ACC_GYRO_DEC_FIFO_G_NO_DECIMATION =0x08,
nikapov 0:704c89673b57 570 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_2 =0x10,
nikapov 0:704c89673b57 571 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_3 =0x18,
nikapov 0:704c89673b57 572 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_4 =0x20,
nikapov 0:704c89673b57 573 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_8 =0x28,
nikapov 0:704c89673b57 574 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_16 =0x30,
nikapov 0:704c89673b57 575 LSM6DSL_ACC_GYRO_DEC_FIFO_G_DECIMATION_BY_32 =0x38,
nikapov 0:704c89673b57 576 } LSM6DSL_ACC_GYRO_DEC_FIFO_G_t;
nikapov 0:704c89673b57 577
nikapov 0:704c89673b57 578 #define LSM6DSL_ACC_GYRO_DEC_FIFO_G_MASK 0x38
nikapov 0:704c89673b57 579 mems_status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_G(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_G_t newValue);
nikapov 0:704c89673b57 580 mems_status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_G_val(void *handle, u16_t newValue);
nikapov 0:704c89673b57 581 mems_status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_G(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_G_t *value);
nikapov 0:704c89673b57 582
nikapov 0:704c89673b57 583 /*******************************************************************************
nikapov 0:704c89673b57 584 * Register : FIFO_CTRL4
nikapov 0:704c89673b57 585 * Address : 0X09
nikapov 0:704c89673b57 586 * Bit Group Name: DEC_DS3_FIFO
nikapov 0:704c89673b57 587 * Permission : RW
nikapov 0:704c89673b57 588 *******************************************************************************/
nikapov 0:704c89673b57 589 typedef enum {
nikapov 0:704c89673b57 590 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DATA_NOT_IN_FIFO =0x00,
nikapov 0:704c89673b57 591 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_NO_DECIMATION =0x01,
nikapov 0:704c89673b57 592 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_2 =0x02,
nikapov 0:704c89673b57 593 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_3 =0x03,
nikapov 0:704c89673b57 594 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_4 =0x04,
nikapov 0:704c89673b57 595 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_8 =0x05,
nikapov 0:704c89673b57 596 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_16 =0x06,
nikapov 0:704c89673b57 597 LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_DECIMATION_BY_32 =0x07,
nikapov 0:704c89673b57 598 } LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_t;
nikapov 0:704c89673b57 599
nikapov 0:704c89673b57 600 #define LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_MASK 0x07
nikapov 0:704c89673b57 601 mems_status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_DS3(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_t newValue);
nikapov 0:704c89673b57 602 mems_status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_DS3(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS3_t *value);
nikapov 0:704c89673b57 603
nikapov 0:704c89673b57 604 /*******************************************************************************
nikapov 0:704c89673b57 605 * Register : FIFO_CTRL4
nikapov 0:704c89673b57 606 * Address : 0X09
nikapov 0:704c89673b57 607 * Bit Group Name: DEC_DS4_FIFO
nikapov 0:704c89673b57 608 * Permission : RW
nikapov 0:704c89673b57 609 *******************************************************************************/
nikapov 0:704c89673b57 610 typedef enum {
nikapov 0:704c89673b57 611 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DATA_NOT_IN_FIFO =0x00,
nikapov 0:704c89673b57 612 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_NO_DECIMATION =0x08,
nikapov 0:704c89673b57 613 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_2 =0x10,
nikapov 0:704c89673b57 614 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_3 =0x18,
nikapov 0:704c89673b57 615 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_4 =0x20,
nikapov 0:704c89673b57 616 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_8 =0x28,
nikapov 0:704c89673b57 617 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_16 =0x30,
nikapov 0:704c89673b57 618 LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_DECIMATION_BY_32 =0x38,
nikapov 0:704c89673b57 619 } LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_t;
nikapov 0:704c89673b57 620
nikapov 0:704c89673b57 621 #define LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_MASK 0x38
nikapov 0:704c89673b57 622 mems_status_t LSM6DSL_ACC_GYRO_W_DEC_FIFO_DS4(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_t newValue);
nikapov 0:704c89673b57 623 mems_status_t LSM6DSL_ACC_GYRO_R_DEC_FIFO_DS4(void *handle, LSM6DSL_ACC_GYRO_DEC_FIFO_DS4_t *value);
nikapov 0:704c89673b57 624
nikapov 0:704c89673b57 625 /*******************************************************************************
nikapov 0:704c89673b57 626 * Register : FIFO_CTRL4
nikapov 0:704c89673b57 627 * Address : 0X09
nikapov 0:704c89673b57 628 * Bit Group Name: HI_DATA_ONLY
nikapov 0:704c89673b57 629 * Permission : RW
nikapov 0:704c89673b57 630 *******************************************************************************/
nikapov 0:704c89673b57 631 typedef enum {
nikapov 0:704c89673b57 632 LSM6DSL_ACC_GYRO_HI_DATA_ONLY_DISABLED =0x00,
nikapov 0:704c89673b57 633 LSM6DSL_ACC_GYRO_HI_DATA_ONLY_ENABLED =0x40,
nikapov 0:704c89673b57 634 } LSM6DSL_ACC_GYRO_HI_DATA_ONLY_t;
nikapov 0:704c89673b57 635
nikapov 0:704c89673b57 636 #define LSM6DSL_ACC_GYRO_HI_DATA_ONLY_MASK 0x40
nikapov 0:704c89673b57 637 mems_status_t LSM6DSL_ACC_GYRO_W_HI_DATA_ONLY(void *handle, LSM6DSL_ACC_GYRO_HI_DATA_ONLY_t newValue);
nikapov 0:704c89673b57 638 mems_status_t LSM6DSL_ACC_GYRO_R_HI_DATA_ONLY(void *handle, LSM6DSL_ACC_GYRO_HI_DATA_ONLY_t *value);
nikapov 0:704c89673b57 639
nikapov 0:704c89673b57 640 /*******************************************************************************
nikapov 0:704c89673b57 641 * Register : FIFO_CTRL4
nikapov 0:704c89673b57 642 * Address : 0X09
nikapov 0:704c89673b57 643 * Bit Group Name: STOP_ON_FTH
nikapov 0:704c89673b57 644 * Permission : RW
nikapov 0:704c89673b57 645 *******************************************************************************/
nikapov 0:704c89673b57 646 typedef enum {
nikapov 0:704c89673b57 647 LSM6DSL_ACC_GYRO_STOP_ON_FTH_DISABLED =0x00,
nikapov 0:704c89673b57 648 LSM6DSL_ACC_GYRO_STOP_ON_FTH_ENABLED =0x80,
nikapov 0:704c89673b57 649 } LSM6DSL_ACC_GYRO_STOP_ON_FTH_t;
nikapov 0:704c89673b57 650
nikapov 0:704c89673b57 651 #define LSM6DSL_ACC_GYRO_STOP_ON_FTH_MASK 0x80
nikapov 0:704c89673b57 652 mems_status_t LSM6DSL_ACC_GYRO_W_STOP_ON_FTH(void *handle, LSM6DSL_ACC_GYRO_STOP_ON_FTH_t newValue);
nikapov 0:704c89673b57 653 mems_status_t LSM6DSL_ACC_GYRO_R_STOP_ON_FTH(void *handle, LSM6DSL_ACC_GYRO_STOP_ON_FTH_t *value);
nikapov 0:704c89673b57 654
nikapov 0:704c89673b57 655 /*******************************************************************************
nikapov 0:704c89673b57 656 * Register : FIFO_CTRL5
nikapov 0:704c89673b57 657 * Address : 0X0A
nikapov 0:704c89673b57 658 * Bit Group Name: FIFO_MODE
nikapov 0:704c89673b57 659 * Permission : RW
nikapov 0:704c89673b57 660 *******************************************************************************/
nikapov 0:704c89673b57 661 typedef enum {
nikapov 0:704c89673b57 662 LSM6DSL_ACC_GYRO_FIFO_MODE_BYPASS =0x00,
nikapov 0:704c89673b57 663 LSM6DSL_ACC_GYRO_FIFO_MODE_FIFO =0x01,
nikapov 0:704c89673b57 664 LSM6DSL_ACC_GYRO_FIFO_MODE_STREAM =0x02,
nikapov 0:704c89673b57 665 LSM6DSL_ACC_GYRO_FIFO_MODE_STF =0x03,
nikapov 0:704c89673b57 666 LSM6DSL_ACC_GYRO_FIFO_MODE_BTS =0x04,
nikapov 0:704c89673b57 667 LSM6DSL_ACC_GYRO_FIFO_MODE_DYN_STREAM =0x05,
nikapov 0:704c89673b57 668 LSM6DSL_ACC_GYRO_FIFO_MODE_DYN_STREAM_2 =0x06,
nikapov 0:704c89673b57 669 LSM6DSL_ACC_GYRO_FIFO_MODE_BTF =0x07,
nikapov 0:704c89673b57 670 } LSM6DSL_ACC_GYRO_FIFO_MODE_t;
nikapov 0:704c89673b57 671
nikapov 0:704c89673b57 672 #define LSM6DSL_ACC_GYRO_FIFO_MODE_MASK 0x07
nikapov 0:704c89673b57 673 mems_status_t LSM6DSL_ACC_GYRO_W_FIFO_MODE(void *handle, LSM6DSL_ACC_GYRO_FIFO_MODE_t newValue);
nikapov 0:704c89673b57 674 mems_status_t LSM6DSL_ACC_GYRO_R_FIFO_MODE(void *handle, LSM6DSL_ACC_GYRO_FIFO_MODE_t *value);
nikapov 0:704c89673b57 675
nikapov 0:704c89673b57 676 /*******************************************************************************
nikapov 0:704c89673b57 677 * Register : FIFO_CTRL5
nikapov 0:704c89673b57 678 * Address : 0X0A
nikapov 0:704c89673b57 679 * Bit Group Name: ODR_FIFO
nikapov 0:704c89673b57 680 * Permission : RW
nikapov 0:704c89673b57 681 *******************************************************************************/
nikapov 0:704c89673b57 682 typedef enum {
nikapov 0:704c89673b57 683 LSM6DSL_ACC_GYRO_ODR_FIFO_10Hz =0x08,
nikapov 0:704c89673b57 684 LSM6DSL_ACC_GYRO_ODR_FIFO_25Hz =0x10,
nikapov 0:704c89673b57 685 LSM6DSL_ACC_GYRO_ODR_FIFO_50Hz =0x18,
nikapov 0:704c89673b57 686 LSM6DSL_ACC_GYRO_ODR_FIFO_100Hz =0x20,
nikapov 0:704c89673b57 687 LSM6DSL_ACC_GYRO_ODR_FIFO_200Hz =0x28,
nikapov 0:704c89673b57 688 LSM6DSL_ACC_GYRO_ODR_FIFO_400Hz =0x30,
nikapov 0:704c89673b57 689 LSM6DSL_ACC_GYRO_ODR_FIFO_800Hz =0x38,
nikapov 0:704c89673b57 690 LSM6DSL_ACC_GYRO_ODR_FIFO_1600Hz =0x40,
nikapov 0:704c89673b57 691 LSM6DSL_ACC_GYRO_ODR_FIFO_3300Hz =0x48,
nikapov 0:704c89673b57 692 LSM6DSL_ACC_GYRO_ODR_FIFO_6600Hz =0x50,
nikapov 0:704c89673b57 693 LSM6DSL_ACC_GYRO_ODR_FIFO_13300Hz =0x58,
nikapov 0:704c89673b57 694 } LSM6DSL_ACC_GYRO_ODR_FIFO_t;
nikapov 0:704c89673b57 695
nikapov 0:704c89673b57 696 #define LSM6DSL_ACC_GYRO_ODR_FIFO_MASK 0x78
nikapov 0:704c89673b57 697 mems_status_t LSM6DSL_ACC_GYRO_W_ODR_FIFO(void *handle, LSM6DSL_ACC_GYRO_ODR_FIFO_t newValue);
nikapov 0:704c89673b57 698 mems_status_t LSM6DSL_ACC_GYRO_R_ODR_FIFO(void *handle, LSM6DSL_ACC_GYRO_ODR_FIFO_t *value);
nikapov 0:704c89673b57 699
nikapov 0:704c89673b57 700 /*******************************************************************************
nikapov 0:704c89673b57 701 * Register : DRDY_PULSE_CFG_G
nikapov 0:704c89673b57 702 * Address : 0X0B
nikapov 0:704c89673b57 703 * Bit Group Name: DRDY_PULSE
nikapov 0:704c89673b57 704 * Permission : RW
nikapov 0:704c89673b57 705 *******************************************************************************/
nikapov 0:704c89673b57 706 typedef enum {
nikapov 0:704c89673b57 707 LSM6DSL_ACC_GYRO_DRDY_LATCH =0x00,
nikapov 0:704c89673b57 708 LSM6DSL_ACC_GYRO_DRDY_PULSE =0x80,
nikapov 0:704c89673b57 709 } LSM6DSL_ACC_GYRO_DRDY_PULSE_t;
nikapov 0:704c89673b57 710
nikapov 0:704c89673b57 711 #define LSM6DSL_ACC_GYRO_DRDY_PULSE_MASK 0x80
nikapov 0:704c89673b57 712 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_PULSE(void *handle, LSM6DSL_ACC_GYRO_DRDY_PULSE_t newValue);
nikapov 0:704c89673b57 713 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_PULSE(void *handle, LSM6DSL_ACC_GYRO_DRDY_PULSE_t *value);
nikapov 0:704c89673b57 714
nikapov 0:704c89673b57 715 /*******************************************************************************
nikapov 0:704c89673b57 716 * Register : INT1_CTRL
nikapov 0:704c89673b57 717 * Address : 0X0D
nikapov 0:704c89673b57 718 * Bit Group Name: INT1_DRDY_XL
nikapov 0:704c89673b57 719 * Permission : RW
nikapov 0:704c89673b57 720 *******************************************************************************/
nikapov 0:704c89673b57 721 typedef enum {
nikapov 0:704c89673b57 722 LSM6DSL_ACC_GYRO_INT1_DRDY_XL_DISABLED =0x00,
nikapov 0:704c89673b57 723 LSM6DSL_ACC_GYRO_INT1_DRDY_XL_ENABLED =0x01,
nikapov 0:704c89673b57 724 } LSM6DSL_ACC_GYRO_INT1_DRDY_XL_t;
nikapov 0:704c89673b57 725
nikapov 0:704c89673b57 726 #define LSM6DSL_ACC_GYRO_INT1_DRDY_XL_MASK 0x01
nikapov 0:704c89673b57 727 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_XL_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_XL_t newValue);
nikapov 0:704c89673b57 728 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_XL_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_XL_t *value);
nikapov 0:704c89673b57 729
nikapov 0:704c89673b57 730 /*******************************************************************************
nikapov 0:704c89673b57 731 * Register : INT1_CTRL
nikapov 0:704c89673b57 732 * Address : 0X0D
nikapov 0:704c89673b57 733 * Bit Group Name: INT1_DRDY_G
nikapov 0:704c89673b57 734 * Permission : RW
nikapov 0:704c89673b57 735 *******************************************************************************/
nikapov 0:704c89673b57 736 typedef enum {
nikapov 0:704c89673b57 737 LSM6DSL_ACC_GYRO_INT1_DRDY_G_DISABLED =0x00,
nikapov 0:704c89673b57 738 LSM6DSL_ACC_GYRO_INT1_DRDY_G_ENABLED =0x02,
nikapov 0:704c89673b57 739 } LSM6DSL_ACC_GYRO_INT1_DRDY_G_t;
nikapov 0:704c89673b57 740
nikapov 0:704c89673b57 741 #define LSM6DSL_ACC_GYRO_INT1_DRDY_G_MASK 0x02
nikapov 0:704c89673b57 742 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_G_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_G_t newValue);
nikapov 0:704c89673b57 743 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_G_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_DRDY_G_t *value);
nikapov 0:704c89673b57 744
nikapov 0:704c89673b57 745 /*******************************************************************************
nikapov 0:704c89673b57 746 * Register : INT1_CTRL
nikapov 0:704c89673b57 747 * Address : 0X0D
nikapov 0:704c89673b57 748 * Bit Group Name: INT1_BOOT
nikapov 0:704c89673b57 749 * Permission : RW
nikapov 0:704c89673b57 750 *******************************************************************************/
nikapov 0:704c89673b57 751 typedef enum {
nikapov 0:704c89673b57 752 LSM6DSL_ACC_GYRO_INT1_BOOT_DISABLED =0x00,
nikapov 0:704c89673b57 753 LSM6DSL_ACC_GYRO_INT1_BOOT_ENABLED =0x04,
nikapov 0:704c89673b57 754 } LSM6DSL_ACC_GYRO_INT1_BOOT_t;
nikapov 0:704c89673b57 755
nikapov 0:704c89673b57 756 #define LSM6DSL_ACC_GYRO_INT1_BOOT_MASK 0x04
nikapov 0:704c89673b57 757 mems_status_t LSM6DSL_ACC_GYRO_W_BOOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_BOOT_t newValue);
nikapov 0:704c89673b57 758 mems_status_t LSM6DSL_ACC_GYRO_R_BOOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_BOOT_t *value);
nikapov 0:704c89673b57 759
nikapov 0:704c89673b57 760 /*******************************************************************************
nikapov 0:704c89673b57 761 * Register : INT1_CTRL
nikapov 0:704c89673b57 762 * Address : 0X0D
nikapov 0:704c89673b57 763 * Bit Group Name: INT1_FTH
nikapov 0:704c89673b57 764 * Permission : RW
nikapov 0:704c89673b57 765 *******************************************************************************/
nikapov 0:704c89673b57 766 typedef enum {
nikapov 0:704c89673b57 767 LSM6DSL_ACC_GYRO_INT1_FTH_DISABLED =0x00,
nikapov 0:704c89673b57 768 LSM6DSL_ACC_GYRO_INT1_FTH_ENABLED =0x08,
nikapov 0:704c89673b57 769 } LSM6DSL_ACC_GYRO_INT1_FTH_t;
nikapov 0:704c89673b57 770
nikapov 0:704c89673b57 771 #define LSM6DSL_ACC_GYRO_INT1_FTH_MASK 0x08
nikapov 0:704c89673b57 772 mems_status_t LSM6DSL_ACC_GYRO_W_FIFO_TSHLD_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FTH_t newValue);
nikapov 0:704c89673b57 773 mems_status_t LSM6DSL_ACC_GYRO_R_FIFO_TSHLD_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FTH_t *value);
nikapov 0:704c89673b57 774
nikapov 0:704c89673b57 775 /*******************************************************************************
nikapov 0:704c89673b57 776 * Register : INT1_CTRL
nikapov 0:704c89673b57 777 * Address : 0X0D
nikapov 0:704c89673b57 778 * Bit Group Name: INT1_OVR
nikapov 0:704c89673b57 779 * Permission : RW
nikapov 0:704c89673b57 780 *******************************************************************************/
nikapov 0:704c89673b57 781 typedef enum {
nikapov 0:704c89673b57 782 LSM6DSL_ACC_GYRO_INT1_OVR_DISABLED =0x00,
nikapov 0:704c89673b57 783 LSM6DSL_ACC_GYRO_INT1_OVR_ENABLED =0x10,
nikapov 0:704c89673b57 784 } LSM6DSL_ACC_GYRO_INT1_OVR_t;
nikapov 0:704c89673b57 785
nikapov 0:704c89673b57 786 #define LSM6DSL_ACC_GYRO_INT1_OVR_MASK 0x10
nikapov 0:704c89673b57 787 mems_status_t LSM6DSL_ACC_GYRO_W_OVERRUN_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_OVR_t newValue);
nikapov 0:704c89673b57 788 mems_status_t LSM6DSL_ACC_GYRO_R_OVERRUN_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_OVR_t *value);
nikapov 0:704c89673b57 789
nikapov 0:704c89673b57 790 /*******************************************************************************
nikapov 0:704c89673b57 791 * Register : INT1_CTRL
nikapov 0:704c89673b57 792 * Address : 0X0D
nikapov 0:704c89673b57 793 * Bit Group Name: INT1_FULL_FLAG
nikapov 0:704c89673b57 794 * Permission : RW
nikapov 0:704c89673b57 795 *******************************************************************************/
nikapov 0:704c89673b57 796 typedef enum {
nikapov 0:704c89673b57 797 LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_DISABLED =0x00,
nikapov 0:704c89673b57 798 LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_ENABLED =0x20,
nikapov 0:704c89673b57 799 } LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_t;
nikapov 0:704c89673b57 800
nikapov 0:704c89673b57 801 #define LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_MASK 0x20
nikapov 0:704c89673b57 802 mems_status_t LSM6DSL_ACC_GYRO_W_FULL_FLAG_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_t newValue);
nikapov 0:704c89673b57 803 mems_status_t LSM6DSL_ACC_GYRO_R_FULL_FLAG_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_FULL_FLAG_t *value);
nikapov 0:704c89673b57 804
nikapov 0:704c89673b57 805 /*******************************************************************************
nikapov 0:704c89673b57 806 * Register : INT1_CTRL
nikapov 0:704c89673b57 807 * Address : 0X0D
nikapov 0:704c89673b57 808 * Bit Group Name: INT1_SIGN_MOT
nikapov 0:704c89673b57 809 * Permission : RW
nikapov 0:704c89673b57 810 *******************************************************************************/
nikapov 0:704c89673b57 811 typedef enum {
nikapov 0:704c89673b57 812 LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_DISABLED =0x00,
nikapov 0:704c89673b57 813 LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_ENABLED =0x40,
nikapov 0:704c89673b57 814 } LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_t;
nikapov 0:704c89673b57 815
nikapov 0:704c89673b57 816 #define LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_MASK 0x40
nikapov 0:704c89673b57 817 mems_status_t LSM6DSL_ACC_GYRO_W_SIGN_MOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_t newValue);
nikapov 0:704c89673b57 818 mems_status_t LSM6DSL_ACC_GYRO_R_SIGN_MOT_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_SIGN_MOT_t *value);
nikapov 0:704c89673b57 819
nikapov 0:704c89673b57 820 /*******************************************************************************
nikapov 0:704c89673b57 821 * Register : INT1_CTRL
nikapov 0:704c89673b57 822 * Address : 0X0D
nikapov 0:704c89673b57 823 * Bit Group Name: INT1_STEP_DETECTOR
nikapov 0:704c89673b57 824 * Permission : RW
nikapov 0:704c89673b57 825 *******************************************************************************/
nikapov 0:704c89673b57 826 typedef enum {
nikapov 0:704c89673b57 827 LSM6DSL_ACC_GYRO_INT1_PEDO_DISABLED =0x00,
nikapov 0:704c89673b57 828 LSM6DSL_ACC_GYRO_INT1_PEDO_ENABLED =0x80,
nikapov 0:704c89673b57 829 } LSM6DSL_ACC_GYRO_INT1_PEDO_t;
nikapov 0:704c89673b57 830
nikapov 0:704c89673b57 831 #define LSM6DSL_ACC_GYRO_INT1_PEDO_MASK 0x80
nikapov 0:704c89673b57 832 mems_status_t LSM6DSL_ACC_GYRO_W_STEP_DET_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_PEDO_t newValue);
nikapov 0:704c89673b57 833 mems_status_t LSM6DSL_ACC_GYRO_R_STEP_DET_on_INT1(void *handle, LSM6DSL_ACC_GYRO_INT1_PEDO_t *value);
nikapov 0:704c89673b57 834
nikapov 0:704c89673b57 835 /*******************************************************************************
nikapov 0:704c89673b57 836 * Register : INT2_CTRL
nikapov 0:704c89673b57 837 * Address : 0X0E
nikapov 0:704c89673b57 838 * Bit Group Name: INT2_DRDY_XL
nikapov 0:704c89673b57 839 * Permission : RW
nikapov 0:704c89673b57 840 *******************************************************************************/
nikapov 0:704c89673b57 841 typedef enum {
nikapov 0:704c89673b57 842 LSM6DSL_ACC_GYRO_INT2_DRDY_XL_DISABLED =0x00,
nikapov 0:704c89673b57 843 LSM6DSL_ACC_GYRO_INT2_DRDY_XL_ENABLED =0x01,
nikapov 0:704c89673b57 844 } LSM6DSL_ACC_GYRO_INT2_DRDY_XL_t;
nikapov 0:704c89673b57 845
nikapov 0:704c89673b57 846 #define LSM6DSL_ACC_GYRO_INT2_DRDY_XL_MASK 0x01
nikapov 0:704c89673b57 847 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_XL_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_XL_t newValue);
nikapov 0:704c89673b57 848 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_XL_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_XL_t *value);
nikapov 0:704c89673b57 849
nikapov 0:704c89673b57 850 /*******************************************************************************
nikapov 0:704c89673b57 851 * Register : INT2_CTRL
nikapov 0:704c89673b57 852 * Address : 0X0E
nikapov 0:704c89673b57 853 * Bit Group Name: INT2_DRDY_G
nikapov 0:704c89673b57 854 * Permission : RW
nikapov 0:704c89673b57 855 *******************************************************************************/
nikapov 0:704c89673b57 856 typedef enum {
nikapov 0:704c89673b57 857 LSM6DSL_ACC_GYRO_INT2_DRDY_G_DISABLED =0x00,
nikapov 0:704c89673b57 858 LSM6DSL_ACC_GYRO_INT2_DRDY_G_ENABLED =0x02,
nikapov 0:704c89673b57 859 } LSM6DSL_ACC_GYRO_INT2_DRDY_G_t;
nikapov 0:704c89673b57 860
nikapov 0:704c89673b57 861 #define LSM6DSL_ACC_GYRO_INT2_DRDY_G_MASK 0x02
nikapov 0:704c89673b57 862 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_G_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_G_t newValue);
nikapov 0:704c89673b57 863 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_G_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_G_t *value);
nikapov 0:704c89673b57 864
nikapov 0:704c89673b57 865 /*******************************************************************************
nikapov 0:704c89673b57 866 * Register : INT2_CTRL
nikapov 0:704c89673b57 867 * Address : 0X0E
nikapov 0:704c89673b57 868 * Bit Group Name: INT2_DRDY_TEMP
nikapov 0:704c89673b57 869 * Permission : RW
nikapov 0:704c89673b57 870 *******************************************************************************/
nikapov 0:704c89673b57 871 typedef enum {
nikapov 0:704c89673b57 872 LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_DISABLED =0x00,
nikapov 0:704c89673b57 873 LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_ENABLED =0x04,
nikapov 0:704c89673b57 874 } LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_t;
nikapov 0:704c89673b57 875
nikapov 0:704c89673b57 876 #define LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_MASK 0x04
nikapov 0:704c89673b57 877 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_TEMP_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_t newValue);
nikapov 0:704c89673b57 878 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_TEMP_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_DRDY_TEMP_t *value);
nikapov 0:704c89673b57 879
nikapov 0:704c89673b57 880
nikapov 0:704c89673b57 881 /*******************************************************************************
nikapov 0:704c89673b57 882 * Register : INT2_CTRL
nikapov 0:704c89673b57 883 * Address : 0X0E
nikapov 0:704c89673b57 884 * Bit Group Name: INT2_FTH
nikapov 0:704c89673b57 885 * Permission : RW
nikapov 0:704c89673b57 886 *******************************************************************************/
nikapov 0:704c89673b57 887 typedef enum {
nikapov 0:704c89673b57 888 LSM6DSL_ACC_GYRO_INT2_FTH_DISABLED =0x00,
nikapov 0:704c89673b57 889 LSM6DSL_ACC_GYRO_INT2_FTH_ENABLED =0x08,
nikapov 0:704c89673b57 890 } LSM6DSL_ACC_GYRO_INT2_FTH_t;
nikapov 0:704c89673b57 891
nikapov 0:704c89673b57 892 #define LSM6DSL_ACC_GYRO_INT2_FTH_MASK 0x08
nikapov 0:704c89673b57 893 mems_status_t LSM6DSL_ACC_GYRO_W_FIFO_TSHLD_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FTH_t newValue);
nikapov 0:704c89673b57 894 mems_status_t LSM6DSL_ACC_GYRO_R_FIFO_TSHLD_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FTH_t *value);
nikapov 0:704c89673b57 895
nikapov 0:704c89673b57 896 /*******************************************************************************
nikapov 0:704c89673b57 897 * Register : INT2_CTRL
nikapov 0:704c89673b57 898 * Address : 0X0E
nikapov 0:704c89673b57 899 * Bit Group Name: INT2_OVR
nikapov 0:704c89673b57 900 * Permission : RW
nikapov 0:704c89673b57 901 *******************************************************************************/
nikapov 0:704c89673b57 902 typedef enum {
nikapov 0:704c89673b57 903 LSM6DSL_ACC_GYRO_INT2_OVR_DISABLED =0x00,
nikapov 0:704c89673b57 904 LSM6DSL_ACC_GYRO_INT2_OVR_ENABLED =0x10,
nikapov 0:704c89673b57 905 } LSM6DSL_ACC_GYRO_INT2_OVR_t;
nikapov 0:704c89673b57 906
nikapov 0:704c89673b57 907 #define LSM6DSL_ACC_GYRO_INT2_OVR_MASK 0x10
nikapov 0:704c89673b57 908 mems_status_t LSM6DSL_ACC_GYRO_W_OVERRUN_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_OVR_t newValue);
nikapov 0:704c89673b57 909 mems_status_t LSM6DSL_ACC_GYRO_R_OVERRUN_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_OVR_t *value);
nikapov 0:704c89673b57 910
nikapov 0:704c89673b57 911 /*******************************************************************************
nikapov 0:704c89673b57 912 * Register : INT2_CTRL
nikapov 0:704c89673b57 913 * Address : 0X0E
nikapov 0:704c89673b57 914 * Bit Group Name: INT2_FULL_FLAG
nikapov 0:704c89673b57 915 * Permission : RW
nikapov 0:704c89673b57 916 *******************************************************************************/
nikapov 0:704c89673b57 917 typedef enum {
nikapov 0:704c89673b57 918 LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_DISABLED =0x00,
nikapov 0:704c89673b57 919 LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_ENABLED =0x20,
nikapov 0:704c89673b57 920 } LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_t;
nikapov 0:704c89673b57 921
nikapov 0:704c89673b57 922 #define LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_MASK 0x20
nikapov 0:704c89673b57 923 mems_status_t LSM6DSL_ACC_GYRO_W_FULL_FLAG_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_t newValue);
nikapov 0:704c89673b57 924 mems_status_t LSM6DSL_ACC_GYRO_R_FULL_FLAG_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_t *value);
nikapov 0:704c89673b57 925
nikapov 0:704c89673b57 926 /*******************************************************************************
nikapov 0:704c89673b57 927 * Register : INT2_CTRL
nikapov 0:704c89673b57 928 * Address : 0X0E
nikapov 0:704c89673b57 929 * Bit Group Name: INT2_STEP_COUNT_OV
nikapov 0:704c89673b57 930 * Permission : RW
nikapov 0:704c89673b57 931 *******************************************************************************/
nikapov 0:704c89673b57 932 typedef enum {
nikapov 0:704c89673b57 933 LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_DISABLED =0x00,
nikapov 0:704c89673b57 934 LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_ENABLED =0x40,
nikapov 0:704c89673b57 935 } LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_t;
nikapov 0:704c89673b57 936
nikapov 0:704c89673b57 937 #define LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_MASK 0x40
nikapov 0:704c89673b57 938 mems_status_t LSM6DSL_ACC_GYRO_W_STEP_COUNT_OV_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_t newValue);
nikapov 0:704c89673b57 939 mems_status_t LSM6DSL_ACC_GYRO_R_STEP_COUNT_OV_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_COUNT_OV_t *value);
nikapov 0:704c89673b57 940
nikapov 0:704c89673b57 941 /*******************************************************************************
nikapov 0:704c89673b57 942 * Register : INT2_CTRL
nikapov 0:704c89673b57 943 * Address : 0X0E
nikapov 0:704c89673b57 944 * Bit Group Name: INT2_STEP_DELTA
nikapov 0:704c89673b57 945 * Permission : RW
nikapov 0:704c89673b57 946 *******************************************************************************/
nikapov 0:704c89673b57 947 typedef enum {
nikapov 0:704c89673b57 948 LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_DISABLED =0x00,
nikapov 0:704c89673b57 949 LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_ENABLED =0x80,
nikapov 0:704c89673b57 950 } LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_t;
nikapov 0:704c89673b57 951
nikapov 0:704c89673b57 952 #define LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_MASK 0x80
nikapov 0:704c89673b57 953 mems_status_t LSM6DSL_ACC_GYRO_W_STEP_DELTA_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_t newValue);
nikapov 0:704c89673b57 954 mems_status_t LSM6DSL_ACC_GYRO_R_STEP_DELTA_on_INT2(void *handle, LSM6DSL_ACC_GYRO_INT2_STEP_DELTA_t *value);
nikapov 0:704c89673b57 955
nikapov 0:704c89673b57 956 /*******************************************************************************
nikapov 0:704c89673b57 957 * Register : CTRL3_C
nikapov 0:704c89673b57 958 * Address : 0X12
nikapov 0:704c89673b57 959 * Bit Group Name: SW_RESET
nikapov 0:704c89673b57 960 * Permission : RW
nikapov 0:704c89673b57 961 *******************************************************************************/
nikapov 0:704c89673b57 962 typedef enum {
nikapov 0:704c89673b57 963 LSM6DSL_ACC_GYRO_SW_RESET_NORMAL_MODE =0x00,
nikapov 0:704c89673b57 964 LSM6DSL_ACC_GYRO_SW_RESET_RESET_DEVICE =0x01,
nikapov 0:704c89673b57 965 } LSM6DSL_ACC_GYRO_SW_RESET_t;
nikapov 0:704c89673b57 966
nikapov 0:704c89673b57 967 #define LSM6DSL_ACC_GYRO_SW_RESET_MASK 0x01
nikapov 0:704c89673b57 968 mems_status_t LSM6DSL_ACC_GYRO_W_SW_RESET(void *handle, LSM6DSL_ACC_GYRO_SW_RESET_t newValue);
nikapov 0:704c89673b57 969 mems_status_t LSM6DSL_ACC_GYRO_R_SW_RESET(void *handle, LSM6DSL_ACC_GYRO_SW_RESET_t *value);
nikapov 0:704c89673b57 970
nikapov 0:704c89673b57 971
nikapov 0:704c89673b57 972 /*******************************************************************************
nikapov 0:704c89673b57 973 * Register : CTRL3_C
nikapov 0:704c89673b57 974 * Address : 0X12
nikapov 0:704c89673b57 975 * Bit Group Name: IF_INC
nikapov 0:704c89673b57 976 * Permission : RW
nikapov 0:704c89673b57 977 *******************************************************************************/
nikapov 0:704c89673b57 978 typedef enum {
nikapov 0:704c89673b57 979 LSM6DSL_ACC_GYRO_IF_INC_DISABLED =0x00,
nikapov 0:704c89673b57 980 LSM6DSL_ACC_GYRO_IF_INC_ENABLED =0x04,
nikapov 0:704c89673b57 981 } LSM6DSL_ACC_GYRO_IF_INC_t;
nikapov 0:704c89673b57 982
nikapov 0:704c89673b57 983 #define LSM6DSL_ACC_GYRO_IF_INC_MASK 0x04
nikapov 0:704c89673b57 984 mems_status_t LSM6DSL_ACC_GYRO_W_IF_Addr_Incr(void *handle, LSM6DSL_ACC_GYRO_IF_INC_t newValue);
nikapov 0:704c89673b57 985 mems_status_t LSM6DSL_ACC_GYRO_R_IF_Addr_Incr(void *handle, LSM6DSL_ACC_GYRO_IF_INC_t *value);
nikapov 0:704c89673b57 986
nikapov 0:704c89673b57 987 /*******************************************************************************
nikapov 0:704c89673b57 988 * Register : CTRL3_C
nikapov 0:704c89673b57 989 * Address : 0X12
nikapov 0:704c89673b57 990 * Bit Group Name: SIM
nikapov 0:704c89673b57 991 * Permission : RW
nikapov 0:704c89673b57 992 *******************************************************************************/
nikapov 0:704c89673b57 993 typedef enum {
nikapov 0:704c89673b57 994 LSM6DSL_ACC_GYRO_SIM_4_WIRE =0x00,
nikapov 0:704c89673b57 995 LSM6DSL_ACC_GYRO_SIM_3_WIRE =0x08,
nikapov 0:704c89673b57 996 } LSM6DSL_ACC_GYRO_SIM_t;
nikapov 0:704c89673b57 997
nikapov 0:704c89673b57 998 #define LSM6DSL_ACC_GYRO_SIM_MASK 0x08
nikapov 0:704c89673b57 999 mems_status_t LSM6DSL_ACC_GYRO_W_SPI_Mode(void *handle, LSM6DSL_ACC_GYRO_SIM_t newValue);
nikapov 0:704c89673b57 1000 mems_status_t LSM6DSL_ACC_GYRO_R_SPI_Mode(void *handle, LSM6DSL_ACC_GYRO_SIM_t *value);
nikapov 0:704c89673b57 1001
nikapov 0:704c89673b57 1002 /*******************************************************************************
nikapov 0:704c89673b57 1003 * Register : CTRL3_C
nikapov 0:704c89673b57 1004 * Address : 0X12
nikapov 0:704c89673b57 1005 * Bit Group Name: PP_OD
nikapov 0:704c89673b57 1006 * Permission : RW
nikapov 0:704c89673b57 1007 *******************************************************************************/
nikapov 0:704c89673b57 1008 typedef enum {
nikapov 0:704c89673b57 1009 LSM6DSL_ACC_GYRO_PP_OD_PUSH_PULL =0x00,
nikapov 0:704c89673b57 1010 LSM6DSL_ACC_GYRO_PP_OD_OPEN_DRAIN =0x10,
nikapov 0:704c89673b57 1011 } LSM6DSL_ACC_GYRO_PP_OD_t;
nikapov 0:704c89673b57 1012
nikapov 0:704c89673b57 1013 #define LSM6DSL_ACC_GYRO_PP_OD_MASK 0x10
nikapov 0:704c89673b57 1014 mems_status_t LSM6DSL_ACC_GYRO_W_PadSel(void *handle, LSM6DSL_ACC_GYRO_PP_OD_t newValue);
nikapov 0:704c89673b57 1015 mems_status_t LSM6DSL_ACC_GYRO_R_PadSel(void *handle, LSM6DSL_ACC_GYRO_PP_OD_t *value);
nikapov 0:704c89673b57 1016
nikapov 0:704c89673b57 1017 /*******************************************************************************
nikapov 0:704c89673b57 1018 * Register : CTRL3_C
nikapov 0:704c89673b57 1019 * Address : 0X12
nikapov 0:704c89673b57 1020 * Bit Group Name: H_LACTIVE
nikapov 0:704c89673b57 1021 * Permission : RW
nikapov 0:704c89673b57 1022 *******************************************************************************/
nikapov 0:704c89673b57 1023 typedef enum {
nikapov 0:704c89673b57 1024 LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_ACTIVE_HI =0x00,
nikapov 0:704c89673b57 1025 LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_ACTIVE_LO =0x20,
nikapov 0:704c89673b57 1026 } LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_t;
nikapov 0:704c89673b57 1027
nikapov 0:704c89673b57 1028 #define LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_MASK 0x20
nikapov 0:704c89673b57 1029 mems_status_t LSM6DSL_ACC_GYRO_W_INT_ACT_LEVEL(void *handle, LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_t newValue);
nikapov 0:704c89673b57 1030 mems_status_t LSM6DSL_ACC_GYRO_R_INT_ACT_LEVEL(void *handle, LSM6DSL_ACC_GYRO_INT_ACT_LEVEL_t *value);
nikapov 0:704c89673b57 1031
nikapov 0:704c89673b57 1032
nikapov 0:704c89673b57 1033 /*******************************************************************************
nikapov 0:704c89673b57 1034 * Register : CTRL3_C
nikapov 0:704c89673b57 1035 * Address : 0X12
nikapov 0:704c89673b57 1036 * Bit Group Name: BOOT
nikapov 0:704c89673b57 1037 * Permission : RW
nikapov 0:704c89673b57 1038 *******************************************************************************/
nikapov 0:704c89673b57 1039 typedef enum {
nikapov 0:704c89673b57 1040 LSM6DSL_ACC_GYRO_BOOT_NORMAL_MODE =0x00,
nikapov 0:704c89673b57 1041 LSM6DSL_ACC_GYRO_BOOT_REBOOT_MODE =0x80,
nikapov 0:704c89673b57 1042 } LSM6DSL_ACC_GYRO_BOOT_t;
nikapov 0:704c89673b57 1043
nikapov 0:704c89673b57 1044 #define LSM6DSL_ACC_GYRO_BOOT_MASK 0x80
nikapov 0:704c89673b57 1045 mems_status_t LSM6DSL_ACC_GYRO_W_BOOT(void *handle, LSM6DSL_ACC_GYRO_BOOT_t newValue);
nikapov 0:704c89673b57 1046 mems_status_t LSM6DSL_ACC_GYRO_R_BOOT(void *handle, LSM6DSL_ACC_GYRO_BOOT_t *value);
nikapov 0:704c89673b57 1047
nikapov 0:704c89673b57 1048 /*******************************************************************************
nikapov 0:704c89673b57 1049 * Register : CTRL4_C
nikapov 0:704c89673b57 1050 * Address : 0X13
nikapov 0:704c89673b57 1051 * Bit Group Name: LPF1_SEL_G
nikapov 0:704c89673b57 1052 * Permission : RW
nikapov 0:704c89673b57 1053 *******************************************************************************/
nikapov 0:704c89673b57 1054 typedef enum {
nikapov 0:704c89673b57 1055 LSM6DSL_ACC_GYRO_MODE3_LPF1_G_DISABLED =0x00,
nikapov 0:704c89673b57 1056 LSM6DSL_ACC_GYRO_MODE3_LPF1_G_ENABLED =0x02,
nikapov 0:704c89673b57 1057 } LSM6DSL_ACC_GYRO_LPF1_SEL_G_t;
nikapov 0:704c89673b57 1058
nikapov 0:704c89673b57 1059 #define LSM6DSL_ACC_GYRO_LPF1_SEL_G_MASK 0x02
nikapov 0:704c89673b57 1060 mems_status_t LSM6DSL_ACC_GYRO_W_LPF1_SEL_G(void *handle, LSM6DSL_ACC_GYRO_LPF1_SEL_G_t newValue);
nikapov 0:704c89673b57 1061 mems_status_t LSM6DSL_ACC_GYRO_R_LPF1_SEL_G(void *handle, LSM6DSL_ACC_GYRO_LPF1_SEL_G_t *value);
nikapov 0:704c89673b57 1062
nikapov 0:704c89673b57 1063 /*******************************************************************************
nikapov 0:704c89673b57 1064 * Register : CTRL4_C
nikapov 0:704c89673b57 1065 * Address : 0X13
nikapov 0:704c89673b57 1066 * Bit Group Name: I2C_DISABLE
nikapov 0:704c89673b57 1067 * Permission : RW
nikapov 0:704c89673b57 1068 *******************************************************************************/
nikapov 0:704c89673b57 1069 typedef enum {
nikapov 0:704c89673b57 1070 LSM6DSL_ACC_GYRO_I2C_DISABLE_I2C_AND_SPI =0x00,
nikapov 0:704c89673b57 1071 LSM6DSL_ACC_GYRO_I2C_DISABLE_SPI_ONLY =0x04,
nikapov 0:704c89673b57 1072 } LSM6DSL_ACC_GYRO_I2C_DISABLE_t;
nikapov 0:704c89673b57 1073
nikapov 0:704c89673b57 1074 #define LSM6DSL_ACC_GYRO_I2C_DISABLE_MASK 0x04
nikapov 0:704c89673b57 1075 mems_status_t LSM6DSL_ACC_GYRO_W_I2C_DISABLE(void *handle, LSM6DSL_ACC_GYRO_I2C_DISABLE_t newValue);
nikapov 0:704c89673b57 1076 mems_status_t LSM6DSL_ACC_GYRO_R_I2C_DISABLE(void *handle, LSM6DSL_ACC_GYRO_I2C_DISABLE_t *value);
nikapov 0:704c89673b57 1077
nikapov 0:704c89673b57 1078 /*******************************************************************************
nikapov 0:704c89673b57 1079 * Register : CTRL4_C
nikapov 0:704c89673b57 1080 * Address : 0X13
nikapov 0:704c89673b57 1081 * Bit Group Name: DRDY_MSK
nikapov 0:704c89673b57 1082 * Permission : RW
nikapov 0:704c89673b57 1083 *******************************************************************************/
nikapov 0:704c89673b57 1084 typedef enum {
nikapov 0:704c89673b57 1085 LSM6DSL_ACC_GYRO_DRDY_MSK_DISABLED =0x00,
nikapov 0:704c89673b57 1086 LSM6DSL_ACC_GYRO_DRDY_MSK_ENABLED =0x08,
nikapov 0:704c89673b57 1087 } LSM6DSL_ACC_GYRO_DRDY_MSK_t;
nikapov 0:704c89673b57 1088
nikapov 0:704c89673b57 1089 #define LSM6DSL_ACC_GYRO_DRDY_MSK_MASK 0x08
nikapov 0:704c89673b57 1090 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_MSK(void *handle, LSM6DSL_ACC_GYRO_DRDY_MSK_t newValue);
nikapov 0:704c89673b57 1091 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_MSK(void *handle, LSM6DSL_ACC_GYRO_DRDY_MSK_t *value);
nikapov 0:704c89673b57 1092
nikapov 0:704c89673b57 1093 /*******************************************************************************
nikapov 0:704c89673b57 1094 * Register : CTRL4_C
nikapov 0:704c89673b57 1095 * Address : 0X13
nikapov 0:704c89673b57 1096 * Bit Group Name: INT2_ON_INT1
nikapov 0:704c89673b57 1097 * Permission : RW
nikapov 0:704c89673b57 1098 *******************************************************************************/
nikapov 0:704c89673b57 1099 typedef enum {
nikapov 0:704c89673b57 1100 LSM6DSL_ACC_GYRO_INT2_ON_INT1_DISABLED =0x00,
nikapov 0:704c89673b57 1101 LSM6DSL_ACC_GYRO_INT2_ON_INT1_ENABLED =0x20,
nikapov 0:704c89673b57 1102 } LSM6DSL_ACC_GYRO_INT2_ON_INT1_t;
nikapov 0:704c89673b57 1103
nikapov 0:704c89673b57 1104 #define LSM6DSL_ACC_GYRO_INT2_ON_INT1_MASK 0x20
nikapov 0:704c89673b57 1105 mems_status_t LSM6DSL_ACC_GYRO_W_INT2_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_INT2_ON_INT1_t newValue);
nikapov 0:704c89673b57 1106 mems_status_t LSM6DSL_ACC_GYRO_R_INT2_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_INT2_ON_INT1_t *value);
nikapov 0:704c89673b57 1107
nikapov 0:704c89673b57 1108 /*******************************************************************************
nikapov 0:704c89673b57 1109 * Register : CTRL4_C
nikapov 0:704c89673b57 1110 * Address : 0X13
nikapov 0:704c89673b57 1111 * Bit Group Name: SLEEP_G
nikapov 0:704c89673b57 1112 * Permission : RW
nikapov 0:704c89673b57 1113 *******************************************************************************/
nikapov 0:704c89673b57 1114 typedef enum {
nikapov 0:704c89673b57 1115 LSM6DSL_ACC_GYRO_SLEEP_G_DISABLED =0x00,
nikapov 0:704c89673b57 1116 LSM6DSL_ACC_GYRO_SLEEP_G_ENABLED =0x40,
nikapov 0:704c89673b57 1117 } LSM6DSL_ACC_GYRO_SLEEP_G_t;
nikapov 0:704c89673b57 1118
nikapov 0:704c89673b57 1119 #define LSM6DSL_ACC_GYRO_SLEEP_G_MASK 0x40
nikapov 0:704c89673b57 1120 mems_status_t LSM6DSL_ACC_GYRO_W_SleepMode_G(void *handle, LSM6DSL_ACC_GYRO_SLEEP_G_t newValue);
nikapov 0:704c89673b57 1121 mems_status_t LSM6DSL_ACC_GYRO_R_SleepMode_G(void *handle, LSM6DSL_ACC_GYRO_SLEEP_G_t *value);
nikapov 0:704c89673b57 1122
nikapov 0:704c89673b57 1123 /*******************************************************************************
nikapov 0:704c89673b57 1124 * Register : CTRL5_C
nikapov 0:704c89673b57 1125 * Address : 0X14
nikapov 0:704c89673b57 1126 * Bit Group Name: ST_XL
nikapov 0:704c89673b57 1127 * Permission : RW
nikapov 0:704c89673b57 1128 *******************************************************************************/
nikapov 0:704c89673b57 1129 typedef enum {
nikapov 0:704c89673b57 1130 LSM6DSL_ACC_GYRO_ST_XL_NORMAL_MODE =0x00,
nikapov 0:704c89673b57 1131 LSM6DSL_ACC_GYRO_ST_XL_POS_SIGN_TEST =0x01,
nikapov 0:704c89673b57 1132 LSM6DSL_ACC_GYRO_ST_XL_NEG_SIGN_TEST =0x02,
nikapov 0:704c89673b57 1133 LSM6DSL_ACC_GYRO_ST_XL_NA =0x03,
nikapov 0:704c89673b57 1134 } LSM6DSL_ACC_GYRO_ST_XL_t;
nikapov 0:704c89673b57 1135
nikapov 0:704c89673b57 1136 #define LSM6DSL_ACC_GYRO_ST_XL_MASK 0x03
nikapov 0:704c89673b57 1137 mems_status_t LSM6DSL_ACC_GYRO_W_SelfTest_XL(void *handle, LSM6DSL_ACC_GYRO_ST_XL_t newValue);
nikapov 0:704c89673b57 1138 mems_status_t LSM6DSL_ACC_GYRO_R_SelfTest_XL(void *handle, LSM6DSL_ACC_GYRO_ST_XL_t *value);
nikapov 0:704c89673b57 1139
nikapov 0:704c89673b57 1140 /*******************************************************************************
nikapov 0:704c89673b57 1141 * Register : CTRL5_C
nikapov 0:704c89673b57 1142 * Address : 0X14
nikapov 0:704c89673b57 1143 * Bit Group Name: ST_G
nikapov 0:704c89673b57 1144 * Permission : RW
nikapov 0:704c89673b57 1145 *******************************************************************************/
nikapov 0:704c89673b57 1146 typedef enum {
nikapov 0:704c89673b57 1147 LSM6DSL_ACC_GYRO_ST_G_NORMAL_MODE =0x00,
nikapov 0:704c89673b57 1148 LSM6DSL_ACC_GYRO_ST_G_POS_SIGN_TEST =0x04,
nikapov 0:704c89673b57 1149 LSM6DSL_ACC_GYRO_ST_G_NA =0x08,
nikapov 0:704c89673b57 1150 LSM6DSL_ACC_GYRO_ST_G_NEG_SIGN_TEST =0x0C,
nikapov 0:704c89673b57 1151 } LSM6DSL_ACC_GYRO_ST_G_t;
nikapov 0:704c89673b57 1152
nikapov 0:704c89673b57 1153 #define LSM6DSL_ACC_GYRO_ST_G_MASK 0x0C
nikapov 0:704c89673b57 1154 mems_status_t LSM6DSL_ACC_GYRO_W_SelfTest_G(void *handle, LSM6DSL_ACC_GYRO_ST_G_t newValue);
nikapov 0:704c89673b57 1155 mems_status_t LSM6DSL_ACC_GYRO_R_SelfTest_G(void *handle, LSM6DSL_ACC_GYRO_ST_G_t *value);
nikapov 0:704c89673b57 1156
nikapov 0:704c89673b57 1157 /*******************************************************************************
nikapov 0:704c89673b57 1158 * Register : CTRL5_C
nikapov 0:704c89673b57 1159 * Address : 0X14
nikapov 0:704c89673b57 1160 * Bit Group Name: DEN_LH
nikapov 0:704c89673b57 1161 * Permission : RW
nikapov 0:704c89673b57 1162 *******************************************************************************/
nikapov 0:704c89673b57 1163 typedef enum {
nikapov 0:704c89673b57 1164 LSM6DSL_ACC_GYRO_DEN_LOW =0x00,
nikapov 0:704c89673b57 1165 LSM6DSL_ACC_GYRO_DEN_HIGH =0x10,
nikapov 0:704c89673b57 1166 } LSM6DSL_ACC_GYRO_DEN_LH_t;
nikapov 0:704c89673b57 1167
nikapov 0:704c89673b57 1168 #define LSM6DSL_ACC_GYRO_DEN_LH_MASK 0x10
nikapov 0:704c89673b57 1169 mems_status_t LSM6DSL_ACC_GYRO_W_DEN_Polarity(void *handle, LSM6DSL_ACC_GYRO_DEN_LH_t newValue);
nikapov 0:704c89673b57 1170 mems_status_t LSM6DSL_ACC_GYRO_R_DEN_Polarity(void *handle, LSM6DSL_ACC_GYRO_DEN_LH_t *value);
nikapov 0:704c89673b57 1171
nikapov 0:704c89673b57 1172 /*******************************************************************************
nikapov 0:704c89673b57 1173 * Register : CTRL5_C
nikapov 0:704c89673b57 1174 * Address : 0X14
nikapov 0:704c89673b57 1175 * Bit Group Name: ST_ROUNDING
nikapov 0:704c89673b57 1176 * Permission : RW
nikapov 0:704c89673b57 1177 *******************************************************************************/
nikapov 0:704c89673b57 1178 typedef enum {
nikapov 0:704c89673b57 1179 LSM6DSL_ACC_GYRO_NO_ROUNDING =0x00,
nikapov 0:704c89673b57 1180 LSM6DSL_ACC_GYRO_ACC_ONLY =0x20,
nikapov 0:704c89673b57 1181 LSM6DSL_ACC_GYRO_GYRO_ONLY =0x40,
nikapov 0:704c89673b57 1182 LSM6DSL_ACC_GYRO_ACC_GYRO =0x60,
nikapov 0:704c89673b57 1183 LSM6DSL_ACC_GYRO_SH1_SH6 =0x80,
nikapov 0:704c89673b57 1184 LSM6DSL_ACC_GYRO_ACC_SH1_SH6 =0xA0,
nikapov 0:704c89673b57 1185 LSM6DSL_ACC_GYRO_ACC_GYRO_SH1_SH6_SH7_SH12 =0xC0,
nikapov 0:704c89673b57 1186 LSM6DSL_ACC_GYRO_ACC_GYRO_SH1_SH6 =0xE0,
nikapov 0:704c89673b57 1187 } LSM6DSL_ACC_GYRO_ROUNDING_t;
nikapov 0:704c89673b57 1188
nikapov 0:704c89673b57 1189 #define LSM6DSL_ACC_GYRO_LSM6DSL_ACC_GYRO_ROUNDING_t_MASK 0xE0
nikapov 0:704c89673b57 1190 mems_status_t LSM6DSL_ACC_GYRO_W_CircularBurstMode(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_t newValue);
nikapov 0:704c89673b57 1191 mems_status_t LSM6DSL_ACC_GYRO_R_CircularBurstMode(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_t *value);
nikapov 0:704c89673b57 1192
nikapov 0:704c89673b57 1193 /*******************************************************************************
nikapov 0:704c89673b57 1194 * Register : CTRL6_G
nikapov 0:704c89673b57 1195 * Address : 0X15
nikapov 0:704c89673b57 1196 * Bit Group Name: FTYPE
nikapov 0:704c89673b57 1197 * Permission : RW
nikapov 0:704c89673b57 1198 *******************************************************************************/
nikapov 0:704c89673b57 1199 typedef enum {
nikapov 0:704c89673b57 1200 LSM6DSL_ACC_GYRO_LP_G_NORMAL =0x00,
nikapov 0:704c89673b57 1201 LSM6DSL_ACC_GYRO_LP_G_NARROW =0x01,
nikapov 0:704c89673b57 1202 LSM6DSL_ACC_GYRO_LP_G_VERY_NARROW =0x02,
nikapov 0:704c89673b57 1203 LSM6DSL_ACC_GYRO_LP_G_WIDE =0x03,
nikapov 0:704c89673b57 1204 } LSM6DSL_ACC_GYRO_FTYPE_t;
nikapov 0:704c89673b57 1205
nikapov 0:704c89673b57 1206 #define LSM6DSL_ACC_GYRO_FTYPE_MASK 0x03
nikapov 0:704c89673b57 1207 mems_status_t LSM6DSL_ACC_GYRO_W_LP_BW_G(void *handle, LSM6DSL_ACC_GYRO_FTYPE_t newValue);
nikapov 0:704c89673b57 1208 mems_status_t LSM6DSL_ACC_GYRO_R_LP_BW_G(void *handle, LSM6DSL_ACC_GYRO_FTYPE_t *value);
nikapov 0:704c89673b57 1209
nikapov 0:704c89673b57 1210 /*******************************************************************************
nikapov 0:704c89673b57 1211 * Register : CTRL6_G
nikapov 0:704c89673b57 1212 * Address : 0X15
nikapov 0:704c89673b57 1213 * Bit Group Name: USR_OFF_W
nikapov 0:704c89673b57 1214 * Permission : RW
nikapov 0:704c89673b57 1215 *******************************************************************************/
nikapov 0:704c89673b57 1216 typedef enum {
nikapov 0:704c89673b57 1217 LSM6DSL_ACC_GYRO_2Emin10 =0x00,
nikapov 0:704c89673b57 1218 LSM6DSL_ACC_GYRO_2Emin6 =0x08,
nikapov 0:704c89673b57 1219 } LSM6DSL_ACC_GYRO_USR_OFF_W_t;
nikapov 0:704c89673b57 1220
nikapov 0:704c89673b57 1221 #define LSM6DSL_ACC_GYRO_USR_OFF_W_MASK 0x08
nikapov 0:704c89673b57 1222 mems_status_t LSM6DSL_ACC_GYRO_W_UserOffsetWeight(void *handle, LSM6DSL_ACC_GYRO_USR_OFF_W_t newValue);
nikapov 0:704c89673b57 1223 mems_status_t LSM6DSL_ACC_GYRO_R_UserOffsetWeight(void *handle, LSM6DSL_ACC_GYRO_USR_OFF_W_t *value);
nikapov 0:704c89673b57 1224
nikapov 0:704c89673b57 1225
nikapov 0:704c89673b57 1226 /*******************************************************************************
nikapov 0:704c89673b57 1227 * Register : CTRL6_G
nikapov 0:704c89673b57 1228 * Address : 0X15
nikapov 0:704c89673b57 1229 * Bit Group Name: LP_XL
nikapov 0:704c89673b57 1230 * Permission : RW
nikapov 0:704c89673b57 1231 *******************************************************************************/
nikapov 0:704c89673b57 1232 typedef enum {
nikapov 0:704c89673b57 1233 LSM6DSL_ACC_GYRO_LP_XL_DISABLED =0x00,
nikapov 0:704c89673b57 1234 LSM6DSL_ACC_GYRO_LP_XL_ENABLED =0x10,
nikapov 0:704c89673b57 1235 } LSM6DSL_ACC_GYRO_LP_XL_t;
nikapov 0:704c89673b57 1236
nikapov 0:704c89673b57 1237 #define LSM6DSL_ACC_GYRO_LP_XL_MASK 0x10
nikapov 0:704c89673b57 1238 mems_status_t LSM6DSL_ACC_GYRO_W_LowPower_XL(void *handle, LSM6DSL_ACC_GYRO_LP_XL_t newValue);
nikapov 0:704c89673b57 1239 mems_status_t LSM6DSL_ACC_GYRO_R_LowPower_XL(void *handle, LSM6DSL_ACC_GYRO_LP_XL_t *value);
nikapov 0:704c89673b57 1240
nikapov 0:704c89673b57 1241 /*******************************************************************************
nikapov 0:704c89673b57 1242 * Register : CTRL6_G
nikapov 0:704c89673b57 1243 * Address : 0X15
nikapov 0:704c89673b57 1244 * Bit Group Name: DEN_LVL2_EN
nikapov 0:704c89673b57 1245 * Permission : RW
nikapov 0:704c89673b57 1246 *******************************************************************************/
nikapov 0:704c89673b57 1247 typedef enum {
nikapov 0:704c89673b57 1248 LSM6DSL_ACC_GYRO_DEN_LVL2_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1249 LSM6DSL_ACC_GYRO_DEN_LVL2_EN_ENABLED =0x20,
nikapov 0:704c89673b57 1250 } LSM6DSL_ACC_GYRO_DEN_LVL2_EN_t;
nikapov 0:704c89673b57 1251
nikapov 0:704c89673b57 1252 #define LSM6DSL_ACC_GYRO_DEN_LVL2_EN_MASK 0x20
nikapov 0:704c89673b57 1253 mems_status_t LSM6DSL_ACC_GYRO_W_DEN_LVL2_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL2_EN_t newValue);
nikapov 0:704c89673b57 1254 mems_status_t LSM6DSL_ACC_GYRO_R_DEN_LVL2_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL2_EN_t *value);
nikapov 0:704c89673b57 1255
nikapov 0:704c89673b57 1256 /*******************************************************************************
nikapov 0:704c89673b57 1257 * Register : CTRL6_G
nikapov 0:704c89673b57 1258 * Address : 0X15
nikapov 0:704c89673b57 1259 * Bit Group Name: DEN_LVL_EN
nikapov 0:704c89673b57 1260 * Permission : RW
nikapov 0:704c89673b57 1261 *******************************************************************************/
nikapov 0:704c89673b57 1262 typedef enum {
nikapov 0:704c89673b57 1263 LSM6DSL_ACC_GYRO_DEN_LVL_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1264 LSM6DSL_ACC_GYRO_DEN_LVL_EN_ENABLED =0x40,
nikapov 0:704c89673b57 1265 } LSM6DSL_ACC_GYRO_DEN_LVL_EN_t;
nikapov 0:704c89673b57 1266
nikapov 0:704c89673b57 1267 #define LSM6DSL_ACC_GYRO_DEN_LVL_EN_MASK 0x40
nikapov 0:704c89673b57 1268 mems_status_t LSM6DSL_ACC_GYRO_W_DEN_LVL_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL_EN_t newValue);
nikapov 0:704c89673b57 1269 mems_status_t LSM6DSL_ACC_GYRO_R_DEN_LVL_EN(void *handle, LSM6DSL_ACC_GYRO_DEN_LVL_EN_t *value);
nikapov 0:704c89673b57 1270
nikapov 0:704c89673b57 1271 /*******************************************************************************
nikapov 0:704c89673b57 1272 * Register : CTRL6_G
nikapov 0:704c89673b57 1273 * Address : 0X15
nikapov 0:704c89673b57 1274 * Bit Group Name: TRIG_EN
nikapov 0:704c89673b57 1275 * Permission : RW
nikapov 0:704c89673b57 1276 *******************************************************************************/
nikapov 0:704c89673b57 1277 typedef enum {
nikapov 0:704c89673b57 1278 LSM6DSL_ACC_GYRO_DEN_EDGE_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1279 LSM6DSL_ACC_GYRO_DEN_EDGE_EN_ENABLED =0x80,
nikapov 0:704c89673b57 1280 } LSM6DSL_ACC_GYRO_DEN_EDGE_EN_t;
nikapov 0:704c89673b57 1281
nikapov 0:704c89673b57 1282 #define LSM6DSL_ACC_GYRO_DEN_EDGE_EN_MASK 0x80
nikapov 0:704c89673b57 1283 mems_status_t LSM6DSL_ACC_GYRO_W_ExternalTrigger(void *handle, LSM6DSL_ACC_GYRO_DEN_EDGE_EN_t newValue);
nikapov 0:704c89673b57 1284 mems_status_t LSM6DSL_ACC_GYRO_R_ExternalTrigger(void *handle, LSM6DSL_ACC_GYRO_DEN_EDGE_EN_t *value);
nikapov 0:704c89673b57 1285
nikapov 0:704c89673b57 1286 /*******************************************************************************
nikapov 0:704c89673b57 1287 * Register : CTRL7_G
nikapov 0:704c89673b57 1288 * Address : 0X16
nikapov 0:704c89673b57 1289 * Bit Group Name: ROUNDING_STATUS
nikapov 0:704c89673b57 1290 * Permission : RW
nikapov 0:704c89673b57 1291 *******************************************************************************/
nikapov 0:704c89673b57 1292 typedef enum {
nikapov 0:704c89673b57 1293 LSM6DSL_ACC_GYRO_RND_DISABLE =0x00,
nikapov 0:704c89673b57 1294 LSM6DSL_ACC_GYRO_RND_ENABLE =0x04,
nikapov 0:704c89673b57 1295 } LSM6DSL_ACC_GYRO_RND_STATUS_t;
nikapov 0:704c89673b57 1296
nikapov 0:704c89673b57 1297 #define LSM6DSL_ACC_GYRO_RND_STATUS_MASK 0x04
nikapov 0:704c89673b57 1298 mems_status_t LSM6DSL_ACC_GYRO_W_RoundingOnStatusRegisters(void *handle, LSM6DSL_ACC_GYRO_RND_STATUS_t newValue);
nikapov 0:704c89673b57 1299 mems_status_t LSM6DSL_ACC_GYRO_R_RoundingOnStatusRegisters(void *handle, LSM6DSL_ACC_GYRO_RND_STATUS_t *value);
nikapov 0:704c89673b57 1300
nikapov 0:704c89673b57 1301
nikapov 0:704c89673b57 1302 /*******************************************************************************
nikapov 0:704c89673b57 1303 * Register : CTRL7_G
nikapov 0:704c89673b57 1304 * Address : 0X16
nikapov 0:704c89673b57 1305 * Bit Group Name: HPM_G
nikapov 0:704c89673b57 1306 * Permission : RW
nikapov 0:704c89673b57 1307 *******************************************************************************/
nikapov 0:704c89673b57 1308 typedef enum {
nikapov 0:704c89673b57 1309 LSM6DSL_ACC_GYRO_HPM_G_0Hz016 =0x00,
nikapov 0:704c89673b57 1310 LSM6DSL_ACC_GYRO_HPM_G_0Hz065 =0x10,
nikapov 0:704c89673b57 1311 LSM6DSL_ACC_GYRO_HPM_G_2Hz260 =0x20,
nikapov 0:704c89673b57 1312 LSM6DSL_ACC_GYRO_HPM_G_1Hz04 =0x30,
nikapov 0:704c89673b57 1313 } LSM6DSL_ACC_GYRO_HPM_G_t;
nikapov 0:704c89673b57 1314
nikapov 0:704c89673b57 1315 #define LSM6DSL_ACC_GYRO_HPM_G_MASK 0x30
nikapov 0:704c89673b57 1316 mems_status_t LSM6DSL_ACC_GYRO_W_HPM_G(void *handle, LSM6DSL_ACC_GYRO_HPM_G_t newValue);
nikapov 0:704c89673b57 1317 mems_status_t LSM6DSL_ACC_GYRO_R_HPM_G(void *handle, LSM6DSL_ACC_GYRO_HPM_G_t *value);
nikapov 0:704c89673b57 1318
nikapov 0:704c89673b57 1319 /*******************************************************************************
nikapov 0:704c89673b57 1320 * Register : CTRL7_G
nikapov 0:704c89673b57 1321 * Address : 0X16
nikapov 0:704c89673b57 1322 * Bit Group Name: HP_EN_G
nikapov 0:704c89673b57 1323 * Permission : RW
nikapov 0:704c89673b57 1324 *******************************************************************************/
nikapov 0:704c89673b57 1325 typedef enum {
nikapov 0:704c89673b57 1326 LSM6DSL_ACC_GYRO_HP_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1327 LSM6DSL_ACC_GYRO_HP_EN_ENABLED =0x40,
nikapov 0:704c89673b57 1328 } LSM6DSL_ACC_GYRO_HP_EN_t;
nikapov 0:704c89673b57 1329
nikapov 0:704c89673b57 1330 #define LSM6DSL_ACC_GYRO_HP_EN_MASK 0x40
nikapov 0:704c89673b57 1331 mems_status_t LSM6DSL_ACC_GYRO_W_HPFilter_En(void *handle, LSM6DSL_ACC_GYRO_HP_EN_t newValue);
nikapov 0:704c89673b57 1332 mems_status_t LSM6DSL_ACC_GYRO_R_HPFilter_En(void *handle, LSM6DSL_ACC_GYRO_HP_EN_t *value);
nikapov 0:704c89673b57 1333
nikapov 0:704c89673b57 1334 /*******************************************************************************
nikapov 0:704c89673b57 1335 * Register : CTRL7_G
nikapov 0:704c89673b57 1336 * Address : 0X16
nikapov 0:704c89673b57 1337 * Bit Group Name: LP_EN
nikapov 0:704c89673b57 1338 * Permission : RW
nikapov 0:704c89673b57 1339 *******************************************************************************/
nikapov 0:704c89673b57 1340 typedef enum {
nikapov 0:704c89673b57 1341 LSM6DSL_ACC_GYRO_LP_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1342 LSM6DSL_ACC_GYRO_LP_EN_ENABLED =0x80,
nikapov 0:704c89673b57 1343 } LSM6DSL_ACC_GYRO_LP_EN_t;
nikapov 0:704c89673b57 1344
nikapov 0:704c89673b57 1345 #define LSM6DSL_ACC_GYRO_LP_EN_MASK 0x80
nikapov 0:704c89673b57 1346 mems_status_t LSM6DSL_ACC_GYRO_W_LP_Mode(void *handle, LSM6DSL_ACC_GYRO_LP_EN_t newValue);
nikapov 0:704c89673b57 1347 mems_status_t LSM6DSL_ACC_GYRO_R_LP_Mode(void *handle, LSM6DSL_ACC_GYRO_LP_EN_t *value);
nikapov 0:704c89673b57 1348
nikapov 0:704c89673b57 1349 /*******************************************************************************
nikapov 0:704c89673b57 1350 * Register : CTRL7_G
nikapov 0:704c89673b57 1351 * Address : 0X16
nikapov 0:704c89673b57 1352 * Bit Group Name: ROUNDING_STATUS
nikapov 0:704c89673b57 1353 * Permission : RW
nikapov 0:704c89673b57 1354 *******************************************************************************/
nikapov 0:704c89673b57 1355 typedef enum {
nikapov 0:704c89673b57 1356 LSM6DSL_ACC_GYRO_ROUNDING_STATUS_DISABLED =0x00,
nikapov 0:704c89673b57 1357 LSM6DSL_ACC_GYRO_ROUNDING_STATUS_ENABLED =0x04,
nikapov 0:704c89673b57 1358 } LSM6DSL_ACC_GYRO_ROUNDING_STATUS_t;
nikapov 0:704c89673b57 1359
nikapov 0:704c89673b57 1360 #define LSM6DSL_ACC_GYRO_ROUNDING_STATUS_MASK 0x04
nikapov 0:704c89673b57 1361 mems_status_t LSM6DSL_ACC_GYRO_W_ROUNDING_STATUS(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_STATUS_t newValue);
nikapov 0:704c89673b57 1362 mems_status_t LSM6DSL_ACC_GYRO_R_ROUNDING_STATUS(void *handle, LSM6DSL_ACC_GYRO_ROUNDING_STATUS_t *value);
nikapov 0:704c89673b57 1363
nikapov 0:704c89673b57 1364 /*******************************************************************************
nikapov 0:704c89673b57 1365 * Register : CTRL7_G
nikapov 0:704c89673b57 1366 * Address : 0X16
nikapov 0:704c89673b57 1367 * Bit Group Name: HP_G_RST
nikapov 0:704c89673b57 1368 * Permission : RW
nikapov 0:704c89673b57 1369 *******************************************************************************/
nikapov 0:704c89673b57 1370 typedef enum {
nikapov 0:704c89673b57 1371 LSM6DSL_ACC_GYRO_HP_G_RST_OFF =0x00,
nikapov 0:704c89673b57 1372 LSM6DSL_ACC_GYRO_HP_G_RST_ON =0x08,
nikapov 0:704c89673b57 1373 } LSM6DSL_ACC_GYRO_HP_G_RST_t;
nikapov 0:704c89673b57 1374
nikapov 0:704c89673b57 1375 #define LSM6DSL_ACC_GYRO_HP_G_RST_MASK 0x08
nikapov 0:704c89673b57 1376 mems_status_t LSM6DSL_ACC_GYRO_W_HP_G_RST(void *handle, LSM6DSL_ACC_GYRO_HP_G_RST_t newValue);
nikapov 0:704c89673b57 1377 mems_status_t LSM6DSL_ACC_GYRO_R_HP_G_RST(void *handle, LSM6DSL_ACC_GYRO_HP_G_RST_t *value);
nikapov 0:704c89673b57 1378
nikapov 0:704c89673b57 1379 /*******************************************************************************
nikapov 0:704c89673b57 1380 * Register : CTRL8_XL
nikapov 0:704c89673b57 1381 * Address : 0X17
nikapov 0:704c89673b57 1382 * Bit Group Name: LOW_PASS_ON_6D
nikapov 0:704c89673b57 1383 * Permission : RW
nikapov 0:704c89673b57 1384 *******************************************************************************/
nikapov 0:704c89673b57 1385 typedef enum {
nikapov 0:704c89673b57 1386 LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_OFF =0x00,
nikapov 0:704c89673b57 1387 LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_ON =0x01,
nikapov 0:704c89673b57 1388 } LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_t;
nikapov 0:704c89673b57 1389
nikapov 0:704c89673b57 1390 #define LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_MASK 0x01
nikapov 0:704c89673b57 1391 mems_status_t LSM6DSL_ACC_GYRO_W_LOW_PASS_ON_6D(void *handle, LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_t newValue);
nikapov 0:704c89673b57 1392 mems_status_t LSM6DSL_ACC_GYRO_R_LOW_PASS_ON_6D(void *handle, LSM6DSL_ACC_GYRO_LOW_PASS_ON_6D_t *value);
nikapov 0:704c89673b57 1393
nikapov 0:704c89673b57 1394 /*******************************************************************************
nikapov 0:704c89673b57 1395 * Register : CTRL8_XL
nikapov 0:704c89673b57 1396 * Address : 0X17
nikapov 0:704c89673b57 1397 * Bit Group Name: HP_SLOPE_XL_EN
nikapov 0:704c89673b57 1398 * Permission : RW
nikapov 0:704c89673b57 1399 *******************************************************************************/
nikapov 0:704c89673b57 1400 typedef enum {
nikapov 0:704c89673b57 1401 LSM6DSL_ACC_GYRO_HP_SLOPE_XL_EN =0x00,
nikapov 0:704c89673b57 1402 LSM6DSL_ACC_GYRO_HP_SLOPE_XL_DIS =0x04,
nikapov 0:704c89673b57 1403 } LSM6DSL_ACC_GYRO_HP_SLOPE_XL_t;
nikapov 0:704c89673b57 1404
nikapov 0:704c89673b57 1405 #define LSM6DSL_ACC_GYRO_HP_SLOPE_XL_MASK 0x04
nikapov 0:704c89673b57 1406 mems_status_t LSM6DSL_ACC_GYRO_W_HP_SLOPE_XL(void *handle, LSM6DSL_ACC_GYRO_HP_SLOPE_XL_t newValue);
nikapov 0:704c89673b57 1407 mems_status_t LSM6DSL_ACC_GYRO_R_HP_SLOPE_XL(void *handle, LSM6DSL_ACC_GYRO_HP_SLOPE_XL_t *value);
nikapov 0:704c89673b57 1408
nikapov 0:704c89673b57 1409 /*******************************************************************************
nikapov 0:704c89673b57 1410 * Register : CTRL8_XL
nikapov 0:704c89673b57 1411 * Address : 0X17
nikapov 0:704c89673b57 1412 * Bit Group Name: INPUT_COMPOSITE
nikapov 0:704c89673b57 1413 * Permission : RW
nikapov 0:704c89673b57 1414 *******************************************************************************/
nikapov 0:704c89673b57 1415 typedef enum {
nikapov 0:704c89673b57 1416 LSM6DSL_ACC_GYRO_IN_ODR_DIV_2 =0x00,
nikapov 0:704c89673b57 1417 LSM6DSL_ACC_GYRO_IN_ODR_DIV_4 =0x80,
nikapov 0:704c89673b57 1418 } LSM6DSL_ACC_GYRO_IN_COMP_t;
nikapov 0:704c89673b57 1419
nikapov 0:704c89673b57 1420 #define LSM6DSL_ACC_GYRO_IN_COMP_MASK 0x80
nikapov 0:704c89673b57 1421 mems_status_t LSM6DSL_ACC_GYRO_W_InComposit(void *handle, LSM6DSL_ACC_GYRO_IN_COMP_t newValue);
nikapov 0:704c89673b57 1422 mems_status_t LSM6DSL_ACC_GYRO_R_InComposit(void *handle, LSM6DSL_ACC_GYRO_IN_COMP_t *value);
nikapov 0:704c89673b57 1423
nikapov 0:704c89673b57 1424 /*******************************************************************************
nikapov 0:704c89673b57 1425 * Register : CTRL8_XL
nikapov 0:704c89673b57 1426 * Address : 0X17
nikapov 0:704c89673b57 1427 * Bit Group Name: HP_REF_MODE
nikapov 0:704c89673b57 1428 * Permission : RW
nikapov 0:704c89673b57 1429 *******************************************************************************/
nikapov 0:704c89673b57 1430 typedef enum {
nikapov 0:704c89673b57 1431 LSM6DSL_ACC_GYRO_HP_REF_DISABLE =0x00,
nikapov 0:704c89673b57 1432 LSM6DSL_ACC_GYRO_HP_REF_ENABLE =0x10,
nikapov 0:704c89673b57 1433 } LSM6DSL_ACC_GYRO_HP_REF_MODE_t;
nikapov 0:704c89673b57 1434
nikapov 0:704c89673b57 1435 #define LSM6DSL_ACC_GYRO_HP_REF_MODE_MASK 0x10
nikapov 0:704c89673b57 1436 mems_status_t LSM6DSL_ACC_GYRO_W_HPfilterReference(void *handle, LSM6DSL_ACC_GYRO_HP_REF_MODE_t newValue);
nikapov 0:704c89673b57 1437 mems_status_t LSM6DSL_ACC_GYRO_R_HPfilterReference(void *handle, LSM6DSL_ACC_GYRO_HP_REF_MODE_t *value);
nikapov 0:704c89673b57 1438
nikapov 0:704c89673b57 1439 /*******************************************************************************
nikapov 0:704c89673b57 1440 * Register : CTRL8_XL
nikapov 0:704c89673b57 1441 * Address : 0X17
nikapov 0:704c89673b57 1442 * Bit Group Name: HPCF_XL
nikapov 0:704c89673b57 1443 * Permission : RW
nikapov 0:704c89673b57 1444 *******************************************************************************/
nikapov 0:704c89673b57 1445 typedef enum {
nikapov 0:704c89673b57 1446 LSM6DSL_ACC_GYRO_HPCF_XL_DIV4 =0x00,
nikapov 0:704c89673b57 1447 LSM6DSL_ACC_GYRO_HPCF_XL_DIV100 =0x20,
nikapov 0:704c89673b57 1448 LSM6DSL_ACC_GYRO_HPCF_XL_DIV9 =0x40,
nikapov 0:704c89673b57 1449 LSM6DSL_ACC_GYRO_HPCF_XL_DIV400 =0x60,
nikapov 0:704c89673b57 1450 } LSM6DSL_ACC_GYRO_HPCF_XL_t;
nikapov 0:704c89673b57 1451
nikapov 0:704c89673b57 1452 #define LSM6DSL_ACC_GYRO_HPCF_XL_MASK 0x60
nikapov 0:704c89673b57 1453 mems_status_t LSM6DSL_ACC_GYRO_W_HPCF_XL(void *handle, LSM6DSL_ACC_GYRO_HPCF_XL_t newValue);
nikapov 0:704c89673b57 1454 mems_status_t LSM6DSL_ACC_GYRO_R_HPCF_XL(void *handle, LSM6DSL_ACC_GYRO_HPCF_XL_t *value);
nikapov 0:704c89673b57 1455
nikapov 0:704c89673b57 1456 /*******************************************************************************
nikapov 0:704c89673b57 1457 * Register : CTRL8_XL
nikapov 0:704c89673b57 1458 * Address : 0X17
nikapov 0:704c89673b57 1459 * Bit Group Name: LPF2_XL_EN
nikapov 0:704c89673b57 1460 * Permission : RW
nikapov 0:704c89673b57 1461 *******************************************************************************/
nikapov 0:704c89673b57 1462 typedef enum {
nikapov 0:704c89673b57 1463 LSM6DSL_ACC_GYRO_LPF2_XL_DISABLE =0x00,
nikapov 0:704c89673b57 1464 LSM6DSL_ACC_GYRO_LPF2_XL_ENABLE =0x80,
nikapov 0:704c89673b57 1465 } LSM6DSL_ACC_GYRO_LPF2_XL_t;
nikapov 0:704c89673b57 1466
nikapov 0:704c89673b57 1467 #define LSM6DSL_ACC_GYRO_LPF2_XL_MASK 0x80
nikapov 0:704c89673b57 1468 mems_status_t LSM6DSL_ACC_GYRO_W_LowPassFiltSel_XL(void *handle, LSM6DSL_ACC_GYRO_LPF2_XL_t newValue);
nikapov 0:704c89673b57 1469 mems_status_t LSM6DSL_ACC_GYRO_R_LowPassFiltSel_XL(void *handle, LSM6DSL_ACC_GYRO_LPF2_XL_t *value);
nikapov 0:704c89673b57 1470
nikapov 0:704c89673b57 1471
nikapov 0:704c89673b57 1472 /*******************************************************************************
nikapov 0:704c89673b57 1473 * Register : CTRL9_XL
nikapov 0:704c89673b57 1474 * Address : 0X18
nikapov 0:704c89673b57 1475 * Bit Group Name: SOFT_EN
nikapov 0:704c89673b57 1476 * Permission : RW
nikapov 0:704c89673b57 1477 *******************************************************************************/
nikapov 0:704c89673b57 1478 typedef enum {
nikapov 0:704c89673b57 1479 LSM6DSL_ACC_GYRO_SOFT_DISABLED =0x00,
nikapov 0:704c89673b57 1480 LSM6DSL_ACC_GYRO_SOFT_ENABLE =0x04,
nikapov 0:704c89673b57 1481 } LSM6DSL_ACC_GYRO_SOFT_t;
nikapov 0:704c89673b57 1482
nikapov 0:704c89673b57 1483 #define LSM6DSL_ACC_GYRO_SOFT_MASK 0x04
nikapov 0:704c89673b57 1484 mems_status_t LSM6DSL_ACC_GYRO_W_SOFT(void *handle, LSM6DSL_ACC_GYRO_SOFT_t newValue);
nikapov 0:704c89673b57 1485 mems_status_t LSM6DSL_ACC_GYRO_R_SOFT(void *handle, LSM6DSL_ACC_GYRO_SOFT_t *value);
nikapov 0:704c89673b57 1486
nikapov 0:704c89673b57 1487 /*******************************************************************************
nikapov 0:704c89673b57 1488 * Register : CTRL10_C
nikapov 0:704c89673b57 1489 * Address : 0X19
nikapov 0:704c89673b57 1490 * Bit Group Name: SIGN_MOTION_EN
nikapov 0:704c89673b57 1491 * Permission : RW
nikapov 0:704c89673b57 1492 *******************************************************************************/
nikapov 0:704c89673b57 1493 typedef enum {
nikapov 0:704c89673b57 1494 LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1495 LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_ENABLED =0x01,
nikapov 0:704c89673b57 1496 } LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_t;
nikapov 0:704c89673b57 1497
nikapov 0:704c89673b57 1498 #define LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_MASK 0x01
nikapov 0:704c89673b57 1499 mems_status_t LSM6DSL_ACC_GYRO_W_SignifcantMotion(void *handle, LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_t newValue);
nikapov 0:704c89673b57 1500 mems_status_t LSM6DSL_ACC_GYRO_R_SignifcantMotion(void *handle, LSM6DSL_ACC_GYRO_SIGN_MOTION_EN_t *value);
nikapov 0:704c89673b57 1501
nikapov 0:704c89673b57 1502 /*******************************************************************************
nikapov 0:704c89673b57 1503 * Register : CTRL10_C
nikapov 0:704c89673b57 1504 * Address : 0X19
nikapov 0:704c89673b57 1505 * Bit Group Name: PEDO_RST_STEP
nikapov 0:704c89673b57 1506 * Permission : RW
nikapov 0:704c89673b57 1507 *******************************************************************************/
nikapov 0:704c89673b57 1508 typedef enum {
nikapov 0:704c89673b57 1509 LSM6DSL_ACC_GYRO_PEDO_RST_STEP_DISABLED =0x00,
nikapov 0:704c89673b57 1510 LSM6DSL_ACC_GYRO_PEDO_RST_STEP_ENABLED =0x02,
nikapov 0:704c89673b57 1511 } LSM6DSL_ACC_GYRO_PEDO_RST_STEP_t;
nikapov 0:704c89673b57 1512
nikapov 0:704c89673b57 1513 #define LSM6DSL_ACC_GYRO_PEDO_RST_STEP_MASK 0x02
nikapov 0:704c89673b57 1514 mems_status_t LSM6DSL_ACC_GYRO_W_PedoStepReset(void *handle, LSM6DSL_ACC_GYRO_PEDO_RST_STEP_t newValue);
nikapov 0:704c89673b57 1515 mems_status_t LSM6DSL_ACC_GYRO_R_PedoStepReset(void *handle, LSM6DSL_ACC_GYRO_PEDO_RST_STEP_t *value);
nikapov 0:704c89673b57 1516
nikapov 0:704c89673b57 1517 /*******************************************************************************
nikapov 0:704c89673b57 1518 * Register : CTRL10_C
nikapov 0:704c89673b57 1519 * Address : 0X19
nikapov 0:704c89673b57 1520 * Bit Group Name: FUNC_EN
nikapov 0:704c89673b57 1521 * Permission : RW
nikapov 0:704c89673b57 1522 *******************************************************************************/
nikapov 0:704c89673b57 1523 typedef enum {
nikapov 0:704c89673b57 1524 LSM6DSL_ACC_GYRO_FUNC_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1525 LSM6DSL_ACC_GYRO_FUNC_EN_ENABLED =0x04,
nikapov 0:704c89673b57 1526 } LSM6DSL_ACC_GYRO_FUNC_EN_t;
nikapov 0:704c89673b57 1527
nikapov 0:704c89673b57 1528 #define LSM6DSL_ACC_GYRO_FUNC_EN_MASK 0x04
nikapov 0:704c89673b57 1529 mems_status_t LSM6DSL_ACC_GYRO_W_FUNC_EN(void *handle, LSM6DSL_ACC_GYRO_FUNC_EN_t newValue);
nikapov 0:704c89673b57 1530 mems_status_t LSM6DSL_ACC_GYRO_R_FUNC_EN(void *handle, LSM6DSL_ACC_GYRO_FUNC_EN_t *value);
nikapov 0:704c89673b57 1531
nikapov 0:704c89673b57 1532 /*******************************************************************************
nikapov 0:704c89673b57 1533 * Register : CTRL10_C
nikapov 0:704c89673b57 1534 * Address : 0X19
nikapov 0:704c89673b57 1535 * Bit Group Name: TILT_EN
nikapov 0:704c89673b57 1536 * Permission : RW
nikapov 0:704c89673b57 1537 *******************************************************************************/
nikapov 0:704c89673b57 1538 typedef enum {
nikapov 0:704c89673b57 1539 LSM6DSL_ACC_GYRO_TILT_DISABLED =0x00,
nikapov 0:704c89673b57 1540 LSM6DSL_ACC_GYRO_TILT_ENABLED =0x08,
nikapov 0:704c89673b57 1541 } LSM6DSL_ACC_GYRO_TILT_G_t;
nikapov 0:704c89673b57 1542
nikapov 0:704c89673b57 1543 #define LSM6DSL_ACC_GYRO_TILT_MASK 0x08
nikapov 0:704c89673b57 1544 mems_status_t LSM6DSL_ACC_GYRO_W_TILT(void *handle, LSM6DSL_ACC_GYRO_TILT_G_t newValue);
nikapov 0:704c89673b57 1545 mems_status_t LSM6DSL_ACC_GYRO_R_TILT(void *handle, LSM6DSL_ACC_GYRO_TILT_G_t *value);
nikapov 0:704c89673b57 1546
nikapov 0:704c89673b57 1547 /*******************************************************************************
nikapov 0:704c89673b57 1548 * Register : CTRL10_C
nikapov 0:704c89673b57 1549 * Address : 0X19
nikapov 0:704c89673b57 1550 * Bit Group Name: PEDO_EN
nikapov 0:704c89673b57 1551 * Permission : RW
nikapov 0:704c89673b57 1552 *******************************************************************************/
nikapov 0:704c89673b57 1553 typedef enum {
nikapov 0:704c89673b57 1554 LSM6DSL_ACC_GYRO_PEDO_DISABLED =0x00,
nikapov 0:704c89673b57 1555 LSM6DSL_ACC_GYRO_PEDO_ENABLED =0x10,
nikapov 0:704c89673b57 1556 } LSM6DSL_ACC_GYRO_PEDO_t;
nikapov 0:704c89673b57 1557
nikapov 0:704c89673b57 1558 #define LSM6DSL_ACC_GYRO_PEDO_MASK 0x10
nikapov 0:704c89673b57 1559 mems_status_t LSM6DSL_ACC_GYRO_W_PEDO(void *handle, LSM6DSL_ACC_GYRO_PEDO_t newValue);
nikapov 0:704c89673b57 1560 mems_status_t LSM6DSL_ACC_GYRO_R_PEDO(void *handle, LSM6DSL_ACC_GYRO_PEDO_t *value);
nikapov 0:704c89673b57 1561
nikapov 0:704c89673b57 1562 /*******************************************************************************
nikapov 0:704c89673b57 1563 * Register : CTRL10_C
nikapov 0:704c89673b57 1564 * Address : 0X19
nikapov 0:704c89673b57 1565 * Bit Group Name: TIMER_EN
nikapov 0:704c89673b57 1566 * Permission : RW
nikapov 0:704c89673b57 1567 *******************************************************************************/
nikapov 0:704c89673b57 1568 typedef enum {
nikapov 0:704c89673b57 1569 LSM6DSL_ACC_GYRO_TIMER_DISABLED =0x00,
nikapov 0:704c89673b57 1570 LSM6DSL_ACC_GYRO_TIMER_ENABLED =0x20,
nikapov 0:704c89673b57 1571 } LSM6DSL_ACC_GYRO_TIMER_t;
nikapov 0:704c89673b57 1572
nikapov 0:704c89673b57 1573 #define LSM6DSL_ACC_GYRO_TIMER_MASK 0x20
nikapov 0:704c89673b57 1574 mems_status_t LSM6DSL_ACC_GYRO_W_TIMER(void *handle, LSM6DSL_ACC_GYRO_TIMER_t newValue);
nikapov 0:704c89673b57 1575 mems_status_t LSM6DSL_ACC_GYRO_R_TIMER(void *handle, LSM6DSL_ACC_GYRO_TIMER_t *value);
nikapov 0:704c89673b57 1576
nikapov 0:704c89673b57 1577
nikapov 0:704c89673b57 1578 /*******************************************************************************
nikapov 0:704c89673b57 1579 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1580 * Address : 0X1A
nikapov 0:704c89673b57 1581 * Bit Group Name: MASTER_ON
nikapov 0:704c89673b57 1582 * Permission : RW
nikapov 0:704c89673b57 1583 *******************************************************************************/
nikapov 0:704c89673b57 1584 typedef enum {
nikapov 0:704c89673b57 1585 LSM6DSL_ACC_GYRO_MASTER_ON_DISABLED =0x00,
nikapov 0:704c89673b57 1586 LSM6DSL_ACC_GYRO_MASTER_ON_ENABLED =0x01,
nikapov 0:704c89673b57 1587 } LSM6DSL_ACC_GYRO_MASTER_ON_t;
nikapov 0:704c89673b57 1588
nikapov 0:704c89673b57 1589 #define LSM6DSL_ACC_GYRO_MASTER_ON_MASK 0x01
nikapov 0:704c89673b57 1590 mems_status_t LSM6DSL_ACC_GYRO_W_I2C_MASTER_Enable(void *handle, LSM6DSL_ACC_GYRO_MASTER_ON_t newValue);
nikapov 0:704c89673b57 1591 mems_status_t LSM6DSL_ACC_GYRO_R_I2C_MASTER_Enable(void *handle, LSM6DSL_ACC_GYRO_MASTER_ON_t *value);
nikapov 0:704c89673b57 1592
nikapov 0:704c89673b57 1593 /*******************************************************************************
nikapov 0:704c89673b57 1594 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1595 * Address : 0X1A
nikapov 0:704c89673b57 1596 * Bit Group Name: IRON_EN
nikapov 0:704c89673b57 1597 * Permission : RW
nikapov 0:704c89673b57 1598 *******************************************************************************/
nikapov 0:704c89673b57 1599 typedef enum {
nikapov 0:704c89673b57 1600 LSM6DSL_ACC_GYRO_IRON_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1601 LSM6DSL_ACC_GYRO_IRON_EN_ENABLED =0x02,
nikapov 0:704c89673b57 1602 } LSM6DSL_ACC_GYRO_IRON_EN_t;
nikapov 0:704c89673b57 1603
nikapov 0:704c89673b57 1604 #define LSM6DSL_ACC_GYRO_IRON_EN_MASK 0x02
nikapov 0:704c89673b57 1605 mems_status_t LSM6DSL_ACC_GYRO_W_IronCorrection_EN(void *handle, LSM6DSL_ACC_GYRO_IRON_EN_t newValue);
nikapov 0:704c89673b57 1606 mems_status_t LSM6DSL_ACC_GYRO_R_IronCorrection_EN(void *handle, LSM6DSL_ACC_GYRO_IRON_EN_t *value);
nikapov 0:704c89673b57 1607
nikapov 0:704c89673b57 1608 /*******************************************************************************
nikapov 0:704c89673b57 1609 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1610 * Address : 0X1A
nikapov 0:704c89673b57 1611 * Bit Group Name: PASS_THRU_MODE
nikapov 0:704c89673b57 1612 * Permission : RW
nikapov 0:704c89673b57 1613 *******************************************************************************/
nikapov 0:704c89673b57 1614 typedef enum {
nikapov 0:704c89673b57 1615 LSM6DSL_ACC_GYRO_PASS_THRU_MODE_DISABLED =0x00,
nikapov 0:704c89673b57 1616 LSM6DSL_ACC_GYRO_PASS_THRU_MODE_ENABLED =0x04,
nikapov 0:704c89673b57 1617 } LSM6DSL_ACC_GYRO_PASS_THRU_MODE_t;
nikapov 0:704c89673b57 1618
nikapov 0:704c89673b57 1619 #define LSM6DSL_ACC_GYRO_PASS_THRU_MODE_MASK 0x04
nikapov 0:704c89673b57 1620 mems_status_t LSM6DSL_ACC_GYRO_W_PASS_THRU_MODE(void *handle, LSM6DSL_ACC_GYRO_PASS_THRU_MODE_t newValue);
nikapov 0:704c89673b57 1621 mems_status_t LSM6DSL_ACC_GYRO_R_PASS_THRU_MODE(void *handle, LSM6DSL_ACC_GYRO_PASS_THRU_MODE_t *value);
nikapov 0:704c89673b57 1622
nikapov 0:704c89673b57 1623 /*******************************************************************************
nikapov 0:704c89673b57 1624 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1625 * Address : 0X1A
nikapov 0:704c89673b57 1626 * Bit Group Name: PULL_UP_EN
nikapov 0:704c89673b57 1627 * Permission : RW
nikapov 0:704c89673b57 1628 *******************************************************************************/
nikapov 0:704c89673b57 1629 typedef enum {
nikapov 0:704c89673b57 1630 LSM6DSL_ACC_GYRO_PULL_UP_EN_DISABLED =0x00,
nikapov 0:704c89673b57 1631 LSM6DSL_ACC_GYRO_PULL_UP_EN_ENABLED =0x08,
nikapov 0:704c89673b57 1632 } LSM6DSL_ACC_GYRO_PULL_UP_EN_t;
nikapov 0:704c89673b57 1633
nikapov 0:704c89673b57 1634 #define LSM6DSL_ACC_GYRO_PULL_UP_EN_MASK 0x08
nikapov 0:704c89673b57 1635 mems_status_t LSM6DSL_ACC_GYRO_W_PULL_UP_EN(void *handle, LSM6DSL_ACC_GYRO_PULL_UP_EN_t newValue);
nikapov 0:704c89673b57 1636 mems_status_t LSM6DSL_ACC_GYRO_R_PULL_UP_EN(void *handle, LSM6DSL_ACC_GYRO_PULL_UP_EN_t *value);
nikapov 0:704c89673b57 1637
nikapov 0:704c89673b57 1638 /*******************************************************************************
nikapov 0:704c89673b57 1639 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1640 * Address : 0X1A
nikapov 0:704c89673b57 1641 * Bit Group Name: START_CONFIG
nikapov 0:704c89673b57 1642 * Permission : RW
nikapov 0:704c89673b57 1643 *******************************************************************************/
nikapov 0:704c89673b57 1644 typedef enum {
nikapov 0:704c89673b57 1645 LSM6DSL_ACC_GYRO_START_CONFIG_XL_G_DRDY =0x00,
nikapov 0:704c89673b57 1646 LSM6DSL_ACC_GYRO_START_CONFIG_EXT_INT2 =0x10,
nikapov 0:704c89673b57 1647 } LSM6DSL_ACC_GYRO_START_CONFIG_t;
nikapov 0:704c89673b57 1648
nikapov 0:704c89673b57 1649 #define LSM6DSL_ACC_GYRO_START_CONFIG_MASK 0x10
nikapov 0:704c89673b57 1650 mems_status_t LSM6DSL_ACC_GYRO_W_SensorHUB_Trigger_Sel(void *handle, LSM6DSL_ACC_GYRO_START_CONFIG_t newValue);
nikapov 0:704c89673b57 1651 mems_status_t LSM6DSL_ACC_GYRO_R_SensorHUB_Trigger_Sel(void *handle, LSM6DSL_ACC_GYRO_START_CONFIG_t *value);
nikapov 0:704c89673b57 1652
nikapov 0:704c89673b57 1653 /*******************************************************************************
nikapov 0:704c89673b57 1654 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1655 * Address : 0X1A
nikapov 0:704c89673b57 1656 * Bit Group Name: DATA_VAL_SEL_FIFO
nikapov 0:704c89673b57 1657 * Permission : RW
nikapov 0:704c89673b57 1658 *******************************************************************************/
nikapov 0:704c89673b57 1659 typedef enum {
nikapov 0:704c89673b57 1660 LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_XL_G_DRDY =0x00,
nikapov 0:704c89673b57 1661 LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_SHUB_DRDY =0x40,
nikapov 0:704c89673b57 1662 } LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_t;
nikapov 0:704c89673b57 1663
nikapov 0:704c89673b57 1664 #define LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_MASK 0x40
nikapov 0:704c89673b57 1665 mems_status_t LSM6DSL_ACC_GYRO_W_DATA_VAL_SEL_FIFO(void *handle, LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_t newValue);
nikapov 0:704c89673b57 1666 mems_status_t LSM6DSL_ACC_GYRO_R_DATA_VAL_SEL_FIFO(void *handle, LSM6DSL_ACC_GYRO_DATA_VAL_SEL_FIFO_t *value);
nikapov 0:704c89673b57 1667
nikapov 0:704c89673b57 1668 /*******************************************************************************
nikapov 0:704c89673b57 1669 * Register : MASTER_CONFIG
nikapov 0:704c89673b57 1670 * Address : 0X1A
nikapov 0:704c89673b57 1671 * Bit Group Name: DRDY_ON_INT1
nikapov 0:704c89673b57 1672 * Permission : RW
nikapov 0:704c89673b57 1673 *******************************************************************************/
nikapov 0:704c89673b57 1674 typedef enum {
nikapov 0:704c89673b57 1675 LSM6DSL_ACC_GYRO_DRDY_ON_INT1_DISABLED =0x00,
nikapov 0:704c89673b57 1676 LSM6DSL_ACC_GYRO_DRDY_ON_INT1_ENABLED =0x80,
nikapov 0:704c89673b57 1677 } LSM6DSL_ACC_GYRO_DRDY_ON_INT1_t;
nikapov 0:704c89673b57 1678
nikapov 0:704c89673b57 1679 #define LSM6DSL_ACC_GYRO_DRDY_ON_INT1_MASK 0x80
nikapov 0:704c89673b57 1680 mems_status_t LSM6DSL_ACC_GYRO_W_DRDY_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_DRDY_ON_INT1_t newValue);
nikapov 0:704c89673b57 1681 mems_status_t LSM6DSL_ACC_GYRO_R_DRDY_ON_INT1(void *handle, LSM6DSL_ACC_GYRO_DRDY_ON_INT1_t *value);
nikapov 0:704c89673b57 1682
nikapov 0:704c89673b57 1683 /*******************************************************************************
nikapov 0:704c89673b57 1684 * Register : WAKE_UP_SRC
nikapov 0:704c89673b57 1685 * Address : 0X1B
nikapov 0:704c89673b57 1686 * Bit Group Name: Z_WU
nikapov 0:704c89673b57 1687 * Permission : RO
nikapov 0:704c89673b57 1688 *******************************************************************************/
nikapov 0:704c89673b57 1689 typedef enum {
nikapov 0:704c89673b57 1690 LSM6DSL_ACC_GYRO_Z_WU_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1691 LSM6DSL_ACC_GYRO_Z_WU_DETECTED =0x01,
nikapov 0:704c89673b57 1692 } LSM6DSL_ACC_GYRO_Z_WU_t;
nikapov 0:704c89673b57 1693
nikapov 0:704c89673b57 1694 #define LSM6DSL_ACC_GYRO_Z_WU_MASK 0x01
nikapov 0:704c89673b57 1695 mems_status_t LSM6DSL_ACC_GYRO_R_Z_WU(void *handle, LSM6DSL_ACC_GYRO_Z_WU_t *value);
nikapov 0:704c89673b57 1696
nikapov 0:704c89673b57 1697 /*******************************************************************************
nikapov 0:704c89673b57 1698 * Register : WAKE_UP_SRC
nikapov 0:704c89673b57 1699 * Address : 0X1B
nikapov 0:704c89673b57 1700 * Bit Group Name: Y_WU
nikapov 0:704c89673b57 1701 * Permission : RO
nikapov 0:704c89673b57 1702 *******************************************************************************/
nikapov 0:704c89673b57 1703 typedef enum {
nikapov 0:704c89673b57 1704 LSM6DSL_ACC_GYRO_Y_WU_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1705 LSM6DSL_ACC_GYRO_Y_WU_DETECTED =0x02,
nikapov 0:704c89673b57 1706 } LSM6DSL_ACC_GYRO_Y_WU_t;
nikapov 0:704c89673b57 1707
nikapov 0:704c89673b57 1708 #define LSM6DSL_ACC_GYRO_Y_WU_MASK 0x02
nikapov 0:704c89673b57 1709 mems_status_t LSM6DSL_ACC_GYRO_R_Y_WU(void *handle, LSM6DSL_ACC_GYRO_Y_WU_t *value);
nikapov 0:704c89673b57 1710
nikapov 0:704c89673b57 1711 /*******************************************************************************
nikapov 0:704c89673b57 1712 * Register : WAKE_UP_SRC
nikapov 0:704c89673b57 1713 * Address : 0X1B
nikapov 0:704c89673b57 1714 * Bit Group Name: X_WU
nikapov 0:704c89673b57 1715 * Permission : RO
nikapov 0:704c89673b57 1716 *******************************************************************************/
nikapov 0:704c89673b57 1717 typedef enum {
nikapov 0:704c89673b57 1718 LSM6DSL_ACC_GYRO_X_WU_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1719 LSM6DSL_ACC_GYRO_X_WU_DETECTED =0x04,
nikapov 0:704c89673b57 1720 } LSM6DSL_ACC_GYRO_X_WU_t;
nikapov 0:704c89673b57 1721
nikapov 0:704c89673b57 1722 #define LSM6DSL_ACC_GYRO_X_WU_MASK 0x04
nikapov 0:704c89673b57 1723 mems_status_t LSM6DSL_ACC_GYRO_R_X_WU(void *handle, LSM6DSL_ACC_GYRO_X_WU_t *value);
nikapov 0:704c89673b57 1724
nikapov 0:704c89673b57 1725 /*******************************************************************************
nikapov 0:704c89673b57 1726 * Register : WAKE_UP_SRC
nikapov 0:704c89673b57 1727 * Address : 0X1B
nikapov 0:704c89673b57 1728 * Bit Group Name: WU_EV_STATUS
nikapov 0:704c89673b57 1729 * Permission : RO
nikapov 0:704c89673b57 1730 *******************************************************************************/
nikapov 0:704c89673b57 1731 typedef enum {
nikapov 0:704c89673b57 1732 LSM6DSL_ACC_GYRO_WU_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1733 LSM6DSL_ACC_GYRO_WU_EV_STATUS_DETECTED =0x08,
nikapov 0:704c89673b57 1734 } LSM6DSL_ACC_GYRO_WU_EV_STATUS_t;
nikapov 0:704c89673b57 1735
nikapov 0:704c89673b57 1736 #define LSM6DSL_ACC_GYRO_WU_EV_STATUS_MASK 0x08
nikapov 0:704c89673b57 1737 mems_status_t LSM6DSL_ACC_GYRO_R_WU_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_WU_EV_STATUS_t *value);
nikapov 0:704c89673b57 1738
nikapov 0:704c89673b57 1739 /*******************************************************************************
nikapov 0:704c89673b57 1740 * Register : WAKE_UP_SRC
nikapov 0:704c89673b57 1741 * Address : 0X1B
nikapov 0:704c89673b57 1742 * Bit Group Name: SLEEP_EV_STATUS
nikapov 0:704c89673b57 1743 * Permission : RO
nikapov 0:704c89673b57 1744 *******************************************************************************/
nikapov 0:704c89673b57 1745 typedef enum {
nikapov 0:704c89673b57 1746 LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1747 LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_DETECTED =0x10,
nikapov 0:704c89673b57 1748 } LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_t;
nikapov 0:704c89673b57 1749
nikapov 0:704c89673b57 1750 #define LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_MASK 0x10
nikapov 0:704c89673b57 1751 mems_status_t LSM6DSL_ACC_GYRO_R_SLEEP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_SLEEP_EV_STATUS_t *value);
nikapov 0:704c89673b57 1752
nikapov 0:704c89673b57 1753 /*******************************************************************************
nikapov 0:704c89673b57 1754 * Register : WAKE_UP_SRC
nikapov 0:704c89673b57 1755 * Address : 0X1B
nikapov 0:704c89673b57 1756 * Bit Group Name: FF_EV_STATUS
nikapov 0:704c89673b57 1757 * Permission : RO
nikapov 0:704c89673b57 1758 *******************************************************************************/
nikapov 0:704c89673b57 1759 typedef enum {
nikapov 0:704c89673b57 1760 LSM6DSL_ACC_GYRO_FF_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1761 LSM6DSL_ACC_GYRO_FF_EV_STATUS_DETECTED =0x20,
nikapov 0:704c89673b57 1762 } LSM6DSL_ACC_GYRO_FF_EV_STATUS_t;
nikapov 0:704c89673b57 1763
nikapov 0:704c89673b57 1764 #define LSM6DSL_ACC_GYRO_FF_EV_STATUS_MASK 0x20
nikapov 0:704c89673b57 1765 mems_status_t LSM6DSL_ACC_GYRO_R_FF_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_FF_EV_STATUS_t *value);
nikapov 0:704c89673b57 1766
nikapov 0:704c89673b57 1767 /*******************************************************************************
nikapov 0:704c89673b57 1768 * Register : TAP_SRC
nikapov 0:704c89673b57 1769 * Address : 0X1C
nikapov 0:704c89673b57 1770 * Bit Group Name: Z_TAP
nikapov 0:704c89673b57 1771 * Permission : RO
nikapov 0:704c89673b57 1772 *******************************************************************************/
nikapov 0:704c89673b57 1773 typedef enum {
nikapov 0:704c89673b57 1774 LSM6DSL_ACC_GYRO_Z_TAP_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1775 LSM6DSL_ACC_GYRO_Z_TAP_DETECTED =0x01,
nikapov 0:704c89673b57 1776 } LSM6DSL_ACC_GYRO_Z_TAP_t;
nikapov 0:704c89673b57 1777
nikapov 0:704c89673b57 1778 #define LSM6DSL_ACC_GYRO_Z_TAP_MASK 0x01
nikapov 0:704c89673b57 1779 mems_status_t LSM6DSL_ACC_GYRO_R_Z_TAP(void *handle, LSM6DSL_ACC_GYRO_Z_TAP_t *value);
nikapov 0:704c89673b57 1780
nikapov 0:704c89673b57 1781 /*******************************************************************************
nikapov 0:704c89673b57 1782 * Register : TAP_SRC
nikapov 0:704c89673b57 1783 * Address : 0X1C
nikapov 0:704c89673b57 1784 * Bit Group Name: Y_TAP
nikapov 0:704c89673b57 1785 * Permission : RO
nikapov 0:704c89673b57 1786 *******************************************************************************/
nikapov 0:704c89673b57 1787 typedef enum {
nikapov 0:704c89673b57 1788 LSM6DSL_ACC_GYRO_Y_TAP_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1789 LSM6DSL_ACC_GYRO_Y_TAP_DETECTED =0x02,
nikapov 0:704c89673b57 1790 } LSM6DSL_ACC_GYRO_Y_TAP_t;
nikapov 0:704c89673b57 1791
nikapov 0:704c89673b57 1792 #define LSM6DSL_ACC_GYRO_Y_TAP_MASK 0x02
nikapov 0:704c89673b57 1793 mems_status_t LSM6DSL_ACC_GYRO_R_Y_TAP(void *handle, LSM6DSL_ACC_GYRO_Y_TAP_t *value);
nikapov 0:704c89673b57 1794
nikapov 0:704c89673b57 1795 /*******************************************************************************
nikapov 0:704c89673b57 1796 * Register : TAP_SRC
nikapov 0:704c89673b57 1797 * Address : 0X1C
nikapov 0:704c89673b57 1798 * Bit Group Name: X_TAP
nikapov 0:704c89673b57 1799 * Permission : RO
nikapov 0:704c89673b57 1800 *******************************************************************************/
nikapov 0:704c89673b57 1801 typedef enum {
nikapov 0:704c89673b57 1802 LSM6DSL_ACC_GYRO_X_TAP_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1803 LSM6DSL_ACC_GYRO_X_TAP_DETECTED =0x04,
nikapov 0:704c89673b57 1804 } LSM6DSL_ACC_GYRO_X_TAP_t;
nikapov 0:704c89673b57 1805
nikapov 0:704c89673b57 1806 #define LSM6DSL_ACC_GYRO_X_TAP_MASK 0x04
nikapov 0:704c89673b57 1807 mems_status_t LSM6DSL_ACC_GYRO_R_X_TAP(void *handle, LSM6DSL_ACC_GYRO_X_TAP_t *value);
nikapov 0:704c89673b57 1808
nikapov 0:704c89673b57 1809 /*******************************************************************************
nikapov 0:704c89673b57 1810 * Register : TAP_SRC
nikapov 0:704c89673b57 1811 * Address : 0X1C
nikapov 0:704c89673b57 1812 * Bit Group Name: TAP_SIGN
nikapov 0:704c89673b57 1813 * Permission : RO
nikapov 0:704c89673b57 1814 *******************************************************************************/
nikapov 0:704c89673b57 1815 typedef enum {
nikapov 0:704c89673b57 1816 LSM6DSL_ACC_GYRO_TAP_SIGN_POS_SIGN =0x00,
nikapov 0:704c89673b57 1817 LSM6DSL_ACC_GYRO_TAP_SIGN_NEG_SIGN =0x08,
nikapov 0:704c89673b57 1818 } LSM6DSL_ACC_GYRO_TAP_SIGN_t;
nikapov 0:704c89673b57 1819
nikapov 0:704c89673b57 1820 #define LSM6DSL_ACC_GYRO_TAP_SIGN_MASK 0x08
nikapov 0:704c89673b57 1821 mems_status_t LSM6DSL_ACC_GYRO_R_TAP_SIGN(void *handle, LSM6DSL_ACC_GYRO_TAP_SIGN_t *value);
nikapov 0:704c89673b57 1822
nikapov 0:704c89673b57 1823 /*******************************************************************************
nikapov 0:704c89673b57 1824 * Register : TAP_SRC
nikapov 0:704c89673b57 1825 * Address : 0X1C
nikapov 0:704c89673b57 1826 * Bit Group Name: DOUBLE_TAP_EV_STATUS
nikapov 0:704c89673b57 1827 * Permission : RO
nikapov 0:704c89673b57 1828 *******************************************************************************/
nikapov 0:704c89673b57 1829 typedef enum {
nikapov 0:704c89673b57 1830 LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1831 LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_DETECTED =0x10,
nikapov 0:704c89673b57 1832 } LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_t;
nikapov 0:704c89673b57 1833
nikapov 0:704c89673b57 1834 #define LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_MASK 0x10
nikapov 0:704c89673b57 1835 mems_status_t LSM6DSL_ACC_GYRO_R_DOUBLE_TAP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_DOUBLE_TAP_EV_STATUS_t *value);
nikapov 0:704c89673b57 1836
nikapov 0:704c89673b57 1837 /*******************************************************************************
nikapov 0:704c89673b57 1838 * Register : TAP_SRC
nikapov 0:704c89673b57 1839 * Address : 0X1C
nikapov 0:704c89673b57 1840 * Bit Group Name: SINGLE_TAP_EV_STATUS
nikapov 0:704c89673b57 1841 * Permission : RO
nikapov 0:704c89673b57 1842 *******************************************************************************/
nikapov 0:704c89673b57 1843 typedef enum {
nikapov 0:704c89673b57 1844 LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1845 LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_DETECTED =0x20,
nikapov 0:704c89673b57 1846 } LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_t;
nikapov 0:704c89673b57 1847
nikapov 0:704c89673b57 1848 #define LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_MASK 0x20
nikapov 0:704c89673b57 1849 mems_status_t LSM6DSL_ACC_GYRO_R_SINGLE_TAP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_SINGLE_TAP_EV_STATUS_t *value);
nikapov 0:704c89673b57 1850
nikapov 0:704c89673b57 1851 /*******************************************************************************
nikapov 0:704c89673b57 1852 * Register : TAP_SRC
nikapov 0:704c89673b57 1853 * Address : 0X1C
nikapov 0:704c89673b57 1854 * Bit Group Name: TAP_EV_STATUS
nikapov 0:704c89673b57 1855 * Permission : RO
nikapov 0:704c89673b57 1856 *******************************************************************************/
nikapov 0:704c89673b57 1857 typedef enum {
nikapov 0:704c89673b57 1858 LSM6DSL_ACC_GYRO_TAP_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1859 LSM6DSL_ACC_GYRO_TAP_EV_STATUS_DETECTED =0x40,
nikapov 0:704c89673b57 1860 } LSM6DSL_ACC_GYRO_TAP_EV_STATUS_t;
nikapov 0:704c89673b57 1861
nikapov 0:704c89673b57 1862 #define LSM6DSL_ACC_GYRO_TAP_EV_STATUS_MASK 0x40
nikapov 0:704c89673b57 1863 mems_status_t LSM6DSL_ACC_GYRO_R_TAP_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_TAP_EV_STATUS_t *value);
nikapov 0:704c89673b57 1864
nikapov 0:704c89673b57 1865 /*******************************************************************************
nikapov 0:704c89673b57 1866 * Register : D6D_SRC
nikapov 0:704c89673b57 1867 * Address : 0X1D
nikapov 0:704c89673b57 1868 * Bit Group Name: DSD_XL
nikapov 0:704c89673b57 1869 * Permission : RO
nikapov 0:704c89673b57 1870 *******************************************************************************/
nikapov 0:704c89673b57 1871 typedef enum {
nikapov 0:704c89673b57 1872 LSM6DSL_ACC_GYRO_DSD_XL_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1873 LSM6DSL_ACC_GYRO_DSD_XL_DETECTED =0x01,
nikapov 0:704c89673b57 1874 } LSM6DSL_ACC_GYRO_DSD_XL_t;
nikapov 0:704c89673b57 1875
nikapov 0:704c89673b57 1876 #define LSM6DSL_ACC_GYRO_DSD_XL_MASK 0x01
nikapov 0:704c89673b57 1877 mems_status_t LSM6DSL_ACC_GYRO_R_DSD_XL(void *handle, LSM6DSL_ACC_GYRO_DSD_XL_t *value);
nikapov 0:704c89673b57 1878
nikapov 0:704c89673b57 1879 /*******************************************************************************
nikapov 0:704c89673b57 1880 * Register : D6D_SRC
nikapov 0:704c89673b57 1881 * Address : 0X1D
nikapov 0:704c89673b57 1882 * Bit Group Name: DSD_XH
nikapov 0:704c89673b57 1883 * Permission : RO
nikapov 0:704c89673b57 1884 *******************************************************************************/
nikapov 0:704c89673b57 1885 typedef enum {
nikapov 0:704c89673b57 1886 LSM6DSL_ACC_GYRO_DSD_XH_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1887 LSM6DSL_ACC_GYRO_DSD_XH_DETECTED =0x02,
nikapov 0:704c89673b57 1888 } LSM6DSL_ACC_GYRO_DSD_XH_t;
nikapov 0:704c89673b57 1889
nikapov 0:704c89673b57 1890 #define LSM6DSL_ACC_GYRO_DSD_XH_MASK 0x02
nikapov 0:704c89673b57 1891 mems_status_t LSM6DSL_ACC_GYRO_R_DSD_XH(void *handle, LSM6DSL_ACC_GYRO_DSD_XH_t *value);
nikapov 0:704c89673b57 1892
nikapov 0:704c89673b57 1893 /*******************************************************************************
nikapov 0:704c89673b57 1894 * Register : D6D_SRC
nikapov 0:704c89673b57 1895 * Address : 0X1D
nikapov 0:704c89673b57 1896 * Bit Group Name: DSD_YL
nikapov 0:704c89673b57 1897 * Permission : RO
nikapov 0:704c89673b57 1898 *******************************************************************************/
nikapov 0:704c89673b57 1899 typedef enum {
nikapov 0:704c89673b57 1900 LSM6DSL_ACC_GYRO_DSD_YL_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1901 LSM6DSL_ACC_GYRO_DSD_YL_DETECTED =0x04,
nikapov 0:704c89673b57 1902 } LSM6DSL_ACC_GYRO_DSD_YL_t;
nikapov 0:704c89673b57 1903
nikapov 0:704c89673b57 1904 #define LSM6DSL_ACC_GYRO_DSD_YL_MASK 0x04
nikapov 0:704c89673b57 1905 mems_status_t LSM6DSL_ACC_GYRO_R_DSD_YL(void *handle, LSM6DSL_ACC_GYRO_DSD_YL_t *value);
nikapov 0:704c89673b57 1906
nikapov 0:704c89673b57 1907 /*******************************************************************************
nikapov 0:704c89673b57 1908 * Register : D6D_SRC
nikapov 0:704c89673b57 1909 * Address : 0X1D
nikapov 0:704c89673b57 1910 * Bit Group Name: DSD_YH
nikapov 0:704c89673b57 1911 * Permission : RO
nikapov 0:704c89673b57 1912 *******************************************************************************/
nikapov 0:704c89673b57 1913 typedef enum {
nikapov 0:704c89673b57 1914 LSM6DSL_ACC_GYRO_DSD_YH_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1915 LSM6DSL_ACC_GYRO_DSD_YH_DETECTED =0x08,
nikapov 0:704c89673b57 1916 } LSM6DSL_ACC_GYRO_DSD_YH_t;
nikapov 0:704c89673b57 1917
nikapov 0:704c89673b57 1918 #define LSM6DSL_ACC_GYRO_DSD_YH_MASK 0x08
nikapov 0:704c89673b57 1919 mems_status_t LSM6DSL_ACC_GYRO_R_DSD_YH(void *handle, LSM6DSL_ACC_GYRO_DSD_YH_t *value);
nikapov 0:704c89673b57 1920
nikapov 0:704c89673b57 1921 /*******************************************************************************
nikapov 0:704c89673b57 1922 * Register : D6D_SRC
nikapov 0:704c89673b57 1923 * Address : 0X1D
nikapov 0:704c89673b57 1924 * Bit Group Name: DSD_ZL
nikapov 0:704c89673b57 1925 * Permission : RO
nikapov 0:704c89673b57 1926 *******************************************************************************/
nikapov 0:704c89673b57 1927 typedef enum {
nikapov 0:704c89673b57 1928 LSM6DSL_ACC_GYRO_DSD_ZL_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1929 LSM6DSL_ACC_GYRO_DSD_ZL_DETECTED =0x10,
nikapov 0:704c89673b57 1930 } LSM6DSL_ACC_GYRO_DSD_ZL_t;
nikapov 0:704c89673b57 1931
nikapov 0:704c89673b57 1932 #define LSM6DSL_ACC_GYRO_DSD_ZL_MASK 0x10
nikapov 0:704c89673b57 1933 mems_status_t LSM6DSL_ACC_GYRO_R_DSD_ZL(void *handle, LSM6DSL_ACC_GYRO_DSD_ZL_t *value);
nikapov 0:704c89673b57 1934
nikapov 0:704c89673b57 1935 /*******************************************************************************
nikapov 0:704c89673b57 1936 * Register : D6D_SRC
nikapov 0:704c89673b57 1937 * Address : 0X1D
nikapov 0:704c89673b57 1938 * Bit Group Name: DSD_ZH
nikapov 0:704c89673b57 1939 * Permission : RO
nikapov 0:704c89673b57 1940 *******************************************************************************/
nikapov 0:704c89673b57 1941 typedef enum {
nikapov 0:704c89673b57 1942 LSM6DSL_ACC_GYRO_DSD_ZH_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1943 LSM6DSL_ACC_GYRO_DSD_ZH_DETECTED =0x20,
nikapov 0:704c89673b57 1944 } LSM6DSL_ACC_GYRO_DSD_ZH_t;
nikapov 0:704c89673b57 1945
nikapov 0:704c89673b57 1946 #define LSM6DSL_ACC_GYRO_DSD_ZH_MASK 0x20
nikapov 0:704c89673b57 1947 mems_status_t LSM6DSL_ACC_GYRO_R_DSD_ZH(void *handle, LSM6DSL_ACC_GYRO_DSD_ZH_t *value);
nikapov 0:704c89673b57 1948
nikapov 0:704c89673b57 1949 /*******************************************************************************
nikapov 0:704c89673b57 1950 * Register : D6D_SRC
nikapov 0:704c89673b57 1951 * Address : 0X1D
nikapov 0:704c89673b57 1952 * Bit Group Name: D6D_EV_STATUS
nikapov 0:704c89673b57 1953 * Permission : RO
nikapov 0:704c89673b57 1954 *******************************************************************************/
nikapov 0:704c89673b57 1955 typedef enum {
nikapov 0:704c89673b57 1956 LSM6DSL_ACC_GYRO_D6D_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 1957 LSM6DSL_ACC_GYRO_D6D_EV_STATUS_DETECTED =0x40,
nikapov 0:704c89673b57 1958 } LSM6DSL_ACC_GYRO_D6D_EV_STATUS_t;
nikapov 0:704c89673b57 1959
nikapov 0:704c89673b57 1960 #define LSM6DSL_ACC_GYRO_D6D_EV_STATUS_MASK 0x40
nikapov 0:704c89673b57 1961 mems_status_t LSM6DSL_ACC_GYRO_R_D6D_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_D6D_EV_STATUS_t *value);
nikapov 0:704c89673b57 1962
nikapov 0:704c89673b57 1963 /*******************************************************************************
nikapov 0:704c89673b57 1964 * Register : STATUS_REG
nikapov 0:704c89673b57 1965 * Address : 0X1E
nikapov 0:704c89673b57 1966 * Bit Group Name: XLDA
nikapov 0:704c89673b57 1967 * Permission : RO
nikapov 0:704c89673b57 1968 *******************************************************************************/
nikapov 0:704c89673b57 1969 typedef enum {
nikapov 0:704c89673b57 1970 LSM6DSL_ACC_GYRO_XLDA_NO_DATA_AVAIL =0x00,
nikapov 0:704c89673b57 1971 LSM6DSL_ACC_GYRO_XLDA_DATA_AVAIL =0x01,
nikapov 0:704c89673b57 1972 } LSM6DSL_ACC_GYRO_XLDA_t;
nikapov 0:704c89673b57 1973
nikapov 0:704c89673b57 1974 #define LSM6DSL_ACC_GYRO_XLDA_MASK 0x01
nikapov 0:704c89673b57 1975 mems_status_t LSM6DSL_ACC_GYRO_R_XLDA(void *handle, LSM6DSL_ACC_GYRO_XLDA_t *value);
nikapov 0:704c89673b57 1976
nikapov 0:704c89673b57 1977 /*******************************************************************************
nikapov 0:704c89673b57 1978 * Register : STATUS_REG
nikapov 0:704c89673b57 1979 * Address : 0X1E
nikapov 0:704c89673b57 1980 * Bit Group Name: GDA
nikapov 0:704c89673b57 1981 * Permission : RO
nikapov 0:704c89673b57 1982 *******************************************************************************/
nikapov 0:704c89673b57 1983 typedef enum {
nikapov 0:704c89673b57 1984 LSM6DSL_ACC_GYRO_GDA_NO_DATA_AVAIL =0x00,
nikapov 0:704c89673b57 1985 LSM6DSL_ACC_GYRO_GDA_DATA_AVAIL =0x02,
nikapov 0:704c89673b57 1986 } LSM6DSL_ACC_GYRO_GDA_t;
nikapov 0:704c89673b57 1987
nikapov 0:704c89673b57 1988 #define LSM6DSL_ACC_GYRO_GDA_MASK 0x02
nikapov 0:704c89673b57 1989 mems_status_t LSM6DSL_ACC_GYRO_R_GDA(void *handle, LSM6DSL_ACC_GYRO_GDA_t *value);
nikapov 0:704c89673b57 1990
nikapov 0:704c89673b57 1991 /*******************************************************************************
nikapov 0:704c89673b57 1992 * Register : STATUS_REG
nikapov 0:704c89673b57 1993 * Address : 0X1E
nikapov 0:704c89673b57 1994 * Bit Group Name: TDA
nikapov 0:704c89673b57 1995 * Permission : RO
nikapov 0:704c89673b57 1996 *******************************************************************************/
nikapov 0:704c89673b57 1997 typedef enum {
nikapov 0:704c89673b57 1998 LSM6DSL_ACC_GYRO_TDA_NO_DATA_AVAIL =0x00,
nikapov 0:704c89673b57 1999 LSM6DSL_ACC_GYRO_TDA_DATA_AVAIL =0x04,
nikapov 0:704c89673b57 2000 } LSM6DSL_ACC_GYRO_TDA_t;
nikapov 0:704c89673b57 2001
nikapov 0:704c89673b57 2002 #define LSM6DSL_ACC_GYRO_TDA_MASK 0x04
nikapov 0:704c89673b57 2003 mems_status_t LSM6DSL_ACC_GYRO_R_TDA(void *handle, LSM6DSL_ACC_GYRO_TDA_t *value);
nikapov 0:704c89673b57 2004
nikapov 0:704c89673b57 2005 /*******************************************************************************
nikapov 0:704c89673b57 2006 * Register : FIFO_STATUS1
nikapov 0:704c89673b57 2007 * Address : 0X3A
nikapov 0:704c89673b57 2008 * Bit Group Name: DIFF_FIFO
nikapov 0:704c89673b57 2009 * Permission : RO
nikapov 0:704c89673b57 2010 *******************************************************************************/
nikapov 0:704c89673b57 2011 #define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS1_MASK 0xFF
nikapov 0:704c89673b57 2012 #define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS1_POSITION 0
nikapov 0:704c89673b57 2013 #define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS2_MASK 0xF
nikapov 0:704c89673b57 2014 #define LSM6DSL_ACC_GYRO_DIFF_FIFO_STATUS2_POSITION 0
nikapov 0:704c89673b57 2015 mems_status_t LSM6DSL_ACC_GYRO_R_FIFONumOfEntries(void *handle, u16_t *value);
nikapov 0:704c89673b57 2016
nikapov 0:704c89673b57 2017 /*******************************************************************************
nikapov 0:704c89673b57 2018 * Register : FIFO_STATUS2
nikapov 0:704c89673b57 2019 * Address : 0X3B
nikapov 0:704c89673b57 2020 * Bit Group Name: FIFO_EMPTY
nikapov 0:704c89673b57 2021 * Permission : RO
nikapov 0:704c89673b57 2022 *******************************************************************************/
nikapov 0:704c89673b57 2023 typedef enum {
nikapov 0:704c89673b57 2024 LSM6DSL_ACC_GYRO_FIFO_EMPTY_FIFO_NOT_EMPTY =0x00,
nikapov 0:704c89673b57 2025 LSM6DSL_ACC_GYRO_FIFO_EMPTY_FIFO_EMPTY =0x10,
nikapov 0:704c89673b57 2026 } LSM6DSL_ACC_GYRO_FIFO_EMPTY_t;
nikapov 0:704c89673b57 2027
nikapov 0:704c89673b57 2028 #define LSM6DSL_ACC_GYRO_FIFO_EMPTY_MASK 0x10
nikapov 0:704c89673b57 2029 mems_status_t LSM6DSL_ACC_GYRO_R_FIFOEmpty(void *handle, LSM6DSL_ACC_GYRO_FIFO_EMPTY_t *value);
nikapov 0:704c89673b57 2030
nikapov 0:704c89673b57 2031 /*******************************************************************************
nikapov 0:704c89673b57 2032 * Register : FIFO_STATUS2
nikapov 0:704c89673b57 2033 * Address : 0X3B
nikapov 0:704c89673b57 2034 * Bit Group Name: FIFO_FULL
nikapov 0:704c89673b57 2035 * Permission : RO
nikapov 0:704c89673b57 2036 *******************************************************************************/
nikapov 0:704c89673b57 2037 typedef enum {
nikapov 0:704c89673b57 2038 LSM6DSL_ACC_GYRO_FIFO_FULL_FIFO_NOT_FULL =0x00,
nikapov 0:704c89673b57 2039 LSM6DSL_ACC_GYRO_FIFO_FULL_FIFO_FULL =0x20,
nikapov 0:704c89673b57 2040 } LSM6DSL_ACC_GYRO_FIFO_FULL_t;
nikapov 0:704c89673b57 2041
nikapov 0:704c89673b57 2042 #define LSM6DSL_ACC_GYRO_FIFO_FULL_MASK 0x20
nikapov 0:704c89673b57 2043 mems_status_t LSM6DSL_ACC_GYRO_R_FIFOFull(void *handle, LSM6DSL_ACC_GYRO_FIFO_FULL_t *value);
nikapov 0:704c89673b57 2044
nikapov 0:704c89673b57 2045 /*******************************************************************************
nikapov 0:704c89673b57 2046 * Register : FIFO_STATUS2
nikapov 0:704c89673b57 2047 * Address : 0X3B
nikapov 0:704c89673b57 2048 * Bit Group Name: OVERRUN
nikapov 0:704c89673b57 2049 * Permission : RO
nikapov 0:704c89673b57 2050 *******************************************************************************/
nikapov 0:704c89673b57 2051 typedef enum {
nikapov 0:704c89673b57 2052 LSM6DSL_ACC_GYRO_OVERRUN_NO_OVERRUN =0x00,
nikapov 0:704c89673b57 2053 LSM6DSL_ACC_GYRO_OVERRUN_OVERRUN =0x40,
nikapov 0:704c89673b57 2054 } LSM6DSL_ACC_GYRO_OVERRUN_t;
nikapov 0:704c89673b57 2055
nikapov 0:704c89673b57 2056 #define LSM6DSL_ACC_GYRO_OVERRUN_MASK 0x40
nikapov 0:704c89673b57 2057 mems_status_t LSM6DSL_ACC_GYRO_R_OVERRUN(void *handle, LSM6DSL_ACC_GYRO_OVERRUN_t *value);
nikapov 0:704c89673b57 2058
nikapov 0:704c89673b57 2059 /*******************************************************************************
nikapov 0:704c89673b57 2060 * Register : FIFO_STATUS2
nikapov 0:704c89673b57 2061 * Address : 0X3B
nikapov 0:704c89673b57 2062 * Bit Group Name: WTM
nikapov 0:704c89673b57 2063 * Permission : RO
nikapov 0:704c89673b57 2064 *******************************************************************************/
nikapov 0:704c89673b57 2065 typedef enum {
nikapov 0:704c89673b57 2066 LSM6DSL_ACC_GYRO_WTM_BELOW_WTM =0x00,
nikapov 0:704c89673b57 2067 LSM6DSL_ACC_GYRO_WTM_ABOVE_OR_EQUAL_WTM =0x80,
nikapov 0:704c89673b57 2068 } LSM6DSL_ACC_GYRO_WTM_t;
nikapov 0:704c89673b57 2069
nikapov 0:704c89673b57 2070 #define LSM6DSL_ACC_GYRO_WTM_MASK 0x80
nikapov 0:704c89673b57 2071 mems_status_t LSM6DSL_ACC_GYRO_R_WaterMark(void *handle, LSM6DSL_ACC_GYRO_WTM_t *value);
nikapov 0:704c89673b57 2072
nikapov 0:704c89673b57 2073 /*******************************************************************************
nikapov 0:704c89673b57 2074 * Register : FIFO_STATUS3
nikapov 0:704c89673b57 2075 * Address : 0X3C
nikapov 0:704c89673b57 2076 * Bit Group Name: FIFO_PATTERN
nikapov 0:704c89673b57 2077 * Permission : RO
nikapov 0:704c89673b57 2078 *******************************************************************************/
nikapov 0:704c89673b57 2079 #define LSM6DSL_ACC_GYRO_FIFO_STATUS3_PATTERN_MASK 0xFF
nikapov 0:704c89673b57 2080 #define LSM6DSL_ACC_GYRO_FIFO_STATUS3_PATTERN_POSITION 0
nikapov 0:704c89673b57 2081 #define LSM6DSL_ACC_GYRO_FIFO_STATUS4_PATTERN_MASK 0x03
nikapov 0:704c89673b57 2082 #define LSM6DSL_ACC_GYRO_FIFO_STATUS4_PATTERN_POSITION 0
nikapov 0:704c89673b57 2083 mems_status_t LSM6DSL_ACC_GYRO_R_FIFOPattern(void *handle, u16_t *value);
nikapov 0:704c89673b57 2084
nikapov 0:704c89673b57 2085 /*******************************************************************************
nikapov 0:704c89673b57 2086 * Register : FUNC_SRC
nikapov 0:704c89673b57 2087 * Address : 0X53
nikapov 0:704c89673b57 2088 * Bit Group Name: SENS_HUB_END
nikapov 0:704c89673b57 2089 * Permission : RO
nikapov 0:704c89673b57 2090 *******************************************************************************/
nikapov 0:704c89673b57 2091 typedef enum {
nikapov 0:704c89673b57 2092 LSM6DSL_ACC_GYRO_SENS_HUB_END_STILL_ONGOING =0x00,
nikapov 0:704c89673b57 2093 LSM6DSL_ACC_GYRO_SENS_HUB_END_OP_COMPLETED =0x01,
nikapov 0:704c89673b57 2094 } LSM6DSL_ACC_GYRO_SENS_HUB_END_t;
nikapov 0:704c89673b57 2095
nikapov 0:704c89673b57 2096 #define LSM6DSL_ACC_GYRO_SENS_HUB_END_MASK 0x01
nikapov 0:704c89673b57 2097 mems_status_t LSM6DSL_ACC_GYRO_R_SENS_HUB_END(void *handle, LSM6DSL_ACC_GYRO_SENS_HUB_END_t *value);
nikapov 0:704c89673b57 2098
nikapov 0:704c89673b57 2099 /*******************************************************************************
nikapov 0:704c89673b57 2100 * Register : FUNC_SRC
nikapov 0:704c89673b57 2101 * Address : 0X53
nikapov 0:704c89673b57 2102 * Bit Group Name: SOFT_IRON_END
nikapov 0:704c89673b57 2103 * Permission : RO
nikapov 0:704c89673b57 2104 *******************************************************************************/
nikapov 0:704c89673b57 2105 typedef enum {
nikapov 0:704c89673b57 2106 LSM6DSL_ACC_GYRO_SOFT_IRON_END_NOT_COMPLETED =0x00,
nikapov 0:704c89673b57 2107 LSM6DSL_ACC_GYRO_SOFT_IRON_END_COMPLETED =0x02,
nikapov 0:704c89673b57 2108 } LSM6DSL_ACC_GYRO_SOFT_IRON_END_t;
nikapov 0:704c89673b57 2109
nikapov 0:704c89673b57 2110 #define LSM6DSL_ACC_GYRO_SOFT_IRON_END_MASK 0x02
nikapov 0:704c89673b57 2111 mems_status_t LSM6DSL_ACC_GYRO_R_SOFT_IRON_END(void *handle, LSM6DSL_ACC_GYRO_SOFT_IRON_END_t *value);
nikapov 0:704c89673b57 2112
nikapov 0:704c89673b57 2113 /*******************************************************************************
nikapov 0:704c89673b57 2114 * Register : FUNC_SRC
nikapov 0:704c89673b57 2115 * Address : 0X53
nikapov 0:704c89673b57 2116 * Bit Group Name: HI_FAIL
nikapov 0:704c89673b57 2117 * Permission : RO
nikapov 0:704c89673b57 2118 *******************************************************************************/
nikapov 0:704c89673b57 2119 typedef enum {
nikapov 0:704c89673b57 2120 LSM6DSL_ACC_GYRO_HARD_IRON_NORMAL =0x00,
nikapov 0:704c89673b57 2121 LSM6DSL_ACC_GYRO_HARD_IRON_FAIL =0x04,
nikapov 0:704c89673b57 2122 } LSM6DSL_ACC_GYRO_SOFT_HARD_IRON_STAT_t;
nikapov 0:704c89673b57 2123
nikapov 0:704c89673b57 2124 #define LSM6DSL_ACC_GYRO_HARD_IRON_STAT_MASK 0x04
nikapov 0:704c89673b57 2125 mems_status_t LSM6DSL_ACC_GYRO_R_HardIron(void *handle, LSM6DSL_ACC_GYRO_SOFT_HARD_IRON_STAT_t *value);
nikapov 0:704c89673b57 2126
nikapov 0:704c89673b57 2127 /*******************************************************************************
nikapov 0:704c89673b57 2128 * Register : FUNC_SRC
nikapov 0:704c89673b57 2129 * Address : 0X53
nikapov 0:704c89673b57 2130 * Bit Group Name: STEP_OVERFLOW
nikapov 0:704c89673b57 2131 * Permission : RO
nikapov 0:704c89673b57 2132 *******************************************************************************/
nikapov 0:704c89673b57 2133 typedef enum {
nikapov 0:704c89673b57 2134 LSM6DSL_ACC_GYRO_PEDO_STEP_IN_RANGE =0x00,
nikapov 0:704c89673b57 2135 LSM6DSL_ACC_GYRO_PEDO_ESTEP_OVERFLOW =0x08,
nikapov 0:704c89673b57 2136 } LSM6DSL_ACC_GYRO_STEP_OVERFLOW_t;
nikapov 0:704c89673b57 2137
nikapov 0:704c89673b57 2138 #define LSM6DSL_ACC_GYRO_STEP_OVERFLOW_MASK 0x08
nikapov 0:704c89673b57 2139 mems_status_t LSM6DSL_ACC_GYRO_R_STEP_OVERFLOW(void *handle, LSM6DSL_ACC_GYRO_STEP_OVERFLOW_t *value);
nikapov 0:704c89673b57 2140
nikapov 0:704c89673b57 2141 /*******************************************************************************
nikapov 0:704c89673b57 2142 * Register : FUNC_SRC
nikapov 0:704c89673b57 2143 * Address : 0X53
nikapov 0:704c89673b57 2144 * Bit Group Name: PEDO_EV_STATUS
nikapov 0:704c89673b57 2145 * Permission : RO
nikapov 0:704c89673b57 2146 *******************************************************************************/
nikapov 0:704c89673b57 2147 typedef enum {
nikapov 0:704c89673b57 2148 LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 2149 LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_DETECTED =0x10,
nikapov 0:704c89673b57 2150 } LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_t;
nikapov 0:704c89673b57 2151
nikapov 0:704c89673b57 2152 #define LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_MASK 0x10
nikapov 0:704c89673b57 2153 mems_status_t LSM6DSL_ACC_GYRO_R_PEDO_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_PEDO_EV_STATUS_t *value);
nikapov 0:704c89673b57 2154
nikapov 0:704c89673b57 2155 /*******************************************************************************
nikapov 0:704c89673b57 2156 * Register : FUNC_SRC
nikapov 0:704c89673b57 2157 * Address : 0X53
nikapov 0:704c89673b57 2158 * Bit Group Name: TILT_EV_STATUS
nikapov 0:704c89673b57 2159 * Permission : RO
nikapov 0:704c89673b57 2160 *******************************************************************************/
nikapov 0:704c89673b57 2161 typedef enum {
nikapov 0:704c89673b57 2162 LSM6DSL_ACC_GYRO_TILT_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 2163 LSM6DSL_ACC_GYRO_TILT_EV_STATUS_DETECTED =0x20,
nikapov 0:704c89673b57 2164 } LSM6DSL_ACC_GYRO_TILT_EV_STATUS_t;
nikapov 0:704c89673b57 2165
nikapov 0:704c89673b57 2166 #define LSM6DSL_ACC_GYRO_TILT_EV_STATUS_MASK 0x20
nikapov 0:704c89673b57 2167 mems_status_t LSM6DSL_ACC_GYRO_R_TILT_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_TILT_EV_STATUS_t *value);
nikapov 0:704c89673b57 2168
nikapov 0:704c89673b57 2169 /*******************************************************************************
nikapov 0:704c89673b57 2170 * Register : FUNC_SRC
nikapov 0:704c89673b57 2171 * Address : 0X53
nikapov 0:704c89673b57 2172 * Bit Group Name: SIGN_MOT_EV_STATUS
nikapov 0:704c89673b57 2173 * Permission : RO
nikapov 0:704c89673b57 2174 *******************************************************************************/
nikapov 0:704c89673b57 2175 typedef enum {
nikapov 0:704c89673b57 2176 LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_NOT_DETECTED =0x00,
nikapov 0:704c89673b57 2177 LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_DETECTED =0x40,
nikapov 0:704c89673b57 2178 } LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_t;
nikapov 0:704c89673b57 2179
nikapov 0:704c89673b57 2180 #define LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_MASK 0x40
nikapov 0:704c89673b57 2181 mems_status_t LSM6DSL_ACC_GYRO_R_SIGN_MOT_EV_STATUS(void *handle, LSM6DSL_ACC_GYRO_SIGN_MOT_EV_STATUS_t *value);
nikapov 0:704c89673b57 2182
nikapov 0:704c89673b57 2183 /*******************************************************************************
nikapov 0:704c89673b57 2184 * Register : FUNC_SRC
nikapov 0:704c89673b57 2185 * Address : 0X53
nikapov 0:704c89673b57 2186 * Bit Group Name: STEP_COUNT_DELTA_IA
nikapov 0:704c89673b57 2187 * Permission : RO
nikapov 0:704c89673b57 2188 *******************************************************************************/
nikapov 0:704c89673b57 2189 typedef enum {
nikapov 0:704c89673b57 2190 LSM6DSL_ACC_GYRO_NO_STEP_COUNT_IN_DELTA =0x00,
nikapov 0:704c89673b57 2191 LSM6DSL_ACC_GYRO_STEP_COUNT_IN_DELTA =0x80,
nikapov 0:704c89673b57 2192 } LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA_t;
nikapov 0:704c89673b57 2193
nikapov 0:704c89673b57 2194 #define LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA_MASK 0x80
nikapov 0:704c89673b57 2195 mems_status_t LSM6DSL_ACC_GYRO_R_STEP_COUNT_DELTA(void *handle, LSM6DSL_ACC_GYRO_STEP_COUNT_DELTA_t *value);
nikapov 0:704c89673b57 2196
nikapov 0:704c89673b57 2197 /*******************************************************************************
nikapov 0:704c89673b57 2198 * Register : TAP_CFG1
nikapov 0:704c89673b57 2199 * Address : 0X58
nikapov 0:704c89673b57 2200 * Bit Group Name: LIR
nikapov 0:704c89673b57 2201 * Permission : RW
nikapov 0:704c89673b57 2202 *******************************************************************************/
nikapov 0:704c89673b57 2203 typedef enum {
nikapov 0:704c89673b57 2204 LSM6DSL_ACC_GYRO_LIR_DISABLED =0x00,
nikapov 0:704c89673b57 2205 LSM6DSL_ACC_GYRO_LIR_ENABLED =0x01,
nikapov 0:704c89673b57 2206 } LSM6DSL_ACC_GYRO_LIR_t;
nikapov 0:704c89673b57 2207
nikapov 0:704c89673b57 2208 #define LSM6DSL_ACC_GYRO_LIR_MASK 0x01
nikapov 0:704c89673b57 2209 mems_status_t LSM6DSL_ACC_GYRO_W_LIR(void *handle, LSM6DSL_ACC_GYRO_LIR_t newValue);
nikapov 0:704c89673b57 2210 mems_status_t LSM6DSL_ACC_GYRO_R_LIR(void *handle, LSM6DSL_ACC_GYRO_LIR_t *value);
nikapov 0:704c89673b57 2211
nikapov 0:704c89673b57 2212 /*******************************************************************************
nikapov 0:704c89673b57 2213 * Register : TAP_CFG1
nikapov 0:704c89673b57 2214 * Address : 0X58
nikapov 0:704c89673b57 2215 * Bit Group Name: TAP_Z_EN
nikapov 0:704c89673b57 2216 * Permission : RW
nikapov 0:704c89673b57 2217 *******************************************************************************/
nikapov 0:704c89673b57 2218 typedef enum {
nikapov 0:704c89673b57 2219 LSM6DSL_ACC_GYRO_TAP_Z_EN_DISABLED =0x00,
nikapov 0:704c89673b57 2220 LSM6DSL_ACC_GYRO_TAP_Z_EN_ENABLED =0x02,
nikapov 0:704c89673b57 2221 } LSM6DSL_ACC_GYRO_TAP_Z_EN_t;
nikapov 0:704c89673b57 2222
nikapov 0:704c89673b57 2223 #define LSM6DSL_ACC_GYRO_TAP_Z_EN_MASK 0x02
nikapov 0:704c89673b57 2224 mems_status_t LSM6DSL_ACC_GYRO_W_TAP_Z_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Z_EN_t newValue);
nikapov 0:704c89673b57 2225 mems_status_t LSM6DSL_ACC_GYRO_R_TAP_Z_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Z_EN_t *value);
nikapov 0:704c89673b57 2226
nikapov 0:704c89673b57 2227 /*******************************************************************************
nikapov 0:704c89673b57 2228 * Register : TAP_CFG1
nikapov 0:704c89673b57 2229 * Address : 0X58
nikapov 0:704c89673b57 2230 * Bit Group Name: TAP_Y_EN
nikapov 0:704c89673b57 2231 * Permission : RW
nikapov 0:704c89673b57 2232 *******************************************************************************/
nikapov 0:704c89673b57 2233 typedef enum {
nikapov 0:704c89673b57 2234 LSM6DSL_ACC_GYRO_TAP_Y_EN_DISABLED =0x00,
nikapov 0:704c89673b57 2235 LSM6DSL_ACC_GYRO_TAP_Y_EN_ENABLED =0x04,
nikapov 0:704c89673b57 2236 } LSM6DSL_ACC_GYRO_TAP_Y_EN_t;
nikapov 0:704c89673b57 2237
nikapov 0:704c89673b57 2238 #define LSM6DSL_ACC_GYRO_TAP_Y_EN_MASK 0x04
nikapov 0:704c89673b57 2239 mems_status_t LSM6DSL_ACC_GYRO_W_TAP_Y_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Y_EN_t newValue);
nikapov 0:704c89673b57 2240 mems_status_t LSM6DSL_ACC_GYRO_R_TAP_Y_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_Y_EN_t *value);
nikapov 0:704c89673b57 2241
nikapov 0:704c89673b57 2242 /*******************************************************************************
nikapov 0:704c89673b57 2243 * Register : TAP_CFG1
nikapov 0:704c89673b57 2244 * Address : 0X58
nikapov 0:704c89673b57 2245 * Bit Group Name: TAP_X_EN
nikapov 0:704c89673b57 2246 * Permission : RW
nikapov 0:704c89673b57 2247 *******************************************************************************/
nikapov 0:704c89673b57 2248 typedef enum {
nikapov 0:704c89673b57 2249 LSM6DSL_ACC_GYRO_TAP_X_EN_DISABLED =0x00,
nikapov 0:704c89673b57 2250 LSM6DSL_ACC_GYRO_TAP_X_EN_ENABLED =0x08,
nikapov 0:704c89673b57 2251 } LSM6DSL_ACC_GYRO_TAP_X_EN_t;
nikapov 0:704c89673b57 2252
nikapov 0:704c89673b57 2253 #define LSM6DSL_ACC_GYRO_TAP_X_EN_MASK 0x08
nikapov 0:704c89673b57 2254 mems_status_t LSM6DSL_ACC_GYRO_W_TAP_X_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_X_EN_t newValue);
nikapov 0:704c89673b57 2255 mems_status_t LSM6DSL_ACC_GYRO_R_TAP_X_EN(void *handle, LSM6DSL_ACC_GYRO_TAP_X_EN_t *value);
nikapov 0:704c89673b57 2256 /*******************************************************************************
nikapov 0:704c89673b57 2257 * Register : TAP_CFG1
nikapov 0:704c89673b57 2258 * Address : 0X58
nikapov 0:704c89673b57 2259 * Bit Group Name: SLOPE_FDS
nikapov 0:704c89673b57 2260 * Permission : RW
nikapov 0:704c89673b57 2261 *******************************************************************************/
nikapov 0:704c89673b57 2262 typedef enum {
nikapov 0:704c89673b57 2263 LSM6DSL_ACC_GYRO_SLOPE_FDS_DISABLED =0x00,
nikapov 0:704c89673b57 2264 LSM6DSL_ACC_GYRO_SLOPE_FDS_ENABLED =0x10,
nikapov 0:704c89673b57 2265 } LSM6DSL_ACC_GYRO_SLOPE_FDS_t;
nikapov 0:704c89673b57 2266
nikapov 0:704c89673b57 2267 #define LSM6DSL_ACC_GYRO_SLOPE_FDS_MASK 0x10
nikapov 0:704c89673b57 2268 mems_status_t LSM6DSL_ACC_GYRO_W_SLOPE_FDS(void *handle, LSM6DSL_ACC_GYRO_SLOPE_FDS_t newValue);
nikapov 0:704c89673b57 2269 mems_status_t LSM6DSL_ACC_GYRO_R_SLOPE_FDS(void *handle, LSM6DSL_ACC_GYRO_SLOPE_FDS_t *value);
nikapov 0:704c89673b57 2270
nikapov 0:704c89673b57 2271 /*******************************************************************************
nikapov 0:704c89673b57 2272 * Register : TAP_CFG1
nikapov 0:704c89673b57 2273 * Address : 0X58
nikapov 0:704c89673b57 2274 * Bit Group Name: INTERRUPTS_ENABLE
nikapov 0:704c89673b57 2275 * Permission : RW
nikapov 0:704c89673b57 2276 *******************************************************************************/
nikapov 0:704c89673b57 2277 typedef enum {
nikapov 0:704c89673b57 2278 LSM6DSL_ACC_GYRO_BASIC_INT_DISABLED =0x00,
nikapov 0:704c89673b57 2279 LSM6DSL_ACC_GYRO_BASIC_INT_ENABLED =0x80,
nikapov 0:704c89673b57 2280 } LSM6DSL_ACC_GYRO_INT_EN_t;
nikapov 0:704c89673b57 2281
nikapov 0:704c89673b57 2282 #define LSM6DSL_ACC_GYRO_INT_EN_MASK 0x80
nikapov 0:704c89673b57 2283 mems_status_t LSM6DSL_ACC_GYRO_W_BASIC_INT(void *handle, LSM6DSL_ACC_GYRO_INT_EN_t newValue);
nikapov 0:704c89673b57 2284 mems_status_t LSM6DSL_ACC_GYRO_R_BASIC_INT(void *handle, LSM6DSL_ACC_GYRO_INT_EN_t *value);
nikapov 0:704c89673b57 2285
nikapov 0:704c89673b57 2286 /*******************************************************************************
nikapov 0:704c89673b57 2287 * Register : TAP_THS_6D
nikapov 0:704c89673b57 2288 * Address : 0X59
nikapov 0:704c89673b57 2289 * Bit Group Name: TAP_THS
nikapov 0:704c89673b57 2290 * Permission : RW
nikapov 0:704c89673b57 2291 *******************************************************************************/
nikapov 0:704c89673b57 2292 #define LSM6DSL_ACC_GYRO_TAP_THS_MASK 0x1F
nikapov 0:704c89673b57 2293 #define LSM6DSL_ACC_GYRO_TAP_THS_POSITION 0
nikapov 0:704c89673b57 2294 mems_status_t LSM6DSL_ACC_GYRO_W_TAP_THS(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2295 mems_status_t LSM6DSL_ACC_GYRO_R_TAP_THS(void *handle, u8_t *value);
nikapov 0:704c89673b57 2296
nikapov 0:704c89673b57 2297 /*******************************************************************************
nikapov 0:704c89673b57 2298 * Register : TAP_THS_6D
nikapov 0:704c89673b57 2299 * Address : 0X59
nikapov 0:704c89673b57 2300 * Bit Group Name: SIXD_THS
nikapov 0:704c89673b57 2301 * Permission : RW
nikapov 0:704c89673b57 2302 *******************************************************************************/
nikapov 0:704c89673b57 2303 typedef enum {
nikapov 0:704c89673b57 2304 LSM6DSL_ACC_GYRO_SIXD_THS_80_degree =0x00,
nikapov 0:704c89673b57 2305 LSM6DSL_ACC_GYRO_SIXD_THS_70_degree =0x20,
nikapov 0:704c89673b57 2306 LSM6DSL_ACC_GYRO_SIXD_THS_60_degree =0x40,
nikapov 0:704c89673b57 2307 LSM6DSL_ACC_GYRO_SIXD_THS_50_degree =0x60,
nikapov 0:704c89673b57 2308 } LSM6DSL_ACC_GYRO_SIXD_THS_t;
nikapov 0:704c89673b57 2309
nikapov 0:704c89673b57 2310 #define LSM6DSL_ACC_GYRO_SIXD_THS_MASK 0x60
nikapov 0:704c89673b57 2311 mems_status_t LSM6DSL_ACC_GYRO_W_SIXD_THS(void *handle, LSM6DSL_ACC_GYRO_SIXD_THS_t newValue);
nikapov 0:704c89673b57 2312 mems_status_t LSM6DSL_ACC_GYRO_R_SIXD_THS(void *handle, LSM6DSL_ACC_GYRO_SIXD_THS_t *value);
nikapov 0:704c89673b57 2313
nikapov 0:704c89673b57 2314 /*******************************************************************************
nikapov 0:704c89673b57 2315 * Register : TAP_THS_6D
nikapov 0:704c89673b57 2316 * Address : 0X59
nikapov 0:704c89673b57 2317 * Bit Group Name: D4D_EN
nikapov 0:704c89673b57 2318 * Permission : RW
nikapov 0:704c89673b57 2319 *******************************************************************************/
nikapov 0:704c89673b57 2320 typedef enum {
nikapov 0:704c89673b57 2321 LSM6DSL_ACC_GYRO_D4D_DIS =0x00,
nikapov 0:704c89673b57 2322 LSM6DSL_ACC_GYRO_D4D_EN =0x80,
nikapov 0:704c89673b57 2323 } LSM6DSL_ACC_GYRO_D4D_t;
nikapov 0:704c89673b57 2324
nikapov 0:704c89673b57 2325 #define LSM6DSL_ACC_GYRO_D4D_MASK 0x80
nikapov 0:704c89673b57 2326 mems_status_t LSM6DSL_ACC_GYRO_W_D4D(void *handle, LSM6DSL_ACC_GYRO_D4D_t newValue);
nikapov 0:704c89673b57 2327 mems_status_t LSM6DSL_ACC_GYRO_R_D4D(void *handle, LSM6DSL_ACC_GYRO_D4D_t *value);
nikapov 0:704c89673b57 2328
nikapov 0:704c89673b57 2329 /*******************************************************************************
nikapov 0:704c89673b57 2330 * Register : INT_DUR2
nikapov 0:704c89673b57 2331 * Address : 0X5A
nikapov 0:704c89673b57 2332 * Bit Group Name: SHOCK
nikapov 0:704c89673b57 2333 * Permission : RW
nikapov 0:704c89673b57 2334 *******************************************************************************/
nikapov 0:704c89673b57 2335 #define LSM6DSL_ACC_GYRO_SHOCK_MASK 0x03
nikapov 0:704c89673b57 2336 #define LSM6DSL_ACC_GYRO_SHOCK_POSITION 0
nikapov 0:704c89673b57 2337 mems_status_t LSM6DSL_ACC_GYRO_W_SHOCK_Duration(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2338 mems_status_t LSM6DSL_ACC_GYRO_R_SHOCK_Duration(void *handle, u8_t *value);
nikapov 0:704c89673b57 2339
nikapov 0:704c89673b57 2340 /*******************************************************************************
nikapov 0:704c89673b57 2341 * Register : INT_DUR2
nikapov 0:704c89673b57 2342 * Address : 0X5A
nikapov 0:704c89673b57 2343 * Bit Group Name: QUIET
nikapov 0:704c89673b57 2344 * Permission : RW
nikapov 0:704c89673b57 2345 *******************************************************************************/
nikapov 0:704c89673b57 2346 #define LSM6DSL_ACC_GYRO_QUIET_MASK 0x0C
nikapov 0:704c89673b57 2347 #define LSM6DSL_ACC_GYRO_QUIET_POSITION 2
nikapov 0:704c89673b57 2348 mems_status_t LSM6DSL_ACC_GYRO_W_QUIET_Duration(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2349 mems_status_t LSM6DSL_ACC_GYRO_R_QUIET_Duration(void *handle, u8_t *value);
nikapov 0:704c89673b57 2350
nikapov 0:704c89673b57 2351 /*******************************************************************************
nikapov 0:704c89673b57 2352 * Register : INT_DUR2
nikapov 0:704c89673b57 2353 * Address : 0X5A
nikapov 0:704c89673b57 2354 * Bit Group Name: DUR
nikapov 0:704c89673b57 2355 * Permission : RW
nikapov 0:704c89673b57 2356 *******************************************************************************/
nikapov 0:704c89673b57 2357 #define LSM6DSL_ACC_GYRO_DUR_MASK 0xF0
nikapov 0:704c89673b57 2358 #define LSM6DSL_ACC_GYRO_DUR_POSITION 4
nikapov 0:704c89673b57 2359 mems_status_t LSM6DSL_ACC_GYRO_W_DUR(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2360 mems_status_t LSM6DSL_ACC_GYRO_R_DUR(void *handle, u8_t *value);
nikapov 0:704c89673b57 2361
nikapov 0:704c89673b57 2362 /*******************************************************************************
nikapov 0:704c89673b57 2363 * Register : WAKE_UP_THS
nikapov 0:704c89673b57 2364 * Address : 0X5B
nikapov 0:704c89673b57 2365 * Bit Group Name: WK_THS
nikapov 0:704c89673b57 2366 * Permission : RW
nikapov 0:704c89673b57 2367 *******************************************************************************/
nikapov 0:704c89673b57 2368 #define LSM6DSL_ACC_GYRO_WK_THS_MASK 0x3F
nikapov 0:704c89673b57 2369 #define LSM6DSL_ACC_GYRO_WK_THS_POSITION 0
nikapov 0:704c89673b57 2370 mems_status_t LSM6DSL_ACC_GYRO_W_WK_THS(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2371 mems_status_t LSM6DSL_ACC_GYRO_R_WK_THS(void *handle, u8_t *value);
nikapov 0:704c89673b57 2372
nikapov 0:704c89673b57 2373 /*******************************************************************************
nikapov 0:704c89673b57 2374 * Register : WAKE_UP_THS
nikapov 0:704c89673b57 2375 * Address : 0X5B
nikapov 0:704c89673b57 2376 * Bit Group Name: SINGLE_DOUBLE_TAP
nikapov 0:704c89673b57 2377 * Permission : RW
nikapov 0:704c89673b57 2378 *******************************************************************************/
nikapov 0:704c89673b57 2379 typedef enum {
nikapov 0:704c89673b57 2380 LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_SINGLE_TAP =0x00,
nikapov 0:704c89673b57 2381 LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_DOUBLE_TAP =0x80,
nikapov 0:704c89673b57 2382 } LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_t;
nikapov 0:704c89673b57 2383
nikapov 0:704c89673b57 2384 #define LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_MASK 0x80
nikapov 0:704c89673b57 2385 mems_status_t LSM6DSL_ACC_GYRO_W_SINGLE_DOUBLE_TAP_EV(void *handle, LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_t newValue);
nikapov 0:704c89673b57 2386 mems_status_t LSM6DSL_ACC_GYRO_R_SINGLE_DOUBLE_TAP_EV(void *handle, LSM6DSL_ACC_GYRO_SINGLE_DOUBLE_TAP_t *value);
nikapov 0:704c89673b57 2387
nikapov 0:704c89673b57 2388 /*******************************************************************************
nikapov 0:704c89673b57 2389 * Register : WAKE_UP_DUR
nikapov 0:704c89673b57 2390 * Address : 0X5C
nikapov 0:704c89673b57 2391 * Bit Group Name: SLEEP_DUR
nikapov 0:704c89673b57 2392 * Permission : RW
nikapov 0:704c89673b57 2393 *******************************************************************************/
nikapov 0:704c89673b57 2394 #define LSM6DSL_ACC_GYRO_SLEEP_DUR_MASK 0x0F
nikapov 0:704c89673b57 2395 #define LSM6DSL_ACC_GYRO_SLEEP_DUR_POSITION 0
nikapov 0:704c89673b57 2396 mems_status_t LSM6DSL_ACC_GYRO_W_SLEEP_DUR(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2397 mems_status_t LSM6DSL_ACC_GYRO_R_SLEEP_DUR(void *handle, u8_t *value);
nikapov 0:704c89673b57 2398
nikapov 0:704c89673b57 2399 /*******************************************************************************
nikapov 0:704c89673b57 2400 * Register : WAKE_UP_DUR
nikapov 0:704c89673b57 2401 * Address : 0X5C
nikapov 0:704c89673b57 2402 * Bit Group Name: TIMER_HR
nikapov 0:704c89673b57 2403 * Permission : RW
nikapov 0:704c89673b57 2404 *******************************************************************************/
nikapov 0:704c89673b57 2405 typedef enum {
nikapov 0:704c89673b57 2406 LSM6DSL_ACC_GYRO_TIMER_HR_6_4ms =0x00,
nikapov 0:704c89673b57 2407 LSM6DSL_ACC_GYRO_TIMER_HR_25us =0x10,
nikapov 0:704c89673b57 2408 } LSM6DSL_ACC_GYRO_TIMER_HR_t;
nikapov 0:704c89673b57 2409
nikapov 0:704c89673b57 2410 #define LSM6DSL_ACC_GYRO_TIMER_HR_MASK 0x10
nikapov 0:704c89673b57 2411 mems_status_t LSM6DSL_ACC_GYRO_W_TIMER_HR(void *handle, LSM6DSL_ACC_GYRO_TIMER_HR_t newValue);
nikapov 0:704c89673b57 2412 mems_status_t LSM6DSL_ACC_GYRO_R_TIMER_HR(void *handle, LSM6DSL_ACC_GYRO_TIMER_HR_t *value);
nikapov 0:704c89673b57 2413
nikapov 0:704c89673b57 2414 /*******************************************************************************
nikapov 0:704c89673b57 2415 * Register : WAKE_UP_DUR
nikapov 0:704c89673b57 2416 * Address : 0X5C
nikapov 0:704c89673b57 2417 * Bit Group Name: WAKE_DUR
nikapov 0:704c89673b57 2418 * Permission : RW
nikapov 0:704c89673b57 2419 *******************************************************************************/
nikapov 0:704c89673b57 2420 #define LSM6DSL_ACC_GYRO_WAKE_DUR_MASK 0x60
nikapov 0:704c89673b57 2421 #define LSM6DSL_ACC_GYRO_WAKE_DUR_POSITION 5
nikapov 0:704c89673b57 2422 mems_status_t LSM6DSL_ACC_GYRO_W_WAKE_DUR(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2423 mems_status_t LSM6DSL_ACC_GYRO_R_WAKE_DUR(void *handle, u8_t *value);
nikapov 0:704c89673b57 2424
nikapov 0:704c89673b57 2425 /*******************************************************************************
nikapov 0:704c89673b57 2426 * Register : FREE_FALL
nikapov 0:704c89673b57 2427 * Address : 0X5D
nikapov 0:704c89673b57 2428 * Bit Group Name: FF_DUR
nikapov 0:704c89673b57 2429 * Permission : RW
nikapov 0:704c89673b57 2430 *******************************************************************************/
nikapov 0:704c89673b57 2431 #define LSM6DSL_ACC_GYRO_FF_FREE_FALL_DUR_MASK 0xF8
nikapov 0:704c89673b57 2432 #define LSM6DSL_ACC_GYRO_FF_FREE_FALL_DUR_POSITION 3
nikapov 0:704c89673b57 2433 #define LSM6DSL_ACC_GYRO_FF_WAKE_UP_DUR_MASK 0x80
nikapov 0:704c89673b57 2434 #define LSM6DSL_ACC_GYRO_FF_WAKE_UP_DUR_POSITION 7
nikapov 0:704c89673b57 2435 mems_status_t LSM6DSL_ACC_GYRO_W_FF_Duration(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2436 mems_status_t LSM6DSL_ACC_GYRO_R_FF_Duration(void *handle, u8_t *value);
nikapov 0:704c89673b57 2437
nikapov 0:704c89673b57 2438
nikapov 0:704c89673b57 2439 /*******************************************************************************
nikapov 0:704c89673b57 2440 * Register : FREE_FALL
nikapov 0:704c89673b57 2441 * Address : 0X5D
nikapov 0:704c89673b57 2442 * Bit Group Name: FF_THS
nikapov 0:704c89673b57 2443 * Permission : RW
nikapov 0:704c89673b57 2444 *******************************************************************************/
nikapov 0:704c89673b57 2445 typedef enum {
nikapov 0:704c89673b57 2446 LSM6DSL_ACC_GYRO_FF_THS_156mg =0x00,
nikapov 0:704c89673b57 2447 LSM6DSL_ACC_GYRO_FF_THS_219mg =0x01,
nikapov 0:704c89673b57 2448 LSM6DSL_ACC_GYRO_FF_THS_250mg =0x02,
nikapov 0:704c89673b57 2449 LSM6DSL_ACC_GYRO_FF_THS_312mg =0x03,
nikapov 0:704c89673b57 2450 LSM6DSL_ACC_GYRO_FF_THS_344mg =0x04,
nikapov 0:704c89673b57 2451 LSM6DSL_ACC_GYRO_FF_THS_406mg =0x05,
nikapov 0:704c89673b57 2452 LSM6DSL_ACC_GYRO_FF_THS_469mg =0x06,
nikapov 0:704c89673b57 2453 LSM6DSL_ACC_GYRO_FF_THS_500mg =0x07,
nikapov 0:704c89673b57 2454 } LSM6DSL_ACC_GYRO_FF_THS_t;
nikapov 0:704c89673b57 2455
nikapov 0:704c89673b57 2456 #define LSM6DSL_ACC_GYRO_FF_THS_MASK 0x07
nikapov 0:704c89673b57 2457 mems_status_t LSM6DSL_ACC_GYRO_W_FF_THS(void *handle, LSM6DSL_ACC_GYRO_FF_THS_t newValue);
nikapov 0:704c89673b57 2458 mems_status_t LSM6DSL_ACC_GYRO_R_FF_THS(void *handle, LSM6DSL_ACC_GYRO_FF_THS_t *value);
nikapov 0:704c89673b57 2459
nikapov 0:704c89673b57 2460 /*******************************************************************************
nikapov 0:704c89673b57 2461 * Register : MD1_CFG
nikapov 0:704c89673b57 2462 * Address : 0X5E
nikapov 0:704c89673b57 2463 * Bit Group Name: INT1_TIMER
nikapov 0:704c89673b57 2464 * Permission : RW
nikapov 0:704c89673b57 2465 *******************************************************************************/
nikapov 0:704c89673b57 2466 typedef enum {
nikapov 0:704c89673b57 2467 LSM6DSL_ACC_GYRO_INT1_TIMER_DISABLED =0x00,
nikapov 0:704c89673b57 2468 LSM6DSL_ACC_GYRO_INT1_TIMER_ENABLED =0x01,
nikapov 0:704c89673b57 2469 } LSM6DSL_ACC_GYRO_INT1_TIMER_t;
nikapov 0:704c89673b57 2470
nikapov 0:704c89673b57 2471 #define LSM6DSL_ACC_GYRO_INT1_TIMER_MASK 0x01
nikapov 0:704c89673b57 2472 mems_status_t LSM6DSL_ACC_GYRO_W_TimerEvRouteInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TIMER_t newValue);
nikapov 0:704c89673b57 2473 mems_status_t LSM6DSL_ACC_GYRO_R_TimerEvRouteInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TIMER_t *value);
nikapov 0:704c89673b57 2474
nikapov 0:704c89673b57 2475 /*******************************************************************************
nikapov 0:704c89673b57 2476 * Register : MD1_CFG
nikapov 0:704c89673b57 2477 * Address : 0X5E
nikapov 0:704c89673b57 2478 * Bit Group Name: INT1_TILT
nikapov 0:704c89673b57 2479 * Permission : RW
nikapov 0:704c89673b57 2480 *******************************************************************************/
nikapov 0:704c89673b57 2481 typedef enum {
nikapov 0:704c89673b57 2482 LSM6DSL_ACC_GYRO_INT1_TILT_DISABLED =0x00,
nikapov 0:704c89673b57 2483 LSM6DSL_ACC_GYRO_INT1_TILT_ENABLED =0x02,
nikapov 0:704c89673b57 2484 } LSM6DSL_ACC_GYRO_INT1_TILT_t;
nikapov 0:704c89673b57 2485
nikapov 0:704c89673b57 2486 #define LSM6DSL_ACC_GYRO_INT1_TILT_MASK 0x02
nikapov 0:704c89673b57 2487 mems_status_t LSM6DSL_ACC_GYRO_W_TiltEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TILT_t newValue);
nikapov 0:704c89673b57 2488 mems_status_t LSM6DSL_ACC_GYRO_R_TiltEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TILT_t *value);
nikapov 0:704c89673b57 2489
nikapov 0:704c89673b57 2490 /*******************************************************************************
nikapov 0:704c89673b57 2491 * Register : MD1_CFG
nikapov 0:704c89673b57 2492 * Address : 0X5E
nikapov 0:704c89673b57 2493 * Bit Group Name: INT1_6D
nikapov 0:704c89673b57 2494 * Permission : RW
nikapov 0:704c89673b57 2495 *******************************************************************************/
nikapov 0:704c89673b57 2496 typedef enum {
nikapov 0:704c89673b57 2497 LSM6DSL_ACC_GYRO_INT1_6D_DISABLED =0x00,
nikapov 0:704c89673b57 2498 LSM6DSL_ACC_GYRO_INT1_6D_ENABLED =0x04,
nikapov 0:704c89673b57 2499 } LSM6DSL_ACC_GYRO_INT1_6D_t;
nikapov 0:704c89673b57 2500
nikapov 0:704c89673b57 2501 #define LSM6DSL_ACC_GYRO_INT1_6D_MASK 0x04
nikapov 0:704c89673b57 2502 mems_status_t LSM6DSL_ACC_GYRO_W_6DEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_6D_t newValue);
nikapov 0:704c89673b57 2503 mems_status_t LSM6DSL_ACC_GYRO_R_6DEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_6D_t *value);
nikapov 0:704c89673b57 2504
nikapov 0:704c89673b57 2505 /*******************************************************************************
nikapov 0:704c89673b57 2506 * Register : MD1_CFG
nikapov 0:704c89673b57 2507 * Address : 0X5E
nikapov 0:704c89673b57 2508 * Bit Group Name: INT1_TAP
nikapov 0:704c89673b57 2509 * Permission : RW
nikapov 0:704c89673b57 2510 *******************************************************************************/
nikapov 0:704c89673b57 2511 typedef enum {
nikapov 0:704c89673b57 2512 LSM6DSL_ACC_GYRO_INT1_TAP_DISABLED =0x00,
nikapov 0:704c89673b57 2513 LSM6DSL_ACC_GYRO_INT1_TAP_ENABLED =0x08,
nikapov 0:704c89673b57 2514 } LSM6DSL_ACC_GYRO_INT1_TAP_t;
nikapov 0:704c89673b57 2515
nikapov 0:704c89673b57 2516 #define LSM6DSL_ACC_GYRO_INT1_TAP_MASK 0x08
nikapov 0:704c89673b57 2517 mems_status_t LSM6DSL_ACC_GYRO_W_TapEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TAP_t newValue);
nikapov 0:704c89673b57 2518 mems_status_t LSM6DSL_ACC_GYRO_R_TapEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_TAP_t *value);
nikapov 0:704c89673b57 2519
nikapov 0:704c89673b57 2520 /*******************************************************************************
nikapov 0:704c89673b57 2521 * Register : MD1_CFG
nikapov 0:704c89673b57 2522 * Address : 0X5E
nikapov 0:704c89673b57 2523 * Bit Group Name: INT1_FF
nikapov 0:704c89673b57 2524 * Permission : RW
nikapov 0:704c89673b57 2525 *******************************************************************************/
nikapov 0:704c89673b57 2526 typedef enum {
nikapov 0:704c89673b57 2527 LSM6DSL_ACC_GYRO_INT1_FF_DISABLED =0x00,
nikapov 0:704c89673b57 2528 LSM6DSL_ACC_GYRO_INT1_FF_ENABLED =0x10,
nikapov 0:704c89673b57 2529 } LSM6DSL_ACC_GYRO_INT1_FF_t;
nikapov 0:704c89673b57 2530
nikapov 0:704c89673b57 2531 #define LSM6DSL_ACC_GYRO_INT1_FF_MASK 0x10
nikapov 0:704c89673b57 2532 mems_status_t LSM6DSL_ACC_GYRO_W_FFEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_FF_t newValue);
nikapov 0:704c89673b57 2533 mems_status_t LSM6DSL_ACC_GYRO_R_FFEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_FF_t *value);
nikapov 0:704c89673b57 2534
nikapov 0:704c89673b57 2535 /*******************************************************************************
nikapov 0:704c89673b57 2536 * Register : MD1_CFG
nikapov 0:704c89673b57 2537 * Address : 0X5E
nikapov 0:704c89673b57 2538 * Bit Group Name: INT1_WU
nikapov 0:704c89673b57 2539 * Permission : RW
nikapov 0:704c89673b57 2540 *******************************************************************************/
nikapov 0:704c89673b57 2541 typedef enum {
nikapov 0:704c89673b57 2542 LSM6DSL_ACC_GYRO_INT1_WU_DISABLED =0x00,
nikapov 0:704c89673b57 2543 LSM6DSL_ACC_GYRO_INT1_WU_ENABLED =0x20,
nikapov 0:704c89673b57 2544 } LSM6DSL_ACC_GYRO_INT1_WU_t;
nikapov 0:704c89673b57 2545
nikapov 0:704c89673b57 2546 #define LSM6DSL_ACC_GYRO_INT1_WU_MASK 0x20
nikapov 0:704c89673b57 2547 mems_status_t LSM6DSL_ACC_GYRO_W_WUEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_WU_t newValue);
nikapov 0:704c89673b57 2548 mems_status_t LSM6DSL_ACC_GYRO_R_WUEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_WU_t *value);
nikapov 0:704c89673b57 2549
nikapov 0:704c89673b57 2550 /*******************************************************************************
nikapov 0:704c89673b57 2551 * Register : MD1_CFG
nikapov 0:704c89673b57 2552 * Address : 0X5E
nikapov 0:704c89673b57 2553 * Bit Group Name: INT1_SINGLE_TAP
nikapov 0:704c89673b57 2554 * Permission : RW
nikapov 0:704c89673b57 2555 *******************************************************************************/
nikapov 0:704c89673b57 2556 typedef enum {
nikapov 0:704c89673b57 2557 LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_DISABLED =0x00,
nikapov 0:704c89673b57 2558 LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_ENABLED =0x40,
nikapov 0:704c89673b57 2559 } LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_t;
nikapov 0:704c89673b57 2560
nikapov 0:704c89673b57 2561 #define LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_MASK 0x40
nikapov 0:704c89673b57 2562 mems_status_t LSM6DSL_ACC_GYRO_W_SingleTapOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_t newValue);
nikapov 0:704c89673b57 2563 mems_status_t LSM6DSL_ACC_GYRO_R_SingleTapOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SINGLE_TAP_t *value);
nikapov 0:704c89673b57 2564
nikapov 0:704c89673b57 2565 /*******************************************************************************
nikapov 0:704c89673b57 2566 * Register : MD1_CFG
nikapov 0:704c89673b57 2567 * Address : 0X5E
nikapov 0:704c89673b57 2568 * Bit Group Name: INT1_INACT_STATE
nikapov 0:704c89673b57 2569 * Permission : RW
nikapov 0:704c89673b57 2570 *******************************************************************************/
nikapov 0:704c89673b57 2571 typedef enum {
nikapov 0:704c89673b57 2572 LSM6DSL_ACC_GYRO_INT1_SLEEP_DISABLED =0x00,
nikapov 0:704c89673b57 2573 LSM6DSL_ACC_GYRO_INT1_SLEEP_ENABLED =0x80,
nikapov 0:704c89673b57 2574 } LSM6DSL_ACC_GYRO_INT1_SLEEP_t;
nikapov 0:704c89673b57 2575
nikapov 0:704c89673b57 2576 #define LSM6DSL_ACC_GYRO_INT1_SLEEP_MASK 0x80
nikapov 0:704c89673b57 2577 mems_status_t LSM6DSL_ACC_GYRO_W_SleepEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SLEEP_t newValue);
nikapov 0:704c89673b57 2578 mems_status_t LSM6DSL_ACC_GYRO_R_SleepEvOnInt1(void *handle, LSM6DSL_ACC_GYRO_INT1_SLEEP_t *value);
nikapov 0:704c89673b57 2579
nikapov 0:704c89673b57 2580 /*******************************************************************************
nikapov 0:704c89673b57 2581 * Register : MD2_CFG
nikapov 0:704c89673b57 2582 * Address : 0X5F
nikapov 0:704c89673b57 2583 * Bit Group Name: INT2_IRON
nikapov 0:704c89673b57 2584 * Permission : RW
nikapov 0:704c89673b57 2585 *******************************************************************************/
nikapov 0:704c89673b57 2586 typedef enum {
nikapov 0:704c89673b57 2587 LSM6DSL_ACC_GYRO_INT2_IRON_DISABLED =0x00,
nikapov 0:704c89673b57 2588 LSM6DSL_ACC_GYRO_INT2_IRON_ENABLED =0x01,
nikapov 0:704c89673b57 2589 } LSM6DSL_ACC_GYRO_INT2_IRON_t;
nikapov 0:704c89673b57 2590
nikapov 0:704c89673b57 2591 #define LSM6DSL_ACC_GYRO_INT2_IRON_MASK 0x01
nikapov 0:704c89673b57 2592 mems_status_t LSM6DSL_ACC_GYRO_W_MagCorrection_Int2(void *handle, LSM6DSL_ACC_GYRO_INT2_IRON_t newValue);
nikapov 0:704c89673b57 2593 mems_status_t LSM6DSL_ACC_GYRO_R_MagCorrection_Int2(void *handle, LSM6DSL_ACC_GYRO_INT2_IRON_t *value);
nikapov 0:704c89673b57 2594
nikapov 0:704c89673b57 2595 /*******************************************************************************
nikapov 0:704c89673b57 2596 * Register : MD2_CFG
nikapov 0:704c89673b57 2597 * Address : 0X5F
nikapov 0:704c89673b57 2598 * Bit Group Name: INT2_TILT
nikapov 0:704c89673b57 2599 * Permission : RW
nikapov 0:704c89673b57 2600 *******************************************************************************/
nikapov 0:704c89673b57 2601 typedef enum {
nikapov 0:704c89673b57 2602 LSM6DSL_ACC_GYRO_INT2_TILT_DISABLED =0x00,
nikapov 0:704c89673b57 2603 LSM6DSL_ACC_GYRO_INT2_TILT_ENABLED =0x02,
nikapov 0:704c89673b57 2604 } LSM6DSL_ACC_GYRO_INT2_TILT_t;
nikapov 0:704c89673b57 2605
nikapov 0:704c89673b57 2606 #define LSM6DSL_ACC_GYRO_INT2_TILT_MASK 0x02
nikapov 0:704c89673b57 2607 mems_status_t LSM6DSL_ACC_GYRO_W_TiltEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TILT_t newValue);
nikapov 0:704c89673b57 2608 mems_status_t LSM6DSL_ACC_GYRO_R_TiltEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TILT_t *value);
nikapov 0:704c89673b57 2609
nikapov 0:704c89673b57 2610 /*******************************************************************************
nikapov 0:704c89673b57 2611 * Register : MD2_CFG
nikapov 0:704c89673b57 2612 * Address : 0X5F
nikapov 0:704c89673b57 2613 * Bit Group Name: INT2_6D
nikapov 0:704c89673b57 2614 * Permission : RW
nikapov 0:704c89673b57 2615 *******************************************************************************/
nikapov 0:704c89673b57 2616 typedef enum {
nikapov 0:704c89673b57 2617 LSM6DSL_ACC_GYRO_INT2_6D_DISABLED =0x00,
nikapov 0:704c89673b57 2618 LSM6DSL_ACC_GYRO_INT2_6D_ENABLED =0x04,
nikapov 0:704c89673b57 2619 } LSM6DSL_ACC_GYRO_INT2_6D_t;
nikapov 0:704c89673b57 2620
nikapov 0:704c89673b57 2621 #define LSM6DSL_ACC_GYRO_INT2_6D_MASK 0x04
nikapov 0:704c89673b57 2622 mems_status_t LSM6DSL_ACC_GYRO_W_6DEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_6D_t newValue);
nikapov 0:704c89673b57 2623 mems_status_t LSM6DSL_ACC_GYRO_R_6DEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_6D_t *value);
nikapov 0:704c89673b57 2624
nikapov 0:704c89673b57 2625 /*******************************************************************************
nikapov 0:704c89673b57 2626 * Register : MD2_CFG
nikapov 0:704c89673b57 2627 * Address : 0X5F
nikapov 0:704c89673b57 2628 * Bit Group Name: INT2_TAP
nikapov 0:704c89673b57 2629 * Permission : RW
nikapov 0:704c89673b57 2630 *******************************************************************************/
nikapov 0:704c89673b57 2631 typedef enum {
nikapov 0:704c89673b57 2632 LSM6DSL_ACC_GYRO_INT2_TAP_DISABLED =0x00,
nikapov 0:704c89673b57 2633 LSM6DSL_ACC_GYRO_INT2_TAP_ENABLED =0x08,
nikapov 0:704c89673b57 2634 } LSM6DSL_ACC_GYRO_INT2_TAP_t;
nikapov 0:704c89673b57 2635
nikapov 0:704c89673b57 2636 #define LSM6DSL_ACC_GYRO_INT2_TAP_MASK 0x08
nikapov 0:704c89673b57 2637 mems_status_t LSM6DSL_ACC_GYRO_W_TapEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TAP_t newValue);
nikapov 0:704c89673b57 2638 mems_status_t LSM6DSL_ACC_GYRO_R_TapEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_TAP_t *value);
nikapov 0:704c89673b57 2639
nikapov 0:704c89673b57 2640 /*******************************************************************************
nikapov 0:704c89673b57 2641 * Register : MD2_CFG
nikapov 0:704c89673b57 2642 * Address : 0X5F
nikapov 0:704c89673b57 2643 * Bit Group Name: INT2_FF
nikapov 0:704c89673b57 2644 * Permission : RW
nikapov 0:704c89673b57 2645 *******************************************************************************/
nikapov 0:704c89673b57 2646 typedef enum {
nikapov 0:704c89673b57 2647 LSM6DSL_ACC_GYRO_INT2_FF_DISABLED =0x00,
nikapov 0:704c89673b57 2648 LSM6DSL_ACC_GYRO_INT2_FF_ENABLED =0x10,
nikapov 0:704c89673b57 2649 } LSM6DSL_ACC_GYRO_INT2_FF_t;
nikapov 0:704c89673b57 2650
nikapov 0:704c89673b57 2651 #define LSM6DSL_ACC_GYRO_INT2_FF_MASK 0x10
nikapov 0:704c89673b57 2652 mems_status_t LSM6DSL_ACC_GYRO_W_FFEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_FF_t newValue);
nikapov 0:704c89673b57 2653 mems_status_t LSM6DSL_ACC_GYRO_R_FFEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_FF_t *value);
nikapov 0:704c89673b57 2654
nikapov 0:704c89673b57 2655 /*******************************************************************************
nikapov 0:704c89673b57 2656 * Register : MD2_CFG
nikapov 0:704c89673b57 2657 * Address : 0X5F
nikapov 0:704c89673b57 2658 * Bit Group Name: INT2_WU
nikapov 0:704c89673b57 2659 * Permission : RW
nikapov 0:704c89673b57 2660 *******************************************************************************/
nikapov 0:704c89673b57 2661 typedef enum {
nikapov 0:704c89673b57 2662 LSM6DSL_ACC_GYRO_INT2_WU_DISABLED =0x00,
nikapov 0:704c89673b57 2663 LSM6DSL_ACC_GYRO_INT2_WU_ENABLED =0x20,
nikapov 0:704c89673b57 2664 } LSM6DSL_ACC_GYRO_INT2_WU_t;
nikapov 0:704c89673b57 2665
nikapov 0:704c89673b57 2666 #define LSM6DSL_ACC_GYRO_INT2_WU_MASK 0x20
nikapov 0:704c89673b57 2667 mems_status_t LSM6DSL_ACC_GYRO_W_WUEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_WU_t newValue);
nikapov 0:704c89673b57 2668 mems_status_t LSM6DSL_ACC_GYRO_R_WUEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_WU_t *value);
nikapov 0:704c89673b57 2669
nikapov 0:704c89673b57 2670 /*******************************************************************************
nikapov 0:704c89673b57 2671 * Register : MD2_CFG
nikapov 0:704c89673b57 2672 * Address : 0X5F
nikapov 0:704c89673b57 2673 * Bit Group Name: INT2_SINGLE_TAP
nikapov 0:704c89673b57 2674 * Permission : RW
nikapov 0:704c89673b57 2675 *******************************************************************************/
nikapov 0:704c89673b57 2676 typedef enum {
nikapov 0:704c89673b57 2677 LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_DISABLED =0x00,
nikapov 0:704c89673b57 2678 LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_ENABLED =0x40,
nikapov 0:704c89673b57 2679 } LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_t;
nikapov 0:704c89673b57 2680
nikapov 0:704c89673b57 2681 #define LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_MASK 0x40
nikapov 0:704c89673b57 2682 mems_status_t LSM6DSL_ACC_GYRO_W_SingleTapOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_t newValue);
nikapov 0:704c89673b57 2683 mems_status_t LSM6DSL_ACC_GYRO_R_SingleTapOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SINGLE_TAP_t *value);
nikapov 0:704c89673b57 2684
nikapov 0:704c89673b57 2685 /*******************************************************************************
nikapov 0:704c89673b57 2686 * Register : MD2_CFG
nikapov 0:704c89673b57 2687 * Address : 0X5F
nikapov 0:704c89673b57 2688 * Bit Group Name: INT2_INACT_STATE
nikapov 0:704c89673b57 2689 * Permission : RW
nikapov 0:704c89673b57 2690 *******************************************************************************/
nikapov 0:704c89673b57 2691 typedef enum {
nikapov 0:704c89673b57 2692 LSM6DSL_ACC_GYRO_INT2_SLEEP_DISABLED =0x00,
nikapov 0:704c89673b57 2693 LSM6DSL_ACC_GYRO_INT2_SLEEP_ENABLED =0x80,
nikapov 0:704c89673b57 2694 } LSM6DSL_ACC_GYRO_INT2_SLEEP_t;
nikapov 0:704c89673b57 2695
nikapov 0:704c89673b57 2696 #define LSM6DSL_ACC_GYRO_INT2_SLEEP_MASK 0x80
nikapov 0:704c89673b57 2697 mems_status_t LSM6DSL_ACC_GYRO_W_SleepEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SLEEP_t newValue);
nikapov 0:704c89673b57 2698 mems_status_t LSM6DSL_ACC_GYRO_R_SleepEvOnInt2(void *handle, LSM6DSL_ACC_GYRO_INT2_SLEEP_t *value);
nikapov 0:704c89673b57 2699
nikapov 0:704c89673b57 2700 /*******************************************************************************
nikapov 0:704c89673b57 2701 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 2702 * Output Type : GetAccData
nikapov 0:704c89673b57 2703 * Permission : RO
nikapov 0:704c89673b57 2704 *******************************************************************************/
nikapov 0:704c89673b57 2705 mems_status_t LSM6DSL_ACC_GYRO_GetRawAccData(void *handle, u8_t *buff);
nikapov 0:704c89673b57 2706 mems_status_t LSM6DSL_ACC_Get_Acceleration(void *handle, int *buff, u8_t from_fifo);
nikapov 0:704c89673b57 2707
nikapov 0:704c89673b57 2708 /*******************************************************************************
nikapov 0:704c89673b57 2709 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 2710 * Output Type : GetFIFOData
nikapov 0:704c89673b57 2711 * Permission : RO
nikapov 0:704c89673b57 2712 *******************************************************************************/
nikapov 0:704c89673b57 2713 mems_status_t LSM6DSL_ACC_GYRO_Get_GetFIFOData(void *handle, u8_t *buff);
nikapov 0:704c89673b57 2714 /*******************************************************************************
nikapov 0:704c89673b57 2715 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 2716 * Output Type : GetTimestamp
nikapov 0:704c89673b57 2717 * Permission : RO
nikapov 0:704c89673b57 2718 *******************************************************************************/
nikapov 0:704c89673b57 2719 mems_status_t LSM6DSL_ACC_GYRO_Get_GetTimestamp(void *handle, u8_t *buff);
nikapov 0:704c89673b57 2720 /*******************************************************************************
nikapov 0:704c89673b57 2721 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 2722 * Output Type : GetStepCounter
nikapov 0:704c89673b57 2723 * Permission : RO
nikapov 0:704c89673b57 2724 *******************************************************************************/
nikapov 0:704c89673b57 2725 mems_status_t LSM6DSL_ACC_GYRO_Get_GetStepCounter(void *handle, u8_t *buff);
nikapov 0:704c89673b57 2726
nikapov 0:704c89673b57 2727 /*******************************************************************************
nikapov 0:704c89673b57 2728 * Register : <REGISTER_L> - <REGISTER_H>
nikapov 0:704c89673b57 2729 * Output Type : Pedometer Threshold
nikapov 0:704c89673b57 2730 * Permission : RO
nikapov 0:704c89673b57 2731 *******************************************************************************/
nikapov 0:704c89673b57 2732 mems_status_t LSM6DSL_ACC_GYRO_W_PedoThreshold(void *handle, u8_t newValue);
nikapov 0:704c89673b57 2733
nikapov 0:704c89673b57 2734 /************** Use Sensor Hub *******************/
nikapov 0:704c89673b57 2735
nikapov 0:704c89673b57 2736 /* program to .... */
nikapov 0:704c89673b57 2737 mems_status_t LSM6DSL_ACC_GYRO_SH0_Program(void *handle, u8_t SlvAddr, u8_t Reg, u8_t len);
nikapov 0:704c89673b57 2738
nikapov 0:704c89673b57 2739 /* Program the six Soft Iron Matrix coefficients. */
nikapov 0:704c89673b57 2740 mems_status_t LSM6DSL_ACC_GYRO_SH_init_SI_Matrix(void *handle, u8_t *SI_matrix);
nikapov 0:704c89673b57 2741
nikapov 0:704c89673b57 2742 /* Read a remote device through I2C Sensor Hub Slave 0 */
nikapov 0:704c89673b57 2743 mems_status_t LSM6DSL_ACC_GYRO_SH0_ReadMem(void *handle, u8_t SlvAddr, u8_t Reg, u8_t *Bufp, u8_t len, u8_t stop);
nikapov 0:704c89673b57 2744
nikapov 0:704c89673b57 2745 /* Write a remote device through I2C Sensor Hub Slave 0 */
nikapov 0:704c89673b57 2746 mems_status_t LSM6DSL_ACC_GYRO_SH0_WriteByte(void *handle, u8_t SlvAddr, u8_t Reg, u8_t Bufp);
nikapov 0:704c89673b57 2747
nikapov 0:704c89673b57 2748 #ifdef __cplusplus
nikapov 0:704c89673b57 2749 }
nikapov 0:704c89673b57 2750 #endif
nikapov 0:704c89673b57 2751
nikapov 0:704c89673b57 2752 #endif