Sample Header Ad - 728x90

Writing a kernel driver - knowledge of specific interrupt pins

3 votes
1 answer
233 views
I don't have knowledge about writing Linux kernel modules / drivers. Let's take a basic example. I have an input device of my own which is connected to a microcontroller on one of the interrupt pins. I know that when I press a button on my device it causes a hardware interrupt to occur in the microntroller. As a bare metal developer, I would put my interrupt handler code at an address where the interrupt vector for that particular interrupt would jump to when it occurs. Now if we have a Linux Kernel running on the microcontroller and I wish to write a Kernel driver for my input device, how would I know exactly where to register my interrupt handlers via the Kernel? Would I still need to know everything about the hardware, addresses etc. ? How do I know which interrupt line in the kernel is associated with the exact pin which I connect my input device to?
Asked by Engineer999 (1233 rep)
Jun 3, 2022, 11:35 AM
Last activity: Jun 3, 2022, 04:13 PM