/*
 * i2c.h
 *
 * Created: 20.02.2019 20:40:45
 *  Author: jens
 */ 


#ifndef I2C_H_
#define I2C_H_

#include <stdlib.h>

enum I2C
{
	I2C_START = 0x08,
	I2C_REPEATED_START = 0x10,
	I2C_SLA_ACK = 0x18,
	I2C_SLA_NACK = 0x20,
	I2C_DATA_ACK = 0x28,
	I2C_DATA_NACK = 0x30,
	I2C_LOST = 0x38,
	I2C_READ = 0x01,
	I2C_WRITE = 0x00
};

void i2c_init();
void i2c_send(uint8_t addr, uint8_t rw, uint8_t *data, size_t size);

#endif /* I2C_H_ */