INSTALLATIONS
IB798 User’s Manual
19
{
unsigned char bBuf;
bBuf = Get_W697HF_Reg(0x29);
bBuf &= (~0x60);
bBuf |= 0x20;
Set_W697HF_Reg(0x29,
bBuf);
//enable
WDTO
Set_W697HF_LD(0x08);
//switch
to
logic
device
8
bBuf = Get_W697HF_Reg(0xF3);
bBuf &= (~0x04);
Set_W697HF_Reg( 0xF3, bBuf);
//count mode is second
Set_W697HF_Reg( 0xF4, interval);
//set timer
Set_W697HF_Reg(
0x30,
0x01);
//enable
timer
}
//===========================================================================
void DisableWDT(void)
{
Set_W697HF_LD(0x08);
//switch
to
logic
device
8
Set_W697HF_Reg(0x30,
0x00);
//watchdog
disabled
Set_W697HF_Reg(0xF4,
0x00);
//clear
watchdog
timer
}
//===========================================================================
Filename
:
W697hf.cpp
//===========================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//===========================================================================
#include "W697HF.H"
#include <dos.h>
//===========================================================================
unsigned int W697HF_BASE;
void Unlock_W697HF (void);
void Lock_W697HF (void);
//===========================================================================
unsigned int Init_W697HF(void)
{
unsigned int result;
unsigned char ucDid;
W697HF_BASE = 0x2E;
result = W697HF_BASE;
ucDid = Get_W697HF_Reg(0x20);
if ( ucDid == 0x60)
{
goto
Init_Finish;
}
W697HF_BASE = 0x4E;
result = W697HF_BASE;
ucDid = Get_W697HF_Reg(0x20);
if ( ucDid == 0x60)
{
goto
Init_Finish;
}
W697HF_BASE = 0x00;
result = W697HF_BASE;
Init_Finish:
return
(result);
}
//===========================================================================
void Unlock_W697HF (void)
{
outportb(W697HF_INDEX_PORT,
W697HF_UNLOCK);
outportb(W697HF_INDEX_PORT,
W697HF_UNLOCK);
Summary of Contents for IB798
Page 1: ...IB798 VIA CN700 5 25 inch SBC USER S MANUAL Version 1 0...
Page 4: ...iv IB798 User s Manual This page is intentionally left blank...
Page 8: ...INTRODUCTION 4 IB798 User s Manual Board Dimensions...
Page 54: ...DRIVERS INSTALLATION 50 IB798 User s Manual This page is intentionally left blank...