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

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


@kaspar030 commented on this pull request.



> +
+    uint8_t frame[3];
+    frame[0] = humidity_scaled >> 8;
+    frame[1] = humidity_scaled & 0xFF;
+    frame[2] = _crc8(frame, sizeof(humidity_scaled));
+
+    int ret = _rx_tx_data(dev, SGP30_CMD_SET_HUMIDITY, frame, sizeof(frame),
+                          SGP30_DELAY_SET_HUMIDITY, false);
+    return ret ? -EPROTO : 0;
+}
+
+int sgp30_set_baseline(sgp30_t *dev, sgp30_data_t *data)
+{
+    uint8_t frame[6];
+
+    frame[0] = data->eco2 >> 8;

could reuse setter here

-- 
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-629728860
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210407/28c7e4bf/attachment.htm>


More information about the notifications mailing list