summaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/flash_stm32.h
diff options
context:
space:
mode:
authorDonald Kjer <don.kjer@gmail.com>2021-08-23 15:15:34 -0700
committerGitHub <noreply@github.com>2021-08-23 23:15:34 +0100
commite756a21636149ad47c19c659d04be93cf3071dab (patch)
treeaa350c7209c5375f8a3c400353969d2ce0ed3748 /tmk_core/common/chibios/flash_stm32.h
parent2481e109a0f79b4cdcecab4a6bf6755fb5eda3fc (diff)
eeprom_stm32: implement high density wear leveling (#12567)
* eeprom_stm32: implement wear leveling Update EECONFIG_MAGIC_NUMBER eeprom_stm32: check emulated eeprom size is large enough * eeprom_stm32: Increasing simulated EEPROM density on stm32 * Adding utility script to decode emulated eeprom * Adding unit tests * Applying qmk cformat changes * cleaned up flash mocking * Fix for stm32eeprom_parser.py checking via signature with wrong base * Fix for nk65 keyboard Co-authored-by: Ilya Zhuravlev <whatever@xyz.is> Co-authored-by: zvecr <git@zvecr.com>
Diffstat (limited to 'tmk_core/common/chibios/flash_stm32.h')
-rw-r--r--tmk_core/common/chibios/flash_stm32.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/tmk_core/common/chibios/flash_stm32.h b/tmk_core/common/chibios/flash_stm32.h
index 90d5bff47e..9c6a7cc50f 100644
--- a/tmk_core/common/chibios/flash_stm32.h
+++ b/tmk_core/common/chibios/flash_stm32.h
@@ -22,8 +22,11 @@
extern "C" {
#endif
-#include <ch.h>
-#include <hal.h>
+#include <stdint.h>
+
+#ifdef FLASH_STM32_MOCKED
+extern uint8_t FlashBuf[MOCK_FLASH_SIZE];
+#endif
typedef enum { FLASH_BUSY = 1, FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_ERROR_OPT, FLASH_COMPLETE, FLASH_TIMEOUT, FLASH_BAD_ADDRESS } FLASH_Status;