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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? isapnp_proc.c

?? 話帶數(shù)據(jù)中傳真解調(diào)程序
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
	for (i = next = 0; i < 2; i++) {		tmp = isapnp_read_word(ISAPNP_CFG_IRQ + (i << 1));		if (!(tmp >> 8))			continue;		if (!next) {			isapnp_printf(buffer, "%sActive IRQ ", space);			next = 1;		}		isapnp_printf(buffer, "%s%i", i > 0 ? "," : "", tmp >> 8);		if (tmp & 0xff)			isapnp_printf(buffer, " [0x%x]", tmp & 0xff);	}	if (next)		isapnp_printf(buffer, "\n");	for (i = next = 0; i < 2; i++) {		tmp = isapnp_read_byte(ISAPNP_CFG_DMA + i);		if (tmp == 4)			continue;		if (!next) {			isapnp_printf(buffer, "%sActive DMA ", space);			next = 1;		}		isapnp_printf(buffer, "%s%i", i > 0 ? "," : "", tmp);	}	if (next)		isapnp_printf(buffer, "\n");	for (i = next = 0; i < 4; i++) {		tmp = isapnp_read_dword(ISAPNP_CFG_MEM + (i << 3));		if (!tmp)			continue;		if (!next) {			isapnp_printf(buffer, "%sActive memory ", space);			next = 1;		}		isapnp_printf(buffer, "%s0x%x", i > 0 ? "," : "", tmp);	}	if (next)		isapnp_printf(buffer, "\n");	isapnp_cfg_end();}static void isapnp_print_device(isapnp_info_buffer_t *buffer, struct pnp_dev *dev){	int block, block1;	char *space = "    ";	struct isapnp_resources *res, *resa;	if (!dev)		return;	isapnp_printf(buffer, "  Logical device %i '", dev->devfn);	isapnp_print_devid(buffer, dev->vendor, dev->device);	isapnp_printf(buffer, ":%s'", dev->name[0]?dev->name:"Unknown");	isapnp_printf(buffer, "\n");#if 0	isapnp_cfg_begin(dev->bus->number, dev->devfn);	for (block = 0; block < 128; block++)		if ((block % 16) == 15)			isapnp_printf(buffer, "%02x\n", isapnp_read_byte(block));		else			isapnp_printf(buffer, "%02x:", isapnp_read_byte(block));	isapnp_cfg_end();#endif	if (dev->regs)		isapnp_printf(buffer, "%sSupported registers 0x%x\n", space, dev->regs);	isapnp_print_compatible(buffer, dev);	isapnp_print_configuration(buffer, dev);	for (res = (struct isapnp_resources *)dev->sysdata, block = 0; res; res = res->next, block++) {		isapnp_printf(buffer, "%sResources %i\n", space, block);		isapnp_print_resources(buffer, "      ", res);		for (resa = res->alt, block1 = 1; resa; resa = resa->alt, block1++) {			isapnp_printf(buffer, "%s  Alternate resources %i:%i\n", space, block, block1);			isapnp_print_resources(buffer, "        ", resa);		}	}}/* *  Main read routine */ static void isapnp_info_read(isapnp_info_buffer_t *buffer){	struct pnp_bus *card;	struct pnp_dev *dev;		for (card = isapnp_cards; card;              card = card->next) {		isapnp_printf(buffer, "Card %i '", card->number);		isapnp_print_devid(buffer, card->vendor, card->device);		isapnp_printf(buffer, ":%s'", card->name[0]?card->name:"Unknown");		if (card->pnpver)			isapnp_printf(buffer, " PnP version %x.%x", card->pnpver >> 4, card->pnpver & 0x0f);		if (card->productver)			isapnp_printf(buffer, " Product version %x.%x", card->productver >> 4, card->productver & 0x0f);		isapnp_printf(buffer,"\n");		for (dev = card->devices; dev; dev = dev->sibling)			isapnp_print_device(buffer, dev);	}}/* * */static struct pnp_bus *isapnp_info_card;static struct pnp_dev *isapnp_info_device;static char *isapnp_get_str(char *dest, char *src, int len){	int c;	while (*src == ' ' || *src == '\t')		src++;	if (*src == '"' || *src == '\'') {		c = *src++;		while (--len > 0 && *src && *src != c) {			*dest++ = *src++;		}		if (*src == c)			src++;	} else {		while (--len > 0 && *src && *src != ' ' && *src != '\t') {			*dest++ = *src++;		}	}	*dest = 0;	while (*src == ' ' || *src == '\t')		src++;	return src;}static unsigned char isapnp_get_hex(unsigned char c){	if (c >= '0' || c <= '9')		return c - '0';	if (c >= 'a' || c <= 'f')		return (c - 'a') + 10;	if (c >= 'A' || c <= 'F')		return (c - 'A') + 10;	return 0;}static unsigned int isapnp_parse_id(const char *id){	if (strlen(id) != 7) {		printk("isapnp: wrong PnP ID\n");		return 0;	}	return (ISAPNP_VENDOR(id[0], id[1], id[2])<<16) |			(isapnp_get_hex(id[3])<<4) |			(isapnp_get_hex(id[4])<<0) |			(isapnp_get_hex(id[5])<<12) |			(isapnp_get_hex(id[6])<<8);}static int isapnp_set_card(char *line){	int idx, idx1;	unsigned int id;	char index[16], value[32];	isapnp_info_card = NULL;	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	idx = idx1 = simple_strtoul(index, NULL, 0);	id = isapnp_parse_id(value);	isapnp_info_card = isapnp_find_card(id >> 16, id & 0xffff, NULL);	while (isapnp_info_card && idx1-- > 0)		isapnp_info_card = isapnp_find_card(id >> 16, id & 0xffff, isapnp_info_card);	if (isapnp_info_card == NULL) {		printk("isapnp: card '%s' order %i not found\n", value, idx);		return 1;	}	if (isapnp_cfg_begin(isapnp_info_card->number, -1)<0) {		printk("isapnp: configuration start sequence for device '%s' failed\n", value);		isapnp_info_card = NULL;		return 1;	}	return 0;}static int isapnp_select_csn(char *line){	int csn;	char index[16], value[32];	isapnp_info_device = NULL;	isapnp_get_str(index, line, sizeof(index));	csn = simple_strtoul(index, NULL, 0);	for (isapnp_info_card = isapnp_cards; isapnp_info_card; isapnp_info_card = isapnp_info_card->next)		if (isapnp_info_card->number == csn)			break;	if (isapnp_info_card == NULL) {		printk("isapnp: cannot find CSN %i\n", csn);		return 1;	}	if (isapnp_cfg_begin(isapnp_info_card->number, -1)<0) {		printk("isapnp: configuration start sequence for device '%s' failed\n", value);		isapnp_info_card = NULL;		return 1;	}	return 0;}static int isapnp_set_device(char *line){	int idx, idx1;	unsigned int id;	char index[16], value[32];	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	idx = idx1 = simple_strtoul(index, NULL, 0);	id = isapnp_parse_id(value);	isapnp_info_device = isapnp_find_dev(isapnp_info_card, id >> 16, id & 0xffff, NULL);	while (isapnp_info_device && idx-- > 0)		isapnp_info_device = isapnp_find_dev(isapnp_info_card, id >> 16, id & 0xffff, isapnp_info_device);	if (isapnp_info_device == NULL) {		printk("isapnp: device '%s' order %i not found\n", value, idx);		return 1;	}	isapnp_device(isapnp_info_device->devfn);	return 0;}static int isapnp_autoconfigure(void){	if (isapnp_info_device == NULL) {		printk("isapnp: device is not set\n");		return 0;	}	if (isapnp_info_device->active)		isapnp_info_device->deactivate(isapnp_info_device);	if (isapnp_info_device->prepare(isapnp_info_device) < 0) {		printk("isapnp: cannot prepare device for the activation");		return 0;	}	if (isapnp_info_device->activate(isapnp_info_device) < 0) {		printk("isapnp: cannot activate device");		return 0;	}	return 0;}static int isapnp_set_port(char *line){	int idx, port;	char index[16], value[32];	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	idx = simple_strtoul(index, NULL, 0);	port = simple_strtoul(value, NULL, 0);	if (idx < 0 || idx > 7) {		printk("isapnp: wrong port index %i\n", idx);		return 1;	}	if (port < 0 || port > 0xffff) {		printk("isapnp: wrong port value 0x%x\n", port);		return 1;	}	isapnp_write_word(ISAPNP_CFG_PORT + (idx << 1), port);	if (!isapnp_info_device->resource[idx].flags)		return 0;	if (isapnp_info_device->resource[idx].flags & IORESOURCE_AUTO) {		isapnp_info_device->resource[idx].start = port;		isapnp_info_device->resource[idx].end += port - 1;		isapnp_info_device->resource[idx].flags &= ~IORESOURCE_AUTO;	} else {		isapnp_info_device->resource[idx].end -= isapnp_info_device->resource[idx].start;		isapnp_info_device->resource[idx].start = port;		isapnp_info_device->resource[idx].end += port;	}	return 0;}static void isapnp_set_irqresource(struct resource *res, int irq){	res->start = res->end = irq;	res->flags = IORESOURCE_IRQ;} static int isapnp_set_irq(char *line){	int idx, irq;	char index[16], value[32];	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	idx = simple_strtoul(index, NULL, 0);	irq = simple_strtoul(value, NULL, 0);	if (idx < 0 || idx > 1) {		printk("isapnp: wrong IRQ index %i\n", idx);		return 1;	}	if (irq == 2)		irq = 9;	if (irq < 0 || irq > 15) {		printk("isapnp: wrong IRQ value %i\n", irq);		return 1;	}	isapnp_write_byte(ISAPNP_CFG_IRQ + (idx << 1), irq);	isapnp_set_irqresource(isapnp_info_device->irq_resource + idx, irq);	return 0;} static void isapnp_set_dmaresource(struct resource *res, int dma){	res->start = res->end = dma;	res->flags = IORESOURCE_DMA;} static int isapnp_set_dma(char *line){	int idx, dma;	char index[16], value[32];	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	idx = simple_strtoul(index, NULL, 0);	dma = simple_strtoul(value, NULL, 0);	if (idx < 0 || idx > 1) {		printk("isapnp: wrong DMA index %i\n", idx);		return 1;	}	if (dma < 0 || dma > 7) {		printk("isapnp: wrong DMA value %i\n", dma);		return 1;	}	isapnp_write_byte(ISAPNP_CFG_DMA + idx, dma);	isapnp_set_dmaresource(isapnp_info_device->dma_resource + idx, dma);	return 0;} static int isapnp_set_mem(char *line){	int idx;	unsigned int mem;	char index[16], value[32];	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	idx = simple_strtoul(index, NULL, 0);	mem = simple_strtoul(value, NULL, 0);	if (idx < 0 || idx > 3) {		printk("isapnp: wrong memory index %i\n", idx);		return 1;	}	mem >>= 8;	isapnp_write_word(ISAPNP_CFG_MEM + (idx<<2), mem & 0xffff);	if (!isapnp_info_device->resource[idx + 8].flags)		return 0;	if (isapnp_info_device->resource[idx + 8].flags & IORESOURCE_AUTO) {		isapnp_info_device->resource[idx + 8].start = mem & ~0x00ffff00;		isapnp_info_device->resource[idx + 8].end += (mem & ~0x00ffff00) - 1;		isapnp_info_device->resource[idx + 8].flags &= ~IORESOURCE_AUTO;	} else {		isapnp_info_device->resource[idx + 8].end -= isapnp_info_device->resource[idx + 8].start;		isapnp_info_device->resource[idx + 8].start = mem & ~0x00ffff00;		isapnp_info_device->resource[idx + 8].end += mem & ~0x00ffff00;	}	return 0;} static int isapnp_poke(char *line, int what){	int reg;	unsigned int val;	char index[16], value[32];	line = isapnp_get_str(index, line, sizeof(index));	isapnp_get_str(value, line, sizeof(value));	reg = simple_strtoul(index, NULL, 0);	val = simple_strtoul(value, NULL, 0);	if (reg < 0 || reg > 127) {		printk("isapnp: wrong register %i\n", reg);		return 1;	}	switch (what) {	case 1:		isapnp_write_word(reg, val);		break;	case 2:		isapnp_write_dword(reg, val);		break;	default:		isapnp_write_byte(reg, val);		break;	}	return 0;} static int isapnp_decode_line(char *line){	char cmd[32];	line = isapnp_get_str(cmd, line, sizeof(cmd));	if (!strcmp(cmd, "card"))		return isapnp_set_card(line);	if (!strcmp(cmd, "csn"))		return isapnp_select_csn(line);	if (!isapnp_info_card) {		printk("isapnp: card is not selected\n");		return 1;	}	if (!strncmp(cmd, "dev", 3))		return isapnp_set_device(line);	if (!isapnp_info_device) {		printk("isapnp: device is not selected\n");		return 1;	}	if (!strncmp(cmd, "auto", 4))		return isapnp_autoconfigure();	if (!strncmp(cmd, "act", 3)) {		isapnp_activate(isapnp_info_device->devfn);		isapnp_info_device->active = 1;		return 0;	}	if (!strncmp(cmd, "deact", 5)) {		isapnp_deactivate(isapnp_info_device->devfn);		isapnp_info_device->active = 0;		return 0;	}	if (!strcmp(cmd, "port"))		return isapnp_set_port(line);	if (!strcmp(cmd, "irq"))		return isapnp_set_irq(line);	if (!strcmp(cmd, "dma"))		return isapnp_set_dma(line);	if (!strncmp(cmd, "mem", 3))		return isapnp_set_mem(line);	if (!strcmp(cmd, "poke"))		return isapnp_poke(line, 0);	if (!strcmp(cmd, "pokew"))		return isapnp_poke(line, 1);	if (!strcmp(cmd, "poked"))		return isapnp_poke(line, 2);	printk("isapnp: wrong command '%s'\n", cmd);	return 1;}/* *  Main write routine */static void isapnp_info_write(isapnp_info_buffer_t *buffer){	int c, idx, idx1 = 0;	char line[128];	if (buffer->size <= 0)		return;	isapnp_info_card = NULL;	isapnp_info_device = NULL;	for (idx = 0; idx < buffer->size; idx++) {		c = buffer->buffer[idx];		if (c == '\n') {			line[idx1] = '\0';			if (line[0] != '#') {				if (isapnp_decode_line(line))					goto __end;			}			idx1 = 0;			continue;		}		if (idx1 >= sizeof(line)-1) {			printk("isapnp: line too long, aborting\n");			return;		}		line[idx1++] = c;	}      __end:	if (isapnp_info_card)		isapnp_cfg_end();}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人91在线观看| 欧美午夜电影一区| 一区二区三区四区不卡视频| 欧美日韩一区成人| 国产激情一区二区三区| 亚洲在线视频免费观看| 国产婷婷色一区二区三区| 欧美日韩国产一级片| 5566中文字幕一区二区电影| 高清在线成人网| 日韩电影在线免费看| 亚洲精品欧美激情| 国产精品久久三| 久久色在线视频| 欧美大白屁股肥臀xxxxxx| 91久久精品国产91性色tv| 成人中文字幕电影| 国产精品99久久久久久似苏梦涵| 日日夜夜免费精品| 亚洲制服丝袜在线| 亚洲精品视频在线观看网站| 欧美韩日一区二区三区| 久久综合九色综合欧美亚洲| 欧美一区二区播放| 欧美日韩久久一区| 欧美日韩视频在线第一区| 91亚洲国产成人精品一区二三| 成人综合在线观看| 国产成人精品网址| 激情综合五月天| 开心九九激情九九欧美日韩精美视频电影| 夜夜嗨av一区二区三区网页 | 日韩一区二区视频在线观看| 欧美中文字幕一区| 在线观看国产91| 日本韩国精品在线| 在线看国产一区| 色噜噜狠狠色综合中国| 色女孩综合影院| 在线观看不卡视频| 欧美日高清视频| 日韩一二三区视频| 精品国产乱子伦一区| 亚洲精品在线三区| 久久久99精品久久| 国产精品伦一区| 亚洲婷婷综合久久一本伊一区| 日韩一区在线免费观看| 一区二区三区中文字幕精品精品 | 亚洲情趣在线观看| 一区二区三区欧美亚洲| 亚洲va国产天堂va久久en| 亚洲高清不卡在线| 蜜桃av一区二区| 国产一区二区影院| 成人免费高清在线观看| 91捆绑美女网站| 欧美午夜精品久久久久久孕妇 | 国产亚洲精品精华液| 国产欧美1区2区3区| 中文字幕一区二区5566日韩| 一区二区三区影院| 日本麻豆一区二区三区视频| 久久国产综合精品| av激情亚洲男人天堂| 在线一区二区三区四区五区| 3d动漫精品啪啪一区二区竹菊| 欧美电影免费观看高清完整版| 亚洲国产精品高清| 一区二区欧美视频| 久久er99热精品一区二区| 国产成人在线影院| 欧美性生活一区| 精品三级av在线| 亚洲欧洲成人av每日更新| 亚洲国产精品一区二区www| 久草中文综合在线| 91玉足脚交白嫩脚丫在线播放| 91精品一区二区三区在线观看| 久久久青草青青国产亚洲免观| 亚洲品质自拍视频网站| 麻豆91在线播放免费| 91视频com| 日韩精品一区在线观看| 亚洲人亚洲人成电影网站色| 免费在线视频一区| 91在线视频网址| 欧美一级免费观看| 亚洲天堂2014| 精品一二线国产| 欧美日韩在线播| 国产精品美女www爽爽爽| 日韩av电影天堂| 92精品国产成人观看免费| 精品久久久影院| 图片区小说区国产精品视频| 国产成人精品1024| 日韩一区二区三区精品视频| 一区二区在线免费观看| 国产一区二区三区久久久| 欧美日韩国产中文| 国产精品欧美综合在线| 精品一区二区三区av| 777奇米四色成人影色区| 亚洲免费大片在线观看| 粗大黑人巨茎大战欧美成人| 日韩区在线观看| 亚洲成人精品影院| 91麻豆国产在线观看| 久久久精品2019中文字幕之3| 琪琪久久久久日韩精品| 欧美三级日韩三级国产三级| 亚洲色图另类专区| 粉嫩aⅴ一区二区三区四区五区| 欧美一区二区久久久| 亚洲综合色婷婷| 26uuu精品一区二区三区四区在线| 亚洲成人免费观看| 色爱区综合激月婷婷| 亚洲国产精品精华液2区45| 久久福利资源站| 日韩三级视频在线看| 午夜精品久久久| 欧美四级电影网| 一区二区三区在线观看欧美| 色哟哟一区二区| 中文字幕在线观看不卡| 大胆亚洲人体视频| 日本一区二区三区免费乱视频| 激情都市一区二区| 欧美不卡视频一区| 捆绑调教美女网站视频一区| 欧美一二三在线| 奇米精品一区二区三区在线观看 | 99国产一区二区三精品乱码| 国产精品嫩草久久久久| eeuss鲁片一区二区三区 | 日本不卡一区二区三区高清视频| 717成人午夜免费福利电影| 亚洲国产成人av| 欧美日韩免费观看一区二区三区 | 午夜久久久久久久久久一区二区| 欧美亚洲国产一区二区三区 | 国产精品亚洲视频| 国产蜜臀97一区二区三区| 成人国产精品免费观看动漫| 亚洲视频一二三区| 在线一区二区观看| 视频一区二区中文字幕| 日韩欧美www| 国产精品一区二区在线播放| 中文字幕免费一区| 91网站最新地址| 亚洲成人激情综合网| 在线播放中文字幕一区| 免费xxxx性欧美18vr| 精品国产乱码久久久久久久| 国产成人99久久亚洲综合精品| 中文字幕一区二区不卡| 欧美日韩久久久| 卡一卡二国产精品 | 日韩一区二区三区免费观看| 国产专区综合网| 日韩一区中文字幕| 欧美久久一二区| 国产乱码精品一区二区三区忘忧草| 国产三级欧美三级日产三级99| 91免费视频大全| 日韩av不卡一区二区| 久久精品亚洲精品国产欧美| 一本久久a久久精品亚洲| 日韩在线一二三区| 国产清纯在线一区二区www| 日本韩国精品一区二区在线观看| 免费精品视频在线| 亚洲视频一区二区在线| 欧美一区二区在线不卡| 国产不卡视频一区| 亚洲18女电影在线观看| 久久久国产精华| 欧美日韩卡一卡二| 国产成人av电影免费在线观看| 亚洲午夜久久久久久久久电影院| 久久久久久久综合| 精品视频一区三区九区| 国产精品一区二区男女羞羞无遮挡| 亚洲精品高清视频在线观看| 日韩免费看的电影| 在线观看三级视频欧美| 国产一区二区毛片| 亚洲成人综合视频| 国产精品国产自产拍在线| 欧美一区二区黄| 色综合久久综合| 国产一区二区三区综合| 亚洲电影激情视频网站| 国产日韩精品一区二区三区| 欧美一区二区福利视频| 欧美在线啊v一区| 成人午夜在线播放|