MANO561 Mini ITX Motherboard
Watchdog Timer
49
{
lpFnDll_Get_IO =
(
LPFNDLLGETIOSPACE
)GetProcAddress(
GetModuleHandle
(
"diodll.dll"
),
"GetIoSpaceByte"
);
lpFnDll_Set_IO =
(
LPFNDLLSETIOSPACE
)GetProcAddress(
GetModuleHandle
(
"diodll.dll"
),
"SetIoSpaceByte"
);
}
printf(
"Input Watch Dog Timer type, 1:Second ; 2:Minute :"
);
scanf(
"%d"
,&unit);
printf(
"\nInput Timer to countdown:"
);
scanf(
"%d"
, &WDTtimer);
printf(
"Start to countdown..."
);
//==Enter MB Pnp Mode==
lpFnDll_Set_IO(0x2e, 0x87);
lpFnDll_Set_IO(0x2e, 0x87);
lpFnDll_Set_IO(0x2e, 0x07);
lpFnDll_Set_IO(0x2f, 0x07);
//SET LDN 07
//set LDN07 FA 10 to 11
lpFnDll_Set_IO(0x2e, 0xFA);
WDTDATA = lpFnDll_Get_IO(0x2f);
WDTDATA =
setbit
(WDTDATA, 0);
lpFnDll_Set_IO(0x2f, WDTDATA);
if
(unit == 1)
{
lpFnDll_Set_IO(0x2e, 0xF6);
lpFnDll_Set_IO(0x2f, WDTtimer);
//start watchdog counting
lpFnDll_Set_IO(0x2e, 0xF5);
WDTDATA = lpFnDll_Get_IO(0x2f);
WDTDATA =
setbit
(WDTDATA, 5);
lpFnDll_Set_IO(0x2f, WDTDATA);
}
else
if
(unit == 2)
{
//set WDT Timer
lpFnDll_Set_IO(0x2e, 0xF6);
lpFnDll_Set_IO(0x2f, WDTtimer);
//set watchdog time unit to min
lpFnDll_Set_IO(0x2e, 0xF5);
WDTDATA = lpFnDll_Get_IO(0x2f);
WDTDATA =
setbit
(WDTDATA, 3);
lpFnDll_Set_IO(0x2f, WDTDATA);
//start watchdog counting
lpFnDll_Set_IO(0x2e, 0xF5);
WDTDATA = lpFnDll_Get_IO(0x2f);
WDTDATA =
setbit
(WDTDATA, 5);
lpFnDll_Set_IO(0x2f, WDTDATA);
}
system(
"pause"
);
return
0;
}
Summary of Contents for E38M561100
Page 5: ...v This page is intentionally left blank ...
Page 6: ......
Page 10: ...MANO561 Mini ITX Motherboard 4 Introduction 1 4 Block Diagram ...
Page 12: ...MANO561 Mini ITX Motherboard 6 Board and Pin Assignments Bottom View ...
Page 59: ...MANO561 Mini ITX Motherboard Digital I O 53 This page is intentionally left blank ...