Currently the ADC inputs (pins 2,4,6,8 of SODIMM connector) can’t be used as GPIOs on all our modules (on some modules they are connected to dedicated pins on external chips and can’t be used for any other pourpose. So if you may use a different pin that could increase the compatibility of your design with other modules.
If you can’t change your HW you have two solutions:
create a polling thread that samples the ADC value (can’t be done via threshold, you need to poll)
Map the registers of IOMUX and GPIO controllers in your app using mapmemlib and use them to configure the pins as GPIO, bypassing the GPIO library.