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 
19 #ifndef PULSE_COUNTER_PARAMS_H
20 #define PULSE_COUNTER_PARAMS_H
21 
22 #include "board.h"
23 #include "pulse_counter.h"
24 #include "saul_reg.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #ifndef PULSE_COUNTER_GPIO
38 #define PULSE_COUNTER_GPIO GPIO_PIN(0, 18)
39 #endif
40 
41 #ifndef PULSE_COUNTER_GPIO_FLANK
45 #define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING
46 #endif
47 
48 #ifndef PULSE_COUNTER_PARAMS
52 #define PULSE_COUNTER_PARAMS { .gpio = PULSE_COUNTER_GPIO, \
53  .gpio_flank = PULSE_COUNTER_GPIO_FLANK }
54 #endif
55 
56 #ifndef PULSE_COUNTER_SAUL_INFO
60 #define PULSE_COUNTER_SAUL_INFO { .name = "pulse counter" }
61 #endif
62 
67 {
69 };
70 
75 {
77 };
78 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* PULSE_COUNTER_PARAMS_H */
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:43
Additional data to collect for each entry.
Definition: saul_reg.h:49