Aaeon SBC-400 User Manual page 63

Half-size 486 all-in-one cpu card with cache
Table of Contents

Advertisement

#include<stdio.h> #include<dos.h> #include<conio> #include
<time.h> #include<graphics.h> void mydelay(void);
/* MAIN PROGRAM */ void main (void) {
unsigned int
char inkey;
clrscr();
gotoxy(15, 6);printf("AAEON TECHNOLOGY, INC.");
gotoxy(15, 7);printf("WATCHDOG TIMER TEST & DEMO
PROGRAM");
gotoxy(15, 9);printf("Please setup watchdog delay
time:(2 Sec-30 Sec)");
/* Set watchdog timer time-out interval */
scanf("%2d",&dog);
out interval (Sec) */
dog=dog/2;
to designated Hex */
dog=15-dog;
outportb (0x443,dog); /* Enable watchdog timer */
/* Setup screen display format */
gotoxy(15,11);printf("Now enable watchdog!");
gotoxy(15,12);printf("You can put keyboard reset or
disable watchdog.");
gotoxy(15,13);printf(" [1]. Reset watchdog.");
gotoxy(15,14);printf(" [2]. Disable watchdog.");
gotoxy(15,15);printf(" [3]. Return to O.S.");
/* Read key pressed */
while(1){
if(kbhit()){
}
56
SBC-400 User's Manual
dog=0
run_time=0;
/* Input watchdog timer time-
/* Convert time-out interval
inkey=getch();
switch(inkey){
case '1': /* Reset Watchdog timer */
case '2': /* Disable Watchdog timer */
default : break;
}
gotoxy(15,11);printf("Now enable
watchdog timer!");
outportb(0x443,dog);
run_time=0;
break;
gotoxy(15,12);printf("Now
disable watchdog timer!");
outportb (0x43,dog);
return;

Advertisement

Table of Contents
loading

Table of Contents