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

LinuxÇý¶¯µÄһЩ»ù±¾²Ù×÷

LinuxÇý¶¯µÄһЩ»ù±¾²Ù×÷

LinuxÄÚºËÖж¨ÒåÁ˺ܶàºê£¬¶ÔÓ²¼þ¶Ë¿ÚºÍ¼Ä´æÆ÷½øÐвÙ×÷£¬´ÓÍøÉÏËѼ¯ÁËһЩºê¶¨ÒåµÄÐÅÏ¢£º
1. __REG¼òµ¥µÄ˵¾ÍÊÇ»ñµÃºóÃæËùʾÎïÀíµØÖ·Ó³ÉäºóµÄÐéÄâµØÖ·£¬ÀýÈ磺
#define GPLR0  __REG(0x40E00000)    /* GPIO Pin-Level Register GPIO<31:0> */
#define GPLR1  __REG(0x40E00004)    /* GPIO Pin-Level Register GPIO<63:32> */
#define GPLR2  __REG(0x40E00008)    /* GPIO Pin-Level Register GPIO<80:64> */
pxa´¦ÀíÆ÷ÄÚ²¿¼Ä´æÆ÷µÄÎïÀíµØÖ·ºÍÄں˿ռäµÄÐéÄâµØÖ·¶ÔÓ¦¹ØϵÈçÏÂ:
Intel PXA internal I/O mappings:* 0x40000000 - 0x41ffffff <--> 0xf8000000 - 0xf9ffffff
 * 0x44000000 - 0x45ffffff <--> 0xfa000000 - 0xfbffffff
 * 0x48000000 - 0x49ffffff <--> 0xfc000000 - 0xfdffffff
2. #define GPLR(x)  __REG2(0x40E00000, ((x) & 0x60) >> 3).
»¹ÓÐÒ»¸öת»»µÄ¾ä×Ó#define GPIO_bit(x) (1 << ((x) & 0x1f))
GPIO¹²ÓÐ80¸ö,ËùÒÔ32bitµÄ¼Ä´æÆ÷Ö»ºÃû×é×ö3¸ö. GPIO_BIT¾ÍÊÇ1×óÒÆxλ(²¢ÇÒ²»Òª³¬¹ý32);¶øGPLR(X)ÔòÊǸù¾ÝxµÄÊýÖµ(Õâ¸öÊÇGPIOºÅ,Èç16,37,72)µÃµ½3¸öGPLRÖÐÊôÓÚ¸ÃGPIOµÄGPLRµÄÆðʼµØÖ·,(__REG2¾ÍÊÇ»ñµÃÁ½¸öµØÖ·µÄºÍ).ÕâÑù×Ó¿ÉÒÔͨ¹ýÏÂÃæµÄ¸³Öµ·½·¨:
GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | GPIO_bit(GPIO49_nPWE);À´ÉèÖÃGPIO48ËùÔÚGPSRµÄ2¸öλ.Õâôһ´ó¶Ñ,ÊÇΪÁËÓõ½GPIOºÅ¶¨ÒåºÃµÄºê.¼òµ¥µÄGPSR3=XXXX|XXXXÒ²ÊÇ¿ÉÒÔµÄ.
3. side effect£¨ÒëΪ±ß¼ÊЧӦ»ò¸±×÷Óã©£ºÊÇÖ¸¶Áȡij¸öµØַʱ¿ÉÄܵ¼Ö¸õØÖ·ÄÚÈÝ·¢Éú±ä»¯£¬±ÈÈ磬ÓÐЩÉ豸µÄÖжÏ״̬¼Ä´æÆ÷Ö»ÒªÒ»¶ÁÈ¡£¬±ã×Ô¶¯ÇåÁã¡£I/O¼Ä´æÆ÷µÄ²Ù×÷¾ßÓÐside effect£¬Òò´Ë£¬²»ÄܶÔÆä²Ù×÷²»ÄÜʹÓÃcpu»º´æ


Ïà¹ØÎĵµ£º

linux socket ÓÅ»¯


linux socket ÓÅ»¯
2008-06-12 16:40
ʹÓà Sockets API£¬ÎÒÃÇ¿ÉÒÔ¿ª·¢¿Í»§»úºÍ·þÎñÆ÷Ó¦ÓóÌÐò£¬ËüÃÇ¿ÉÒÔÔÚ±¾µØÍøÂçÉϽøÐÐͨÐÅ£¬Ò²¿ÉÒÔͨ¹ý Internet ÔÚÈ«Çò·¶Î§ÄÚ½øÐÐͨÐÅ¡£ÓëÆäËû API Ò»Ñù£¬Äú¿ÉÒÔͨ¹ýһЩ·½·¨Ê¹Óà Sockets API£¬´Ó¶øÌá¸ß Socket µÄÐÔÄÜ£¬»òÕßÏÞÖÆ Socket µÄÐÔÄÜ¡£±¾ÎÄ̽Ë÷ÁË 4 ÖÖʹÓà Sockets API À´ ......

ʹÓà /proc ÎļþϵͳÀ´·ÃÎÊ Linux Äں˵ÄÄÚÈÝ

²Î¼û£ºhttp://www.ibm.com/developerworks/cn/linux/l-proc.html
ʹÓà /proc ÎļþϵͳÀ´·ÃÎÊ Linux Äں˵ÄÄÚÈÝ
Õâ¸öÐéÄâÎļþϵͳÔÚÄں˿ռäºÍÓû§¿Õ¼äÖ®¼ä´ò¿ªÁËÒ»¸öͨÐÅ´°¿Ú
ÎĵµÑ¡Ïî
<tr
valign="top"><td width="8"><img alt="" height="1" width="8& ......

linuxÄÚºËÅäÖÃÎļþ.config£¬»ùÓÚs3c2410ʵÏÖ

ÏÂÃæµÄÎļþµÄʹÓ÷½·¨ÊÇ£º½«ÏÂÃæµÄÎļþ±£´æÔÚlinuxÄÚºËÔ´ÂëĿ¼ÖУ¬ÎļþµÄÃû³ÆÊÇ.config£¬È»ºómake menuconfig,ÔÚ³öÏÖ
µÄÅäÖýçÃæÖÐÑ¡ÔñLoad ConfiguratioÑ¡ÏȻºó¿ÉÒÔÔÚÕâ¸ö»ù´¡ÉÏÐÞ¸Ä×Ô¼ºµÄkernel¡£ÏÂÃæµÄÅäÖÃÊÇ»ùÓÚs3c2410£¬Ö§³Öyaffs2
Îļþϵͳ¡£ÎÒ¿´ÁËһϱàÒë³öÀ´µÄuImage´ó¸ÅÔÚ800k×óÓÒ£¬ºÇºÇôÕâÊDZ¾È˵ÚÒ»´Î³É ......

תÔØlinuxÄں˲üô 1


¡¾×ª¡¿LinuxÄں˲üôµÄ¾ßÌå²½Öè
ÔÚmenuconfigÖÐÅäÖãº
Ïêϸ½éÉÜÄÚºËÅäÖÃÑ¡Ïɾ¸ÄÇé¿ö
µÚÒ»²¿·Ö£ºÈ«²¿É¾³ý
Code maturity level options ---> ´úÂë³ÉÊìµÈ¼¶Ñ¡Ïî
[]Prompt for development and/or incomplete code/drivers Ä¬ÈÏÇé¿öÏÂÊÇÑ¡ÔñµÄ£¬Õ⽫»áÔÚ ......

Linux¾²Ì¬/¶¯Ì¬Á´½Ó¿âµÄ´´½¨ºÍʹÓÃ


ºÍ
WindowsϵͳһÑùLinuxÒ²Óо²Ì¬/¶¯Ì¬Á´½Ó¿â£¬ÏÂÃæ½éÉÜ´´½¨ºÍʹÓ÷½·¨£º
¼ÙÉèÓÐÏÂÃ漸¸öÎļþ£º
Í·ÎļþString.h£¬ÉùÃ÷Ïà¹Øº¯ÊýÔ­ÐΣ¬ÄÚÈÝÈçÏ£º
Strlen.c£º
º¯ÊýStrlenµÄʵÏÖ£¬»ñÈ¡¸ø¶¨×Ö·û´®µÄ³¤¶È£¬ÄÚÈÝÈçÏ£º
Strlnen.c£ºº¯Êý
StrNlenµÄʵÏÖ£¬»ñÈ¡¸ø¶¨×Ö·û´®µÄ³¤¶È£¬Èç¹ûÊäÈë×Ö·û´®µÄ³¤¶È´óÓÚÖ¸¶¨µÄ×î´ó³¤¶È£¬Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ