FabGL
ESP32 Display Controller and Graphics Library

◆ configureGPIO()

void configureGPIO ( int  gpio,
MCPDir  dir,
bool  pullup = false,
uint8_t  hwAddr = 0 
)

Configure a pin direction and pullup.

Parameters
gpioPin to set direction (MCP_A0...MCP_A7 and MCP_B0...MCP_B7)
dirDirection (MCPDir::Input or MCPDir::Output)
pullupIf True pull-up resistor is enabled
hwAddrOptional hardware device address

Example:

io.configureGPIO(MCP_B0, MCPDir::Output);        // B0 is an output
io.configureGPIO(MCP_A1, MCPDir::Input, true);   // A1 is an input with pullup

Definition at line 240 of file MCP23S17.cpp.