This header file declares the interface to some simple library routines suitable for handling the data EEPROM contained in the AVR microcontrollers. The implementation uses a simple polled mode interface. Applications that require interrupt-controlled EEPROM access to ensure that no time will be wasted in spinloops will have to deploy their own implementation.
|
avr-libc declarations |
#define | eeprom_is_ready() bit_is_clear(EECR, EEWE) |
#define | eeprom_busy_wait() do {} while (!eeprom_is_ready()) |
uint8_t | eeprom_read_byte (const uint8_t *addr) |
uint16_t | eeprom_read_word (const uint16_t *addr) |
void | eeprom_read_block (void *buf, const void *addr, size_t n) |
void | eeprom_write_byte (uint8_t *addr, uint8_t val) |
void | eeprom_write_word (uint16_t *addr, uint16_t val) |
void | eeprom_write_block (const void *buf, void *addr, size_t n) |
IAR C compatibility defines |
#define | _EEPUT(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val)) |
#define | _EEGET(var, addr) (var) = eeprom_read_byte ((uint8_t *)(addr)) |