APPENDIX
52 MB740 User’s Manual
{
printf("\n ITE8705 Watch Timer Tester (AUTO DETECT) \n"\
" Usage : ITE8705 reset_time\n"\
" Ex : ITE8705 3 => reset system after 3 second\n"\
" ITE8705 0 => disable watch dog timer\n");
}
//============================================================
void EnableWDT(int interval)
{
Set_ITE8705_LD( 0x05); //Set Logic Device 5
Set_ITE8705_Reg( 0xFB, 0x88); //Enable WDT
Set_ITE8705_Reg( 0xFC, 0x36); //Set GPIO Mapping
Set_ITE8705_Reg( 0xFD, interval); //set timer
}
//============================================================
void DisableWDT(void)
{
Set_ITE8705_LD(0x05); //switch to logic device 8
Set_ITE8705_Reg(0xFB, 0x00); //clear watchdog timer
Set_ITE8705_Reg(0xFD, 0x00); //watchdog disabled
}
//============================================================
File name: ITE8705.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 "ITE8705.H"
#include <dos.h>
//============================================================
unsigned int ITE8705_BASE;
void Unlock_ITE8705 (void);
void Lock_ITE8705 (void);
//============================================================
unsigned int Init_ITE8705(void)
{
unsigned int result; //0=NA,1=ITE8705
ITE8705_BASE = 0x2E;
result = Get_ITE8705_Reg(0x21);
if (result == 0x05)
{
result = 1;
goto Init_Finish;
}
ITE8705_BASE = 0x4E;
result = Get_ITE8705_Reg(0x21);
if (result == 0x05)
{