diff options
Diffstat (limited to 'src/drivers/include')
| -rw-r--r-- | src/drivers/include/bluetooth.hpp | 2 | ||||
| -rw-r--r-- | src/drivers/include/nvs.hpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/drivers/include/bluetooth.hpp b/src/drivers/include/bluetooth.hpp index 5fdd527c..988c7e93 100644 --- a/src/drivers/include/bluetooth.hpp +++ b/src/drivers/include/bluetooth.hpp @@ -35,7 +35,7 @@ class Bluetooth { auto IsEnabled() -> bool; auto IsConnected() -> bool; - auto ConnectedDevice() -> std::optional<bluetooth::Device>; + auto ConnectedDevice() -> std::optional<bluetooth::MacAndName>; auto KnownDevices() -> std::vector<bluetooth::Device>; diff --git a/src/drivers/include/nvs.hpp b/src/drivers/include/nvs.hpp index 1184b72c..264d9784 100644 --- a/src/drivers/include/nvs.hpp +++ b/src/drivers/include/nvs.hpp @@ -15,6 +15,7 @@ #include "bluetooth_types.hpp" #include "tasks.hpp" +#include "lru_cache.hpp" namespace drivers { @@ -28,6 +29,11 @@ class NvsStorage { auto PreferredBluetoothDevice() -> std::optional<bluetooth::MacAndName>; auto PreferredBluetoothDevice(std::optional<bluetooth::MacAndName>) -> bool; + using BtVolumes = util::LruCache<10, bluetooth::mac_addr_t, uint8_t> ; + + auto BluetoothVolumes() -> BtVolumes; + auto BluetoothVolumes(const BtVolumes&) -> bool; + enum class Output : uint8_t { kHeadphones = 0, kBluetooth = 1, |
