55
ITA-1611 User Manual
Chapter 6
G
PIO Programming
Guide
(Take GPIO 00 and GPIO 07 in Chapter 2 for example)
GPIO 00 output High:
data = smbus_read_byte(0x40, 0x03);
//Read slave 0x40 register 3 byte
data &= 0xfe;
//Set bit 0 to 0
smbus_write_byte(0x40, 0x03, data)
//Write back, GPIO 00 is set to Output
data = smbus_read_byte(0x40, 0x01)
//Read slave 0x40 register 1
data |= 0x01;
//Set bit 0 to 1, which means High
smbus_write_byte(0x40, 0x01, data)
//Write back, output High value
Read Input value from GPIO 07:
data = smbus_read_byte(0x40, 0x03);
//Read slave 0x40 register 3 byte
data |= 0x80;
//Set bit 7 to 1
smbus_write_byte(0x40, 0x03, data)
//Write back,GPIO 07 is set to Input
data = smbus_read_byte(0x40, 0x00)
//Read slave 0x40 register 0.
Response value of bit 7 can determine whether Input is Low or High
Summary of Contents for ITA-1611 Series
Page 1: ...User Manual ITA 1611 Series Fanless Embedded Celeron Dual Core Compact Industrial Computer...
Page 11: ...Chapter 1 1 Overview This chapter provides general Information about the ITA 1611...
Page 15: ...Chapter 2 2 H W Installation This chapter provides H W Instal lation about the ITA 1611...
Page 27: ...Chapter 3 3 System Setup This chapter introduces the instal lation process of ITA 1611...
Page 33: ...Chapter 4 4 AMI BIOS This chapter introduces how to configure AMI BIOS...
Page 52: ...ITA 1611 User Manual 42...
Page 53: ...Chapter 5 5 Driver Installation This chapter describes how to Install drivers...
Page 57: ...Chapter 6 6 GPIO Programming Guide This chapter introduces GPIO pro gramming guide...
Page 66: ...ITA 1611 User Manual 56...