Not if I want to switch between a pull-up or pull-down output.
The pull-up/down circuit on the output must act either as default high or default low. Then, when you press the button "SW2" it should:
if default high => act as pull-down, switch the output to GND.
if default low => act as pull-up, switch the output to Vcc.
In order to make a single resistor-switch circuit act as pull-up and pull-down you need to swap Vcc and GND. I have made this schematic that shows what happens when SW1 is either high (on the left) or low (on the right).
Now, either I didn't understand you, or you didn't understand me... please let me know. Maybe provide an example schematics that would do the same without a transistor.
Sorry, I didn't see your post before.
No, obviously, not *at the same time*. that wouldn't be possible
What I meant is that I want to be able to choose if the button should act as pull-up or pull-down using the switch SW1.