Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
comparator.h File Reference
#include <zephyr/device.h>
#include <errno.h>
#include <zephyr/syscalls/comparator.h>

Go to the source code of this file.

Typedefs

typedef void(* comparator_callback_t) (const struct device *dev, void *user_data)
 Comparator callback template.
 

Enumerations

enum  comparator_trigger { COMPARATOR_TRIGGER_NONE = 0 , COMPARATOR_TRIGGER_RISING_EDGE , COMPARATOR_TRIGGER_FALLING_EDGE , COMPARATOR_TRIGGER_BOTH_EDGES }
 Comparator trigger enumerations. More...
 

Functions

int comparator_get_output (const struct device *dev)
 Get comparator's output state.
 
int comparator_set_trigger (const struct device *dev, enum comparator_trigger trigger)
 Set comparator's trigger.
 
static int comparator_set_trigger_callback (const struct device *dev, comparator_callback_t callback, void *user_data)
 Set comparator's trigger callback.
 
int comparator_trigger_is_pending (const struct device *dev)
 Check if comparator's trigger is pending and clear it.