[問題] 中斷服務程式
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Linux
kernel version 2.6
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
NO
問題(Question):
如何啟動 interrupt
餵入的資料(Input):
static irqreturn_t interrupt_fn(int irq, void* dev_id)
{
printk("Hello\n");
}
QQ = request_irq(unsigned int irq, interrupt_fn, IRQF_SHARD, \
"Apple", interrupt_fn);
irq = 0b (mouse interrupt 的位置)
QQ = 0
預期的正確結果(Expected Output):
當觸發中斷時
可以在 kernel下使用 dmesg 看到 Hello
錯誤結果(Wrong Output):
當中斷產生
使用dmesg 看不到 Hello
程式碼(Code):(請善用置底文網頁, 記得排版)
如上
補充說明(Supplement):
希望有強者能幫忙
感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.235.192.164
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1422887419.A.C47.html
推
02/04 22:22, , 1F
02/04 22:22, 1F
→
02/06 00:38, , 2F
02/06 00:38, 2F
→
02/06 00:38, , 3F
02/06 00:38, 3F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章