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

LinuxÏ´®¿Ú±à³ÌÖ®¶þ£º¶Á´®¿ÚºÍд´®¿Ú

1£¬´ò¿ª´®¿Ú
      /**´ò¿ª´®¿Ú£¬dev ´®¿ÚÉ豸Ãû£¬ mode ´ò¿ª·½Ê½£¬**/
     int opendev(char *dev,mode_t mode)
    {
          int fd;
          fd = open(dev, mode);
          if (-1 == fd){   
                perror("Can't Open Serial Port");
                return -1; 
          }
          else{
                 fcntl(fd, F_SETFL, FNDELAY);
                 return fd;
          }
     }
2£¬Ð´´®¿Ú
    #define FALSE  -1
    #define TRUE   0
    #define NET_PORT 19988
    #define MAX_BUF_SIZE 4096
    struct net2net_buf{
           int len;
           char buf[MAX_BUF_SIZE];
     };
     #define RSDEV_NAME "/dev/ttyS1"
     int main(void)
     {
            int rsfd = 0;
            int nwrite;
            char input_buf[64];
            rsfd = opendev(RSDEV_NAME,O_RDWR | O_NOCTTY |


Ïà¹ØÎĵµ£º

Linux ÄÚºËWorkQueueÔĶÁ±Ê¼Ç


1.            Workqueue
WorkqueueµÄÃû×־ͺÍËûµÄ¹¦ÄÜÒ»Ñù£ºÐèÒª´¦ÀíµÄ¹¤×÷ÁбíºÍ¹¤×÷µÄÌí¼Óɾ³ý£¨Ã²ËÆÃ»Óп´µ½ÈçºÎɾ³ýµÄ£©¡¢ÒÔ¼°¹¤×÷µÄµ÷¶ÈÖ´ÐС£
ÐèÒª´¦ÀíµÄ¹¤×÷Áбíͨ³£¶¼Î¬»¤ÔÚÄں˶ÔÏóworkqueue_structÀïÃæ¡£ÏµÍ³ÀïÃæ¿ÉÒÔÓжà¸öworkqueue_struct¡£ ......

linuxµÄttyÉ豸

      ÖÕ¶ËÊÇÒ»ÖÖ×Ö·ûÐÍÉ豸£¬ËüÓжàÖÖÀàÐÍ£¬Í¨³£Ê¹ÓÃttyÀ´¼ò³Æ¸÷ÖÖÀàÐ͵ÄÖÕ¶ËÉ豸¡£ttyÊÇTeletypeµÄËõд£¬TeletypeÊÇ×îÔç³öÏÖµÄÒ»ÖÖÖÕ¶ËÉ豸£¬ºÜÏóµç´«´ò×Ö»ú£¬ÊÇÓÉTeletype¹«Ë¾Éú²úµÄ¡£É豸Ãû·ÅÔÚÌØÊâÎļþĿ¼/dev/Ï£¬ÖÕ¶ËÌØÊâÉ豸ÎļþÒ»°ãÓÐÒÔϼ¸ÖÖ£º
1£¬´®Ðж˿ÚÖÕ¶Ë£¨/dev/ttySn£©£º´®Ðж ......

linuxÏÂmysql±àÒë°²×°·½·¨±¸Íü

# tar -zxvf mysql-5.0.45.tar.gz -C /usr/src/
# cd /usr/src/mysql-5.0.45
# ./configure --prefix=/usr/local/mysql --with-charset=gbk
--localstatedir=/usr/local/mysql/data
# make
# make install
# groupadd mysql
# useradd mysql -g mysql
# cd /usr/local/mysql/bin
# ./mysql_install_db --user=mys ......

³É¹¦ÊµÏÖLinuxÏÂpppdͨ¹ýGPRS²¦ºÅÉÏÍø

³É¹¦ÊµÏÖLinuxÏÂpppdͨ¹ýGPRS²¦ºÅÉÏÍø


×ò
Ìì°Ñ¿ª·¢°åµÄbootloaderɾÁË,û°ì·¨,Ö»µÃÔÚPCÉϵ÷GPRS²¦ºÅÁË.ÏÈÔÚwindowsϲ¦ºÅ³É¹¦,È»ºóÓù¤¾ß¿´²¦ºÅʱ¾ßÌåʹÓÃÁËÄÄЩATÃü
Áî,ÔÙʹÓÃÕâЩÃüÁîµ½linuxÏÂʹÓÃpppdÀ´²¦ºÅ,×îºóÖÕÓڳɹ¦ÁË,֮ǰ¿ª·¢°åÉϲ»Äܳɹ¦²¦ºÅ¼«ÓпɾÍÊÇATÖ¸ÁîÓÐÎ ......

Linuxѧϰ£¨¶þ).1(ת)

1. Íù/libºÍ/usr/libÀïÃæ¼Ó¶«Î÷£¬ÊDz»ÓÃÐÞ¸Ä/etc/ld.so.confµÄ£¬µ«ÊÇÍêÁËÖ®ºóÒªµ÷Ò»ÏÂldconfig£¬²»È»Õâ¸ölibrary»áÕÒ²»µ½
2. ÏëÍùÉÏÃæÁ½¸öĿ¼ÒÔÍâ¼Ó¶«Î÷µÄʱºò£¬Ò»¶¨ÒªÐÞ¸Ä/etc/ld.so.conf£¬È»ºóÔÙµ÷ÓÃldconfig£¬²»È»Ò²»áÕÒ²»µ½
±ÈÈç°²×°ÁËÒ»¸ömysqlµ½/usr/local/mysql£¬mysqlÓÐÒ»´ó¶ÑlibraryÔÚ/usr/local/mysql/libÏÂÃæ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ