From 93f20e012e9ae5c8d677c8f9e10cc4dcd938a2f8 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 3 Feb 2024 19:09:18 +0000 Subject: [PATCH] Workaround for G431 eeprom emulation (#23002) --- .../boards/GENERIC_STM32_G431XB/configs/hal_lld.h | 8 ++++++++ .../GENERIC_STM32_G431XB/configs/stm32_registry.h | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h create mode 100644 platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h diff --git a/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h new file mode 100644 index 0000000000..15d7fbec0b --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h @@ -0,0 +1,8 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +// TODO: Remove when upstream no longer requires patching +#include + +#include_next diff --git a/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h new file mode 100644 index 0000000000..766df5a78e --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h @@ -0,0 +1,14 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +// TODO: Remove when STM32_FLASH_SECTORS_PER_BANK fixed upstream +#ifndef STM32_FLASH_SECTORS_PER_BANK +# define STM32_FLASH_SECTORS_PER_BANK 64 +#endif + +#include_next + +// TODO: Remove when STM32_FLASH_NUMBER_OF_BANKS fixed upstream +#undef STM32_FLASH_NUMBER_OF_BANKS +#define STM32_FLASH_NUMBER_OF_BANKS 1