[riot-notifications] [RIOT-OS/RIOT] stm32_common/flash: move wait_for_pending_operation to flash_common (#11355)

Francisco notifications at github.com
Thu Apr 11 14:42:46 CEST 2019


fjmolinas commented on this pull request.



> @@ -56,3 +57,23 @@ void _lock(void)
         CNTRL_REG |= CNTRL_REG_LOCK;
     }
 }
+
+void _wait_for_pending_operations(void)
+{
+    if ((FLASH->SR & FLASH_SR_BSY) == FLASH_SR_BSY) {
+        DEBUG("[flash-common] waiting for any pending operation to finish\n");
+        while (FLASH->SR & FLASH_SR_BSY) {}
+    }
+    else {

Ok, I'll go for option 1, I'll look a little deeper into the error handling and provided it in a future PR. For now I'll just remove it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11355#discussion_r274402446
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190411/3f859a5d/attachment.html>


More information about the notifications mailing list