readme.interrupts

来自「话带数据中传真解调程序」· INTERRUPTS 代码 · 共 55 行

INTERRUPTS
55
字号
Using hardware interrupts-------------------------How do I use hardware interrupts in ltmodem?  To do this you must install the usirq module and configure  ltmodem to use the IRQ device interface. You need to know the  IRQ number used by your card. Run ltmodem -t to find this out.  First edit the makefile Makefile.usirq to make sure the correct  IRQ number is specified, this is 9 by default.  Then make the device node and compile usirq by typing:   make -f Makefile.usirq dev   make -f Makefile.usirq  Next copy the usirq.o file to /lib/modules/2.2.X-X/misc/ (where  2.2.X-X is your kernel version), then install it by doing:   depmod -a   modprobe usirq  You can now test it by doing:   cat /dev/usirq9  in one terminal, causing the command to 'hang', then when you do:   ltmodem -t  in another terminal the cat command will then complete. If this  works then you have access to interrupts in userland! What happens  is that when an interrupt is generated by the hardware a character  (255) is sent to the device node /dev/usirq9.  In order to use these hard interrupts in ltmodem you must edit the  config.h file. The following extract shows the setting for hard  interrupts on IRQ 9.  // Set to try out hard interrupt code.  #define TRY_INTERRUPTS 1  // Device used to detect IRQ from user space.  #define IRQ_DEV "/dev/usirq9"   You can then compile ltmodem using:   make -f Makefile.RealInts   Be prepared for loads of warnings! Hopefully these will disappear  one day.Does it work properly?  Well, sort of! I am still working on it. Feel free to play around  and send me any useful patches at: richard@close.u-net.com. 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?