void init_i2c(uint32_t bus_speed)
Sets pullups and initializes bus speed to desired bus speed.
void i2c_wait_for_complete(void)
Waits until the hardware sets the TWINT flag.
uint8_t i2c_read_no_ack(void)
Read in from slave, sending NOACK when done (no TWEA).
uint8_t i2c_read_ack(void)
Read in from slave, sending ACK when done (sets TWEA).
void i2c_stop(void)
Sends a stop condition (sets TWSTO).
void i2c_send(uint8_t data)
Loads data, sends it out, waiting for completion.
void i2c_start(void)
Sends a start condition (sets TWSTA).