Aaeon HSB-440I Manual page 47

Half-size cpu card
Table of Contents

Advertisement

H a l f - s i z e C P U C a r d
Programming the watchdog timer
The HSB-440I contains a watchdog timer reset pin (GP16). All
reference material can ge gound below.
========================================
** Title: WatchDog Timer Setup Utility (for W83977 GP16)
** Company: AAEON Technology Inc.
** Compiler: Borland C ++ Version 3.0
========================================
#include <dos.h>
#include <io.h>
#include <bios.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
/* Set I/O Address : 370/371 */
#define IO_INDEX_PORT 0x3f0
#define IO_DATA_PORT 0x3f1
/* Set Watchdog reset pin : 16 */
#define watch_dog_output_GP 16
#define UNLOCK_DATA 0x87
#define LOCK_DATA 0xAA
#define DEVICE_REGISTER 0x07
void EnterConfigMode()
{
outportb(IO_INDEX_PORT, UNLOCK_DATA);
outportb(IO_INDEX_PORT, UNLOCK_DATA);
}
void ExitConfigMode()
{
outportb(IO_INDEX_PORT, LOCK_DATA);
}
void SelectDevice(unsigned char device)
{
outportb(IO_INDEX_PORT, DEVICE_REGISTER);
outportb(IO_DATA_PORT, device);
}
Appendix A Programming the Watchdog Timer
H S B - 4 4 0 I
A-2

Advertisement

Table of Contents
loading

Table of Contents