?? lpt_rt_irq.c
字號:
/* * Interrupt handling in Real-Time. react to an RT-interrupt by toggling all * bits on the parallel port * * Sotlen from Michael Barabanov by Der Herr Hofrat, * (C) FSMLabs 2001. der.herr@hofr.at * Released under the GNU GENERAL PUBLIC LICENSE Version 2, June 1991 * Any use of this code must include this notice. */#include <rtl_core.h>#include <rtl_time.h>#include <asm/io.h>#include <rtl.h>#include "common.h"unsigned int intr_handler(unsigned int irq, struct pt_regs *regs){ outb(0x0ff,LPT); /* respond to an interrupt by toggling the databits*/ return 0;}int init_module(void){ rtl_request_irq (LPT_IRQ, intr_handler); rtl_hard_enable_irq (LPT_IRQ); return 0;} void cleanup_module(void){ rtl_free_irq(LPT_IRQ);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -