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.
Revision 177:65d9b1b75fca, committed 2015-11-18
- Comitter:
- Andrea Palmieri
- Date:
- Wed Nov 18 15:48:31 2015 +0100
- Parent:
- 176:33edcdbe9ce6
- Child:
- 178:d8350338da2d
- Commit message:
- Provide mbed classic compatibility
Signed-off-by: Andrea Palmieri <andrea.palmieri@st.com>
Changed in this revision
--- a/source/BlueNRGDevice.cpp Fri Nov 13 16:31:14 2015 +0100
+++ b/source/BlueNRGDevice.cpp Wed Nov 18 15:48:31 2015 +0100
@@ -37,7 +37,7 @@
* @{
*/
-#include "mbed-drivers/mbed.h"
+#include "mbed.h"
#include "BlueNRGDevice.h"
#include "BlueNRGGap.h"
#include "BlueNRGGattServer.h"
--- 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;
}
}
--- a/source/BlueNRGGattClient.cpp Fri Nov 13 16:31:14 2015 +0100 +++ b/source/BlueNRGGattClient.cpp Wed Nov 18 15:48:31 2015 +0100 @@ -37,7 +37,7 @@ */ #include "BlueNRGGattClient.h" -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "BlueNRGGap.h" #include "Utils.h" #include "debug.h"
--- a/source/BlueNRGGattServer.cpp Fri Nov 13 16:31:14 2015 +0100 +++ b/source/BlueNRGGattServer.cpp Wed Nov 18 15:48:31 2015 +0100 @@ -40,7 +40,7 @@ */ #include "BlueNRGGattServer.h" -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "BlueNRGGap.h" #include "Utils.h" #include "debug.h"
--- a/source/platform/clock.c Fri Nov 13 16:31:14 2015 +0100 +++ b/source/platform/clock.c Wed Nov 18 15:48:31 2015 +0100 @@ -1,7 +1,7 @@ #include "clock.h" -#include "mbed-drivers/wait_api.h" -#include "mbed-drivers/rtc_time.h" +#include "wait_api.h" +#include "rtc_time.h" const uint32_t CLOCK_SECOND = 1000;
--- a/x-nucleo-idb0xa1/BlueNRGDevice.h Fri Nov 13 16:31:14 2015 +0100 +++ b/x-nucleo-idb0xa1/BlueNRGDevice.h Wed Nov 18 15:48:31 2015 +0100 @@ -40,7 +40,7 @@ #include "btle.h" -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "ble/blecommon.h" #include "ble/BLEInstanceBase.h" #include "ble/BLE.h"
--- a/x-nucleo-idb0xa1/BlueNRGGap.h Fri Nov 13 16:31:14 2015 +0100 +++ b/x-nucleo-idb0xa1/BlueNRGGap.h Wed Nov 18 15:48:31 2015 +0100 @@ -35,7 +35,7 @@ #ifndef __BLUENRG_GAP_H__ #define __BLUENRG_GAP_H__ -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "ble/blecommon.h" #include "btle.h" #include "ble/GapAdvertisingParams.h"
--- a/x-nucleo-idb0xa1/BlueNRGGattClient.h Fri Nov 13 16:31:14 2015 +0100 +++ b/x-nucleo-idb0xa1/BlueNRGGattClient.h Wed Nov 18 15:48:31 2015 +0100 @@ -34,7 +34,7 @@ #ifndef __BLUENRG_GATT_CLIENT_H__ #define __BLUENRG_GATT_CLIENT_H__ -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "ble/blecommon.h" #include "btle.h" #include "ble/GattClient.h"
--- a/x-nucleo-idb0xa1/BlueNRGGattServer.h Fri Nov 13 16:31:14 2015 +0100 +++ b/x-nucleo-idb0xa1/BlueNRGGattServer.h Wed Nov 18 15:48:31 2015 +0100 @@ -36,7 +36,7 @@ #ifndef __BLUENRG_GATT_SERVER_H__ #define __BLUENRG_GATT_SERVER_H__ -#include "mbed-drivers/mbed.h" +#include "mbed.h" #include "ble/blecommon.h" #include "btle.h" #include "ble/GattService.h"
--- a/x-nucleo-idb0xa1/utils/Utils.h Fri Nov 13 16:31:14 2015 +0100
+++ b/x-nucleo-idb0xa1/utils/Utils.h Wed Nov 18 15:48:31 2015 +0100
@@ -21,7 +21,7 @@
#define __UTIL_H__
#include "hal_types.h"
-#include "mbed-drivers/mbed.h"
+#include "mbed.h"
#define STORE_LE_16(buf, val) ( ((buf)[0] = (uint8_t) (val) ) , \
((buf)[1] = (uint8_t) (val>>8) ) )