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

linux×Ö·ûÉ豸Çý¶¯Ñ§Ï°

 ½ñÌìѧϰÁËÔÚlinux2.6ƽ̨Ï嵀 char drvier £¬ÔÚlinuxÏÂÍƼöʹÓõÄÊÇcdev½á¹¹ÌåÀ´ÊµÏÖ¶ÔcharacterÉ豸µÄÃèÊö£¬´úÂëÈçÏÂ
/*This module is desired for sunplusapp s3c2440_board */
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/cdev.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/errno.h>
#include <mach/regs-gpio.h>
#include <mach/hardware.h>
#include <linux/platform_device.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/system.h>
#define DEVICE_NAME "LED_S3C2440"
struct LED_dev{
 struct cdev cdev;
 char name[10];
 /*...*/
}*LED_devp;
static dev_t LED_device_num;
static struct class *LED_class;
//struct class *LED_class;
static unsigned long LED_table[]={
 S3C2410_GPG0,
 S3C2410_GPG1,
 S3C2410_GPG2,
};
static unsigned int LED_cfg_table[]={
 S3C2410_GPG0_OUTP,
 S3C2410_GPG1_OUTP,
 S3C2410_GPG2_OUTP,
};
int LED_open(struct inode *inode, struct file *filp)
{
  /*½«É豸½á¹¹ÌåÖ¸Õ븳ֵ¸øÎļþ˽ÓÐÊý¾ÝÖ¸Õë*/
  filp->private_data = LED_devp;
  printk("Open OK\n");
  return 0;
}
/*ÎļþÊͷź¯Êý*/
int LED_release(struct inode *inode, struct file *filp)
{
 printk("Release OK\n");
  return 0;
}
static ssize_t LED_write(struct file *filp,const char __user *buf,size_t size,loff_t *f_pos)
{
  unsigned char buff = 0;
  int ret;
  int i;
  /*Óû§¿Õ¼ä->Äں˿ռä*/
  if (copy_from_user(&buff, buf, size))
    ret =  - EFAULT;
   
 printk("write:buff=0x%x,buff=0x%x,count=%d\n", buff, buf, size);
 buff-=0x30;
 for(i=0;i<3;i++)
 {
  if(i==buff)
   s3c2410_gpio_setpin(LED_table[i],1);
  else
   s3c2410_gpio_


Ïà¹ØÎĵµ£º

ʵս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Çý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

linux ifÓï¾äÄÚÅжϲÎÊý

shell ±à³ÌÖÐʹÓõ½µÃifÓï¾äÄÚÅжϲÎÊý
–b µ±file´æÔÚ²¢ÇÒÊÇ¿éÎļþʱ·µ»ØÕæ
-c µ±file´æÔÚ²¢ÇÒÊÇ×Ö·ûÎļþʱ·µ»ØÕæ
-d µ±pathname´æÔÚ²¢ÇÒÊÇÒ»¸öĿ¼ʱ·µ»ØÕæ
-e µ±pathnameÖ¸¶¨µÄÎļþ»òĿ¼´æÔÚʱ·µ»ØÕæ
-f µ±file´æÔÚ²¢ÇÒÊÇÕý¹æÎļþʱ·µ»ØÕæ
-g µ±ÓÉpathnameÖ¸¶¨µÄÎļþ»òĿ¼´æÔÚ²¢ÇÒÉèÖÃÁËSGIDλʱ·µ»ØÎ ......

linuxÏÂtopÃüÁî²ÎÊý½âÊÍ

 topÃüÁîÊÇLinuxϳ£ÓõÄÐÔÄÜ·ÖÎö¹¤¾ß£¬Äܹ»ÊµÊ±ÏÔʾϵͳÖи÷¸ö½ø³ÌµÄ×ÊÔ´Õ¼ÓÃ×´¿ö£¬ÀàËÆÓÚWindowsµÄÈÎÎñ¹ÜÀíÆ÷¡£ÏÂÃæÏêϸ½éÉÜËüµÄʹÓ÷½·¨¡£
top - 01:06:48 up 1:22, 1 user, load average: 0.06, 0.60, 0.48
Tasks: 29 total,   1 running, 28 sleeping,   0 stopped,   0 zombie ......

Linux ¼à¿Ø/SNMPÅäÖÃ

http://www.zhetao.com/content.dep?m=news&id=1235137892661247
 ·¢²¼ÈÕÆÚ 2009-2-20 21:51:32
Linux
ϵͳµÄ
SNMP
·þÎñÉèÖÃ
1)
°²×°
SNMP
ÂÔ£¬Çë²ÎÔÄ
LINUX
ϵͳ
SNMP
°²×°ËµÃ÷£¬Ò»°ãÇé¿öÏÂ
Linux
ÖеľùÒѾ­×Ô¶¯°²×°ÁË
SNMP
·þÎñ¡£ÒÔÏÂÃüÁî¿ÉÒÔ¼ì²â
SNMP
·þÎñÊÇ·ñ°²×°ÒÔ¼°°²×°µÄÎļþ°ü¡£
[ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ