![background image](http://html1.mh-extra.com/html/ibase-technology/ib831/ib831_user-manual_604972025.webp)
INSTALLATION
IB831 User’s Manual
21
void Dio2Initial(void)
{
unsigned char ucBuf;
//switch GPIO multi-function pin
Set_W627DHG_LD(0x09);
//switch to logic device 9
//enable the GP2 group
ucBuf = Get_W627DHG_Reg(0x30);
ucBuf |= 0x01;
Set_W627DHG_Reg(0x30, ucBuf);
//input detect type
Set_W627DHG_Reg(0xE5, 0x00);
//no inversion
}
//---------------------------------------------------------------------------
void Dio2SetOutput(unsigned char NewData)
{
//NewData : 1 for input, 0 for output
Set_W627DHG_LD(0x09);
//switch to logic device 9
Set_W627DHG_Reg(0xE4, NewData);
}
//---------------------------------------------------------------------------
unsigned char Dio2GetInput(void)
{
unsigned char result;
Set_W627DHG_LD(0x09);
//switch to logic device 9
result = Get_W627DHG_Reg(0xE4);
return (result);
}
//---------------------------------------------------------------------------
void Dio2SetDirection(unsigned char NewData)
{
//NewData : 1 for input, 0 for output
Set_W627DHG_LD(0x09);
//switch to logic device 9
Set_W627DHG_Reg(0xE3, NewData);
}
//---------------------------------------------------------------------------
unsigned char Dio2GetDirection(void)
{
unsigned char result;
Set_W627DHG_LD(0x09);
//switch to logic device 9
result = Get_W627DHG_Reg(0xE3);
return (result);
}
//---------------------------------------------------------------------------
void Dio3Initial(void)
{
unsigned char ucBuf;
//switch GPIO multi-function pin
ucBuf = Get_W627DHG_Reg(0x2C);
ucBuf &= 0x1F;
Set_W627DHG_Reg(0x2C, ucBuf);
//clear
Set_W627DHG_LD(0x09);
//switch to logic device 9
//enable the GP3 group
ucBuf = Get_W627DHG_Reg(0x30);
ucBuf |= 0x02;
Set_W627DHG_Reg(0x30, ucBuf);
//input detect type
Set_W627DHG_Reg(0xFE, 0xFF);
}
//---------------------------------------------------------------------------
void Dio3SetOutput(unsigned char NewData)
{
Summary of Contents for IB831
Page 1: ...IB831 VIA VX900 5 25 inch Disk Size SBC USER S MANUAL Version 1 0...
Page 4: ...iv IB831 User s Manual This page is intentionally left blank...
Page 8: ...INTRODUCTION 4 IB831 User s Manual Board Dimensions 203 W x 146 D mm...
Page 54: ...DRIVERS INSTALLATION 50 IB831 User s Manual This page is intentionally left blank...