beautypg.com

Watchdog timer sample code, Ar-b8601 user manual – Acrosser AR-N8601 User Manual

Page 17

background image

AR-B8601 User Manual

17


WATCHDOG TIMER Sample Code

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

// 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