mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Use common NRF52 begin() and deduplicate() startup reason init
Use a common begin() method that can be called from derived classes to contain the shared initialization code. Signed-off-by: Frieder Schrempf <frieder@fris.de>
This commit is contained in:
parent
87b0e432bb
commit
93d1560d14
41 changed files with 26 additions and 128 deletions
|
|
@ -6,7 +6,12 @@
|
|||
#if defined(NRF52_PLATFORM)
|
||||
|
||||
class NRF52Board : public mesh::MainBoard {
|
||||
protected:
|
||||
uint8_t startup_reason;
|
||||
|
||||
public:
|
||||
virtual void begin() { startup_reason = BD_STARTUP_NORMAL; }
|
||||
virtual uint8_t getStartupReason() const override { return startup_reason; }
|
||||
float getMCUTemperature() override;
|
||||
virtual void reboot() override { NVIC_SystemReset(); }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue