linux Öжϴ¦Àí
Öжϴ¦Àí
ÔÚ 2.4 ÄÚºËºÍ 2.6ÄÚºËÖж¼Ê¹Óà request_irq()
º¯ÊýÀ´×¢²áÖжϷþÎñº¯Êý¡£ÔÚ 2.4
ÄÚºËÖУ¬ÐèÒª°üº¬µÄÍ·ÎļþÊÇ #include <linux/sched.h> £¬2.6 ÄÚºËÖÐÐèÒª°üº¬µÄÍ·ÎļþÔòÊÇ #include
<linux/interrupt.h> ¡£º¯ÊýÔÐÍÈçÏ£º
2.4 ÄÚºË
int
request_irq
(unsigned
int
irq
,
void
(*
handler
)(int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
frags
,
const
char
*
device
,
void
*
dev_id
);
2.6 ÄÚºË
request_irq
(unsigned
int
irq
,
irq_handler_t
handler
,
unsigned
long
flags
,
const
char
*
name
,
void
*
dev
);
ÔÚ·¢Éú¶ÔÓ¦
ÓÚµÚ 1¸ö²ÎÊý irq
µÄÖжÏʱ£¬Ôòµ÷ÓÃµÚ 2 ¸ö²ÎÊý handler
Ö¸¶¨µÄÖжϷþÎñº¯Êý(Ò²¾ÍÊÇ°Ñ handler() ÖжϷþÎñº¯Êý×¢²áµ½ÄÚºËÖÐ )¡£
µÚ 3 ¸ö²ÎÊý flags
Ö¸¶¨ÁË¿ìËÙÖжϻòÖжϹ²ÏíµÈÖжϴ¦ÀíÊôÐÔ¡£ÔÚ 2.6 ½ÌеÄÄÚºËÀï(ÎÒµÄÊÇ 2.6.27 ~ 2.6.31 )£¬ÔÚ
linux/interrupt.h Öж¨Òå²Ù×÷Õâ¸ö²ÎÊýµÄºêÈçÏ£º
/*
* These flags used only by the kernel as
part of the
*
irq handling routines.
*
*
IRQF_DISABLED - keep irqs disabled when calling the action handler
* IRQF_SAMPLE_RANDOM - irq is used to
feed the random generator
* IRQF_SHARED - allow sharing the irq among several devices
* IRQF_PROBE_SHARED - set by callers
when they expect sharing mismatches to occur
* IRQF_TIMER - Flag to mark this
interrupt as timer interrupt
* IRQF_PERCPU - Interrupt is per cpu
* IRQF_NOBALANCING - Flag to exclude
this interrupt from irq balancing
* IRQF_IRQPOLL - Interrupt is used for polling (only
the interrupt that is
* registered first in an shared interrupt is
considered for
*
performance reasons)
*/
#define
IRQF_DISABLED 0x00000020
#define IRQF_SAMPLE_RANDOM 0x00000040
#define IRQF_SHARED&
Ïà¹ØÎĵµ£º
µÚÒ»¸ö£º DSL Linux
Damn Small LinuxÊÇÒ»Ì×»ùÓÚÒµÎñ¿¨£¨50M×Ö½Ú£©¿ÉÆô¶¯¹âÅ̵ÄLinux·¢ÐС£¾¡¹ÜËüµÄ¸öÍ·Èç´Ë֮С£¬ËüŬÁ¦³ÉΪһ·Ý¿ÉÓò¢ÇÒÒ×ÓõÄ×ÀÃæ¡£Damn Small LinuxµÄ×ÀÃæ¼¸ºõÊÇÍêÕûµÄÒ»Ì×£¬°üÀ¨xmms£¨Ö§³Ömp3ºÍmpeg£©¡¢FTP¿Í»§¶Ë¡¢»ùÓÚlinksµÄwebä¯ÀÀÆ÷¡¢µç×ÓÖÆ±íÈí¼þ¡¢µç×ÓÓʼþ³ÌÐò¡¢ Ó¢ÓïÆ´Ð´¼ì²é¡¢×Ö´¦ÀíÆ÷¡¢Èý¸ö± ......
LINUXÏÂUSB1.1É豸ѧϰС¼Ç(4)_uhci(2)
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2009.03.14 16:44¡¡(¹²ÓÐÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
ºÃ~ ÏÖÔÚÍòʾ㱸,ֻǷuhciÓ²¼þµÄ×¢²áÁË
ÏÖÔÚ̸һÏÂuhciÓ²¼þµÄ×é³É,uhciµÄÓ²¼þ·ÖΪÁ½¸ö´óµÄ²¿·Ö,Ö÷»ú¿ØÖÆÆ÷ºÍ¸ù¼¯Ï߯÷,ÈçÏÂͼ
µ±Ìá½»uhciÓ²¼þµÄ×¢²áµ½pci×ÜÏߺó,¾¹ýÒ»ÂÖÆ¥Åä,Ö ......
ǰ¶Îʱ¼ä°Ý¶Áfudan_abcµÄÎÄÕºó¸ù¾Ý×Ô¼ºµÄÀí½âдµÄһЩ·ÖÎö
[url=http://blog.chinaunix.net/u1/57901/showart.php?id=1855876][color=#02368d][size=10pt]LINUXÏÂUSB1.1É豸ѧϰС¼Ç(1) [/size][/color]
[url=http://blog.chinaunix.net/u1/57901/showart.php?id=1856447][color=#02368d][size=10pt]LINUXÏÂUSB1. ......
Linux³ÌÐò²ÎÊý°üÀ¨Á½²¿·Ö£º ÃüÁîÐвÎÊýºÍ»·¾³±äÁ¿
ÃüÁîÐвÎÊý´«µÝ¸ømianº¯Êý int mian (int argc,char *argv[])
»·¾³±äÁ¿ extern char *environ[]
»ñµÃ»·¾³±äÁ¿µÄº¯Êý£º const char* getenv(const char* name)
ÉèÖû·¾³±äÁ¿µÄº¯Êý£º
£¨1£©int putent (const c ......