User manual

ID70 Motherboard User Manual
75
Note2: Watchdog Sample Code
//==========================================================
//File of the W_F81865.C
//==========================================================
//This Sample code is for Watchdog timer configuration
//==========================================================
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
//==========================================================
#define F81865_INDEX_PORT 0x4E
#define F81865_DATA_PORT 0x4F
#define F81865_UNLOCK 0x87
#define F81865_LOCK 0xAA
//==========================================================
void Unlock_F81865(void);
void Lock_F81865(void);
void Set_F81865_Reg(unsigned char,unsigned char);
unsigned char Get_F81865_Reg( unsigned char REG);
void delay1second(void);
void delay1minute(void);
//==========================================================
int g_bDisableWatchdog = 0;
int g_iWatchdog_timeout = 10;
int g_iCount = 0;
//==========================================================
int main(int argc, char* argv[])
{
int Watchdog_mode = 0;
Watchdog_mode = atoi(argv[1]);//0:seconds, 1:minutes
if (Watchdog_mode==0)
printf("Watchdog Second Mode\n");
else