Skip to content

Commit 9ecde42

Browse files
author
Cruz Monrreal
authored
Merge pull request #9992 from pan-/ble-use-low-power-ticker
BLE - Use low power timing primitives
2 parents 961c9e2 + b183ba1 commit 9ecde42

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

features/FEATURE_BLE/ble/generic/GenericGap.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
#include "ble/pal/ConnectionEventMonitor.h"
3131
#include "ble/pal/Deprecated.h"
3232

33-
#include "drivers/Timeout.h"
33+
#include "drivers/LowPowerTimeout.h"
34+
#include "drivers/LowPowerTicker.h"
3435
#include "platform/mbed_error.h"
3536

3637
namespace ble {
@@ -802,9 +803,9 @@ class GenericGap :
802803
bool _random_address_rotating;
803804

804805
bool _scan_enabled;
805-
mbed::Timeout _advertising_timeout;
806-
mbed::Timeout _scan_timeout;
807-
mbed::Ticker _address_rotation_ticker;
806+
mbed::LowPowerTimeout _advertising_timeout;
807+
mbed::LowPowerTimeout _scan_timeout;
808+
mbed::LowPowerTicker _address_rotation_ticker;
808809

809810
template<size_t bit_size>
810811
struct BitArray {

features/FEATURE_BLE/targets/TARGET_CORDIO/CordioBLE.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "ble/generic/GenericGap.h"
3232
#include "ble/generic/GenericSecurityManager.h"
3333
#include "SimpleEventQueue.h"
34-
#include "Timer.h"
34+
#include "drivers/LowPowerTimer.h"
3535
#include "SigningMonitorProxy.h"
3636
#include "CordioPalSecurityManager.h"
3737
#include "BleImplementationForward.h"
@@ -171,7 +171,7 @@ class BLE : public ::BLEInstanceBase {
171171

172172
::BLE::InstanceID_t instanceID;
173173
mutable SimpleEventQueue _event_queue;
174-
mbed::Timer _timer;
174+
mbed::LowPowerTimer _timer;
175175
uint64_t _last_update_us;
176176
};
177177

0 commit comments

Comments
 (0)