84 #if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
85 #error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
120 extern unsigned char i2c_start(
unsigned char addr);
149 extern unsigned char i2c_write(
unsigned char data);
173 extern unsigned char i2c_read(
unsigned char ack);
174 #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
unsigned char i2c_rep_start(unsigned char addr)
Issues a repeated start condition and sends address and transfer direction.
void i2c_stop(void)
Terminates the data transfer and releases the I2C bus.
unsigned char i2c_readNak(void)
read one byte from the I2C device, read is followed by a stop condition
unsigned char i2c_start(unsigned char addr)
Issues a start condition and sends address and transfer direction.
void i2c_init(void)
initialize the I2C master interace. Need to be called only once
unsigned char i2c_write(unsigned char data)
Send one byte to I2C device.
unsigned char i2c_readAck(void)
read one byte from the I2C device, request more data from device
void i2c_start_wait(unsigned char addr)
Issues a start condition and sends address and transfer direction.