[riot-notifications] [RIOT-OS/RIOT] drivers: add support for SHT2x (I2C temp and humidity sensor) (#10750)

Peter Kietzmann notifications at github.com
Mon Feb 4 11:44:10 CET 2019


PeterKietzmann commented on this pull request.



> + * @param[in]  dev          Device descriptor of SHT2X device to read from
+ *
+ * @returns                 Humidity in centi %RH (i.e. the percentage times 100).
+ *                          In case of an error it returns 0 (i.e. an unrealistic value).
+ */
+uint16_t sht2x_read_humidity(const sht2x_t *dev);
+
+/**
+ * @brief       Read identification code from the given SHT2X device
+ *
+ * @param[in]  dev          Device descriptor of SHT2X device to read from
+ * @param[out] buffer       Buffer to write the identification code to
+ * @param[in]  buflen       The size of @p buffer
+ *
+ * @return                  >= 0 on success, number of bytes read
+ * @return                  -1 if the code could not be acquired

Why `-1` not value from the enum above?

-- 
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/10750#pullrequestreview-199523725
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190204/77c3e3a0/attachment.html>


More information about the notifications mailing list