Hello. I am trying to set up some code for an interrupt on the NRF52840 DK. I am using the pin_change_int example code as a starting point. In the example code, one GPIO is used as interrupt input, and another GPIO is set as output and is toggled in the interrupt handler function.
I want to use the same GPIO as input and output. That is, I first want to configure the GPIO to detect an event (i.e set as input), and then after entering the interrupt routine I was to set the same GPIO as output in order to perform actions. Is this possible? How do I do this? I am very new to NRF programming.