summaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/flash_stm32.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-08-30 23:26:17 +0000
committerQMK Bot <hello@qmk.fm>2021-08-30 23:26:17 +0000
commit4d4c61f2e87d66409181763329039ee60b9e2000 (patch)
tree103471e7f8df112d2760a7772577c1dd4d8f5e73 /tmk_core/common/chibios/flash_stm32.c
parenta163d34abc5305d515630e690ce74dc736306233 (diff)
parentf2c9e82e5b3887ed28c3a5c68d27c4efaca54201 (diff)
Merge remote-tracking branch 'origin/master' into develop
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;
-}