[riot-notifications] [RIOT-OS/RIOT] driver/sgp30: initial import (#16222)

Kaspar Schleiser notifications at github.com
Wed Apr 7 10:20:30 CEST 2021


@kaspar030 commented on this pull request.



> +        if (!irq_is_in()) {
+            ztimer_sleep(ZTIMER_USEC, delay);
+        }
+        else {
+            ztimer_spin(ZTIMER_USEC, delay);
+        }
+        res = i2c_read_bytes(dev->params.i2c_dev, SGP30_I2C_ADDRESS,
+                             data, len, 0);
+
+    }
+    else if (res == 0 && !read) {
+        memcpy(&frame_cmd[2], data, len);
+        res = i2c_write_bytes(dev->params.i2c_dev, SGP30_I2C_ADDRESS,
+                              frame_cmd, sizeof(cmd) + len, 0);
+        if (res) {
+            DEBUG_PUTS("[sgp30]: fail to write data");

```suggestion
            DEBUG_PUTS("[sgp30]: failed to write data");
```

-- 
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/16222#pullrequestreview-629723233
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210407/af4fd509/attachment.htm>


More information about the notifications mailing list