Quantcast
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: how to use gpio interrupt at user space??

It depends on your version of Linux kernel. It sound like you are using 2.6.18. That version uses a gpio driver that was never part of the main kernel. I vaguely remember that it uses the devfs. I don't think it ever supported GPIO interrupts. Newer kernels starting around 2.6.3x? implemented a gpio driver using sysfs. With that driver, sysfs files such as direction and value to access the gpio. I think versions after 2.6.37 added interrupt support via a sysfs edge file. The user space program would use the Linux poll() mechanism to wait for an interrupt. See your kernel source at  Documentation/gpio.txt to see what your version of kernel supports. Search around for "/sys/class/gpio" to see examples of user space usage.


Viewing all articles
Browse latest Browse all 116964

Trending Articles