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

Alexandre Abadie notifications at github.com
Thu Jan 3 16:29:08 CET 2019


aabadie commented on this pull request.



> +    lpsxxx_t dev;
+
+    printf("Test application for %s pressure sensor\n\n", LPSXXX_SAUL_NAME);
+    printf("Initializing %s sensor\n", LPSXXX_SAUL_NAME);
+    if (lpsxxx_init(&dev, &lpsxxx_params[0]) != LPSXXX_OK) {
+        puts("Initialization failed");
+        return 1;
+    }
+
+    uint16_t pres;
+    int16_t temp;
+    while (1) {
+        lpsxxx_enable(&dev);
+        xtimer_sleep(1); /* wait a bit for the measurements to complete */
+
+        lpsxxx_read_temp(&dev, &temp);

Good idea, I'll try this.

-- 
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_r245034815
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190103/054ee03d/attachment-0001.html>


More information about the notifications mailing list