diff options
| author | QMK Bot <hello@qmk.fm> | 2024-06-10 00:24:00 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2024-06-10 00:24:00 +0000 |
| commit | e381f91c6e69d2e73a978e4ce8a838db3bc40e23 (patch) | |
| tree | 64ae5c80a0af8162622edcf4665284992d35714c /platforms | |
| parent | d4f8b478aaf18cd2f81ae1b3c9d2dd910a0b2dfa (diff) | |
| parent | 8b5cdfabf5d05958a607efa174e64377d36e4b64 (diff) | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'platforms')
| -rw-r--r-- | platforms/eeprom.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/platforms/eeprom.h b/platforms/eeprom.h index 8e69eecc4c..067fa01616 100644 --- a/platforms/eeprom.h +++ b/platforms/eeprom.h | |||
| @@ -22,9 +22,14 @@ void eeprom_update_dword(uint32_t *__p, uint32_t __value); | |||
| 22 | void eeprom_update_block(const void *__src, void *__dst, size_t __n); | 22 | void eeprom_update_block(const void *__src, void *__dst, size_t __n); |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | static inline void eeprom_write_qword(uint64_t *__p, uint64_t __value) { | 25 | // While newer avr-libc versions may have an implementation |
| 26 | eeprom_update_block(&__value, __p, sizeof(uint64_t)); | 26 | // use preprocessor as to not cause conflicts |
| 27 | } | 27 | #undef eeprom_write_qword |
| 28 | #define eeprom_write_qword(__p, __value) \ | ||
| 29 | do { \ | ||
| 30 | uint64_t tmp = __value; \ | ||
| 31 | eeprom_update_block(&tmp, __p, sizeof(uint64_t)); \ | ||
| 32 | } while (0) | ||
| 28 | 33 | ||
| 29 | #if defined(EEPROM_CUSTOM) | 34 | #if defined(EEPROM_CUSTOM) |
| 30 | # ifndef EEPROM_SIZE | 35 | # ifndef EEPROM_SIZE |
