Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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&


Ïà¹ØÎĵµ£º

s3c2440»ùÓÚlinuxµÄbuttonºÍled×Ö·ûÉ豸Çý¶¯

ÏÈÊÇÄÚºËÇý¶¯³ÌÐò£º
#include <linux/module.h>//¾ßÌåµÄÍ·ÎļþλÖÃΪ/opt/FriendlyARM/mini2440/linux-2.6.29/include/linux/*.h
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <l ......

LINUXÏÂUSB1.1É豸ѧϰС¼Ç

ǰ¶Îʱ¼ä°Ý¶Á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½¨Á¢Ê¹ÓÃÏÞÖÆ¼°getrlimitºÍsetrlimitº¯Êý

ÕâÒ»²¿·ÖµÄÌá³öÊÇΪÁË·Àֹʧ¿ØµÄ½ø³ÌÆÆ»µÏµÍ³µÄÐÔÄÜ
nuixºÍLinux¸ú×Ù½ø³ÌʹÓõĴ󲿷Ö×ÊÔ´£¬ÔÊÐíÓû§ºÍϵͳ¹ÜÀíԱʹÓöԽø³ÌµÄ×ÊÔ´ÏÞÖÆ
 ÉèÖõÄÏÞÖÆÓÐÁ½ÖÖ£º Ó²ÏÞÖÆºÍÈíÏÞÖÆ
Ó²ÏÞÖÆÊÇ¿ÉÒÔÔÚÈκÎʱºòÈκνø³ÌÖÐÉèÖà µ«Ó²ÏÞÖÆÖ»ÄÜÓɳ¬¼¶Óû§ÌáÆð
ÈíÏÞÖÆÊÇÄÚºËʵ¼ÊÖ´ÐеÄÏÞÖÆ£¬Èκνø³Ì¶¼¿ÉÒÔ½«ÈíÏÞÖÆÉèÖÃΪÈÎÒ ......

linuxÉ豸Çý¶¯¿ª·¢Ïê½â——globalmem



 
linuxÉ豸Çý¶¯¿ª·¢Ïê½â——globalmem
ÊÕ²Ø



³£¼ûµÄÁ½ÖÖ´íÎó£º
1.ÔÚ²åÈëÄ£¿éµÄʱºò³öÏÖÈçÏÂÎÊÌ⣺
# insmod globalmem.ko insmod: error inserting 'globalmem.ko': -1
Device or res ......

linuxÉ豸Çý¶¯ IO Port

1. I/O Port
¡¡¡¡ºÍÓ²¼þ
´ò½»µÀÀë²»¿ªI/O Port
£¬ÀϵÄ
ISA
É豸¾­³£ÊÇÕ¼ÓÃʵ¼ÊµÄ
I/O
¶Ë¿Ú£¬ÔÚ
linux
Ï£¬²Ù×÷
ϵͳûÓжÔ
I/O
¿ÚÆÁ±Î£¬Ò²¾ÍÊÇ˵£¬ÈκÎÇý¶¯³ÌÐò¶¼¿É¶ÔÈÎÒâµÄ
I/O
¿Ú²Ù×÷£¬ÕâÑù
¾ÍºÜÈÝÒ×ÒýÆð»ìÂÒ¡£Ã¿¸öÇý¶¯³ÌÐòÓ¦¸Ã×Ô¼º±ÜÃâÎóÓö˿ڡ£ 
¡¡¡¡ÓÐÁ½¸ö
ÖØÒªµÄkernel
º¯Êý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ