ls1x-master-v0.4/public/ls1x_wdg.c
2024-11-27 15:39:05 +08:00

21 lines
275 B
C

#include "ls1x_wdg.h"
#include "ls1x.h"
void WDG_SetWatchDog(uint32_t time)
{
PMU->WDT_FEED = 0xa55a55aa;
PMU->WDT_CFG = (((~time)<<16) | time);
}
void WDG_DogFeed(void)
{
PMU->WDT_FEED = 0xa55a55aa;
}
void WdgInit(void)
{
WDG_SetWatchDog(0x80007fff);
}