[riot-notifications] [RIOT-OS/RIOT] drivers/ph_oem: support for Atlas Scientific pH OEM sensor (#10983)

Leandro Lanzieri notifications at github.com
Wed Feb 27 14:54:52 CET 2019

leandrolanzieri commented on this pull request.

> +
+/* off by default, so it won't reset your previous calibration */
+#define CALIBRATION_TEST_ENABLED    (false)
+static ph_oem_t dev;
+static void interrupt_pin_cb(void *arg)
+    puts("\n[IRQ - Reading done]");
+    /* stop pH sensor from taking further readings*/
+    ph_oem_set_device_state(&dev, PH_OEM_STOP_READINGS);
+    /* reset interrupt pin in case of falling or rising flank */
+    if (dev.params.irq_option != PH_OEM_IRQ_BOTH) {
+        ph_oem_reset_interrupt_pin(&dev);

I think for the test application I would go with a simpler solution, just calling `event_wait` from the main thread if the interrupt pin is being used. Even just `thread_flags_set` and `thread_flags_wait_one` could be used. No need for a second thread running. 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190227/3ad181a4/attachment.html>

More information about the notifications mailing list