Introduction - If you have any usage issues, please Google them yourself
This article describes how to write a driver for the AVR's TWI (I2C) under GCC. The whole source code and the method of use are given.
Packet : 95302919the_driver_for_twi(i2c)_in_avr.rar filelist
the_driver_for_TWI(I2C)_in_AVR.pdf