[riot-notifications] [RIOT-OS/RIOT] drivers/ph_oem: support for Atlas Scientific pH OEM sensor (#10983)
notifications at github.com
Mon Feb 25 16:19:15 CET 2019
skullbox305 commented on this pull request.
> + *
+ * The pin will not auto reset on option @ref PH_OEM_IRQ_RISING
+ * and @ref PH_OEM_IRQ_FALLING after interrupt fires,
+ * so call this function again to reset the pin state, providing the
+ * same option (@ref PH_OEM_IRQ_RISING or @ref PH_OEM_IRQ_FALLING).
+ * Settings are not retained if the power is cut, so you have to call
+ * this function again after powering on the device.
+ * @param[in] dev device descriptor
+ * @param[in] option @ref ph_oem_irq_option_t
+ * @return @ref PH_OEM_OK on success
+ * @return @ref PH_OEM_WRITE_ERR if writing to the device failed
+int ph_oem_set_interrupt_pin(const ph_oem_t *dev, ph_oem_irq_option_t option);
ph_oem_set_interrupt_pin() is now private. The IRQ option is now defined in the device descriptor and set in ph_oem_params.h as 'PH_OEM_IRQ_BOTH' by default, if not otherwise defined in the makefile. Calling the interrupt is ready to work after calling ph_oem_enable_interrupt.
Added the ph_oem_reset_interrupt_pin() function. Function will be called in the callback or in the main in case of powering the device off and on again.
Removed the irq option 'PH_OEM_IRQ_DISABLED' because I dont think its really needed. If the interrupt pin is defined, this option has no real use. What do you think?
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...
More information about the notifications