Lines Matching +full:0 +full:- +full:7
1 /* sensor_lsm6dsl.h - header file for LSM6DSL accelerometer, gyroscope and
8 * SPDX-License-Identifier: Apache-2.0
28 #define LSM6DSL_REG_FUNC_CFG_ACCESS 0x01
29 #define LSM6DSL_MASK_FUNC_CFG_EN BIT(7)
30 #define LSM6DSL_SHIFT_FUNC_CFG_EN 7
34 #define LSM6DSL_REG_SENSOR_SYNC_TIME_FRAME 0x04
36 BIT(1) | BIT(0))
37 #define LSM6DSL_SHIFT_SENSOR_SYNC_TIME_FRAME_TPH 0
39 #define LSM6DSL_REG_SENSOR_SYNC_RES_RATIO 0x05
40 #define LSM6DSL_MASK_SENSOR_SYNC_RES_RATIO (BIT(1) | BIT(0))
41 #define LSM6DSL_SHIFT_SENSOR_SYNC_RES_RATIO 0
43 #define LSM6DSL_REG_FIFO_CTRL1 0x06
44 #define LSM6DSL_MASK_FIFO_CTRL1_FTH (BIT(7) | BIT(6) | \
47 BIT(1) | BIT(0))
48 #define LSM6DSL_SHIFT_FIFO_CTRL1_FTH 0
50 #define LSM6DSL_REG_FIFO_CTRL2 0x07
51 #define LSM6DSL_MASK_FIFO_CTRL2_TIMER_PEDO_FIFO_EN BIT(7)
52 #define LSM6DSL_SHIFT_FIFO_CTRL2_TIMER_PEDO_FIFO_EN 7
58 BIT(0))
59 #define LSM6DSL_SHIFT_FIFO_CTRL2_FTH 0
61 #define LSM6DSL_REG_FIFO_CTRL3 0x08
66 BIT(0))
67 #define LSM6DSL_SHIFT_FIFO_CTRL3_DEC_FIFO_XL 0
69 #define LSM6DSL_REG_FIFO_CTRL4 0x09
70 #define LSM6DSL_MASK_FIFO_CTRL4_STOP_ON_FTH BIT(7)
71 #define LSM6DSL_SHIFT_FIFO_CTRL4_STOP_ON_FTH 7
78 BIT(0))
79 #define LSM6DSL_SHIFT_FIFO_CTRL4_DEC_DS3_FIFO 0
81 #define LSM6DSL_REG_FIFO_CTRL5 0x0A
86 BIT(0))
87 #define LSM6DSL_SHIFT_FIFO_CTRL5_FIFO_MODE 0
89 #define LSM6DSL_REG_DRDY_PULSE_CFG_G 0x0B
90 #define LSM6DSL_MASK_DRDY_PULSE_CFG_G_DRDY_PULSED BIT(7)
91 #define LSM6DSL_SHIFT_DRDY_PULSE_CFG_G_DRDY_PULSED 7
92 #define LSM6DSL_MASK_DRDY_PULSE_CFG_G_INT2_WRIST_TILT BIT(0)
93 #define LSM6DSL_SHIFT_DRDY_PULSE_CFG_G_INT2_WRIST_TILT 0
95 #define LSM6DSL_REG_INT1_CTRL 0x0D
96 #define LSM6DSL_MASK_INT1_CTRL_STEP_DETECTOR BIT(7)
97 #define LSM6DSL_SHIFT_INT1_CTRL_STEP_DETECTOR 7
110 #define LSM6DSL_MASK_INT1_CTRL_DRDY_XL BIT(0)
111 #define LSM6DSL_SHIFT_INT1_CTRL_DRDY_XL 0
113 #define LSM6DSL_REG_INT2_CTRL 0x0E
114 #define LSM6DSL_MASK_INT2_CTRL_STEP_DELTA BIT(7)
115 #define LSM6DSL_SHIFT_INT2_CTRL_STEP_DELTA 7
128 #define LSM6DSL_MASK_INT2_CTRL_DRDY_XL BIT(0)
129 #define LSM6DSL_SHIFT_INT2_CTRL_DRDY_XL 0
131 #define LSM6DSL_REG_WHO_AM_I 0x0F
132 #define LSM6DSL_VAL_WHO_AM_I 0x6A
134 #define LSM6DSL_REG_CTRL1_XL 0x10
135 #define LSM6DSL_MASK_CTRL1_XL_ODR_XL (BIT(7) | BIT(6) | \
143 #define LSM6DSL_REG_CTRL2_G 0x11
144 #define LSM6DSL_MASK_CTRL2_G_ODR_G (BIT(7) | BIT(6) | \
152 #define LSM6DSL_REG_CTRL3_C 0x12
153 #define LSM6DSL_MASK_CTRL3_C_BOOT BIT(7)
154 #define LSM6DSL_SHIFT_CTRL3_C_BOOT 7
167 #define LSM6DSL_MASK_CTRL3_C_SW_RESET BIT(0)
168 #define LSM6DSL_SHIFT_CTRL3_C_SW_RESET 0
170 #define LSM6DSL_REG_CTRL4_C 0x13
171 #define LSM6DSL_MASK_CTRL4_C_DEN_XL_EN BIT(7)
172 #define LSM6DSL_SHIFT_CTRL4_C_DEN_XL_EN 7
186 #define LSM6DSL_REG_CTRL5_C 0x14
187 #define LSM6DSL_MASK_CTRL5_C_ROUNDING (BIT(7) | BIT(6) | \
194 #define LSM6DSL_MASK_CTRL5_C_ST_XL (BIT(1) | BIT(0))
195 #define LSM6DSL_SHIFT_CTRL5_C_ST_XL 0
197 #define LSM6DSL_REG_CTRL6_C 0x15
198 #define LSM6DSL_MASK_CTRL6_C_TRIG_EN BIT(7)
199 #define LSM6DSL_SHIFT_CTRL6_C_TRIG_EN 7
208 #define LSM6DSL_MASK_CTRL6_C_FTYPE (BIT(0) | BIT(1))
209 #define LSM6DSL_SHIFT_CTRL6_C_FTYPE 0
211 #define LSM6DSL_REG_CTRL7_G 0x16
212 #define LSM6DSL_MASK_CTRL7_G_HM_MODE BIT(7)
213 #define LSM6DSL_SHIFT_CTRL7_G_HM_MODE 7
221 #define LSM6DSL_REG_CTRL8_XL 0x17
222 #define LSM6DSL_MASK_CTRL8_LPF2_XL_EN BIT(7)
223 #define LSM6DSL_SHIFT_CTRL8_LPF2_XL_EN 7
232 #define LSM6DSL_MASK_CTRL8_LOW_PASS_ON_6D BIT(0)
233 #define LSM6DSL_SHIFT_CTRL8_LOW_PASS_ON_6D 0
235 #define LSM6DSL_REG_CTRL9_XL 0x18
236 #define LSM6DSL_MASK_CTRL9_XL_DEN_X BIT(7)
237 #define LSM6DSL_SHIFT_CTRL9_XL_DEN_X 7
247 #define LSM6DSL_REG_CTRL10_C 0x19
248 #define LSM6DSL_MASK_CTRL10_C_WRIST_TILT_EN BIT(7)
249 #define LSM6DSL_SHIFT_CTRL10_C_WRIST_TILT_EN 7
260 #define LSM6DSL_MASK_CTRL10_C_SIGN_MOTION_EN BIT(0)
261 #define LSM6DSL_SHIFT_CTRL10_C_SIGN_MOTION_EN 0
263 #define LSM6DSL_REG_MASTER_CONFIG 0x1A
264 #define LSM6DSL_MASK_MASTER_CONFIG_DRDY_ON_INT1 BIT(7)
265 #define LSM6DSL_SHIFT_MASTER_CONFIG_DRDY_ON_INT1 7
276 #define LSM6DSL_MASK_MASTER_CONFIG_MASTER_ON BIT(0)
277 #define LSM6DSL_SHIFT_MASTER_CONFIG_MASTER_ON 0
279 #define LSM6DSL_REG_WAKE_UP_SRC 0x1B
290 #define LSM6DSL_MASK_WAKE_UP_SRC_Z_WU BIT(0)
291 #define LSM6DSL_SHIFT_WAKE_UP_SRC_Z_WU 0
293 #define LSM6DSL_REG_TAP_SRC 0x1C
306 #define LSM6DSL_MASK_TAP_SRC_Z_TAP BIT(0)
307 #define LSM6DSL_SHIFT_TAP_SRC_Z_TAP 0
309 #define LSM6DSL_REG_D6D_SRC 0x1D
310 #define LSM6DSL_MASK_D6D_SRC_DEN_DRDY BIT(7)
311 #define LSM6DSL_SHIFT_D6D_SRC_DEN_DRDY 7
324 #define LSM6DSL_MASK_D6D_SRC_XL BIT(0)
325 #define LSM6DSL_SHIFT_D6D_SRC_XL 0
327 #define LSM6DSL_REG_STATUS_REG 0x1E
332 #define LSM6DSL_MASK_STATUS_REG_XLDA BIT(0)
333 #define LSM6DSL_SHIFT_STATUS_REG_XLDA 0
335 #define LSM6DSL_REG_OUT_TEMP_L 0x20
336 #define LSM6DSL_REG_OUT_TEMP_H 0x21
337 #define LSM6DSL_REG_OUTX_L_G 0x22
338 #define LSM6DSL_REG_OUTX_H_G 0x23
339 #define LSM6DSL_REG_OUTY_L_G 0x24
340 #define LSM6DSL_REG_OUTY_H_G 0x25
341 #define LSM6DSL_REG_OUTZ_L_G 0x26
342 #define LSM6DSL_REG_OUTZ_H_G 0x27
343 #define LSM6DSL_REG_OUTX_L_XL 0x28
344 #define LSM6DSL_REG_OUTX_H_XL 0x29
345 #define LSM6DSL_REG_OUTY_L_XL 0x2A
346 #define LSM6DSL_REG_OUTY_H_XL 0x2B
347 #define LSM6DSL_REG_OUTZ_L_XL 0x2C
348 #define LSM6DSL_REG_OUTZ_H_XL 0x2D
349 #define LSM6DSL_REG_SENSORHUB1 0x2E
350 #define LSM6DSL_REG_SENSORHUB2 0x2F
351 #define LSM6DSL_REG_SENSORHUB3 0x30
352 #define LSM6DSL_REG_SENSORHUB4 0x31
353 #define LSM6DSL_REG_SENSORHUB5 0x32
354 #define LSM6DSL_REG_SENSORHUB6 0x33
355 #define LSM6DSL_REG_SENSORHUB7 0x34
356 #define LSM6DSL_REG_SENSORHUB8 0x35
357 #define LSM6DSL_REG_SENSORHUB9 0x36
358 #define LSM6DSL_REG_SENSORHUB10 0x37
359 #define LSM6DSL_REG_SENSORHUB11 0x38
360 #define LSM6DSL_REG_SENSORHUB12 0x39
361 #define LSM6DSL_REG_FIFO_STATUS1 0x3A
363 #define LSM6DSL_REG_FIFO_STATUS2 0x3B
364 #define LSM6DSL_MASK_FIFO_STATUS2_WATERM BIT(7)
365 #define LSM6DSL_SHIFT_FIFO_STATUS2_WATERM 7
373 BIT(0))
374 #define LSM6DSL_SHIFT_FIFO_STATUS2_DIFF_FIFO 0
376 #define LSM6DSL_REG_FIFO_STATUS3 0x3C
377 #define LSM6DSL_MASK_FIFO_STATUS3_FIFO_PATTERN 0xFF
378 #define LSM6DSL_SHIFT_FIFO_STATUS3_FIFO_PATTERN 0
380 #define LSM6DSL_REG_FIFO_STATUS4 0x3D
381 #define LSM6DSL_MASK_FIFO_STATUS4_FIFO_PATTERN (BIT(1) | BIT(0))
382 #define LSM6DSL_SHIFT_FIFO_STATUS4_FIFO_PATTERN 0
384 #define LSM6DSL_REG_FIFO_DATA_OUT_L 0x3E
385 #define LSM6DSL_REG_FIFO_DATA_OUT_H 0x3F
386 #define LSM6DSL_REG_TIMESTAMP0 0x40
387 #define LSM6DSL_REG_TIMESTAMP1 0x41
388 #define LSM6DSL_REG_TIMESTAMP2 0x42
389 #define LSM6DSL_REG_STEP_TIMESTAMP_L 0x49
390 #define LSM6DSL_REG_STEP_TIMESTAMP_H 0x4A
391 #define LSM6DSL_REG_STEP_COUNTER_L 0x4B
392 #define LSM6DSL_REG_STEP_COUNTER_H 0x4C
393 #define LSM6DSL_REG_SENSORHUB13 0x4D
394 #define LSM6DSL_REG_SENSORHUB14 0x4E
395 #define LSM6DSL_REG_SENSORHUB15 0x4F
396 #define LSM6DSL_REG_SENSORHUB16 0x50
397 #define LSM6DSL_REG_SENSORHUB17 0x51
398 #define LSM6DSL_REG_SENSORHUB18 0x52
400 #define LSM6DSL_REG_FUNC_SRC1 0x53
401 #define LSM6DSL_MASK_FUNC_SRC1_STEP_COUNT_DELTA_IA BIT(7)
402 #define LSM6DSL_SHIFT_FUNC_SRC1_STEP_COUNT_DELTA_IA 7
415 #define LSM6DSL_MASK_FUNC_SRC1_SENSORHUB_END_OP BIT(0)
416 #define LSM6DSL_SHIFT_FUNC_SRC1_SENSORHUB_END_OP 0
418 #define LSM6DSL_REG_FUNC_SRC2 0x54
427 #define LSM6DSL_MASK_FUNC_SRC2_WRIST_TILT_IA BIT(0)
428 #define LSM6DSL_SHIFT_FUNC_SRC2_WRIST_TILT_IA 0
430 #define LSM6DSL_REG_WRIST_TILT_IA 0x55
431 #define LSM6DSL_MASK_WRIST_TILT_IA_XPOS BIT(7)
432 #define LSM6DSL_SHIFT_WRIST_TILT_IA_XPOS 7
444 #define LSM6DSL_REG_TAP_CFG 0x58
445 #define LSM6DSL_MASK_TAP_CFG_INTERRPUTS_ENABLE BIT(7)
446 #define LSM6DSL_SHIFT_TAP_CFG_INTERRPUTS_ENABLE 7
457 #define LSM6DSL_MASK_TAP_CFG_LIR BIT(0)
458 #define LSM6DSL_SHIFT_TAP_CFG_LIR 0
460 #define LSM6DSL_REG_TAP_THS_6D 0x59
461 #define LSM6DSL_MASK_TAP_THS_6D_D4D_EN BIT(7)
462 #define LSM6DSL_SHIFT_TAP_THS_6D_D4D_EN 7
467 BIT(0))
468 #define LSM6DSL_SHIFT_TAP_THS_6D_TAP_THS 0
470 #define LSM6DSL_REG_INT_DUR2 0x5A
471 #define LSM6DSL_MASK_INT_DUR2_DUR (BIT(7) | BIT(6) | \
476 #define LSM6DSL_MASK_INT_DUR2_SHOCK (BIT(1) | BIT(0))
477 #define LSM6DSL_SHIFT_INT_SHOCK 0
479 #define LSM6DSL_REG_WAKE_UP_THS 0x5B
480 #define LSM6DSL_MASK_WAKE_UP_THS_SINGLE_DOUBLE_TAP BIT(7)
481 #define LSM6DSL_SHIFT_WAKE_UP_THS_SINGLE_DOUBLE_TAP 7
484 BIT(1) | BIT(0))
485 #define LSM6DSL_SHIFT_WAKE_UP_THS_WK_THS 0
487 #define LSM6DSL_REG_WAKE_UP_DUR 0x5C
488 #define LSM6DSL_MASK_WAKE_UP_DUR_FF_DUR5 BIT(7)
489 #define LSM6DSL_SHIFT_WAKE_UP_DUR_FF_DUR5 7
495 BIT(1) | BIT(0))
496 #define LSM6DSL_SHIFT_WAKE_UP_DUR_SLEEP_DUR 0
498 #define LSM6DSL_REG_FREE_FALL 0x5D
499 #define LSM6DSL_MASK_FREE_FALL_DUR (BIT(7) | BIT(6) | \
504 BIT(0))
505 #define LSM6DSL_SHIFT_FREE_FALL_THS 0
507 #define LSM6DSL_REG_MD1_CFG 0x5E
508 #define LSM6DSL_MASK_MD1_CFG_INT1_INACT_STATE BIT(7)
509 #define LSM6DSL_SHIFT_MD1_CFG_INT1_INACT_STATE 7
522 #define LSM6DSL_MASK_MD1_CFG_INT1_TIMER BIT(0)
523 #define LSM6DSL_SHIFT_MD1_CFG_INT1_TIMER 0
525 #define LSM6DSL_REG_MD2_CFG 0x5F
526 #define LSM6DSL_MASK_MD2_CFG_INT2_INACT_STATE BIT(7)
527 #define LSM6DSL_SHIFT_MD2_CFG_INT2_INACT_STATE 7
540 #define LSM6DSL_MASK_MD2_CFG_INT2_IRON BIT(0)
541 #define LSM6DSL_SHIFT_MD2_CFG_INT2_IRON 0
543 #define LSM6DSL_REG_MASTER_CMD_CODE 0x60
544 #define LSM6DSL_REG_SENS_SYNC_SPI_ERROR_CODE 0x61
545 #define LSM6DSL_REG_OUT_MAG_RAW_X_L 0x66
546 #define LSM6DSL_REG_OUT_MAG_RAW_X_H 0x67
547 #define LSM6DSL_REG_OUT_MAG_RAW_Y_L 0x68
548 #define LSM6DSL_REG_OUT_MAG_RAW_Y_H 0x69
549 #define LSM6DSL_REG_OUT_MAG_RAW_Z_L 0x6A
550 #define LSM6DSL_REG_OUT_MAG_RAW_Z_H 0x6B
551 #define LSM6DSL_REG_X_OFS_USR 0x73
552 #define LSM6DSL_REG_Y_OFS_USR 0x74
553 #define LSM6DSL_REG_Z_OFS_USR 0x75
562 #if CONFIG_LSM6DSL_ACCEL_FS == 0
564 #define LSM6DSL_DEFAULT_ACCEL_FULLSCALE 0
567 #define LSM6DSL_DEFAULT_ACCEL_FULLSCALE 0
580 #if (CONFIG_LSM6DSL_ACCEL_ODR == 0)
586 #if CONFIG_LSM6DSL_GYRO_FS == 0
594 #define LSM6DSL_DEFAULT_GYRO_FULLSCALE 0
608 #if (CONFIG_LSM6DSL_GYRO_ODR == 0)