LinuxÏÂEclipseÉèÖúº×Ö±àÂë
½ñÌ죬°ÑwindowsÏµĹ¤³Ìµ¼Èëµ½ÁËLinuxÏÂeclipseÖУ¬ÓÉÓÚÒÔÇ°µÄ¹¤³Ì´úÂ룬¶¼ÊÇGBK±àÂëµÄ£¬¶øUbuntuĬÈÏÊDz»Ö§³ÖGBK±àÂëµÄ¡£ËùÒÔ£¬Ê×ÏÈÎÒÃÇÒªÏÈÈÃUbuntuÖ§³ÖGBK£¬·½·¨ÈçÏ£º
1.
ÐÞ¸Ä/var/lib/locales /supported.d/localÎļþ,ÔÚÎļþÖÐÌí¼Ó
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
2.
sudo dpkg-reconfigure --force locales
È»ºóÔÚÊä³öµÄ½á¹ûÖлá³öÏÖ
zh_CN.GB2312 done
zh_CN.GBK done
ÕâÑù£¬ Ubuntu¾ÍÖ§³ÖGBK±àÂëÁË£¬ ÏÂÃæÉèÖÃeclipse¡£
Ê×ÏÈWindows->Preferences, È»ºóÑ¡ÔñGeneralÏÂÃæµÄWorkspace. Text file encodingÑ¡ÔñOther GBK£¬ Èç¹ûûÓÐGBKµÄÑ¡Ï û¹Øϵ£¬ Ö±½ÓÊäÈëGBKÈý¸ö×Öĸ£¬ Apply£¬ GBK±àÂëµÄÖÐÎÄ£¬ÒѾ²»ÊÇÂÒÂëÁË¡£
Ïà¹ØÎĵµ£º
#include <iostream>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <signal.h>
using namespace std;
extern char **environ;
void signal_handle(int signal_no){
cout << "sign:" &l ......
ʲôÊÇÇý¶¯£¿
×îͨË׵ĽâÊ;ÍÊÇ“ÇýʹӲ¼þÉ豸Ðж¯”
×÷Óã¿
É豸Çý¶¯Óëµ×²ãÓ²¼þÖ±½Ó´ò½»µÀ£¬°´ÕÕÓ²¼þÉ豸µÄ¾ßÌ幤×÷·½Ê½¶ÁдÉ豸¼Ä´æÆ÷£¬Íê³ÉÉ豸µÄÂÖѯ¡¢Öжϴ¦Àí¡¢DMAͨÐÅ£¬½øÐÐÎïÀíÄÚ´æÏòÐéÄâÄÚ´æµÄÓ³É䣬×îÖÕʹͨÐÅÉ豸Äܹ»ÊÕ·¢Êý¾Ý£¬Ê¹ÏÔʾÉ豸Äܹ»ÏÔʾÎÄ×ֺͻÃ棬ʹ´æ´¢É豸Äܹ»¼Ç¼ÎļþºÅÊý¾Ý
¼ÆË ......
´¦ÀíÆ÷µÄ·ÖÀ࣬ÈçÏÂͼËùʾ£º
´æ´¢Æ÷¿É·ÖΪֻ¶Á´æ´¢Æ÷£¨ROM£©¡¢ÉÁ´æ£¨Flash£©¡¢Ëæ»ú´æÈ¡´æ´¢Æ÷£¨RAM£©¡¢¹â½éÖÊ´æ´¢Æ÷ºÍ´Å½éÖÊ´æ´¢Æ÷
Nor FlashºÍcpuµÄ½Ó¿ÚÊôÓÚµäÐ͵ÄÀàSRAM½Ó¿Ú£¬²»ÐèÒªÔö¼Ó¶îÍâµÄ¿ØÖƵç·¡£Nor FlashµÄÌصãÊÇ¿ÉоƬÄÚÖ´ÐУ¬³ÌÐò¿ÉÒÔÖ±½ÓÔÚNorÄÚÔËÐС£¶øNand FashºÍcpuµÄ½Ó¿Ú±ØÐëÓÉÏàÓ¦µÄ¿ØÖƵç·½øÐÐת»»£ ......
Ò첽֪ͨ£ºÒ»µ©É豸¾ÍÐ÷£¬ÔòÖ÷¶¯Í¨ÖªÓ¦ÓóÌÐò£¬ÕâÑùÓ¦ÓóÌÐò¸ù±¾²»ÐèÒª²éѯÉ豸״̬£¬ÕâÒ»µã·Ç³£ÀàËÆÓÚÓ²¼þÉϵēÖжϔµÄ¸ÅÄ±È½Ï׼ȷµÄ³ÆνÊÇ“ÐźÅÇý¶¯µÄÒì²½I/O
//Æô¶¯ÐźÅÇý¶¯»úÖÆ
signal(SIGIO, input_handler);//ÈÃinput_handler()´¦ÀíSIGIOÐźÅ
fcntl(fd, F_SETOWN, getpid());//Éè ......