[riot-notifications] [RIOT-OS/RIOT] cpu/efm32: fix i2c transfers (#15764)

benpicco notifications at github.com
Mon Jan 18 21:24:43 CET 2021

@benpicco commented on this pull request.

-        if (i2c_progress[dev] == i2cTransferInProgress && timeout--) {
-            cortexm_sleep_until_event();
-        }
-        else {
-            busy = false;
-        }
+    while (i2c_progress[dev] == i2cTransferInProgress && counter--) {}

Could that be initialized by `auto_init`? If it sits on top of auto_init, it would run before all the other sensors that depend on it are initialized.

That would keep the periph driver implementations simple in that they can always assume to be called from thread context (not from ISR, not before the scheduler runs)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210118/a7102bea/attachment-0001.htm>

More information about the notifications mailing list