sh: Update gpio_set_value() pin value handling