Advantech ITA-3630 Series User Manual page 67

Intel gen2/gen3 coretm i7/i5/i3 fanless dual core compact industrial computer with wide voltage input
Table of Contents

Advertisement

returnresult;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
BYTE
check_data(WORD addr)
{
int
i;
BYTE data;
for(i = 0; i <= 6; i++)
{
data = inportb(addr);
if (data != 0)
break;
}
returndata;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
void
newiodelay()
//Shorter delay
{
outportb(0xeb, 0);//IO port 0xeb No real device occupies. Write a value to
this port can realize delay function. You can also choose other method according to
the real situation.
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
void
moredelay()
//Longer delay
{
int
i;
for (i = 0; i < 20; i++)
{
outportb(0xeb, 0);//IO port 0xeb No real device occupies. Write a
value to this port can realize delay function. You can also choose other method
according to the real situation.
}
}
************************************************************************
GPIO Simcodes
(Here GPIO 00 and GPIO 07 in Chapter 2 are taken as examples)
Output High to GPIO 00:
data = smbus_read_byte(0x40, 0x03);// Read slave 0x40 register 3 byte
57
ITA-3630 User Manual

Advertisement

Table of Contents
loading

Table of Contents