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

MrKevinWeiss notifications at github.com
Mon Apr 1 14:37:00 CEST 2019


MrKevinWeiss 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.

Heh yup, race condition in my head I guess.

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


More information about the notifications mailing list