Complete sensor demo.

Dependencies:   modem_ref_helper X_NUCLEO_IKS01A1 DebouncedInterrupt

Committer:
Jeej
Date:
Thu Oct 11 15:15:30 2018 +0000
Revision:
14:8fd5405f7ab2
Parent:
0:87c57e1b1e1c
Relaxed modem version check.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jeej 0:87c57e1b1e1c 1 #ifndef _SENSORS_H_
Jeej 0:87c57e1b1e1c 2 #define _SENSORS_H_
Jeej 0:87c57e1b1e1c 3
Jeej 0:87c57e1b1e1c 4 #include "hts221/hts221_class.h"
Jeej 0:87c57e1b1e1c 5 #include "lis3mdl/lis3mdl_class.h"
Jeej 0:87c57e1b1e1c 6 #include "lps25h/lps25h_class.h"
Jeej 0:87c57e1b1e1c 7 #include "lsm6ds0/lsm6ds0_class.h"
Jeej 0:87c57e1b1e1c 8 #include "lsm303c/LSM303C_ACC_Sensor.h"
Jeej 0:87c57e1b1e1c 9 #include "lsm303c/LSM303C_MAG_Sensor.h"
Jeej 0:87c57e1b1e1c 10
Jeej 0:87c57e1b1e1c 11 #if defined(TARGET_STM32L152RE)
Jeej 0:87c57e1b1e1c 12 extern LIS3MDL *magnetometer;
Jeej 0:87c57e1b1e1c 13 extern LSM6DS0 *accelerometer;
Jeej 0:87c57e1b1e1c 14 extern LSM6DS0 *gyroscope;
Jeej 0:87c57e1b1e1c 15 #elif defined(TARGET_STM32L432KC)
Jeej 0:87c57e1b1e1c 16 extern LSM303C_ACC_Sensor *accelerometer;
Jeej 0:87c57e1b1e1c 17 extern LSM303C_MAG_Sensor *magnetometer;
Jeej 0:87c57e1b1e1c 18 #endif
Jeej 0:87c57e1b1e1c 19 extern LPS25H *pressure_sensor;
Jeej 0:87c57e1b1e1c 20 extern LPS25H *temp_sensor2;
Jeej 0:87c57e1b1e1c 21 extern HTS221 *humidity_sensor;
Jeej 0:87c57e1b1e1c 22 extern HTS221 *temp_sensor1;
Jeej 0:87c57e1b1e1c 23
Jeej 0:87c57e1b1e1c 24 bool Init_HTS221(HTS221* ht_sensor);
Jeej 0:87c57e1b1e1c 25 bool Init_LIS3MDL(LIS3MDL* magnetometer);
Jeej 0:87c57e1b1e1c 26 bool Init_LPS25H(LPS25H* pt_sensor);
Jeej 0:87c57e1b1e1c 27 bool Init_LSM6DS0(LSM6DS0* gyro_lsm6ds0);
Jeej 0:87c57e1b1e1c 28 bool Init_LSM303C_ACC(LSM303C_ACC_Sensor* accelerometer);
Jeej 0:87c57e1b1e1c 29 bool Init_LSM303C_MAG(LSM303C_MAG_Sensor* magnetometer);
Jeej 0:87c57e1b1e1c 30
Jeej 0:87c57e1b1e1c 31 bool mag_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 32 bool acc_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 33 bool gyr_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 34 bool pre_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 35 bool hum_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 36 bool tem1_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 37 bool tem2_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 38 bool light_get_value(int32_t* buf);
Jeej 0:87c57e1b1e1c 39
Jeej 0:87c57e1b1e1c 40
Jeej 0:87c57e1b1e1c 41 #endif // _SENSORS_H_