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

Kees Bakker notifications at github.com
Mon Feb 4 19:42:20 CET 2019


keestux 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;

OK I'll add some more error codes and use these

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


More information about the notifications mailing list