How can I define a port extender MCP23s17 pin in Arduino My task is to use a port extender (MCP23s17) to drive a touch keypad for which I have to define names of pins so that I can call those names in arguments of a function.

I have searched for different methods to define "PORT EXTENDER" pin but could not find any satisfactory results. Kindly help me handle the situation.

i have used the following libraries downloaded from Arduino playground
1. CapacitiveSensor.h
2. MCP23S17.h
Now I have to use MCP23S17 Pin in the following function

#define key1 2
#define key2 4
CapacitiveSensor cs_4_2=Capacitivesensor(key2,key1);  //capacitive sensor is connected to pin 4 and 2


key1 and key2 are Arduino's pins. I want some method by which I can refer key1 and key2 to the port extender's (MSP23S17) pin. The above answers are surely helpful but they doesn't fulfill my requirement.

Thanks in Advance
Sorry for English.
If you use this arduino library:

#define LED_PIN 15

mcp.pinMode(LED_PIN, LOW); //set led pin on the MCP23S17 to an OUTPUT

mcp.digitalWrite(LED_PIN, LOW)