Actually this example breaks one of the fundamental rules of using an I2C library - almost everything you do returns a code to say whether it worked or not. Presumably for brevity, this example just calls the functions and ignores their return values - you shouldn't.

What VERY curious code. Why are you assigning the address of the i2c_readAck function through the adre pointer?? Surely you meant to INVOKE the function:

*adre = i2c_readAck();

but if that is the case what is:

while(!(TWCR & (1<<TWINT)));

doing there? The whole point of using a library is that you don't need to do anything local with the registers/bits. If you want to wait for this condition there should be a library function to do that.

Also you seem to have selectively copied just some of Fleury's library into your own program. That is not the way to use library code like this. All you had to do was add twimaster.c to the list of files in your project then you can call any of the functions in the library - this keeps things nice and modular (and means the library can easily be updated if there's ever a bugfix or improvement released).

Normally, as you may know, library contains a .c file and a .h file: you need both to use this library or you can simple add the *.c file and then add your header...call functions fro there in your main.c or whatever you call it

When i debug i call function i2c_start i set start condition in to TWSR, you can see START and ENEABLE bit is 1. TWINT flag set HW after every TWI operation is done. Theoretical after HW set TWINT flag i get status code in TWSR right ? I am running simulator so may i somehow get in next statement ?