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

Koen Zandberg notifications at github.com
Fri May 29 09:46:11 CEST 2020

### Contribution description

This commit enhances the I2C code of the nRF52 family to block on a
mutex while the I2C transfer is busy. The mutex is unlocked in the ISR
when it is trigger by either a stop condition or an error condition.

While the current code already allows the MCU to sleep during the transfer, this enhancement allows the RIOT scheduler to schedule other (lower priority) threads during the transfer.

### Testing procedure

I2C operations should still work, any connected peripheral such as an BME280 must still function as before. 

@MrKevinWeiss Do you have the time and hardware to give this a shot with RIOT-HIL?

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * nrf52/i2c: Use mutex and IRQ for blocking

-- File Changes --

    M cpu/nrf52/periph/i2c.c (29)

-- Patch Links --


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/20200529/bda3ffbe/attachment-0001.htm>

More information about the notifications mailing list