[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:45:11 CET 2019


PeterKietzmann commented on this pull request.



> +static void sleep_during_hum_measurement(sht2x_res_t resolution);
+
+/*---------------------------------------------------------------------------*
+ *                          SHT2x Core API                                   *
+ *---------------------------------------------------------------------------*/
+
+int sht2x_init(sht2x_t* dev, const sht2x_params_t* params)
+{
+    int i2c_result;
+
+    dev->params = *params;
+    if (dev->params.resolution != SHT2X_RES_12_14BIT &&
+        dev->params.resolution != SHT2X_RES_8_12BIT &&
+        dev->params.resolution != SHT2X_RES_10_13BIT &&
+        dev->params.resolution != SHT2X_RES_11_11BIT) {
+        return SHT2X_ERR_OTHER;

That's not documented in the header.

-- 
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-199524163
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190204/2e8234ab/attachment.html>


More information about the notifications mailing list