STSW-STLKT01: Drivers/BSP/SensorTile/SensorTile_gyro.h Source File

STSW-STLKT01

STSW-STLKT01
SensorTile_gyro.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __SENSORTILE_GYRO_H
40 #define __SENSORTILE_GYRO_H
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include "LSM6DSM_ACC_GYRO_driver_HL.h"
48 #include "SensorTile.h"
49 
50 
67 typedef enum
68 {
69  GYRO_SENSORS_AUTO = -1, /* Always first element and equal to -1 */
70  LSM6DSM_G_0, /* Default on board. */
71 } GYRO_ID_t;
72 
81 #define GYRO_SENSORS_MAX_NUM 1
82 
91 /* Sensor Configuration Functions */
92 DrvStatusTypeDef BSP_GYRO_Init( GYRO_ID_t id, void **handle );
93 DrvStatusTypeDef BSP_GYRO_DeInit( void **handle );
94 DrvStatusTypeDef BSP_GYRO_Sensor_Enable( void *handle );
95 DrvStatusTypeDef BSP_GYRO_Sensor_Disable( void *handle );
96 DrvStatusTypeDef BSP_GYRO_IsInitialized( void *handle, uint8_t *status );
97 DrvStatusTypeDef BSP_GYRO_IsEnabled( void *handle, uint8_t *status );
98 DrvStatusTypeDef BSP_GYRO_IsCombo( void *handle, uint8_t *status );
99 DrvStatusTypeDef BSP_GYRO_Get_Instance( void *handle, uint8_t *instance );
100 DrvStatusTypeDef BSP_GYRO_Get_WhoAmI( void *handle, uint8_t *who_am_i );
101 DrvStatusTypeDef BSP_GYRO_Check_WhoAmI( void *handle );
102 DrvStatusTypeDef BSP_GYRO_Get_Axes( void *handle, SensorAxes_t *angular_velocity );
103 DrvStatusTypeDef BSP_GYRO_Get_AxesRaw( void *handle, SensorAxesRaw_t *value );
104 DrvStatusTypeDef BSP_GYRO_Get_Sensitivity( void *handle, float *sensitivity );
105 DrvStatusTypeDef BSP_GYRO_Get_ODR( void *handle, float *odr );
106 DrvStatusTypeDef BSP_GYRO_Set_ODR( void *handle, SensorOdr_t odr );
107 DrvStatusTypeDef BSP_GYRO_Set_ODR_Value( void *handle, float odr );
108 DrvStatusTypeDef BSP_GYRO_Get_FS( void *handle, float *fullScale );
109 DrvStatusTypeDef BSP_GYRO_Set_FS( void *handle, SensorFs_t fullScale );
110 DrvStatusTypeDef BSP_GYRO_Set_FS_Value( void *handle, float fullScale );
111 DrvStatusTypeDef BSP_GYRO_Get_Axes_Status( void *handle, uint8_t *xyz_enabled );
112 DrvStatusTypeDef BSP_GYRO_Set_Axes_Status( void *handle, uint8_t *enable_xyz );
113 DrvStatusTypeDef BSP_GYRO_Read_Reg( void *handle, uint8_t reg, uint8_t *data );
114 DrvStatusTypeDef BSP_GYRO_Write_Reg( void *handle, uint8_t reg, uint8_t data );
115 DrvStatusTypeDef BSP_GYRO_Get_DRDY_Status( void *handle, uint8_t *status );
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* __SENSORTILE_GYRO_H */
137 
138 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
DrvStatusTypeDef BSP_GYRO_Sensor_Enable(void *handle)
Enable gyroscope sensor.
DrvStatusTypeDef BSP_GYRO_Set_ODR_Value(void *handle, float odr)
Set the gyroscope sensor output data rate.
DrvStatusTypeDef BSP_GYRO_IsCombo(void *handle, uint8_t *status)
Check if the gyroscope sensor is combo.
DrvStatusTypeDef BSP_GYRO_IsEnabled(void *handle, uint8_t *status)
Check if the gyroscope sensor is enabled.
DrvStatusTypeDef BSP_GYRO_Init(GYRO_ID_t id, void **handle)
Initialize a gyroscope sensor.
DrvStatusTypeDef BSP_GYRO_Set_FS_Value(void *handle, float fullScale)
Set the gyroscope sensor full scale.
DrvStatusTypeDef BSP_GYRO_Get_FS(void *handle, float *fullScale)
Get the gyroscope sensor full scale.
DrvStatusTypeDef BSP_GYRO_Get_AxesRaw(void *handle, SensorAxesRaw_t *value)
Get the gyroscope sensor raw axes.
DrvStatusTypeDef BSP_GYRO_Check_WhoAmI(void *handle)
Check the WHO_AM_I ID of the gyroscope sensor.
DrvStatusTypeDef BSP_GYRO_Get_WhoAmI(void *handle, uint8_t *who_am_i)
Get the WHO_AM_I ID of the gyroscope sensor.
DrvStatusTypeDef BSP_GYRO_Write_Reg(void *handle, uint8_t reg, uint8_t data)
Write the data to register.
DrvStatusTypeDef BSP_GYRO_Read_Reg(void *handle, uint8_t reg, uint8_t *data)
Read the data from register.
DrvStatusTypeDef BSP_GYRO_Set_Axes_Status(void *handle, uint8_t *enable_xyz)
Set the enabled/disabled status of the gyroscope sensor axes.
DrvStatusTypeDef BSP_GYRO_DeInit(void **handle)
Deinitialize a gyroscope sensor.
DrvStatusTypeDef BSP_GYRO_Set_FS(void *handle, SensorFs_t fullScale)
Set the gyroscope sensor full scale.
This file contains definitions for SensorTile.c file.
DrvStatusTypeDef BSP_GYRO_Get_Sensitivity(void *handle, float *sensitivity)
Get the gyroscope sensor sensitivity.
DrvStatusTypeDef BSP_GYRO_Get_Instance(void *handle, uint8_t *instance)
Get the gyroscope sensor instance.
DrvStatusTypeDef BSP_GYRO_Sensor_Disable(void *handle)
Disable gyroscope sensor.
DrvStatusTypeDef BSP_GYRO_Get_DRDY_Status(void *handle, uint8_t *status)
Get gyroscope data ready status.
DrvStatusTypeDef BSP_GYRO_Get_Axes_Status(void *handle, uint8_t *xyz_enabled)
Get the gyroscope sensor axes status.
DrvStatusTypeDef BSP_GYRO_Set_ODR(void *handle, SensorOdr_t odr)
Set the gyroscope sensor output data rate.
DrvStatusTypeDef BSP_GYRO_IsInitialized(void *handle, uint8_t *status)
Check if the gyroscope sensor is initialized.
DrvStatusTypeDef BSP_GYRO_Get_ODR(void *handle, float *odr)
Get the gyroscope sensor output data rate.
DrvStatusTypeDef BSP_GYRO_Get_Axes(void *handle, SensorAxes_t *angular_velocity)
Get the gyroscope sensor axes.
Generated by   doxygen 1.8.13