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

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri May 08 15:33:57 2015 +0100
Parent:
142:b6fe43a5c18f
Child:
144:9d8fce4b4d5a
Commit message:
Synchronized with git rev 002f61cf
Author: Rohit Grover
ble_initializeSecurity: minor inversion of error checking code.

Changed in this revision

btle/btle_security.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/btle/btle_security.cpp	Fri May 08 15:33:57 2015 +0100
+++ b/btle/btle_security.cpp	Fri May 08 15:33:57 2015 +0100
@@ -56,18 +56,18 @@
     };
 
     ret_code_t rc;
-    if ((rc = dm_register(&applicationInstance, &dm_param)) == NRF_SUCCESS) {
-        return BLE_ERROR_NONE;
+    if ((rc = dm_register(&applicationInstance, &dm_param)) != NRF_SUCCESS) {
+        switch (rc) {
+            case NRF_ERROR_INVALID_STATE:
+                return BLE_ERROR_INVALID_STATE;
+            case NRF_ERROR_NO_MEM:
+                return BLE_ERROR_NO_MEM;
+            default:
+                return BLE_ERROR_UNSPECIFIED;
+        }
     }
 
-    switch (rc) {
-        case NRF_ERROR_INVALID_STATE:
-            return BLE_ERROR_INVALID_STATE;
-        case NRF_ERROR_NO_MEM:
-            return BLE_ERROR_NO_MEM;
-        default:
-            return BLE_ERROR_UNSPECIFIED;
-    }
+    return BLE_ERROR_NONE;
 }
 
 ble_error_t