/*
 * internal_EEPROM.h
 *
 * Created: 22.4.2013 14:21:53
 *  Author: Kubrt
 */ 


#ifndef INTERNAL_EEPROM_H_
#define INTERNAL_EEPROM_H_


void internal_EEPROM_write(unsigned int uiAddress, unsigned char ucData)
{
	while(EECR & (1<<EEWE))
		;
	EEAR = uiAddress;
	EEDR = ucData;
	EECR |= (1<<EEMWE);
	EECR |= (1<<EEWE);
}


unsigned char internal_EEPROM_read(unsigned int uiAddress)
{
	while(EECR & (1<<EEWE))
		;
	EEAR = uiAddress;
	EECR |= (1<<EERE);
	return EEDR;
}

#endif /* INTERNAL_EEPROM_H_ */