#ifndef    _I2C_H_
#define    _I2C_H_
#include "i2c_drv.h"


#define     SDA_High                   	I2C_WriteGpioData(I2C_SDA,1)					
#define     SDA_Low                     I2C_WriteGpioData(I2C_SDA,0)						
#define     SCL_High                    I2C_WriteGpioData(I2C_SCL,1)
#define     SCL_Low                     I2C_WriteGpioData(I2C_SCL,0)
#define     GetSDABit                   I2C_ReadGpioData(I2C_SDA)

#define     SDA_OUTPUT                   I2C_ConfigGpio(I2C_SDA,GPIO_OUTPUT)				
#define     SDA_INPUT                    I2C_ConfigGpio(I2C_SDA,GPIO_INPUT)

#define 		I2C_addr				 0x28

u8 I2C_Start(void);
void I2C_Stop(void);

void I2C_SendAck(void);
void I2C_SendNoAck();
u8 I2C_WaitAck(void);

u8 I2C_write_byte(const u8 s);
u8 I2C_read_byte(void);

u8 I2C_BufferWrite(u8* pBuffer, u8 WriteAddr, u16 NumByte);
u8 I2C_BufferRead(u8* pBuffer, u8 ReadAddr, u16 NumByte);




















#endif /* I2C_H_ */