[riot-notifications] [RIOT-OS/RIOT] nrf52/i2c: Use mutex and IRQ for blocking (#14165)

benpicco notifications at github.com
Fri May 29 17:28:27 CEST 2020


@benpicco commented on this pull request.



>  static inline NRF_TWIM_Type *bus(i2c_t dev)
 {
     return i2c_config[dev].dev;
 }
 
 static int finish(i2c_t dev)
 {
+    /* Unmask interrupts */
+    bus(dev)->INTENSET = TWIM_INTEN_STOPPED_Msk | TWIM_INTEN_ERROR_Msk;
+    mutex_lock(&busy[dev]);
     DEBUG("[i2c] waiting for STOPPED or ERROR event\n");

Should be moved before the lock - just squash again

-- 
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/14165#pullrequestreview-421058794
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200529/a6e8d705/attachment.htm>


More information about the notifications mailing list