Switch with mosfets, controlled with a microcontroller or processor pin, with 0 then active output, 1 deactivate or open-drain mantains output with last state.
In circuit, switch emultates open-drain when openned, if closed switch commutator emulate high or low pin.