When a specific feature (like I2C) is enabled, certain pins are reserved for that feature's protocol (e.g., SCL, SDA). These reserved pins are no longer available as standard GPIOs.
If a feature reserves the first $N$ pins, the lowest accessible GPIO pin will be bit $N$. For example, if I2C reserves bits 0, 1, and 2, the first available GPIO is bit 3 (AD3). When interacting with the GPIO controller in this state, you must account for these reserved bits in your bitmasks.
# Example: Using I2C feature which reserves bits 0, 1, 2
i2c = I2cController()
i2c.configure('ftdi:///1', direction=0x78)
gpio = i2c.get_gpio()
# Read current state
pins = gpio.read()
# Mask out the I2C bits (0x07 = bits 0, 1, 2)
pins &= 0x07
# Set AD4 (bit 4)
pins |= 1 << 4
# Update GPIO output
gpio.write(pins)