亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? short.c

?? usb的驅動程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
	wake_up_interruptible(&short_queue); /* awake any reading process */	return IRQ_HANDLED;}/* * The following two functions are equivalent to the previous one, * but split in top and bottom half. First, a few needed variables */#define NR_TIMEVAL 512 /* length of the array of time values */struct timeval tv_data[NR_TIMEVAL]; /* too lazy to allocate it */volatile struct timeval *tv_head=tv_data;volatile struct timeval *tv_tail=tv_data;static struct work_struct short_wq;int short_wq_count = 0;/* * Increment a circular buffer pointer in a way that nobody sees * an intermediate value. */static inline void short_incr_tv(volatile struct timeval **tvp){	if (*tvp == (tv_data + NR_TIMEVAL - 1))		*tvp = tv_data;	 /* Wrap */	else		(*tvp)++;}void short_do_tasklet (unsigned long unused){	int savecount = short_wq_count, written;	short_wq_count = 0; /* we have already been removed from the queue */	/*	 * The bottom half reads the tv array, filled by the top half,	 * and prints it to the circular text buffer, which is then consumed	 * by reading processes	 */	/* First write the number of interrupts that occurred before this bh */	written = sprintf((char *)short_head,"bh after %6i\n",savecount);	short_incr_bp(&short_head, written);	/*	 * Then, write the time values. Write exactly 16 bytes at a time,	 * so it aligns with PAGE_SIZE	 */	do {		written = sprintf((char *)short_head,"%08u.%06u\n",				(int)(tv_tail->tv_sec % 100000000),				(int)(tv_tail->tv_usec));		short_incr_bp(&short_head, written);		short_incr_tv(&tv_tail);	} while (tv_tail != tv_head);	wake_up_interruptible(&short_queue); /* awake any reading process */}irqreturn_t short_wq_interrupt(int irq, void *dev_id, struct pt_regs *regs){	/* Grab the current time information. */	do_gettimeofday((struct timeval *) tv_head);	short_incr_tv(&tv_head);	/* Queue the bh. Don't worry about multiple enqueueing */	schedule_work(&short_wq);	short_wq_count++; /* record that an interrupt arrived */	return IRQ_HANDLED;}/* * Tasklet top half */irqreturn_t short_tl_interrupt(int irq, void *dev_id, struct pt_regs *regs){	do_gettimeofday((struct timeval *) tv_head); /* cast to stop 'volatile' warning */	short_incr_tv(&tv_head);	tasklet_schedule(&short_tasklet);	short_wq_count++; /* record that an interrupt arrived */	return IRQ_HANDLED;}irqreturn_t short_sh_interrupt(int irq, void *dev_id, struct pt_regs *regs){	int value, written;	struct timeval tv;	/* If it wasn't short, return immediately */	value = inb(short_base);	if (!(value & 0x80))		return IRQ_NONE;		/* clear the interrupting bit */	outb(value & 0x7F, short_base);	/* the rest is unchanged */	do_gettimeofday(&tv);	written = sprintf((char *)short_head,"%08u.%06u\n",			(int)(tv.tv_sec % 100000000), (int)(tv.tv_usec));	short_incr_bp(&short_head, written);	wake_up_interruptible(&short_queue); /* awake any reading process */	return IRQ_HANDLED;}void short_kernelprobe(void){	int count = 0;	do {		unsigned long mask;		mask = probe_irq_on();		outb_p(0x10,short_base+2); /* enable reporting */		outb_p(0x00,short_base);   /* clear the bit */		outb_p(0xFF,short_base);   /* set the bit: interrupt! */		outb_p(0x00,short_base+2); /* disable reporting */		udelay(5);  /* give it some time */		short_irq = probe_irq_off(mask);		if (short_irq == 0) { /* none of them? */			printk(KERN_INFO "short: no irq reported by probe\n");			short_irq = -1;		}		/*		 * if more than one line has been activated, the result is		 * negative. We should service the interrupt (no need for lpt port)		 * and loop over again. Loop at most five times, then give up		 */	} while (short_irq < 0 && count++ < 5);	if (short_irq < 0)		printk("short: probe failed %i times, giving up\n", count);}irqreturn_t short_probing(int irq, void *dev_id, struct pt_regs *regs){	if (short_irq == 0) short_irq = irq;	/* found */	if (short_irq != irq) short_irq = -irq; /* ambiguous */	return IRQ_HANDLED;}void short_selfprobe(void){	int trials[] = {3, 5, 7, 9, 0};	int tried[]  = {0, 0, 0, 0, 0};	int i, count = 0;	/*	 * install the probing handler for all possible lines. Remember	 * the result (0 for success, or -EBUSY) in order to only free	 * what has been acquired      */	for (i = 0; trials[i]; i++)		tried[i] = request_irq(trials[i], short_probing,				SA_INTERRUPT, "short probe", NULL);	do {		short_irq = 0; /* none got, yet */		outb_p(0x10,short_base+2); /* enable */		outb_p(0x00,short_base);		outb_p(0xFF,short_base); /* toggle the bit */		outb_p(0x00,short_base+2); /* disable */		udelay(5);  /* give it some time */		/* the value has been set by the handler */		if (short_irq == 0) { /* none of them? */			printk(KERN_INFO "short: no irq reported by probe\n");		}		/*		 * If more than one line has been activated, the result is		 * negative. We should service the interrupt (but the lpt port		 * doesn't need it) and loop over again. Do it at most 5 times		 */	} while (short_irq <=0 && count++ < 5);	/* end of loop, uninstall the handler */	for (i = 0; trials[i]; i++)		if (tried[i] == 0)			free_irq(trials[i], NULL);	if (short_irq < 0)		printk("short: probe failed %i times, giving up\n", count);}/* Finally, init and cleanup */int short_init(void){	int result;	/*	 * first, sort out the base/short_base ambiguity: we'd better	 * use short_base in the code, for clarity, but allow setting	 * just "base" at load time. Same for "irq".	 */	short_base = base;	short_irq = irq;	/* Get our needed resources. */	if (!use_mem) {		if (! request_region(short_base, SHORT_NR_PORTS, "short")) {			printk(KERN_INFO "short: can't get I/O port address 0x%lx\n",					short_base);			return -ENODEV;		}	} else {		if (! request_mem_region(short_base, SHORT_NR_PORTS, "short")) {			printk(KERN_INFO "short: can't get I/O mem address 0x%lx\n",					short_base);			return -ENODEV;		}		/* also, ioremap it */		short_base = (unsigned long) ioremap(short_base, SHORT_NR_PORTS);		/* Hmm... we should check the return value */	}	/* Here we register our device - should not fail thereafter */	result = register_chrdev(major, "short", &short_fops);	if (result < 0) {		printk(KERN_INFO "short: can't get major number\n");		release_region(short_base,SHORT_NR_PORTS);  /* FIXME - use-mem case? */		return result;	}	if (major == 0) major = result; /* dynamic */	short_buffer = __get_free_pages(GFP_KERNEL,0); /* never fails */  /* FIXME */	short_head = short_tail = short_buffer;	/*	 * Fill the workqueue structure, used for the bottom half handler.	 * The cast is there to prevent warnings about the type of the	 * (unused) argument.	 */	/* this line is in short_init() */	INIT_WORK(&short_wq, (void (*)(void *)) short_do_tasklet, NULL);	/*	 * Now we deal with the interrupt: either kernel-based	 * autodetection, DIY detection or default number	 */	if (short_irq < 0 && probe == 1)		short_kernelprobe();	if (short_irq < 0 && probe == 2)		short_selfprobe();	if (short_irq < 0) /* not yet specified: force the default on */		switch(short_base) {		    case 0x378: short_irq = 7; break;		    case 0x278: short_irq = 2; break;		    case 0x3bc: short_irq = 5; break;		}	/*	 * If shared has been specified, installed the shared handler	 * instead of the normal one. Do it first, before a -EBUSY will	 * force short_irq to -1.	 */	if (short_irq >= 0 && share > 0) {		result = request_irq(short_irq, short_sh_interrupt,				SA_SHIRQ | SA_INTERRUPT,"short",				short_sh_interrupt);		if (result) {			printk(KERN_INFO "short: can't get assigned irq %i\n", short_irq);			short_irq = -1;		}		else { /* actually enable it -- assume this *is* a parallel port */			outb(0x10, short_base+2);		}		return 0; /* the rest of the function only installs handlers */	}	if (short_irq >= 0) {		result = request_irq(short_irq, short_interrupt,				SA_INTERRUPT, "short", NULL);		if (result) {			printk(KERN_INFO "short: can't get assigned irq %i\n",					short_irq);			short_irq = -1;		}		else { /* actually enable it -- assume this *is* a parallel port */			outb(0x10,short_base+2);		}	}	/*	 * Ok, now change the interrupt handler if using top/bottom halves	 * has been requested	 */	if (short_irq >= 0 && (wq + tasklet) > 0) {		free_irq(short_irq,NULL);		result = request_irq(short_irq,				tasklet ? short_tl_interrupt :				short_wq_interrupt,				SA_INTERRUPT,"short-bh", NULL);		if (result) {			printk(KERN_INFO "short-bh: can't get assigned irq %i\n",					short_irq);			short_irq = -1;		}	}	return 0;}void short_cleanup(void){	if (short_irq >= 0) {		outb(0x0, short_base + 2);   /* disable the interrupt */		if (!share) free_irq(short_irq, NULL);		else free_irq(short_irq, short_sh_interrupt);	}	/* Make sure we don't leave work queue/tasklet functions running */	if (tasklet)		tasklet_disable(&short_tasklet);	else		flush_scheduled_work();	unregister_chrdev(major, "short");	if (use_mem) {		iounmap((void __iomem *)short_base);		release_mem_region(short_base, SHORT_NR_PORTS);	} else {		release_region(short_base,SHORT_NR_PORTS);	}	if (short_buffer) free_page(short_buffer);}module_init(short_init);module_exit(short_cleanup);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人v欧美综合天堂下载 | 婷婷丁香激情综合| 国产欧美日韩视频在线观看| 精品少妇一区二区三区在线播放| 91精品国产一区二区三区香蕉| 欧美日韩在线亚洲一区蜜芽| 在线中文字幕不卡| 欧美日韩免费不卡视频一区二区三区| 在线影视一区二区三区| 欧美日韩午夜在线视频| 91精品啪在线观看国产60岁| 欧美精品日韩一区| 精品入口麻豆88视频| 欧美大黄免费观看| 国产亚洲综合av| 国产精品麻豆欧美日韩ww| 亚洲女厕所小便bbb| 亚洲国产精品麻豆| 玖玖九九国产精品| 国产一二三精品| 91色婷婷久久久久合中文| 欧美亚洲禁片免费| 日韩三级伦理片妻子的秘密按摩| 久久综合成人精品亚洲另类欧美| 国产精品免费免费| 亚洲一区二区三区爽爽爽爽爽| 日韩电影免费在线看| 国产精品一区二区视频| www.成人在线| 欧美一区二区三区四区高清| www国产精品av| 亚洲精品国产精华液| 男人的天堂亚洲一区| 国产·精品毛片| 欧美日韩精品综合在线| 国产亚洲欧美一区在线观看| 一区二区日韩av| 国产精品一二三在| 欧美网站大全在线观看| 久久久www成人免费毛片麻豆| 亚洲欧洲制服丝袜| 精品一区二区三区视频在线观看| 成人永久免费视频| 制服丝袜激情欧洲亚洲| 亚洲欧洲99久久| 蜜乳av一区二区三区| 色综合久久综合网97色综合| 日韩免费在线观看| 亚洲午夜激情av| 99久久久国产精品| 26uuu久久综合| 石原莉奈在线亚洲三区| 99久久夜色精品国产网站| 精品久久久网站| 日韩 欧美一区二区三区| 色悠悠久久综合| 亚洲欧洲国产专区| 国产+成+人+亚洲欧洲自线| 7777精品伊人久久久大香线蕉完整版| 国产精品九色蝌蚪自拍| 国产福利一区在线观看| 精品美女被调教视频大全网站| 亚洲福利一二三区| 色综合久久99| 成人免费视频在线观看| 国产成人精品亚洲日本在线桃色| 欧美一级搡bbbb搡bbbb| 午夜精品影院在线观看| 欧美色中文字幕| 亚洲综合久久久久| 欧美在线制服丝袜| 亚洲综合男人的天堂| 欧美亚洲综合一区| 一区二区免费在线| 欧美日韩国产综合视频在线观看| 亚洲老妇xxxxxx| 欧美性videosxxxxx| 亚洲一区二区三区中文字幕在线| 一本到不卡免费一区二区| 亚洲图片另类小说| 色婷婷av一区二区三区gif| 亚洲人成在线观看一区二区| 91丨porny丨国产| 一区二区三区中文字幕在线观看| 91免费小视频| 亚洲成人手机在线| 欧美猛男gaygay网站| 五月婷婷综合激情| 91精品中文字幕一区二区三区| 久久激情五月婷婷| 国产欧美日韩三区| 91在线免费视频观看| 亚洲精品中文在线影院| 欧美三级蜜桃2在线观看| 日本欧洲一区二区| 久久久久久久久久久黄色| 成人av电影在线播放| 亚洲影视资源网| 欧美一区二区三区成人| 韩国欧美国产一区| 中文字幕在线一区免费| 欧美三级在线视频| 精品一区二区三区日韩| 亚洲欧洲日本在线| 欧美老女人第四色| 国产乱人伦偷精品视频不卡| ●精品国产综合乱码久久久久| 欧美日韩免费高清一区色橹橹| 麻豆国产一区二区| 国产精品久久久久精k8| 8x8x8国产精品| 成人性生交大片免费看中文网站| 有坂深雪av一区二区精品| 精品伦理精品一区| 在线观看网站黄不卡| 国产一区二区美女| 亚洲午夜视频在线观看| 久久免费国产精品| 欧美三级电影网站| 成人性生交大片免费看中文 | 精品一区二区三区久久久| 国产精品久久一级| 欧美日韩在线电影| 国产剧情av麻豆香蕉精品| 18欧美亚洲精品| 欧美日韩综合在线| 另类小说一区二区三区| 一区二区免费在线播放| 久久婷婷成人综合色| 欧美中文一区二区三区| 国产精品一区在线| 日本伊人色综合网| 亚洲精品亚洲人成人网| 国产亚洲成aⅴ人片在线观看| 欧美视频一区二区三区在线观看| 粉嫩aⅴ一区二区三区四区五区 | 亚洲精品第一国产综合野| 久久综合五月天婷婷伊人| 91精品国模一区二区三区| 在线观看日韩高清av| 9l国产精品久久久久麻豆| 成人免费视频国产在线观看| 免费观看日韩av| 亚洲一区二区三区四区不卡| 亚洲精品视频免费看| 日本精品视频一区二区| 国产91综合网| 国产福利91精品一区二区三区| 日本欧美久久久久免费播放网| 亚洲成人av一区二区| 亚洲精品视频在线| 亚洲综合一区二区精品导航| 亚洲精品免费在线观看| 亚洲视频你懂的| 国产精品福利影院| 亚洲精品视频在线观看网站| 中文字幕在线一区免费| 日韩毛片在线免费观看| 国产精品久久久久久久久免费相片 | 97se亚洲国产综合自在线观| 成人性生交大片免费看在线播放| 国产大片一区二区| 成人美女在线观看| 91丨九色丨国产丨porny| 91麻豆6部合集magnet| 在线欧美日韩国产| 欧美日韩1区2区| 精品国精品国产尤物美女| 久久亚区不卡日本| 国产精品女同互慰在线看| 亚洲欧美日韩小说| 亚洲va欧美va人人爽| 日本欧美一区二区在线观看| 国产一区二区在线视频| 懂色av一区二区夜夜嗨| 91免费在线播放| 欧美一区二区三区视频免费 | 国产传媒日韩欧美成人| www.欧美日韩| 91精品久久久久久久99蜜桃| 欧美v日韩v国产v| 国产精品电影一区二区三区| 亚洲综合丝袜美腿| 狠狠久久亚洲欧美| 91网站最新地址| 日韩一区二区三区精品视频| 国产日本欧洲亚洲| 亚洲一本大道在线| 精品一区二区三区欧美| 色综合色狠狠综合色| 欧美v日韩v国产v| 亚洲精品日韩一| 久久国产夜色精品鲁鲁99| 91玉足脚交白嫩脚丫在线播放| 欧美喷水一区二区| 国产精品剧情在线亚洲| 免费不卡在线视频| 一本大道久久a久久精品综合 | 国产成人午夜精品5599| 欧美日韩视频在线观看一区二区三区|