2025-12-12 19:01:15 +07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
#include <MeshCore.h>
|
|
|
|
|
|
|
|
|
|
#if defined(NRF52_PLATFORM)
|
|
|
|
|
|
|
|
|
|
class NRF52Board : public mesh::MainBoard {
|
2025-12-09 15:00:08 +01:00
|
|
|
protected:
|
|
|
|
|
uint8_t startup_reason;
|
|
|
|
|
|
2025-12-12 19:01:15 +07:00
|
|
|
public:
|
2025-12-09 17:05:33 +01:00
|
|
|
virtual void begin();
|
2025-12-09 15:00:08 +01:00
|
|
|
virtual uint8_t getStartupReason() const override { return startup_reason; }
|
2025-12-12 19:01:15 +07:00
|
|
|
float getMCUTemperature() override;
|
2025-12-09 14:31:55 +01:00
|
|
|
virtual void reboot() override { NVIC_SystemReset(); }
|
2025-12-12 19:01:15 +07:00
|
|
|
};
|
2025-12-09 17:05:33 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* The NRF52 has an internal DC/DC regulator that allows increased efficiency
|
|
|
|
|
* compared to the LDO regulator. For being able to use it, the module/board
|
|
|
|
|
* needs to have the required inductors and and capacitors populated. If the
|
|
|
|
|
* hardware requirements are met, this subclass can be used to enable the DC/DC
|
|
|
|
|
* regulator.
|
|
|
|
|
*/
|
|
|
|
|
class NRF52BoardDCDC : virtual public NRF52Board {
|
|
|
|
|
public:
|
|
|
|
|
virtual void begin() override;
|
|
|
|
|
};
|
2025-12-12 19:01:15 +07:00
|
|
|
#endif
|