Ibase technology inc – IBASE SE-92 User Manual

Page 63

Advertising
background image

Copyright © 2013 IBASE Technology Inc. All Rights Reserved.

55

IBASE Technology Inc.

}

//---------------------------------------------------------------------------

void Unlock_6106 (void)

{

outportb(6106_INDEX_PORT, 6106_UNLOCK);

outportb(6106_INDEX_PORT, 6106_UNLOCK);

}

//---------------------------------------------------------------------------

void Lock_6106 (void)

{

outportb(6106_INDEX_PORT, 6106_LOCK);

}

//---------------------------------------------------------------------------

void Set_6106_LD( unsigned char LD)

{

Unlock_6106();

outportb(6106_INDEX_PORT, 6106_REG_LD);

outportb(6106_DATA_PORT, LD);

Lock_6106();

}

//---------------------------------------------------------------------------

void Set_6106_Reg( unsigned char REG, unsigned char DATA)

{

Unlock_6106();

outportb(6106_INDEX_PORT, REG);

outportb(6106_DATA_PORT, DATA);

Lock_6106();

}

//---------------------------------------------------------------------------

unsigned char Get_6106_Reg(unsigned char REG)

{

unsigned char Result;

Unlock_6106();

outportb(6106_INDEX_PORT, REG);

Result = inportb(6106_DATA_PORT);

Lock_6106();

return Result;

}

//----------------------------------------------------------------------------------

Advertising