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 
30 #ifndef PULSE_COUNTER_GPIO
31 #define PULSE_COUNTER_GPIO GPIO_PIN(0,18)
32 #endif
33 
34 #ifndef PULSE_COUNTER_GPIO_FLANK
35 #define PULSE_COUNTER_GPIO_FLANK GPIO_FALLING
36 #endif
37 
38 #ifndef PULSE_COUNTER_PARAMS
39 #define PULSE_COUNTER_PARAMS { .gpio = PULSE_COUNTER_GPIO, \
40  .gpio_flank = PULSE_COUNTER_GPIO_FLANK }
41 #endif
42 
43 #ifndef PULSE_COUNTER_SAUL_INFO
44 #define PULSE_COUNTER_SAUL_INFO { .name = "pulse counter" }
45 #endif
46 
51 {
52  PULSE_COUNTER_PARAMS,
53 };
54 
59 {
60  PULSE_COUNTER_SAUL_INFO
61 };
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* PULSE_COUNTER_PARAMS_H */
68 
pulse_counter_saul_info
static const saul_reg_info_t pulse_counter_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: pulse_counter_params.h:58
pulse_counter_params_t
Parameters needed for device initialization.
Definition: pulse_counter.h:43
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
pulse_counter.h
Driver for the pulse counter.
saul_reg.h
SAUL registry interface definition.
pulse_counter_params
static const pulse_counter_params_t pulse_counter_params[]
PULSE_COUNTER configuration.
Definition: pulse_counter_params.h:50