summaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/flash_stm32.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-08-31 00:25:41 +0100
committerGitHub <noreply@github.com>2021-08-31 00:25:41 +0100
commitf2c9e82e5b3887ed28c3a5c68d27c4efaca54201 (patch)
tree42e04b09167623a8d3809e3dbd4e435bc877a5a5 /tmk_core/common/chibios/flash_stm32.c
parent1e7117317fd8a51f9ca6e926777694b930c9502b (diff)
cherry pick tidy up (#14244)
Diffstat (limited to 'tmk_core/common/chibios/flash_stm32.c')
-rw-r--r--tmk_core/common/chibios/flash_stm32.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c
index 66f2b13768..6b80ff71c3 100644
--- a/tmk_core/common/chibios/flash_stm32.c
+++ b/tmk_core/common/chibios/flash_stm32.c
@@ -16,22 +16,7 @@
* Modifications for QMK and STM32F303 by Yiancar
*/
-#if defined(EEPROM_EMU_STM32F303xC)
-# define STM32F303xC
-# include "stm32f3xx.h"
-#elif defined(EEPROM_EMU_STM32F103xB)
-# define STM32F103xB
-# include "stm32f1xx.h"
-#elif defined(EEPROM_EMU_STM32F072xB)
-# define STM32F072xB
-# include "stm32f0xx.h"
-#elif defined(EEPROM_EMU_STM32F042x6)
-# define STM32F042x6
-# include "stm32f0xx.h"
-#else
-# error "not implemented."
-#endif
-
+#include <hal.h>
#include "flash_stm32.h"
#if defined(EEPROM_EMU_STM32F103xB)
@@ -177,17 +162,3 @@ void FLASH_Lock(void) {
/* Set the Lock Bit to lock the FPEC and the FCR */
FLASH->CR |= FLASH_CR_LOCK;
}
-
-/**
- * @brief Clears the FLASH's pending flags.
- * @param FLASH_FLAG: specifies the FLASH flags to clear.
- * This parameter can be any combination of the following values:
- * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag
- * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag
- * @arg FLASH_FLAG_EOP: FLASH End of Programming flag
- * @retval None
- */
-void FLASH_ClearFlag(uint32_t FLASH_FLAG) {
- /* Clear the flags */
- FLASH->SR = FLASH_FLAG;
-}