Hi again,
it's me
The compiled firmware is running now with your interrupt modifications. I also studied the gpio-test example of you. I'm trying to pair the SPI example with the interrupt modifications to ensure, that the MCP2515 is only called by Carambola after the MCP2515 indicates a new CAN message via RX0BUF.
The problem is, that I don't really know how to pair the ISR of the interrupt with a function of mine.
The best way would be to compile a kernel module to exchange data via spi, startet by an occuring interrupt. I tried to insert the code of my userspace module in your example, but I'm always getting errors saying he didn't find the headers.
My idea waas to run a bash script on startup which
1) Initializes the MCP2515 to be in Listening Mode
2) Inserts the GPIO-to-IRQ module to map a gpio pin to the interrupt handler
Is it possible to include the realted sourcecode to the kernel module? In this book they say it's not a good idea to pair userspace programs with kernel modules. Can s.o. give me an advice to a better way?
Thanks!