NEXCOM APPC 1230T User Manual
Page 125
Copyright © 2012 NEXCOM International Co., Ltd. All Rights Reserved.
109
APPC 1230T/1231T/1235T/1530T/1531T/1730T/1731T/1930T/1931T User Manual
Appendix B: Digital I/O Programming Guide
GPIO programming sample code
#define DIO_PORT
0xA05
#define DIO_PORTI
0xA01
#define DO9
(0x01 <<4)
#define DO10
(0x01 <<5)
#define DO11
(0x01 <<6)
#define DO12
(0x01 <<7)
#define DO9_HI
outportb(GPIO_PORT, 0x10)
#define DO9_LO
outportb(GPIO_PORT, 0x00)
#define DO10_HI
outportb(GPIO_PORT, 0x20)
#define DO10_LO
outportb(GPIO_PORT, 0x00)
#define DO11_HI
outportb(GPIO_PORT, 0x40)
#define DO11_LO
outportb(GPIO_PORT, 0x00)
#define DO12_HI
outportb(GPIO_PORTI, 0x80)
#define DO12_LO
outportb(GPIO_PORTI, 0x00)
void main(void)
{
DO9_HI;
DO10_LO;
DO11_HI;
DO12_LO;
}
This manual is related to the following products: