如何将驱动程序代码中的函数注册为其 ISR

发布于 2024-08-30 04:34:53 字数 414 浏览 3 评论 0原文

根据我从我之前关于 Linux 内核开发的问题得到的反馈,

我通过将驱动程序与现有驱动程序进行比较并大量“借用”其代码,编写了一个驱动程序(在 Linux 内核 v2.6.32 中)。司机注册良好。 init() 和probe() 工作正常。我还能够访问外围设备寄存器。 :-)

但是我对 IRQ/ISR 有点模糊。外围设备是一个输入设备,并在 GPIO 引脚上引发中断。

我如何从当前状态继续处理 IRQ 并执行 ISR 函数?

Following the feedback i got from my previous question on Linux Kernel development,

I have written a driver (in Linux-kernel v2.6.32) by comparing it with an existing driver and "borrowing" heavily from its code. The driver is registered fine. The init() and probe() are working fine. I am also able to access the peripheral device registers. :-)

However i am a bit hazy about the IRQ/ISR. The peripheral-device is a input device and raises an interrupt on a GPIO pin.

How do i move ahead from the current state to handle the IRQ and execute my ISR function ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

追星践月 2024-09-06 04:34:53

您看过Linux设备驱动程序一书吗?它有一整章关于中断处理的内容。它应该提供您需要的背景信息。

Did you look at the Linux Device Drivers book? It has a whole chapter on interrupt handling. It should provide the background information you need.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文