Synopsis
#define MCP23016_I2C_ADDR(X)  ((X)*2 + 0x40)
Description

MCP23016_I2C_ADDR returns the 8-bit I2C address for the MC23016 for the address configuration signals AD0, AD1, and AD2 presented in X. AD0 is the least significant bit and AD2 is the most significant bit, hence 0x6 represents AD2=1, AD1=1, AD0=0.

The address is calculated as 0x40 + (X << 1).