ST Expansion SW Team / Mbed 2 deprecated HelloWorld_VL53L1X_Simple_Ranging

Dependencies:   mbed X_NUCLEO_53L1A1_mbed

Revision:
21:37399a49b40e
Parent:
20:0aa91eb13b8f
Child:
22:e811600253b0
--- a/main.cpp	Thu Jul 18 13:35:15 2019 +0000
+++ b/main.cpp	Thu Jul 18 14:12:25 2019 +0000
@@ -123,11 +123,13 @@
 =============================================================================*/
 int main()
 {
-#if TARGET_STM    
-    #if USER_BUTTON==PC_13  // we are cross compiling for an STM32-Nucleo
-        InterruptIn stop_button(USER_BUTTON);
-        stop_button.rise(&measuring_stop_irq);
-    #endif
+#if TARGET_STM  // we are cross compiling for an STM32-Nucleo    
+    InterruptIn stop_button(USER_BUTTON);
+    stop_button.rise(&measuring_stop_irq);
+#endif
+#if TARGET_Freescale // we are cross-compiling for NXP FRDM boards.
+    InterruptIn stop_button(SW2);
+    stop_button.rise(&measuring_stop_irq);
 #endif
     vl53L1X_DevI2C *device_i2c = new vl53L1X_DevI2C(VL53L1_I2C_SDA, VL53L1_I2C_SCL);
     range_measure(device_i2c);  // start continuous measures