If you can not access the pin it is probably taken by one of the enabled peripherals. In this case problably UART
0CTS UART A
Change your Uart to 2 wire only in kernel config and the pin should become free as GPIO
Thanks for the info.
I did finally do better reading of the documentation and realized I needed to correctly edit the makedevs.d resources.
I am having trouble trying to find appropriate examples of how to handle a pin to be interrupt driven. How to define the callback function.
There are two ways to work with GPIO
-
using GPIO example app & sample gpio kernel module.
Example app shows how to use interrupts. -
using sysfs (recommended):
https://elinux.org/EBC_Exercise_11_gpio_Polling_and_Interrupts
With actual C example here:
https://developer.ridgerun.com/wiki/index.php?title=Gpio-int-test.c
Another good article here:
http://derekmolloy.ie/kernel-gpio-programming-buttons-and-leds/#Interrupts