Ò»¸ö¼òµ¥µÄlinuxÏÂÍøÂç³ÌÐòʵÀý£ÍøÂç±à³ÌÈëÃÅ
ϵͳ£ºfedora core 5
·þÎñÆ÷¶Ë³ÌÐò£º
/* server */
#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <arpa/inet.h>
#define PORT 8848
#define BACKLOG 1
main()
{
int listenfd,connectfd;
struct sockaddr_in server;
struct sockaddr_in client;
int sin_size;
if (( listenfd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
{
perror("Creating socket failed.");
return 0;
}
int opt = SO_REUSEADDR;
setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
bzero(&server,sizeof(server));
server.sin_family = AF_INET;
server.sin_port = htons(PORT);
server.sin_addr.s_addr = htonl(INADDR_ANY);
printf("binding... ");
if(bind(listenfd, (struct sockaddr *)&server, sizeof(struct sockaddr)) == -1) {
perror("Bind error");
return 0;
}
printf("listen... ");
if(listen(listenfd,BACKLOG) == -1){
perror("listen()
Ïà¹ØÎĵµ£º
Ò»:Ç°ÑÔ
I2cÊÇphilipsÌá³öµÄÍâÉè×ÜÏß.I2CÖ»ÓÐÁ½ÌõÏß,Ò»Ìõ´®ÐÐÊý¾ÝÏß:SDA,Ò»ÌõÊÇʱÖÓÏßSCL.ÕýÒòΪÕâÑù,Ëü·½±ãÁ˹¤³ÌÈËÔ±
µÄ²¼Ïß.ÁíÍâ,I2CÊÇÒ»ÖÖ¶àÖ÷»ú¿ØÖÆ×ÜÏß.ËüºÍUSB×ÜÏß²»Í¬,USBÊÇ»ùÓÚmaster-slave»úÖÆ,ÈκÎÉ豸µÄͨÐűØÐëÓÉÖ÷»ú·¢Æð²Å¿ÉÒÔ.¶ø
I2C ÊÇ»ùÓÚmulti master»úÖÆ.һͬ×ÜÏßÉÏ¿ÉÔÊÐí¶à¸ömaster.¹ØÓÚI2CÐÒéµÄÖª ......
ÎҵĵçÄÔ°²×°ÁË˫ϵͳ£¬WindowsºÍLinux£¬²»¹ýÓÉÓÚLinuxÔÚ×î½üÒ»¶Îʱ¼äÄÚ²»»áʹÓã¬ËùÒÔÎÒ´òËãɾ³ýLinux¡£
ɾ³ýLinux×îÐèҪעÒâµÄµØ·½£¬¾ÍÊÇMBR£¨Master Boot Record£©¡£ÔÚɾ³ýLinux·ÖÇøÇ°£¬ÎÒÃÇÐèÒª½«Æô¶¯WindowsµÄÒýµ¼ÐÅϢдÈëMBR£¬·ñÔò£¬MBRÖеÄLinuxÒýµ¼ÐÅÏ¢£¬µ±È»¾Í²»ÄÜÆô¶¯WindowsÏµÍ ......
package: download from:
Èí¼þ¼¯³É¿ª·¢»·¾³£¨´úÂë±à¼¡¢ä¯ÀÀ¡¢±àÒë¡¢µ÷ÊÔ£©
Emacs http://www.gnu.org/software/emacs/
Source-Navigator 5.2b2 http://sourceforge.net/projects/sourcenav
Anjuta http://anjuta.sourceforge.net(¿ÉÓÃyum°²×°)
´úÂëË÷Òý¹¤¾ß
Cscope http://cscope.sourceforge.net/
KScope http:/ ......
³õѧLinux£¬×öѧϰ±Ê¼ÇÖ®Óá£Ò²Çë¸ßÊÖÃǶà¶àÖ¸½Ì£¡
LinuxÃüÁî×é³É£ºshellÄÚ²¿ÃüÁî+shellÍⲿÃüÁî
shellÄÚ²¿ÃüÁ×î¼òµ¥×î³£ÓõÄÃüÁÔÚshellÆô¶¯Ê±½øÈëÄÚ´æ
shellÍⲿÃüÁ¶ÀÁ¢µÄ¿ÉÖ´ÐгÌÐò¡£ÊÇһЩʹÓù¤¾ß³ÌÐò
LinuxÃüÁîµÄ¸ñʽ£º
ÃüÁîÌå [Ñ¡Ïî] [ÃüÁîµÄ²ÎÊý£¬ÃüÁîµÄ¶ÔÏó]&n ......