36#define _AVR_EEPROM_H_ 1
40#if !E2END && !defined(__DOXYGEN__) && !defined(__COMPILING_AVR_LIBC__)
41# warning "Device does not have EEPROM available."
44#if defined (EEAR) && !defined (EEARL) && !defined (EEARH)
99# define __ATTR_PURE__ __attribute__((__pure__))
107#define EEMEM __attribute__((__section__(".eeprom")))
113#if defined (__DOXYGEN__)
114# define eeprom_is_ready()
115#elif defined (NVM_STATUS)
116# define eeprom_is_ready() bit_is_clear (NVM_STATUS, NVM_NVMBUSY_bp)
117#elif defined (NVMCTRL_STATUS)
118# define eeprom_is_ready() bit_is_clear (NVMCTRL_STATUS, NVMCTRL_EEBUSY_bp)
120# define eeprom_is_ready() bit_is_clear (DEECR, BSY)
122# define eeprom_is_ready() bit_is_clear (EECR, EEPE)
124# define eeprom_is_ready() bit_is_clear (EECR, EEWE)
133#define eeprom_busy_wait() do {} while (!eeprom_is_ready())
154#if defined(__DOXYGEN__) || __SIZEOF_LONG_LONG__ == 8
166#if defined(__DOXYGEN__)
168#elif __SIZEOF_DOUBLE__ == 4
170#elif __SIZEOF_DOUBLE__ == 8
177#if defined(__DOXYGEN__)
179#elif __SIZEOF_LONG_DOUBLE__ == 4
181#elif __SIZEOF_LONG_DOUBLE__ == 8
210#if defined(__DOXYGEN__) || __SIZEOF_LONG_LONG__ == 8
222#if defined(__DOXYGEN__)
224#elif __SIZEOF_DOUBLE__ == 4
226#elif __SIZEOF_DOUBLE__ == 8
233#if defined(__DOXYGEN__)
235#elif __SIZEOF_LONG_DOUBLE__ == 4
237#elif __SIZEOF_LONG_DOUBLE__ == 8
266#if defined(__DOXYGEN__) || __SIZEOF_LONG_LONG__ == 8
278#if defined(__DOXYGEN__)
280#elif __SIZEOF_DOUBLE__ == 4
282#elif __SIZEOF_DOUBLE__ == 8
289#if defined(__DOXYGEN__)
291#elif __SIZEOF_LONG_DOUBLE__ == 4
293#elif __SIZEOF_LONG_DOUBLE__ == 8
310#define _EEPUT(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val))
315#define __EEPUT(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val))
320#define _EEGET(var, addr) (var) = eeprom_read_byte ((const uint8_t *)(addr))
325#define __EEGET(var, addr) (var) = eeprom_read_byte ((const uint8_t *)(addr))
void eeprom_write_dword(uint32_t *__p, uint32_t __value)
void eeprom_read_block(void *__dst, const void *__src, size_t __n)
void eeprom_update_float(float *__p, float __value)
void eeprom_update_word(uint16_t *__p, uint16_t __value)
void eeprom_write_long_double(long double *__p, long double __value)
void eeprom_write_word(uint16_t *__p, uint16_t __value)
uint8_t eeprom_read_byte(const uint8_t *__p)
double eeprom_read_double(const double *__p)
long double eeprom_read_long_double(const long double *__p)
uint16_t eeprom_read_word(const uint16_t *__p)
void eeprom_update_byte(uint8_t *__p, uint8_t __value)
void eeprom_write_byte(uint8_t *__p, uint8_t __value)
void eeprom_update_double(double *__p, double __value)
void eeprom_update_long_double(long double *__p, long double __value)
void eeprom_update_qword(uint64_t *__p, uint64_t __value)
void eeprom_update_block(const void *__src, void *__dst, size_t __n)
void eeprom_update_dword(uint32_t *__p, uint32_t __value)
void eeprom_write_qword(uint64_t *__p, uint64_t __value)
float eeprom_read_float(const float *__p)
void eeprom_write_block(const void *__src, void *__dst, size_t __n)
void eeprom_write_float(float *__p, float __value)
void eeprom_write_double(double *__p, double __value)
uint64_t eeprom_read_qword(const uint64_t *__p)
uint32_t eeprom_read_dword(const uint32_t *__p)
unsigned int uint16_t
Definition: stdint.h:93
unsigned long int uint32_t
Definition: stdint.h:103
unsigned char uint8_t
Definition: stdint.h:83
unsigned long long int uint64_t
Definition: stdint.h:117