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

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:


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

¹ØÓÚEeePcµÄLinuxÏ°²×°GCC±àÒëÆ÷

     ×î½üÓÉÓÚÐèÒª£¬°Ñ¼¸ÄêÇ°£¨Óеã¿äÕÅ£©µÄEeePc 1000ÄóöÀ´£¬ÏëÔÚËü×Ô´øµÄLinuxϵͳϽøÐбà³Ì¡£Ë­ÖªµÀ¾ÓȻûÓÐGCC±àÒëÆ÷£¬ËùÒÔÔ´Âë°²×°¿Ï¶¨ÊDz»ÐеÄÀ²¡£
    ºóÀ´ÔÚÖնˣ¨ctrl+alt+t£©ÀïÊäÈ룺sudo apt-get install gcc
    ·¢ÏÖÖ§³Öapt-get°²×°Èí¼þ£¬Ö»²»¹ýûÕÒµ½ ......

s3c2440»ùÓÚlinuxµÄgpio led×Ö·ûÉ豸Çý¶¯Êµ¼ù

 ½ñÌìÍê³ÉÁËǶÈëʽlinuxµÄµÚÒ»¸öÇý¶¯µÄ±àдºÍ²âÊÔ£¬ËäÈ»ÊǸö¼òµ¥µÄ³ÌÐò£¬µ«ÊÇÂéȸËäС£¬ÎåÔà¾ãÈ«£¬Ï£Íû¿ÉÒÔ¸ø¸Õ¿ªÊ¼½Ó´¥Çý¶¯±àдµÄÈËһЩÌáʾ£¬¹²Í¬½ø²½¡£
Ô´´úÂ룺
·ÖÎöÈçÏ£º
      ÏÂÃæÊÇÎÒµÄÇý¶¯³ÌÐò£º
#include <linux/config.h>//ÅäÖÃÍ·Îļþ
#include <linux/kernel.h&g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ