pulse_counter_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 UC Berkeley
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include "board.h"
22 #include "pulse_counter.h"
23 #include "saul_reg.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef PULSE_COUNTER_GPIO
37 #define PULSE_COUNTER_GPIO GPIO_PIN(0, 18)
38 #endif
39 
40 #ifndef PULSE_COUNTER_GPIO_FLANK
44 #define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING
45 #endif
46 
47 #ifndef PULSE_COUNTER_PARAMS
51 #define PULSE_COUNTER_PARAMS { .gpio = PULSE_COUNTER_GPIO, \
52  .gpio_flank = PULSE_COUNTER_GPIO_FLANK }
53 #endif
54 
55 #ifndef PULSE_COUNTER_SAUL_INFO
59 #define PULSE_COUNTER_SAUL_INFO { .name = "pulse counter" }
60 #endif
61 
66 {
68 };
69 
74 {
76 };
77 
80 #ifdef __cplusplus
81 }
82 #endif
83 
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.
Definition: pulse_counter.h:42
Additional data to collect for each entry.
Definition: saul_reg.h:48