[riot-notifications] [RIOT-OS/RIOT] cpu/cc260x: add I2C implementation (#11306)

Kaspar Schleiser notifications at github.com
Mon Apr 1 14:17:20 CEST 2019


kaspar030 commented on this pull request.



> +}
+
+void i2c_init(i2c_t devnum)
+{
+    (void)devnum;
+    assert(devnum < I2C_NUMOF);
+
+    /* Make sure everything is shut off in case of reinit */
+    PRCM->PDCTL0SERIAL = 0;
+    I2C->MCR = 0;
+    PRCM->I2CCLKGR = 0;
+
+    /* enable SERIAL power domain */
+    PRCM->PDCTL0SERIAL = 1;
+    while (!(PRCM->PDSTAT0 & PDSTAT0_SERIAL_ON)) {}
+

extra newlines

-- 
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/11306#pullrequestreview-221075254
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190401/f242bc23/attachment.html>


More information about the notifications mailing list