GPIO based pulse counting driver. More...
GPIO based pulse counting driver.
This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.
Files | |
file | pulse_counter.h |
Driver for the pulse counter. | |
file | pulse_counter_params.h |
Default configuration for PULSE_COUNTER devices. | |
Data Structures | |
struct | pulse_counter_params_t |
Parameters needed for device initialization. More... | |
struct | pulse_counter_t |
Device descriptor for a pulse counter device. More... | |
Functions | |
int | pulse_counter_init (pulse_counter_t *dev, const pulse_counter_params_t *params) |
Initialize a pulse counter device. More... | |
int16_t | pulse_counter_read_with_reset (pulse_counter_t *dev) |
Read and reset pulse counter value. More... | |
int16_t | pulse_counter_read_without_reset (pulse_counter_t *dev) |
Read pulse counter value. More... | |
void | pulse_counter_reset (pulse_counter_t *dev) |
Reset pulse counter value. More... | |
int pulse_counter_init | ( | pulse_counter_t * | dev, |
const pulse_counter_params_t * | params | ||
) |
Initialize a pulse counter device.
[out] | dev | device descriptor |
[in] | params | configuration parameters |
int16_t pulse_counter_read_with_reset | ( | pulse_counter_t * | dev | ) |
Read and reset pulse counter value.
[out] | dev | device descriptor of sensor |
int16_t pulse_counter_read_without_reset | ( | pulse_counter_t * | dev | ) |
Read pulse counter value.
[in] | dev | device descriptor of sensor |
void pulse_counter_reset | ( | pulse_counter_t * | dev | ) |
Reset pulse counter value.
[out] | dev | device descriptor of sensor |