资源简介
dw i2c master control driver!
代码片段和文件信息
/* --------------------------------------------------------------------
**
** Synopsys DesignWare DW_apb_i2c Software Driver Kit 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.
**
** --------------------------------------------------------------------
*/
#include “DW_common.h“ // common header for all drivers
#include “DW_apb_i2c_public.h“ // DW_apb_i2c public header
#include “DW_apb_i2c_private.h“ // DW_apb_i2c private header
// This definition is used by the assetion macros to determine the
// current file name. It is defined in the DW_common_dbc.h header.
DW_DEFINE_THIS_FILE;
/**********************************************************************/
int dw_i2c_init(struct dw_device *dev)
{
int retval;
I2C_COMMON_REQUIREMENTS(dev);
// disable device
retval = dw_i2c_disable(dev);
// if device is not busy (i.e. it is now disabled)
if(retval == 0) {
// disable all interrupts
dw_i2c_maskIrq(dev I2c_irq_all);
dw_i2c_clearIrq(dev I2c_irq_all);
// reset instance variables
dw_i2c_resetInstance(dev);
// autoConfigure component parameters if possible
retval = dw_i2c_autoCompParams(dev);
}
return retval;
}
/**********************************************************************/
void dw_i2c_enable(struct dw_device *dev)
{
uint32_t reg;
struct dw_i2c_portmap *portmap;
I2C_COMMON_REQ
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 92193 2017-01-13 10:08 DW_apb_i2c.c
----------- --------- ---------- ----- ----
92193 1
相关资源
- Driver Reviver 驱动管理工具 v4.0.1.60 官方
- sas卡驱动,用于lsi的sas卡
- PC Camera Driver 官方版
- TeraJDBC__indep_indep.16.20.00.06.zip
- Fuse_Drivers_x64.
- MCP3421 STM32 Driver
- ADS1100 STM32 Driver
- chromedriver
- chromedriver_2.38
- 纯dos622操作系统下的光驱驱动程序,
- Qualcomm HS USB Driver
- ftdi cdm drivers v2.12.0 官方WHQL版
- (PSP录制屏幕)USBHost_driver
- Quectel LTE USB win Driver
- Quectel_Windows_USB_Drivers_for_EC21&EC25;_V1.
- pl2303_driverinstallerv1.7.0
- Intel Driver Update Utility v2.7.1.1.zip
- Display Driver Uninstaller v18.0.1.4.zip
- 虚拟串口破解版 VirtualSerialPortDriver8
- PCAN_USB_Win_x64-driver.rar
- chromedriver_win32适用于 72.0.3626.119正式版
- WindriverPCIE驱动
- Virtual Serial Port Driver 6 9 注册 破解版
- Cy7c68013a在Win7下驱动x64和x86
- hdmi输入芯片SiI9134/SiI9135的数据手册及
- STM32F103 SX1278完整的通讯程序+sx12xxDr
- Linux Device Driver Development
- (支持Windows8/8.1)(32位/64位)PL230
- Virtual Serial Port Driver.zip
- 驱动开发工具=DebugView+DriverMonitor+IRP
评论
共有 条评论