File tree Expand file tree Collapse file tree 4 files changed +48
-9
lines changed
connectivity/FEATURE_BLE/source Expand file tree Collapse file tree 4 files changed +48
-9
lines changed Original file line number Diff line number Diff line change @@ -745,7 +745,7 @@ void BLEInstanceBase::callDispatcher()
745745
746746 wsfOsDispatcher ();
747747
748- static mbed::LowPowerTimeout nextTimeout;
748+ static Timeout nextTimeout;
749749 mbed::CriticalSectionLock critical_section;
750750
751751 if (wsfOsReadyToSleep ()) {
Original file line number Diff line number Diff line change 4545#include " source/PalPrivateAddressControllerImpl.h"
4646#include " source/generic/PrivateAddressController.h"
4747
48+ #include " drivers/Timeout.h"
49+ #ifdef DEVICE_LPTICKER
50+ #include " drivers/LowPowerTimeout.h"
4851#include " drivers/LowPowerTimer.h"
52+ #else
53+ #include " drivers/Timer.h"
54+ #endif
4955
5056namespace ble {
5157
@@ -57,6 +63,14 @@ namespace impl {
5763 * @see BLEInstanceBase
5864 */
5965class BLEInstanceBase final : public ble::BLEInstanceBase {
66+ #ifdef DEVICE_LPTICKER
67+ using Timeout = mbed::LowPowerTimeout;
68+ using Timer = mbed::LowPowerTimer;
69+ #else
70+ using Timeout = mbed::Timeout;
71+ using Timer = mbed::Timer;
72+ #endif
73+
6074 friend PalSigningMonitor;
6175
6276 /* *
@@ -200,7 +214,7 @@ class BLEInstanceBase final : public ble::BLEInstanceBase {
200214 } initialization_status;
201215
202216 mutable ble::impl::PalEventQueue _event_queue;
203- mbed::LowPowerTimer _timer;
217+ Timer _timer;
204218 uint64_t _last_update_us;
205219};
206220
Original file line number Diff line number Diff line change 2323
2424#include < algorithm>
2525
26- #include " drivers/LowPowerTimeout.h"
27- #include " drivers/LowPowerTicker.h"
2826#include " platform/mbed_error.h"
2927
3028#include " ble/common/BLERoles.h"
4341
4442#include " ble/Gap.h"
4543
44+ #ifdef DEVICE_LPTICKER
45+ #include " drivers/LowPowerTimeout.h"
46+ #include " drivers/LowPowerTicker.h"
47+ #else
48+ #include " drivers/Timeout.h"
49+ #include " drivers/Ticker.h"
50+ #endif
51+
4652namespace ble {
4753
4854class PalGenericAccessService ;
@@ -75,6 +81,14 @@ class Gap :
7581public:
7682 using PreferredConnectionParams_t = ::ble::Gap::PreferredConnectionParams_t ;
7783
84+ #ifdef DEVICE_LPTICKER
85+ using Timeout = mbed::LowPowerTimeout;
86+ using Ticker = mbed::LowPowerTicker;
87+ #else
88+ using Timeout = mbed::Timeout;
89+ using Ticker = mbed::Ticker;
90+ #endif
91+
7892#if BLE_FEATURE_PRIVACY
7993#if BLE_ROLE_BROADCASTER
8094 /* *
@@ -927,9 +941,9 @@ class Gap :
927941 ConnectionParameters *_connect_to_host_resolved_address_parameters = nullptr ;
928942#endif // BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
929943
930- mbed::LowPowerTimeout _advertising_timeout;
931- mbed::LowPowerTimeout _scan_timeout;
932- mbed::LowPowerTicker _address_rotation_ticker;
944+ Timeout _advertising_timeout;
945+ Timeout _scan_timeout;
946+ Ticker _address_rotation_ticker;
933947
934948 bool _initiating = false ;
935949
Original file line number Diff line number Diff line change 2222
2323#include < cstdio>
2424
25- #include " drivers/LowPowerTicker.h"
2625#include " ble/common/BLETypes.h"
2726#include " ble/common/blecommon.h"
2827#include " source/pal/PalEventQueue.h"
2928#include " source/pal/PalPrivateAddressController.h"
3029
30+ #ifdef DEVICE_LPTICKER
31+ #include " drivers/LowPowerTicker.h"
32+ #else
33+ #include " drivers/Ticker.h"
34+ #endif
35+
3136namespace ble {
3237
3338/* *
@@ -38,6 +43,12 @@ namespace ble {
3843 */
3944class PrivateAddressController : private PalPrivateAddressController ::EventHandler {
4045public:
46+ #ifdef DEVICE_LPTICKER
47+ using Ticker = mbed::LowPowerTicker;
48+ #else
49+ using Ticker = mbed::Ticker;
50+ #endif
51+
4152 struct EventHandler {
4253 /* *
4354 * Called when a new resolvable private address has been generated.
@@ -313,7 +324,7 @@ class PrivateAddressController : private PalPrivateAddressController::EventHandl
313324 bool _generation_started;
314325 irk_t _local_irk = {};
315326 EventHandler *_event_handler = nullptr ;
316- mbed::LowPowerTicker _address_rotation_ticker;
327+ Ticker _address_rotation_ticker;
317328 address_t _resolvable_address = {};
318329 address_t _non_resolvable_address = {};
319330
You can’t perform that action at this time.
0 commit comments