handle gpio setting