The switch on that board has an active low switch (meaning it shorts it to ground).
Moreover that node floats... so you need to use the resistive pull up in the I/O buffer to pull it high.
And... because it is active low... when you Read the pin... low means they are pressing the button.
Thank you for your reply. To clarify one thing, by saying that the switch on the board is an active low switch, are you saying that it is automatically suited for using a Resistive Pull up (I am basing my understanding off of this webpage)? That would make sense given the diagram on the back of the PCB.
In that case, why does my code also work properly when I configure it as a Resistive Pull Down?
Many thanks again,
My first update would be that it's now apparent to me why the value in my while loop comparison can be either a 0 or a 1 (because it's a while loop, it will break whenever the value changes--which is initiated by pressing the switch--, regardless of what that value is).
This just leaves the question of why Resistive Pull Down is successful with an Initial Drive state of 1, which to my understanding, is counter to the PSoC GPIO Pin documentation's suggested Initial Drive state of 0 for the pull down drive mode.
Yes the pictures on that website are correct.
Here is a screenshot of that section of the schematic... (notice that R145, R148 and R149 are NO LOAD ... meaning that they are not on the board)... so basically the switch is connected to P04 on one side... and shorted to ground through a 0 ohm resistor on the other.
As to the initial drive state... as the pin is an INPUT the initial drive state doesnt do anything.. that value is only when the GPIO is configured as an output (or an input/output)