summaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/flash_stm32.c
diff options
context:
space:
mode:
authoryiancar <yiangosyiangou@cytanet.com.cy>2019-01-07 01:22:19 +0000
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-01-06 17:22:19 -0800
commit2bfac351edebc6e141d3291448512b0e228e5c47 (patch)
treedd8f9ed31f1a3ddabe59f26a9fdfb85b1570d0ae /tmk_core/common/chibios/flash_stm32.c
parent2c0bc5ed6be737e98377fa2299102f6737bbea72 (diff)
Final HS60v2 changes. (#4790)
* initial commit, this now mostly works - RGB controls work - Dynamic keymap still broken due to eeprom - Via works * STM32 eeprom update - Update EEPROM emulation library to handle 8bit data like AVR. - This library also allows for multiple page pairs resulting in greater EEPROM size flexibility * hs60 changes * HS60 hhkb added * Update keyboards/hs60/v2/config.h Co-Authored-By: yiancar <yiangosyiangou@cytanet.com.cy>
Diffstat (limited to 'tmk_core/common/chibios/flash_stm32.c')
-rwxr-xr-xtmk_core/common/chibios/flash_stm32.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c
index 2735934844..164654a15e 100755
--- a/tmk_core/common/chibios/flash_stm32.c
+++ b/tmk_core/common/chibios/flash_stm32.c
@@ -186,3 +186,18 @@ 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;
+}