/**************************************************************************** * File: i2c.h * * Project: Header file for i2c communication module * * Author: Kim H. Pedersen * * Purpose: Send and receive characters on serial line using the functions * * - init_serial: Initialize communication module * * - send: Send size bytes from buffer * * - receive: Receive size bytes into buffer * * History: 21/01-05 KHPe Created * ****************************************************************************/ #ifndef _I2C_H_ #define _I2C_H_ // #define ReStartI2C StartI2C typedef struct{ char DevAddr; char NoBytes; char *IOBuffer; int RWAddress; char WrInProgress; }RWStruct; void InitI2C(void); char StartI2C(char I2CADD); char ReStartI2C(char I2CADD); void StopI2C(void); char WriteI2CByte(char I2CByte); char ReadI2CByte(char LastRead); char WriteI2C(RWStruct *IOStruct); //char DevAddr, char NoBytes, char *WriteBuffer); char ReadI2C(RWStruct *IOStruct); //char DevAddr, char NoBytes, char *ReadBuffer); #endif /* _I2C_H_ */