This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:Linux
能够检测 GPIO 中断的内核模块
…
静态 IRQ_handler t GPIO_IRQ_handler (unsigned int IRQ、void *dev_id、struct pt_regs * regs)
{
numberPresses++;//全局计数器将在模块卸载时输出
return (IRQ_handler_t) IRQ_handled;//声明 IRQ 已正确处理
}
///下一个调用是必需的--它们标识初始化函数
///和清理功能(如上所示)。
MODULE_INIT (bgpio_init);
MODULE_EXIT (bgpio_exit);
请提供用户空间中 GPIO 中断的示例代码。如何将内核模型中断与 userspace 程序链接