summaryrefslogtreecommitdiff
path: root/src/components/ble/BleController.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2022-01-07 16:31:01 (GMT)
committerGitea <gitea@fake.local>2022-01-07 16:31:01 (GMT)
commitadc7909c9823c5cd9fc9888a84e84f9182b9088f (patch)
tree778abfb7792fb7e58e3ec4408c9e56444f383e25 /src/components/ble/BleController.h
parentcfef0131b7b1bb83c81db417c43d6d499594125f (diff)
parent26ae828e393d28390c5ea718bec9d4c1a96435ac (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/components/ble/BleController.h')
-rw-r--r--src/components/ble/BleController.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/ble/BleController.h b/src/components/ble/BleController.h
index 2cba26a..72b8766 100644
--- a/src/components/ble/BleController.h
+++ b/src/components/ble/BleController.h
@@ -9,7 +9,7 @@ namespace Pinetime {
public:
using BleAddress = std::array<uint8_t, 6>;
enum class FirmwareUpdateStates { Idle, Running, Validated, Error };
- enum class AddressTypes { Public, Random };
+ enum class AddressTypes { Public, Random, RPA_Public, RPA_Random };
Ble() = default;
bool IsConnected() const {
@@ -48,6 +48,12 @@ namespace Pinetime {
void AddressType(AddressTypes t) {
addressType = t;
}
+ void SetPairingKey(uint32_t k) {
+ pairingKey = k;
+ }
+ uint32_t GetPairingKey() const {
+ return pairingKey;
+ }
private:
bool isConnected = false;
@@ -57,6 +63,7 @@ namespace Pinetime {
FirmwareUpdateStates firmwareUpdateState = FirmwareUpdateStates::Idle;
BleAddress address;
AddressTypes addressType;
+ uint32_t pairingKey = 0;
};
}
-} \ No newline at end of file
+}