Looking at the code, it actually disconnects the input when in output mode - this is what Nordic does in all their code so it's what was copied, and I believe it is done to save power.
GPIOs in mictocontrollers are typically two separate circuits - one for output, one for input - so just because you set the output to one value, you're not guaranteed to get that same value when reading back.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I guess it happens on all pins, not just D30?
Looking at the code, it actually disconnects the input when in output mode - this is what Nordic does in all their code so it's what was copied, and I believe it is done to save power.
GPIOs in mictocontrollers are typically two separate circuits - one for output, one for input - so just because you set the output to one value, you're not guaranteed to get that same value when reading back.