summaryrefslogtreecommitdiff
path: root/src/components/firmwarevalidator
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-04-26 21:10:11 +0200
committerGitHub <noreply@github.com>2021-04-26 21:10:11 +0200
commit4706c99db4c1e05f9dd90f152f2dea08d8f22ab2 (patch)
treecf2bea6d67e8d91a7d6222b8e0b55a0075575003 /src/components/firmwarevalidator
parente56ebb8bd621cc8838e86fa032d680a6e7a35ffc (diff)
parent69898545193a82f7d72c9f47c9d9de36167b157b (diff)
Merge pull request #293 from Avamander/patch-5
Reformatted all the files according to clang-format style
Diffstat (limited to 'src/components/firmwarevalidator')
-rw-r--r--src/components/firmwarevalidator/FirmwareValidator.cpp4
-rw-r--r--src/components/firmwarevalidator/FirmwareValidator.h15
2 files changed, 10 insertions, 9 deletions
diff --git a/src/components/firmwarevalidator/FirmwareValidator.cpp b/src/components/firmwarevalidator/FirmwareValidator.cpp
index 48f98550..68e66d37 100644
--- a/src/components/firmwarevalidator/FirmwareValidator.cpp
+++ b/src/components/firmwarevalidator/FirmwareValidator.cpp
@@ -6,12 +6,12 @@
using namespace Pinetime::Controllers;
bool FirmwareValidator::IsValidated() const {
- auto* imageOkPtr = reinterpret_cast<uint32_t *>(validBitAdress);
+ auto* imageOkPtr = reinterpret_cast<uint32_t*>(validBitAdress);
return (*imageOkPtr) == validBitValue;
}
void FirmwareValidator::Validate() {
- if(!IsValidated())
+ if (!IsValidated())
Pinetime::Drivers::InternalFlash::WriteWord(validBitAdress, validBitValue);
}
diff --git a/src/components/firmwarevalidator/FirmwareValidator.h b/src/components/firmwarevalidator/FirmwareValidator.h
index aa576d88..ce644f97 100644
--- a/src/components/firmwarevalidator/FirmwareValidator.h
+++ b/src/components/firmwarevalidator/FirmwareValidator.h
@@ -5,14 +5,15 @@
namespace Pinetime {
namespace Controllers {
class FirmwareValidator {
- public:
- void Validate();
- bool IsValidated() const;
+ public:
+ void Validate();
+ bool IsValidated() const;
- void Reset();
- private:
- static constexpr uint32_t validBitAdress {0x7BFE8};
- static constexpr uint32_t validBitValue {1};
+ void Reset();
+
+ private:
+ static constexpr uint32_t validBitAdress {0x7BFE8};
+ static constexpr uint32_t validBitValue {1};
};
}
}