Use InfiniTime Watchdog.h by providing mdk/nrf.h and others
This commit is contained in:
19
sim/nrfx/mdk/nrf52.cpp
Normal file
19
sim/nrfx/mdk/nrf52.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user