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

📄 i2c_control.h

📁 一个LCD TV的源程序, 用的是realtek的IC
💻 H
字号:
/*********************************************************************

      COPYRIGHT  (C)  Himax Technologies, Inc.

      File name     : i2c_control.h

      Description   : Declare S1 relative I2C control function

      Author        :

      Create date   :

      Modifications :

*********************************************************************/

#ifndef _I2C_CONTROL_H
#define _I2C_CONTROL_H

/********************** Include Section *****************************/

// Internal Function: _nop_();
#include "intrins.h"
#include "mcu_io.h"
#include "common.h"

/******************* External Function Process  *********************/

#undef EXTERN

#ifdef _I2C_CONTROL_C
    #define EXTERN
#else
    #define EXTERN extern
#endif


/******************* Define Register or Constant ********************/

#define		I2C_W 		0
#define 	I2C_R		1

/**************** Function Prototype Declaration ********************/

EXTERN  void     Init_I2C(void);
EXTERN  void     Start(void);
EXTERN  void     Stop(void);
EXTERN  Bool     Write(Byte byData);
EXTERN  Byte     Read(void);
EXTERN  Bool     I2CWriteByte(Byte device, Byte subadr0, Byte c);
EXTERN  Bool     I2CWrite2Byte(Byte device, Byte subadr0, Byte c1, Byte c2);
EXTERN  Bool     I2CWrite3Byte(Byte, Byte, Byte, Byte, Byte);
EXTERN  Byte     I2CReadByte(Byte device, Byte subaddress);
EXTERN  Bool     I2CWrtCNByte(Byte byDEV, Byte code *ptr, Byte byStartReg, Byte byLen);
EXTERN  Bool     I2CWrtHead(Byte device, Byte subadr);
//EXTERN  Bool     I2CReadWord( Byte device , Byte subaddress, Word  idata *c);
EXTERN  Word     ReadWord(void);

/************************ End of File  ******************************/
#endif

⌨️ 快捷键说明

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