NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
177
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission
from Winbond.
Table No.: 2005-W90P710-11-A
GPIO_DIR3
0XFFF8.3034
R/W
GPIO port3 direction control register
0x0000.0000
GPIO_DATAOUT3
0xFFF8.3038
R/W
GPIO port3 data output register
0x0000.0000
GPIO_DATAIN3
0xFFF8.303C
R
GPIO port3 data input register
0xXXXX.XXXX
GPIO_CFG4
0xFFF8.3040
R/W
GPIO port4 configuration register
0x0015.5555
GPIO_DIR4
0XFFF8.3044
R/W
GPIO port4 direction control register
0x0000.0000
GPIO_DATAOUT4
0xFFF8.3048
R/W
GPIO port4 data output register
0x0000.0000
GPIO_DATAIN4
0xFFF8.304C
R
GPIO port4 data input register
0xXXXX.XXXX
GPIO_CFG5
0xFFF8.3050
R/W
GPIO port5 configuration register
0x0000.0000
GPIO_DIR5
0XFFF8.3054
R/W
GPIO port5 direction control register
0x0000.0000
GPIO_DATAOUT5
0xFFF8.3058
R/W
GPIO port5 data output register
0x0000.0000
GPIO_DATAIN5
0xFFF8.305C
R
GPIO port5 data input register
0xXXXX.XXXX
GPIO_CFG6
0xFFF8.3060
R/W
GPIO port6 configuration register
0x0000.0000
GPIO_DIR6
0XFFF8.3064
R/W
GPIO port6 direction control register
0x0000.0000
GPIO_DATAOUT6
0xFFF8.3068
R/W
GPIO port6 data output register
0x0000.0000
GPIO_DATAIN6
0xFFF8.306C
R
GPIO port6 data input register
0xXXXX.XXXX
GPIO_DBNCECON
0xFFF8.3070
R/W
GPIO input debounce control register
0x0000.0000
GPIO_XICFG
0xFFF8.3074
R/W
Extend Interrupt Configure Regitser
0xXXXX.XXX0
GPIO_XISTATUS
0xFFF8.3078
R/W
Extend Interrupt Status Register
0xXXXX.XXX0
14.3 Functional Description
14.3.1 Multiple
Functin
Setting
The GPIO input/output and multiple function are configured by setting the GPIO_CFGn register.
The GPIO_CFGn register setting sequence is described as follows.
1. Read
GPIO_CFGn
to a variable.
2. Clean the corresponding field,
PTxCFGy
(two bit) of the GPIO pin in the variable.
3. Set
the
corresponding
field,
PTxCFGy
of the GPIO pin in the variable.
4. Write the variable to
GPIO_CFGn
Note: the x:port number, and y:pin number, for example PT0CFG1 as the pin 1 in port 0.
Programmer should not change the value of whole register except the corresponding field of the
register. A Sample code configure GPIO PORT0 pin1 as PWM output is given below:
int GPIO_CFG=0;
GPIO_CFG=inpw(0xFFF83000);// Get GPIO_CFG0 value
GPIO_CFG=GPIO_CFG&0xFF3;// Clean PT0CFG1
GPIO_CFG=GPIO_CFG|(0x2<<2); // Set PT0CFG1 as PWM0
outpw(xFFF83000,GPIO_CFG);// Write value to GPIO_CFG0