LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
Functions
eeprom.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned char eeprom_get_char (unsigned int addr)
 Read byte from EEPROM. More...
 
void eeprom_put_char (unsigned int addr, unsigned char new_value)
 Write byte to EEPROM. More...
 
void memcpy_to_eeprom_with_checksum (unsigned int destination, char *source, unsigned int size)
 
int memcpy_from_eeprom_with_checksum (char *destination, unsigned int source, unsigned int size)
 

Function Documentation

◆ eeprom_get_char()

unsigned char eeprom_get_char ( unsigned int  addr)

Read byte from EEPROM.

This function reads one byte from a given EEPROM address.

Note
The CPU is halted for 4 clock cycles during EEPROM read.
Parameters
addrEEPROM address to read from.
Returns
The byte read from the EEPROM address.

Definition at line 49 of file eeprom.c.

◆ eeprom_put_char()

void eeprom_put_char ( unsigned int  addr,
unsigned char  new_value 
)

Write byte to EEPROM.

This function writes one byte to a given EEPROM address. The differences between the existing byte and the new value is used to select the most efficient EEPROM programming mode.

Note
The CPU is halted for 2 clock cycles during EEPROM programming.
When this function returns, the new EEPROM value is not available until the EEPROM programming time has passed. The EEPE bit in EECR should be polled to check whether the programming is finished.
The EEPROM_GetChar() function checks the EEPE bit automatically.
Parameters
addrEEPROM address to write to.
new_valueNew EEPROM value.

Definition at line 74 of file eeprom.c.

◆ memcpy_from_eeprom_with_checksum()

int memcpy_from_eeprom_with_checksum ( char *  destination,
unsigned int  source,
unsigned int  size 
)

Definition at line 140 of file eeprom.c.

◆ memcpy_to_eeprom_with_checksum()

void memcpy_to_eeprom_with_checksum ( unsigned int  destination,
char *  source,
unsigned int  size 
)

Definition at line 130 of file eeprom.c.