[riot-notifications] [RIOT-OS/RIOT] Driver for Honeywell HSC series pressure and temperature sensor (#15383)

Hopel.ess notifications at github.com
Sat Nov 7 16:36:51 CET 2020


@quangphhr commented on this pull request.



> +        return -1;
+    }
+
+    i2c_release(DEV_I2C);
+
+    *output = (((buf[2] << 8) | buf[3]) >> HSC_TEMPERATURE_SHIFT);
+        
+    /*DEBUG("UT: %i\n", (int)*(output));*/
+
+    return 0;
+}
+
+static int _read_up(const hsc_t *dev, int32_t *output)
+{
+    /* Read UP (Uncompsensated Pressure value) */
+    uint8_t buf[HSC_FULL_DATA_LENGTH] = {0};

The number of bytes sent from the sensor is fixed depending on the sensor option.  Therefore the buf will always read full data length.

-- 
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/15383#discussion_r519189206
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201107/7dd70b68/attachment.htm>


More information about the notifications mailing list