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()
745
745
746
746
wsfOsDispatcher ();
747
747
748
- static mbed::LowPowerTimeout nextTimeout;
748
+ static Timeout nextTimeout;
749
749
mbed::CriticalSectionLock critical_section;
750
750
751
751
if (wsfOsReadyToSleep ()) {
Original file line number Diff line number Diff line change 45
45
#include " source/PalPrivateAddressControllerImpl.h"
46
46
#include " source/generic/PrivateAddressController.h"
47
47
48
+ #include " drivers/Timeout.h"
49
+ #ifdef DEVICE_LPTICKER
50
+ #include " drivers/LowPowerTimeout.h"
48
51
#include " drivers/LowPowerTimer.h"
52
+ #else
53
+ #include " drivers/Timer.h"
54
+ #endif
49
55
50
56
namespace ble {
51
57
@@ -57,6 +63,14 @@ namespace impl {
57
63
* @see BLEInstanceBase
58
64
*/
59
65
class 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
+
60
74
friend PalSigningMonitor;
61
75
62
76
/* *
@@ -200,7 +214,7 @@ class BLEInstanceBase final : public ble::BLEInstanceBase {
200
214
} initialization_status;
201
215
202
216
mutable ble::impl::PalEventQueue _event_queue;
203
- mbed::LowPowerTimer _timer;
217
+ Timer _timer;
204
218
uint64_t _last_update_us;
205
219
};
206
220
Original file line number Diff line number Diff line change 23
23
24
24
#include < algorithm>
25
25
26
- #include " drivers/LowPowerTimeout.h"
27
- #include " drivers/LowPowerTicker.h"
28
26
#include " platform/mbed_error.h"
29
27
30
28
#include " ble/common/BLERoles.h"
43
41
44
42
#include " ble/Gap.h"
45
43
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
+
46
52
namespace ble {
47
53
48
54
class PalGenericAccessService ;
@@ -75,6 +81,14 @@ class Gap :
75
81
public:
76
82
using PreferredConnectionParams_t = ::ble::Gap::PreferredConnectionParams_t ;
77
83
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
+
78
92
#if BLE_FEATURE_PRIVACY
79
93
#if BLE_ROLE_BROADCASTER
80
94
/* *
@@ -927,9 +941,9 @@ class Gap :
927
941
ConnectionParameters *_connect_to_host_resolved_address_parameters = nullptr ;
928
942
#endif // BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
929
943
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;
933
947
934
948
bool _initiating = false ;
935
949
Original file line number Diff line number Diff line change 22
22
23
23
#include < cstdio>
24
24
25
- #include " drivers/LowPowerTicker.h"
26
25
#include " ble/common/BLETypes.h"
27
26
#include " ble/common/blecommon.h"
28
27
#include " source/pal/PalEventQueue.h"
29
28
#include " source/pal/PalPrivateAddressController.h"
30
29
30
+ #ifdef DEVICE_LPTICKER
31
+ #include " drivers/LowPowerTicker.h"
32
+ #else
33
+ #include " drivers/Ticker.h"
34
+ #endif
35
+
31
36
namespace ble {
32
37
33
38
/* *
@@ -38,6 +43,12 @@ namespace ble {
38
43
*/
39
44
class PrivateAddressController : private PalPrivateAddressController ::EventHandler {
40
45
public:
46
+ #ifdef DEVICE_LPTICKER
47
+ using Ticker = mbed::LowPowerTicker;
48
+ #else
49
+ using Ticker = mbed::Ticker;
50
+ #endif
51
+
41
52
struct EventHandler {
42
53
/* *
43
54
* Called when a new resolvable private address has been generated.
@@ -313,7 +324,7 @@ class PrivateAddressController : private PalPrivateAddressController::EventHandl
313
324
bool _generation_started;
314
325
irk_t _local_irk = {};
315
326
EventHandler *_event_handler = nullptr ;
316
- mbed::LowPowerTicker _address_rotation_ticker;
327
+ Ticker _address_rotation_ticker;
317
328
address_t _resolvable_address = {};
318
329
address_t _non_resolvable_address = {};
319
330
You can’t perform that action at this time.
0 commit comments