diff options
| -rw-r--r-- | drivers/eeprom/eeprom_transient.h | 2 | ||||
| -rw-r--r-- | tmk_core/common/arm_atsam/eeprom.c | 2 | ||||
| -rw-r--r-- | tmk_core/common/chibios/eeprom_teensy.c | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/eeprom/eeprom_transient.h b/drivers/eeprom/eeprom_transient.h index ca9d634f0..d06189b24 100644 --- a/drivers/eeprom/eeprom_transient.h +++ b/drivers/eeprom/eeprom_transient.h | |||
| @@ -21,5 +21,5 @@ | |||
| 21 | */ | 21 | */ |
| 22 | #ifndef TRANSIENT_EEPROM_SIZE | 22 | #ifndef TRANSIENT_EEPROM_SIZE |
| 23 | # include "eeconfig.h" | 23 | # include "eeconfig.h" |
| 24 | # define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO | 24 | # define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO |
| 25 | #endif | 25 | #endif |
diff --git a/tmk_core/common/arm_atsam/eeprom.c b/tmk_core/common/arm_atsam/eeprom.c index a69f38282..ccd5d15a5 100644 --- a/tmk_core/common/arm_atsam/eeprom.c +++ b/tmk_core/common/arm_atsam/eeprom.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | #ifndef EEPROM_SIZE | 19 | #ifndef EEPROM_SIZE |
| 20 | # include "eeconfig.h" | 20 | # include "eeconfig.h" |
| 21 | # define EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO | 21 | # define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO |
| 22 | #endif | 22 | #endif |
| 23 | 23 | ||
| 24 | __attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; | 24 | __attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; |
diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/tmk_core/common/chibios/eeprom_teensy.c index 0fab9f73d..d436d0cb9 100644 --- a/tmk_core/common/chibios/eeprom_teensy.c +++ b/tmk_core/common/chibios/eeprom_teensy.c | |||
| @@ -61,7 +61,6 @@ | |||
| 61 | Attempts to modify the EEPROM_SIZE setting may brick your board. | 61 | Attempts to modify the EEPROM_SIZE setting may brick your board. |
| 62 | */ | 62 | */ |
| 63 | 63 | ||
| 64 | |||
| 65 | // Writing unaligned 16 or 32 bit data is handled automatically when | 64 | // Writing unaligned 16 or 32 bit data is handled automatically when |
| 66 | // this is defined, but at a cost of extra code size. Without this, | 65 | // this is defined, but at a cost of extra code size. Without this, |
| 67 | // any unaligned write will cause a hard fault exception! If you're | 66 | // any unaligned write will cause a hard fault exception! If you're |
| @@ -529,7 +528,7 @@ void eeprom_write_block(const void *buf, void *addr, uint32_t len) { | |||
| 529 | 528 | ||
| 530 | # ifndef EEPROM_SIZE | 529 | # ifndef EEPROM_SIZE |
| 531 | # include "eeconfig.h" | 530 | # include "eeconfig.h" |
| 532 | # define EEPROM_SIZE (((EECONFIG_SIZE+3)/4)*4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO | 531 | # define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO |
| 533 | # endif | 532 | # endif |
| 534 | __attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; | 533 | __attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; |
| 535 | 534 | ||
