linuxµÄplatformÇý¶¯
´ÓLinux 2.6ÆðÒýÈëÁËÒ»Ì×еÄÇý¶¯¹ÜÀíºÍ×¢²á»úÖÆ:Platform_deviceºÍPlatform_driver¡£
LinuxÖд󲿷ֵÄÉ豸Çý¶¯£¬¶¼¿ÉÒÔʹÓÃÕâÌ×»úÖÆ, É豸ÓÃPlatform_device±íʾ£¬Çý¶¯ÓÃPlatform_driver½øÐÐ×¢²á¡£
Linux platform driver»úÖƺʹ«Í³µÄdevice driver »úÖÆ(ͨ¹ýdriver_registerº¯Êý½øÐÐ×¢²á)Ïà±È£¬Ò»¸öÊ®·ÖÃ÷ÏÔµÄÓÅÊÆÔÚÓÚplatform»úÖƽ«É豸±¾ÉíµÄ×ÊÔ´×¢²á½øÄںˣ¬ÓÉÄÚºËͳһ¹ÜÀí£¬ÔÚÇý¶¯³ÌÐòÖÐʹÓÃÕâЩ×ÊԴʱͨ¹ýplatform deviceÌṩµÄ±ê×¼½Ó¿Ú½øÐÐÉêÇ벢ʹÓá£ÕâÑùÌá¸ßÁËÇý¶¯ºÍ×ÊÔ´¹ÜÀíµÄ¶ÀÁ¢ÐÔ£¬²¢ÇÒÓµÓнϺõĿÉÒÆÖ²ÐԺͰ²È«ÐÔ(ÕâЩ±ê×¼½Ó¿ÚÊÇ°²È«µÄ)¡£
Platform»úÖƵı¾ÉíʹÓò¢²»¸´ÔÓ£¬ÓÉÁ½²¿·Ö×é³É£ºplatform_deviceºÍplatfrom_driver¡£
ͨ¹ýPlatform»úÖÆ¿ª·¢·¢µ×²ãÇý¶¯µÄ´óÖÂÁ÷³ÌΪ: ¶¨Òå platform_device à ×¢²á platform_device à ¶¨Òå platform_driver à×¢²á platform_driver¡£
Ê×ÏÈҪȷÈϵľÍÊÇÉ豸µÄ×ÊÔ´ÐÅÏ¢£¬ÀýÈçÉ豸µÄµØÖ·£¬ÖжϺŵȡ£
ÔÚ2.6ÄÚºËÖÐplatformÉ豸ÓýṹÌåplatform_deviceÀ´ÃèÊö£¬¸Ã½á¹¹Ì嶨ÒåÔÚkernel\include\linux\platform_device.hÖУ¬
struct platform_device {
const char * name;
u32 id;
struct device dev;
u32 num_resources;
struct resource * resource;
};
¸Ã½á¹¹Ò»¸öÖØÒªµÄÔªËØÊÇresource£¬¸ÃÔªËØ´æÈëÁË×îΪÖØÒªµÄÉ豸×ÊÔ´ÐÅÏ¢£¬¶¨ÒåÔÚkernel\include\linux\ioport.hÖУ¬
struct resource {
const char *name;
unsigned long start, end;
unsigned long flags;
struct resource *parent, *sibling, *child;
};
ÏÂÃæ¾Ùs3c2410ƽ̨µÄi2cÇý¶¯×÷ΪÀý×ÓÀ´ËµÃ÷£º
/* arch/arm/mach-s3c2410/devs.c */
/* I2C */
static struct resource s3c_i2c_resource[] = {
[0] = {
.start = S3C24XX_PA_IIC,
.end = S3C24XX_PA_IIC + S3C24XX_SZ_IIC - 1,
&
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
ÕªÒª:ÔÚ¿ª·¢Ò»¸öϵͳʱ£¬Ò»°ãÊǽ«Ò»¸öϵͳ·Ö³É¼¸¸öÄ£¿é£¬ÕâÑù×öÌá¸ßÁËϵͳµÄ¿Éά»¤ÐÔ£¬µ«ÓÉÓÚ¸÷¸öÄ£¿é¼ä²»¿É±ÜÃâ´æÔÚ¹ØÁª£¬ËùÒÔµ±Ò»¸öÄ£¿é¸Ä¶¯ºó£¬ÆäËûÄ£ ¿éÒ²Ðí»áÓÐËù¸üУ¬µ±È»¶ÔСϵͳÀ´Ëµ£¬ÊÖ¹¤±àÒëÁ¬½ÓÊÇûÎÊÌ⣬µ«ÊÇÈç¹ûÊÇÒ»¸ö´óϵͳ£¬´æÔںܶà¸öÄ£¿é£¬ÄÇôÊÖ¹¤±àÒëµÄ·½·¨¾Í²»ÊÊÓÃÁË¡£Îª´Ë£¬ÔÚLinuxϵͳÖУ¬×¨ ......
¹¥ÈëLinuxϵͳºó£¬ºÜ¶àÈëÇÖÕßÍùÍù¾Í¿ªÊ¼µÃÒâÍüÐÎÁË¡£ÕâÆäÖл¹ÓÐÒ»¸öÔÒò£¬¾ÍÊǼ¼ÊõÐÔÒ²ÒªÇó¸ü¸ßÁË¡£ÏÂÃ棬ÎÒÃÇÀ´¿´¿´Ò»Ð©³£Óõľµä¹¤¾ß¡£(δ¾ÔÊÐí£¬Ð»¾øתÔØ£¡)
1¡¢´ÓÕâÀïÑÓÉ죺ºóÃźÍÁ¬½Ó¹¤¾ß
£¨1£©Httptunnel
TunnelµÄÒâ˼ÊÇËíµÀ£¬Í¨³£HTTPTunnel±»³Æ֮ΪHTTP°µµÀ£¬ËüµÄÔÀí¾ÍÊǽ«Êý¾Ýαװ³ÉHTTPµÄÊý¾ÝÐÎʽÀ´ ......
LinuxϵͳϵÄÉ豸ºÍÎļþÅäÖÃ
¡¡Ð½¨Ò»¸öÐéÄâ»úºó£¬³ýÁËʹÓÃĬÈÏÖµ£¬Óû§»¹¿ÉÒÔͨ¹ýÅäÖÃÎļþÐ޸IJÎÊý¡£Õâ¸öÅäÖÃÎļþ£¬Êµ¼ÊÉϾÍÏ൱ÓÚеçÄԵēӲ¼þÅäÖÔ£¬Óû§¿ÉÒÔÔÚÅäÖÃÎļþÖоö¶¨ÐéÄâ»úµÄÓ²ÅÌ¡¢ÄÚ´æ¶à´ó£¬ÊÇ·ñÓв¢¿Ú´®¿Ú¡¢ÊÇ·ñÓÐÍøÂçµÈ¡£µ¥»÷“ÐéÄâ»ú”²Ëµ¥ÏµēÉèÖÔ°´Å¥£¬¾Í¿ ......
ÔÚmenuconfigÖÐÅäÖ㬿ÉÒÔ¶Ô½øÐÐLinuxÄÚºËÅäÖÃÑ¡Ïɾ¸Ä¡£±¾ÎĽéÉÜÏêϸÅäÖ÷½·¨¡£
µÚÒ»²¿·Ö£ºÈ«²¿É¾³ý
Code maturity level options ---> ´úÂë³ÉÊìµÈ¼¶Ñ¡Ïî
[]Prompt for development and/or incomplete code/drivers ĬÈÏÇé¿öÏÂÊÇÑ¡ÔñµÄ£¬Õ⽫»áÔÚÉèÖýçÃæÖÐÏÔʾ»¹ÔÚ¿ª·¢»òÕß»¹Ã»ÓÐÍê³ÉµÄ´úÂëÓëÇý¶¯.²»Ñ¡¡£
µÚ¶þ²¿ ......