Datasheet
STMPE811 GPIO controller
Doc ID 14489 Rev 6 51/65
13 GPIO controller
A total of 8 GPIOs are available in the STMPE811 port expander device. Most of the GPIOs
share physical pins with some alternate functions. The GPIO controller contains the
registers that allow the host system to configure each of the pins into either a GPIO, or one
of the alternate functions. Unused GPIOs should be configured as outputs to minimize
power consumption.
A group of registers are used to control the exact function of each of the 8 GPIOs. The
registers and their respective addresses are listed in the following table.
All GPIO registers are named as GPIO-x, where x represents the functional group.
GPIO_SET_PIN GPIO set pin register
Address: 0x10
Type: R/W
Reset: 0x00
Description: GPIO set pin register.
Writing 1 to this bit causes the corresponding GPIO to go to 1 state.
Writing 0 has no effect.
Table 18. GPIO control registers
Address Register name
Size
(bit)
Function
0x10 GPIO_SET_PIN 8 Set pin register
0x11 GPIO_CLR_PIN 8 Clear pin state
0x12 GPIO_MP_STA 8 Monitor pin state
0x13 GPIO_DIR 8 Set pin direction
0x14 GPIO_ED 8 Edge detect status
0x15 GPIO_RE 8
Rising edge detection
enable
0x16 GPIO_FE 8
Falling edge detection
enable
0x17 GPIO_ALT_FUNCT 8 Alternate function register
76543 2 1 0
GPIO-7 GPIO-6 GPIO-5 GPIO-4 GPIO-3 GPIO-2 GPIO-1 GPIO-0