beautypg.com

Watchdog timer – Acrosser AR-N8601FL User Manual

Page 21

background image

Revision: 1.0

21

WATCHDOG TIMER

//===========================================================================

// Describe : W83697HF WatchDog timer test

// Date : 08/12/2004

// Author : Willy

//===========================================================================

//===========================================================================

// Language include files

//===========================================================================

#include

#include

#include

typedef unsigned char BYTE;

typedef unsigned short int WORD;

typedef unsigned long int DWORD;

//===========================================================================

// Normal procedure

//===========================================================================

void Show_Title()

{

clrscr();

printf("WatchDog Test for W83697HF\n");

printf("1. WDT.EXE 10 s ==--> 10 seconds to reset.\n");

printf("2. WDT.EXE 20 m ==--> 20 minutes to reset.\n");

}

//===========================================================================

// Main procedure

//===========================================================================

int main(int argc, char *argv[])

{

char Time_Format;

BYTE

IO_Port_Address=0x2E;

BYTE Time=10; // Default is 10

BYTE Format=0x01; // Default is 0x01 = Seconds