summaryrefslogtreecommitdiff
path: root/src/BootloaderVersion.h
diff options
context:
space:
mode:
authorNeil O'Fix <69880003+nlfx@users.noreply.github.com>2021-06-26 18:53:32 +0000
committerGitHub <noreply@github.com>2021-06-26 20:53:32 +0200
commit0045fb16b66b008c13888312b92688dcb7535a0c (patch)
treeae945a9184c1fe5f47003c9a6ef8e05a389d9f25 /src/BootloaderVersion.h
parent883700fca13a45b6cb0af4d74e3ef276a2d69283 (diff)
SPI flash sleep if bootloader >= 1.0.0 (#322)
* Retrieve and display bootloader version - Display bootloader version on System Info screen - Enable SPI flash sleep mode if bootloader version >= 1.0.0 * Wait for SPI flash to wakeup before starting OTA DFU
Diffstat (limited to 'src/BootloaderVersion.h')
-rw-r--r--src/BootloaderVersion.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/BootloaderVersion.h b/src/BootloaderVersion.h
index c1ede0f5..f8127414 100644
--- a/src/BootloaderVersion.h
+++ b/src/BootloaderVersion.h
@@ -3,10 +3,15 @@
namespace Pinetime {
class BootloaderVersion {
public:
- static uint32_t Major();
- static uint32_t Minor();
- static uint32_t Patch();
+ static const uint32_t Major();
+ static const uint32_t Minor();
+ static const uint32_t Patch();
static const char* VersionString();
- static bool IsValid();
+ static const bool IsValid();
+ static void SetVersion(uint32_t v);
+ private:
+ static uint32_t version;
+ static constexpr size_t VERSION_STR_LEN = 12;
+ static char versionString[VERSION_STR_LEN];
};
-} \ No newline at end of file
+}