Complete sensor demo.
Dependencies: modem_ref_helper CRC X_NUCLEO_IKS01A1 DebouncedInterrupt
sensors.h
00001 #ifndef _SENSORS_H_ 00002 #define _SENSORS_H_ 00003 00004 #include "hts221/hts221_class.h" 00005 #include "lis3mdl/lis3mdl_class.h" 00006 #include "lps25h/lps25h_class.h" 00007 #include "lsm6ds0/lsm6ds0_class.h" 00008 #include "lsm303c/LSM303C_ACC_Sensor.h" 00009 #include "lsm303c/LSM303C_MAG_Sensor.h" 00010 00011 #if defined(TARGET_STM32L152RE) 00012 extern LIS3MDL *magnetometer; 00013 extern LSM6DS0 *accelerometer; 00014 extern LSM6DS0 *gyroscope; 00015 #elif defined(TARGET_STM32L432KC) 00016 extern LSM303C_ACC_Sensor *accelerometer; 00017 extern LSM303C_MAG_Sensor *magnetometer; 00018 #endif 00019 extern LPS25H *pressure_sensor; 00020 extern LPS25H *temp_sensor2; 00021 extern HTS221 *humidity_sensor; 00022 extern HTS221 *temp_sensor1; 00023 00024 bool Init_HTS221(HTS221* ht_sensor); 00025 bool Init_LIS3MDL(LIS3MDL* magnetometer); 00026 bool Init_LPS25H(LPS25H* pt_sensor); 00027 bool Init_LSM6DS0(LSM6DS0* gyro_lsm6ds0); 00028 bool Init_LSM303C_ACC(LSM303C_ACC_Sensor* accelerometer); 00029 bool Init_LSM303C_MAG(LSM303C_MAG_Sensor* magnetometer); 00030 00031 bool mag_get_value(int32_t* buf); 00032 bool acc_get_value(int32_t* buf); 00033 bool gyr_get_value(int32_t* buf); 00034 bool pre_get_value(int32_t* buf); 00035 bool hum_get_value(int32_t* buf); 00036 bool tem1_get_value(int32_t* buf); 00037 bool tem2_get_value(int32_t* buf); 00038 bool light_get_value(int32_t* buf); 00039 00040 00041 #endif // _SENSORS_H_
Generated on Tue Jul 12 2022 15:22:26 by 1.7.2