| BlueNRG-1 SDK drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

lsm6ds3.h
Go to the documentation of this file.
1
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __LSM6DS3_H
40 #define __LSM6DS3_H
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48
49
65 #ifndef NULL
66 #define NULL (void *) 0
67 #endif
68
72 typedef struct
73 {
74 uint8_t G_OutputDataRate;
75 uint8_t G_FullScale;
76 uint8_t G_X_Axis;
77 uint8_t G_Y_Axis;
78 uint8_t G_Z_Axis;
79 uint8_t X_OutputDataRate;
80 uint8_t X_FullScale;
81 uint8_t X_X_Axis;
82 uint8_t X_Y_Axis;
83 uint8_t X_Z_Axis;
84 }IMU_6AXES_InitTypeDef;
85
89 typedef enum {
90 IMU_6AXES_OK = 0,
91 IMU_6AXES_ERROR = 1,
92 IMU_6AXES_TIMEOUT = 2,
93 IMU_6AXES_NOT_IMPLEMENTED = 3
94 } IMU_6AXES_StatusTypeDef;
95
96
100 typedef struct {
101 IMU_6AXES_StatusTypeDef (*Init)(IMU_6AXES_InitTypeDef *);
102 IMU_6AXES_StatusTypeDef (*Read_XG_ID)(uint8_t *);
103 IMU_6AXES_StatusTypeDef (*Get_X_Axes)(int32_t *);
104 IMU_6AXES_StatusTypeDef (*Get_X_AxesRaw)(int16_t *);
105 IMU_6AXES_StatusTypeDef (*Get_G_Axes)(int32_t *);
106 IMU_6AXES_StatusTypeDef (*Get_G_AxesRaw)(int16_t *);
107 IMU_6AXES_StatusTypeDef (*Get_X_ODR) (float *);
108 IMU_6AXES_StatusTypeDef (*Set_X_ODR) (float);
109 IMU_6AXES_StatusTypeDef (*Get_X_Sensitivity) (float *);
110 IMU_6AXES_StatusTypeDef (*Get_X_FS) (float *);
111 IMU_6AXES_StatusTypeDef (*Set_X_FS) (float);
112 IMU_6AXES_StatusTypeDef (*Get_G_ODR) (float *);
113 IMU_6AXES_StatusTypeDef (*Set_G_ODR) (float);
114 IMU_6AXES_StatusTypeDef (*Get_G_Sensitivity) (float *);
115 IMU_6AXES_StatusTypeDef (*Get_G_FS) (float *);
116 IMU_6AXES_StatusTypeDef (*Set_G_FS) (float);
117 }IMU_6AXES_DrvTypeDef;
118
119
120 /******************************************************************************/
121 /*********** START ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/
122 /******************************************************************************/
123
124
125 /***************************************** COMMON REGISTERS ********************************************/
126
136 #define LSM6DS3_XG_FUNC_CFG_ACCESS 0x01
137
146 #define LSM6DS3_XG_SENSOR_SYNC_TIME_FRAME 0x04
147
158 #define LSM6DS3_XG_SENSOR_SYNC_ENABLE 0x05
159
160
169 #define LSM6DS3_XG_FIFO_CTRL1 0x06
170
182 #define LSM6DS3_XG_FIFO_CTRL2 0x07
183
194 #define LSM6DS3_XG_FIFO_CTRL3 0x08
195
207 #define LSM6DS3_XG_FIFO_CTRL4 0x09
208
209
220 #define LSM6DS3_XG_FIFO_CTRL5 0x0A
221
222
235 #define LSM6DS3_XG_ORIENT_CFG_G 0x0B
236
252 #define LSM6DS3_XG_INT1_CTRL 0x0D
253
254
255 //new, done
271 #define LSM6DS3_XG_INT2_CTRL 0x0E
272
273
282 #define LSM6DS3_XG_WHO_AM_I_ADDR 0x0F
283
284
300 #define LSM6DS3_XG_CTRL3_C 0x12
301
318 #define LSM6DS3_XG_CTRL4_C 0x13
319
330 #define LSM6DS3_XG_CTRL5_C 0x14
331
332
347 #define LSM6DS3_XG_CTRL10_C 0x19
348
349
365 #define LSM6DS3_XG_MASTER_CONFIG 0x1A
366
367
382 #define LSM6DS3_XG_WAKE_UP_SRC 0x1B
383
399 #define LSM6DS3_XG_TAP_SRC 0x1C
400
416 #define LSM6DS3_XG_D6D_SRC 0x1D
417
430 #define LSM6DS3_XG_STATUS_REG 0x1E
431
440 #define LSM6DS3_XG_FIFO_STATUS1 0x3A
441
454 #define LSM6DS3_XG_FIFO_STATUS2 0x3B
455
464 #define LSM6DS3_XG_FIFO_STATUS3 0x3C
465
474 #define LSM6DS3_XG_FIFO_STATUS4 0x3D
475
484 #define LSM6DS3_XG_FIFO_STATUS4 0x3D
485
494 #define LSM6DS3_XG_FIFO_DATA_OUT_L 0x3E
495
504 #define LSM6DS3_XG_FIFO_DATA_OUT_H 0x3F
505
514 #define LSM6DS3_XG_TIMESTAMP0_REG 0x40
515
524 #define LSM6DS3_XG_TIMESTAMP1_REG 0x41
525
534 #define LSM6DS3_XG_TIMESTAMP2_REG 0x42
535
544 #define LSM6DS3_XG_STEP_COUNTER_L 0x4B
545
554 #define LSM6DS3_XG_STEP_COUNTER_H 0x4C
555
570 #define LSM6DS3_XG_FUNC_SRC 0x53
571
587 #define LSM6DS3_XG_TAP_CFG 0x58
588
599 #define LSM6DS3_XG_TAP_THS_6D 0x59
600
611 #define LSM6DS3_XG_INT_DUR2 0x5A
612
623 #define LSM6DS3_XG_WAKE_UP_THS 0x5B
624
636 #define LSM6DS3_XG_WAKE_UP_DUR 0x5C
637
647 #define LSM6DS3_XG_WAKE_FREE_FALL 0x5D
648
664 #define LSM6DS3_XG_MD1_CFG 0x5E
665
681 #define LSM6DS3_XG_MD2_CFG 0x5F
682
683 /***************************************** SENSORHUB REGISTERS ********************************************/
684
693 #define LSM6DS3_XG_SENSORHUB1_REG 0x2E
694
703 #define LSM6DS3_XG_SENSORHUB2_REG 0x2F
704
713 #define LSM6DS3_XG_SENSORHUB3_REG 0x30
714
723 #define LSM6DS3_XG_SENSORHUB4_REG 0x31
724
733 #define LSM6DS3_XG_SENSORHUB5_REG 0x32
734
743 #define LSM6DS3_XG_SENSORHUB6_REG 0x33
744
753 #define LSM6DS3_XG_SENSORHUB7_REG 0x34
754
763 #define LSM6DS3_XG_SENSORHUB8_REG 0x35
764
773 #define LSM6DS3_XG_SENSORHUB9_REG 0x36
774
783 #define LSM6DS3_XG_SENSORHUB10_REG 0x37
784
793 #define LSM6DS3_XG_SENSORHUB11_REG 0x38
794
803 #define LSM6DS3_XG_SENSORHUB12_REG 0x39
804
805
806
807
808 /***************************************** GYROSCOPE REGISTERS ********************************************/
809
821 #define LSM6DS3_XG_CTRL2_G 0x11
822
823
836 #define LSM6DS3_XG_CTRL6_G 0x15
837
838
850 #define LSM6DS3_XG_CTRL7_G 0x16
851
858 #define LSM6DS3_XG_OUT_X_L_G 0x22
859
860
867 #define LSM6DS3_XG_OUT_X_H_G 0x23
868
869
876 #define LSM6DS3_XG_OUT_Y_L_G 0x24
877
878
885 #define LSM6DS3_XG_OUT_Y_H_G 0x25
886
887
894 #define LSM6DS3_XG_OUT_Z_L_G 0x26
895
896
903 #define LSM6DS3_XG_OUT_Z_H_G 0x27
904
905
906
907 /*************************************** ACCELEROMETER REGISTERS *******************************************/
908
919 #define LSM6DS3_XG_CTRL1_XL 0x10
920
931 #define LSM6DS3_XG_CTRL8_XL 0x17
932
945 #define LSM6DS3_XG_CTRL9_XL 0x18
946
947
954 #define LSM6DS3_XG_OUT_X_L_XL 0x28
955
956
963 #define LSM6DS3_XG_OUT_X_H_XL 0x29
964
965
972 #define LSM6DS3_XG_OUT_Y_L_XL 0x2A
973
974
981 #define LSM6DS3_XG_OUT_Y_H_XL 0x2B
982
983
990 #define LSM6DS3_XG_OUT_Z_L_XL 0x2C
991
992
999 #define LSM6DS3_XG_OUT_Z_H_XL 0x2D
1000
1001 /******************************************************************************/
1002 /************* END ACCELEROMETER AND GYROSCOPE REGISTER MAPPING **************/
1003 /******************************************************************************/
1004
1005
1006 /************************************** COMMON REGISTERS VALUE *******************************************/
1007
1011 #define LSM6DS3_ADDRESS_LOW 0xD4 // SAD[0] = 0
1012 #define LSM6DS3_ADDRESS_HIGH 0xD6 // SAD[0] = 1
1013 #define LSM6DS3_XG_MEMS_ADDRESS LSM6DS3_ADDRESS_LOW // SAD[0] = 0
1014
1015
1019 #define I_AM_LSM6DS3_XG ((uint8_t)0x69)
1020
1021
1027 #define LSM6DS3_XG_IF_INC ((uint8_t)0x04)
1028
1029 #define LSM6DS3_XG_IF_INC_MASK ((uint8_t)0x04)
1030
1034 #define LSM6DS3_XG_FIFO_ODR_NA ((uint8_t)0x00)
1035 #define LSM6DS3_XG_FIFO_ODR_10HZ ((uint8_t)0x08)
1036 #define LSM6DS3_XG_FIFO_ODR_25HZ ((uint8_t)0x10)
1037 #define LSM6DS3_XG_FIFO_ODR_50HZ ((uint8_t)0x18)
1038 #define LSM6DS3_XG_FIFO_ODR_100HZ ((uint8_t)0x20)
1039 #define LSM6DS3_XG_FIFO_ODR_200HZ ((uint8_t)0x28)
1040 #define LSM6DS3_XG_FIFO_ODR_400HZ ((uint8_t)0x30)
1041 #define LSM6DS3_XG_FIFO_ODR_800HZ ((uint8_t)0x38)
1042 #define LSM6DS3_XG_FIFO_ODR_1600HZ ((uint8_t)0x40)
1043 #define LSM6DS3_XG_FIFO_ODR_3300HZ ((uint8_t)0x48)
1044 #define LSM6DS3_XG_FIFO_ODR_6600HZ ((uint8_t)0x50)
1046 #define LSM6DS3_XG_FIFO_ODR_MASK ((uint8_t)0x78)
1047
1054 #define LSM6DS3_XG_FIFO_MODE_BYPASS ((uint8_t)0x00)
1055 #define LSM6DS3_XG_FIFO_MODE_FIFO ((uint8_t)0x01)
1056 #define LSM6DS3_XG_FIFO_MODE_CONTINUOUS_THEN_FIFO ((uint8_t)0x03)
1057 #define LSM6DS3_XG_FIFO_MODE_BYPASS_THEN_CONTINUOUS ((uint8_t)0x04)
1058 #define LSM6DS3_XG_FIFO_MODE_CONTINUOUS_OVERWRITE ((uint8_t)0x05)
1060 #define LSM6DS3_XG_FIFO_MODE_MASK ((uint8_t)0x07)
1061
1066 /************************************** GYROSCOPE REGISTERS VALUE *******************************************/
1067
1068
1072 #define LSM6DS3_G_ODR_PD ((uint8_t)0x00)
1073 #define LSM6DS3_G_ODR_13HZ ((uint8_t)0x10)
1074 #define LSM6DS3_G_ODR_26HZ ((uint8_t)0x20)
1075 #define LSM6DS3_G_ODR_52HZ ((uint8_t)0x30)
1076 #define LSM6DS3_G_ODR_104HZ ((uint8_t)0x40)
1077 #define LSM6DS3_G_ODR_208HZ ((uint8_t)0x50)
1078 #define LSM6DS3_G_ODR_416HZ ((uint8_t)0x60)
1079 #define LSM6DS3_G_ODR_833HZ ((uint8_t)0x70)
1080 #define LSM6DS3_G_ODR_1660HZ ((uint8_t)0x80)
1082 #define LSM6DS3_G_ODR_MASK ((uint8_t)0xF0)
1083
1092 #define LSM6DS3_G_FS_125_DISABLE ((uint8_t)0x00)
1093 #define LSM6DS3_G_FS_125_ENABLE ((uint8_t)0x02)
1095 #define LSM6DS3_G_FS_125_MASK ((uint8_t)0x02)
1096
1097 #define LSM6DS3_G_FS_245 ((uint8_t)0x00)
1098 #define LSM6DS3_G_FS_500 ((uint8_t)0x04)
1099 #define LSM6DS3_G_FS_1000 ((uint8_t)0x08)
1100 #define LSM6DS3_G_FS_2000 ((uint8_t)0x0C)
1102 #define LSM6DS3_G_FS_MASK ((uint8_t)0x0C)
1103
1112 #define LSM6DS3_G_ZEN_DISABLE ((uint8_t)0x00)
1113 #define LSM6DS3_G_ZEN_ENABLE ((uint8_t)0x20)
1115 #define LSM6DS3_G_ZEN_MASK ((uint8_t)0x20)
1116
1125 #define LSM6DS3_G_YEN_DISABLE ((uint8_t)0x00)
1126 #define LSM6DS3_G_YEN_ENABLE ((uint8_t)0x10)
1128 #define LSM6DS3_G_YEN_MASK ((uint8_t)0x10)
1129
1138 #define LSM6DS3_G_XEN_DISABLE ((uint8_t)0x00)
1139 #define LSM6DS3_G_XEN_ENABLE ((uint8_t)0x08)
1141 #define LSM6DS3_G_XEN_MASK ((uint8_t)0x08)
1142
1148 /************************************ ACCELEROMETER REGISTERS VALUE *****************************************/
1149
1153 #define LSM6DS3_XL_ODR_PD ((uint8_t)0x00)
1154 #define LSM6DS3_XL_ODR_13HZ ((uint8_t)0x10)
1155 #define LSM6DS3_XL_ODR_26HZ ((uint8_t)0x20)
1156 #define LSM6DS3_XL_ODR_52HZ ((uint8_t)0x30)
1157 #define LSM6DS3_XL_ODR_104HZ ((uint8_t)0x40)
1158 #define LSM6DS3_XL_ODR_208HZ ((uint8_t)0x50)
1159 #define LSM6DS3_XL_ODR_416HZ ((uint8_t)0x60)
1160 #define LSM6DS3_XL_ODR_833HZ ((uint8_t)0x70)
1161 #define LSM6DS3_XL_ODR_1660HZ ((uint8_t)0x80)
1162 #define LSM6DS3_XL_ODR_3330HZ ((uint8_t)0x90)
1163 #define LSM6DS3_XL_ODR_6660HZ ((uint8_t)0xA0)
1165 #define LSM6DS3_XL_ODR_MASK ((uint8_t)0xF0)
1166
1175 #define LSM6DS3_XL_FS_2G ((uint8_t)0x00)
1176 #define LSM6DS3_XL_FS_4G ((uint8_t)0x08)
1177 #define LSM6DS3_XL_FS_8G ((uint8_t)0x0C)
1178 #define LSM6DS3_XL_FS_16G ((uint8_t)0x04)
1180 #define LSM6DS3_XL_FS_MASK ((uint8_t)0x0C)
1181
1190 #define LSM6DS3_XL_BW_400HZ ((uint8_t)0x00)
1191 #define LSM6DS3_XL_BW_200HZ ((uint8_t)0x01)
1192 #define LSM6DS3_XL_BW_100HZ ((uint8_t)0x02)
1193 #define LSM6DS3_XL_BW_50HZ ((uint8_t)0x03)
1195 #define LSM6DS3_XL_BW_MASK ((uint8_t)0x03)
1196
1205 #define LSM6DS3_XL_ZEN_DISABLE ((uint8_t)0x00)
1206 #define LSM6DS3_XL_ZEN_ENABLE ((uint8_t)0x20)
1208 #define LSM6DS3_XL_ZEN_MASK ((uint8_t)0x20)
1209
1218 #define LSM6DS3_XL_YEN_DISABLE ((uint8_t)0x00)
1219 #define LSM6DS3_XL_YEN_ENABLE ((uint8_t)0x10)
1221 #define LSM6DS3_XL_YEN_MASK ((uint8_t)0x10)
1222
1231 #define LSM6DS3_XL_XEN_DISABLE ((uint8_t)0x00)
1232 #define LSM6DS3_XL_XEN_ENABLE ((uint8_t)0x08)
1234 #define LSM6DS3_XL_XEN_MASK ((uint8_t)0x08)
1235
1243 #define LSM6DS3_XG_WAKE_UP_DUR_FF_DUR5_DEFAULT ((uint8_t)0x00)
1244
1245 #define LSM6DS3_XG_WAKE_UP_DUR_FF_DUR5_MASK ((uint8_t)0x80)
1246
1253 #define LSM6DS3_XG_WAKE_UP_DUR_WAKE_DUR_DEFAULT ((uint8_t)0x00)
1254
1255 #define LSM6DS3_XG_WAKE_UP_DUR_WAKE_DUR_MASK ((uint8_t)0x60)
1256
1263 #define LSM6DS3_XG_WAKE_UP_DUR_TIMER_HR_DEFAULT ((uint8_t)0x00)
1264
1265 #define LSM6DS3_XG_WAKE_UP_DUR_TIMER_HR_MASK ((uint8_t)0x10)
1266
1273 #define LSM6DS3_XG_WAKE_UP_DUR_SLEEP_DUR_DEFAULT ((uint8_t)0x00)
1274
1275 #define LSM6DS3_XG_WAKE_UP_DUR_SLEEP_DUR_MASK ((uint8_t)0x0F)
1276
1283 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_DUR_DEFAULT ((uint8_t)0x00)
1284 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_DUR_TYPICAL ((uint8_t)0x30)
1285
1286 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_DUR_MASK ((uint8_t)0xF8)
1287
1294 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_156MG ((uint8_t)0x00)
1295 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_219MG ((uint8_t)0x01)
1296 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_250MG ((uint8_t)0x02)
1297 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_312MG ((uint8_t)0x03)
1298 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_344MG ((uint8_t)0x04)
1299 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_406MG ((uint8_t)0x05)
1300 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_469MG ((uint8_t)0x06)
1301 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_500MG ((uint8_t)0x07)
1302
1303 #define LSM6DS3_XG_WAKE_FREE_FALL_FF_THS_MASK ((uint8_t)0x07)
1304
1313 #define LSM6DS3_XG_MD1_CFG_INT1_INACT_STATE_DISABLE ((uint8_t)0x00)
1314 #define LSM6DS3_XG_MD1_CFG_INT1_INACT_STATE_ENABLE ((uint8_t)0x80)
1315
1316 #define LSM6DS3_XG_MD1_CFG_INT1_INACT_STATE_MASK ((uint8_t)0x80)
1317
1324 #define LSM6DS3_XG_MD1_CFG_INT1_SINGLE_TAP_DISABLE ((uint8_t)0x00)
1325 #define LSM6DS3_XG_MD1_CFG_INT1_SINGLE_TAP_ENABLE ((uint8_t)0x40)
1326
1327 #define LSM6DS3_XG_MD1_CFG_INT1_SINGLE_TAP_MASK ((uint8_t)0x40)
1328
1335 #define LSM6DS3_XG_MD1_CFG_INT1_WU_DISABLE ((uint8_t)0x00)
1336 #define LSM6DS3_XG_MD1_CFG_INT1_WU_ENABLE ((uint8_t)0x20)
1337
1338 #define LSM6DS3_XG_MD1_CFG_INT1_WU_MASK ((uint8_t)0x20)
1339
1346 #define LSM6DS3_XG_MD1_CFG_INT1_FF_DISABLE ((uint8_t)0x00)
1347 #define LSM6DS3_XG_MD1_CFG_INT1_FF_ENABLE ((uint8_t)0x10)
1348
1349 #define LSM6DS3_XG_MD1_CFG_INT1_FF_MASK ((uint8_t)0x10)
1350
1357 #define LSM6DS3_XG_MD1_CFG_INT1_DOUBLE_TAP_DISABLE ((uint8_t)0x00)
1358 #define LSM6DS3_XG_MD1_CFG_INT1_DOUBLE_TAP_ENABLE ((uint8_t)0x08)
1359
1360 #define LSM6DS3_XG_MD1_CFG_INT1_DOUBLE_TAP_MASK ((uint8_t)0x08)
1361
1368 #define LSM6DS3_XG_MD1_CFG_INT1_6D_DISABLE ((uint8_t)0x00)
1369 #define LSM6DS3_XG_MD1_CFG_INT1_6D_ENABLE ((uint8_t)0x04)
1370
1371 #define LSM6DS3_XG_MD1_CFG_INT1_6D_MASK ((uint8_t)0x04)
1372
1379 #define LSM6DS3_XG_MD1_CFG_INT1_TILT_DISABLE ((uint8_t)0x00)
1380 #define LSM6DS3_XG_MD1_CFG_INT1_TILT_ENABLE ((uint8_t)0x02)
1381
1382 #define LSM6DS3_XG_MD1_CFG_INT1_TILT_MASK ((uint8_t)0x02)
1383
1390 #define LSM6DS3_XG_MD1_CFG_INT1_TIMER_DISABLE ((uint8_t)0x00)
1391 #define LSM6DS3_XG_MD1_CFG_INT1_TIMER_ENABLE ((uint8_t)0x01)
1392
1393 #define LSM6DS3_XG_MD1_CFG_INT1_TIMER_MASK ((uint8_t)0x01)
1394
1402 #define LSM6DS3_XG_WAKE_UP_SRC_FF_IA_DISABLE ((uint8_t)0x00)
1403 #define LSM6DS3_XG_WAKE_UP_SRC_FF_IA_ENABLE ((uint8_t)0x20)
1404
1405 #define LSM6DS3_XG_WAKE_UP_SRC_FF_IA_MASK ((uint8_t)0x20)
1406
1413 #define LSM6DS3_XG_WAKE_UP_SRC_SLEEP_STATE_IA_DISABLE ((uint8_t)0x00)
1414 #define LSM6DS3_XG_WAKE_UP_SRC_SLEEP_STATE_IA_ENABLE ((uint8_t)0x10)
1415
1416 #define LSM6DS3_XG_WAKE_UP_SRC_SLEEP_STATE_IA_MASK ((uint8_t)0x10)
1417
1424 #define LSM6DS3_XG_WAKE_UP_SRC_WU_IA_DISABLE ((uint8_t)0x00)
1425 #define LSM6DS3_XG_WAKE_UP_SRC_WU_IA_ENABLE ((uint8_t)0x08)
1426
1427 #define LSM6DS3_XG_WAKE_UP_SRC_WU_IA_MASK ((uint8_t)0x08)
1428
1435 #define LSM6DS3_XG_WAKE_UP_SRC_X_WU_DISABLE ((uint8_t)0x00)
1436 #define LSM6DS3_XG_WAKE_UP_SRC_X_WU_ENABLE ((uint8_t)0x04)
1437
1438 #define LSM6DS3_XG_WAKE_UP_SRC_X_WU_MASK ((uint8_t)0x04)
1439
1446 #define LSM6DS3_XG_WAKE_UP_SRC_Y_WU_DISABLE ((uint8_t)0x00)
1447 #define LSM6DS3_XG_WAKE_UP_SRC_Y_WU_ENABLE ((uint8_t)0x02)
1448
1449
1450 #define LSM6DS3_XG_WAKE_UP_SRC_Y_WU_MASK ((uint8_t)0x02)
1451
1458 #define LSM6DS3_XG_WAKE_UP_SRC_Z_WU_DISABLE ((uint8_t)0x00)
1459 #define LSM6DS3_XG_WAKE_UP_SRC_Z_WU_ENABLE ((uint8_t)0x01)
1460
1461 #define LSM6DS3_XG_WAKE_UP_SRC_Z_WU_MASK ((uint8_t)0x01)
1462
1474 /* Six axes sensor IO functions */
1475 extern IMU_6AXES_StatusTypeDef LSM6DS3_IO_Init( void );
1476 extern IMU_6AXES_StatusTypeDef LSM6DS3_IO_Write( uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToWrite );
1477 extern IMU_6AXES_StatusTypeDef LSM6DS3_IO_Read( uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead );
1478 extern void LSM6DS3_IO_ITConfig( void );
1479
1490 typedef struct {
1491 IMU_6AXES_StatusTypeDef (*Enable_Free_Fall_Detection) (void);
1492 IMU_6AXES_StatusTypeDef (*Disable_Free_Fall_Detection) (void);
1493 IMU_6AXES_StatusTypeDef (*Get_Status_Free_Fall_Detection) (uint8_t *);
1494 }LSM6DS3_DrvExtTypeDef;
1495
1504 /* Six axes sensor driver structure */
1505 extern IMU_6AXES_DrvTypeDef LSM6DS3Drv;
1506
1507 extern LSM6DS3_DrvExtTypeDef LSM6DS3Drv_ext_internal;
1525 #ifdef __cplusplus
1526 }
1527 #endif
1528
1529 #endif /* __LSM6DS3_H */
1530
1531 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
IMU_6AXES_NOT_IMPLEMENTED
Definition: lsm6ds3.h:93
IMU_6AXES_InitTypeDef
IMU_6AXES init structure definition.
Definition: lsm6ds3.h:72
LSM6DS3_IO_Write
IMU_6AXES_StatusTypeDef LSM6DS3_IO_Write(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToWrite)
LSM6DS3_IO_ITConfig
void LSM6DS3_IO_ITConfig(void)
IMU_6AXES_InitTypeDef::G_Y_Axis
uint8_t G_Y_Axis
Definition: lsm6ds3.h:77
IMU_6AXES_InitTypeDef::X_FullScale
uint8_t X_FullScale
Definition: lsm6ds3.h:80
IMU_6AXES_InitTypeDef::G_OutputDataRate
uint8_t G_OutputDataRate
Definition: lsm6ds3.h:74
IMU_6AXES_InitTypeDef::G_FullScale
uint8_t G_FullScale
Definition: lsm6ds3.h:75
IMU_6AXES_InitTypeDef::X_X_Axis
uint8_t X_X_Axis
Definition: lsm6ds3.h:81
IMU_6AXES_ERROR
Definition: lsm6ds3.h:91
IMU_6AXES_InitTypeDef::X_Y_Axis
uint8_t X_Y_Axis
Definition: lsm6ds3.h:82
IMU_6AXES_TIMEOUT
Definition: lsm6ds3.h:92
LSM6DS3_IO_Read
IMU_6AXES_StatusTypeDef LSM6DS3_IO_Read(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead)
IMU_6AXES_StatusTypeDef
IMU_6AXES_StatusTypeDef
IMU_6AXES status enumerator definition.
Definition: lsm6ds3.h:89
LSM6DS3_IO_Init
IMU_6AXES_StatusTypeDef LSM6DS3_IO_Init(void)
LSM6DS3Drv
IMU_6AXES_DrvTypeDef LSM6DS3Drv
IMU_6AXES_OK
Definition: lsm6ds3.h:90
IMU_6AXES_DrvTypeDef
IMU_6AXES driver structure definition.
Definition: lsm6ds3.h:100
IMU_6AXES_InitTypeDef::X_OutputDataRate
uint8_t X_OutputDataRate
Definition: lsm6ds3.h:79
IMU_6AXES_InitTypeDef::G_Z_Axis
uint8_t G_Z_Axis
Definition: lsm6ds3.h:78
LSM6DS3_DrvExtTypeDef
LSM6DS3 driver extended internal structure definition.
Definition: lsm6ds3.h:1490
IMU_6AXES_InitTypeDef::G_X_Axis
uint8_t G_X_Axis
Definition: lsm6ds3.h:76
LSM6DS3Drv_ext_internal
LSM6DS3_DrvExtTypeDef LSM6DS3Drv_ext_internal
IMU_6AXES_InitTypeDef::X_Z_Axis
uint8_t X_Z_Axis
Definition: lsm6ds3.h:83