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 <&
Ïà¹ØÎĵµ£º
1 linux½ø³ÌÓëÏ̵߳ÄÁªÏµºÍÇø±ð£º
ÔÚlinuxÖУ¬Ḭ̈߳´ÕÕ½ø³ÌµÄ·½Ê½ÊµÏÖ¡£ÆäʵÏÖ»úÖÆÓësolarisºÍwindows²îÒìºÜ´ó¡£
ÔÚÏÖ´ú²Ù×÷ϵͳÖУ¬½ø³ÌÖ§³Ö¶àỊ̈߳¬½ø³ÌÊÇ×ÊÔ´¹ÜÀíÒÔ¼°·ÖÅäµÄ×îСµ¥Ôª£¬Ïß³ÌÊdzÌÐòÖ´ÐеÄ×îСµ¥Ôª¡£Ò»¸ö½ø³ÌʵÌå·ÖΪ£ºÏ̼߳¯ºÍ×ÊÔ´¼¯(°üÀ¨µØÖ·¿Õ¼ä¡¢´ò¿ªµÄÎļþÒ ......
ÒÔÏÂÊÇÕÒµ½µÄ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 <µÍ¶Ë¿Ú> - ......
³Âð© (CSDN)
¸ÅÊö
——
ʲôÊÇ
makefile£¿»òÐíºÜ¶àWinodwsµÄ³ÌÐòÔ±¶¼²»ÖªµÀÕâ¸ö¶«Î÷£¬ÒòΪÄÇЩWindowsµÄIDE¶¼ÎªÄã×öÁËÕâ¸ö¹¤×÷£¬µ«ÎÒ¾õµÃÒª×÷Ò»¸öºÃµÄºÍ
professionalµÄ³ÌÐòÔ±£¬makefile»¹ÊÇÒª¶®¡£Õâ¾ÍºÃÏñÏÖÔÚÓÐÕâô¶àµÄHTMLµÄ±à¼Æ÷£¬µ«Èç¹ûÄãÏë³ÉΪһ¸öרҵÈËÊ¿£¬Ä㻹ÊÇÒªÁ˽â
HTMLµÄ±êʶµÄº¬Òå¡£Ìرð ......
Linux ºÍ Unix Îļþϵͳ±»×éÖ¯³ÉÒ»¸öÓвã´ÎµÄÊ÷Ðνṹ¡£ÎļþϵͳµÄ×îÉϲãÊÇ /£¬»ò³ÆΪ ¸ùĿ¼¡£ÔÚ Unix ºÍ Linux µÄÉè¼ÆÀíÄîÖУ¬Ò»ÇнÔΪÎļþ——°üÀ¨Ó²ÅÌ¡¢·ÖÇøºÍ¿É²å°Î½éÖÊ¡£Õâ¾ÍÒâζ×ÅËùÓÐÆäËüÎļþºÍĿ¼£¨°üÀ¨ÆäËüÓ²Å̺ͷÖÇø£©¶¼Î»ÓÚ¸ùĿ¼ÖС£ ÀýÈ磺/home/jebediah/cheeses.odt ¸ø³öÁËÕýÈ·µÄÍêÕû·¾¶£¬ËüÖ¸ ......