Run on TY51822r3 board with ACC sensor (LIS3DH or BMC050)

Dependencies:   BLE_API LIS3DH mbed nRF51822 BMC050 nRF51_LowPwr nRF51_Vdd

Fork of BLE_EddystoneBeacon_Service by Bluetooth Low Energy

Revision:
8:1a21308e5008
Parent:
7:e9800c45e065
Child:
14:5a2a104a21a8
--- a/main.cpp	Fri Jun 19 23:50:32 2015 +0000
+++ b/main.cpp	Sat Jun 20 23:49:59 2015 +0000
@@ -21,7 +21,7 @@
 #include "DeviceInformationService.h"
 #include "ConfigParamsPersistence.h"
 
-BLEDevice ble;
+BLE ble;
 ZipBeaconConfigService *zipBeaconConfig;
 
 /**
@@ -45,7 +45,7 @@
     state = ble.getGapState();
     if (!state.connected) { /* don't switch if we're in a connected state. */
         zipBeaconConfig->setupZipBeaconAdvertisements();
-        ble.startAdvertising();
+        ble.gap().startAdvertising();
 
         configAdvertisementTimeoutTicker.detach(); /* disable the callback from the timeout Ticker. */
     }
@@ -56,13 +56,13 @@
  */
 void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason)
 {
-    ble.startAdvertising();
+    ble.gap().startAdvertising();
 }
 
 int main(void)
 {
     ble.init();
-    ble.onDisconnection(disconnectionCallback);
+    ble.gap().onDisconnection(disconnectionCallback);
 
     /*
      * Load parameters from (platform specific) persistent storage. Parameters
@@ -86,8 +86,8 @@
     DFUService dfu(ble);
     DeviceInformationService deviceInfo(ble, "ARM", "UriBeacon", "SN1", "hw-rev1", "fw-rev1", "soft-rev1");
 
-    ble.startAdvertising(); /* Set the whole thing in motion. After this call a GAP central can scan the zipBeaconConfig
-                             * service. This can then be switched to the normal URIBeacon functionality after a timeout. */
+    ble.gap().startAdvertising(); /* Set the whole thing in motion. After this call a GAP central can scan the zipBeaconConfig
+                                   * service. This can then be switched to the normal URIBeacon functionality after a timeout. */
 
     while (true) {
         ble.waitForEvent();