diff options
Diffstat (limited to 'platformio/temphum/src/config.h')
-rw-r--r-- | platformio/temphum/src/config.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/platformio/temphum/src/config.h b/platformio/temphum/src/config.h deleted file mode 100644 index 2a5b36a..0000000 --- a/platformio/temphum/src/config.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include <Arduino.h> - -namespace homekit::config { - -struct ConfigFlags { - uint8_t wifi_configured: 1; - uint8_t node_configured: 1; - uint8_t reserved: 6; -} __attribute__((packed)); - -struct ConfigData { - // helpers - uint32_t crc = 0; - uint32_t magic = 0; - char node_id[16] = {0}; - char wifi_ssid[32] = {0}; - char wifi_psk[63] = {0}; - ConfigFlags flags {0}; - - // helper methods - char* escapeHomeId(char* buf, size_t len); -} __attribute__((packed)); - - -ConfigData read(); -void write(ConfigData& data); -void erase(); -void erase(ConfigData& data); -bool isValid(ConfigData& data); -bool isDirty(ConfigData& data); - -}
\ No newline at end of file |