Linux Device Driver for counting keyboard strokes

For each key pressed on the keyboard, it generates two interrupts (pressed and release).

Code:



Output:



Notes:

1. IRQ line 1 is assigned for keyboard, we register our handler to be called on keyboard interrupt by calling request_irq
2. IRQF_SHARED flag is used for sharing the keyboard interrupt
3. synchronize_irq waits for the specific handler to exit.


Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto