From 3f4d1cb504fa947bac8bd3e6156325c980c50ad5 Mon Sep 17 00:00:00 2001 From: "pablin.123.ra@gmail.com" Date: Wed, 12 Oct 2022 15:42:04 -0500 Subject: [PATCH] Change page count --- .../drivers/wear_leveling/wear_leveling_sn32_flash_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_sn32_flash_config.h b/platforms/chibios/drivers/wear_leveling/wear_leveling_sn32_flash_config.h index 5b1b9eb7fb2e..7ac9b6555297 100644 --- a/platforms/chibios/drivers/wear_leveling/wear_leveling_sn32_flash_config.h +++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_sn32_flash_config.h @@ -23,15 +23,15 @@ // The number of pages to use #ifndef WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT # if defined(QMK_MCU_SERIES_SN32F240B) -# define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 22 +# define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 23 # elif defined(QMK_MCU_SERIES_SN32F260) -# define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 22 +# define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 23 # endif #endif // The origin of the emulated eeprom #ifndef WEAR_LEVELING_SN32_EMULATION_BASE_PAGE_ADDRESS -# define WEAR_LEVELING_SN32_EMULATION_BASE_PAGE_ADDRESS ((uint32_t)(WEAR_LEVELING_SN32_PAGE_SIZE * WEAR_LEVELING_SN32_EMULATION_TOTAL_PAGE - ((WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT + 2) * WEAR_LEVELING_SN32_PAGE_SIZE))) +# define WEAR_LEVELING_SN32_EMULATION_BASE_PAGE_ADDRESS ((uint32_t)(WEAR_LEVELING_SN32_PAGE_SIZE * WEAR_LEVELING_SN32_EMULATION_TOTAL_PAGE - ((WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT + 1) * WEAR_LEVELING_SN32_PAGE_SIZE))) #endif // 4-byte writes