⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exti2cinterface.h

📁 完整的基于Conxant平台的USB电视棒的WIN驱动程序。
💻 H
字号:
/*+++ *******************************************************************\ 
* 
*  Copyright and Disclaimer: 
*  
*     --------------------------------------------------------------- 
*     This software is provided "AS IS" without warranty of any kind, 
*     either expressed or implied, including but not limited to the 
*     implied warranties of noninfringement, merchantability and/or 
*     fitness for a particular purpose.
*     --------------------------------------------------------------- 
*   
*     Copyright (c) 2008 Conexant Systems, Inc. 
*     All rights reserved. 
*
\******************************************************************* ---*/ 
#ifndef _ANALOG_I2C_H_
#define _ANALOG_I2C_H_

extern "C" 
{
#include <wdm.h>
}

#include <windef.h>

#include "i2cIF.h"
#include "DriverI2C.h"

class ExtI2CInterface: public I2cIF
{
public:
    ExtI2CInterface(DriverI2C* p_driver_i2c,DWORD rev_id);
    ~ExtI2CInterface();

    // Increments the reference count for the calling interface on an 
    // object. QueryInferface calls addRef on the returned interface 
    // pointer on behalf of the caller.
    virtual INT       addRef();
    // Decrements the reference count for the calling interface 
    // on a object. If the reference count on the object falls 
    // to 0, the object is freed from memory.
    virtual INT       release();
    virtual NTSTATUS setCommandFormat(BOOLEAN first,BOOLEAN last);

    virtual BOOLEAN read( 
        BYTE   device_adr, 
        INT    size, 
        BYTE  *p_buf);

    virtual BOOLEAN write( 
        BYTE   device_adr, 
        INT    size, 
        BYTE  *p_buf);

    virtual BOOLEAN writeThenRead( 
        BYTE        device_adr, 
        INT         write_size, 
        const BYTE *p_write_buf,
        INT         read_size,
        BYTE       *p_read_buf);

    DWORD maxTransferSize() { return 0x7FFFFFFF; }

protected:
private:


private:

    DriverI2C*      _p_driver_i2c;
    DWORD _rev_id;

};


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -