Microbug / nRF51822

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri May 08 15:33:58 2015 +0100
Parent:
154:9d51b9dfc72e
Child:
156:8e97c41fd7ab
Commit message:
Synchronized with git rev 33f02bc0
Author: Rohit Grover
move SecurityMode_t within Gap

Changed in this revision

btle/custom/custom_helper.cpp Show annotated file Show diff for this revision Revisions of this file
btle/custom/custom_helper.h Show annotated file Show diff for this revision Revisions of this file
--- a/btle/custom/custom_helper.cpp	Fri May 08 15:33:58 2015 +0100
+++ b/btle/custom/custom_helper.cpp	Fri May 08 15:33:58 2015 +0100
@@ -200,7 +200,7 @@
 error_t custom_add_in_characteristic(uint16_t                            service_handle,
                                      ble_uuid_t                         *p_uuid,
                                      uint8_t                             properties,
-                                     GattCharacteristic::SecurityMode_t  requiredSecurity,
+                                     Gap::SecurityMode_t  requiredSecurity,
                                      uint8_t                            *p_data,
                                      uint16_t                            min_length,
                                      uint16_t                            max_length,
@@ -246,19 +246,19 @@
 
     if (char_props.read || char_props.notify || char_props.indicate) {
         switch (requiredSecurity) {
-            case GattCharacteristic::SECURITY_MODE_ENCRYPTION_OPEN_LINK :
+            case Gap::SECURITY_MODE_ENCRYPTION_OPEN_LINK :
                 BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_ENCRYPTION_NO_MITM :
+            case Gap::SECURITY_MODE_ENCRYPTION_NO_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_ENCRYPTION_WITH_MITM :
+            case Gap::SECURITY_MODE_ENCRYPTION_WITH_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&attr_md.read_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_SIGNED_NO_MITM :
+            case Gap::SECURITY_MODE_SIGNED_NO_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(&attr_md.read_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_SIGNED_WITH_MITM :
+            case Gap::SECURITY_MODE_SIGNED_WITH_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(&attr_md.read_perm);
                 break;
         };
@@ -266,19 +266,19 @@
 
     if (char_props.write || char_props.write_wo_resp) {
         switch (requiredSecurity) {
-            case GattCharacteristic::SECURITY_MODE_ENCRYPTION_OPEN_LINK :
+            case Gap::SECURITY_MODE_ENCRYPTION_OPEN_LINK :
                 BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_ENCRYPTION_NO_MITM :
+            case Gap::SECURITY_MODE_ENCRYPTION_NO_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_ENCRYPTION_WITH_MITM :
+            case Gap::SECURITY_MODE_ENCRYPTION_WITH_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&attr_md.write_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_SIGNED_NO_MITM :
+            case Gap::SECURITY_MODE_SIGNED_NO_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(&attr_md.write_perm);
                 break;
-            case GattCharacteristic::SECURITY_MODE_SIGNED_WITH_MITM :
+            case Gap::SECURITY_MODE_SIGNED_WITH_MITM :
                 BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(&attr_md.write_perm);
                 break;
         };
--- a/btle/custom/custom_helper.h	Fri May 08 15:33:58 2015 +0100
+++ b/btle/custom/custom_helper.h	Fri May 08 15:33:58 2015 +0100
@@ -34,7 +34,7 @@
 error_t custom_add_in_characteristic(uint16_t                  service_handle,
                                      ble_uuid_t               *p_uuid,
                                      uint8_t                   properties,
-                                     GattCharacteristic::SecurityMode_t requiredSecurity,
+                                     Gap::SecurityMode_t requiredSecurity,
                                      uint8_t                  *p_data,
                                      uint16_t                  min_length,
                                      uint16_t                  max_length,