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

S3C24XXÌåϵµÄLinux GPIO¿ØÖÆÏà¹ØAPIʵÏÖ

GPIO£¨General Purpose Input/OutputµÄËõд£©¾ÍÊÇоƬµÄÒý½Å£¬Òý½ÅÊǿɱà³ÌµÄ¿É¶ÔÒý½ÅµÄ¹¤×÷ģʽ½øÐÐÉèÖãºÊäÈëģʽ(¼ì²âÊäÈëÐźÅ)£¬Êä³öģʽ(Êä³ö0»ò1)£¬¸ß×è״̬(³£ÓÃÓÚADת»»)£¬»¹ÓнûÖ¹»òÔÊÐíÉÏÄÚ²¿ÏÂÀ­µç×è(ÉÏÀ­£º¹Ü½Åͨ¹ýµç×è½Ó¸ßµçƽ£¬ÏÂÀ­£º¹Ü½Åͨ¹ýµç×è½ÓµØ£¬Ò²¿ÉÒÔÍⲿ½ÓÉÏÀ­»òÏÂÀ­µç×è)£¬»¹ÓйܽŸ´Óõȹ¦ÄÜ£¬¼´Í¨¹ý¶ÔÄÚ²¿¼Ä´æÆ÷µÄÉèÖÃʹÒý½Å¼È¿ÉÒÔ¹¤×÷ÔÚÒ»°ãģʽ£¬×÷ΪÆÕͨµÄGPIO¿ÚʹÓã¬Ò²¿ÉÒÔ¹¤×÷ÔÚÌØÊâģʽ£¬±ÈÈç×÷ΪÍⲿÖжÏÐźÅÊäÈëÒý½ÅµÈµÈ¡£Èç¹û²»ÉèÖÃGPIOÒý½Å£¬CPU¹¤×÷ʱÓÐÒ»¸ö³õʼ»¯Ä£Ê½£¬¿ÉÒÔ´Ódatasheet£¨Ð¾Æ¬ÊֲᣩÉÏÁ˽⡣¶ÔGPIOµÄ¿ØÖÆÊDZàдÇý¶¯³ÌÐò×î³£¼ûºÍÖØÒªµÄÒ»Ï×÷ÄÚÈÝ¡£
ÔÚLinux2.6.25Äں˴úÂëÖУ¬ÒѾ­ÌṩÁËÕë¶ÔÈýÐÇS3C2410/S3C2440µÈоƬGPIOµÄ¿ØÖÆ£¬ÏÂÃæÀ´·Ö±ð½éÉÜÒ»°ãÈçºÎÅäÖᢹÜÀíGPIO¡£
       ÏÂÃæµÄº¯ÊýÊÇÓÃÀ´¸ù¾ÝÐµĹ¦ÄÜÐèÇóÅäÖÃÒ»¸öGPIOÒý½Å£¨¶¨ÒåÔÚarch/arm/plat-s3c24xx/gpio.c£©£º
     1    void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
     2    {
     3           void __iomem *base = S3C24XX_GPIO_BASE(pin);
     4           unsigned long mask;
     5           unsigned long con;
     6           unsigned long flags;
     7   
     8           if (pin < S3C2410_GPIO_BANKB) {
     9                  mask = 1 << S3C2410_GPIO_OFFSET(pin);
    10           } else {
    11                  mask = 3 <&


Ïà¹ØÎĵµ£º

Tips: linux½ø³ÌºÍÏ̲߳îÒì(0)


1 linux½ø³ÌÓëÏ̵߳ÄÁªÏµºÍÇø±ð£º
    ÔÚlinuxÖУ¬Ḭ̈߳´ÕÕ½ø³ÌµÄ·½Ê½ÊµÏÖ¡£ÆäʵÏÖ»úÖÆÓësolarisºÍwindows²îÒìºÜ´ó¡£
    ÔÚÏÖ´ú²Ù×÷ϵͳÖУ¬½ø³ÌÖ§³Ö¶àỊ̈߳¬½ø³ÌÊÇ×ÊÔ´¹ÜÀíÒÔ¼°·ÖÅäµÄ×îСµ¥Ôª£¬Ïß³ÌÊdzÌÐòÖ´ÐеÄ×îСµ¥Ôª¡£Ò»¸ö½ø³ÌʵÌå·ÖΪ£ºÏ̼߳¯ºÍ×ÊÔ´¼¯(°üÀ¨µØÖ·¿Õ¼ä¡¢´ò¿ªµÄÎļþÒ ......

LinuxÏÂÈ÷ÇrootÓû§ÆôÓÃСÓÚ1024ºÅµÄ¶Ë¿Ú


ÒÔÏÂÊÇÕÒµ½µÄLinuxµÄ×ÊÁÏ£¬Solairs¡¢AIXµÈÓ¦µ±ÓÐËù²»Í¬£¬Çë¸ú½ø
·½·¨Ò»£º¶Ë¿ÚÓ³Éä
1¡¢iptablesÃüÁî:iptables -t nat -A PREROUTING -p tcp --dport <µÍ¶Ë¿Ú> -i eth0 -j REDIRECT --to-port <Ô­ÏȼàÌýµÄ¸ß¶Ë¿Ú>
2¡¢rinetd³ÌÐò
3¡¢ipchansÃüÁî:ipchans -I input --proto TCP --dport <µÍ¶Ë¿Ú> - ......

Linux makefile ½Ì³Ì ·Ç³£Ïêϸ£¬ÇÒÒ׶®


³Âð© (CSDN)
¸ÅÊö
——
ʲôÊÇ
makefile£¿»òÐíºÜ¶àWinodwsµÄ³ÌÐòÔ±¶¼²»ÖªµÀÕâ¸ö¶«Î÷£¬ÒòΪÄÇЩWindowsµÄIDE¶¼ÎªÄã×öÁËÕâ¸ö¹¤×÷£¬µ«ÎÒ¾õµÃÒª×÷Ò»¸öºÃµÄºÍ
professionalµÄ³ÌÐòÔ±£¬makefile»¹ÊÇÒª¶®¡£Õâ¾ÍºÃÏñÏÖÔÚÓÐÕâô¶àµÄHTMLµÄ±à¼­Æ÷£¬µ«Èç¹ûÄãÏë³ÉΪһ¸öרҵÈËÊ¿£¬Ä㻹ÊÇÒªÁ˽â
HTMLµÄ±êʶµÄº¬Òå¡£Ìرð ......

linuxĿ¼ºÍÎļþϵͳ

Linux ºÍ Unix Îļþϵͳ±»×éÖ¯³ÉÒ»¸öÓвã´ÎµÄÊ÷Ðνṹ¡£ÎļþϵͳµÄ×îÉϲãÊÇ /£¬»ò³ÆΪ ¸ùĿ¼¡£ÔÚ Unix ºÍ Linux µÄÉè¼ÆÀíÄîÖУ¬Ò»ÇнÔΪÎļþ——°üÀ¨Ó²ÅÌ¡¢·ÖÇøºÍ¿É²å°Î½éÖÊ¡£Õâ¾ÍÒâζ×ÅËùÓÐÆäËüÎļþºÍĿ¼£¨°üÀ¨ÆäËüÓ²Å̺ͷÖÇø£©¶¼Î»ÓÚ¸ùĿ¼ÖС£ ÀýÈ磺/home/jebediah/cheeses.odt ¸ø³öÁËÕýÈ·µÄÍêÕû·¾¶£¬ËüÖ¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ