X_NUCLEO_IDB05A1
Dependencies: mbed-os-example-ble-Advertising
Diff: source/BlueNRGGap.cpp
- Revision:
- 177:65d9b1b75fca
- Parent:
- 165:3576598c0889
- Child:
- 191:d22cc4715b0c
--- 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; } }