![FUSHENGTEK Technology WG-7302-E38/J19 User Manual Download Page 57](http://html.mh-extra.com/html/fushengtek-technology/wg-7302-e38-j19/wg-7302-e38-j19_user-manual_2350760057.webp)
WG-7302
Page
57
Document Details
WG-7302 User’s Guide
Appendix B:GPIO Sample Code
The WG-7302 provideseightGeneral Purpose I/O Ports. Each of them that can be individually programmed as input
or output.The GPIO register be accessed though IO access mode.
GPIO Group Select Register
BaseAddress: 0x298
Offset: 0x00
Attribute: R/W
Size: 8 bits
Default: 0x00
GPIO Mode Register
BaseAddress: 0x298
Offset: 0x01
Attribute: R/W
Size: 8 bits
Default: 0xFF
GPIO Data Register
BaseAddress: 0x298
Offset: 0x02
Attribute: R/W, RO
Size: 8 bits
Default: N/A
BIT
Description
7-0
0x04: Select GPIO Group 4(GPIO0~GPIO7).
Other: Reserve.
BIT
Description
7 ~ 0
0: The GPIO(n) Port is programmed as output.
1: The GPIO(n) Port is programmed as input .
BIT
Description
7 ~ 0
If GPIO(n) Port is programmed to be an output, then the
corresponding bit write register value will drive a high or low
value on the output pin.
If GPIO(n) Port is programmed to be an input, then the
corresponding bit can be read only.