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

Linux´®¿ÚͨÐųÌÐò

    ±ÏÒµÉè¼ÆÓõ½Ò»Ð©½Ó¿Ú²âÊÔ´úÂ룬ÆäÖоÍÓд®¿ÚµÄ²âÊÔ£¬ÕâÆäÖлù±¾½è¼øÁË»ªÇåÔ¶¼ûÄDZ¾ÊéÀïÃæµÄ´úÂ룬¶Á´®¿Ú³ÌÐò½»²æ±àÒëµ½¿ª·¢°åÖУ¬Ð´´®¿Ú³ÌÐòÔÚPC¶ËÖ´ÐС£´úÂëºÜ¼òµ¥£¬ÒòΪ´®¿ÚÔÚlinuxÏÂÒ²Ö»ÊǸöÎļþ£¬Ö»ÐèÒª´ò¿ªÕâÎļþ½øÐжÁд²Ù×÷¾ÍºÃÁË¡£ÆäÖÐʹÓÃÁË2¸öº¯Êý£¬·Ö±ðÊÇÅäÖö˿ںʹò¿ª¶Ë¿ÚµÄº¯Êý£¬Õâ2¸öº¯Êý±È½ÏËÀ£¬¿ÉÒÆÖ²ÐÔÒ²±È½ÏÇ¿¡£
/******************************************
Filename : serial_read.c
Function : read with serial port
Author : wanxiao
Date : 2010-5-7
******************************************/
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <stdlib.h>
int set_opt(int fd, int nSpeed, int nBits, char nEvent, int nStop);
int open_port(int fd, int comport);
int main(void)
{
int fd;
int nread , nwrite;
int i;
char buff[8];
fd_set rd;

if((fd = open_port(fd,1)) < 0)
{
perror("open_port error");
return ;
}
if((i = set_opt(fd,115200,8,'N',1)) < 0)
{
perror("set_opt error");
return ;
}
FD_ZERO(&rd);
FD_SET(fd,&rd);
while(FD_ISSET(fd,&rd))
{
if(select(fd+1,&rd,NULL,NULL,NULL) < 0){
perror("select");
}
else{
while((nread = read(fd,buff,8)) > 0)
{
printf("nread=%d,%s\n",nread,buff);
}
}
}
close(fd);
return ;
}
/******************************************
Filename : serial_write.c
Function : communication with serial port
Author : wanxiao
Date : 2010-5-7
******************************************/
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <termios.h>
#include <stdli


Ïà¹ØÎĵµ£º

LinuxϵĶδíÎó²úÉúµÄÔ­Òò¼°µ÷ÊÔ·½·¨

¼ò¶øÑÔÖ®,²úÉú¶Î´íÎó¾ÍÊÇ·ÃÎÊÁË´íÎóµÄÄÚ´æ¶Î£¬Ò»°ãÊÇÄãûÓÐȨÏÞ£¬»òÕ߸ù±¾¾Í²»´æÔÚ¶ÔÓ¦µÄÎïÀíÄÚ´æ,ÓÈÆä³£¼ûµÄÊÇ·ÃÎÊ0µØÖ·.
Ò»°ãÀ´Ëµ,¶Î´íÎó¾ÍÊÇÖ¸·ÃÎʵÄÄڴ泬³öÁËϵͳËù¸øÕâ¸ö³ÌÐòµÄÄÚ´æ¿Õ¼ä£¬Í¨³£Õâ¸öÖµÊÇÓÉgdtrÀ´±£´æµÄ£¬ËûÊÇÒ»¸ö48λµÄ¼Ä´æÆ÷£¬ÆäÖеÄ32λÊDZ£´æÓÉËüÖ¸ÏòµÄgdt±í£¬ºó13λ±£´æÏàÓ¦ÓÚgdtµÄϱ꣬×îºó3λ°ü ......

linuxÎļþȨÏÞchmod

linuxµÄÎļþȨÏÞͨ¹ýÓû§£¬×éºÍÆäËü×éÀ´ÊµÏÖ¡£Ò»¸öÎļþÖ»ÄÜÊôÓÚÒ»¸öÓû§ºÍ×飬 Èç¹ûÆäËüµÄÓû§ÏëÓÐÕâ¸öÎļþµÄȨÏÞ£¬Ôò¿ÉÒÔ½«¸ÃÓû§¼ÓÈëÕâ¸ö×飬һ¸öÓû§¿ÉÒÔͬʱÊôÓÚ¶à¸ö×é¡£Ò»°ãÀ´ËµÒ»¸öÓ¦ÓÃϲ»ÒªÓÐÌ«¶àµÄÎļþ×éºÍÓû§£¬×îºÃ²»ÒªÓÃROOTÖ´ÐнDZ¾£¬ÕâÑùȨÏÞ¶¼·Å·Å´ó£¬±È½Ï²»°²È«
LinuxϺÜÖØÊÓȨÏÞ£¬È¨ÏÞ°üÀ¨¶Á£¬Ð´£¬Ö´ÐС ......

LinuxÐźŽéÉÜ(ת)

Ðźţ¨signal£©ÊÇÒ»ÖÖÈí¼þÖжϣ¬ËüÌṩÁËÒ»ÖÖ´¦ÀíÒ첽ʼþµÄ·½·¨£¬Ò²Êǽø³Ì¼äΩһµÄÒ첽ͨÐÅ·½Ê½¡£ÔÚLinuxϵͳÖУ¬¸ù¾ÝPOSIX±ê×¼À©Õ¹ÒÔºóµÄÐźŻúÖÆ£¬²»È¨¿ÉÒÔÓÃÀ´Í¨ÖªÄ³½ø³Ì·¢ÉúÁËʲôʼþ£¬»¹¿ÉÒÔ¸ø½ø³Ì´«µÝÊý¾Ý¡£
    Ò»¡¢ÐźŵÄÀ´Ô´
    ÐźŵÄÀ´Ô´¿ÉÒÔÓкܶàÖÖ·½Ê½£¬°´ÕÕ²úÉúÌõ¼þµÄ²» ......

Linux PCIÇý¶¯Ä£ÐÍ

      PCIÊÇÍâΧÉ豸»¥Á¬£¨Peripheral Component Interconnect£©µÄ¼ò³Æ£¬×÷ΪһÖÖͨÓõÄ×ÜÏß½Ó¿Ú±ê×¼£¬ËüÔÚÄ¿Ç°µÄ¼ÆËã»úϵͳÖеõ½Á˷dz£¹ã·ºµÄÓ¦Óá£PCIÌṩÁËÒ»×éÍêÕûµÄ×ÜÏ߽ӿڹ淶£¬ÆäÄ¿µÄÊÇÃèÊöÈçºÎ½«¼ÆËã»úϵͳÖеÄÍâΧÉ豸ÒÔÒ»Öֽṹ»¯ºÍ¿É¿Ø»¯µÄ·½Ê½Á¬½ÓÔÚÒ»Æð¡£
   &nbs ......

Unix/Linux³£ÓÃÃüÁî—Ŀ¼µÄ´´½¨Óëɾ³ý

mkdirÃüÁî
¹¦ÄÜ£º´´½¨Ò»¸öĿ¼£¨ÀàËÆMSDOSϵÄmdÃüÁ¡£
Óï·¨£ºmkdir [Ñ¡Ïî] dir-name
˵Ã÷£º¸ÃÃüÁî´´½¨ÓÉdir-nameÃüÃûµÄĿ¼¡£ÒªÇó´´½¨Ä¿Â¼µÄÓû§ÔÚµ±Ç°Ä¿Â¼ÖУ¨dir-nameµÄ¸¸Ä¿Â¼ÖУ©¾ßÓÐдȨÏÞ£¬²¢ÇÒdirname²»ÄÜÊǵ±Ç°Ä¿Â¼ÖÐÒÑÓеÄĿ¼»ò ÎļþÃû³Æ¡£
ÃüÁîÖи÷Ñ¡ÏîµÄº¬ÒåΪ£º
- m ¶Ôн¨Ä¿Â¼ÉèÖôæȡȨÏÞ¡£Ò²¿ÉÒÔÓà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ