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

linuxÇý¶¯³ÌÐòʵÀý

±¾ÀýÊÇ·ë¹ú½øµÄ ¡¶Ç¶ÈëʽLinux Çý¶¯³ÌÐòÉè¼Æ´ÓÈëÃŵ½¾«Í¨¡·µÄµÚÒ»¸öÀý×Ó
¸Ð¾õÕæÊǺÃÊé   Ç¿ÁÒÍÆ¼ö
×¢ÊÍÊÇdeep_pro¼ÓµÄ ×ªÔØÇë×¢Ã÷£¡ÎÒµÄÌØµãÊÇÎIJ»¼Óµã£¡
Õâ¸öÇý¶¯ÊÇÔÚÄÚ´æÖзÖÅäÒ»¸ö256×ֽڵĿռ䣬¹©Óû§Ì¬Ó¦ÓóÌÐò¶Áд¡£
ÏÈÊÇÍ·Îļþ demo.h
#ifndef _DEMO_H_
#define _DEMO_H_
#include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */
/********************************************************
* Macros to help debugging
********************************************************/
#undef PDEBUG             /* undef it, just in case */
#ifdef DEMO_DEBUG
#ifdef __KERNEL__
#    define PDEBUG(fmt, args...) printk( KERN_DEBUG "DEMO: " fmt, ## args)
#else//usr space
#    define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args)
#endif
#else
# define PDEBUG(fmt, args...) /* not debugging: nothing */
#endif
#undef PDEBUGG
#define PDEBUGG(fmt, args...) /* nothing: it's a placeholder */
//É豸ºÅ
#define DEMO_MAJOR 224
#define DEMO_MINOR 0
#define COMMAND1 1
#define COMMAND2 2
//×Ô¼º¶¨ÒåµÄÉ豸½á¹¹
struct DEMO_dev
{
    struct cdev cdev;    /* Char device structure        */
};
//º¯ÊýÉêÃ÷ Ô­À´LinuxÇý¶¯³ÌÐòÉè¼ÆÕâô¼òµ¥ Ö»ÐèҪʵÏÖÕâô¼¸¸öº¯Êý¾Í¿ÉÒÔÁË
ssize_t DEMO_read(struct file *filp, char __user *buf, size_t count,
                   loff_t *f_pos);
ssize_t DEMO_write(struct file *filp, const char __user *buf, size_t count,
                    loff_t *f_pos);
loff_t DEMO_llseek(struct file *filp, loff_t off, int whence);
int     DEMO_ioctl(struct inode *inode, struct file *filp,
                &nbs


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â(¶þ)

;           break; 
         } 
  
         if (type != EV_SYN) 
            &nbs ......

Linux Input Device ½é紹: APIs


Linux Input Device ½é紹: APIs
jollen 發±íì¶ April 8, 2009 12:18 PM
Linux µÄ Input Device ÊÇÖØÒªµÄÒ»個 subsystem£¬ÔÚ進ÐÐ實Àý½é紹ǰ£¬ÏÈ´óÂÔÁ˽âÒ»ÏÂÏà關µÄ API¡£
Linux Input Device
input.cÊÇLinuxµÄ”input”驅動³Ìʽ£¬Ö÷ÒªÖ ......

linuxÏÂÓëÆäËûÖÕ¶ËͨѶ write³ö´í

ÏÈÓÃwhoÃüÁî²é¿´ËùÓеǽÖÕ¶Ë
#who -uH
Êä³öÈçÏ£º
NAME     LINE         TIME             IDLE          PID COMMENT
root     :0           2010-03-01 19:13   ?     & ......

Linux»·¾³ÏÂUSBµÄÔ­Àí¡¢Çý¶¯ºÍÅäÖÃ

ʲôÊÇUSB£¿
USBÊÇÓ¢ÎÄUniversal Serial BusµÄËõд£¬ÒâΪͨÓô®ÐÐ×ÜÏß¡£USB×î³õÊÇΪÁËÌæ´úÐí¶à²»Í¬µÄµÍËÙ×ÜÏߣ¨°üÀ¨²¢ÐС¢´®ÐкͼüÅÌÁ¬½Ó£©¶øÉè¼ÆµÄ£¬ËüÒÔµ¥Ò»ÀàÐ͵Ä×ÜÏßÁ¬½Ó¸÷ÖÖ²»Í¬µÄÀàÐ͵ÄÉ豸¡£USBµÄ·¢Õ¹ÒѾ­³¬Ô½ÁËÕâЩµÍËÙµÄÁ¬½Ó·½Ê½£¬ËüÏÖÔÚ¿ÉÒÔÖ§³Ö¼¸ºõËùÓпÉÒÔÁ¬½Óµ½PCÉϵÄÉ豸¡£×îеÄUSB¹æ·¶ÐÞ¶©ÁËÀíÂÛÉϸߴï480 ......

Linux use notes

-----------------------------
Based on Fedora 8 version:
-----------------------------
1. No common command like ifconfig in os?
Root cause is the standard search path not include /sbin and /usr/sbin. Try to include them in /etc/profile. As belows:
 #Kenny add /sbin and /usr/sbin here.
&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ