iic.h

来自「在CCS环境下的一个视频采集源代码」· C头文件 代码 · 共 86 行

H
86
字号
/***********************************************************/
/*  Copyright 2003 by SEED Incorporated.				   */
/*  All rights reserved. Property of SEED Incorporated.    */ 
/*  											           */
/***********************************************************/
#ifndef _IIC_H  
#define _IIC_H

#include <std.h>
#include <csl_stdinc.h>
#include <csl_i2c.h>

#ifdef __cplusplus
extern "C" {
#endif

//
// ======== ATMega88_IIC_ series functions ========
//
void Mega88_IIC_write(I2C_Handle hI2C,
              Uint8   devAddress,
              Uint8   data1,
              Uint8   data2
              );

void Mega88_IIC_read(I2C_Handle hI2C,
              Uint8 devAddress,
              Uint8 *data
              );

//
//==============Eeprom_IIC_ series function========
//
void Eeprom_IIC_read(I2C_Handle hI2C,
              Uint8 devAddress,
              Uint32  subAddress1,
              Uint32  subAddress2,
              Uint8 *data
              );

void Eeprom_IIC_write(I2C_Handle hI2C,
              Uint8 devAddress,
			  Uint32 subAddress1,
			  Uint32 subAddress2,
              Uint8 data
              );

//
// ======== SEED_IIC_ series functions ========
//
void SEED_IIC_write(I2C_Handle hI2C,
              Uint8   devAddress,
              Uint32  subAddress,
              Uint8   data
              );

void SEED_IIC_read(I2C_Handle hI2C,
              Uint8 devAddress,
              Uint32  subAddress,
              Uint8 *data
              );
              
//
// ======== _IIC_ series functions ========
//
void _IIC_write(I2C_Handle hI2C,
              Uint8   devAddress,
              Uint32  subAddress,
              Uint8   *data,
              Uint16  numBytes
              );

void _IIC_read(I2C_Handle hI2C,
              Uint8   devAddress,
              Uint32  subAddress,
              Uint8   *data,
              Uint16  numBytes
              );

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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