From 5ca4be13ed154ef22bdec8274b11b9b6777a10f3 Mon Sep 17 00:00:00 2001 From: lokher Date: Tue, 22 Aug 2023 12:00:28 +0800 Subject: [PATCH] Fix bug of emulated eeprom --- platforms/chibios/eeprom_stm32_l4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/chibios/eeprom_stm32_l4.c b/platforms/chibios/eeprom_stm32_l4.c index 33a6d284c8..37e9b27266 100644 --- a/platforms/chibios/eeprom_stm32_l4.c +++ b/platforms/chibios/eeprom_stm32_l4.c @@ -523,7 +523,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { /* Check word alignment */ if (len && (uint32_t)src % 2) { /* Read the unaligned first byte */ - *dest++ = EEPROM_ReadDataByte((const uintptr_t)((uint16_t *)src)); + *dest++ = EEPROM_ReadDataByte((const uintptr_t)((uint16_t *)src++)); --len; }