GPIO_IN
*val = gpio_read(sc, GPIO_IN, &sc->gpio_pins[pin]);
gpio_read(sc, GPIO_IN, &sc->gpio_pins[pin]) ^ 1);