Patched version of nrf51822 FOTA compatible driver, with GPTIO disabled, as it clashed with the mbed definitions...

Fork of nRF51822 by Nordic Semiconductor

Revision:
113:2fb5fde31edc
Parent:
96:f98c65780f4a
diff -r 737b08b3b995 -r 2fb5fde31edc nRF51822n.cpp
--- a/nRF51822n.cpp	Thu Apr 30 08:34:37 2015 +0100
+++ b/nRF51822n.cpp	Thu Apr 30 08:34:38 2015 +0100
@@ -48,13 +48,20 @@
 
 const char *nRF51822n::getVersion(void)
 {
-    static char versionString[10];
+    static char versionString[32];
     static bool versionFetched = false;
 
     if (!versionFetched) {
         ble_version_t version;
-        if (sd_ble_version_get(&version) == NRF_SUCCESS) {
-            snprintf(versionString, sizeof(versionString), "%u.%u", version.version_number, version.subversion_number);
+        if ((sd_ble_version_get(&version) == NRF_SUCCESS) && (version.company_id == 0x0059)) {
+            switch (version.version_number) {
+                case 0x07:
+                    snprintf(versionString, sizeof(versionString), "Nordic BLE4.1 fw:%04x", version.subversion_number);
+                    break;
+                default:
+                    snprintf(versionString, sizeof(versionString), "Nordic (spec unknown) fw:%04x", version.subversion_number);
+                    break;
+            }
             versionFetched = true;
         } else {
             strncpy(versionString, "unknown", sizeof(versionString));