Copyright © 2015 NEXCOM International Co., Ltd. All Rights Reserved.
70
NISE 3720E Series User Manual
Appendix B: GPI/O Programming Guide
Control the GPO pin (4/6/8/10) level from I/O port A07h bit (4/5/6/7).
Control the GPO pin (A4) level from I/O port A01h bit (3).
Control the GPO pin (A3/A2) level from I/O port A02h bit (6/7).
The bit is Set/Clear indicated output High/Low.
GPIO programming sample code
#define GPIO_PORT
0xA00
#define GPO4_HI
outportb(GP7, 0x10)
#define GPO4_LO
outportb(GP7, 0x00)
#define GPO6_HI
outportb(GP7, 0x20)
#define GPO6_LO
outportb(GP7, 0x00)
#define GPO8_HI
outportb(GP7, 0x40)
#define GPO8_LO
outportb(GP7, 0x00)
#define GPO10_HI
outportb(GP7, 0x80)
#define GPO10_LO
outportb(GP7, 0x00)
#define GPOA4_HI
outportb(GP1, 0x08)
#define GPOA4_LO
outportb(GP1, 0x00)
#define GPOA3_HI
outportb(GP2, 0x40)
#define GPOA3_LO
outportb(GP2, 0x00)
#define GPOA2_HI
outportb(GP2, 0x80)
#define GPOA2_LO
outportb(GP2, 0x00)
void main(void)
{
GPO4_HI;
GPO6_LO;
GPO8_HI;
GPO10_LO;
GPOA4_HI;
GPOA3_LO;
GPOA2_HI;
}