Hi,
Not specifically a question for the A13, but as there is no forum dedicated to generic linux coding, I'll ask it here.
How do I write a userland application that reacts to a hardware interrupt on one of the IO pins. I want to interface with a chip (NRF24L01) that uses SPI to control it, but returns a hardward interrupt on an events (like "packet received").
Any info on how to code this? (in preference in C).
Cheerio! Kr. Bonne.
This could be help: https://developer.ridgerun.com/wiki/index.php/How_to_use_GPIO_signals (https://developer.ridgerun.com/wiki/index.php/How_to_use_GPIO_signals)
I'm writing an article about GPIO usage, will soon be ready. ;)
If a GPIO has the edge file in its directory, it can generate hardware interrupt. The C code example is at https://developer.ridgerun.com/wiki/index.php/Gpio-int-test.c (https://developer.ridgerun.com/wiki/index.php/Gpio-int-test.c), the main key is to use poll() to wait on value file.
Hi MBR, vinifr,
I'm sorry for the late reply. (been busy couple of days).
OK, this is funny.
It looks like I had already tried out the application you mention. But, when doing copy-and-paste, I had put the "fopen" insite the while loop, so the application didn't work. I made the wrong conclussions because of that. How stupid! :-(
OK. It now works. Thanks!
Now I only need to find out how to access the spi bus on the A13 and I can get started.
Cheerio! Kr. Bonne?