ARMǶÈëʽLINUXÉ豸Çý¶¯Éè¼ÆÈëÃÅѧϰ
¾¹ýÒ»¶Îʱ¼äµÄѧϰ֮ºó£¬Ò²¿ª·¢ÁËһЩСÐ͵ÄÇý¶¯£¬ÕýÈçÎÒ֮ǰһƪÖÐдµ½µÃ£¬ÏÖÔÚÎÒ¾ÍÀ´Ð´Ò»ÏÂÔÚARMǶÈëʽLINUXÏÂÈçºÎÉè¼ÆÇý¶¯µÄ¿ò¼Ü¡£
ÔÚÕâÀïÎÒÓõİå×ÓÊÇmicro2440°å×Ó£¬°å×ÓÉϵÄlinux°æ±¾ÊÇ2.6.13¡£ÒòΪÎÒÔÚǰһƪ½éÉÜÁËÇý¶¯±à³ÌµÄÁ½ÖÖ¿ò¼ÜÉè¼Æ£¬ËùÒÔÏÖÔÚÎÒ¾ÍÀ´·Ö±ðдһÏÂÕâÁ½ÖÖ¿ò¼ÜÉè¼ÆµÄ³ÌÐò¡£
¿ª·¢Æ½Ì¨£ºRED HAT LINUX 9£¨Linux 2.4.18£©
¿ª·¢°å£ºmicro2440£¨ÓÑÉÆÖ®±Û£©£¨Linux 2.6.13)
½»²æ±àÒ빤¾ß£ºarm-linux-gcc-3.4.1
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
2.4ÄÚºËÇý¶¯¿ò¼Ü£º
static int __init leds_init(void)
{
int result;
int i;
result = register_chrdev(LED_MAJOR, DEVICE_NAME, &leds_fops);
if(result < 0){
printk(DEVICE_NAME "can't register major number\n");
return result;
}
// static devfs_handle_t devfs_handle;
// devfs_handle = devfs_register(NULL, DEVICE_NAME, DEVFS_FL_DEFAULT, LED_MAJOR, &leds_fops, NULL);
/*
*Ö®ËùÒÔ²»ÓÃdevfs_register£¬¶øÓÃdevfs_mk_cdev£¬ÔÒòÊÇÒòΪÔÚlinux2.6ÄÚºËÀïûÓÐdevfs_registerº¯Êý£¬¶ø¸ÄÓÃ*devfs_mk_cdev
*/
devfs_mk_cdev(MKDEV(LED_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, DEVICE_NAME);
for(i = 0; i < 4; i++){
s3c2410_gpio_cfgpin(led_table[i], led_cfg_table[i]);
s3c2410_gpio_setpin(led_table[i], 1);
}
printk(DEVICE_NAME "initialized\n");
return 0;
}
static void __exit leds_exit(void)
{
devfs_remove(DEVICE_NAME);
unregister_chrdev(LED_MAJOR, DEVICE_NAME);
}
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
2.6ÄÚºËÇý¶¯¿ò¼Ü£º
static int __init leds_init(void)
{
int result;
int i;
&nbs
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
ÀýÒ»£º·¢ËÍ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 IPÉèÖÃ
ÐÞ¸Äip£º
±à¼Îļþ/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 //É豸Ãû³Æ£¬²»ÒªÐÞ¸Ä
BOOTPROTO=static //²»ÒªÐÞ¸Ä
BROADCAST=10.10.22.255 //¹ã²¥µØÖ·£¬Ò»°ãΪ±¾Íø¶ÎµÄ×îºóÒ»¸öIP
IPADDR=10.10.22.145 //ipµØÖ·
NETMASK=255.255.255.0 //×ÓÍøÑÚÂë
NETWORK=10.10.22.0 //Íø¶ÎµØÖ·
ONBOOT ......
1. »ù±¾¸ÅÄî
˵µ½ÍøÂç±à³Ì,²»µÃ²»ÏÈÌáµ½OSI²Î¿¼Ä£ÐÍ,ÆäÆß²ãÄ£ÐÍ´Óϵ½ÉÏ·Ö±ðΪ
1.ÎïÀí²ã(Physical Layer,PH)
2.Êý¾ÝÁ´Â·²ã(Data Link Layer,DL)
3.ÍøÂç²ã(Network Layer,N)
4.ÔËÊä²ã(Transport Layer,T)
5.»á»°²ã(Session Layer,S)
6.±íʾ²ã(Presentation Layer, ......
תÔØÍƼö ---- LinuxÈëÃÅ11µã½¨Òé
Ëæ×Å
Linux
Ó¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥
Linux
£¬¸ù¾Ýѧϰ
Windwos
µÄ¾ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÕâÀï½éÉÜѧϰ
Linux
µÄһЩ½¨Òé¡£
Ò»¡¢´Ó»ù´¡¿ªÊ¼£º
³£³£ÓÐЩÅóÓÑÔÚ
Linux
ÂÛ̳ÎÊһЩÎÊÌ⣬²»¹ý£¬ÆäÖдó¶àÊýµÄÎÊÌⶼÊǺܻù´ ......