I2C fundamental

uint8_t I2C_Start(void)
{
	TWCR=(1<<TWEN)|(1<<TWINT)|(1<<TWSTA); //--- TWI Interrupt disable, TWI enable, TWI Start
	while(!(TWCR&(1<<TWINT)));           //--- Wait until start condition is executed
	return(TWSR&0xF8);
}
void I2C_Stop(void)	
{
    TWCR=(1<<TWSTO)|(1<<TWINT)|(1<<TWEN);//--- TWI Interrupt disable, TWI enable, TWI Stop
    while(TWCR&(1<<TWSTO));	              //--- Wait until stop condition execution
}
uint8_t I2C_Write(char data)
{
	TWDR=data;
	TWCR=(1<<TWEN)|(1<<TWINT);            //--- TWI Interrupt disable, TWI enable
	while(!(TWCR&(1<<TWINT)));            //--- Wait until start condition is executed
	return(TWSR&0xF8);
}
char I2C_Read_Ack(void)	
{
    TWCR=(1<<TWEN)|(1<<TWINT)|(1<<TWEA); //--- TWI Interrupt disable, TWI enable, TWI Accknowledge
    while(!(TWCR&(1<<TWINT)));           //--- Wait until transmit is complete
    return TWDR;			             //--- Return received data
}
char I2C_Read_Nack(void)		
{
    TWCR=(1<<TWEN)|(1<<TWINT);	//--- TWI Interrupt disable, TWI enable
    while(!(TWCR&(1<<TWINT)));	//--- Wait until transmit is complete
    return TWDR;		        //--- Return received data
}