#ifndef I2C_H
#define I2C_H

#ifdef __cplusplus
extern "C" {
#endif
  
#include "system.h"

#define BUFFER_SIZE                  32
#define I2C_IDLE                     0
#define I2C_BUSY                     1

#define I2C_MASTER_READ              1
#define I2C_MASTER_WRITE             0
  
void i2c0_init(void);
void i2c0_write_byte(uint8_t value);
void i2c0_read_multi_byte(uint8 *data, uint8 length);
void i2c0_write_register(uint8 reg_address, uint16 value);

#ifdef __cplusplus
};
#endif

#endif