Go to the documentation of this file.
25 #ifndef PULSE_COUNTER_H
26 #define PULSE_COUNTER_H
32 #include <stdatomic.h>
int16_t pulse_counter_read_without_reset(pulse_counter_t *dev)
Read pulse counter value.
Type with the same alignment and size as atomic_uint_least16_t
gpio_t gpio
GPIO pin that sensor is connected to.
Parameters needed for device initialization.
gpio_flank_t gpio_flank
GPIO flank option.
atomic_uint_least16_t pulse_count
pulse counter
Device descriptor for a pulse counter device.
int pulse_counter_init(pulse_counter_t *dev, const pulse_counter_params_t *params)
Initialize a pulse counter device.
C++ compatibility of default C11 atomics types.
void pulse_counter_reset(pulse_counter_t *dev)
Reset pulse counter value.
Low-level GPIO peripheral driver interface definitions.
int16_t pulse_counter_read_with_reset(pulse_counter_t *dev)
Read and reset pulse counter value.