?? readme.interrupts
字號:
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.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -