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

Igor Knippenberg notifications at github.com
Mon Feb 25 16:32:02 CET 2019

skullbox305 commented on this pull request.

> +}
+int ph_oem_enable_interrupt(ph_oem_t *dev, ph_oem_interrupt_pin_cb_t cb,
+                            void *arg, ph_oem_irq_option_t option, gpio_mode_t gpio_mode)
+    if (dev->params.interrupt_pin == GPIO_UNDEF) {
+    }
+    if (ph_oem_set_interrupt_pin(dev, option) < 0) {
+        return PH_OEM_WRITE_ERR;
+    }
+    int gpio_flank = 0;
+    dev->arg = arg;

I think disabling the interrupt at runtime has no real use when the interrupt pin is defined, because in the case that it is disabled there is no way to know if a new reading is available. In a situation like this, one could rather use the device without the pin defined. So the arg and cb should not be NULL. 

Do you think adding a disable function for the irq is necessary? If so, I could add the case in 'ph_oem_new_reading_available()' to poll, if the irq is disabled.

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/20190225/7b4bd9fd/attachment.html>

More information about the notifications mailing list