linux 0.11 ÄÚºËѧϰ floppy.c£¬Çý¶¯ÄãµÄÈíÅÌ
/*
* linux/kernel/floppy.c
*
* (C) 1991 Linus Torvalds
*/
/*
* 02.12.91 - Changed to static variables to indicate need for reset
* and recalibrate. This makes some things easier (output_byte reset
* checking etc), and means less interrupt jumping in case of errors,
* so the code is hopefully easier to understand.
*/
/*
* This file is certainly a mess. I've tried my best to get it working,
* but I don't like programming floppies, and I have only one anyway.
* Urgel. I should check for more errors, and do more graceful error
* recovery. Seems there are problems with several drives. I've tried to
* correct them. No promises.
*/
/*
* As with hd.c, all routines within this file can (and will) be called
* by interrupts, so extreme caution is needed. A hardware interrupt
* handler may not sleep, or a kernel panic will happen. Thus I cannot
* call "floppy-on" directly, but have to set a special timer interrupt
* etc.
*
* Also, I'm not certain this works on more than 1 floppy. Bugs may
* abund.
*/
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/fdreg.h> // ÈíÇýÍ·Îļþ£¬ÆäÖаüº¬ÈíÇýµÄ³£Óú¯ÊýµÄ¶¨Òå
#include <asm/system.h>
#include <asm/io.h>
#include <asm/segment.h>
#define MAJOR_NR 2 // ÈíÇýÖ÷É豸ºÅ
#include "blk.h"
/* È«¾Ö±êÖ¾±äÁ¿ */
static int recalibrate = 0; // ÐèÒªÖØÐÂУÕý
static int reset = 0; // ÐèÒªÖØÐÂÖÃλ
static int seek = 0; // ѰµÀ
extern unsigned char current_DOR; // ÔÚÎļþsched.cÖж¨Òå
#define immoutb_p(val,port) \ // ×Ö½ÚvalÖ±½ÓÊä³öµ½port
__asm__("outb %0,%1\n\tjmp 1f\n1:\tjmp 1f\n1:"::"a" ((char) (val)),"i" (port))
#define TYPE(x) ((x)>>2) // ÈíÇýÀàÐÍ£¬2--1.2MB£¬7--1.44MB
#define DRIVE(x) ((x)&0x03) // ÈíÇýÐòÁкÅ0-3¶ÔÓ¦A-D
/*
* Note that MAX_ERRORS=8
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
ÔÚWindowsËÞÖ÷»úÖÐÌí¼Ó¹²ÏíÎļþ¼Ð
1.Ñ¡Ôñ ÐéÄâ»ú ¡µÉèÖÃ
2.Ñ¡Ôñ Ñ¡Ïî
3.µãÑ¡ ¹²ÏíÎļþ¼Ð
4.µã»÷Add°´Å¥ ´ò¿ª¹²ÏíÎļþ¼ÐÏòµ¼ ²¢µãÏÂÒ»²½
5.ÊäÈë¹²ÏíÎļþ¼ÐÃû×ÖºÍλÖà ²¢µãÏÂÒ»²½
Name —— Õâ¸öÃû×Ö½«³öÏÖÔÚÐéÄâ»úÄÚ
Host folder —— ÔÚËÞÖ÷»úÖÐÄãÏë¹²ÏíµÄÎļþ¼Ð· ......
/lib/
— °üº¬Ðí¶à±» /bin/ ºÍ /sbin/ ÖеijÌÐòʹÓõĿâÎļþ¡£Ä¿Â¼ /usr/lib/ Öк¬Óиü¶àÓÃÓÚÓû§³ÌÐòµÄ¿âÎļþ¡£
/libĿ¼Ï·ÅÖõÄÊÇ/binºÍ/sbinĿ¼Ï³ÌÐòËùÐèµÄ¿âÎļþ¡£/libĿ¼ÏµÄÎļþµÄÃû³Æ×ñÑÏÂÃæµÄ¸ñʽ£º
libc.so.*
ld*
½ö½ö±»/usrĿ¼ÏµijÌÐòËùʹÓõĹ²Ïí¿â²»±Ø·Åµ½/libĿ¼Ï¡£Ö»ÓÐ/binºÍ/sbin ......
×î½üÒ»Ö±ÔÚæÏîÄ¿£¬×öµÄ¹ý³ÌÖÐÓöµ½Ò»¸öºÜ¾À½áµÄÊÂÇé¡£ÐèÒªÓÃshell½Å±¾ÂÖѵÊý¾Ý¿â£¬Êý¾ÝÖ´ÐÐÍê±ÏÒÔºó²ÅÄܵ÷ÓÃÆäËûµÄshell½Å±¾¡£ÔÚÕâÀï×ܽáһϣ¬Óë´ó¼Ò¹²Ïí¡£
½Å±¾ÈçÏ£º
shell ½Å±¾ÈçÏ£º
#!/bin/sh
SQL_DIR=/home/tang/tek/sql/tek
SHELL_DIR=/home/tang/tek/sh/tek
LOG_DIR=/home/tang/tek/logs
. /home/tang/.bas ......