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

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


kaspar030 commented on this pull request.



> +        PREG(I2C->MSTAT);
+        ret = -ETIMEDOUT;
+        if (I2C->MSTAT & MSTAT_ADRACK_N) {
+            DEBUG("ADDRESS NACK\n");
+            return -ENXIO;
+        }
+        else if (I2C->MSTAT & MSTAT_DATACK_N) {
+            DEBUG("DATA NACK\n");
+            ret = -EIO;
+        }
+        else if (I2C->MSTAT & MSTAT_ARBLST) {
+            DEBUG("ARBITRATION LOSS\n");
+            ret = -EAGAIN;
+        }
+        /*
+         * If an error if a non-NACK error occurs we must reinit or get stuck.

sentence starts weird

-- 
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-221075139
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190401/34e10c2d/attachment.html>


More information about the notifications mailing list