Linux?ж???ж????
???????????? ???????[ 2016/1/18 9:54:10 ] ??????????????
????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.??д?ж???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11