It seems that nrf52 gpio input registers can't be read if gpio is set as output. Anyway, for a LED, which does have the exact logic level you previously imposed to it ( which may not be the case if output is open drain and used for communication such as I2C) , you should be able to get the current status of the LED by using the peek() method on the OUTPUT register, because digitalRead() won't work as it may poll INPUT register only.
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.
It seems that nrf52 gpio input registers can't be read if gpio is set as output. Anyway, for a LED, which does have the exact logic level you previously imposed to it ( which may not be the case if output is open drain and used for communication such as I2C) , you should be able to get the current status of the LED by using the
peek()
method on the OUTPUT register, because digitalRead() won't work as it may poll INPUT register only.