????1.?ж?
????#?ж?????????????????????????????????????????
????#?ж????????????????????????
????#????豸???ж??????????ж?????????????????????IRQ???ж?????
????2.?ж???????
????#????ж???????????????????????ж?????????ж?????????
????#??Linux?У??ж??????????C????
????3.??????°??????
????#?ж???????????????????°?
????#??????ж????????????????ж??????????
????#?°????????????????
????4.???ж???????
????#?ж?????????????????????????????????豸????ж????????????????????ж???????
????#???????????request_irq()??????????ж???????????????????ж???
????requset_irq(unsigned int irq?? irq_handler_t handler?? unsigned long flags?? const char *name?? void *dev)
????1).?ж?????????
????#????????irq??????????ж??
????#????????handler?????????????????ж??????ж???????
????#?????????flags????0?????????
????-IRQF_DISABLED???????????ú???ζ??????ж????????????????ж?????????ж?
????-IRQF_SAMPLE_RANDOM??????????????豸???????ж?????????й??????????????????????????????????????
????-IRQF_TIMER??????????????????????ж?????????
????-IRQF_SHARED??????????????????ж?????????乲???ж???
????#????????name?????ж??????豸??ASCII??????
????#????????dev????????ж???
????#request_irq()??????л???0?????踐???0?????д???
????#request_irq()????????????????????????ж??????????????????????????е???ú???
????2).????ж???????
????request_irq():
????if(request_irq(irqn?? my_interrupt?? IRQF_SHARED?? "my device"?? my_dev)){
????printk(KEEN_ERR?? "my_device: cannot register IRQ %d "?? irqn);
????return -EIO;
????}
????3).????ж???????
????#ж?????????????????????????ж?????????????ж?????????
????void free_irq(unsigned int irq?? void *dev)
?????????????ж???????????????????ж????????????ж???
?????????????ж??????????????????*dev????ж?????????????????????ж??????????ж???????????????ж???
????5.??д?ж???????