linuxϵÄGPIOÇý¶¯
±àдÇý¶¯³ÌÐò£¬Ê×ÏÈÒªÁ˽âÊÇʲôÀàÐ͵ÄÉ豸¡£linuxϵÄÉ豸·ÖΪÈýÀ࣬·Ö±ðΪ£º×Ö·ûÉ豸£¬¿éÉ豸ºÍÍøÂçÉ豸¡£×Ö·ûÉ豸ÀàÐÍÊǸù¾ÝÊÇ·ñÒÔ×Ö·ûÁ÷ΪÊý¾ÝµÄ½»»»·½Ê½£¬´ó²¿·ÖÉ豸¶¼ÊÇ×Ö·ûÉ豸£¬Èç¼üÅÌ£¬´®¿ÚµÈ£¬¿éÉ豸ÔòÊÇÒÔ¿éΪµ¥Î»½øÐйÜÀíµÄÉ豸£¬È磬´ÅÅÌ¡£ÍøÂçÉ豸¾ÍÊÇÍø¿¨µÈ¡£
Æä´ÎÒªÁ˽âÓ¦ÓóÌÐòºÍÇý¶¯³ÌÐòµÄÇø±ð£¬Á½ÕßµÄÖ÷ÒªÇø±ð·ÖΪÒÔÏÂÈýµã£º
1Èë¿Úº¯ÊýµÄÈÎÎñ²»Ïàͬ£¬Ó¦ÓóÌÐòÍê³ÉÒ»¸öÈÎÎñ£¬Çý¶¯Ö»Íê³É³õʼ»¯¹¤×÷£¬±ÈÈçÖжÏ
ÉêÇ룬¼Ä´æÆ÷ÉèÖ㬶¨Ê±Æ÷ÉèÖá£
2ÔËÐÐʱµÄcpuģʽ²»Ïàͬ£¬Çý¶¯¾ßÓкܸߵÄȨÏÞ£¬Ó¦ÓóÌÐòÊÇÔÚÓû§Ì¬ÏÂÔËÐУ¬¶øÇý
¶¯³ÌÐòÊÇÔÚÄÚºË̬ÏÂÖ´ÐС£
3 Çý¶¯³ÌÐò²»Äܵ÷ÓÃC¿âº¯Êý£¬ÄÚºËΪÇý¶¯³ÌÐòÌṩһЩº¯Êý¡£Èçprintk(KERN_NOTICE fmt, ##arg)£¬µÚÒ»¸ö²ÎÊýΪ´òÓ¡¼¶±ð£¬ÓÐÈçϵĴòÓ¡¼¶±ð£º
KERN_EMERG ÓÃÓÚ½ô¼±Ê¼þ,Ò»°ãÊÇϵͳ±ÀÀ£Ç°µÄÌáʾÐÅÏ¢
KERN_ALERT ÓÃÓÚÐèÒªÁ¢¼´²ÉÈ¡¶¯×÷µÄ³¡ºÏ
KERN_CRIT ÁÙ½ç״̬,ͨ³£Éè¼ÆÑéÖ¤µÄÓ²¼þ»òÈí¼þ²Ù×÷ʧ°Ü
KERN_ERR ÓÃÓÚ±¨¸æ´íÎó״̬.É豸Çý¶¯³ÌÐòͨ³£»áÓÃËü±¨¸æÀ´×ÔÓ²¼þµÄÎÊÌâ
KERN_WARNING ¾Í¿ÉÄܳöÏÖµÄÎÊÌâÌá³ö¾¯¸æ.ÕâЩÎÊÌâͨ³£²»»á¶ÔϵͳÔì³ÉÑÏÖØÆÆ»µ
KERN_NOTICE ÓбØÒªÌáʾµÄÕý³£Çé¿ö.Ðí¶à°²È«Ïà¹ØµÄÇé¿öÓÃÕâ¸ö¼¶±ð»ã±¨
KERN_INFO ÌáʾÐÔÐÅÏ¢.ÓкܶàÇý¶¯³ÌÐòÔÚÆô¶¯Ê±ÓÃÕâ¸ö¼¶±ð´òÓ¡Ïà¹ØÐÅÏ¢
KERN_DEBUG ÓÃÓÚµ÷ÊÔµÄÐÅÏ¢
u_long copy_from_user(void *to, const void *from, u_long len)£¬ÓÉÓû§Ì¬¿½±´µ½ÄÚºË̬£»
u_long copy_to_user(void * to, const void *from, u_long len)£¬ÓÉÄÚºË̬¿½±´µ½Óû§Ì¬¡£
¼øÓÚÒÔÉÏÇø±ð£¬Çý¶¯³ÌÐòÐèÒªÍê³ÉÒÔÏÂÈýµã»ù±¾¹¦ÄÜ£º
1£ºÒª¶ÔÉ豸½øÐгõʼ»¯ºÍÊͷŹ¦ÄÜÄ£¿é£¬¾ÍÈçÉÏÃæµÄ¼Ä´æÆ÷ÉèÖã¬ÖжϵÄÉêÇ룬ÏòÄÚºË×¢
²áÇý¶¯³ÌÐò£¨register_chrdev£¨£©£©£¬Ð¶ÔØÇý¶¯³ÌÐò£¨unregister_chrdev£¨£©£©¡£
2£ºÄܽøÐÐÊý¾Ý´«Ê䣬ÔÚread()£¬write()º¯ÊýÀï¾ßÌåʵÏÖ£¬Êý¾Ý´«Ê乤×÷¡£
3£ºÄܽøÐпØÖƲÙ×÷£¬¸øÓû§ÌṩµÄioctl£¨£©º¯ÊýÀï¿ÉʵÏÖһЩÓû§µÄÑ¡ÔñÐÔÉèÖù¦ÄÜ¡£
È·¶¨Ò»¸öÉ豸µÄÖ´Ðк¯Êý¼¯£¨½á¹¹Ì壩
static struct file_operations myGPIO_fops = {
owner: THIS_MODULE,
write: myGPIO_write,
read: myGPIO_read,
ioctl: myGPIO_ioctl,
open:
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
RedHat£¨CentOS5.3£©Æ½Ì¨ÏÂLAMP´î½¨Linux+Apache+Mysql+PHP
Ò»¡¢°²×°»·¾³£º
ϵͳƽ̨£ºCentOS5.3,ÄÚºË2.6.18-128.el5£¬ÎÄ×Ö½çÃ棨δ°²×°Í¼ÐνçÃ棩
¶þ¡¢Èí¼þÐèÇó¼°ÏµصØÖ·£º
httpd-2.2.13.tar.gz
MySQL-client-community-5.1.40-0.rhel5.i386.rpm MySQL-server-community-5.1.40-0.rhel5.i386.rpm   ......
ÅäÖãº
ͨ¹ýÎļþÃû²éÕÒ·¨£º
Õâ¸ö·½·¨ËµÆðÀ´¾ÍºÍÔÚWINDOWSϲéÕÒÎļþÒ»ÑùÈÝÒ×Àí½âÁË¡£Èç¹ûÄã°ÑÕâ¸öÎļþ·ÅÔÚµ¥¸öµÄÎļþ¼Ð
ÀïÃ棬ֻҪʹÓó£¼ûµÄ“ls"ÃüÁî¾ÍÄÜ·½±ãµÄ²éÕÒ³öÀ´£¬ÄÇôʹÓÓfind”ÃüÁîÀ´²éÕÒËü¾Í²»Äܸø
ÄãÁôÏÂÉî¿ÌµÄÓ¡Ï󣬱Ͼ¹“find”ÃüÁîµÄÇ¿´ó¹¦Äܲ»Ö¹Õâ¸ö¡£Èç¹ûÖªµÀÁËij¸ö ......
£¨Ò»£© ÍøÂçÖб鲼×Å´óÁ¿µÄLinuxÏà¹ØÕ¾µã£»
£¨¶þ£© Óû§ÎÞÐëÏêϸÁ˽âÿһ¸ö´ËÀàÕ¾µã£¬Êµ¼ÊÉÏ£¬Ò»°Ù¸öÕ¾µã×ã¹»ÄãʹÓÃÁË¡£
ÆÀÑ¡³öµÄÕâ100¸öÓÅÐãÕ¾µã£¬½«°´ÕÕÏÂÊö20¸öÀà±ð×÷ÒÔÆÀ½é£º
£¨Ò»£© ÎļþÏÂÔØ
£¨¶þ£© ÓÄĬÓéÀÖ
£¨Èý£© Ïà¹ØÐÂÎÅ
£¨ËÄ£© ͨÓÃÓ²¼þ
£¨Î壩 רÓÃÓ²¼þ
£¨Áù£© ÐÂÊÖÕ¾µã
£¨Æߣ© ͼÐÎ/¶àÃ½Ì ......
¸ÅÊö
——
ʲôÊÇmakefile£¿»òÐíºÜ¶àWinodwsµÄ³ÌÐòÔ±¶¼²»ÖªµÀÕâ¸ö¶«Î÷£¬ÒòΪÄÇЩWindowsµÄIDE¶¼ÎªÄã×öÁËÕâ¸ö¹¤×÷£¬µ«ÎÒ¾õµÃÒª×÷Ò»¸öºÃµÄºÍprofessionalµÄ³ÌÐòÔ±£¬makefile»¹ÊÇÒª¶®¡£Õâ¾ÍºÃÏñÏÖÔÚÓÐÕâô¶àµÄHTMLµÄ±à¼Æ÷£¬µ«Èç¹ûÄãÏë³ÉΪһ¸öרҵÈËÊ¿£¬Ä㻹ÊÇÒªÁ˽âHTMLµÄ±êʶµÄº¬Òå¡£ÌرðÔÚUnixϵÄÈí¼ ......