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

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

?? dwc_otg_attr.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
?? 第 1 頁 / 共 3 頁
字號:
#endif	hprt0_data_t val;	val.d32 = dwc_read_reg32 (otg_dev->core_if->host_if->hprt0);	return sprintf (buf, "Bus Suspend = 0x%x\n", val.b.prtsusp);}/** * Set the Bus Suspend status */static ssize_t bussuspend_store( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)				 struct device_attribute *attr,#endif				 const char *buf, 				 size_t count ) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	uint32_t in = simple_strtoul(buf, NULL, 16);	uint32_t *addr = (uint32_t *)otg_dev->core_if->host_if->hprt0;	hprt0_data_t mem;	mem.d32 = dwc_read_reg32(addr);	mem.b.prtsusp = in;	dev_dbg(_dev, "Storing Address=0x%08x Data=0x%08x\n", (uint32_t)addr, mem.d32);	dwc_write_reg32(addr, mem.d32);	return count;}DEVICE_ATTR(bussuspend, 0644, bussuspend_show, bussuspend_store);/** * Show the status of Remote Wakeup. */static ssize_t remote_wakeup_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)				   struct device_attribute *attr,#endif				   char *buf) {#ifndef DWC_HOST_ONLY#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	dctl_data_t val;	val.d32 = 		dwc_read_reg32( &otg_dev->core_if->dev_if->dev_global_regs->dctl);	return sprintf( buf, "Remote Wakeup = %d Enabled = %d\n", 			val.b.rmtwkupsig, otg_dev->pcd->remote_wakeup_enable);#else	return sprintf(buf, "Host Only Mode!\n");#endif}/** * Initiate a remote wakeup of the host.  The Device control register * Remote Wakeup Signal bit is written if the PCD Remote wakeup enable * flag is set. *  */static ssize_t remote_wakeup_store( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)				    struct device_attribute *attr,#endif				    const char *buf, 				    size_t count ) {#ifndef DWC_HOST_ONLY#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	uint32_t val = simple_strtoul(buf, NULL, 16);        	if (val&1) {		dwc_otg_pcd_remote_wakeup(otg_dev->pcd, 1);	}	else {		dwc_otg_pcd_remote_wakeup(otg_dev->pcd, 0);	}#endif	return count;}DEVICE_ATTR(remote_wakeup,  S_IRUGO|S_IWUSR, remote_wakeup_show, 	    remote_wakeup_store);/** * Dump global registers and either host or device registers (depending on the * current mode of the core). */static ssize_t regdump_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)			     struct device_attribute *attr,#endif			     char *buf) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif        dwc_otg_dump_global_registers( otg_dev->core_if);        if (dwc_otg_is_host_mode(otg_dev->core_if)) {                dwc_otg_dump_host_registers( otg_dev->core_if);        } else {                dwc_otg_dump_dev_registers( otg_dev->core_if);        }   	return sprintf( buf, "Register Dump\n" );}DEVICE_ATTR(regdump, S_IRUGO|S_IWUSR, regdump_show, 0);/** * Dump global registers and either host or device registers (depending on the * current mode of the core). */static ssize_t spramdump_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)			       struct device_attribute *attr,#endif			       char *buf) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif        dwc_otg_dump_spram( otg_dev->core_if);        return sprintf( buf, "SPRAM Dump\n" );}DEVICE_ATTR(spramdump, S_IRUGO|S_IWUSR, spramdump_show, 0);/** * Dump global registers and either host or device registers (depending on the * current mode of the core). */static ssize_t ep0descdump_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)				 struct device_attribute *attr,#endif				 char *buf) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	dwc_otg_dump_ep0desc( otg_dev->core_if);		return sprintf( buf, "Desc Dump\n" );}DEVICE_ATTR(ep0descdump, S_IRUGO|S_IWUSR, ep0descdump_show, 0);/** * Dump the current hcd state. */static ssize_t hcddump_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)			     struct device_attribute *attr,#endif			     char *buf) {#ifndef DWC_DEVICE_ONLY#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	dwc_otg_hcd_dump_state(otg_dev->hcd);#endif   	return sprintf( buf, "HCD Dump\n" );}DEVICE_ATTR(hcddump, S_IRUGO|S_IWUSR, hcddump_show, 0);/** * Dump the average frame remaining at SOF. This can be used to * determine average interrupt latency. Frame remaining is also shown for * start transfer and two additional sample points. */static ssize_t hcd_frrem_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)			       struct device_attribute *attr,#endif			       char *buf) {#ifndef DWC_DEVICE_ONLY#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	dwc_otg_hcd_dump_frrem(otg_dev->hcd);#endif   	return sprintf( buf, "HCD Dump Frame Remaining\n" );}DEVICE_ATTR(hcd_frrem, S_IRUGO|S_IWUSR, hcd_frrem_show, 0);/** * Displays the time required to read the GNPTXFSIZ register many times (the * output shows the number of times the register is read). */#define RW_REG_COUNT 10000000#define MSEC_PER_JIFFIE 1000/HZ	static ssize_t rd_reg_test_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)				 struct device_attribute *attr,#endif				 char *buf) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	int i;	int time;	int start_jiffies;	printk("HZ %d, MSEC_PER_JIFFIE %d, loops_per_jiffy %lu\n",	       HZ, MSEC_PER_JIFFIE, loops_per_jiffy);	start_jiffies = jiffies;	for (i = 0; i < RW_REG_COUNT; i++) {		dwc_read_reg32(&otg_dev->core_if->core_global_regs->gnptxfsiz);	}	time = jiffies - start_jiffies;   	return sprintf( buf, "Time to read GNPTXFSIZ reg %d times: %d msecs (%d jiffies)\n",			RW_REG_COUNT, time * MSEC_PER_JIFFIE, time );}DEVICE_ATTR(rd_reg_test, S_IRUGO|S_IWUSR, rd_reg_test_show, 0);/** * Displays the time required to write the GNPTXFSIZ register many times (the * output shows the number of times the register is written). */static ssize_t wr_reg_test_show( struct device *_dev,#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)				 struct device_attribute *attr,#endif				 char *buf) {#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev);	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);#else	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);#endif	uint32_t reg_val;	int i;	int time;	int start_jiffies;	printk("HZ %d, MSEC_PER_JIFFIE %d, loops_per_jiffy %lu\n",	       HZ, MSEC_PER_JIFFIE, loops_per_jiffy);	reg_val = dwc_read_reg32(&otg_dev->core_if->core_global_regs->gnptxfsiz);	start_jiffies = jiffies;	for (i = 0; i < RW_REG_COUNT; i++) {		dwc_write_reg32(&otg_dev->core_if->core_global_regs->gnptxfsiz, reg_val);	}	time = jiffies - start_jiffies;   	return sprintf( buf, "Time to write GNPTXFSIZ reg %d times: %d msecs (%d jiffies)\n",			RW_REG_COUNT, time * MSEC_PER_JIFFIE, time);}DEVICE_ATTR(wr_reg_test, S_IRUGO|S_IWUSR, wr_reg_test_show, 0);/**@}*//** * Create the device files */void dwc_otg_attr_create (struct lm_device *lmdev){	device_create_file(&lmdev->dev, &dev_attr_regoffset);	device_create_file(&lmdev->dev, &dev_attr_regvalue);	device_create_file(&lmdev->dev, &dev_attr_mode);	device_create_file(&lmdev->dev, &dev_attr_hnpcapable);	device_create_file(&lmdev->dev, &dev_attr_srpcapable);	device_create_file(&lmdev->dev, &dev_attr_hnp);	device_create_file(&lmdev->dev, &dev_attr_srp);	device_create_file(&lmdev->dev, &dev_attr_buspower);	device_create_file(&lmdev->dev, &dev_attr_bussuspend);	device_create_file(&lmdev->dev, &dev_attr_busconnected);	device_create_file(&lmdev->dev, &dev_attr_gotgctl);	device_create_file(&lmdev->dev, &dev_attr_gusbcfg);	device_create_file(&lmdev->dev, &dev_attr_grxfsiz);	device_create_file(&lmdev->dev, &dev_attr_gnptxfsiz);	device_create_file(&lmdev->dev, &dev_attr_gpvndctl);	device_create_file(&lmdev->dev, &dev_attr_ggpio);	device_create_file(&lmdev->dev, &dev_attr_guid);	device_create_file(&lmdev->dev, &dev_attr_gsnpsid);	device_create_file(&lmdev->dev, &dev_attr_devspeed);	device_create_file(&lmdev->dev, &dev_attr_enumspeed);	device_create_file(&lmdev->dev, &dev_attr_hptxfsiz);	device_create_file(&lmdev->dev, &dev_attr_hprt0);	device_create_file(&lmdev->dev, &dev_attr_remote_wakeup);	device_create_file(&lmdev->dev, &dev_attr_regdump);	device_create_file(&lmdev->dev, &dev_attr_spramdump);	device_create_file(&lmdev->dev, &dev_attr_ep0descdump);	device_create_file(&lmdev->dev, &dev_attr_hcddump);	device_create_file(&lmdev->dev, &dev_attr_hcd_frrem);	device_create_file(&lmdev->dev, &dev_attr_rd_reg_test);	device_create_file(&lmdev->dev, &dev_attr_wr_reg_test);}/** * Remove the device files */void dwc_otg_attr_remove (struct lm_device *lmdev){	device_remove_file(&lmdev->dev, &dev_attr_regoffset);	device_remove_file(&lmdev->dev, &dev_attr_regvalue);	device_remove_file(&lmdev->dev, &dev_attr_mode);	device_remove_file(&lmdev->dev, &dev_attr_hnpcapable);	device_remove_file(&lmdev->dev, &dev_attr_srpcapable);	device_remove_file(&lmdev->dev, &dev_attr_hnp);	device_remove_file(&lmdev->dev, &dev_attr_srp);	device_remove_file(&lmdev->dev, &dev_attr_buspower);	device_remove_file(&lmdev->dev, &dev_attr_bussuspend);	device_remove_file(&lmdev->dev, &dev_attr_busconnected);	device_remove_file(&lmdev->dev, &dev_attr_gotgctl);	device_remove_file(&lmdev->dev, &dev_attr_gusbcfg);	device_remove_file(&lmdev->dev, &dev_attr_grxfsiz);	device_remove_file(&lmdev->dev, &dev_attr_gnptxfsiz);	device_remove_file(&lmdev->dev, &dev_attr_gpvndctl);	device_remove_file(&lmdev->dev, &dev_attr_ggpio);	device_remove_file(&lmdev->dev, &dev_attr_guid);	device_remove_file(&lmdev->dev, &dev_attr_gsnpsid);	device_remove_file(&lmdev->dev, &dev_attr_devspeed);	device_remove_file(&lmdev->dev, &dev_attr_enumspeed);	device_remove_file(&lmdev->dev, &dev_attr_hptxfsiz);	device_remove_file(&lmdev->dev, &dev_attr_hprt0);      	device_remove_file(&lmdev->dev, &dev_attr_remote_wakeup);      	device_remove_file(&lmdev->dev, &dev_attr_regdump);	device_remove_file(&lmdev->dev, &dev_attr_spramdump);	device_remove_file(&lmdev->dev, &dev_attr_ep0descdump);	device_remove_file(&lmdev->dev, &dev_attr_hcddump);	device_remove_file(&lmdev->dev, &dev_attr_hcd_frrem);	device_remove_file(&lmdev->dev, &dev_attr_rd_reg_test);	device_remove_file(&lmdev->dev, &dev_attr_wr_reg_test);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产欧美一区二区| proumb性欧美在线观看| 在线成人午夜影院| 日韩精品一二三区| 精品免费国产二区三区| 国产a精品视频| 亚洲视频电影在线| 欧美精品久久一区| 国产黄色成人av| 亚洲精品一二三| 欧美精品免费视频| 狠狠色综合色综合网络| 欧美国产日韩a欧美在线观看 | 日韩免费视频一区二区| 老汉av免费一区二区三区| 国产欧美一区二区三区网站| 91尤物视频在线观看| 丝袜国产日韩另类美女| 久久久久99精品国产片| 91福利国产成人精品照片| 日本aⅴ精品一区二区三区| 国产欧美一二三区| 欧美精品久久一区二区三区| 成人小视频免费在线观看| 亚洲伊人伊色伊影伊综合网| 日韩欧美国产电影| 色偷偷久久一区二区三区| 久久国产人妖系列| 亚洲欧美影音先锋| 日韩丝袜情趣美女图片| av一二三不卡影片| 美女在线一区二区| 一区二区三区日韩| 久久久三级国产网站| 欧美日韩亚洲国产综合| 国产精品99精品久久免费| 亚洲6080在线| 自拍偷自拍亚洲精品播放| 欧美成人一级视频| 欧美日韩成人综合| 91在线观看美女| 麻豆久久一区二区| 亚洲国产综合在线| 亚洲人成影院在线观看| 精品久久久久av影院 | 国产成人av电影| 婷婷激情综合网| 亚洲天堂中文字幕| 久久久久久久久99精品| 国产精品色噜噜| 精品日韩av一区二区| 欧美日韩国产在线观看| 99视频超级精品| 国产精品91一区二区| 精品在线一区二区三区| 日韩精品电影在线| 亚欧色一区w666天堂| 亚洲精品国产高清久久伦理二区| 日本一区二区三区dvd视频在线| 91精品国产91久久久久久一区二区| 色视频成人在线观看免| 成人app网站| 成人av在线观| 成人动漫一区二区| 国产不卡视频在线观看| 国产成人免费视频精品含羞草妖精 | 99久久免费视频.com| 国产成人三级在线观看| 国产精品综合视频| 久久精品999| 美女免费视频一区二区| 免费不卡在线观看| 麻豆成人久久精品二区三区红| 视频在线观看一区二区三区| 午夜精品久久久| 舔着乳尖日韩一区| 奇米色一区二区三区四区| 奇米综合一区二区三区精品视频| 亚洲国产婷婷综合在线精品| 图片区小说区区亚洲影院| 国产精品主播直播| 欧美—级在线免费片| 久久精品一区二区三区不卡| 久久久噜噜噜久久中文字幕色伊伊| 欧美白人最猛性xxxxx69交| 欧美一级免费观看| 欧美成人一区二区| 国产欧美一区二区三区在线看蜜臀| 国产日韩av一区二区| 中文字幕 久热精品 视频在线 | 国产精品美女久久久久久久| 国产精品国产自产拍在线| 亚洲视频在线一区二区| 亚洲尤物视频在线| 美女视频一区二区| 国产suv精品一区二区883| 色哟哟一区二区| 91精品国产综合久久久久久久| 日韩精品一区二区三区中文不卡 | 蜜臀久久久久久久| 国产传媒一区在线| 色老汉一区二区三区| 欧美日韩高清一区| 国产无遮挡一区二区三区毛片日本| 国产精品乱码一区二三区小蝌蚪| 老司机免费视频一区二区三区| 国产精品一区专区| 91国模大尺度私拍在线视频| 日韩亚洲欧美综合| 国产精品理伦片| 日韩在线卡一卡二| 成人不卡免费av| 欧美日韩国产综合一区二区三区 | 日本美女视频一区二区| 国产成人在线免费| 欧美视频精品在线观看| 久久综合av免费| 亚洲国产综合视频在线观看| 狠狠色伊人亚洲综合成人| 色综合婷婷久久| 2023国产精华国产精品| 亚洲中国最大av网站| 国产一区美女在线| 欧美日韩一区 二区 三区 久久精品| 精品国产人成亚洲区| 亚洲一区二区在线观看视频| 国产在线精品一区二区| 欧美日韩一二三区| 国产精品久久久久久妇女6080| 日韩电影在线看| 99re这里只有精品视频首页| 精品久久人人做人人爰| 午夜私人影院久久久久| 99亚偷拍自图区亚洲| 精品日本一线二线三线不卡| 亚洲观看高清完整版在线观看| 国产成a人亚洲精| 精品国产伦一区二区三区观看方式| 亚洲国产成人91porn| 99r精品视频| 国产精品视频看| 国产精品综合视频| 精品日韩在线一区| 日本成人中文字幕| 欧美肥大bbwbbw高潮| 亚洲在线一区二区三区| 不卡的电影网站| 欧美精彩视频一区二区三区| 麻豆91免费看| 欧美一级xxx| 日本视频在线一区| 欧美日韩中文精品| 亚洲影院免费观看| 色av综合在线| 亚洲欧美日韩成人高清在线一区| 丰满白嫩尤物一区二区| 久久久综合激的五月天| 国产一区二区三区在线观看免费视频 | 日本成人超碰在线观看| 欧美日韩一区二区三区视频| 亚洲精品水蜜桃| 色呦呦一区二区三区| 亚洲精品视频在线观看网站| 色悠悠久久综合| 亚洲一区免费观看| 欧美日韩1区2区| 日韩精品欧美精品| 日韩三级在线观看| 精彩视频一区二区三区| 亚洲国产成人精品视频| 欧美性受xxxx黑人xyx| 亚洲伊人色欲综合网| 欧美人狂配大交3d怪物一区 | 蜜臀av性久久久久蜜臀aⅴ四虎 | av电影在线观看完整版一区二区| 久久久一区二区三区| 国产成人a级片| 国产精品国产三级国产a| 99re这里只有精品视频首页| 最新热久久免费视频| 91久久精品一区二区三| 亚洲国产综合在线| 日韩亚洲欧美高清| 国产成人99久久亚洲综合精品| 国产精品国产自产拍高清av| 91视频免费观看| 亚洲成人第一页| 精品国内二区三区| 国产老肥熟一区二区三区| 中文字幕欧美日韩一区| 色噜噜狠狠成人网p站| 日韩激情一区二区| 久久久久久久久久久久久夜| 91美女在线视频| 天天色综合成人网| 亚洲国产高清在线| 欧美裸体bbwbbwbbw| 国产主播一区二区| 亚洲免费观看高清在线观看| 日韩午夜三级在线|