40#ifndef ATMEGA_I_TWO_C_DOT_H
41#define ATMEGA_I_TWO_C_DOT_H
void init_i2c(uint32_t bus_speed)
Sets pullups and initializes i2c clock to desired bus speed.
void i2c_wait_for_complete(void)
Loops until the i2c message is complete, as 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).