intel-iot-devkit/mraa — pull request #76 by yoneken (2014-12-21 11:47:49+00:00)
Title: Add a function to get a pin number from mraa_gpio_context

I add a function named **mraa_gpio_get_pin** .
This function is useful to restore a physical pin number in callback function.

For example,

```
void interrupt_in(void *arg)
{
mraa_gpio_context dev = (mraa_gpio_context)arg;
printf("Pushed %d", mraa_gpio_get_pin(dev));
}

int main(int argc, char *argv[])
{
mraa_gpio_context in0 = mraa_gpio_init(14);
mraa_gpio_dir(in0, MRAA_GPIO_IN);
mraa_gpio_mode(in0, MRAA_GPIO_PULLUP);
mraa_gpio_isr(in, MRAA_GPIO_EDGE_FALLING, interrupt_in, (void *)in0);

mraa_gpio_context in1 = mraa_gpio_init(15);
mraa_gpio_dir(in1, MRAA_GPIO_IN);
mraa_gpio_mode(in1, MRAA_GPIO_PULLUP);
mraa_gpio_isr(in, MRAA_GPIO_EDGE_FALLING, interrupt_in, (void *)in1);

sleep(30);

return 0;
}
```

Signed-off-by: Kenta Yonekura