123456789101112131415161718192021222324 |
- #include "yc11xx_wdt.h"
- #include "ycdef.h"
- void WDT_Enable(void)
- {
- HWRITE(mem_watchdog_enable,0x01);
- uint8_t config = *((volatile byte*)(0x10008043));
- config |= (1<<2);
- *((volatile byte*)(0x10008043)) = config;
- *((volatile byte*)(0x10008004)) = 0x2;
- }
- void WDT_Disable(void)
- {
- HWRITE(mem_watchdog_enable,0x00);
- uint8_t config = *((volatile byte*)(0x10008043));
- config &= (~(1<<2));
- *((volatile byte*)(0x10008043)) = config;
- }
- void WDT_Kick(void)
- {
- *((volatile byte*)(0x10008004)) = 0x2;
- }
|