IBASE IB908 User Manual

Page 75

Advertising
background image

APPENDIX

IB908F User’s Manual

71



return 0;

}
//---------------------------------------------------------------------------
void EnableWDT(int interval)
{

unsigned char bBuf;


Set_6106_LD(0x08);

//switch to logic device 8

Set_6106_Reg(0x30, 0x01);

//enable timer


Set_6106_Reg(0xF1, interval);

//set timer


}
//---------------------------------------------------------------------------
void DisableWDT(void)
{

unsigned char bBuf;


Set_6106_LD(0x08);

//switch to logic device 7

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 <dos.h>
//---------------------------------------------------------------------------
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);

Advertising