#ifndef _I2C_H #define _I2C_H #include #define TRUE 1 #define FALSE 0 typedef enum { TWI_SUCCESS = 0, TWI_TIMEOUT, TWI_ERROR } twi_stats_t; typedef enum { TWI_ACK = 0, TWI_NACK } twi_ask_t; void I2C_Init(void); void I2C_Close(void); twi_stats_t I2C_Start(void); twi_stats_t I2C_Stop(void); twi_stats_t I2C_WriteByte(uint8_t data); twi_stats_t I2C_ReadByte(uint8_t *data, twi_ask_t ack); #endif