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.
Fork of X_NUCLEO_IDB0XA1 by
Diff: source/BlueNRGGap.cpp
- Revision:
- 177:65d9b1b75fca
- Parent:
- 165:3576598c0889
- Child:
- 191:d22cc4715b0c
diff -r 33edcdbe9ce6 -r 65d9b1b75fca source/BlueNRGGap.cpp --- a/source/BlueNRGGap.cpp Fri Nov 13 16:31:14 2015 +0100 +++ b/source/BlueNRGGap.cpp Wed Nov 18 15:48:31 2015 +0100 @@ -41,7 +41,7 @@ */ #include "BlueNRGDevice.h" -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "Payload.h" #include "Utils.h" #include "debug.h" @@ -1042,13 +1042,20 @@ // Since the DISCOVERY_COMPLETE event can be received during the scanning interval, // we need to delay the starting of connection or re-scanning procedures uint16_t delay = 2*(_scanningParams.getInterval()); - +#ifdef AST_FOR_MBED_OS if(_connecting) { minar::Scheduler::postCallback(makeConnection).delay(minar::milliseconds(delay)); } else { minar::Scheduler::postCallback(radioScanning).delay(minar::milliseconds(delay)); } - +#else + Clock_Wait(delay); + if(_connecting) { + makeConnection(); + } else { + radioScanning(); + } +#endif break; } }