Detached set_pin_mode functionality