Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit_rubber_ducky microbit_mouse_BLE microbit_mouse_BLE_daybreak_version microbit_presenter
Fork of nRF51822 by
Diff: btle/btle_discovery.cpp
- Revision:
- 255:d228656b0cd1
- Parent:
- 254:c14e1d09f197
- Child:
- 257:6e0ae0f1697b
diff -r c14e1d09f197 -r d228656b0cd1 btle/btle_discovery.cpp --- a/btle/btle_discovery.cpp Fri Jun 19 15:55:23 2015 +0100 +++ b/btle/btle_discovery.cpp Fri Jun 19 15:55:23 2015 +0100 @@ -124,8 +124,9 @@ NordicServiceDiscovery::progressCharacteristicDiscovery(void) { while (cDiscoveryActive && (characteristicIndex < numCharacteristics)) { - /* THIS IS WHERE THE CALLBACK WILL GO */ - printf("%x [%u]\r\n", characteristics[characteristicIndex].uuid, characteristics[characteristicIndex].valueHandle); + if (characteristicCallback) { + characteristicCallback(characteristics[characteristicIndex]); + } characteristicIndex++; } @@ -155,7 +156,7 @@ serviceCallback(services[serviceIndex]); } - if (true) { /* characteristic discovery is optional. */ + if (characteristicCallback) { /* characteristic discovery is optional. */ launchCharacteristicDiscovery(connHandle, services[serviceIndex].startHandle, services[serviceIndex].endHandle); } else { serviceIndex++; /* Progress service index to keep discovery alive. */