Ping pong app demo.

Dependencies:   modem_ref_helper DebouncedInterrupt

Revision:
1:4629ccf8315d
Parent:
0:fa3fd69f8148
Child:
2:785b422c7d22
--- a/main.cpp	Wed May 17 13:58:04 2017 +0000
+++ b/main.cpp	Wed May 17 14:11:14 2017 +0000
@@ -20,6 +20,8 @@
 #include "alp.h"
 #include "hal_types.h"
 
+#define MODEM_VERSION_MAJOR         4
+#define MODEM_VERSION_MINOR         8
 
 WizziCom* g_modem_com;
 Semaphore button_user(0);
@@ -305,6 +307,16 @@
     PRINT(" - File system CRC:  0x%08x\r\n", rev.fs_crc);
     PRINT("-----------------------------------------\r\n");
     
+    // Check version
+    if (rev.fw_version.major != MODEM_VERSION_MAJOR || rev.fw_version.minor != MODEM_VERSION_MINOR)
+    {
+        PRINT("You need a modem at version %d.%d.x to use this APP.\n"
+              "Please check updates by importing:\n"
+              "https://developer.mbed.org/teams/WizziLab/code/D7A_WM_Updater\n"
+              , MODEM_VERSION_MAJOR, MODEM_VERSION_MINOR);
+        Thread::wait(osWaitForever);
+    }
+    
     // Put modem to listen to this access class
     modem_write_file(D7A_FID_DLL_CFG, &ping_pong_xcl, 0, sizeof(d7a_xcl_t), g_main_id);
     modem_ready[g_main_id].wait();