My device tree overlay GPIO section looks like this:
Note that I repurposing a GPIO that was used for an LED in the board's device tree file. Also note that node numbers start from 1 and property numbers start from 0, so the delete-node and delete-property are both deleting the items for GPIO 19.
My runtime code looks like this:
The gpio_pin_set_dt call is working perfectly - I can see the GPIO pin go high or low as expected.
But the gpio_pin_get_dt call always returns false, regardless of the state of the GPIO output.
I suspect this problem is because I'm configuring the GPIO as an output and then trying to read its state. In other words, I'd like to access the output register of the GPIO instead of creating a different variable to hold the last state I set. Is this possible?