BLE

Dependencies:   ADT7410 BLE_API mbed nRF51822

See https://developer.mbed.org/users/yasuyuki/notebook/BLE/

Files at this revision

API Documentation at this revision

Comitter:
yasuyuki
Date:
Fri Jul 10 15:19:15 2015 +0000
Parent:
0:1dbfda43d8b4
Child:
2:d5bdd080d451
Commit message:
mbed=rev.101,BLE_API=rev.738,nRF51822=rev.385

Changed in this revision

BLE_API.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
nRF51822.lib Show annotated file Show diff for this revision Revisions of this file
--- a/BLE_API.lib	Mon Jun 22 22:01:52 2015 +0000
+++ b/BLE_API.lib	Fri Jul 10 15:19:15 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#8a104d9d80c1
+http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#9c2edf20ea56
--- a/main.cpp	Mon Jun 22 22:01:52 2015 +0000
+++ b/main.cpp	Fri Jul 10 15:19:15 2015 +0000
@@ -1,13 +1,18 @@
 //**********************
 // BLE demo for mbed_HRM1017
 //
+// successful combination
+// mbed=rev.97/BLE_API=rev.341/nRF51822=rev.111
+// mbed=rev.101/BLE_API=rev.738/nRF51822=rev.385
+//
 // (C)Copyright 2015 All rights reserved by Y.Onodera
 // http://einstlab.web.fc2.com
 //**********************
 #if defined(TARGET_HRM1017)
 #include "mbed.h"
 #include "ADT7410.h"
-#include "BLEDevice.h"              // BLEライブラリのヘッダ
+//#include "BLEDevice.h"            // BLEライブラリのヘッダ BLE_API=rev.341
+#include "BLE.h"                    // BLEライブラリのヘッダ BLE_API=rev.738
 #include "BatteryService.h"         // BatteryServiceのヘッダ
 #include "HeartRateService.h"       // HeartRateServiceのヘッダ
 #include "HealthThermometerService.h" // HealthThermometerServiceのヘッダ
@@ -49,20 +54,17 @@
 
 
 // BLE接続処理
-#define OLD
+//#define OLD
 #ifdef OLD
-// old version BLE_API until rev.341
+// BLE_API=rev.341
 void connectionCallback(
 Gap::Handle_t handle, 
 Gap::addr_type_t peerAddrType, const Gap::address_t peerAddr, 
 const Gap::ConnectionParams_t *params) 
 #else
-// new version
+// BLE_API=rev.738
 void connectionCallback(
-Gap::Handle_t handle,
-Gap::addr_type_t peerAddrType, const Gap::address_t peerAddr,
-Gap::addr_type_t ownAddrType, const Gap::address_t ownAddr,
-const Gap::ConnectionParams_t *params)
+const Gap::ConnectionCallbackParams_t *params)
 #endif
 {
     led2 = 1;
@@ -79,6 +81,8 @@
 
 
 // BLE接続タイムアウト処理
+#ifdef OLD
+// BLE_API=rev.341
 void connectTimeoutCallback(void)
 {
     // to do
@@ -89,6 +93,12 @@
 //  System-off
 //  NRF_POWER->SYSTEMOFF = 1;
 }
+#else
+// BLE_API rev.738
+void connectTimeoutCallback(Gap::TimeoutSource_t source)
+{
+}
+#endif
 
 
 void initAdvertising(void)
--- a/mbed.bld	Mon Jun 22 22:01:52 2015 +0000
+++ b/mbed.bld	Fri Jul 10 15:19:15 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file
--- a/nRF51822.lib	Mon Jun 22 22:01:52 2015 +0000
+++ b/nRF51822.lib	Fri Jul 10 15:19:15 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#be2a122ed2f7
+http://developer.mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#6c82f06746bb