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

Alexandre Abadie notifications at github.com
Mon Apr 8 21:22:32 CEST 2019


aabadie requested changes on this pull request.

Looks good. I'll test this when time permits.

Thanks for taking over #10026 @fjmolinas 

> @@ -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 {

nit: this should be on the same line as closing curly brace above.

-- 
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#pullrequestreview-224038374
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190408/6bec9275/attachment.html>


More information about the notifications mailing list