User manual

Appendix
CPC-3713CLD3N - 35 -
outportb(INDEX_PORT, 0x55);
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x0A);
outportb(INDEX_PORT, 0x30);
outportb(DATA_PORT, 0x01);
outportb(INDEX_PORT, 0x60);
tmp_reg = inportb(DATA_PORT);
pm_base = tmp_reg;
outportb(INDEX_PORT, 0x61);
tmp_reg = inportb(DATA_PORT);
pm_base = pmbase<<8+tmp_reg; /*Get the variable pm_base for later
use*/
}
(2) Configure the WDT operating mode to enable or disable WDT
/*
Description: the function, SetWDT, is used to configure the parameter required
when configuring WDT to enable or disable WDT.
Input: Wmode: 0 - Configure WDT to reset mode
IRQ_NO - Configure WDT to interrupt mode. Please
replace the constant IRQ_NO with the interrupt number
need to be used. The available range of the interrupt number
has been listed in the beginning of this chapter
Wtime: 0 - Configure WDT to time by minute
1 - Configure WDT to time by second
Timeout: 0 - disable WDT
TIME_OUT_VALUE - Enable WDT. Please replace the
constant TIME_OUT_VALUE with the unit number of
timeout value (0x01 ~ 0xFF)
*/
SetWDT(unsigned int Wmode, unsignedint Wtime, unsigned int Timeout)