Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
e381f91c6e
1 changed files with 8 additions and 3 deletions
|
@ -22,9 +22,14 @@ void eeprom_update_dword(uint32_t *__p, uint32_t __value);
|
||||||
void eeprom_update_block(const void *__src, void *__dst, size_t __n);
|
void eeprom_update_block(const void *__src, void *__dst, size_t __n);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void eeprom_write_qword(uint64_t *__p, uint64_t __value) {
|
// While newer avr-libc versions may have an implementation
|
||||||
eeprom_update_block(&__value, __p, sizeof(uint64_t));
|
// use preprocessor as to not cause conflicts
|
||||||
}
|
#undef eeprom_write_qword
|
||||||
|
#define eeprom_write_qword(__p, __value) \
|
||||||
|
do { \
|
||||||
|
uint64_t tmp = __value; \
|
||||||
|
eeprom_update_block(&tmp, __p, sizeof(uint64_t)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#if defined(EEPROM_CUSTOM)
|
#if defined(EEPROM_CUSTOM)
|
||||||
# ifndef EEPROM_SIZE
|
# ifndef EEPROM_SIZE
|
||||||
|
|
Loading…
Reference in a new issue