summaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-02-03 19:09:18 +0000
committerGitHub <noreply@github.com>2024-02-03 19:09:18 +0000
commit93f20e012e9ae5c8d677c8f9e10cc4dcd938a2f8 (patch)
tree87979dbff9f60e0ed5ac6f4dce08e77429ad4b8e /platforms
parent16800ea8a54dbb3d3b2904db7ced60d8ff69f068 (diff)
Workaround for G431 eeprom emulation (#23002)
Diffstat (limited to 'platforms')
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_G431XB/configs/hal_lld.h8
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_G431XB/configs/stm32_registry.h14
2 files changed, 22 insertions, 0 deletions
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 @@
1// Copyright 2024 QMK
2// SPDX-License-Identifier: GPL-2.0-or-later
3#pragma once
4
5// TODO: Remove when upstream no longer requires patching
6#include <stm32_registry.h>
7
8#include_next <hal_lld.h>
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 @@
1// Copyright 2024 QMK
2// SPDX-License-Identifier: GPL-2.0-or-later
3#pragma once
4
5// TODO: Remove when STM32_FLASH_SECTORS_PER_BANK fixed upstream
6#ifndef STM32_FLASH_SECTORS_PER_BANK
7# define STM32_FLASH_SECTORS_PER_BANK 64
8#endif
9
10#include_next <stm32_registry.h>
11
12// TODO: Remove when STM32_FLASH_NUMBER_OF_BANKS fixed upstream
13#undef STM32_FLASH_NUMBER_OF_BANKS
14#define STM32_FLASH_NUMBER_OF_BANKS 1