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:
1:4d3968b2941b
Relaxed modem version check.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jeej 0:87c57e1b1e1c 1 // -----------------------------------------------
Jeej 0:87c57e1b1e1c 2 // TARGET Options
Jeej 0:87c57e1b1e1c 3 // -----------------------------------------------
Jeej 0:87c57e1b1e1c 4
Jeej 0:87c57e1b1e1c 5 #if defined(TARGET_STM32L152RE)
Jeej 0:87c57e1b1e1c 6
Jeej 1:4d3968b2941b 7 //#define TARGET_HAS_IKS01A1
Jeej 0:87c57e1b1e1c 8
Jeej 0:87c57e1b1e1c 9 // -----------------------------------------------
Jeej 0:87c57e1b1e1c 10 // Select the sensors
Jeej 0:87c57e1b1e1c 11 // -1 : disable, 0 : simu, 1 : hardware
Jeej 0:87c57e1b1e1c 12 // -----------------------------------------------
Jeej 0:87c57e1b1e1c 13 #ifdef TARGET_HAS_IKS01A1
Jeej 0:87c57e1b1e1c 14 // use all sensors from IKS01A1 shield for Nucleo-64
Jeej 0:87c57e1b1e1c 15 #define _MAG_EN_ (1)
Jeej 0:87c57e1b1e1c 16 #define _ACC_EN_ (1)
Jeej 0:87c57e1b1e1c 17 #define _GYR_EN_ (1)
Jeej 0:87c57e1b1e1c 18 #define _PRE_EN_ (1)
Jeej 0:87c57e1b1e1c 19 #define _HUM_EN_ (1)
Jeej 0:87c57e1b1e1c 20 #define _TEM1_EN_ (1)
Jeej 0:87c57e1b1e1c 21 #define _TEM2_EN_ (1)
Jeej 0:87c57e1b1e1c 22 #else
Jeej 0:87c57e1b1e1c 23 // simulate sensors
Jeej 0:87c57e1b1e1c 24 #define _MAG_EN_ (0)
Jeej 0:87c57e1b1e1c 25 #define _ACC_EN_ (0)
Jeej 0:87c57e1b1e1c 26 #define _GYR_EN_ (0)
Jeej 0:87c57e1b1e1c 27 #define _PRE_EN_ (0)
Jeej 0:87c57e1b1e1c 28 #define _HUM_EN_ (0)
Jeej 0:87c57e1b1e1c 29 #define _TEM1_EN_ (0)
Jeej 0:87c57e1b1e1c 30 #define _TEM2_EN_ (0)
Jeej 0:87c57e1b1e1c 31 #endif // TARGET_HAS_IKS01A1
Jeej 0:87c57e1b1e1c 32
Jeej 0:87c57e1b1e1c 33 #define _LIGHT_EN_ (-1)
Jeej 0:87c57e1b1e1c 34
Jeej 0:87c57e1b1e1c 35 #elif defined(TARGET_STM32L432KC)
Jeej 0:87c57e1b1e1c 36 // Enable this if WISENSE2 is populated with LSM303C (instead of LSM303AGR)
Jeej 0:87c57e1b1e1c 37 #define TARGET_HAS_LSM303C
Jeej 1:4d3968b2941b 38
Jeej 0:87c57e1b1e1c 39 // -----------------------------------------------
Jeej 0:87c57e1b1e1c 40 // Select the sensors available on the sh2050
Jeej 0:87c57e1b1e1c 41 // -1 : disable, 0 : simu, 1 : hardware
Jeej 0:87c57e1b1e1c 42 // -----------------------------------------------
Jeej 0:87c57e1b1e1c 43 #define _MAG_EN_ (1)
Jeej 0:87c57e1b1e1c 44 #define _ACC_EN_ (1)
Jeej 0:87c57e1b1e1c 45 #define _GYR_EN_ (-1)
Jeej 0:87c57e1b1e1c 46 #define _PRE_EN_ (1)
Jeej 0:87c57e1b1e1c 47 #define _HUM_EN_ (1)
Jeej 0:87c57e1b1e1c 48 #define _TEM1_EN_ (1)
Jeej 0:87c57e1b1e1c 49 #define _TEM2_EN_ (1)
Jeej 0:87c57e1b1e1c 50 #define _LIGHT_EN_ (1)
Jeej 0:87c57e1b1e1c 51
Jeej 0:87c57e1b1e1c 52 #else
Jeej 0:87c57e1b1e1c 53 #error "Please choose or add the right platform."
Jeej 0:87c57e1b1e1c 54 #endif