summaryrefslogtreecommitdiff
path: root/src/drivers/include/nvs.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-15 17:32:57 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-15 17:32:57 +1000
commit544b0013b104a6584660724ccd502adcccd7ca6c (patch)
tree46b140ca9d51cdc14f0004ce64c7b89d021d5fce /src/drivers/include/nvs.hpp
parentd6b83fcf4a1a3039c06e0b1d1a1f7e2af2351efb (diff)
downloadtangara-fw-544b0013b104a6584660724ccd502adcccd7ca6c.tar.gz
persist preferred bluetooth device in nvs
Diffstat (limited to 'src/drivers/include/nvs.hpp')
-rw-r--r--src/drivers/include/nvs.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/include/nvs.hpp b/src/drivers/include/nvs.hpp
index be783583..32c2ae73 100644
--- a/src/drivers/include/nvs.hpp
+++ b/src/drivers/include/nvs.hpp
@@ -6,9 +6,13 @@
#pragma once
+#include <optional>
+
#include "esp_err.h"
#include "nvs.h"
+#include "bluetooth_types.hpp"
+
namespace drivers {
class NvsStorage {
@@ -17,6 +21,9 @@ class NvsStorage {
auto SchemaVersion() -> uint8_t;
+ auto PreferredBluetoothDevice() -> std::optional<bluetooth::mac_addr_t>;
+ auto PreferredBluetoothDevice(std::optional<bluetooth::mac_addr_t>) -> void;
+
explicit NvsStorage(nvs_handle_t);
~NvsStorage();