Nordic stack and drivers for the mbed BLE API. Version to work around build bug.

Dependents:   microbit_rubber_ducky microbit_mouse_BLE microbit_mouse_BLE_daybreak_version microbit_presenter

Fork of nRF51822 by Nordic Semiconductor

Revision:
591:266079a50c20
Parent:
590:3bdd5346ded1
Child:
592:f9574772b816
--- a/source/btle/btle_discovery.cpp	Mon Jan 11 10:19:31 2016 +0000
+++ b/source/btle/btle_discovery.cpp	Mon Jan 11 10:19:32 2016 +0000
@@ -14,9 +14,6 @@
  * limitations under the License.
  */
 
-#include "nRF5xServiceDiscovery.h"
-#include "nRF5xCharacteristicDescriptorDiscoverer.h"
-#include "nRF5xGattClient.h"
 #include "nRF5xn.h"
 
 #if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
@@ -25,9 +22,7 @@
     nRF5xn                &ble         = nRF5xn::Instance(BLE::DEFAULT_INSTANCE);
     nRF5xGap              &gap         = (nRF5xGap &) ble.getGap();
     nRF5xGattClient       &gattClient  = (nRF5xGattClient &) ble.getGattClient();
-    nRF5xServiceDiscovery &sdSingleton = gattClient.discovery();
-    nRF5xCharacteristicDescriptorDiscoverer &characteristicDescriptorDiscoverer =
-        gattClient.characteristicDescriptorDiscoverer();
+    nRF5xServiceDiscovery &sdSingleton = gattClient.discovery;
 
     switch (p_ble_evt->header.evt_id) {
         case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:
@@ -51,7 +46,7 @@
 
                 case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND:
                 default:
-                    sdSingleton.terminateCharacteristicDiscovery(BLE_ERROR_NONE);
+                    sdSingleton.terminateCharacteristicDiscovery();
                     break;
             }
             break;
@@ -98,28 +93,6 @@
                 gattClient.processHVXEvent(&params);
             }
             break;
-
-        case BLE_GATTC_EVT_DESC_DISC_RSP: {
-            uint16_t conn_handle = p_ble_evt->evt.gattc_evt.conn_handle;
-            uint16_t status = p_ble_evt->evt.gattc_evt.gatt_status;
-            const ble_gattc_evt_desc_disc_rsp_t& discovered_descriptors = p_ble_evt->evt.gattc_evt.params.desc_disc_rsp;
-
-            switch(status) {
-                case BLE_GATT_STATUS_SUCCESS:
-                    characteristicDescriptorDiscoverer.process(
-                        conn_handle,
-                        discovered_descriptors
-                    );
-                    break;
-                case BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND:
-                    // end of discovery
-                    characteristicDescriptorDiscoverer.terminate(conn_handle, BLE_ERROR_NONE);
-                    break;
-                default:
-                    characteristicDescriptorDiscoverer.terminate(conn_handle, BLE_ERROR_UNSPECIFIED);
-                    break;
-            }
-        }   break;
     }
 
     sdSingleton.progressCharacteristicDiscovery();