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/AM3358:Linux 用户空间应用中的 GPIO 中断?

Guru**** 2038710 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/822176/linux-am3358-gpio-interrupt-in-linux-user-space-application

器件型号:AM3358

工具/软件: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 程序链接  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Manoj、

    请参阅以下 e2e 帖子:

    此致、
    帕维尔