Use InfiniTime Watchdog.h by providing mdk/nrf.h and others

This commit is contained in:
Reinhold Gschweicher
2023-05-03 20:58:31 +02:00
parent beea678fce
commit 4b0c2dc3eb
8 changed files with 569 additions and 223 deletions

19
sim/nrfx/mdk/nrf52.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include "mdk/nrf52.h"
// pointer variable used by the rest of the code, and its initialization
NRF_WDT_Type *NRF_WDT;
void init_NRF_WDT()
{
static NRF_WDT_Type NRF_WDT_object;
NRF_WDT = &NRF_WDT_object;
}
// pointer variable used by the rest of the code, and its initialization
NRF_POWER_Type *NRF_POWER;
void init_NRF_POWER()
{
static NRF_POWER_Type NRF_POWER_object;
NRF_POWER = &NRF_POWER_object;
// sim: always return ResetPin as reason for reboot
NRF_POWER->RESETREAS = 0x01;
}