Complete sensor demo.
Dependencies: modem_ref_helper CRC X_NUCLEO_IKS01A1 DebouncedInterrupt
Diff: hwcfg.h
- Revision:
- 0:87c57e1b1e1c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hwcfg.h Mon May 15 16:00:25 2017 +0000 @@ -0,0 +1,88 @@ +// ----------------------------------------------- +// TARGET Options +// ----------------------------------------------- + +#if defined(TARGET_STM32L152RE) + + #define __HW_VERSION__ 0x15200000 + + // Enable this if a IKS01A1 shield is connected + //#define TARGET_HAS_IKS01A1 + + // ----------------------------------------------- + // Hardware configuration for sh2001 / sh2030 + // ----------------------------------------------- + #define MODEM_PIN_TX (D10) + #define MODEM_PIN_RX (D2) + #define MODEM_PIN_IRQ_OUT (D13) + #define MODEM_PIN_IRQ_IN (D9) + #define MODEM_PIN_RESET (A3) + #define DEBUG_LED (NC) + #define DEBUG_BUTTON (USER_BUTTON) + #define SENSOR_I2C_SDA (D14) + #define SENSOR_I2C_SCL (D15) + + // ----------------------------------------------- + // Select the sensors + // -1 : disable, 0 : simu, 1 : hardware + // ----------------------------------------------- + #ifdef TARGET_HAS_IKS01A1 + // use all sensors from IKS01A1 shield for Nucleo-64 + #define _MAG_EN_ (1) + #define _ACC_EN_ (1) + #define _GYR_EN_ (1) + #define _PRE_EN_ (1) + #define _HUM_EN_ (1) + #define _TEM1_EN_ (1) + #define _TEM2_EN_ (1) + #else + // simulate sensors + #define _MAG_EN_ (0) + #define _ACC_EN_ (0) + #define _GYR_EN_ (0) + #define _PRE_EN_ (0) + #define _HUM_EN_ (0) + #define _TEM1_EN_ (0) + #define _TEM2_EN_ (0) + #endif // TARGET_HAS_IKS01A1 + + #define _LIGHT_EN_ (-1) + +#elif defined(TARGET_STM32L432KC) + + #define __HW_VERSION__ 0x43200000 + + // Enable this if WISENSE2 is populated with LSM303C (instead of LSM303AGR) + #define TARGET_HAS_LSM303C + + // ----------------------------------------------- + // Hardware configuration for sh2050 + // ----------------------------------------------- + #define MODEM_PIN_TX (D5) + #define MODEM_PIN_RX (D4) + #define MODEM_PIN_IRQ_OUT (D11) + #define MODEM_PIN_IRQ_IN (D10) + #define MODEM_PIN_RESET (D12) + #define DEBUG_LED (D13) // LED1 + #define DEBUG_BUTTON (D9) + #define SENSOR_I2C_SDA (D0) + #define SENSOR_I2C_SCL (D1) + #define SENSOR_LIGHT_EN (A1) + #define SENSOR_LIGHT_MEAS (A4) + + // ----------------------------------------------- + // Select the sensors available on the sh2050 + // -1 : disable, 0 : simu, 1 : hardware + // ----------------------------------------------- + #define _MAG_EN_ (1) + #define _ACC_EN_ (1) + #define _GYR_EN_ (-1) + #define _PRE_EN_ (1) + #define _HUM_EN_ (1) + #define _TEM1_EN_ (1) + #define _TEM2_EN_ (1) + #define _LIGHT_EN_ (1) + +#else + #error "Please choose or add the right platform." +#endif \ No newline at end of file