Hello,
Am using iMXRT1064 device and a 4 wire touch screen signals X+, X- , Y+ and Y- are interfaced to the micro controller.
The requirement is we should be able X+ and Y+ as gpio as well as ADC input
for example to use X+ as GPIO as well as ADC signal using MCU Xpresso as IDE config tools am configuring GPIO_AD_B0_14 pin for X+ signal as below

I have selected both functions ADC1_IN3 and GPIO1_IO14 as i have to used the pin as gpio as well as ADC pin.
is this configuration correct?
if yes then while setting the pin as output am using
gpio_pin_config_t config= {
.direction = kGPIO_DigitalOutput,
.outputLogic = 0U,
.interruptMode = kGPIO_NoIntmode
};
GPIO_PinInit(BOARD_INITPINS_TOUCH_XL_DIO_GPIO,BOARD_INITPINS_TOUCH_XL_DIO_PIN,&config)
GPIO_PinWrite(BOARD_INITPINS_TOUCH_XL_DIO_GPIO, BOARD_INITPINS_TOUCH_XL_DIO_PIN, 1)
and while using the pin as ADC input i have to set the pin as input and then read the ADC peripheral ADC1 and channel 3
config.direction = kGPIO_DigitalInput
GPIO_PinInit(BOARD_INITPINS_TOUCH_XL_DIO_GPIO,BOARD_INITPINS_TOUCH_XL_DIO_PIN,&config)
config the ADC structures to use ADC1 and channel 3 and trigger a ADC conversion
is my understanding correct?
Please let me know the correct method to use the pin as GPIO as well as ADC input.
Thanks,
Regards
Anuj