beautypg.com

NEXCOM IPPC 1560T User Manual

Page 134

background image

Copyright © 2014 NEXCOM International Co., Ltd. All Rights Reserved.

117

IPPC 1560T/1960T/2160P Series User Manual

Appendix A: GPI/O Programming Guide

GPIO programming sample code

#define GPIO_PORT

0x538

#define GPO0

(0x01 << 3)

#define GPO1

(0x01 << 6)

#define GPO2

(0x01 << 7)

#define GPO0_HI

outportb(GPIO_PORT, 0x08)

#define GPO0_LO

outportb(GPIO_PORT, 0x00)

#define GPO1_HI

outportb(GPIO_PORT, 0x40)

#define GPO1_LO

outportb(GPIO_PORT, 0x00)

#define GPO2_HI

outportb(GPIO_PORT, 0x80)

#define GPO2_LO

outportb(GPIO_PORT, 0x00)

void main(void)
{
GPO0_HI;
GPO1_LO;
GPO2_HI;
}

This manual is related to the following products: