summaryrefslogtreecommitdiff
path: root/src/drivers/include
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-01 12:13:48 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-01 12:13:48 +1000
commit955a8ce303a9f8fd6a34009934e3d7aaeff3ec17 (patch)
tree18d5783a5c7be0a3e08e6ff0ea595432bc380761 /src/drivers/include
parentd41de537a0e31e1c5ad18b5024c781f6e4a07bbb (diff)
downloadtangara-fw-955a8ce303a9f8fd6a34009934e3d7aaeff3ec17.tar.gz
Basic nvs init + bluetooth in the build
Diffstat (limited to 'src/drivers/include')
-rw-r--r--src/drivers/include/bluetooth.hpp19
-rw-r--r--src/drivers/include/nvs.hpp27
2 files changed, 46 insertions, 0 deletions
diff --git a/src/drivers/include/bluetooth.hpp b/src/drivers/include/bluetooth.hpp
new file mode 100644
index 00000000..f3a4b2ac
--- /dev/null
+++ b/src/drivers/include/bluetooth.hpp
@@ -0,0 +1,19 @@
+
+#pragma once
+
+#include <vector>
+
+namespace drivers {
+
+class Bluetooth {
+ public:
+ static auto Enable() -> Bluetooth*;
+ Bluetooth();
+ ~Bluetooth();
+
+ struct Device {};
+ auto Scan() -> std::vector<Device>;
+ private:
+ };
+
+}
diff --git a/src/drivers/include/nvs.hpp b/src/drivers/include/nvs.hpp
new file mode 100644
index 00000000..be783583
--- /dev/null
+++ b/src/drivers/include/nvs.hpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2023 jacqueline <me@jacqueline.id.au>
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
+#pragma once
+
+#include "esp_err.h"
+#include "nvs.h"
+
+namespace drivers {
+
+class NvsStorage {
+ public:
+ static auto Open() -> NvsStorage*;
+
+ auto SchemaVersion() -> uint8_t;
+
+ explicit NvsStorage(nvs_handle_t);
+ ~NvsStorage();
+
+ private:
+ nvs_handle_t handle_;
+};
+
+} // namespace drivers \ No newline at end of file