48 #define I2C_HIGH_SPEED 0
51 #define I2C_START 0x08
52 #define I2C_REP_START 0x10
53 #define I2C_MT_SLA_ACK 0x18
54 #define I2C_MT_DATA_ACK 0x28
55 #define I2C_MR_SLA_ACK 0x40
56 #define I2C_MR_DATA_ACK 0x50
57 #define I2C_MR_DATA_NACK 0x58
63 int8_t i2c_start(uint8_t addr);
64 int8_t i2c_rep_start(uint8_t addr);
65 int8_t i2c_write(uint8_t data);
66 int8_t i2c_read(uint8_t *data, uint8_t ack);
67 int8_t i2c_read_ack(uint8_t *data);
68 int8_t i2c_read_nack(uint8_t *data);