[riot-notifications] [RIOT-OS/RIOT] drivers/lpsxxx: refactor lps331ap and add support for lps25hb + lps22hb (#10695)

Alexandre Abadie notifications at github.com
Fri Jan 4 14:35:12 CET 2019


aabadie commented on this pull request.



> +    }
+
+    i2c_release(DEV_I2C);
+
+    DEBUG("[lpsxxx] initialization successful\n");
+    return LPSXXX_OK;
+}
+
+int lpsxxx_read_temp(const lpsxxx_t *dev, int16_t *temp)
+{
+    uint8_t tmp;
+    int16_t val = 0;
+    float res = TEMP_BASE;      /* reference value -> see datasheet */
+
+    i2c_acquire(DEV_I2C);
+    if (i2c_read_reg(DEV_I2C, DEV_ADDR, LPSXXX_REG_TEMP_OUT_L, &tmp, 0) < 0) {

@MrKevinWeiss, I have just tested it and there's no problem on both lps25hb and lps22hb.

-- 
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/10695#discussion_r245298842
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190104/508d29d4/attachment.html>


More information about the notifications mailing list