Thanks..still got some doubts. Let me explain what I want to do.
I have a digital optical obstacle avoidance sensor ( HIGH in the normal state). Whenever there is an obstacle in front of the sensor it will give me a LOW state ( there will be a falling edge in the signal). I want to configure the AUX pin 5 (GPIO_GPIO4_INPUT) as input pin and whenever there is change in the state ( HIGH to LOW falling edge ) I want ISR to run a piece of code.
Couple of things I understood referring the forums !
set FMU_MODE pwm4
set AUX_MODE pwm4
this two lines in the rcs will configure first 4 Aux Pins as PWM output and rest two as GPIO's.
px4_arch_configgpio(GPIO_GPIO4_INPUT) :- does it configure the Aux 5 pin as Input ?
px4_arch_gpioread(GPIO_GPIO4_INPUT) : this will read the current state of the pin right ?
Does the above two lines will do the trick ?
or should I use