init

Dependencies:   aconno_I2C Lis2dh12 WatchdogTimer

Revision:
8:7351f8c4cd60
Parent:
7:e9a19750700d
Child:
9:b0a1535b8ef2
--- a/main.cpp	Tue Dec 11 22:18:24 2018 +0000
+++ b/main.cpp	Tue Dec 11 22:38:25 2018 +0000
@@ -32,8 +32,8 @@
 
 //MOTION SETTINGS
 static bool             RET_motionTriggered              __attribute__((section("noinit"),zero_init));
-static time_t             RET_motionStartTime              __attribute__((section("noinit"),zero_init));
-static time_t             RET_motionStopTime              __attribute__((section("noinit"),zero_init));
+static time_t           RET_motionStartTime              __attribute__((section("noinit"),zero_init));
+static time_t           RET_motionStopTime              __attribute__((section("noinit"),zero_init));
 static uint32_t         RET_motionStartThreshold_seconds    __attribute__((section("noinit"),zero_init));
 static uint32_t         RET_motionStopThreshold_seconds     __attribute__((section("noinit"),zero_init));
 static bool             RET_motionPendingOnState              __attribute__((section("noinit"),zero_init));
@@ -144,6 +144,16 @@
     }*/
 }
 
+bool selfTest() {
+    //Accelerometer
+    LIS3DH lis3dh(PN_SPI_MOSI, PN_SPI_MISO, PN_SPI_CS0, PN_SPI_CLK);
+    uint8_t lis3dh_id; 
+    lis3dh.LIS3DH_GetWHO_AM_I(&lis3dh_id);
+    if (asdf == 51) {
+        LED1blink(10,100);
+    }   
+}
+
 //------------------------------------------------------------------------------
 // STATE ENGINE
 //------------------------------------------------------------------------------