Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Linux/AM3358: GPIO interrupt in linux user space application?

$
0
0

Part Number: AM3358

Tool/software: Linux

through kernel module able to detect the gpio interrupt 

....

static irq_handler_t gpio_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)

{

numberPresses++; // Global counter, will be outputted when the module is unloaded
return (irq_handler_t) IRQ_HANDLED; // Announce that the IRQ has been handled correctl

}


/// This next calls are mandatory -- they identify the initialization function
/// and the cleanup function (as above).
module_init(bgpio_init);
module_exit(bgpio_exit);

please provide me the sample code of gpio interrupt in user space .how to link kernel model interrupt with userspace program 


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>