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

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

?? dwc_otg_attr.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* ========================================================================== * $File: //dwh/usb_iip/dev/software/otg_ipmate/linux/drivers/dwc_otg_attr.c $ * $Revision: 1.1 $ * $Date: 2008/03/31 00:20:10 $ * $Change: 993572 $ * * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless * otherwise expressly agreed to in writing between Synopsys and you. *  * The Software IS NOT an item of Licensed Software or Licensed Product under * any End User Software License Agreement or Agreement for Licensed Product * with Synopsys or any supplement thereto. You are permitted to use and * redistribute this Software in source and binary forms, with or without * modification, provided that redistributions of source code must retain this * notice. You may not view, use, disclose, copy or distribute this file or * any information contained herein except pursuant to this license grant from * Synopsys. If you do not agree with this notice, including the disclaimer * below, then you are not authorized to use the Software. *  * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * ========================================================================== *//** @file  * * The diagnostic interface will provide access to the controller for * bringing up the hardware and testing.  The Linux driver attributes * feature will be used to provide the Linux Diagnostic * Interface. These attributes are accessed through sysfs. *//** @page "Linux Module Attributes"  * * The Linux module attributes feature is used to provide the Linux * Diagnostic Interface.  These attributes are accessed through sysfs. * The diagnostic interface will provide access to the controller for * bringing up the hardware and testing. The following table shows the attributes. <table> <tr> <td><b> Name</b></td> <td><b> Description</b></td> <td><b> Access</b></td> </tr>  <tr> <td> mode </td> <td> Returns the current mode: 0 for device mode, 1 for host mode</td> <td> Read</td> </tr>  <tr> <td> hnpcapable </td> <td> Gets or sets the "HNP-capable" bit in the Core USB Configuraton Register. Read returns the current value.</td> <td> Read/Write</td> </tr>  <tr> <td> srpcapable </td> <td> Gets or sets the "SRP-capable" bit in the Core USB Configuraton Register. Read returns the current value.</td> <td> Read/Write</td> </tr>  <tr> <td> hnp </td> <td> Initiates the Host Negotiation Protocol.  Read returns the status.</td> <td> Read/Write</td> </tr>  <tr> <td> srp </td> <td> Initiates the Session Request Protocol.  Read returns the status.</td> <td> Read/Write</td> </tr>  <tr> <td> buspower </td> <td> Gets or sets the Power State of the bus (0 - Off or 1 - On)</td> <td> Read/Write</td> </tr>  <tr> <td> bussuspend </td> <td> Suspends the USB bus.</td> <td> Read/Write</td> </tr>  <tr> <td> busconnected </td> <td> Gets the connection status of the bus</td> <td> Read</td> </tr>  <tr> <td> gotgctl </td> <td> Gets or sets the Core Control Status Register.</td> <td> Read/Write</td> </tr>  <tr> <td> gusbcfg </td> <td> Gets or sets the Core USB Configuration Register</td> <td> Read/Write</td> </tr>  <tr> <td> grxfsiz </td> <td> Gets or sets the Receive FIFO Size Register</td> <td> Read/Write</td> </tr>  <tr> <td> gnptxfsiz </td> <td> Gets or sets the non-periodic Transmit Size Register</td> <td> Read/Write</td> </tr>  <tr> <td> gpvndctl </td> <td> Gets or sets the PHY Vendor Control Register</td> <td> Read/Write</td> </tr>  <tr> <td> ggpio </td> <td> Gets the value in the lower 16-bits of the General Purpose IO Register or sets the upper 16 bits.</td> <td> Read/Write</td> </tr>  <tr> <td> guid </td> <td> Gets or sets the value of the User ID Register</td> <td> Read/Write</td> </tr>  <tr> <td> gsnpsid </td> <td> Gets the value of the Synopsys ID Regester</td> <td> Read</td> </tr>  <tr> <td> devspeed </td> <td> Gets or sets the device speed setting in the DCFG register</td> <td> Read/Write</td> </tr>  <tr> <td> enumspeed </td> <td> Gets the device enumeration Speed.</td> <td> Read</td> </tr>  <tr> <td> hptxfsiz </td> <td> Gets the value of the Host Periodic Transmit FIFO</td> <td> Read</td> </tr>  <tr> <td> hprt0 </td> <td> Gets or sets the value in the Host Port Control and Status Register</td> <td> Read/Write</td> </tr>  <tr> <td> regoffset </td> <td> Sets the register offset for the next Register Access</td> <td> Read/Write</td> </tr>  <tr> <td> regvalue </td> <td> Gets or sets the value of the register at the offset in the regoffset attribute.</td> <td> Read/Write</td> </tr>  <tr> <td> remote_wakeup </td> <td> On read, shows the status of Remote Wakeup. On write, initiates a remote wakeup of the host. When bit 0 is 1 and Remote Wakeup is enabled, the Remote Wakeup signalling bit in the Device Control Register is set for 1 milli-second.</td> <td> Read/Write</td> </tr>  <tr> <td> regdump </td> <td> Dumps the contents of core registers.</td> <td> Read</td> </tr>  <tr> <td> spramdump </td> <td> Dumps the contents of core registers.</td> <td> Read</td> </tr> <tr> <td> hcddump </td> <td> Dumps the current HCD state.</td> <td> Read</td> </tr>  <tr> <td> hcd_frrem </td> <td> Shows the average value of the Frame Remaining field in the Host Frame Number/Frame Remaining register when an SOF interrupt occurs. This can be used to determine the average interrupt latency. Also shows the average Frame Remaining value for start_transfer and the "a" and "b" sample points. The "a" and "b" sample points may be used during debugging bto determine how long it takes to execute a section of the HCD code.</td> <td> Read</td> </tr>  <tr> <td> rd_reg_test </td> <td> Displays the time required to read the GNPTXFSIZ register many times (the output shows the number of times the register is read). <td> Read</td> </tr>  <tr> <td> wr_reg_test </td> <td> Displays the time required to write the GNPTXFSIZ register many times (the output shows the number of times the register is written). <td> Read</td> </tr>  </table>  Example usage: To get the current mode: cat /sys/devices/lm0/mode  To power down the USB: echo 0 > /sys/devices/lm0/buspower */#include <linux/kernel.h>#include <linux/module.h>#include <linux/moduleparam.h>#include <linux/init.h>#include <linux/device.h>#include <linux/errno.h>#include <linux/types.h>#include <linux/stat.h>  /* permission constants */#include <linux/version.h>#include <asm/sizes.h>#include <asm/io.h>#include <asm/arch/lm.h>#include <asm/sizes.h>#include "linux/dwc_otg_plat.h"#include "dwc_otg_attr.h"#include "dwc_otg_driver.h"#include "dwc_otg_pcd.h"#include "dwc_otg_hcd.h"#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)/* * MACROs for defining sysfs attribute */#define DWC_OTG_DEVICE_ATTR_BITFIELD_SHOW(_otg_attr_name_,_addr_,_mask_,_shift_,_string_) \static ssize_t _otg_attr_name_##_show (struct device *_dev, struct device_attribute *attr, char *buf) \{ \	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev); \	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev);		\	uint32_t val; \	val = dwc_read_reg32 (_addr_); \	val = (val & (_mask_)) >> _shift_; \	return sprintf (buf, "%s = 0x%x\n", _string_, val); \}#define DWC_OTG_DEVICE_ATTR_BITFIELD_STORE(_otg_attr_name_,_addr_,_mask_,_shift_,_string_) \static ssize_t _otg_attr_name_##_store (struct device *_dev, struct device_attribute *attr, \					const char *buf, size_t count) \{ \	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev); \	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev); \	uint32_t set = simple_strtoul(buf, NULL, 16); \	uint32_t clear = set; \	clear = ((~clear) << _shift_) & _mask_; \	set = (set << _shift_) & _mask_; \	dev_dbg(_dev, "Storing Address=0x%08x Set=0x%08x Clear=0x%08x\n", (uint32_t)_addr_, set, clear); \	dwc_modify_reg32(_addr_, clear, set); \	return count; \}/* * MACROs for defining sysfs attribute for 32-bit registers */#define DWC_OTG_DEVICE_ATTR_REG_SHOW(_otg_attr_name_,_addr_,_string_) \static ssize_t _otg_attr_name_##_show (struct device *_dev, struct device_attribute *attr, char *buf) \{ \	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev); \	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev); \	uint32_t val; \	val = dwc_read_reg32 (_addr_); \	return sprintf (buf, "%s = 0x%08x\n", _string_, val); \}#define DWC_OTG_DEVICE_ATTR_REG_STORE(_otg_attr_name_,_addr_,_string_) \static ssize_t _otg_attr_name_##_store (struct device *_dev, struct device_attribute *attr, \					const char *buf, size_t count) \{ \	struct lm_device *lm_dev = container_of(_dev, struct lm_device, dev); \	dwc_otg_device_t *otg_dev = lm_get_drvdata(lm_dev); \	uint32_t val = simple_strtoul(buf, NULL, 16); \	dev_dbg(_dev, "Storing Address=0x%08x Val=0x%08x\n", (uint32_t)_addr_, val); \	dwc_write_reg32(_addr_, val); \	return count; \}#else/* * MACROs for defining sysfs attribute */#define DWC_OTG_DEVICE_ATTR_BITFIELD_SHOW(_otg_attr_name_,_addr_,_mask_,_shift_,_string_) \static ssize_t _otg_attr_name_##_show (struct device *_dev, char *buf) \{ \	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);\	uint32_t val; \	val = dwc_read_reg32 (_addr_); \	val = (val & (_mask_)) >> _shift_; \	return sprintf (buf, "%s = 0x%x\n", _string_, val); \}#define DWC_OTG_DEVICE_ATTR_BITFIELD_STORE(_otg_attr_name_,_addr_,_mask_,_shift_,_string_) \static ssize_t _otg_attr_name_##_store (struct device *_dev, const char *buf, size_t count) \{ \	dwc_otg_device_t *otg_dev = dev_get_drvdata(_dev);\	uint32_t set = simple_strtoul(buf, NULL, 16); \	uint32_t clear = set; \	clear = ((~clear) << _shift_) & _mask_; \	set = (set << _shift_) & _mask_; \	dev_dbg(_dev, "Storing Address=0x%08x Set=0x%08x Clear=0x%08x\n", (uint32_t)_addr_, set, clear); \	dwc_modify_reg32(_addr_, clear, set); \	return count; \}/* * MACROs for defining sysfs attribute for 32-bit registers */#define DWC_OTG_DEVICE_ATTR_REG_SHOW(_otg_attr_name_,_addr_,_string_) \static ssize_t _otg_attr_name_##_show (struct device *_dev, char *buf) \

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品传媒在线观看| 欧美三级电影网| 麻豆精品视频在线观看| 亚洲成人av一区二区| 亚洲第一搞黄网站| 强制捆绑调教一区二区| 黄一区二区三区| 高清av一区二区| 91视频免费看| 欧美二区三区的天堂| 欧美一区二区三区日韩视频| 日韩欧美中文一区二区| 久久人人超碰精品| 国产精品国产三级国产普通话99| 亚洲少妇最新在线视频| 午夜精品久久久久久久久| 五月婷婷激情综合网| 麻豆91在线观看| 成人性生交大片免费看在线播放| 在线观看www91| 精品久久久久99| 综合久久久久久久| 蜜臀精品久久久久久蜜臀| 国产麻豆视频精品| 91成人看片片| 久久综合资源网| 亚洲欧美另类在线| 蜜桃视频在线一区| 色婷婷精品大在线视频| 日韩欧美高清一区| 一区二区在线观看视频| 老司机午夜精品| 91浏览器打开| 久久午夜色播影院免费高清| 日韩一区有码在线| 精品一区二区三区的国产在线播放| 成人网在线免费视频| 欧美丝袜自拍制服另类| 国产日产欧美精品一区二区三区| 一区二区三区欧美日| 久久精品久久99精品久久| 色婷婷久久综合| 久久久精品中文字幕麻豆发布| 亚洲国产精品影院| 成人小视频免费观看| 制服丝袜一区二区三区| 亚洲另类一区二区| 波多野结衣一区二区三区| 欧美一级片在线观看| 亚洲欧美色综合| 成人丝袜视频网| 精品成人一区二区| 日韩成人av影视| 欧美特级限制片免费在线观看| 国产女主播一区| 国产一区二区三区免费| 日韩三级高清在线| 天堂成人免费av电影一区| 91老司机福利 在线| 久久一区二区三区四区| 日本在线不卡一区| 欧美老人xxxx18| 亚洲一二三级电影| 91猫先生在线| 亚洲乱码国产乱码精品精98午夜| 成人精品国产一区二区4080| 久久这里都是精品| 国产精品一区久久久久| 久久久久九九视频| 国产成人鲁色资源国产91色综| 欧美一区二区三区色| 日韩精品欧美成人高清一区二区| 在线视频你懂得一区二区三区| 亚洲男人天堂av| 91精品1区2区| 亚洲国产精品视频| 欧美日韩成人综合天天影院| 日韩专区在线视频| 日韩女优制服丝袜电影| 麻豆免费看一区二区三区| 精品国偷自产国产一区| 国内不卡的二区三区中文字幕 | 日韩av电影免费观看高清完整版 | 在线观看av不卡| 亚洲大片在线观看| 91精品国产综合久久国产大片| 喷水一区二区三区| 国产免费成人在线视频| 波多野结衣中文字幕一区二区三区 | 精品亚洲porn| 欧美国产精品中文字幕| 97久久久精品综合88久久| 亚洲自拍偷拍图区| 日韩欧美激情在线| 成人黄页毛片网站| 午夜精品一区二区三区电影天堂| 91精品国产综合久久精品app| 精品一区二区久久| 亚洲三级久久久| 欧美色图激情小说| 国产精品主播直播| 亚洲精品乱码久久久久久久久| 678五月天丁香亚洲综合网| 国产乱对白刺激视频不卡| 一区二区在线看| 久久久亚洲欧洲日产国码αv| 91一区二区在线| 喷水一区二区三区| 一区二区在线观看视频| 精品久久一区二区| 色先锋资源久久综合| 久久99久久精品| 一区二区三区中文字幕在线观看| 日韩欧美亚洲一区二区| 色88888久久久久久影院野外| 久久精品久久精品| 亚洲午夜三级在线| 中文字幕亚洲欧美在线不卡| 欧美日韩综合色| 不卡视频一二三四| 国产最新精品免费| 天天综合色天天综合色h| 中文字幕巨乱亚洲| wwwwxxxxx欧美| 5566中文字幕一区二区电影| 成人h动漫精品| 国产黄色成人av| 美女性感视频久久| 午夜影院久久久| 一区二区三区不卡在线观看| 2020国产精品自拍| 欧美成人一区二区三区片免费 | 国产午夜精品福利| 3d动漫精品啪啪一区二区竹菊| 99久久久无码国产精品| 久久99国内精品| 日本特黄久久久高潮| 亚洲图片欧美综合| 亚洲一区二区综合| 亚洲精品菠萝久久久久久久| 中文字幕av资源一区| 久久亚洲春色中文字幕久久久| 精品欧美黑人一区二区三区| 欧美人与禽zozo性伦| 欧美日韩大陆一区二区| 欧美在线影院一区二区| 欧洲一区在线观看| 欧美视频你懂的| 欧美久久久久久久久| 欧美三级在线视频| 69久久99精品久久久久婷婷| 3d动漫精品啪啪一区二区竹菊| 在线成人午夜影院| 欧美不卡一二三| 久久婷婷成人综合色| 国产天堂亚洲国产碰碰| 国产欧美日韩视频一区二区| 久久精品亚洲乱码伦伦中文 | 美女性感视频久久| 精品一区二区免费在线观看| 国产精品影音先锋| 波波电影院一区二区三区| 不卡区在线中文字幕| 91麻豆文化传媒在线观看| 91福利小视频| 日韩女优av电影| 久久精品男人天堂av| 91精品国产综合久久久蜜臀粉嫩| 国产精品欧美经典| 亚洲柠檬福利资源导航| 亚洲国产三级在线| 日本午夜一区二区| 福利一区二区在线| 91丨国产丨九色丨pron| 欧美午夜片在线观看| 欧美r级在线观看| 国产精品美女久久久久aⅴ| 一区二区三区免费观看| 亚洲成年人影院| 国产精品亚洲第一区在线暖暖韩国| 99久久久免费精品国产一区二区| 欧美人妖巨大在线| 国产精品视频观看| 偷拍日韩校园综合在线| 国产一二精品视频| 欧美亚洲丝袜传媒另类| 久久久久久久久99精品| 亚洲美女偷拍久久| 九色综合国产一区二区三区| www.亚洲色图| 日韩精品专区在线| 亚洲视频一区二区在线观看| 免费久久精品视频| 色88888久久久久久影院野外| 欧美sm极限捆绑bd| 三级欧美韩日大片在线看| 国产一区二区三区精品视频| 欧美男人的天堂一二区| 国产精品成人免费| 精久久久久久久久久久|