User's Manual

Setting GPIO Port Drive Configuration
When configured for output GPIO ports that are connected to PCAL9555A/PCAL9535A can be
configured to one of the following drive modes:
Resistive high, strong low (drive = pullup)
o This is the default, but it not suitable for driving devices that source significant current,
for example for driving an LED connected between GPIO port and GND (it will work
though if the LED is connected between GPIO and 5V or 3.3V rails)
Resistive low, strong high (drive = pulldown)
Strong low and high (drive = strong)
o This mode is appropriate for most applications.
High Z state (drive = hiz)
(PCAL9555A/PCAL9535A also supports open drain and open source drive modes, but it is not
currently exposed through SysFS)
The drive mode is set by writing the mode string ("pullup", "pulldown", "strong", or "hiz") to
/sys/class/gpio/gpioXX/drive.
root@WRIDPB072:~#echo‐n"strong">/sys/class/gpio/gpio27/drive
Reading and Writing GPIO Port
When GPIO port is configured for input the input value (0 or 1) can be read from
/sys/class/gpio/gpioXX/value file.
root@WRIDPB072:~#cat/sys/class/gpio/gpio27/value
0
When GPIO port is configured for output the output value can be written to the same file:
root@WRIDPB072:~#echo‐n"1">/sys/class/gpio/gpio27/value
root@WRIDPB072:~#echo‐n"0">/sys/class/gpio/gpio27/value
11 GWS-RFID RFID Reader