summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-09-13 10:09:04 +1000
committerjacqueline <me@jacqueline.id.au>2023-09-13 10:09:04 +1000
commit0ea358ab8157d743dc07f12bde5fb34d03a02522 (patch)
treefade7a837b75f94df95ac2a00a0775353179155d /src/drivers
parentb0aa9ab391143a8139373e42ea95ccb6ed14ce60 (diff)
downloadtangara-fw-0ea358ab8157d743dc07f12bde5fb34d03a02522.tar.gz
Make the onboarding flow basically work. Much still to do!
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/include/display.hpp2
-rw-r--r--src/drivers/include/storage.hpp7
-rw-r--r--src/drivers/nvs.cpp2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/drivers/include/display.hpp b/src/drivers/include/display.hpp
index a3c0e5ae..e50927d7 100644
--- a/src/drivers/include/display.hpp
+++ b/src/drivers/include/display.hpp
@@ -51,7 +51,7 @@ class Display {
private:
IGpios& gpio_;
spi_device_handle_t handle_;
- spi_transaction_t *transaction_;
+ spi_transaction_t* transaction_;
bool display_on_;
uint_fast8_t brightness_;
diff --git a/src/drivers/include/storage.hpp b/src/drivers/include/storage.hpp
index 0b0cb494..836bbbdc 100644
--- a/src/drivers/include/storage.hpp
+++ b/src/drivers/include/storage.hpp
@@ -21,6 +21,13 @@ namespace drivers {
extern const char* kStoragePath;
+enum class SdState {
+ kNotPresent,
+ kNotFormatted,
+ kNotMounted,
+ kMounted,
+};
+
class SdStorage {
public:
enum Error {
diff --git a/src/drivers/nvs.cpp b/src/drivers/nvs.cpp
index 0a466b16..11dde08c 100644
--- a/src/drivers/nvs.cpp
+++ b/src/drivers/nvs.cpp
@@ -190,7 +190,7 @@ auto NvsStorage::AmpCurrentVolume(uint16_t val) -> std::future<bool> {
auto NvsStorage::HasShownOnboarding() -> std::future<bool> {
return writer_->Dispatch<bool>([&]() -> bool {
- uint8_t out = true;
+ uint8_t out = false;
nvs_get_u8(handle_, kKeyOnboarded, &out);
return out;
});