Acrosser AR-B5631 User Manual
Page 30
Revision: 1.0
30
// Set Watchdog
outportb(IO_Port_Address,0x07);
// Point to Logical Device Number Reg.
outportb(IO_Port_Address+1,0x07); // Select logical device 7, (Watchdog Function)
outportb(IO_Port_Address,0x23); // Select Watchdog use CLKIN
outportb(IO_Port_Address+1,inportb(IO_Port_Address+1)|0x10);
outportb(IO_Port_Address,0x72); // Select Watchdog use keyboard reset
outportb(IO_Port_Address+1,0x40);
outportb(IO_Port_Address,0x72); // Select Watchdog count mode seconds or minutes
outportb(IO_Port_Address+1,inportb(IO_Port_Address+1)|0x80); // Set Second
outportb(IO_Port_Address,0x73); // Set Watchdog Timer Value
outportb(IO_Port_Address+1,Time); // 0x00 to disable, max 0xFF