Example of multiple event detection for LSM6DSL in X-NUCLEO-IKS01A2

Dependencies:   X_NUCLEO_IKS01A2 mbed

Fork of MultiEvent_IKS01A2 by ST Expansion SW Team

Multi Event Demo Application based on sensor expansion board X-NUCLEO-IKS01A2

Main function is to show how to detect the free fall, tap, double tap, tilt, wake up, 6D Orientation and step events using the sensor expansion board and send a notification using UART to a connected PC or Desktop and display it on terminal applications like TeraTerm.
After connection has been established:
- the user can simulate all the events and then view the notification using an hyper terminal.
- the user button can be used to enable/disable all hardware features.

Revision:
1:4b4e6a89adce
Parent:
0:763b80993db4
Child:
2:fc97ec716eba
--- a/main.cpp	Thu Nov 24 15:42:24 2016 +0000
+++ b/main.cpp	Thu Nov 24 16:45:14 2016 +0000
@@ -53,7 +53,7 @@
 static int hw_event_is_enabled = 1;
 uint16_t step_count = 0;
 
-void pressed();
+void pressed_cb();
 void INT1_cb();
 void INT2_cb();
 void sendOrientation();
@@ -61,7 +61,7 @@
 /* Simple main function */
 int main() {
   /* Attach callback to User button press */
-  mybutton.fall(&pressed);
+  mybutton.fall(&pressed_cb);
   /* Attach callback to LSM6DSL INT1 */
   acc_gyro->AttachINT1IRQ(&INT1_cb);
   /* Attach callback to LSM6DSL INT2 */
@@ -148,7 +148,7 @@
   }
 }
 
-void pressed() {
+void pressed_cb() {
   toggle_hw_event_enable = 1;
 }