Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: modem_ref_helper DebouncedInterrupt
Diff: main.cpp
- Revision:
- 3:a240b300fae9
- Parent:
- 2:4629eacf9851
- Child:
- 4:94bfd123f8e6
diff -r 4629eacf9851 -r a240b300fae9 main.cpp
--- a/main.cpp Mon May 15 16:02:19 2017 +0000
+++ b/main.cpp Wed May 17 14:42:28 2017 +0000
@@ -19,6 +19,8 @@
#include "d7a_1x_fs.h"
#include "alp.h"
+#define MODEM_VERSION_MAJOR 4
+#define MODEM_VERSION_MINOR 8
WizziCom* g_modem_com;
Semaphore button_user(0);
@@ -289,6 +291,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);
+ }
+
// Configure URC: LQUAL on report file notification every 10 reports
PRINT("Setup URCs\n");
modem_enable_urc(ALP_URC_TYPE_LQUAL, IFID_REPORT, 10, true, g_main_id);