35 #ifdef __BUILD_WITH_EXAMPLE__
36 #include "lpc17xx_libcfg.h"
46 static uint8_t WDT_SetTimeOut (uint8_t clk_source, uint32_t timeout);
54 static uint8_t WDT_SetTimeOut (uint8_t clk_source, uint32_t timeout)
57 uint32_t pclk_wdt = 0;
85 LPC_WDT->WDTC = (uint32_t) tempval;
97 LPC_WDT->WDTC = (uint32_t) tempval;
104 tempval = (((pclk_wdt) /
WDT_US_INDEX) * (timeout / 4));
109 LPC_WDT->WDTC = (uint32_t) tempval;
118 tempval = (((pclk_wdt) /
WDT_US_INDEX) * (timeout / 4));
122 LPC_WDT->WDTC = (uint32_t) tempval;
183 WDT_SetTimeOut(ClkSrc,TimeOut);
219 WDT_SetTimeOut(ClkSrc,TimeOut);