Se-92 user manual – IBASE SE-92 User Manual
Page 62

54
SE-92 User Manual
return 0;
}
//---------------------------------------------------------------------------
void EnableWDT(int interval)
{
unsigned char bBuf;
Set_6106_LD(0x08);
Set_6106_Reg(0x30, 0x01);
//enable timer
Set_6106_Reg(0xF1, interval);
//set timer
}
//---------------------------------------------------------------------------
void DisableWDT(void)
{
unsigned char bBuf;
Set_6106_LD(0x08);
Set_6106_Reg(0x30, 0x00);
//enable timer
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//
// 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 "6106.H"
#include
//---------------------------------------------------------------------------
unsigned int 6106_BASE;
void Unlock_6106 (void);
void Lock_6106 (void);
//---------------------------------------------------------------------------
unsigned int Init_6106(void)
{
unsigned int result;
unsigned char ucDid;
6106_BASE = 0x4E;
result = 6106_BASE;
ucDid = Get_6106_Reg(0x20);
if (ucDid == 0x07)
//6106
{goto Init_Finish;}
6106_BASE = 0x2E;
result = 6106_BASE;
ucDid = Get_6106_Reg(0x20);
if (ucDid == 0x07) //6106
{ goto Init_Finish; }
6106_BASE = 0x00;
result = 6106_BASE;
Init_Finish:
return (result);