Gpio interface, Dos example, 7gpio interface – Kontron KTA55-pITX User Manual
Page 18: 1 dos example, Kta55/pitx software guide

KTD-S0043-A
Page 15
GPIO Interface
KTA55/pITX Software Guide
7
GPIO Interface
The GPIO part is a component of the AMD
®
Hudson-E1 Controller Hub. Each GPIO pin has its own control
register (memory-mapped, memory base address 0xFED80100). For customer usage only GPIO0 to GPIO7
are available - access to other GPIO pins is forbidden and can damage the board. Under a 16 bit environ-
ment register access is possible but very complex except you use the free Open Watcom C/C++ compiler
(example compiled with version 1.9).
The following picture shows the register structure (8 bit wide):
Open Watcom C/C++ compiler settings:
Target Environment:
DOS - 32-bit
Image Type:
PMODE/W Executable [.exe]
7.1
DOS Example
#include
#include
#define u8
unsigned char
#define GPIO_BASE_ADDR
0xFED80100
#define MAX_GPIO
8
#define PU_SHIFT
3
#define PD_SHIFT
4
#define DIR_SHIFT
5
#define OUT_SHIFT
6
#define IN_SHIFT
7