62 static DrvContextTypeDef ACCELERO_SensorHandle[ ACCELERO_SENSORS_MAX_NUM ];
63 static ACCELERO_Data_t ACCELERO_Data[ ACCELERO_SENSORS_MAX_NUM ];
64 static LSM6DSM_X_Data_t LSM6DSM_X_0_Data;
65 static LSM303AGR_X_Data_t LSM303AGR_X_0_Data;
74 static DrvStatusTypeDef BSP_LSM6DSM_ACCELERO_Init(
void **handle );
75 static DrvStatusTypeDef BSP_LSM303AGR_ACCELERO_Init(
void **handle );
100 case ACCELERO_SENSORS_AUTO:
104 if(BSP_LSM6DSM_ACCELERO_Init(handle) == COMPONENT_ERROR )
108 if( BSP_LSM303AGR_ACCELERO_Init(handle) == COMPONENT_ERROR )
110 return COMPONENT_ERROR;
117 if( BSP_LSM6DSM_ACCELERO_Init(handle) == COMPONENT_ERROR )
119 return COMPONENT_ERROR;
125 if( BSP_LSM303AGR_ACCELERO_Init(handle) == COMPONENT_ERROR )
127 return COMPONENT_ERROR;
136 static DrvStatusTypeDef BSP_LSM6DSM_ACCELERO_Init(
void **handle )
138 ACCELERO_Drv_t *driver = NULL;
141 if(ACCELERO_SensorHandle[ LSM6DSM_X_0 ].isInitialized == 1)
144 return COMPONENT_ERROR;
149 return COMPONENT_ERROR;
153 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].who_am_i = LSM6DSM_ACC_GYRO_WHO_AM_I;
154 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].ifType = 1;
155 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].address = LSM6DSM_ACC_GYRO_I2C_ADDRESS_HIGH;
156 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].spiDevice = LSM6DSM;
157 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].instance = LSM6DSM_X_0;
158 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].isInitialized = 0;
159 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].isEnabled = 0;
160 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].isCombo = 1;
161 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].pData = (
void * )&ACCELERO_Data[ LSM6DSM_X_0 ];
162 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].pVTable = (
void * )&LSM6DSM_X_Drv;
163 ACCELERO_SensorHandle[ LSM6DSM_X_0 ].pExtVTable = (
void * )&LSM6DSM_X_ExtDrv;
165 LSM6DSM_X_0_Data.comboData = &LSM6DSM_Combo_Data[0];
166 ACCELERO_Data[ LSM6DSM_X_0 ].pComponentData = (
void * )&LSM6DSM_X_0_Data;
167 ACCELERO_Data[ LSM6DSM_X_0 ].pExtData = 0;
169 *handle = (
void *)&ACCELERO_SensorHandle[ LSM6DSM_X_0 ];
171 Sensor_IO_SPI_CS_Init(*handle);
173 if(LSM6DSM_Combo_Data[0].isGyroInitialized == 0)
178 return COMPONENT_ERROR;
182 driver = ( ACCELERO_Drv_t * )((DrvContextTypeDef *)(*handle))->pVTable;
184 if ( driver->Init == NULL )
186 memset((*handle), 0,
sizeof(DrvContextTypeDef));
188 return COMPONENT_ERROR;
191 if ( driver->Init( (DrvContextTypeDef *)(*handle) ) == COMPONENT_ERROR )
193 memset((*handle), 0,
sizeof(DrvContextTypeDef));
195 return COMPONENT_ERROR;
199 if ( LSM6DSM_ACC_GYRO_W_I2C_DISABLE( *handle, LSM6DSM_ACC_GYRO_I2C_DISABLE_SPI_ONLY ) == MEMS_ERROR )
201 return COMPONENT_ERROR;
210 static DrvStatusTypeDef BSP_LSM303AGR_ACCELERO_Init(
void **handle )
212 ACCELERO_Drv_t *driver = NULL;
215 if(ACCELERO_SensorHandle[ LSM303AGR_X_0 ].isInitialized == 1)
218 return COMPONENT_ERROR;
223 return COMPONENT_ERROR;
227 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].who_am_i = LSM303AGR_ACC_WHO_AM_I;
228 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].ifType = 1;
229 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].address = LSM303AGR_ACC_I2C_ADDRESS;
230 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].spiDevice = LSM303AGR_X;
231 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].instance = LSM303AGR_X_0;
232 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].isInitialized = 0;
233 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].isEnabled = 0;
234 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].isCombo = 1;
235 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].pData = (
void * )&ACCELERO_Data[ LSM303AGR_X_0 ];
236 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].pVTable = (
void * )&LSM303AGR_X_Drv;
237 ACCELERO_SensorHandle[ LSM303AGR_X_0 ].pExtVTable = 0;
239 LSM303AGR_X_0_Data.comboData = &LSM303AGR_Combo_Data[0];
240 ACCELERO_Data[ LSM303AGR_X_0 ].pComponentData = (
void * )&LSM303AGR_X_0_Data;
241 ACCELERO_Data[ LSM303AGR_X_0 ].pExtData = 0;
243 *handle = (
void *)&ACCELERO_SensorHandle[ LSM303AGR_X_0 ];
245 Sensor_IO_SPI_CS_Init(*handle);
247 if(LSM303AGR_Combo_Data[0].isMagInitialized == 0)
252 return COMPONENT_ERROR;
256 driver = ( ACCELERO_Drv_t * )((DrvContextTypeDef *)(*handle))->pVTable;
258 if ( driver->Init == NULL )
260 memset((*handle), 0,
sizeof(DrvContextTypeDef));
262 return COMPONENT_ERROR;
265 if ( driver->Init( (DrvContextTypeDef *)(*handle) ) == COMPONENT_ERROR )
267 memset((*handle), 0,
sizeof(DrvContextTypeDef));
269 return COMPONENT_ERROR;
285 DrvContextTypeDef *ctx = (DrvContextTypeDef *)(*handle);
286 ACCELERO_Drv_t *driver = NULL;
290 return COMPONENT_ERROR;
293 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
295 if ( driver->DeInit == NULL )
297 return COMPONENT_ERROR;
300 if ( driver->DeInit( ctx ) == COMPONENT_ERROR )
302 return COMPONENT_ERROR;
305 memset(ctx, 0,
sizeof(DrvContextTypeDef));
322 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
323 ACCELERO_Drv_t *driver = NULL;
327 return COMPONENT_ERROR;
330 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
332 if ( driver->Sensor_Enable == NULL )
334 return COMPONENT_ERROR;
337 if ( driver->Sensor_Enable( ctx ) == COMPONENT_ERROR )
339 return COMPONENT_ERROR;
356 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
357 ACCELERO_Drv_t *driver = NULL;
361 return COMPONENT_ERROR;
364 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
366 if ( driver->Sensor_Disable == NULL )
368 return COMPONENT_ERROR;
371 if ( driver->Sensor_Disable( ctx ) == COMPONENT_ERROR )
373 return COMPONENT_ERROR;
389 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
393 return COMPONENT_ERROR;
396 if ( status == NULL )
398 return COMPONENT_ERROR;
401 *status = ctx->isInitialized;
416 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
420 return COMPONENT_ERROR;
423 if ( status == NULL )
425 return COMPONENT_ERROR;
428 *status = ctx->isEnabled;
443 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
447 return COMPONENT_ERROR;
450 if ( status == NULL )
452 return COMPONENT_ERROR;
455 *status = ctx->isCombo;
470 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
474 return COMPONENT_ERROR;
477 if ( instance == NULL )
479 return COMPONENT_ERROR;
482 *instance = ctx->instance;
499 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
500 ACCELERO_Drv_t *driver = NULL;
504 return COMPONENT_ERROR;
507 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
509 if ( driver->Get_WhoAmI == NULL )
511 return COMPONENT_ERROR;
514 if ( driver->Get_WhoAmI( ctx, who_am_i ) == COMPONENT_ERROR )
516 return COMPONENT_ERROR;
533 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
534 ACCELERO_Drv_t *driver = NULL;
538 return COMPONENT_ERROR;
541 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
543 if ( driver->Check_WhoAmI == NULL )
545 return COMPONENT_ERROR;
548 if ( driver->Check_WhoAmI( ctx ) == COMPONENT_ERROR )
550 return COMPONENT_ERROR;
568 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
569 ACCELERO_Drv_t *driver = NULL;
573 return COMPONENT_ERROR;
576 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
578 if(acceleration == NULL)
580 return COMPONENT_ERROR;
583 if ( driver->Get_Axes == NULL )
585 return COMPONENT_ERROR;
588 if ( driver->Get_Axes( ctx, acceleration ) == COMPONENT_ERROR )
590 return COMPONENT_ERROR;
607 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
608 ACCELERO_Drv_t *driver = NULL;
612 return COMPONENT_ERROR;
615 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
619 return COMPONENT_ERROR;
622 if ( driver->Get_AxesRaw == NULL )
624 return COMPONENT_ERROR;
627 if ( driver->Get_AxesRaw( ctx, value) == COMPONENT_ERROR )
629 return COMPONENT_ERROR;
646 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
647 ACCELERO_Drv_t *driver = NULL;
651 return COMPONENT_ERROR;
654 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
656 if(sensitivity == NULL)
658 return COMPONENT_ERROR;
661 if ( driver->Get_Sensitivity == NULL )
663 return COMPONENT_ERROR;
666 if ( driver->Get_Sensitivity( ctx, sensitivity ) == COMPONENT_ERROR )
668 return COMPONENT_ERROR;
686 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
687 ACCELERO_Drv_t *driver = NULL;
691 return COMPONENT_ERROR;
694 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
698 return COMPONENT_ERROR;
701 if ( driver->Get_ODR == NULL )
703 return COMPONENT_ERROR;
706 if ( driver->Get_ODR( ctx, odr ) == COMPONENT_ERROR )
708 return COMPONENT_ERROR;
726 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
727 ACCELERO_Drv_t *driver = NULL;
731 return COMPONENT_ERROR;
734 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
736 if ( driver->Set_ODR == NULL )
738 return COMPONENT_ERROR;
740 if ( driver->Set_ODR( ctx, odr ) == COMPONENT_ERROR )
742 return COMPONENT_ERROR;
760 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
761 ACCELERO_Drv_t *driver = NULL;
765 return COMPONENT_ERROR;
768 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
770 if ( driver->Set_ODR_Value == NULL )
772 return COMPONENT_ERROR;
774 if ( driver->Set_ODR_Value( ctx, odr ) == COMPONENT_ERROR )
776 return COMPONENT_ERROR;
794 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
795 ACCELERO_Drv_t *driver = NULL;
799 return COMPONENT_ERROR;
802 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
804 if(fullScale == NULL)
806 return COMPONENT_ERROR;
809 if ( driver->Get_FS == NULL )
811 return COMPONENT_ERROR;
814 if ( driver->Get_FS( ctx, fullScale ) == COMPONENT_ERROR )
816 return COMPONENT_ERROR;
834 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
835 ACCELERO_Drv_t *driver = NULL;
839 return COMPONENT_ERROR;
842 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
844 if ( driver->Set_FS == NULL )
846 return COMPONENT_ERROR;
848 if ( driver->Set_FS( ctx, fullScale ) == COMPONENT_ERROR )
850 return COMPONENT_ERROR;
868 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
869 ACCELERO_Drv_t *driver = NULL;
873 return COMPONENT_ERROR;
876 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
878 if ( driver->Set_FS_Value == NULL )
880 return COMPONENT_ERROR;
882 if ( driver->Set_FS_Value( ctx, fullScale ) == COMPONENT_ERROR )
884 return COMPONENT_ERROR;
902 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
903 ACCELERO_Drv_t *driver = NULL;
907 return COMPONENT_ERROR;
910 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
912 if(xyz_enabled == NULL)
914 return COMPONENT_ERROR;
917 if ( driver->Get_Axes_Status == NULL )
919 return COMPONENT_ERROR;
922 if ( driver->Get_Axes_Status( ctx, xyz_enabled ) == COMPONENT_ERROR )
924 return COMPONENT_ERROR;
942 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
943 ACCELERO_Drv_t *driver = NULL;
947 return COMPONENT_ERROR;
950 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
952 if(enable_xyz == NULL)
954 return COMPONENT_ERROR;
957 if ( driver->Set_Axes_Status == NULL )
959 return COMPONENT_ERROR;
962 if ( driver->Set_Axes_Status( ctx, enable_xyz ) == COMPONENT_ERROR )
964 return COMPONENT_ERROR;
982 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
983 ACCELERO_Drv_t *driver = NULL;
987 return COMPONENT_ERROR;
990 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
994 return COMPONENT_ERROR;
997 if ( driver->Read_Reg == NULL )
999 return COMPONENT_ERROR;
1002 if ( driver->Read_Reg( ctx, reg, data ) == COMPONENT_ERROR )
1004 return COMPONENT_ERROR;
1007 return COMPONENT_OK;
1024 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1025 ACCELERO_Drv_t *driver = NULL;
1029 return COMPONENT_ERROR;
1032 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
1034 if ( driver->Write_Reg == NULL )
1036 return COMPONENT_ERROR;
1039 if ( driver->Write_Reg( ctx, reg, data ) == COMPONENT_ERROR )
1041 return COMPONENT_ERROR;
1044 return COMPONENT_OK;
1059 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1060 ACCELERO_Drv_t *driver = NULL;
1064 return COMPONENT_ERROR;
1067 driver = ( ACCELERO_Drv_t * )ctx->pVTable;
1069 if ( driver->Get_DRDY_Status == NULL )
1071 return COMPONENT_ERROR;
1074 if ( driver->Get_DRDY_Status( ctx, status ) == COMPONENT_ERROR )
1076 return COMPONENT_ERROR;
1079 return COMPONENT_OK;
1093 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1097 return COMPONENT_ERROR;
1100 if ( ctx->pExtVTable == NULL )
1102 return COMPONENT_ERROR;
1106 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1108 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1110 if ( extDriver->Enable_Free_Fall_Detection == NULL )
1112 return COMPONENT_ERROR;
1117 return extDriver->Enable_Free_Fall_Detection( ctx );
1123 return COMPONENT_ERROR;
1138 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1142 return COMPONENT_ERROR;
1145 if ( ctx->pExtVTable == NULL )
1147 return COMPONENT_ERROR;
1151 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1153 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1155 if ( extDriver->Disable_Free_Fall_Detection == NULL )
1157 return COMPONENT_ERROR;
1162 return extDriver->Disable_Free_Fall_Detection( ctx );
1168 return COMPONENT_ERROR;
1184 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1188 return COMPONENT_ERROR;
1191 if ( ctx->pExtVTable == NULL )
1193 return COMPONENT_ERROR;
1196 if ( status == NULL )
1198 return COMPONENT_ERROR;
1202 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1204 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1206 if ( extDriver->Get_Free_Fall_Detection_Status == NULL )
1208 return COMPONENT_ERROR;
1213 return extDriver->Get_Free_Fall_Detection_Status( ctx, status );
1219 return COMPONENT_ERROR;
1235 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1239 return COMPONENT_ERROR;
1242 if ( ctx->pExtVTable == NULL )
1244 return COMPONENT_ERROR;
1248 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1250 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1252 if ( extDriver->Set_Free_Fall_Threshold == NULL )
1254 return COMPONENT_ERROR;
1259 return extDriver->Set_Free_Fall_Threshold( ctx, thr );
1265 return COMPONENT_ERROR;
1281 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1285 return COMPONENT_ERROR;
1288 if ( ctx->pExtVTable == NULL )
1290 return COMPONENT_ERROR;
1294 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1296 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1298 if ( extDriver->Enable_Pedometer == NULL )
1300 return COMPONENT_ERROR;
1305 return extDriver->Enable_Pedometer( ctx );
1311 return COMPONENT_ERROR;
1326 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1330 return COMPONENT_ERROR;
1333 if ( ctx->pExtVTable == NULL )
1335 return COMPONENT_ERROR;
1339 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1341 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1343 if ( extDriver->Disable_Pedometer == NULL )
1345 return COMPONENT_ERROR;
1350 return extDriver->Disable_Pedometer( ctx );
1356 return COMPONENT_ERROR;
1372 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1376 return COMPONENT_ERROR;
1379 if ( ctx->pExtVTable == NULL )
1381 return COMPONENT_ERROR;
1384 if ( status == NULL )
1386 return COMPONENT_ERROR;
1390 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1392 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1394 if ( extDriver->Get_Pedometer_Status == NULL )
1396 return COMPONENT_ERROR;
1401 return extDriver->Get_Pedometer_Status( ctx, status );
1407 return COMPONENT_ERROR;
1423 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1427 return COMPONENT_ERROR;
1430 if ( ctx->pExtVTable == NULL )
1432 return COMPONENT_ERROR;
1435 if ( step_count == NULL )
1437 return COMPONENT_ERROR;
1441 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1443 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1445 if ( extDriver->Get_Step_Count == NULL )
1447 return COMPONENT_ERROR;
1452 return extDriver->Get_Step_Count( ctx, step_count );
1458 return COMPONENT_ERROR;
1473 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1477 return COMPONENT_ERROR;
1480 if ( ctx->pExtVTable == NULL )
1482 return COMPONENT_ERROR;
1486 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1488 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1490 if ( extDriver->Enable_Step_Counter_Reset == NULL || extDriver->Disable_Step_Counter_Reset == NULL )
1492 return COMPONENT_ERROR;
1497 if( extDriver->Enable_Step_Counter_Reset( ctx ) == COMPONENT_ERROR )
1499 return COMPONENT_ERROR;
1504 if( extDriver->Disable_Step_Counter_Reset( ctx ) == COMPONENT_ERROR )
1506 return COMPONENT_ERROR;
1513 return COMPONENT_ERROR;
1516 return COMPONENT_OK;
1531 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1535 return COMPONENT_ERROR;
1538 if ( ctx->pExtVTable == NULL )
1540 return COMPONENT_ERROR;
1544 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1546 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1548 if ( extDriver->Set_Pedometer_Threshold == NULL )
1550 return COMPONENT_ERROR;
1555 return extDriver->Set_Pedometer_Threshold( ctx, thr );
1561 return COMPONENT_ERROR;
1577 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1581 return COMPONENT_ERROR;
1584 if ( ctx->pExtVTable == NULL )
1586 return COMPONENT_ERROR;
1590 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1592 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1594 if ( extDriver->Enable_Tilt_Detection == NULL )
1596 return COMPONENT_ERROR;
1601 return extDriver->Enable_Tilt_Detection( ctx );
1607 return COMPONENT_ERROR;
1622 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1626 return COMPONENT_ERROR;
1629 if ( ctx->pExtVTable == NULL )
1631 return COMPONENT_ERROR;
1635 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1637 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1639 if ( extDriver->Disable_Tilt_Detection == NULL )
1641 return COMPONENT_ERROR;
1646 return extDriver->Disable_Tilt_Detection( ctx );
1652 return COMPONENT_ERROR;
1668 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1672 return COMPONENT_ERROR;
1675 if ( ctx->pExtVTable == NULL )
1677 return COMPONENT_ERROR;
1680 if ( status == NULL )
1682 return COMPONENT_ERROR;
1686 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1688 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1690 if ( extDriver->Get_Tilt_Detection_Status == NULL )
1692 return COMPONENT_ERROR;
1697 return extDriver->Get_Tilt_Detection_Status( ctx, status );
1703 return COMPONENT_ERROR;
1719 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1723 return COMPONENT_ERROR;
1726 if ( ctx->pExtVTable == NULL )
1728 return COMPONENT_ERROR;
1732 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1734 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1736 if ( extDriver->Enable_Wake_Up_Detection == NULL )
1738 return COMPONENT_ERROR;
1743 return extDriver->Enable_Wake_Up_Detection( ctx );
1749 return COMPONENT_ERROR;
1764 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1768 return COMPONENT_ERROR;
1771 if ( ctx->pExtVTable == NULL )
1773 return COMPONENT_ERROR;
1777 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1779 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1781 if ( extDriver->Disable_Wake_Up_Detection == NULL )
1783 return COMPONENT_ERROR;
1788 return extDriver->Disable_Wake_Up_Detection( ctx );
1794 return COMPONENT_ERROR;
1810 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1814 return COMPONENT_ERROR;
1817 if ( ctx->pExtVTable == NULL )
1819 return COMPONENT_ERROR;
1822 if ( status == NULL )
1824 return COMPONENT_ERROR;
1828 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1830 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1832 if ( extDriver->Get_Wake_Up_Detection_Status == NULL )
1834 return COMPONENT_ERROR;
1839 return extDriver->Get_Wake_Up_Detection_Status( ctx, status );
1845 return COMPONENT_ERROR;
1861 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1865 return COMPONENT_ERROR;
1868 if ( ctx->pExtVTable == NULL )
1870 return COMPONENT_ERROR;
1874 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1876 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1878 if ( extDriver->Set_Wake_Up_Threshold == NULL )
1880 return COMPONENT_ERROR;
1885 return extDriver->Set_Wake_Up_Threshold( ctx, thr );
1891 return COMPONENT_ERROR;
1907 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1911 return COMPONENT_ERROR;
1914 if ( ctx->pExtVTable == NULL )
1916 return COMPONENT_ERROR;
1920 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1922 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1924 if ( extDriver->Enable_Single_Tap_Detection == NULL )
1926 return COMPONENT_ERROR;
1931 return extDriver->Enable_Single_Tap_Detection( ctx );
1937 return COMPONENT_ERROR;
1952 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
1956 return COMPONENT_ERROR;
1959 if ( ctx->pExtVTable == NULL )
1961 return COMPONENT_ERROR;
1965 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
1967 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
1969 if ( extDriver->Disable_Single_Tap_Detection == NULL )
1971 return COMPONENT_ERROR;
1976 return extDriver->Disable_Single_Tap_Detection( ctx );
1982 return COMPONENT_ERROR;
1998 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2002 return COMPONENT_ERROR;
2005 if ( ctx->pExtVTable == NULL )
2007 return COMPONENT_ERROR;
2010 if ( status == NULL )
2012 return COMPONENT_ERROR;
2016 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2018 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2020 if ( extDriver->Get_Single_Tap_Detection_Status == NULL )
2022 return COMPONENT_ERROR;
2027 return extDriver->Get_Single_Tap_Detection_Status( ctx, status );
2033 return COMPONENT_ERROR;
2049 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2053 return COMPONENT_ERROR;
2056 if ( ctx->pExtVTable == NULL )
2058 return COMPONENT_ERROR;
2062 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2064 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2066 if ( extDriver->Enable_Double_Tap_Detection == NULL )
2068 return COMPONENT_ERROR;
2073 return extDriver->Enable_Double_Tap_Detection( ctx );
2079 return COMPONENT_ERROR;
2094 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2098 return COMPONENT_ERROR;
2101 if ( ctx->pExtVTable == NULL )
2103 return COMPONENT_ERROR;
2107 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2109 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2111 if ( extDriver->Disable_Double_Tap_Detection == NULL )
2113 return COMPONENT_ERROR;
2118 return extDriver->Disable_Double_Tap_Detection( ctx );
2124 return COMPONENT_ERROR;
2140 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2144 return COMPONENT_ERROR;
2147 if ( ctx->pExtVTable == NULL )
2149 return COMPONENT_ERROR;
2152 if ( status == NULL )
2154 return COMPONENT_ERROR;
2157 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2159 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2161 if ( extDriver->Get_Double_Tap_Detection_Status == NULL )
2163 return COMPONENT_ERROR;
2168 return extDriver->Get_Double_Tap_Detection_Status( ctx, status );
2174 return COMPONENT_ERROR;
2190 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2194 return COMPONENT_ERROR;
2197 if ( ctx->pExtVTable == NULL )
2199 return COMPONENT_ERROR;
2203 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2205 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2207 if ( extDriver->Set_Tap_Threshold == NULL )
2209 return COMPONENT_ERROR;
2214 return extDriver->Set_Tap_Threshold( ctx, thr );
2220 return COMPONENT_ERROR;
2236 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2240 return COMPONENT_ERROR;
2243 if ( ctx->pExtVTable == NULL )
2245 return COMPONENT_ERROR;
2249 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2251 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2253 if ( extDriver->Set_Tap_Shock_Time == NULL )
2255 return COMPONENT_ERROR;
2260 return extDriver->Set_Tap_Shock_Time( ctx, time );
2266 return COMPONENT_ERROR;
2282 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2286 return COMPONENT_ERROR;
2289 if ( ctx->pExtVTable == NULL )
2291 return COMPONENT_ERROR;
2295 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2297 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2299 if ( extDriver->Set_Tap_Quiet_Time == NULL )
2301 return COMPONENT_ERROR;
2306 return extDriver->Set_Tap_Quiet_Time( ctx, time );
2312 return COMPONENT_ERROR;
2328 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2332 return COMPONENT_ERROR;
2335 if ( ctx->pExtVTable == NULL )
2337 return COMPONENT_ERROR;
2341 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2343 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2345 if ( extDriver->Set_Tap_Duration_Time == NULL )
2347 return COMPONENT_ERROR;
2352 return extDriver->Set_Tap_Duration_Time( ctx, time );
2358 return COMPONENT_ERROR;
2374 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2378 return COMPONENT_ERROR;
2381 if ( ctx->pExtVTable == NULL )
2383 return COMPONENT_ERROR;
2387 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2389 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2391 if ( extDriver->Enable_6D_Orientation == NULL )
2393 return COMPONENT_ERROR;
2398 return extDriver->Enable_6D_Orientation( ctx );
2404 return COMPONENT_ERROR;
2419 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2423 return COMPONENT_ERROR;
2426 if ( ctx->pExtVTable == NULL )
2428 return COMPONENT_ERROR;
2432 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2434 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2436 if ( extDriver->Disable_6D_Orientation == NULL )
2438 return COMPONENT_ERROR;
2443 return extDriver->Disable_6D_Orientation( ctx );
2449 return COMPONENT_ERROR;
2465 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2469 return COMPONENT_ERROR;
2472 if ( ctx->pExtVTable == NULL )
2474 return COMPONENT_ERROR;
2477 if ( status == NULL )
2479 return COMPONENT_ERROR;
2483 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2485 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2487 if ( extDriver->Get_6D_Orientation_Status == NULL )
2489 return COMPONENT_ERROR;
2494 return extDriver->Get_6D_Orientation_Status( ctx, status );
2500 return COMPONENT_ERROR;
2516 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2520 return COMPONENT_ERROR;
2523 if ( ctx->pExtVTable == NULL )
2525 return COMPONENT_ERROR;
2530 return COMPONENT_ERROR;
2534 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2536 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2538 if ( extDriver->Get_6D_Orientation_XL == NULL )
2540 return COMPONENT_ERROR;
2545 return extDriver->Get_6D_Orientation_XL( ctx, xl );
2551 return COMPONENT_ERROR;
2567 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2571 return COMPONENT_ERROR;
2574 if ( ctx->pExtVTable == NULL )
2576 return COMPONENT_ERROR;
2581 return COMPONENT_ERROR;
2585 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2587 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2589 if ( extDriver->Get_6D_Orientation_XH == NULL )
2591 return COMPONENT_ERROR;
2596 return extDriver->Get_6D_Orientation_XH( ctx, xh );
2602 return COMPONENT_ERROR;
2618 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2622 return COMPONENT_ERROR;
2625 if ( ctx->pExtVTable == NULL )
2627 return COMPONENT_ERROR;
2632 return COMPONENT_ERROR;
2636 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2638 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2640 if ( extDriver->Get_6D_Orientation_YL == NULL )
2642 return COMPONENT_ERROR;
2647 return extDriver->Get_6D_Orientation_YL( ctx, yl );
2653 return COMPONENT_ERROR;
2669 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2673 return COMPONENT_ERROR;
2676 if ( ctx->pExtVTable == NULL )
2678 return COMPONENT_ERROR;
2683 return COMPONENT_ERROR;
2687 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2689 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2691 if ( extDriver->Get_6D_Orientation_YH == NULL )
2693 return COMPONENT_ERROR;
2698 return extDriver->Get_6D_Orientation_YH( ctx, yh );
2704 return COMPONENT_ERROR;
2720 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2724 return COMPONENT_ERROR;
2727 if ( ctx->pExtVTable == NULL )
2729 return COMPONENT_ERROR;
2734 return COMPONENT_ERROR;
2738 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2740 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2742 if ( extDriver->Get_6D_Orientation_ZL == NULL )
2744 return COMPONENT_ERROR;
2749 return extDriver->Get_6D_Orientation_ZL( ctx, zl );
2755 return COMPONENT_ERROR;
2771 DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
2775 return COMPONENT_ERROR;
2778 if ( ctx->pExtVTable == NULL )
2780 return COMPONENT_ERROR;
2785 return COMPONENT_ERROR;
2789 if ( ctx->who_am_i == LSM6DSM_ACC_GYRO_WHO_AM_I )
2791 LSM6DSM_X_ExtDrv_t *extDriver = ( LSM6DSM_X_ExtDrv_t * )ctx->pExtVTable;
2793 if ( extDriver->Get_6D_Orientation_ZH == NULL )
2795 return COMPONENT_ERROR;
2800 return extDriver->Get_6D_Orientation_ZH( ctx, zh );
2806 return COMPONENT_ERROR;
DrvStatusTypeDef BSP_ACCELERO_Get_Axes_Status(void *handle, uint8_t *xyz_enabled)
Get the accelerometer sensor axes status.
DrvStatusTypeDef BSP_ACCELERO_Enable_Pedometer_Ext(void *handle)
Enable the pedometer feature (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_IsInitialized(void *handle, uint8_t *status)
Check if the accelerometer sensor is initialized.
DrvStatusTypeDef BSP_ACCELERO_Get_Pedometer_Status_Ext(void *handle, uint8_t *status)
Get the pedometer status (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_FS(void *handle, SensorFs_t fullScale)
Set the accelerometer sensor full scale.
DrvStatusTypeDef BSP_ACCELERO_IsEnabled(void *handle, uint8_t *status)
Check if the accelerometer sensor is enabled.
DrvStatusTypeDef BSP_ACCELERO_Enable_Tilt_Detection_Ext(void *handle)
Enable the tilt detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_FS(void *handle, float *fullScale)
Get the accelerometer sensor full scale.
DrvStatusTypeDef BSP_ACCELERO_IsCombo(void *handle, uint8_t *status)
Check if the accelerometer sensor is combo.
DrvStatusTypeDef BSP_ACCELERO_Get_Single_Tap_Detection_Status_Ext(void *handle, uint8_t *status)
Get the single tap detection status (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_Tap_Shock_Time_Ext(void *handle, uint8_t time)
Set the tap shock time window (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_Tilt_Detection_Status_Ext(void *handle, uint8_t *status)
Get the tilt detection status (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_Tap_Threshold_Ext(void *handle, uint8_t thr)
Set the tap threshold (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Check_WhoAmI(void *handle)
Check the WHO_AM_I ID of the accelerometer sensor.
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_Status_Ext(void *handle, uint8_t *status)
Get the status of the 6D orientation detection (available only for LSM6DS3 sensor) ...
DrvStatusTypeDef BSP_ACCELERO_Get_Double_Tap_Detection_Status_Ext(void *handle, uint8_t *status)
Get the double tap detection status (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_YL_Ext(void *handle, uint8_t *yl)
Get the 6D orientation YL axis (available only for LSM6DS3 sensor)
This file contains definitions for the SensorTile_accelero.c.
uint8_t Sensor_IO_Write(void *handle, uint8_t WriteAddr, uint8_t *pBuffer, uint16_t nBytesToWrite)
Writes a buffer to the sensor.
DrvStatusTypeDef BSP_ACCELERO_Enable_Double_Tap_Detection_Ext(void *handle)
Enable the double tap detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_YH_Ext(void *handle, uint8_t *yh)
Get the 6D orientation YH axis (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_DeInit(void **handle)
Deinitialize accelerometer sensor.
DrvStatusTypeDef BSP_ACCELERO_Disable_Free_Fall_Detection_Ext(void *handle)
Disable the free fall detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef Sensor_IO_SPI_Init(void)
Configures sensor SPI interface.
DrvStatusTypeDef BSP_ACCELERO_Get_Wake_Up_Detection_Status_Ext(void *handle, uint8_t *status)
Get the status of the wake up detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Disable_6D_Orientation_Ext(void *handle)
Disable the 6D orientation detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Sensor_Disable(void *handle)
Disable accelerometer sensor.
DrvStatusTypeDef BSP_ACCELERO_Set_Pedometer_Threshold_Ext(void *handle, uint8_t thr)
Set the pedometer threshold (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Write_Reg(void *handle, uint8_t reg, uint8_t data)
Write the data to register.
DrvStatusTypeDef BSP_ACCELERO_Set_Free_Fall_Threshold_Ext(void *handle, LSM6DSM_ACC_GYRO_FF_THS_t thr)
Set the free fall detection threshold (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Read_Reg(void *handle, uint8_t reg, uint8_t *data)
Read the data from register.
DrvStatusTypeDef BSP_ACCELERO_Enable_6D_Orientation_Ext(void *handle)
Enable the 6D orientation detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_ODR(void *handle, float *odr)
Get the accelerometer sensor output data rate.
DrvStatusTypeDef BSP_ACCELERO_Enable_Single_Tap_Detection_Ext(void *handle)
Enable the single tap detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_ODR_Value(void *handle, float odr)
Set the accelerometer sensor output data rate.
DrvStatusTypeDef BSP_ACCELERO_Disable_Single_Tap_Detection_Ext(void *handle)
Disable the single tap detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_ZL_Ext(void *handle, uint8_t *zl)
Get the 6D orientation ZL axis (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_DRDY_Status(void *handle, uint8_t *status)
Get accelerometer data ready status.
DrvStatusTypeDef BSP_ACCELERO_Reset_Step_Counter_Ext(void *handle)
Reset of the step counter (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_Tap_Duration_Time_Ext(void *handle, uint8_t time)
Set the tap duration of the time window (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_XL_Ext(void *handle, uint8_t *xl)
Get the 6D orientation XL axis (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_Sensitivity(void *handle, float *sensitivity)
Get the accelerometer sensor sensitivity.
DrvStatusTypeDef BSP_ACCELERO_Disable_Double_Tap_Detection_Ext(void *handle)
Disable the double tap detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_ZH_Ext(void *handle, uint8_t *zh)
Get the 6D orientation ZH axis (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Enable_Free_Fall_Detection_Ext(void *handle)
Enable the free fall detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Disable_Wake_Up_Detection_Ext(void *handle)
Disable the wake up detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_Axes(void *handle, SensorAxes_t *acceleration)
Get the accelerometer sensor axes.
DrvStatusTypeDef BSP_ACCELERO_Disable_Pedometer_Ext(void *handle)
Disable the pedometer feature (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_Tap_Quiet_Time_Ext(void *handle, uint8_t time)
Set the tap quiet time window (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_FS_Value(void *handle, float fullScale)
Set the accelerometer sensor full scale.
DrvStatusTypeDef LSM6DSM_Sensor_IO_ITConfig(void)
Configures sensor interrupts interface for LSM6DSM sensor.
DrvStatusTypeDef BSP_ACCELERO_Sensor_Enable(void *handle)
Enable accelerometer sensor.
DrvStatusTypeDef BSP_ACCELERO_Get_Free_Fall_Detection_Status_Ext(void *handle, uint8_t *status)
Get the status of the free fall detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Init(ACCELERO_ID_t id, void **handle)
Initialize an accelerometer sensor.
DrvStatusTypeDef BSP_ACCELERO_Get_AxesRaw(void *handle, SensorAxesRaw_t *value)
Get the accelerometer sensor raw axes.
DrvStatusTypeDef BSP_ACCELERO_Set_Wake_Up_Threshold_Ext(void *handle, uint8_t thr)
Set the wake up threshold (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Enable_Wake_Up_Detection_Ext(void *handle)
Enable the wake up detection (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Set_Axes_Status(void *handle, uint8_t *enable_xyz)
Set the enabled/disabled status of the accelerometer sensor axes.
DrvStatusTypeDef BSP_ACCELERO_Get_Step_Count_Ext(void *handle, uint16_t *step_count)
Get the step counter (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_6D_Orientation_XH_Ext(void *handle, uint8_t *xh)
Get the 6D orientation XH axis (available only for LSM6DS3 sensor)
DrvStatusTypeDef BSP_ACCELERO_Get_Instance(void *handle, uint8_t *instance)
Get the accelerometer sensor instance.
DrvStatusTypeDef BSP_ACCELERO_Set_ODR(void *handle, SensorOdr_t odr)
Set the accelerometer sensor output data rate.
DrvStatusTypeDef BSP_ACCELERO_Get_WhoAmI(void *handle, uint8_t *who_am_i)
Get the WHO_AM_I ID of the accelerometer sensor.
DrvStatusTypeDef BSP_ACCELERO_Disable_Tilt_Detection_Ext(void *handle)
Disable the tilt detection (available only for LSM6DS3 sensor)