5.4. Function Reference

5.4.1. eeprom_is_ready

#include <eeprom.h>
	    

int eeprom_is_ready(void);

description. This function indicates when the eeprom is able to be accessed. When an EEPROM location is written to, the entire EEPROM become unavailable for up to 4 milliseconds. Unlike some other microcontrollers, the AVR processors use hardware timers to program EEPROM cells. A status bit is provided to give an application the state of the EEPROM. This function allows an application to poll the status to find out when the memory is accessible.

5.4.2. eeprom_rb

#include <eeprom.h>
	    

uint8_t eeprom_rb(uint16_t addr);

description. Reads a single byte from the EEPROM. The parameter addr specifies the location to read. The maximum address that can be specified depends upon the device. A macro has been defined to provide compatibility with the IAR compiler. Using the macro _EEGET(addr) will actually call this function.

5.4.3. eeprom_read_block

#include <eeprom.h>
	    

void eeprom_read_block(void* buf, uint16_t addr, size_t n);

description. Reads a block of EEPROM memory. The starting address of the EEPROM block is specified in the addr parameter. The maximum address depends upon the device. The number of bytes to transfer is indicated by the n parameter. The data is transferred to an SRAM buffer, the starting address of which is passed in the buf argument.

5.4.4. eeprom_rw

#include <eeprom.h>
	    

uint16_t eeprom_rw(uint16_t addr);

description. Reads a 16-bit value from the EEPROM. The data is assumed to be in little endian format. The parameter addr specifies the location to read. The maximum address that can be specified depends upon the device.

5.4.5. eeprom_wb

#include <eeprom.h>
	    

void eeprom_wb(uint16_t addr, uint8_t val);

description. Writes a value, val, to the EEPROM. The value is written to address addr. To be compatible with the IAR compiler, a macro has been defined. _EEPUT(addr, val) will expand to a call to eeprom_wb().