Loading...
Searching...
No Matches
pulse_counter_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 UC Berkeley
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "pulse_counter.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef PULSE_COUNTER_GPIO
34#define PULSE_COUNTER_GPIO GPIO_PIN(0, 18)
35#endif
36
37#ifndef PULSE_COUNTER_GPIO_FLANK
41#define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING
42#endif
43
44#ifndef PULSE_COUNTER_PARAMS
48#define PULSE_COUNTER_PARAMS { .gpio = PULSE_COUNTER_GPIO, \
49 .gpio_flank = PULSE_COUNTER_GPIO_FLANK }
50#endif
51
52#ifndef PULSE_COUNTER_SAUL_INFO
56#define PULSE_COUNTER_SAUL_INFO { .name = "pulse counter" }
57#endif
58
66
74
76
77#ifdef __cplusplus
78}
79#endif
80
Driver for the pulse counter.
static const saul_reg_info_t pulse_counter_saul_info[]
Additional meta information to keep in the SAUL registry.
#define PULSE_COUNTER_PARAMS
The pulse counter parameters to initialize the driver with.
#define PULSE_COUNTER_SAUL_INFO
The SAUL info to use when registering the pulse counter instances.
static const pulse_counter_params_t pulse_counter_params[]
PULSE_COUNTER configuration.
SAUL registry interface definition.
Parameters needed for device initialization.
Additional data to collect for each entry.
Definition saul_reg.h:48